Yocto 2.5
Move OpenBMC to Yocto 2.5(sumo)
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I5c5ad6904a16e14c1c397f0baf10c9d465594a78
diff --git a/import-layers/yocto-poky/meta/classes/archiver.bbclass b/import-layers/yocto-poky/meta/classes/archiver.bbclass
index ec80ad4..31c9b7e 100644
--- a/import-layers/yocto-poky/meta/classes/archiver.bbclass
+++ b/import-layers/yocto-poky/meta/classes/archiver.bbclass
@@ -46,7 +46,6 @@
do_ar_recipe[dirs] = "${ARCHIVER_OUTDIR}"
do_ar_original[dirs] = "${ARCHIVER_OUTDIR} ${ARCHIVER_WORKDIR}"
do_deploy_archives[dirs] = "${WORKDIR}"
-do_deploy_all_archives[dirs] = "${WORKDIR}"
# This is a convenience for the shell script to use it
@@ -114,10 +113,9 @@
if ar_recipe == "1":
d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_recipe' % pn)
- # Output the srpm package
- ar_srpm = d.getVarFlag('ARCHIVER_MODE', 'srpm')
- if ar_srpm == "1":
- if d.getVar('PACKAGES') != '' and d.getVar('IMAGE_PKGTYPE') == 'rpm':
+ # Output the SRPM package
+ if d.getVarFlag('ARCHIVER_MODE', 'srpm') == "1" and d.getVar('PACKAGES'):
+ if "package_rpm" in d.getVar('PACKAGE_CLASSES'):
d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_package_write_rpm' % pn)
if ar_dumpdata == "1":
d.appendVarFlag('do_package_write_rpm', 'depends', ' %s:do_dumpdata' % pn)
@@ -129,6 +127,8 @@
d.appendVarFlag('do_package_write_rpm', 'depends', ' %s:do_ar_patched' % pn)
elif ar_src == "configured":
d.appendVarFlag('do_package_write_rpm', 'depends', ' %s:do_ar_configured' % pn)
+ else:
+ bb.fatal("ARCHIVER_MODE[srpm] needs package_rpm in PACKAGE_CLASSES")
}
# Take all the sources for a recipe and puts them in WORKDIR/archiver-work/.
@@ -277,6 +277,11 @@
if (d.getVar('SRC_URI') == ""):
return
+ # For the kernel archive, srcdir may just be a link to the
+ # work-shared location. Use os.path.realpath to make sure
+ # that we archive the actual directory and not just the link.
+ srcdir = os.path.realpath(srcdir)
+
bb.utils.mkdirhier(ar_outdir)
if suffix:
filename = '%s-%s.tar.gz' % (d.getVar('PF'), suffix)
@@ -319,6 +324,10 @@
finally:
os.chdir(cwd)
+def is_work_shared(d):
+ pn = d.getVar('PN')
+ return bb.data.inherits_class('kernel', d) or pn.startswith('gcc-source')
+
# Run do_unpack and do_patch
python do_unpack_and_patch() {
if d.getVarFlag('ARCHIVER_MODE', 'src') not in \
@@ -331,7 +340,7 @@
pn = d.getVar('PN')
# The kernel class functions require it to be on work-shared, so we dont change WORKDIR
- if not (bb.data.inherits_class('kernel-yocto', d) or pn.startswith('gcc-source')):
+ if not is_work_shared(d):
# Change the WORKDIR to make do_unpack do_patch run in another dir.
d.setVar('WORKDIR', ar_workdir)
# Restore the original path to recipe's native sysroot (it's relative to WORKDIR).
@@ -351,7 +360,7 @@
oe.path.copytree(src, src_orig)
# Make sure gcc and kernel sources are patched only once
- if not (d.getVar('SRC_URI') == "" or (bb.data.inherits_class('kernel-yocto', d) or pn.startswith('gcc-source'))):
+ if not (d.getVar('SRC_URI') == "" or is_work_shared(d)):
bb.build.exec_func('do_patch', d)
# Create the patches
@@ -455,13 +464,6 @@
addtask do_ar_recipe
addtask do_deploy_archives before do_build
-addtask do_deploy_all_archives after do_deploy_archives
-do_deploy_all_archives[recrdeptask] = "do_deploy_archives"
-do_deploy_all_archives[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_deploy_all_archives() {
- :
-}
-
python () {
# Add tasks in the correct order, specifically for linux-yocto to avoid race condition.
# sstatesig.py:sstate_rundepfilter has special support that excludes this dependency
diff --git a/import-layers/yocto-poky/meta/classes/autotools.bbclass b/import-layers/yocto-poky/meta/classes/autotools.bbclass
index efa4098..cc857ac 100644
--- a/import-layers/yocto-poky/meta/classes/autotools.bbclass
+++ b/import-layers/yocto-poky/meta/classes/autotools.bbclass
@@ -200,7 +200,7 @@
bbnote Executing glib-gettextize --force --copy
echo "no" | glib-gettextize --force --copy
fi
- elif grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
+ elif [ "${BPN}" != "gettext" ] && grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
# We'd call gettextize here if it wasn't so broken...
cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
if [ -d ${S}/po/ ]; then
diff --git a/import-layers/yocto-poky/meta/classes/base.bbclass b/import-layers/yocto-poky/meta/classes/base.bbclass
index bd0d6e3..bb1f4b7 100644
--- a/import-layers/yocto-poky/meta/classes/base.bbclass
+++ b/import-layers/yocto-poky/meta/classes/base.bbclass
@@ -152,12 +152,8 @@
addtask unpack after do_fetch
do_unpack[dirs] = "${WORKDIR}"
-python () {
- if d.getVar('S') != d.getVar('WORKDIR'):
- d.setVarFlag('do_unpack', 'cleandirs', '${S}')
- else:
- d.setVarFlag('do_unpack', 'cleandirs', os.path.join('${S}', 'patches'))
-}
+do_unpack[cleandirs] = "${@d.getVar('S') if d.getVar('S') != d.getVar('WORKDIR') else os.path.join('${S}', 'patches')}"
+
python base_do_unpack() {
src_uri = (d.getVar('SRC_URI') or "").split()
if len(src_uri) == 0:
@@ -170,12 +166,6 @@
bb.fatal(str(e))
}
-def pkgarch_mapping(d):
- # Compatibility mappings of TUNE_PKGARCH (opt in)
- if d.getVar("PKGARCHCOMPAT_ARMV7A"):
- if d.getVar("TUNE_PKGARCH") == "armv7a-vfp-neon":
- d.setVar("TUNE_PKGARCH", "armv7a")
-
def get_layers_branch_rev(d):
layers = (d.getVar("BBLAYERS") or "").split()
layers_branch_rev = ["%-20s = \"%s:%s\"" % (os.path.basename(i), \
@@ -225,12 +215,9 @@
import bb.runqueue
if isinstance(e, bb.event.ConfigParsed):
- if not e.data.getVar("NATIVELSBSTRING", False):
- e.data.setVar("NATIVELSBSTRING", lsb_distro_identifier(e.data))
- e.data.setVar('BB_VERSION', bb.__version__)
- pkgarch_mapping(e.data)
- oe.utils.features_backfill("DISTRO_FEATURES", e.data)
- oe.utils.features_backfill("MACHINE_FEATURES", e.data)
+ if not d.getVar("NATIVELSBSTRING", False):
+ d.setVar("NATIVELSBSTRING", lsb_distro_identifier(d))
+ d.setVar('BB_VERSION', bb.__version__)
# Works with the line in layer.conf which changes PATH to point here
setup_hosttools_dir(d.getVar('HOSTTOOLS_DIR'), 'HOSTTOOLS', d)
setup_hosttools_dir(d.getVar('HOSTTOOLS_DIR'), 'HOSTTOOLS_NONFATAL', d, fatal=False)
@@ -246,7 +233,7 @@
e.mcdata[''].setVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS", deps)
if isinstance(e, bb.event.BuildStarted):
- localdata = bb.data.createCopy(e.data)
+ localdata = bb.data.createCopy(d)
statuslines = []
for func in oe.data.typed_value('BUILDCFG_FUNCS', localdata):
g = globals()
@@ -257,7 +244,7 @@
if flines:
statuslines.extend(flines)
- statusheader = e.data.getVar('BUILDCFG_HEADER')
+ statusheader = d.getVar('BUILDCFG_HEADER')
if statusheader:
bb.plain('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines)))
@@ -265,23 +252,23 @@
# target ones and we'd see dulpicate key names overwriting each other
# for various PREFERRED_PROVIDERS
if isinstance(e, bb.event.RecipePreFinalise):
- if e.data.getVar("TARGET_PREFIX") == e.data.getVar("SDK_PREFIX"):
- e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils")
- e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial")
- e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc")
- e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++")
- e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs")
+ if d.getVar("TARGET_PREFIX") == d.getVar("SDK_PREFIX"):
+ d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils")
+ d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial")
+ d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc")
+ d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++")
+ d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs")
if isinstance(e, bb.runqueue.sceneQueueComplete):
- completions = e.data.expand("${STAGING_DIR}/sstatecompletions")
+ completions = d.expand("${STAGING_DIR}/sstatecompletions")
if os.path.exists(completions):
cmds = set()
with open(completions, "r") as f:
cmds = set(f)
- e.data.setVar("completion_function", "\n".join(cmds))
- e.data.setVarFlag("completion_function", "func", "1")
+ d.setVar("completion_function", "\n".join(cmds))
+ d.setVarFlag("completion_function", "func", "1")
bb.debug(1, "Executing SceneQueue Completion commands: %s" % "\n".join(cmds))
- bb.build.exec_func("completion_function", e.data)
+ bb.build.exec_func("completion_function", d)
os.remove(completions)
if isinstance(e, bb.event.RecipeParsed):
@@ -300,7 +287,7 @@
if p.startswith("virtual/") and p not in multiwhitelist:
profprov = d.getVar("PREFERRED_PROVIDER_" + p)
if profprov and pn != profprov:
- raise bb.parse.SkipPackage("PREFERRED_PROVIDER_%s set to %s, not %s" % (p, profprov, pn))
+ raise bb.parse.SkipRecipe("PREFERRED_PROVIDER_%s set to %s, not %s" % (p, profprov, pn))
}
CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
@@ -389,6 +376,10 @@
python () {
import string, re
+ # Handle backfilling
+ oe.utils.features_backfill("DISTRO_FEATURES", d)
+ oe.utils.features_backfill("MACHINE_FEATURES", d)
+
# Handle PACKAGECONFIG
#
# These take the form:
@@ -463,7 +454,7 @@
pn = d.getVar('PN')
license = d.getVar('LICENSE')
- if license == "INVALID":
+ if license == "INVALID" and pn != "defaultpkgname":
bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn)
if bb.data.inherits_class('license', d):
@@ -472,7 +463,7 @@
if unmatched_license_flag:
bb.debug(1, "Skipping %s because it has a restricted license not"
" whitelisted in LICENSE_FLAGS_WHITELIST" % pn)
- raise bb.parse.SkipPackage("because it has a restricted license not"
+ raise bb.parse.SkipRecipe("because it has a restricted license not"
" whitelisted in LICENSE_FLAGS_WHITELIST")
# If we're building a target package we need to use fakeroot (pseudo)
@@ -500,7 +491,7 @@
if re.match(need_machine, m):
break
else:
- raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % d.getVar('MACHINE'))
+ raise bb.parse.SkipRecipe("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % d.getVar('MACHINE'))
source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', False)
if not source_mirror_fetch:
@@ -509,7 +500,7 @@
import re
this_host = d.getVar('HOST_SYS')
if not re.match(need_host, this_host):
- raise bb.parse.SkipPackage("incompatible with host %s (not in COMPATIBLE_HOST)" % this_host)
+ raise bb.parse.SkipRecipe("incompatible with host %s (not in COMPATIBLE_HOST)" % this_host)
bad_licenses = (d.getVar('INCOMPATIBLE_LICENSE') or "").split()
@@ -562,7 +553,7 @@
bb.debug(1, "INCLUDING the package " + pkg)
elif all_skipped or incompatible_license(d, bad_licenses):
bb.debug(1, "SKIPPING recipe %s because it's %s" % (pn, license))
- raise bb.parse.SkipPackage("it has an incompatible license: %s" % license)
+ raise bb.parse.SkipRecipe("it has an incompatible license: %s" % license)
elif pn in whitelist:
if pn in incompatwl:
bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted")
@@ -635,6 +626,10 @@
elif path.endswith('.rpm'):
d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot')
+ # *.deb should DEPEND on xz-native for unpacking
+ elif path.endswith('.deb'):
+ d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot')
+
if needsrcrev:
d.setVar("SRCPV", "${@bb.fetch2.get_srcrev(d)}")
diff --git a/import-layers/yocto-poky/meta/classes/bin_package.bbclass b/import-layers/yocto-poky/meta/classes/bin_package.bbclass
index a52b75b..cbc9b1f 100644
--- a/import-layers/yocto-poky/meta/classes/bin_package.bbclass
+++ b/import-layers/yocto-poky/meta/classes/bin_package.bbclass
@@ -26,7 +26,10 @@
bin_package_do_install () {
# Do it carefully
[ -d "${S}" ] || exit 1
- cd ${S} || exit 1
+ if [ -z "$(ls -A ${S})" ]; then
+ bbfatal bin_package has nothing to install. Be sure the SRC_URI unpacks into S.
+ fi
+ cd ${S}
tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \
| tar --no-same-owner -xpf - -C ${D}
}
diff --git a/import-layers/yocto-poky/meta/classes/blacklist.bbclass b/import-layers/yocto-poky/meta/classes/blacklist.bbclass
index e58564c..dc79422 100644
--- a/import-layers/yocto-poky/meta/classes/blacklist.bbclass
+++ b/import-layers/yocto-poky/meta/classes/blacklist.bbclass
@@ -16,5 +16,5 @@
blacklist = d.getVarFlag('PNBLACKLIST', d.getVar('PN'))
if blacklist:
- raise bb.parse.SkipPackage("Recipe is blacklisted: %s" % (blacklist))
+ raise bb.parse.SkipRecipe("Recipe is blacklisted: %s" % (blacklist))
}
diff --git a/import-layers/yocto-poky/meta/classes/buildhistory.bbclass b/import-layers/yocto-poky/meta/classes/buildhistory.bbclass
index 7a5534e..63980f7 100644
--- a/import-layers/yocto-poky/meta/classes/buildhistory.bbclass
+++ b/import-layers/yocto-poky/meta/classes/buildhistory.bbclass
@@ -37,7 +37,7 @@
BUILDHISTORY_DIR_SDK = "${BUILDHISTORY_DIR}/sdk/${SDK_NAME}${SDK_EXT}/${IMAGE_BASENAME}"
BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
BUILDHISTORY_SDK_FILES ?= "conf/local.conf conf/bblayers.conf conf/auto.conf conf/locked-sigs.inc conf/devtool.conf"
-BUILDHISTORY_COMMIT ?= "0"
+BUILDHISTORY_COMMIT ?= "1"
BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
BUILDHISTORY_PUSH_REPO ?= ""
diff --git a/import-layers/yocto-poky/meta/classes/cmake.bbclass b/import-layers/yocto-poky/meta/classes/cmake.bbclass
index ac2c151..fcfd5dd 100644
--- a/import-layers/yocto-poky/meta/classes/cmake.bbclass
+++ b/import-layers/yocto-poky/meta/classes/cmake.bbclass
@@ -7,6 +7,23 @@
# We need to unset CCACHE otherwise cmake gets too confused
CCACHE = ""
+# What CMake generator to use.
+# The supported options are "Unix Makefiles" or "Ninja".
+OECMAKE_GENERATOR ?= "Ninja"
+
+python() {
+ generator = d.getVar("OECMAKE_GENERATOR")
+ if generator == "Unix Makefiles":
+ args = "-G 'Unix Makefiles' -DCMAKE_MAKE_PROGRAM=" + d.getVar("MAKE")
+ d.setVar("OECMAKE_GENERATOR_ARGS", args)
+ d.setVarFlag("do_compile", "progress", "percent")
+ elif generator == "Ninja":
+ d.appendVar("DEPENDS", " ninja-native")
+ d.setVar("OECMAKE_GENERATOR_ARGS", "-G Ninja -DCMAKE_MAKE_PROGRAM=ninja")
+ d.setVarFlag("do_compile", "progress", "outof:^\[(\d+)/(\d+)\]\s+")
+ else:
+ bb.fatal("Unknown CMake Generator %s" % generator)
+}
# C/C++ Compiler (without cpu arch/tune arguments)
OECMAKE_C_COMPILER ?= "`echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`"
OECMAKE_CXX_COMPILER ?= "`echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`"
@@ -34,6 +51,11 @@
EXTRA_OECMAKE_BUILD_prepend_task-compile = "${PARALLEL_MAKE} "
EXTRA_OECMAKE_BUILD_prepend_task-install = "${PARALLEL_MAKEINST} "
+OECMAKE_TARGET_COMPILE ?= "all"
+OECMAKE_TARGET_INSTALL ?= "install"
+
+FILES_${PN}-dev += "${libdir}/cmake ${datadir}/cmake"
+
# CMake expects target architectures in the format of uname(2),
# which do not always match TARGET_ARCH, so all the necessary
# conversions should happen here.
@@ -116,6 +138,7 @@
fi
cmake \
+ ${OECMAKE_GENERATOR_ARGS} \
$oecmake_sitefile \
${OECMAKE_SOURCEPATH} \
-DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
@@ -136,15 +159,17 @@
-Wno-dev
}
-do_compile[progress] = "percent"
+cmake_runcmake_build() {
+ bbnote ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '${B}' "$@" -- ${EXTRA_OECMAKE_BUILD}
+ eval ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '${B}' "$@" -- ${EXTRA_OECMAKE_BUILD}
+}
+
cmake_do_compile() {
- bbnote VERBOSE=1 cmake --build '${B}' -- ${EXTRA_OECMAKE_BUILD}
- VERBOSE=1 cmake --build '${B}' -- ${EXTRA_OECMAKE_BUILD}
+ cmake_runcmake_build --target ${OECMAKE_TARGET_COMPILE}
}
cmake_do_install() {
- bbnote DESTDIR='${D}' cmake --build '${B}' --target install -- ${EXTRA_OECMAKE_BUILD}
- DESTDIR='${D}' cmake --build '${B}' --target install -- ${EXTRA_OECMAKE_BUILD}
+ DESTDIR='${D}' cmake_runcmake_build --target ${OECMAKE_TARGET_INSTALL}
}
EXPORT_FUNCTIONS do_configure do_compile do_install do_generate_toolchain_file
diff --git a/import-layers/yocto-poky/meta/classes/cross-canadian.bbclass b/import-layers/yocto-poky/meta/classes/cross-canadian.bbclass
index 1928455..ee8aa61 100644
--- a/import-layers/yocto-poky/meta/classes/cross-canadian.bbclass
+++ b/import-layers/yocto-poky/meta/classes/cross-canadian.bbclass
@@ -38,7 +38,7 @@
extralibcs = [""]
if "musl" in d.getVar("BASECANADIANEXTRAOS"):
extralibcs.append("musl")
- for variant in ["", "spe", "x32", "eabi", "n32", "ilp32"]:
+ for variant in ["", "spe", "x32", "eabi", "n32", "_ilp32"]:
for libc in extralibcs:
entry = "linux"
if variant and libc:
@@ -123,8 +123,6 @@
-Wl,-rpath-link,${STAGING_LIBDIR}/.. \
-Wl,-rpath,${libdir}/.. "
-DEPENDS_GETTEXT = "gettext-native nativesdk-gettext"
-
#
# We need chrpath >= 0.14 to ensure we can deal with 32 and 64 bit
# binaries
diff --git a/import-layers/yocto-poky/meta/classes/cross.bbclass b/import-layers/yocto-poky/meta/classes/cross.bbclass
index d217717..4e85cab 100644
--- a/import-layers/yocto-poky/meta/classes/cross.bbclass
+++ b/import-layers/yocto-poky/meta/classes/cross.bbclass
@@ -41,8 +41,6 @@
TOOLCHAIN_OPTIONS = ""
-DEPENDS_GETTEXT = "gettext-native"
-
# This class encodes staging paths into its scripts data so can only be
# reused if we manipulate the paths.
SSTATE_SCAN_CMD ?= "${SSTATE_SCAN_CMD_NATIVE}"
@@ -92,3 +90,8 @@
export NM = "${BUILD_NM}"
inherit nopackages
+
+python do_addto_recipe_sysroot () {
+ bb.build.exec_func("extend_recipe_sysroot", d)
+}
+addtask addto_recipe_sysroot after do_populate_sysroot
diff --git a/import-layers/yocto-poky/meta/classes/cve-check.bbclass b/import-layers/yocto-poky/meta/classes/cve-check.bbclass
index bc2f03f..537659d 100644
--- a/import-layers/yocto-poky/meta/classes/cve-check.bbclass
+++ b/import-layers/yocto-poky/meta/classes/cve-check.bbclass
@@ -23,12 +23,12 @@
# The product name that the CVE database uses. Defaults to BPN, but may need to
# be overriden per recipe (for example tiff.bb sets CVE_PRODUCT=libtiff).
CVE_PRODUCT ??= "${BPN}"
+CVE_VERSION ??= "${PV}"
CVE_CHECK_DB_DIR ?= "${DL_DIR}/CVE_CHECK"
CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvd.db"
-CVE_CHECK_LOCAL_DIR ?= "${WORKDIR}/cve"
-CVE_CHECK_LOCAL_FILE ?= "${CVE_CHECK_LOCAL_DIR}/cve.log"
+CVE_CHECK_LOG ?= "${T}/cve.log"
CVE_CHECK_TMP_FILE ?= "${TMPDIR}/cve_check"
CVE_CHECK_DIR ??= "${DEPLOY_DIR}/cve"
@@ -169,7 +169,10 @@
cves_patched = []
cves_unpatched = []
bpn = d.getVar("CVE_PRODUCT")
- pv = d.getVar("PV").split("+git")[0]
+ # If this has been unset then we're not scanning for CVEs here (for example, image recipes)
+ if not bpn:
+ return ([], [])
+ pv = d.getVar("CVE_VERSION").split("+git")[0]
cves = " ".join(patched_cves)
cve_db_dir = d.getVar("CVE_CHECK_DB_DIR")
cve_whitelist = ast.literal_eval(d.getVar("CVE_CHECK_CVE_WHITELIST"))
@@ -181,9 +184,6 @@
bb.note("Recipe has been whitelisted, skipping check")
return ([], [])
- # It is needed to export the proxies to download the database using HTTP
- bb.utils.export_proxies(d)
-
try:
# Write the faux CSV file to be used with cve-check-tool
fd, faux = tempfile.mkstemp(prefix="cve-faux-")
@@ -251,11 +251,11 @@
CVE manifest if enabled.
"""
- cve_file = d.getVar("CVE_CHECK_LOCAL_FILE")
+ cve_file = d.getVar("CVE_CHECK_LOG")
nvd_link = "https://web.nvd.nist.gov/view/vuln/detail?vulnId="
write_string = ""
unpatched_cves = []
- bb.utils.mkdirhier(d.getVar("CVE_CHECK_LOCAL_DIR"))
+ bb.utils.mkdirhier(os.path.dirname(cve_file))
for cve in sorted(cve_data):
write_string += "PACKAGE NAME: %s\n" % d.getVar("PN")
diff --git a/import-layers/yocto-poky/meta/classes/debian.bbclass b/import-layers/yocto-poky/meta/classes/debian.bbclass
index 8124558..989ea8f 100644
--- a/import-layers/yocto-poky/meta/classes/debian.bbclass
+++ b/import-layers/yocto-poky/meta/classes/debian.bbclass
@@ -25,12 +25,10 @@
}
python debian_package_name_hook () {
- import glob, copy, stat, errno, re
+ import glob, copy, stat, errno, re, pathlib, subprocess
- pkgdest = d.getVar('PKGDEST')
+ pkgdest = d.getVar("PKGDEST")
packages = d.getVar('PACKAGES')
- bin_re = re.compile(".*/s?" + os.path.basename(d.getVar("bindir")) + "$")
- lib_re = re.compile(".*/" + os.path.basename(d.getVar("libdir")) + "$")
so_re = re.compile("lib.*\.so")
def socrunch(s):
@@ -60,25 +58,32 @@
d.appendVar('RPROVIDES_' + pkg, " " + pkg + " (=" + d.getVar("PKGV") + ")")
def auto_libname(packages, orig_pkg):
+ p = lambda var: pathlib.PurePath(d.getVar(var))
+ libdirs = (p("base_libdir"), p("libdir"))
+ bindirs = (p("base_bindir"), p("base_sbindir"), p("bindir"), p("sbindir"))
+
sonames = []
has_bins = 0
has_libs = 0
- for file in pkgfiles[orig_pkg]:
- root = os.path.dirname(file)
- if bin_re.match(root):
+ for f in pkgfiles[orig_pkg]:
+ # This is .../packages-split/orig_pkg/
+ pkgpath = pathlib.PurePath(pkgdest, orig_pkg)
+ # Strip pkgpath off the full path to a file in the package, re-root
+ # so it is absolute, and then get the parent directory of the file.
+ path = pathlib.PurePath("/") / (pathlib.PurePath(f).relative_to(pkgpath).parent)
+ if path in bindirs:
has_bins = 1
- if lib_re.match(root):
+ if path in libdirs:
has_libs = 1
- if so_re.match(os.path.basename(file)):
- cmd = (d.getVar('TARGET_PREFIX') or "") + "objdump -p " + file + " 2>/dev/null"
- fd = os.popen(cmd)
- lines = fd.readlines()
- fd.close()
- for l in lines:
- m = re.match("\s+SONAME\s+([^\s]*)", l)
- if m and not m.group(1) in sonames:
- sonames.append(m.group(1))
-
+ if so_re.match(os.path.basename(f)):
+ try:
+ cmd = [d.expand("${TARGET_PREFIX}objdump"), "-p", f]
+ output = subprocess.check_output(cmd).decode("utf-8")
+ for m in re.finditer("\s+SONAME\s+([^\s]+)", output):
+ if m.group(1) not in sonames:
+ sonames.append(m.group(1))
+ except subprocess.CalledProcessError:
+ pass
bb.debug(1, 'LIBNAMES: pkg %s libs %d bins %d sonames %s' % (orig_pkg, has_libs, has_bins, sonames))
soname = None
if len(sonames) == 1:
@@ -120,6 +125,7 @@
if not newpkg.find(mlpre) == 0:
newpkg = mlpre + newpkg
if newpkg != pkg:
+ bb.note("debian: renaming %s to %s" % (pkg, newpkg))
d.setVar('PKG_' + pkg, newpkg)
add_rprovides(pkg, d)
else:
@@ -138,4 +144,3 @@
EXPORT_FUNCTIONS package_name_hook
DEBIAN_NAMES = "1"
-
diff --git a/import-layers/yocto-poky/meta/classes/deploy.bbclass b/import-layers/yocto-poky/meta/classes/deploy.bbclass
index 8ad07da..6d52908 100644
--- a/import-layers/yocto-poky/meta/classes/deploy.bbclass
+++ b/import-layers/yocto-poky/meta/classes/deploy.bbclass
@@ -8,4 +8,4 @@
}
addtask do_deploy_setscene
do_deploy[dirs] = "${DEPLOYDIR} ${B}"
-do_deploy[stamp-extra-info] = "${MACHINE}"
+do_deploy[stamp-extra-info] = "${MACHINE_ARCH}"
diff --git a/import-layers/yocto-poky/meta/classes/devtool-source.bbclass b/import-layers/yocto-poky/meta/classes/devtool-source.bbclass
index 8f5bc86..56882a4 100644
--- a/import-layers/yocto-poky/meta/classes/devtool-source.bbclass
+++ b/import-layers/yocto-poky/meta/classes/devtool-source.bbclass
@@ -152,9 +152,65 @@
}
python devtool_post_patch() {
+ import shutil
tempdir = d.getVar('DEVTOOL_TEMPDIR')
with open(os.path.join(tempdir, 'srcsubdir'), 'r') as f:
srcsubdir = f.read()
+ with open(os.path.join(tempdir, 'initial_rev'), 'r') as f:
+ initial_rev = f.read()
+
+ def rm_patches():
+ patches_dir = os.path.join(srcsubdir, 'patches')
+ if os.path.exists(patches_dir):
+ shutil.rmtree(patches_dir)
+ # Restore any "patches" directory that was actually part of the source tree
+ try:
+ bb.process.run('git checkout -- patches', cwd=srcsubdir)
+ except bb.process.ExecutionError:
+ pass
+
+ extra_overrides = d.getVar('DEVTOOL_EXTRA_OVERRIDES')
+ if extra_overrides:
+ extra_override_list = extra_overrides.split(':')
+ devbranch = d.getVar('DEVTOOL_DEVBRANCH')
+ default_overrides = d.getVar('OVERRIDES').split(':')
+ no_overrides = []
+ # First, we may have some overrides that are referred to in the recipe set in
+ # our configuration, so we need to make a branch that excludes those
+ for override in default_overrides:
+ if override not in extra_override_list:
+ no_overrides.append(override)
+ if default_overrides != no_overrides:
+ # Some overrides are active in the current configuration, so
+ # we need to create a branch where none of the overrides are active
+ bb.process.run('git checkout %s -b devtool-no-overrides' % initial_rev, cwd=srcsubdir)
+ # Run do_patch function with the override applied
+ localdata = bb.data.createCopy(d)
+ localdata.setVar('OVERRIDES', ':'.join(no_overrides))
+ bb.build.exec_func('do_patch', localdata)
+ rm_patches()
+ # Now we need to reconcile the dev branch with the no-overrides one
+ # (otherwise we'd likely be left with identical commits that have different hashes)
+ bb.process.run('git checkout %s' % devbranch, cwd=srcsubdir)
+ bb.process.run('git rebase devtool-no-overrides', cwd=srcsubdir)
+ else:
+ bb.process.run('git checkout %s -b devtool-no-overrides' % devbranch, cwd=srcsubdir)
+
+ for override in extra_override_list:
+ localdata = bb.data.createCopy(d)
+ if override in default_overrides:
+ bb.process.run('git branch devtool-override-%s %s' % (override, devbranch), cwd=srcsubdir)
+ else:
+ # Reset back to the initial commit on a new branch
+ bb.process.run('git checkout %s -b devtool-override-%s' % (initial_rev, override), cwd=srcsubdir)
+ # Run do_patch function with the override applied
+ localdata.appendVar('OVERRIDES', ':%s' % override)
+ bb.build.exec_func('do_patch', localdata)
+ rm_patches()
+ # Now we need to reconcile the new branch with the no-overrides one
+ # (otherwise we'd likely be left with identical commits that have different hashes)
+ bb.process.run('git rebase devtool-no-overrides', cwd=srcsubdir)
+ bb.process.run('git checkout %s' % devbranch, cwd=srcsubdir)
bb.process.run('git tag -f devtool-patched', cwd=srcsubdir)
}
diff --git a/import-layers/yocto-poky/meta/classes/distro_features_check.bbclass b/import-layers/yocto-poky/meta/classes/distro_features_check.bbclass
index e74d3c0..9b78b03 100644
--- a/import-layers/yocto-poky/meta/classes/distro_features_check.bbclass
+++ b/import-layers/yocto-poky/meta/classes/distro_features_check.bbclass
@@ -17,7 +17,7 @@
if any_of_distro_features:
any_of_distro_features = any_of_distro_features.split()
if set.isdisjoint(set(any_of_distro_features),set(distro_features)):
- raise bb.parse.SkipPackage("one of '%s' needs to be in DISTRO_FEATURES" % any_of_distro_features)
+ raise bb.parse.SkipRecipe("one of '%s' needs to be in DISTRO_FEATURES" % any_of_distro_features)
required_distro_features = d.getVar('REQUIRED_DISTRO_FEATURES')
if required_distro_features:
@@ -26,12 +26,12 @@
if f in distro_features:
continue
else:
- raise bb.parse.SkipPackage("missing required distro feature '%s' (not in DISTRO_FEATURES)" % f)
+ raise bb.parse.SkipRecipe("missing required distro feature '%s' (not in DISTRO_FEATURES)" % f)
conflict_distro_features = d.getVar('CONFLICT_DISTRO_FEATURES')
if conflict_distro_features:
conflict_distro_features = conflict_distro_features.split()
for f in conflict_distro_features:
if f in distro_features:
- raise bb.parse.SkipPackage("conflicting distro feature '%s' (in DISTRO_FEATURES)" % f)
+ raise bb.parse.SkipRecipe("conflicting distro feature '%s' (in DISTRO_FEATURES)" % f)
}
diff --git a/import-layers/yocto-poky/meta/classes/distrodata.bbclass b/import-layers/yocto-poky/meta/classes/distrodata.bbclass
index c85f7b3..59ee8ce 100644
--- a/import-layers/yocto-poky/meta/classes/distrodata.bbclass
+++ b/import-layers/yocto-poky/meta/classes/distrodata.bbclass
@@ -188,14 +188,6 @@
}
do_distrodata[vardepsexclude] = "DATETIME"
-addtask distrodataall after do_distrodata
-do_distrodataall[recrdeptask] = "do_distrodataall do_distrodata"
-do_distrodataall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_distrodataall[nostamp] = "1"
-do_distrodataall() {
- :
-}
-
addhandler checkpkg_eventhandler
checkpkg_eventhandler[eventmask] = "bb.event.BuildStarted bb.event.BuildCompleted"
python checkpkg_eventhandler() {
@@ -272,24 +264,15 @@
if upstream_check_unreliable == "1":
return "N/A", "CHECK_IS_UNRELIABLE"
- try:
- uv = oe.recipeutils.get_recipe_upstream_version(localdata)
- pupver = uv['version'] if uv['version'] else "N/A"
- except Exception as e:
- pupver = "N/A"
+ uv = oe.recipeutils.get_recipe_upstream_version(localdata)
+ pupver = uv['version'] if uv['version'] else "N/A"
+ pversion = uv['current_version']
+ revision = uv['revision'] if uv['revision'] else "N/A"
if pupver == "N/A":
pstatus = "UNKNOWN" if upstream_version_unknown else "UNKNOWN_BROKEN"
else:
- src_uri = (localdata.getVar('SRC_URI') or '').split()
- if src_uri:
- uri_type, _, _, _, _, _ = decodeurl(src_uri[0])
- else:
- uri_type = "none"
- pv, _, _ = oe.recipeutils.get_recipe_pv_without_srcpv(pversion, uri_type)
- upv, _, _ = oe.recipeutils.get_recipe_pv_without_srcpv(pupver, uri_type)
-
- cmp = vercmp_string(pv, upv)
+ cmp = vercmp_string(pversion, pupver)
if cmp == -1:
pstatus = "UPDATE" if not upstream_version_unknown else "KNOWN_BROKEN"
elif cmp == 0:
@@ -297,7 +280,7 @@
else:
pstatus = "UNKNOWN" if upstream_version_unknown else "UNKNOWN_BROKEN"
- return pupver, pstatus
+ return pversion, pupver, pstatus, revision
"""initialize log files."""
@@ -334,7 +317,6 @@
pdesc = localdata.getVar('DESCRIPTION')
pgrp = localdata.getVar('SECTION')
- pversion = localdata.getVar('PV')
plicense = localdata.getVar('LICENSE')
psection = localdata.getVar('SECTION')
phome = localdata.getVar('HOMEPAGE')
@@ -345,7 +327,7 @@
psrcuri = localdata.getVar('SRC_URI')
maintainer = localdata.getVar('RECIPE_MAINTAINER')
- pupver, pstatus = get_upstream_version_and_status()
+ pversion, pupver, pstatus, prevision = get_upstream_version_and_status()
if psrcuri:
psrcuri = psrcuri.split()[0]
@@ -358,20 +340,12 @@
with open(logfile, "a") as f:
writer = csv.writer(f, delimiter='\t')
writer.writerow([pname, pversion, pupver, plicense, psection, phome,
- prelease, pdepends, pbugtracker, ppe, pdesc, pstatus, pupver,
+ prelease, pdepends, pbugtracker, ppe, pdesc, pstatus, prevision,
psrcuri, maintainer, no_upgr_reason])
f.close()
bb.utils.unlockfile(lf)
}
-addtask checkpkgall after do_checkpkg
-do_checkpkgall[recrdeptask] = "do_checkpkgall do_checkpkg"
-do_checkpkgall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_checkpkgall[nostamp] = "1"
-do_checkpkgall() {
- :
-}
-
addhandler distro_check_eventhandler
distro_check_eventhandler[eventmask] = "bb.event.BuildStarted"
python distro_check_eventhandler() {
@@ -407,13 +381,6 @@
dc.save_distro_check_result(result, datetime, result_file, d)
}
-addtask distro_checkall after do_distro_check
-do_distro_checkall[recrdeptask] = "do_distro_checkall do_distro_check"
-do_distro_checkall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_distro_checkall[nostamp] = "1"
-do_distro_checkall() {
- :
-}
#
#Check Missing License Text.
#Use this task to generate the missing license text data for pkg-report system,
@@ -458,11 +425,3 @@
bb.utils.unlockfile(lf)
return
}
-
-addtask checklicenseall after do_checklicense
-do_checklicenseall[recrdeptask] = "do_checklicenseall do_checklicense"
-do_checklicenseall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_checklicenseall[nostamp] = "1"
-do_checklicenseall() {
- :
-}
diff --git a/import-layers/yocto-poky/meta/classes/externalsrc.bbclass b/import-layers/yocto-poky/meta/classes/externalsrc.bbclass
index 65dd13d..c9f5cf7 100644
--- a/import-layers/yocto-poky/meta/classes/externalsrc.bbclass
+++ b/import-layers/yocto-poky/meta/classes/externalsrc.bbclass
@@ -53,6 +53,9 @@
d.setVar('BB_DONT_CACHE', '1')
if externalsrc:
+ import oe.recipeutils
+ import oe.path
+
d.setVar('S', externalsrc)
if externalsrcbuild:
d.setVar('B', externalsrcbuild)
@@ -85,10 +88,10 @@
d.appendVarFlag(task, "lockfiles", " ${S}/singletask.lock")
# We do not want our source to be wiped out, ever (kernel.bbclass does this for do_clean)
- cleandirs = (d.getVarFlag(task, 'cleandirs', False) or '').split()
+ cleandirs = oe.recipeutils.split_var_value(d.getVarFlag(task, 'cleandirs', False) or '')
setvalue = False
for cleandir in cleandirs[:]:
- if d.expand(cleandir) == externalsrc:
+ if oe.path.is_path_parent(externalsrc, d.expand(cleandir)):
cleandirs.remove(cleandir)
setvalue = True
if setvalue:
@@ -173,7 +176,9 @@
externalsrc_do_buildclean() {
if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then
rm -f ${@' '.join([x.split(':')[0] for x in (d.getVar('EXTERNALSRC_SYMLINKS') or '').split()])}
- oe_runmake clean || die "make failed"
+ if [ "${CLEANBROKEN}" != "1" ]; then
+ oe_runmake clean || die "make failed"
+ fi
else
bbnote "nothing to do - no makefile found"
fi
@@ -189,7 +194,7 @@
try:
git_dir = os.path.join(s_dir,
- subprocess.check_output(['git', '-C', s_dir, 'rev-parse', '--git-dir']).decode("utf-8").rstrip())
+ subprocess.check_output(['git', '-C', s_dir, 'rev-parse', '--git-dir'], stderr=subprocess.DEVNULL).decode("utf-8").rstrip())
except subprocess.CalledProcessError:
pass
diff --git a/import-layers/yocto-poky/meta/classes/gettext.bbclass b/import-layers/yocto-poky/meta/classes/gettext.bbclass
index da68e63..be2ef3b 100644
--- a/import-layers/yocto-poky/meta/classes/gettext.bbclass
+++ b/import-layers/yocto-poky/meta/classes/gettext.bbclass
@@ -3,7 +3,7 @@
return ""
if d.getVar('USE_NLS') == 'no':
return "gettext-minimal-native"
- return d.getVar('DEPENDS_GETTEXT', False)
+ return "gettext-native"
def gettext_oeconf(d):
if d.getVar('USE_NLS') == 'no':
@@ -13,8 +13,6 @@
return '--disable-nls'
return "--enable-nls"
-DEPENDS_GETTEXT ??= "gettext-native"
-
BASEDEPENDS_append = " ${@gettext_dependencies(d)}"
EXTRA_OECONF_append = " ${@gettext_oeconf(d)}"
diff --git a/import-layers/yocto-poky/meta/classes/gio-module-cache.bbclass b/import-layers/yocto-poky/meta/classes/gio-module-cache.bbclass
index a8190b7..e429bd3 100644
--- a/import-layers/yocto-poky/meta/classes/gio-module-cache.bbclass
+++ b/import-layers/yocto-poky/meta/classes/gio-module-cache.bbclass
@@ -9,6 +9,7 @@
mlprefix=${MLPREFIX} \
binprefix=${MLPREFIX} \
libdir=${libdir} \
+ libexecdir=${libexecdir} \
base_libdir=${base_libdir} \
bindir=${bindir}
else
diff --git a/import-layers/yocto-poky/meta/classes/glide.bbclass b/import-layers/yocto-poky/meta/classes/glide.bbclass
new file mode 100644
index 0000000..db42174
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/glide.bbclass
@@ -0,0 +1,9 @@
+# Handle Glide Vendor Package Management use
+#
+# Copyright 2018 (C) O.S. Systems Software LTDA.
+
+DEPENDS_append = " glide-native"
+
+do_compile_prepend() {
+ ( cd ${B}/src/${GO_IMPORT} && glide install )
+}
diff --git a/import-layers/yocto-poky/meta/classes/gnomebase.bbclass b/import-layers/yocto-poky/meta/classes/gnomebase.bbclass
index 4ccc8e0..efcb6ca 100644
--- a/import-layers/yocto-poky/meta/classes/gnomebase.bbclass
+++ b/import-layers/yocto-poky/meta/classes/gnomebase.bbclass
@@ -20,7 +20,8 @@
FILES_${PN}-doc += "${datadir}/devhelp"
-inherit autotools pkgconfig
+GNOMEBASEBUILDCLASS ??= "autotools"
+inherit ${GNOMEBASEBUILDCLASS} pkgconfig
do_install_append() {
rm -rf ${D}${localstatedir}/lib/scrollkeeper/*
diff --git a/import-layers/yocto-poky/meta/classes/go.bbclass b/import-layers/yocto-poky/meta/classes/go.bbclass
index 09b01a8..d33d83e 100644
--- a/import-layers/yocto-poky/meta/classes/go.bbclass
+++ b/import-layers/yocto-poky/meta/classes/go.bbclass
@@ -1,23 +1,6 @@
inherit goarch ptest
-def get_go_parallel_make(d):
- pm = (d.getVar('PARALLEL_MAKE') or '').split()
- # look for '-j' and throw other options (e.g. '-l') away
- # because they might have a different meaning in golang
- while pm:
- opt = pm.pop(0)
- if opt == '-j':
- v = pm.pop(0)
- elif opt.startswith('-j'):
- v = opt[2:].strip()
- else:
- continue
-
- return '-p %d' % int(v)
-
- return ""
-
-GO_PARALLEL_BUILD ?= "${@get_go_parallel_make(d)}"
+GO_PARALLEL_BUILD ?= "${@oe.utils.parallel_make_argument(d, '-p %d')}"
GOROOT_class-native = "${STAGING_LIBDIR_NATIVE}/go"
GOROOT_class-nativesdk = "${STAGING_DIR_TARGET}${libdir}/go"
@@ -41,8 +24,9 @@
GO_LINKMODE_class-nativesdk = "--linkmode=external"
GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"'
export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS}"
+export GOPATH_OMIT_IN_ACTIONID ?= "1"
export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c"
-export GOPTESTFLAGS ?= "-test.v"
+export GOPTESTFLAGS ?= ""
GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} "
export GO = "${HOST_PREFIX}go"
@@ -50,9 +34,6 @@
GOTOOLDIR_class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}"
export GOTOOLDIR
-SECURITY_CFLAGS = "${SECURITY_NOPIE_CFLAGS}"
-SECURITY_LDFLAGS = ""
-
export CGO_ENABLED ?= "1"
export CGO_CFLAGS ?= "${CFLAGS}"
export CGO_CPPFLAGS ?= "${CPPFLAGS}"
@@ -64,8 +45,9 @@
B = "${WORKDIR}/build"
export GOPATH = "${B}"
-GO_TMPDIR ?= "${WORKDIR}/go-tmp"
-GO_TMPDIR[vardepvalue] = ""
+export GOCACHE = "off"
+export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+GOTMPDIR[vardepvalue] = ""
python go_do_unpack() {
src_uri = (d.getVar('SRC_URI') or "").split()
@@ -91,7 +73,7 @@
}
go_list_package_tests() {
- ${GO} list -f '{{.ImportPath}} {{.TestGoFiles}}' ${GOBUILDFLAGS} ${GO_INSTALL} | \
+ ${GO} list -f '{{.ImportPath}} {{.TestGoFiles}}' ${GOBUILDFLAGS} ${GO_INSTALL} | \
grep -v '\[\]$' | \
egrep -v '${GO_INSTALL_FILTEROUT}' | \
awk '{ print $1 }'
@@ -100,32 +82,37 @@
go_do_configure() {
ln -snf ${S}/src ${B}/
}
+do_configure[dirs] =+ "${GOTMPDIR}"
go_do_compile() {
- export TMPDIR="${GO_TMPDIR}"
- ${GO} env
+ export TMPDIR="${GOTMPDIR}"
if [ -n "${GO_INSTALL}" ]; then
+ if [ -n "${GO_LINKSHARED}" ]; then
+ ${GO} install ${GOBUILDFLAGS} `go_list_packages`
+ rm -rf ${B}/bin
+ fi
${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} `go_list_packages`
fi
}
-do_compile[dirs] =+ "${GO_TMPDIR}"
+do_compile[dirs] =+ "${GOTMPDIR}"
do_compile[cleandirs] = "${B}/bin ${B}/pkg"
-do_compile_ptest() {
- export TMPDIR="${GO_TMPDIR}"
- rm -f ${B}/.go_compiled_tests.list
+do_compile_ptest_base() {
+ export TMPDIR="${GOTMPDIR}"
+ rm -f ${B}/.go_compiled_tests.list
go_list_package_tests | while read pkg; do
cd ${B}/src/$pkg
${GO} test ${GOPTESTBUILDFLAGS} $pkg
find . -mindepth 1 -maxdepth 1 -type f -name '*.test' -exec echo $pkg/{} \; | \
sed -e's,/\./,/,'>> ${B}/.go_compiled_tests.list
done
+ do_compile_ptest
}
-do_compile_ptest_base[dirs] =+ "${GO_TMPDIR}"
+do_compile_ptest_base[dirs] =+ "${GOTMPDIR}"
go_do_install() {
install -d ${D}${libdir}/go/src/${GO_IMPORT}
- tar -C ${S}/src/${GO_IMPORT} -cf - --exclude-vcs --exclude '*.test' . | \
+ tar -C ${S}/src/${GO_IMPORT} -cf - --exclude-vcs --exclude '*.test' --exclude 'testdata' . | \
tar -C ${D}${libdir}/go/src/${GO_IMPORT} --no-same-owner -xf -
tar -C ${B} -cf - pkg | tar -C ${D}${libdir}/go --no-same-owner -xf -
@@ -135,42 +122,54 @@
fi
}
-do_install_ptest_base() {
-set -x
- test -f "${B}/.go_compiled_tests.list" || exit 0
- tests=""
- while read test; do
- tests="$tests${tests:+ }${test%.test}"
- testdir=`dirname $test`
- install -d ${D}${PTEST_PATH}/$testdir
- install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test
- if [ -d "${B}/src/$testdir/testdata" ]; then
- cp --preserve=mode,timestamps -R "${B}/src/$testdir/testdata" ${D}${PTEST_PATH}/$testdir
- fi
- done < ${B}/.go_compiled_tests.list
- if [ -n "$tests" ]; then
- install -d ${D}${PTEST_PATH}
- cat >${D}${PTEST_PATH}/run-ptest <<EOF
+go_make_ptest_wrapper() {
+ cat >${D}${PTEST_PATH}/run-ptest <<EOF
#!/bin/sh
-ANYFAILED=0
-for t in $tests; do
- testdir=\`dirname \$t.test\`
- if ( cd "${PTEST_PATH}/\$testdir"; "${PTEST_PATH}/\$t.test" ${GOPTESTFLAGS} | tee /dev/fd/9 | grep -q "^FAIL" ) 9>&1; then
- ANYFAILED=1
- fi
-done
-if [ \$ANYFAILED -ne 0 ]; then
- echo "FAIL: ${PN}"
- exit 1
-fi
-echo "PASS: ${PN}"
-exit 0
+RC=0
+run_test() (
+ cd "\$1"
+ ((((./\$2 ${GOPTESTFLAGS}; echo \$? >&3) | sed -r -e"s,^(PASS|SKIP|FAIL)\$,\\1: \$1/\$2," >&4) 3>&1) | (read rc; exit \$rc)) 4>&1
+ exit \$?)
EOF
- chmod +x ${D}${PTEST_PATH}/run-ptest
- else
- rm -rf ${D}${PTEST_PATH}
- fi
-set +x
+
+}
+
+go_stage_testdata() {
+ oldwd="$PWD"
+ cd ${S}/src
+ find ${GO_IMPORT} -depth -type d -name testdata | while read d; do
+ if echo "$d" | grep -q '/vendor/'; then
+ continue
+ fi
+ parent=`dirname $d`
+ install -d ${D}${PTEST_PATH}/$parent
+ cp --preserve=mode,timestamps -R $d ${D}${PTEST_PATH}/$parent/
+ done
+ cd "$oldwd"
+}
+
+do_install_ptest_base() {
+ test -f "${B}/.go_compiled_tests.list" || exit 0
+ install -d ${D}${PTEST_PATH}
+ go_stage_testdata
+ go_make_ptest_wrapper
+ havetests=""
+ while read test; do
+ testdir=`dirname $test`
+ testprog=`basename $test`
+ install -d ${D}${PTEST_PATH}/$testdir
+ install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test
+ echo "run_test $testdir $testprog || RC=1" >> ${D}${PTEST_PATH}/run-ptest
+ havetests="yes"
+ done < ${B}/.go_compiled_tests.list
+ if [ -n "$havetests" ]; then
+ echo "exit \$RC" >> ${D}${PTEST_PATH}/run-ptest
+ chmod +x ${D}${PTEST_PATH}/run-ptest
+ else
+ rm -rf ${D}${PTEST_PATH}
+ fi
+ do_install_ptest
+ chown -R root:root ${D}${PTEST_PATH}
}
EXPORT_FUNCTIONS do_unpack do_configure do_compile do_install
diff --git a/import-layers/yocto-poky/meta/classes/goarch.bbclass b/import-layers/yocto-poky/meta/classes/goarch.bbclass
index 663c9ff..f54c516 100644
--- a/import-layers/yocto-poky/meta/classes/goarch.bbclass
+++ b/import-layers/yocto-poky/meta/classes/goarch.bbclass
@@ -5,11 +5,13 @@
HOST_GOARCH = "${@go_map_arch(d.getVar('HOST_ARCH'), d)}"
HOST_GOARM = "${@go_map_arm(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
HOST_GO386 = "${@go_map_386(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
+HOST_GOMIPS = "${@go_map_mips(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
HOST_GOTUPLE = "${HOST_GOOS}_${HOST_GOARCH}"
TARGET_GOOS = "${@go_map_os(d.getVar('TARGET_OS'), d)}"
TARGET_GOARCH = "${@go_map_arch(d.getVar('TARGET_ARCH'), d)}"
TARGET_GOARM = "${@go_map_arm(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
TARGET_GO386 = "${@go_map_386(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
+TARGET_GOMIPS = "${@go_map_mips(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
TARGET_GOTUPLE = "${TARGET_GOOS}_${TARGET_GOARCH}"
GO_BUILD_BINDIR = "${@['bin/${HOST_GOTUPLE}','bin'][d.getVar('BUILD_GOTUPLE') == d.getVar('HOST_GOTUPLE')]}"
@@ -22,6 +24,7 @@
GO_DYNLINK_x86-64 = "1"
GO_DYNLINK_powerpc64 = "1"
GO_DYNLINK_class-native = ""
+GO_DYNLINK_class-nativesdk = ""
# define here because everybody inherits this class
#
@@ -32,6 +35,8 @@
COMPATIBLE_HOST_mipsarchn32 = "null"
ARM_INSTRUCTION_SET = "arm"
TUNE_CCARGS_remove = "-march=mips32r2"
+SECURITY_CFLAGS_mips = "${SECURITY_NOPIE_CFLAGS}"
+SECURITY_NOPIE_CFLAGS ??= ""
def go_map_arch(a, d):
import re
@@ -56,7 +61,7 @@
elif re.match('p(pc|owerpc)(64el)', a):
return 'ppc64le'
else:
- raise bb.parse.SkipPackage("Unsupported CPU architecture: %s" % a)
+ raise bb.parse.SkipRecipe("Unsupported CPU architecture: %s" % a)
def go_map_arm(a, f, d):
import re
@@ -78,6 +83,15 @@
return '387'
return ''
+def go_map_mips(a, f, d):
+ import re
+ if a == 'mips' or a == 'mipsel':
+ if 'fpu-hard' in f:
+ return 'hardfloat'
+ else:
+ return 'softfloat'
+ return ''
+
def go_map_os(o, d):
if o.startswith('linux'):
return 'linux'
diff --git a/import-layers/yocto-poky/meta/classes/godep.bbclass b/import-layers/yocto-poky/meta/classes/godep.bbclass
new file mode 100644
index 0000000..c82401c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/godep.bbclass
@@ -0,0 +1,8 @@
+DEPENDS_append = " go-dep-native"
+
+do_compile_prepend() {
+ rm -f ${WORKDIR}/build/src/${GO_IMPORT}/Gopkg.toml
+ rm -f ${WORKDIR}/build/src/${GO_IMPORT}/Gopkg.lock
+ ( cd ${WORKDIR}/build/src/${GO_IMPORT} && dep init && dep ensure )
+}
+
diff --git a/import-layers/yocto-poky/meta/classes/grub-efi-cfg.bbclass b/import-layers/yocto-poky/meta/classes/grub-efi-cfg.bbclass
new file mode 100644
index 0000000..5eeee6c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/grub-efi-cfg.bbclass
@@ -0,0 +1,114 @@
+# grub-efi.bbclass
+# Copyright (c) 2011, Intel Corporation.
+# All rights reserved.
+#
+# Released under the MIT license (see packages/COPYING)
+
+# Provide grub-efi specific functions for building bootable images.
+
+# External variables
+# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
+# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
+# ${GRUB_GFXSERIAL} - set this to 1 to have graphics and serial in the boot menu
+# ${LABELS} - a list of targets for the automatic config
+# ${APPEND} - an override list of append strings for each label
+# ${GRUB_OPTS} - additional options to add to the config, ';' delimited # (optional)
+# ${GRUB_TIMEOUT} - timeout before executing the deault label (optional)
+# ${GRUB_ROOT} - grub's root device.
+
+GRUB_SERIAL ?= "console=ttyS0,115200"
+GRUB_CFG_VM = "${S}/grub_vm.cfg"
+GRUB_CFG_LIVE = "${S}/grub_live.cfg"
+GRUB_TIMEOUT ?= "10"
+#FIXME: build this from the machine config
+GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
+
+EFIDIR = "/EFI/BOOT"
+GRUB_ROOT ?= "${ROOT}"
+APPEND ?= ""
+
+# Need UUID utility code.
+inherit fs-uuid
+
+python build_efi_cfg() {
+ import sys
+
+ workdir = d.getVar('WORKDIR')
+ if not workdir:
+ bb.error("WORKDIR not defined, unable to package")
+ return
+
+ gfxserial = d.getVar('GRUB_GFXSERIAL') or ""
+
+ labels = d.getVar('LABELS')
+ if not labels:
+ bb.debug(1, "LABELS not defined, nothing to do")
+ return
+
+ if labels == []:
+ bb.debug(1, "No labels, nothing to do")
+ return
+
+ cfile = d.getVar('GRUB_CFG')
+ if not cfile:
+ bb.fatal('Unable to read GRUB_CFG')
+
+ try:
+ cfgfile = open(cfile, 'w')
+ except OSError:
+ bb.fatal('Unable to open %s' % cfile)
+
+ cfgfile.write('# Automatically created by OE\n')
+
+ opts = d.getVar('GRUB_OPTS')
+ if opts:
+ for opt in opts.split(';'):
+ cfgfile.write('%s\n' % opt)
+
+ cfgfile.write('default=%s\n' % (labels.split()[0]))
+
+ timeout = d.getVar('GRUB_TIMEOUT')
+ if timeout:
+ cfgfile.write('timeout=%s\n' % timeout)
+ else:
+ cfgfile.write('timeout=50\n')
+
+ root = d.getVar('GRUB_ROOT')
+ if not root:
+ bb.fatal('GRUB_ROOT not defined')
+
+ if gfxserial == "1":
+ btypes = [ [ " graphics console", "" ],
+ [ " serial console", d.getVar('GRUB_SERIAL') or "" ] ]
+ else:
+ btypes = [ [ "", "" ] ]
+
+ for label in labels.split():
+ localdata = d.createCopy()
+
+ for btype in btypes:
+ cfgfile.write('\nmenuentry \'%s%s\'{\n' % (label, btype[0]))
+ lb = label
+ if label == "install":
+ lb = "install-efi"
+ kernel = localdata.getVar('KERNEL_IMAGETYPE')
+ cfgfile.write('linux /%s LABEL=%s' % (kernel, lb))
+
+ cfgfile.write(' %s' % replace_rootfs_uuid(d, root))
+
+ append = localdata.getVar('APPEND')
+ initrd = localdata.getVar('INITRD')
+
+ if append:
+ append = replace_rootfs_uuid(d, append)
+ cfgfile.write(' %s' % (append))
+
+ cfgfile.write(' %s' % btype[1])
+ cfgfile.write('\n')
+
+ if initrd:
+ cfgfile.write('initrd /initrd')
+ cfgfile.write('\n}\n')
+
+ cfgfile.close()
+}
diff --git a/import-layers/yocto-poky/meta/classes/grub-efi.bbclass b/import-layers/yocto-poky/meta/classes/grub-efi.bbclass
index 610479b..90badc0 100644
--- a/import-layers/yocto-poky/meta/classes/grub-efi.bbclass
+++ b/import-layers/yocto-poky/meta/classes/grub-efi.bbclass
@@ -1,36 +1,4 @@
-# grub-efi.bbclass
-# Copyright (c) 2011, Intel Corporation.
-# All rights reserved.
-#
-# Released under the MIT license (see packages/COPYING)
-
-# Provide grub-efi specific functions for building bootable images.
-
-# External variables
-# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
-# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
-# ${GRUB_GFXSERIAL} - set this to 1 to have graphics and serial in the boot menu
-# ${LABELS} - a list of targets for the automatic config
-# ${APPEND} - an override list of append strings for each label
-# ${GRUB_OPTS} - additional options to add to the config, ';' delimited # (optional)
-# ${GRUB_TIMEOUT} - timeout before executing the deault label (optional)
-# ${GRUB_ROOT} - grub's root device.
-
-do_bootimg[depends] += "${MLPREFIX}grub-efi:do_deploy"
-
-GRUB_SERIAL ?= "console=ttyS0,115200"
-GRUB_CFG_VM = "${S}/grub_vm.cfg"
-GRUB_CFG_LIVE = "${S}/grub_live.cfg"
-GRUB_TIMEOUT ?= "10"
-#FIXME: build this from the machine config
-GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
-
-EFIDIR = "/EFI/BOOT"
-GRUB_ROOT ?= "${ROOT}"
-APPEND ?= ""
-
-# Need UUID utility code.
-inherit fs-uuid
+inherit grub-efi-cfg
efi_populate() {
# DEST must be the root of the image so that EFIDIR is not
@@ -58,7 +26,7 @@
# Build a EFI directory to create efi.img
mkdir -p ${EFIIMGDIR}/${EFIDIR}
cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
- cp $iso_dir/vmlinuz ${EFIIMGDIR}
+ cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR}
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" > ${EFIIMGDIR}/startup.nsh
if [ -f "$iso_dir/initrd" ] ; then
@@ -69,91 +37,3 @@
efi_hddimg_populate() {
efi_populate $1
}
-
-python build_efi_cfg() {
- import sys
-
- workdir = d.getVar('WORKDIR')
- if not workdir:
- bb.error("WORKDIR not defined, unable to package")
- return
-
- gfxserial = d.getVar('GRUB_GFXSERIAL') or ""
-
- labels = d.getVar('LABELS')
- if not labels:
- bb.debug(1, "LABELS not defined, nothing to do")
- return
-
- if labels == []:
- bb.debug(1, "No labels, nothing to do")
- return
-
- cfile = d.getVar('GRUB_CFG')
- if not cfile:
- bb.fatal('Unable to read GRUB_CFG')
-
- try:
- cfgfile = open(cfile, 'w')
- except OSError:
- bb.fatal('Unable to open %s' % cfile)
-
- cfgfile.write('# Automatically created by OE\n')
-
- opts = d.getVar('GRUB_OPTS')
- if opts:
- for opt in opts.split(';'):
- cfgfile.write('%s\n' % opt)
-
- cfgfile.write('default=%s\n' % (labels.split()[0]))
-
- timeout = d.getVar('GRUB_TIMEOUT')
- if timeout:
- cfgfile.write('timeout=%s\n' % timeout)
- else:
- cfgfile.write('timeout=50\n')
-
- root = d.getVar('GRUB_ROOT')
- if not root:
- bb.fatal('GRUB_ROOT not defined')
-
- if gfxserial == "1":
- btypes = [ [ " graphics console", "" ],
- [ " serial console", d.getVar('GRUB_SERIAL') or "" ] ]
- else:
- btypes = [ [ "", "" ] ]
-
- for label in labels.split():
- localdata = d.createCopy()
-
- overrides = localdata.getVar('OVERRIDES')
- if not overrides:
- bb.fatal('OVERRIDES not defined')
-
- for btype in btypes:
- localdata.setVar('OVERRIDES', label + ':' + overrides)
-
- cfgfile.write('\nmenuentry \'%s%s\'{\n' % (label, btype[0]))
- lb = label
- if label == "install":
- lb = "install-efi"
- cfgfile.write('linux /vmlinuz LABEL=%s' % (lb))
-
- cfgfile.write(' %s' % replace_rootfs_uuid(d, root))
-
- append = localdata.getVar('APPEND')
- initrd = localdata.getVar('INITRD')
-
- if append:
- append = replace_rootfs_uuid(d, append)
- cfgfile.write(' %s' % (append))
-
- cfgfile.write(' %s' % btype[1])
- cfgfile.write('\n')
-
- if initrd:
- cfgfile.write('initrd /initrd')
- cfgfile.write('\n}\n')
-
- cfgfile.close()
-}
diff --git a/import-layers/yocto-poky/meta/classes/gtk-doc.bbclass b/import-layers/yocto-poky/meta/classes/gtk-doc.bbclass
index 5201c71..b4f6754 100644
--- a/import-layers/yocto-poky/meta/classes/gtk-doc.bbclass
+++ b/import-layers/yocto-poky/meta/classes/gtk-doc.bbclass
@@ -18,27 +18,27 @@
EXTRA_OECONF_prepend_class-native = "--disable-gtk-doc "
EXTRA_OECONF_prepend_class-nativesdk = "--disable-gtk-doc "
-DEPENDS_append_class-target = " gtk-doc-native qemu-native"
-
# Even though gtkdoc is disabled on -native, gtk-doc package is still
# needed for m4 macros.
-DEPENDS_append_class-native = " gtk-doc-native"
-DEPENDS_append_class-nativesdk = " gtk-doc-native"
+DEPENDS_append = " gtk-doc-native"
# The documentation directory, where the infrastructure will be copied.
# gtkdocize has a default of "." so to handle out-of-tree builds set this to $S.
GTKDOC_DOCDIR ?= "${S}"
-do_configure_prepend () {
- ( cd ${S}; gtkdocize --docdir ${GTKDOC_DOCDIR} || true )
-}
-
-inherit qemu
-
export STAGING_DIR_HOST
-do_compile_prepend_class-target () {
+inherit python3native pkgconfig qemu
+DEPENDS_append = "${@' qemu-native' if d.getVar('GTKDOC_ENABLED') == 'True' else ''}"
+do_configure_prepend () {
+ # Need to use ||true as this is only needed if configure.ac both exists
+ # and uses GTK_DOC_CHECK.
+ gtkdocize --srcdir ${S} --docdir ${GTKDOC_DOCDIR} || true
+}
+
+do_compile_prepend_class-target () {
+ if [ ${GTKDOC_ENABLED} = True ]; then
# Write out a qemu wrapper that will be given to gtkdoc-scangobj so that it
# can run target helper binaries through that.
qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\$GIR_EXTRA_LIBS_PATH','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
@@ -64,7 +64,5 @@
fi
EOF
chmod +x ${B}/gtkdoc-qemuwrapper
+ fi
}
-
-
-inherit pkgconfig
diff --git a/import-layers/yocto-poky/meta/classes/icecc.bbclass b/import-layers/yocto-poky/meta/classes/icecc.bbclass
index 1cc1c4d..0ca8de8 100644
--- a/import-layers/yocto-poky/meta/classes/icecc.bbclass
+++ b/import-layers/yocto-poky/meta/classes/icecc.bbclass
@@ -28,15 +28,44 @@
#Error checking is kept to minimum so double check any parameters you pass to the class
###########################################################################################
-BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_BL ICECC_USER_CLASS_BL ICECC_USER_PACKAGE_WL ICECC_PATH ICECC_ENV_EXEC"
+BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_BL \
+ ICECC_USER_CLASS_BL ICECC_USER_PACKAGE_WL ICECC_PATH ICECC_ENV_EXEC \
+ ICECC_CARET_WORKAROUND ICECC_CFLAGS ICECC_ENV_VERSION \
+ ICECC_DEBUG ICECC_LOGFILE ICECC_REPEAT_RATE ICECC_PREFERRED_HOST \
+ ICECC_CLANG_REMOTE_CPP ICECC_IGNORE_UNVERIFIED ICECC_TEST_SOCKET \
+ ICECC_ENV_DEBUG \
+ "
ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env"
+# This version can be incremented when changes are made to the environment that
+# invalidate the version on the compile nodes. Changing it will cause a new
+# environment to be created.
+#
+# A useful thing to do for testing Icecream changes locally is to add a
+# subversion in local.conf:
+# ICECC_ENV_VERSION_append = "-my-ver-1"
+ICECC_ENV_VERSION = "2"
+
+# Default to disabling the caret workaround, If set to "1" in local.conf, icecc
+# will locally recompile any files that have warnings, which can adversely
+# affect performance.
+#
+# See: https://github.com/icecc/icecream/issues/190
+export ICECC_CARET_WORKAROUND ??= "0"
+
+ICECC_CFLAGS = ""
+CFLAGS += "${ICECC_CFLAGS}"
+CXXFLAGS += "${ICECC_CFLAGS}"
+
+# Debug flags when generating environments
+ICECC_ENV_DEBUG ??= ""
+
def icecc_dep_prepend(d):
# INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
# we need that built is the responsibility of the patch function / class, not
# the application.
- if not d.getVar('INHIBIT_DEFAULT_DEPS', False):
+ if not d.getVar('INHIBIT_DEFAULT_DEPS'):
return "icecc-create-env-native"
return ""
@@ -44,21 +73,20 @@
get_cross_kernel_cc[vardepsexclude] += "KERNEL_CC"
def get_cross_kernel_cc(bb,d):
- kernel_cc = d.getVar('KERNEL_CC', False)
+ kernel_cc = d.getVar('KERNEL_CC')
# evaluate the expression by the shell if necessary
if '`' in kernel_cc or '$(' in kernel_cc:
import subprocess
kernel_cc = subprocess.check_output("echo %s" % kernel_cc, shell=True).decode("utf-8")[:-1]
- kernel_cc = d.expand(kernel_cc)
kernel_cc = kernel_cc.replace('ccache', '').strip()
kernel_cc = kernel_cc.split(' ')[0]
kernel_cc = kernel_cc.strip()
return kernel_cc
def get_icecc(d):
- return d.getVar('ICECC_PATH', False) or bb.utils.which(os.getenv("PATH"), "icecc")
+ return d.getVar('ICECC_PATH') or bb.utils.which(os.getenv("PATH"), "icecc")
def create_path(compilers, bb, d):
"""
@@ -93,7 +121,7 @@
return staging
def use_icecc(bb,d):
- if d.getVar('ICECC_DISABLED', False) == "1":
+ if d.getVar('ICECC_DISABLED') == "1":
# don't even try it, when explicitly disabled
return "no"
@@ -101,10 +129,13 @@
if icecc_is_allarch(bb, d):
return "no"
+ if icecc_is_cross_canadian(bb, d):
+ return "no"
+
pn = d.getVar('PN')
system_class_blacklist = []
- user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL', False) or "none").split()
+ user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL') or "none").split()
package_class_blacklist = system_class_blacklist + user_class_blacklist
for black in package_class_blacklist:
@@ -121,8 +152,8 @@
# e.g. when there is new version
# building libgcc-initial with icecc fails with CPP sanity check error if host sysroot contains cross gcc built for another target tune/variant
system_package_blacklist = ["libgcc-initial"]
- user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL', False) or "").split()
- user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL', False) or "").split()
+ user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL') or "").split()
+ user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL') or "").split()
package_blacklist = system_package_blacklist + user_package_blacklist
if pn in package_blacklist:
@@ -133,7 +164,7 @@
bb.debug(1, "%s: found in whitelist, enable icecc" % pn)
return "yes"
- if d.getVar('PARALLEL_MAKE', False) == "":
+ if d.getVar('PARALLEL_MAKE') == "":
bb.debug(1, "%s: has empty PARALLEL_MAKE, disable icecc" % pn)
return "no"
@@ -151,16 +182,27 @@
bb.data.inherits_class("cross", d) or \
bb.data.inherits_class("native", d);
+def icecc_is_cross_canadian(bb, d):
+ return bb.data.inherits_class("cross-canadian", d)
+
+def icecc_dir(bb, d):
+ return d.expand('${TMPDIR}/work-shared/ice')
+
# Don't pollute allarch signatures with TARGET_FPU
icecc_version[vardepsexclude] += "TARGET_FPU"
def icecc_version(bb, d):
if use_icecc(bb, d) == "no":
return ""
- parallel = d.getVar('ICECC_PARALLEL_MAKE', False) or ""
- if not d.getVar('PARALLEL_MAKE', False) == "" and parallel:
+ parallel = d.getVar('ICECC_PARALLEL_MAKE') or ""
+ if not d.getVar('PARALLEL_MAKE') == "" and parallel:
d.setVar("PARALLEL_MAKE", parallel)
+ # Disable showing the caret in the GCC compiler output if the workaround is
+ # disabled
+ if d.getVar('ICECC_CARET_WORKAROUND') == '0':
+ d.setVar('ICECC_CFLAGS', '-fno-diagnostics-show-caret')
+
if icecc_is_native(bb, d):
archive_name = "local-host-env"
elif d.expand('${HOST_PREFIX}') == "":
@@ -169,14 +211,18 @@
prefix = d.expand('${HOST_PREFIX}' )
distro = d.expand('${DISTRO}')
target_sys = d.expand('${TARGET_SYS}')
- float = d.getVar('TARGET_FPU', False) or "hard"
+ float = d.getVar('TARGET_FPU') or "hard"
archive_name = prefix + distro + "-" + target_sys + "-" + float
if icecc_is_kernel(bb, d):
archive_name += "-kernel"
import socket
- ice_dir = d.expand('${STAGING_DIR_NATIVE}${prefix_native}')
- tar_file = os.path.join(ice_dir, 'ice', archive_name + "-@VERSION@-" + socket.gethostname() + '.tar.gz')
+ ice_dir = icecc_dir(bb, d)
+ tar_file = os.path.join(ice_dir, "{archive}-{version}-@VERSION@-{hostname}.tar.gz".format(
+ archive=archive_name,
+ version=d.getVar('ICECC_ENV_VERSION'),
+ hostname=socket.gethostname()
+ ))
return tar_file
@@ -197,25 +243,42 @@
target_prefix = d.expand('${TARGET_PREFIX}')
return os.path.join(external_toolchain_bindir, '%s%s' % (target_prefix, tool))
+def icecc_get_tool_link(tool, d):
+ import subprocess
+ return subprocess.check_output("readlink -f %s" % tool, shell=True).decode("utf-8")[:-1]
+
+def icecc_get_path_tool(tool, d):
+ # This is a little ugly, but we want to make sure we add an actual
+ # compiler to the toolchain, not ccache. Some distros (e.g. Fedora)
+ # have ccache enabled by default using symlinks PATH, meaning ccache
+ # would be found first when looking for the compiler.
+ paths = os.getenv("PATH").split(':')
+ while True:
+ p, hist = bb.utils.which(':'.join(paths), tool, history=True)
+ if not p or os.path.basename(icecc_get_tool_link(p, d)) != 'ccache':
+ return p
+ paths = paths[len(hist):]
+
+ return ""
+
# Don't pollute native signatures with target TUNE_PKGARCH through STAGING_BINDIR_TOOLCHAIN
icecc_get_tool[vardepsexclude] += "STAGING_BINDIR_TOOLCHAIN"
def icecc_get_tool(bb, d, tool):
if icecc_is_native(bb, d):
- return bb.utils.which(os.getenv("PATH"), tool)
+ return icecc_get_path_tool(tool, d)
elif icecc_is_kernel(bb, d):
- return bb.utils.which(os.getenv("PATH"), get_cross_kernel_cc(bb, d))
+ return icecc_get_path_tool(get_cross_kernel_cc(bb, d), d)
else:
ice_dir = d.expand('${STAGING_BINDIR_TOOLCHAIN}')
target_sys = d.expand('${TARGET_SYS}')
- tool_bin = os.path.join(ice_dir, "%s-%s" % (target_sys, tool))
- if os.path.isfile(tool_bin):
- return tool_bin
- else:
- external_tool_bin = icecc_get_external_tool(bb, d, tool)
- if os.path.isfile(external_tool_bin):
- return external_tool_bin
- else:
- return ""
+ for p in ice_dir.split(':'):
+ tool_bin = os.path.join(p, "%s-%s" % (target_sys, tool))
+ if os.path.isfile(tool_bin):
+ return tool_bin
+ external_tool_bin = icecc_get_external_tool(bb, d, tool)
+ if os.path.isfile(external_tool_bin):
+ return external_tool_bin
+ return ""
def icecc_get_and_check_tool(bb, d, tool):
# Check that g++ or gcc is not a symbolic link to icecc binary in
@@ -223,8 +286,7 @@
# compiler environment package.
t = icecc_get_tool(bb, d, tool)
if t:
- import subprocess
- link_path = subprocess.check_output("readlink -f %s" % t, shell=True).decode("utf-8")[:-1]
+ link_path = icecc_get_tool_link(tool, d)
if link_path == get_icecc(d):
bb.error("%s is a symlink to %s in PATH and this prevents icecc from working" % (t, get_icecc(d)))
return ""
@@ -305,7 +367,7 @@
# the ICECC_VERSION generation step must be locked by a mutex
# in order to prevent race conditions
if flock -n "${ICECC_VERSION}.lock" \
- ${ICECC_ENV_EXEC} "${ICECC_CC}" "${ICECC_CXX}" "${ICECC_AS}" "${ICECC_VERSION}"
+ ${ICECC_ENV_EXEC} ${ICECC_ENV_DEBUG} "${ICECC_CC}" "${ICECC_CXX}" "${ICECC_AS}" "${ICECC_VERSION}"
then
touch "${ICECC_VERSION}.done"
elif [ ! wait_for_file "${ICECC_VERSION}.done" 30 ]
@@ -316,9 +378,13 @@
fi
fi
+ # Don't let ccache find the icecream compiler links that have been created, otherwise
+ # it can end up invoking icecream recursively.
+ export CCACHE_PATH="$PATH"
+ export CCACHE_DISBALE="1"
+
export ICECC_VERSION ICECC_CC ICECC_CXX
export PATH="$ICE_PATH:$PATH"
- export CCACHE_PATH="$PATH"
bbnote "Using icecc"
}
@@ -338,3 +404,13 @@
do_install_prepend() {
set_icecc_env
}
+
+# IceCream is not (currently) supported in the extensible SDK
+ICECC_SDK_HOST_TASK = "nativesdk-icecc-toolchain"
+ICECC_SDK_HOST_TASK_task-populate-sdk-ext = ""
+
+# Don't include IceCream in uninative tarball
+ICECC_SDK_HOST_TASK_pn-uninative-tarball = ""
+
+# Add the toolchain scripts to the SDK
+TOOLCHAIN_HOST_TASK_append = " ${ICECC_SDK_HOST_TASK}"
diff --git a/import-layers/yocto-poky/meta/classes/image-combined-dbg.bbclass b/import-layers/yocto-poky/meta/classes/image-combined-dbg.bbclass
new file mode 100644
index 0000000..f4772f7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/image-combined-dbg.bbclass
@@ -0,0 +1,9 @@
+IMAGE_PREPROCESS_COMMAND_append = " combine_dbg_image; "
+
+combine_dbg_image () {
+ if [ "${IMAGE_GEN_DEBUGFS}" = "1" -a -e ${IMAGE_ROOTFS}-dbg ]; then
+ # copy target files into -dbg rootfs, so it can be used for
+ # debug purposes directly
+ tar -C ${IMAGE_ROOTFS} -cf - . | tar -C ${IMAGE_ROOTFS}-dbg -xf -
+ fi
+}
diff --git a/import-layers/yocto-poky/meta/classes/image-live.bbclass b/import-layers/yocto-poky/meta/classes/image-live.bbclass
index 1623c15..966277c 100644
--- a/import-layers/yocto-poky/meta/classes/image-live.bbclass
+++ b/import-layers/yocto-poky/meta/classes/image-live.bbclass
@@ -19,7 +19,6 @@
# External variables (also used by syslinux.bbclass)
# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
-# ${COMPRESSISO} - Transparent compress ISO, reduce size ~40% if set to 1
# ${NOISO} - skip building the ISO image if set to 1
# ${NOHDD} - skip building the HDD image if set to 1
# ${HDDIMG_ID} - FAT image volume-id
@@ -33,7 +32,6 @@
virtual/kernel:do_deploy \
${MLPREFIX}syslinux:do_populate_sysroot \
syslinux-native:do_populate_sysroot \
- ${@oe.utils.ifelse(d.getVar('COMPRESSISO', False),'zisofs-tools-native:do_populate_sysroot','')} \
${PN}:do_image_${@d.getVar('LIVE_ROOTFS_TYPE').replace('-', '_')} \
"
@@ -65,7 +63,6 @@
ISODIR = "${S}/iso"
EFIIMGDIR = "${S}/efi_img"
COMPACT_ISODIR = "${S}/iso.z"
-COMPRESSISO ?= "0"
ISOLINUXDIR ?= "/isolinux"
ISO_BOOTIMG = "isolinux/isolinux.bin"
@@ -115,18 +112,8 @@
install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR}
fi
- if [ "${COMPRESSISO}" = "1" ] ; then
- # create compact directory, compress iso
- mkdir -p ${COMPACT_ISODIR}
- mkzftree -z 9 -p 4 -F ${ISODIR}/rootfs.img ${COMPACT_ISODIR}/rootfs.img
-
- # move compact iso to iso, then remove compact directory
- mv ${COMPACT_ISODIR}/rootfs.img ${ISODIR}/rootfs.img
- rm -Rf ${COMPACT_ISODIR}
- mkisofs_compress_opts="-R -z -D -l"
- else
- mkisofs_compress_opts="-r"
- fi
+ # We used to have support for zisofs; this is a relic of that
+ mkisofs_compress_opts="-r"
# Check the size of ${ISODIR}/rootfs.img, use mkisofs -iso-level 3
# when it exceeds 3.8GB, the specification is 4G - 1 bytes, we need
diff --git a/import-layers/yocto-poky/meta/classes/image-prelink.bbclass b/import-layers/yocto-poky/meta/classes/image-prelink.bbclass
index f3bb68b..6a8afa8 100644
--- a/import-layers/yocto-poky/meta/classes/image-prelink.bbclass
+++ b/import-layers/yocto-poky/meta/classes/image-prelink.bbclass
@@ -36,7 +36,7 @@
dynamic_loader=$(linuxloader)
# prelink!
- if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+ if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
bbnote " prelink: BUILD_REPRODUCIBLE_BINARIES..."
if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then
export PRELINK_TIMESTAMP=`git log -1 --pretty=%ct `
diff --git a/import-layers/yocto-poky/meta/classes/image.bbclass b/import-layers/yocto-poky/meta/classes/image.bbclass
index d88ce5c..2247b30 100644
--- a/import-layers/yocto-poky/meta/classes/image.bbclass
+++ b/import-layers/yocto-poky/meta/classes/image.bbclass
@@ -17,7 +17,7 @@
INHIBIT_DEFAULT_DEPS = "1"
-TESTIMAGECLASS = "${@base_conditional('TEST_IMAGE', '1', 'testimage-auto', '', d)}"
+TESTIMAGECLASS = "${@oe.utils.conditional('TEST_IMAGE', '1', 'testimage-auto', '', d)}"
inherit ${TESTIMAGECLASS}
# IMAGE_FEATURES may contain any available package group
@@ -289,7 +289,7 @@
SSTATE_SKIP_CREATION_task-image-complete = '1'
do_image_complete[sstate-inputdirs] = "${IMGDEPLOYDIR}"
do_image_complete[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
-do_image_complete[stamp-extra-info] = "${MACHINE}"
+do_image_complete[stamp-extra-info] = "${MACHINE_ARCH}"
addtask do_image_complete after do_image before do_build
python do_image_complete_setscene () {
sstate_setscene(d)
@@ -536,21 +536,29 @@
output = subprocess.check_output(['du', '-ks',
d.getVar('IMAGE_ROOTFS')])
size_kb = int(output.split()[0])
- base_size = size_kb * overhead_factor
- base_size = max(base_size, rootfs_req_size) + rootfs_extra_space
+ base_size = size_kb * overhead_factor
+ bb.debug(1, '%f = %d * %f' % (base_size, size_kb, overhead_factor))
+ base_size2 = max(base_size, rootfs_req_size) + rootfs_extra_space
+ bb.debug(1, '%f = max(%f, %d)[%f] + %d' % (base_size2, base_size, rootfs_req_size, max(base_size, rootfs_req_size), overhead_factor))
+
+ base_size = base_size2
if base_size != int(base_size):
base_size = int(base_size + 1)
else:
base_size = int(base_size)
+ bb.debug(1, '%f = int(%f)' % (base_size, base_size2))
+ base_size_saved = base_size
base_size += rootfs_alignment - 1
base_size -= base_size % rootfs_alignment
+ bb.debug(1, '%d = aligned(%d)' % (base_size, base_size_saved))
# Do not check image size of the debugfs image. This is not supposed
# to be deployed, etc. so it doesn't make sense to limit the size
# of the debug.
if (d.getVar('IMAGE_BUILDING_DEBUGFS') or "") == "true":
+ bb.debug(1, 'returning debugfs size %d' % (base_size))
return base_size
# Check the rootfs size against IMAGE_ROOTFS_MAXSIZE (if set)
@@ -568,6 +576,8 @@
(base_size, initramfs_maxsize_int))
bb.error("You can set INITRAMFS_MAXSIZE a larger value. Usually, it should")
bb.fatal("be less than 1/2 of ram size, or you may fail to boot it.\n")
+
+ bb.debug(1, 'returning %d' % (base_size))
return base_size
python set_image_size () {
@@ -617,9 +627,9 @@
do_package[noexec] = "1"
deltask do_package_qa
do_packagedata[noexec] = "1"
-do_package_write_ipk[noexec] = "1"
-do_package_write_deb[noexec] = "1"
-do_package_write_rpm[noexec] = "1"
+deltask do_package_write_ipk
+deltask do_package_write_deb
+deltask do_package_write_rpm
# Prepare the root links to point to the /usr counterparts.
create_merged_usr_symlinks() {
@@ -654,7 +664,7 @@
POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_sdk; ', '',d)}"
reproducible_final_image_task () {
- if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+ if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then
REPRODUCIBLE_TIMESTAMP_ROOTFS=`git log -1 --pretty=%ct`
fi
@@ -664,3 +674,5 @@
fi
}
IMAGE_PREPROCESS_COMMAND_append = " reproducible_final_image_task; "
+
+CVE_PRODUCT = ""
diff --git a/import-layers/yocto-poky/meta/classes/image_types.bbclass b/import-layers/yocto-poky/meta/classes/image_types.bbclass
index e881d0c..00a00d3 100644
--- a/import-layers/yocto-poky/meta/classes/image_types.bbclass
+++ b/import-layers/yocto-poky/meta/classes/image_types.bbclass
@@ -86,7 +86,7 @@
bbdebug 1 Executing "dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype seek=$ROOTFS_SIZE count=$COUNT bs=1024"
dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype seek=$ROOTFS_SIZE count=$COUNT bs=1024
bbdebug 1 "Actual Rootfs size: `du -s ${IMAGE_ROOTFS}`"
- bbdebug 1 "Actual Partion size: `ls -s ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype`"
+ bbdebug 1 "Actual Partion size: `stat -c '%s' ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype`"
bbdebug 1 Executing "mkfs.$fstype -F $extra_imagecmd ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype -d ${IMAGE_ROOTFS}"
mkfs.$fstype -F $extra_imagecmd ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype -d ${IMAGE_ROOTFS}
# Error codes 0-3 indicate successfull operation of fsck (no errors or errors corrected)
@@ -125,7 +125,7 @@
# required when extracting, but it seems prudent to use it in both cases.
IMAGE_CMD_TAR ?= "tar"
# ignore return code 1 "file changed as we read it" as other tasks(e.g. do_image_wic) may be hardlinking rootfs
-IMAGE_CMD_tar = "${IMAGE_CMD_TAR} -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]"
+IMAGE_CMD_tar = "${IMAGE_CMD_TAR} --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]"
do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append"
IMAGE_CMD_cpio () {
@@ -147,16 +147,6 @@
fi
}
-ELF_KERNEL ?= "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}"
-ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console="
-
-IMAGE_CMD_elf () {
- test -f ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf && rm -f ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf
- mkelfImage --kernel=${ELF_KERNEL} --initrd=${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.cpio.gz --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD}
-}
-
-IMAGE_TYPEDEP_elf = "cpio.gz"
-
UBI_VOLNAME ?= "${MACHINE}-rootfs"
multiubi_mkfs() {
@@ -218,10 +208,27 @@
IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ubifs ${MKUBIFS_ARGS}"
+MIN_F2FS_SIZE ?= "524288"
+IMAGE_CMD_f2fs () {
+ # We need to add additional smarts here form devices smaller than 1.5G
+ # Need to scale appropriately between 40M -> 1.5G as the "overprovision
+ # ratio" goes down as the device gets bigger (70% -> 4.5%), below about
+ # 500M the standard IMAGE_OVERHEAD_FACTOR does not work, so add additional
+ # space here when under 500M
+ size=${ROOTFS_SIZE}
+ if [ ${size} -lt ${MIN_F2FS_SIZE} ] ; then
+ size=${MIN_F2FS_SIZE}
+ bbwarn "Rootfs size is too small for F2FS. Filesystem will be extended to ${size}K"
+ fi
+ dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.f2fs seek=${size} count=0 bs=1024
+ mkfs.f2fs ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.f2fs
+ sload.f2fs -f ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.f2fs
+}
+
EXTRA_IMAGECMD = ""
inherit siteinfo kernel-arch
-JFFS2_ENDIANNESS ?= "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-l', '-b', d)}"
+JFFS2_ENDIANNESS ?= "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-l', '-b', d)}"
JFFS2_ERASEBLOCK ?= "0x40000"
EXTRA_IMAGECMD_jffs2 ?= "--pad ${JFFS2_ENDIANNESS} --eraseblock=${JFFS2_ERASEBLOCK} --no-cleanmarkers"
@@ -230,7 +237,7 @@
EXTRA_IMAGECMD_ext3 ?= "-i 4096"
EXTRA_IMAGECMD_ext4 ?= "-i 4096"
EXTRA_IMAGECMD_btrfs ?= "-n 4096"
-EXTRA_IMAGECMD_elf ?= ""
+EXTRA_IMAGECMD_f2fs ?= ""
do_image_jffs2[depends] += "mtd-utils-native:do_populate_sysroot"
do_image_cramfs[depends] += "util-linux-native:do_populate_sysroot"
@@ -242,10 +249,10 @@
do_image_squashfs_xz[depends] += "squashfs-tools-native:do_populate_sysroot"
do_image_squashfs_lzo[depends] += "squashfs-tools-native:do_populate_sysroot"
do_image_squashfs_lz4[depends] += "squashfs-tools-native:do_populate_sysroot"
-do_image_elf[depends] += "virtual/kernel:do_populate_sysroot mkelfimage-native:do_populate_sysroot"
do_image_ubi[depends] += "mtd-utils-native:do_populate_sysroot"
do_image_ubifs[depends] += "mtd-utils-native:do_populate_sysroot"
do_image_multiubi[depends] += "mtd-utils-native:do_populate_sysroot"
+do_image_f2fs[depends] += "f2fs-tools-native:do_populate_sysroot"
# This variable is available to request which values are suitable for IMAGE_FSTYPES
IMAGE_TYPES = " \
@@ -261,9 +268,9 @@
ubi ubifs multiubi \
tar tar.gz tar.bz2 tar.xz tar.lz4 \
cpio cpio.gz cpio.xz cpio.lzma cpio.lz4 \
- elf \
wic wic.gz wic.bz2 wic.lzma \
container \
+ f2fs \
"
# Compression is a special case of conversion. The old variable
@@ -274,11 +281,10 @@
CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2 ${COMPRESSIONTYPES}"
CONVERSION_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
-CONVERSION_CMD_gz = "gzip -f -9 -n -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
+CONVERSION_CMD_gz = "pigz -f -9 -n -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
CONVERSION_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
CONVERSION_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.xz"
-CONVERSION_CMD_lz4 = "lz4 -9 -z ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
-CONVERSION_CMD_lz4_legacy = "lz4 -9 -z -l ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
+CONVERSION_CMD_lz4 = "lz4 -9 -z -l ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
CONVERSION_CMD_lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
CONVERSION_CMD_zip = "zip ${ZIP_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zip ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
CONVERSION_CMD_sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}"
diff --git a/import-layers/yocto-poky/meta/classes/image_types_wic.bbclass b/import-layers/yocto-poky/meta/classes/image_types_wic.bbclass
index dcf620c..5b40a9e 100644
--- a/import-layers/yocto-poky/meta/classes/image_types_wic.bbclass
+++ b/import-layers/yocto-poky/meta/classes/image_types_wic.bbclass
@@ -102,6 +102,7 @@
# a variable and let the metadata deal with the deps.
d.setVar('_WKS_TEMPLATE', body)
bb.build.addtask('do_write_wks_template', 'do_image_wic', None, d)
+ bb.build.addtask('do_image_wic', 'do_image_complete', None, d)
}
#
diff --git a/import-layers/yocto-poky/meta/classes/insane.bbclass b/import-layers/yocto-poky/meta/classes/insane.bbclass
index 0a3b528..fa15460 100644
--- a/import-layers/yocto-poky/meta/classes/insane.bbclass
+++ b/import-layers/yocto-poky/meta/classes/insane.bbclass
@@ -68,6 +68,11 @@
"epiphany": (4643, 0, 0, True, 32),
"mips": ( 8, 0, 0, False, 32),
"mipsel": ( 8, 0, 0, True, 32),
+ "microblaze": (189, 0, 0, False, 32),
+ "microblazeeb":(189, 0, 0, False, 32),
+ "microblazeel":(189, 0, 0, True, 32),
+ "riscv32": (243, 0, 0, True, 32),
+ "riscv64": (243, 0, 0, True, 64),
},
"linux" : {
"aarch64" : (183, 0, 0, True, 64),
@@ -94,6 +99,8 @@
"mipsisa64r6": ( 8, 0, 0, False, 64),
"mipsisa64r6el": ( 8, 0, 0, True, 64),
"nios2": (113, 0, 0, True, 32),
+ "riscv32": (243, 0, 0, True, 32),
+ "riscv64": (243, 0, 0, True, 64),
"s390": (22, 0, 0, False, 32),
"sh4": (42, 0, 0, True, 32),
"sparc": ( 2, 0, 0, False, 32),
@@ -119,6 +126,8 @@
"microblaze": (189, 0, 0, False, 32),
"microblazeeb":(189, 0, 0, False, 32),
"microblazeel":(189, 0, 0, True, 32),
+ "riscv32": (243, 0, 0, True, 32),
+ "riscv64": (243, 0, 0, True, 64),
"sh4": ( 42, 0, 0, True, 32),
},
"uclinux-uclibc" : {
@@ -142,6 +151,9 @@
"powerpc": (20, 0, 0, False, 32),
"sh4": (42, 0, 0, True, 32),
},
+ "linux-gnu_ilp32" : {
+ "aarch64" : (183, 0, 0, True, 32),
+ },
"linux-gnux32" : {
"x86_64": (62, 0, 0, True, 32),
},
@@ -422,7 +434,7 @@
# Check the architecture and endiannes of the binary
is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \
- (target_os == "linux-gnux32" or target_os == "linux-muslx32" or re.match('mips64.*32', d.getVar('DEFAULTTUNE')))
+ (target_os == "linux-gnux32" or target_os == "linux-muslx32" or target_os == "linux-gnu_ilp32" or re.match('mips64.*32', d.getVar('DEFAULTTUNE')))
if not ((machine == elf.machine()) or is_32):
package_qa_add_message(messages, "arch", "Architecture did not match (%s, expected %s) on %s" % \
(oe.qa.elf_machine_to_string(elf.machine()), oe.qa.elf_machine_to_string(machine), package_qa_clean_path(path,d)))
diff --git a/import-layers/yocto-poky/meta/classes/kernel-arch.bbclass b/import-layers/yocto-poky/meta/classes/kernel-arch.bbclass
index c7b33d9..09793fc 100644
--- a/import-layers/yocto-poky/meta/classes/kernel-arch.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel-arch.bbclass
@@ -14,7 +14,7 @@
parisc s390 v850 \
avr32 blackfin \
microblaze \
- nios2 arc xtensa"
+ nios2 arc riscv xtensa"
def map_kernel_arch(a, d):
import re
@@ -28,6 +28,7 @@
elif re.match('aarch64_ilp32$', a): return 'arm64'
elif re.match('aarch64_be_ilp32$', a): return 'arm64'
elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a): return 'mips'
+ elif re.match('riscv(32|64|)(eb|)$', a): return 'riscv'
elif re.match('p(pc|owerpc)(|64)', a): return 'powerpc'
elif re.match('sh(3|4)$', a): return 'sh'
elif re.match('bfin', a): return 'blackfin'
@@ -58,7 +59,7 @@
TARGET_AR_KERNEL_ARCH ?= ""
HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
-KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH} -fuse-ld=bfd"
+KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH} -fuse-ld=bfd ${DEBUG_PREFIX_MAP} -fdebug-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH}"
KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
TOOLCHAIN = "gcc"
diff --git a/import-layers/yocto-poky/meta/classes/kernel-devicetree.bbclass b/import-layers/yocto-poky/meta/classes/kernel-devicetree.bbclass
index 6e08be4..4f80cc6 100644
--- a/import-layers/yocto-poky/meta/classes/kernel-devicetree.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel-devicetree.bbclass
@@ -1,10 +1,10 @@
# Support for device tree generation
PACKAGES_append = " \
- kernel-devicetree \
- ${@['kernel-image-zimage-bundle', ''][d.getVar('KERNEL_DEVICETREE_BUNDLE') != '1']} \
+ ${KERNEL_PACKAGE_NAME}-devicetree \
+ ${@[d.getVar('KERNEL_PACKAGE_NAME') + '-image-zimage-bundle', ''][d.getVar('KERNEL_DEVICETREE_BUNDLE') != '1']} \
"
-FILES_kernel-devicetree = "/${KERNEL_IMAGEDEST}/*.dtb /${KERNEL_IMAGEDEST}/*.dtbo"
-FILES_kernel-image-zimage-bundle = "/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
+FILES_${KERNEL_PACKAGE_NAME}-devicetree = "/${KERNEL_IMAGEDEST}/*.dtb /${KERNEL_IMAGEDEST}/*.dtbo"
+FILES_${KERNEL_PACKAGE_NAME}-image-zimage-bundle = "/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
# Generate kernel+devicetree bundle
KERNEL_DEVICETREE_BUNDLE ?= "0"
diff --git a/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass b/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass
index 9baf399..50a91e1 100644
--- a/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass
@@ -14,6 +14,8 @@
replacementtype = "vmlinuz.bin"
elif uarch == "x86":
replacementtype = "bzImage"
+ elif uarch == "microblaze":
+ replacementtype = "linux.bin"
else:
replacementtype = "zImage"
@@ -100,7 +102,7 @@
kernel_csum="sha1"
- ENTRYPOINT=${UBOOT_ENTRYPOINT}
+ ENTRYPOINT="${UBOOT_ENTRYPOINT}"
if [ -n "${UBOOT_ENTRYSYMBOL}" ]; then
ENTRYPOINT=`${HOST_PREFIX}nm vmlinux | \
awk '$3=="${UBOOT_ENTRYSYMBOL}" {print "0x"$1;exit}'`
diff --git a/import-layers/yocto-poky/meta/classes/kernel-module-split.bbclass b/import-layers/yocto-poky/meta/classes/kernel-module-split.bbclass
index 1035525..67ab416 100644
--- a/import-layers/yocto-poky/meta/classes/kernel-module-split.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel-module-split.bbclass
@@ -30,7 +30,7 @@
PACKAGESPLITFUNCS_prepend = "split_kernel_module_packages "
-KERNEL_MODULES_META_PACKAGE ?= "kernel-modules"
+KERNEL_MODULES_META_PACKAGE ?= "${@ d.getVar("KERNEL_PACKAGE_NAME") or "kernel" }-modules"
KERNEL_MODULE_PACKAGE_PREFIX ?= ""
KERNEL_MODULE_PACKAGE_SUFFIX ?= "-${KERNEL_VERSION}"
@@ -129,16 +129,19 @@
postfix = format.split('%s')[1]
d.setVar('RPROVIDES_' + pkg, pkg.replace(postfix, ''))
+ kernel_package_name = d.getVar("KERNEL_PACKAGE_NAME") or "kernel"
+ kernel_version = d.getVar("KERNEL_VERSION")
+
module_regex = '^(.*)\.k?o$'
module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX')
module_pattern_suffix = d.getVar('KERNEL_MODULE_PACKAGE_SUFFIX')
- module_pattern = module_pattern_prefix + 'kernel-module-%s' + module_pattern_suffix
+ module_pattern = module_pattern_prefix + kernel_package_name + '-module-%s' + module_pattern_suffix
postinst = d.getVar('pkg_postinst_modules')
postrm = d.getVar('pkg_postrm_modules')
- modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='kernel-%s' % (d.getVar("KERNEL_VERSION")))
+ modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='%s-%s' % (kernel_package_name, kernel_version))
if modules:
metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE')
d.appendVar('RDEPENDS_' + metapkg, ' '+' '.join(modules))
diff --git a/import-layers/yocto-poky/meta/classes/kernel-yocto.bbclass b/import-layers/yocto-poky/meta/classes/kernel-yocto.bbclass
index 663c655..4ac3a39 100644
--- a/import-layers/yocto-poky/meta/classes/kernel-yocto.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel-yocto.bbclass
@@ -247,6 +247,7 @@
fi
rm -f .gitignore
git init
+ check_git_config
git add .
git commit -q -m "baseline commit: creating repo for ${PN}-${PV}"
git clean -d -f
diff --git a/import-layers/yocto-poky/meta/classes/kernel.bbclass b/import-layers/yocto-poky/meta/classes/kernel.bbclass
index 14f41e9..78d6c30 100644
--- a/import-layers/yocto-poky/meta/classes/kernel.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel.bbclass
@@ -1,7 +1,10 @@
inherit linux-kernel-base kernel-module-split
-PROVIDES += "virtual/kernel"
-DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native"
+KERNEL_PACKAGE_NAME ??= "kernel"
+KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }"
+
+PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }"
+DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native bison-native"
PACKAGE_WRITE_DEPS += "depmodwrapper-cross"
do_deploy[depends] += "depmodwrapper-cross:do_populate_sysroot"
@@ -34,11 +37,32 @@
KERNEL_VERSION_PKG_NAME[vardepvalue] = "${LINUX_VERSION}"
python __anonymous () {
+ pn = d.getVar("PN")
+ kpn = d.getVar("KERNEL_PACKAGE_NAME")
+
+ # XXX Remove this after bug 11905 is resolved
+ # FILES_${KERNEL_PACKAGE_NAME}-dev doesn't expand correctly
+ if kpn == pn:
+ bb.warn("Some packages (E.g. *-dev) might be missing due to "
+ "bug 11905 (variable KERNEL_PACKAGE_NAME == PN)")
+
+ # The default kernel recipe builds in a shared location defined by
+ # bitbake/distro confs: STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR.
+ # Set these variables to directories under ${WORKDIR} in alternate
+ # kernel recipes (I.e. where KERNEL_PACKAGE_NAME != kernel) so that they
+ # may build in parallel with the default kernel without clobbering.
+ if kpn != "kernel":
+ workdir = d.getVar("WORKDIR")
+ sourceDir = os.path.join(workdir, 'kernel-source')
+ artifactsDir = os.path.join(workdir, 'kernel-build-artifacts')
+ d.setVar("STAGING_KERNEL_DIR", sourceDir)
+ d.setVar("STAGING_KERNEL_BUILDDIR", artifactsDir)
# Merge KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE into KERNEL_IMAGETYPES
type = d.getVar('KERNEL_IMAGETYPE') or ""
alttype = d.getVar('KERNEL_ALT_IMAGETYPE') or ""
types = d.getVar('KERNEL_IMAGETYPES') or ""
+ kname = d.getVar('KERNEL_PACKAGE_NAME') or "kernel"
if type not in types.split():
types = (type + ' ' + types).strip()
if alttype not in types.split():
@@ -55,15 +79,15 @@
typelower = type.lower()
imagedest = d.getVar('KERNEL_IMAGEDEST')
- d.appendVar('PACKAGES', ' ' + 'kernel-image-' + typelower)
+ d.appendVar('PACKAGES', ' %s-image-%s' % (kname, typelower))
- d.setVar('FILES_kernel-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}' + ' /' + imagedest + '/' + type)
+ d.setVar('FILES_' + kname + '-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}' + ' /' + imagedest + '/' + type)
- d.appendVar('RDEPENDS_kernel-image', ' ' + 'kernel-image-' + typelower)
+ d.appendVar('RDEPENDS_%s-image' % kname, ' %s-image-%s' % (kname, typelower))
- d.setVar('PKG_kernel-image-' + typelower, 'kernel-image-' + typelower + '-${KERNEL_VERSION_PKG_NAME}')
+ d.setVar('PKG_%s-image-%s' % (kname,typelower), '%s-image-%s-${KERNEL_VERSION_PKG_NAME}' % (kname, typelower))
- d.setVar('ALLOW_EMPTY_kernel-image-' + typelower, '1')
+ d.setVar('ALLOW_EMPTY_%s-image-%s' % (kname, typelower), '1')
image = d.getVar('INITRAMFS_IMAGE')
if image:
@@ -121,12 +145,13 @@
inherit kernel-arch deploy
-PACKAGES_DYNAMIC += "^kernel-module-.*"
-PACKAGES_DYNAMIC += "^kernel-image-.*"
-PACKAGES_DYNAMIC += "^kernel-firmware-.*"
+PACKAGES_DYNAMIC += "^${KERNEL_PACKAGE_NAME}-module-.*"
+PACKAGES_DYNAMIC += "^${KERNEL_PACKAGE_NAME}-image-.*"
+PACKAGES_DYNAMIC += "^${KERNEL_PACKAGE_NAME}-firmware-.*"
export OS = "${TARGET_OS}"
export CROSS_COMPILE = "${TARGET_PREFIX}"
+export KBUILD_BUILD_VERSION = "1"
export KBUILD_BUILD_USER = "oe-user"
export KBUILD_BUILD_HOST = "oe-host"
@@ -207,7 +232,7 @@
copy_initramfs
# Backing up kernel image relies on its type(regular file or symbolic link)
tmp_path=""
- for type in ${KERNEL_IMAGETYPES} ; do
+ for type in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do
if [ -h ${KERNEL_OUTPUT_DIR}/$type ] ; then
linkpath=`readlink -n ${KERNEL_OUTPUT_DIR}/$type`
realpath=`readlink -fn ${KERNEL_OUTPUT_DIR}/$type`
@@ -255,7 +280,7 @@
kernel_do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
- if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+ if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
# kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not
# be set....
if [ "$SOURCE_DATE_EPOCH" = "0" ]; then
@@ -339,7 +364,9 @@
install -d ${D}/boot
for type in ${KERNEL_IMAGETYPES} ; do
install -m 0644 ${KERNEL_OUTPUT_DIR}/${type} ${D}/${KERNEL_IMAGEDEST}/${type}-${KERNEL_VERSION}
- ln -sf ${type}-${KERNEL_VERSION} ${D}/${KERNEL_IMAGEDEST}/${type}
+ if [ "${KERNEL_PACKAGE_NAME}" = "kernel" ]; then
+ ln -sf ${type}-${KERNEL_VERSION} ${D}/${KERNEL_IMAGEDEST}/${type}
+ fi
done
install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION}
install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION}
@@ -393,13 +420,14 @@
emit_depmod_pkgdata() {
# Stash data for depmod
- install -d ${PKGDESTWORK}/kernel-depmod/
- echo "${KERNEL_VERSION}" > ${PKGDESTWORK}/kernel-depmod/kernel-abiversion
- cp ${B}/System.map ${PKGDESTWORK}/kernel-depmod/System.map-${KERNEL_VERSION}
+ install -d ${PKGDESTWORK}/${KERNEL_PACKAGE_NAME}-depmod/
+ echo "${KERNEL_VERSION}" > ${PKGDESTWORK}/${KERNEL_PACKAGE_NAME}-depmod/${KERNEL_PACKAGE_NAME}-abiversion
+ cp ${B}/System.map ${PKGDESTWORK}/${KERNEL_PACKAGE_NAME}-depmod/System.map-${KERNEL_VERSION}
}
PACKAGEFUNCS += "emit_depmod_pkgdata"
+do_shared_workdir[cleandirs] += " ${STAGING_KERNEL_BUILDDIR}"
do_shared_workdir () {
cd ${B}
@@ -410,7 +438,7 @@
# Store the kernel version in sysroots for module-base.bbclass
#
- echo "${KERNEL_VERSION}" > $kerneldir/kernel-abiversion
+ echo "${KERNEL_VERSION}" > $kerneldir/${KERNEL_PACKAGE_NAME}-abiversion
# Copy files required for module builds
cp System.map $kerneldir/System.map-${KERNEL_VERSION}
@@ -439,8 +467,10 @@
# arch/powerpc/lib/crtsavres.o which is present in
# KBUILD_LDFLAGS_MODULE, making it required to build external modules.
if [ ${ARCH} = "powerpc" ]; then
- mkdir -p $kerneldir/arch/powerpc/lib/
- cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
+ if [ -e arch/powerpc/lib/crtsavres.o ]; then
+ mkdir -p $kerneldir/arch/powerpc/lib/
+ cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
+ fi
fi
if [ -d include/generated ]; then
@@ -459,7 +489,7 @@
:
}
-KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig || yes '' | oe_runmake -C ${S} O=${B} oldconfig"
+KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig"
python check_oldest_kernel() {
oldest_kernel = d.getVar('OLDEST_KERNEL')
@@ -504,32 +534,34 @@
inherit cml1
+KCONFIG_CONFIG_COMMAND_append = " HOSTLDFLAGS='${BUILD_LDFLAGS}'"
+
EXPORT_FUNCTIONS do_compile do_install do_configure
# kernel-base becomes kernel-${KERNEL_VERSION}
# kernel-image becomes kernel-image-${KERNEL_VERSION}
-PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-modules"
+PACKAGES = "${KERNEL_PACKAGE_NAME} ${KERNEL_PACKAGE_NAME}-base ${KERNEL_PACKAGE_NAME}-vmlinux ${KERNEL_PACKAGE_NAME}-image ${KERNEL_PACKAGE_NAME}-dev ${KERNEL_PACKAGE_NAME}-modules"
FILES_${PN} = ""
-FILES_kernel-base = "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.order ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin"
-FILES_kernel-image = ""
-FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH} ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
-FILES_kernel-vmlinux = "/boot/vmlinux-${KERNEL_VERSION_NAME}"
-FILES_kernel-modules = ""
-RDEPENDS_kernel = "kernel-base"
+FILES_${KERNEL_PACKAGE_NAME}-base = "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.order ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin"
+FILES_${KERNEL_PACKAGE_NAME}-image = ""
+FILES_${KERNEL_PACKAGE_NAME}-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH} ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
+FILES_${KERNEL_PACKAGE_NAME}-vmlinux = "/boot/vmlinux-${KERNEL_VERSION_NAME}"
+FILES_${KERNEL_PACKAGE_NAME}-modules = ""
+RDEPENDS_${KERNEL_PACKAGE_NAME} = "${KERNEL_PACKAGE_NAME}-base"
# Allow machines to override this dependency if kernel image files are
# not wanted in images as standard
-RDEPENDS_kernel-base ?= "kernel-image"
-PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
-RDEPENDS_kernel-image += "${@base_conditional('KERNEL_IMAGETYPE', 'vmlinux', 'kernel-vmlinux', '', d)}"
-PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}"
-RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}"
-ALLOW_EMPTY_kernel = "1"
-ALLOW_EMPTY_kernel-base = "1"
-ALLOW_EMPTY_kernel-image = "1"
-ALLOW_EMPTY_kernel-modules = "1"
-DESCRIPTION_kernel-modules = "Kernel modules meta package"
+RDEPENDS_${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image"
+PKG_${KERNEL_PACKAGE_NAME}-image = "${KERNEL_PACKAGE_NAME}-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
+RDEPENDS_${KERNEL_PACKAGE_NAME}-image += "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', '${KERNEL_PACKAGE_NAME}-vmlinux', '', d)}"
+PKG_${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-${@legitimize_package_name('${KERNEL_VERSION}')}"
+RPROVIDES_${KERNEL_PACKAGE_NAME}-base += "${KERNEL_PACKAGE_NAME}-${KERNEL_VERSION}"
+ALLOW_EMPTY_${KERNEL_PACKAGE_NAME} = "1"
+ALLOW_EMPTY_${KERNEL_PACKAGE_NAME}-base = "1"
+ALLOW_EMPTY_${KERNEL_PACKAGE_NAME}-image = "1"
+ALLOW_EMPTY_${KERNEL_PACKAGE_NAME}-modules = "1"
+DESCRIPTION_${KERNEL_PACKAGE_NAME}-modules = "Kernel modules meta package"
-pkg_postinst_kernel-base () {
+pkg_postinst_${KERNEL_PACKAGE_NAME}-base () {
if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then
mkdir -p $D/lib/modules/${KERNEL_VERSION}
fi
@@ -543,7 +575,7 @@
PACKAGESPLITFUNCS_prepend = "split_kernel_packages "
python split_kernel_packages () {
- do_split_packages(d, root='${nonarch_base_libdir}/firmware', file_regex='^(.*)\.(bin|fw|cis|csp|dsp)$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
+ do_split_packages(d, root='${nonarch_base_libdir}/firmware', file_regex='^(.*)\.(bin|fw|cis|csp|dsp)$', output_pattern='${KERNEL_PACKAGE_NAME}-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
}
# Many scripts want to look in arch/$arch/boot for the bootable
@@ -634,21 +666,27 @@
MODULE_TARBALL_DEPLOY ?= "1"
kernel_do_deploy() {
+ deployDir="${DEPLOYDIR}"
+ if [ -n "${KERNEL_DEPLOYSUBDIR}" ]; then
+ deployDir="${DEPLOYDIR}/${KERNEL_DEPLOYSUBDIR}"
+ mkdir "$deployDir"
+ fi
+
for type in ${KERNEL_IMAGETYPES} ; do
base_name=${type}-${KERNEL_IMAGE_BASE_NAME}
- install -m 0644 ${KERNEL_OUTPUT_DIR}/${type} ${DEPLOYDIR}/${base_name}.bin
+ install -m 0644 ${KERNEL_OUTPUT_DIR}/${type} $deployDir/${base_name}.bin
done
if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
mkdir -p ${D}/lib
- tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib
- ln -sf ${MODULE_TARBALL_BASE_NAME} ${DEPLOYDIR}/${MODULE_TARBALL_SYMLINK_NAME}
+ tar -cvzf $deployDir/${MODULE_TARBALL_BASE_NAME} -C ${D} lib
+ ln -sf ${MODULE_TARBALL_BASE_NAME} $deployDir/${MODULE_TARBALL_SYMLINK_NAME}
fi
for type in ${KERNEL_IMAGETYPES} ; do
base_name=${type}-${KERNEL_IMAGE_BASE_NAME}
symlink_name=${type}-${KERNEL_IMAGE_SYMLINK_NAME}
- ln -sf ${base_name}.bin ${DEPLOYDIR}/${symlink_name}.bin
- ln -sf ${base_name}.bin ${DEPLOYDIR}/${type}
+ ln -sf ${base_name}.bin $deployDir/${symlink_name}.bin
+ ln -sf ${base_name}.bin $deployDir/${type}
done
cd ${B}
@@ -658,8 +696,8 @@
echo "Copying deploy ${type} kernel-initramfs image and setting up links..."
initramfs_base_name=${type}-${INITRAMFS_BASE_NAME}
initramfs_symlink_name=${type}-initramfs-${MACHINE}
- install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.initramfs ${DEPLOYDIR}/${initramfs_base_name}.bin
- ln -sf ${initramfs_base_name}.bin ${DEPLOYDIR}/${initramfs_symlink_name}.bin
+ install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.initramfs $deployDir/${initramfs_base_name}.bin
+ ln -sf ${initramfs_base_name}.bin $deployDir/${initramfs_symlink_name}.bin
fi
done
}
diff --git a/import-layers/yocto-poky/meta/classes/libc-package.bbclass b/import-layers/yocto-poky/meta/classes/libc-package.bbclass
index 739adce..2e7cd25 100644
--- a/import-layers/yocto-poky/meta/classes/libc-package.bbclass
+++ b/import-layers/yocto-poky/meta/classes/libc-package.bbclass
@@ -113,9 +113,9 @@
bb.error("datadir not defined")
return
- gconv_libdir = base_path_join(libdir, "gconv")
- charmap_dir = base_path_join(datadir, "i18n", "charmaps")
- locales_dir = base_path_join(datadir, "i18n", "locales")
+ gconv_libdir = oe.path.join(libdir, "gconv")
+ charmap_dir = oe.path.join(datadir, "i18n", "charmaps")
+ locales_dir = oe.path.join(datadir, "i18n", "locales")
binary_locales_dir = d.getVar('localedir')
def calc_gconv_deps(fn, pkg, file_regex, output_pattern, group):
@@ -189,7 +189,7 @@
# Read in supported locales and associated encodings
supported = {}
- with open(base_path_join(d.getVar('WORKDIR'), "SUPPORTED")) as f:
+ with open(oe.path.join(d.getVar('WORKDIR'), "SUPPORTED")) as f:
for line in f.readlines():
try:
locale, charset = line.rstrip().split()
@@ -231,12 +231,12 @@
commands = {}
def output_locale_binary(name, pkgname, locale, encoding):
- treedir = base_path_join(d.getVar("WORKDIR"), "locale-tree")
- ldlibdir = base_path_join(treedir, d.getVar("base_libdir"))
+ treedir = oe.path.join(d.getVar("WORKDIR"), "locale-tree")
+ ldlibdir = oe.path.join(treedir, d.getVar("base_libdir"))
path = d.getVar("PATH")
- i18npath = base_path_join(treedir, datadir, "i18n")
- gconvpath = base_path_join(treedir, "iconvdata")
- outputpath = base_path_join(treedir, binary_locales_dir)
+ i18npath = oe.path.join(treedir, datadir, "i18n")
+ gconvpath = oe.path.join(treedir, "iconvdata")
+ outputpath = oe.path.join(treedir, binary_locales_dir)
use_cross_localedef = d.getVar("LOCALE_GENERATION_WITH_CROSS-LOCALEDEF") or "0"
if use_cross_localedef == "1":
@@ -344,7 +344,7 @@
d.appendVar('RDEPENDS_%s' % metapkg, ' ' + pkg)
if use_bin == "compile":
- makefile = base_path_join(d.getVar("WORKDIR"), "locale-tree", "Makefile")
+ makefile = oe.path.join(d.getVar("WORKDIR"), "locale-tree", "Makefile")
m = open(makefile, "w")
m.write("all: %s\n\n" % " ".join(commands.keys()))
for cmd in commands:
diff --git a/import-layers/yocto-poky/meta/classes/license.bbclass b/import-layers/yocto-poky/meta/classes/license.bbclass
index d353110..06dd4a8 100644
--- a/import-layers/yocto-poky/meta/classes/license.bbclass
+++ b/import-layers/yocto-poky/meta/classes/license.bbclass
@@ -226,9 +226,7 @@
# The manifest file name contains the arch. Because we are not running
# in the recipe context it is necessary to check every arch used.
sstate_manifest_dir = d.getVar("SSTATE_MANIFESTS")
- sstate_archs = d.getVar("SSTATE_ARCHS")
- extra_archs = d.getVar("PACKAGE_EXTRA_ARCHS")
- archs = list(set(("%s %s" % (sstate_archs, extra_archs)).split()))
+ archs = list(set(d.getVar("SSTATE_ARCHS").split()))
for dep in depends:
# Some recipes have an arch on their own, so we try that first.
special_arch = d.getVar("PACKAGE_ARCH_pn-%s" % dep)
@@ -336,7 +334,7 @@
files = d.getVar('LICENSE_FILES_DIRECTORY')
pn = d.getVar('PN')
pn_lic = "%s%s" % (pn, d.getVar('LICENSE_PACKAGE_SUFFIX', False))
- if pn_lic in packages:
+ if pn_lic in packages.split():
bb.warn("%s package already existed in %s." % (pn_lic, pn))
else:
# first in PACKAGES to be sure that nothing else gets LICENSE_FILES_DIRECTORY
diff --git a/import-layers/yocto-poky/meta/classes/live-vm-common.bbclass b/import-layers/yocto-poky/meta/classes/live-vm-common.bbclass
index e1d8b18..68105d9 100644
--- a/import-layers/yocto-poky/meta/classes/live-vm-common.bbclass
+++ b/import-layers/yocto-poky/meta/classes/live-vm-common.bbclass
@@ -32,19 +32,16 @@
inherit ${EFI_CLASS}
inherit ${PCBIOS_CLASS}
-KERNEL_IMAGETYPE ??= "bzImage"
-VM_DEFAULT_KERNEL ??= "${KERNEL_IMAGETYPE}"
-
populate_kernel() {
dest=$1
install -d $dest
# Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
- bbnote "Trying to install ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} as $dest/vmlinuz"
- if [ -e ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} ]; then
- install -m 0644 ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} $dest/vmlinuz
+ bbnote "Trying to install ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} as $dest/${KERNEL_IMAGETYPE}"
+ if [ -e ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ]; then
+ install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} $dest/${KERNEL_IMAGETYPE}
else
- bbwarn "${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} doesn't exist"
+ bbwarn "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} doesn't exist"
fi
# initrd is made of concatenation of multiple filesystem images
diff --git a/import-layers/yocto-poky/meta/classes/logging.bbclass b/import-layers/yocto-poky/meta/classes/logging.bbclass
index 06c7c31..a0c94e9 100644
--- a/import-layers/yocto-poky/meta/classes/logging.bbclass
+++ b/import-layers/yocto-poky/meta/classes/logging.bbclass
@@ -86,7 +86,7 @@
# Strip off the debug level and ensure it is an integer
DBGLVL=$1; shift
- NONDIGITS=$(echo "$DBGLVL" | tr -d [:digit:])
+ NONDIGITS=$(echo "$DBGLVL" | tr -d "[:digit:]")
if [ "$NONDIGITS" ]; then
bbfatal "$USAGE"
fi
diff --git a/import-layers/yocto-poky/meta/classes/meson.bbclass b/import-layers/yocto-poky/meta/classes/meson.bbclass
new file mode 100644
index 0000000..2d7ee4f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/meson.bbclass
@@ -0,0 +1,130 @@
+inherit python3native
+
+DEPENDS_append = " meson-native ninja-native"
+
+# As Meson enforces out-of-tree builds we can just use cleandirs
+B = "${WORKDIR}/build"
+do_configure[cleandirs] = "${B}"
+
+# Where the meson.build build configuration is
+MESON_SOURCEPATH = "${S}"
+
+def noprefix(var, d):
+ return d.getVar(var).replace(d.getVar('prefix') + '/', '', 1)
+
+MESONOPTS = " --prefix ${prefix} \
+ --buildtype plain \
+ --bindir ${@noprefix('bindir', d)} \
+ --sbindir ${@noprefix('sbindir', d)} \
+ --datadir ${@noprefix('datadir', d)} \
+ --libdir ${@noprefix('libdir', d)} \
+ --libexecdir ${@noprefix('libexecdir', d)} \
+ --includedir ${@noprefix('includedir', d)} \
+ --mandir ${@noprefix('mandir', d)} \
+ --infodir ${@noprefix('infodir', d)} \
+ --sysconfdir ${sysconfdir} \
+ --localstatedir ${localstatedir} \
+ --sharedstatedir ${sharedstatedir}"
+
+MESON_TOOLCHAIN_ARGS = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
+MESON_C_ARGS = "${MESON_TOOLCHAIN_ARGS} ${CFLAGS}"
+MESON_CPP_ARGS = "${MESON_TOOLCHAIN_ARGS} ${CXXFLAGS}"
+MESON_LINK_ARGS = "${MESON_TOOLCHAIN_ARGS} ${LDFLAGS}"
+
+# both are required but not used by meson
+MESON_HOST_ENDIAN = "bogus-endian"
+MESON_TARGET_ENDIAN = "bogus-endian"
+
+EXTRA_OEMESON += "${PACKAGECONFIG_CONFARGS}"
+
+MESON_CROSS_FILE = ""
+MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
+MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross"
+
+def meson_array(var, d):
+ return "', '".join(d.getVar(var).split()).join(("'", "'"))
+
+addtask write_config before do_configure
+do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS CC CXX LD AR NM STRIP READELF"
+do_write_config() {
+ # This needs to be Py to split the args into single-element lists
+ cat >${WORKDIR}/meson.cross <<EOF
+[binaries]
+c = [${@meson_array('CC', d)}]
+cpp = [${@meson_array('CXX', d)}]
+ar = [${@meson_array('AR', d)}]
+nm = [${@meson_array('NM', d)}]
+ld = [${@meson_array('LD', d)}]
+strip = [${@meson_array('STRIP', d)}]
+readelf = [${@meson_array('READELF', d)}]
+pkgconfig = 'pkg-config'
+
+[properties]
+needs_exe_wrapper = true
+c_args = [${@meson_array('MESON_C_ARGS', d)}]
+c_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
+cpp_args = [${@meson_array('MESON_CPP_ARGS', d)}]
+cpp_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
+gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'
+
+[host_machine]
+system = '${HOST_OS}'
+cpu_family = '${HOST_ARCH}'
+cpu = '${HOST_ARCH}'
+endian = '${MESON_HOST_ENDIAN}'
+
+[target_machine]
+system = '${TARGET_OS}'
+cpu_family = '${TARGET_ARCH}'
+cpu = '${TARGET_ARCH}'
+endian = '${MESON_TARGET_ENDIAN}'
+EOF
+}
+
+CONFIGURE_FILES = "meson.build"
+
+meson_do_configure() {
+ if ! meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}" ${MESON_CROSS_FILE} ${EXTRA_OEMESON}; then
+ cat ${B}/meson-logs/meson-log.txt
+ bbfatal_log meson failed
+ fi
+}
+
+meson_do_configure_prepend_class-target() {
+ # Set these so that meson uses the native tools for its build sanity tests,
+ # which require executables to be runnable. The cross file will still
+ # override these for the target build. Note that we do *not* set CFLAGS,
+ # LDFLAGS, etc. as they will be slurped in by meson and applied to the
+ # target build, causing errors.
+ export CC="${BUILD_CC}"
+ export CXX="${BUILD_CXX}"
+ export LD="${BUILD_LD}"
+ export AR="${BUILD_AR}"
+}
+
+meson_do_configure_prepend_class-nativesdk() {
+ # Set these so that meson uses the native tools for its build sanity tests,
+ # which require executables to be runnable. The cross file will still
+ # override these for the nativesdk build. Note that we do *not* set CFLAGS,
+ # LDFLAGS, etc. as they will be slurped in by meson and applied to the
+ # nativesdk build, causing errors.
+ export CC="${BUILD_CC}"
+ export CXX="${BUILD_CXX}"
+ export LD="${BUILD_LD}"
+ export AR="${BUILD_AR}"
+}
+
+meson_do_configure_prepend_class-native() {
+ export PKG_CONFIG="pkg-config-native"
+}
+
+do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+"
+meson_do_compile() {
+ ninja ${PARALLEL_MAKE}
+}
+
+meson_do_install() {
+ DESTDIR='${D}' ninja ${PARALLEL_MAKEINST} install
+}
+
+EXPORT_FUNCTIONS do_configure do_compile do_install
diff --git a/import-layers/yocto-poky/meta/classes/mirrors.bbclass b/import-layers/yocto-poky/meta/classes/mirrors.bbclass
index 766f1cb..b331afc 100644
--- a/import-layers/yocto-poky/meta/classes/mirrors.bbclass
+++ b/import-layers/yocto-poky/meta/classes/mirrors.bbclass
@@ -67,7 +67,7 @@
# where git native protocol fetches may fail due to local firewall rules, etc.
MIRRORS += "\
-git://anonscm.debian.org/.* git://anonscm.debian.org/git/PATH;protocol=https \n \
+git://salsa.debian.org/.* git://salsa.debian.org/PATH;protocol=https \n \
git://git.gnome.org/.* git://git.gnome.org/browse/PATH;protocol=https \n \
git://git.savannah.gnu.org/.* git://git.savannah.gnu.org/git/PATH;protocol=https \n \
git://git.yoctoproject.org/.* git://git.yoctoproject.org/git/PATH;protocol=https \n \
diff --git a/import-layers/yocto-poky/meta/classes/module-base.bbclass b/import-layers/yocto-poky/meta/classes/module-base.bbclass
index 6fe77c0..27bd69f 100644
--- a/import-layers/yocto-poky/meta/classes/module-base.bbclass
+++ b/import-layers/yocto-poky/meta/classes/module-base.bbclass
@@ -1,7 +1,8 @@
inherit kernel-arch
-# This is instead of DEPENDS = "virtual/kernel"
-do_configure[depends] += "virtual/kernel:do_compile_kernelmodules"
+# We do the dependency this way because the output is not preserved
+# in sstate, so we must force do_compile to run (once).
+do_configure[depends] += "make-mod-scripts:do_compile"
export OS = "${TARGET_OS}"
export CROSS_COMPILE = "${TARGET_PREFIX}"
@@ -12,16 +13,9 @@
# we didn't pick the name.
export KBUILD_OUTPUT = "${STAGING_KERNEL_BUILDDIR}"
-export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}"
+export KERNEL_VERSION = "${@oe.utils.read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}"
KERNEL_OBJECT_SUFFIX = ".ko"
# kernel modules are generally machine specific
PACKAGE_ARCH = "${MACHINE_ARCH}"
-# Function to ensure the kernel scripts are created. Expected to
-# be called before do_compile. See module.bbclass for an example.
-do_make_scripts() {
- unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
- make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
- -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts
-}
diff --git a/import-layers/yocto-poky/meta/classes/module.bbclass b/import-layers/yocto-poky/meta/classes/module.bbclass
index 78d1b21..e344960 100644
--- a/import-layers/yocto-poky/meta/classes/module.bbclass
+++ b/import-layers/yocto-poky/meta/classes/module.bbclass
@@ -1,9 +1,5 @@
inherit module-base kernel-module-split pkgconfig
-addtask make_scripts after do_prepare_recipe_sysroot before do_configure
-do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
-do_make_scripts[depends] += "virtual/kernel:do_shared_workdir"
-
EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}"
MODULES_INSTALL_TARGET ?= "modules_install"
diff --git a/import-layers/yocto-poky/meta/classes/multilib.bbclass b/import-layers/yocto-poky/meta/classes/multilib.bbclass
index 816f54e..519c1a5 100644
--- a/import-layers/yocto-poky/meta/classes/multilib.bbclass
+++ b/import-layers/yocto-poky/meta/classes/multilib.bbclass
@@ -11,8 +11,8 @@
# There should only be one kernel in multilib configs
# We also skip multilib setup for module packages.
provides = (e.data.getVar("PROVIDES") or "").split()
- if "virtual/kernel" in provides or bb.data.inherits_class('module-base', e.data):
- raise bb.parse.SkipPackage("We shouldn't have multilib variants for the kernel")
+ if "virtual/kernel" in provides or bb.data.inherits_class('module-base', e.data) or "make-mod-scripts" in e.data.getVar("PN"):
+ raise bb.parse.SkipRecipe("We shouldn't have multilib variants for the kernel")
save_var_name=e.data.getVar("MULTILIB_SAVE_VARNAME") or ""
for name in save_var_name.split():
@@ -41,13 +41,13 @@
return
if bb.data.inherits_class('native', e.data):
- raise bb.parse.SkipPackage("We can't extend native recipes")
+ raise bb.parse.SkipRecipe("We can't extend native recipes")
if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data):
- raise bb.parse.SkipPackage("We can't extend nativesdk recipes")
+ raise bb.parse.SkipRecipe("We can't extend nativesdk recipes")
if bb.data.inherits_class('allarch', e.data) and not bb.data.inherits_class('packagegroup', e.data):
- raise bb.parse.SkipPackage("Don't extend allarch recipes which are not packagegroups")
+ raise bb.parse.SkipRecipe("Don't extend allarch recipes which are not packagegroups")
# Expand this since this won't work correctly once we set a multilib into place
@@ -76,7 +76,6 @@
newtune = e.data.getVar("DEFAULTTUNE_" + "virtclass-multilib-" + variant, False)
if newtune:
e.data.setVar("DEFAULTTUNE", newtune)
- e.data.setVar('DEFAULTTUNE_ML_%s' % variant, newtune)
}
addhandler multilib_virtclass_handler
@@ -100,8 +99,8 @@
d.setVar("LINGUAS_INSTALL", "")
# FIXME, we need to map this to something, not delete it!
d.setVar("PACKAGE_INSTALL_ATTEMPTONLY", "")
-
- if bb.data.inherits_class('image', d):
+ bb.build.deltask('do_populate_sdk', d)
+ bb.build.deltask('do_populate_sdk_ext', d)
return
clsextend.map_depends_variable("DEPENDS")
@@ -115,7 +114,6 @@
clsextend.map_packagevars()
clsextend.map_regexp_variable("PACKAGES_DYNAMIC")
- clsextend.map_variable("PACKAGE_INSTALL")
clsextend.map_variable("INITSCRIPT_PACKAGES")
clsextend.map_variable("USERADD_PACKAGES")
clsextend.map_variable("SYSTEMD_PACKAGES")
diff --git a/import-layers/yocto-poky/meta/classes/multilib_global.bbclass b/import-layers/yocto-poky/meta/classes/multilib_global.bbclass
index fd0bfe1..d2ec1ad 100644
--- a/import-layers/yocto-poky/meta/classes/multilib_global.bbclass
+++ b/import-layers/yocto-poky/meta/classes/multilib_global.bbclass
@@ -13,11 +13,14 @@
versions = []
providers = []
+ rproviders = []
for v in d.keys():
if v.startswith("PREFERRED_VERSION_"):
versions.append(v)
if v.startswith("PREFERRED_PROVIDER_"):
providers.append(v)
+ if v.startswith("PREFERRED_RPROVIDER_"):
+ rproviders.append(v)
for v in versions:
val = d.getVar(v, False)
@@ -91,6 +94,29 @@
if prov != provexp and d.getVar(prov, False):
d.renameVar(prov, provexp)
+ for prov in rproviders:
+ val = d.getVar(prov, False)
+ pkg = prov.replace("PREFERRED_RPROVIDER_", "")
+ for p in prefixes:
+ newval = p + "-" + val
+
+ # implement variable keys
+ localdata = bb.data.createCopy(d)
+ override = ":virtclass-multilib-" + p
+ localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
+ newname = localdata.expand(prov)
+ if newname != prov and not d.getVar(newname, False):
+ d.setVar(newname, localdata.expand(newval))
+
+ # implement alternative multilib name
+ newname = localdata.expand("PREFERRED_RPROVIDER_" + p + "-" + pkg)
+ if not d.getVar(newname, False) and newval != None:
+ d.setVar(newname, localdata.expand(newval))
+ # Avoid future variable key expansion
+ provexp = d.expand(prov)
+ if prov != provexp and d.getVar(prov, False):
+ d.renameVar(prov, provexp)
+
def translate_provide(prefix, prov):
if not prov.startswith("virtual/"):
return prefix + "-" + prov
@@ -162,7 +188,7 @@
if rprovs.strip():
e.data.setVar("RPROVIDES", rprovs)
- # Process RPROVIDES_${PN}...
+ # Process RPROVIDES_${PN}...
for pkg in (e.data.getVar("PACKAGES") or "").split():
origrprovs = rprovs = e.data.getVar("RPROVIDES_%s" % pkg) or ""
for clsextend in clsextends:
diff --git a/import-layers/yocto-poky/meta/classes/native.bbclass b/import-layers/yocto-poky/meta/classes/native.bbclass
index 9c434dc..a911f2a 100644
--- a/import-layers/yocto-poky/meta/classes/native.bbclass
+++ b/import-layers/yocto-poky/meta/classes/native.bbclass
@@ -52,8 +52,6 @@
# native pkg doesn't need the TOOLCHAIN_OPTIONS.
TOOLCHAIN_OPTIONS = ""
-DEPENDS_GETTEXT = "gettext-native"
-
# Don't build ptest natively
PTEST_ENABLED = "0"
diff --git a/import-layers/yocto-poky/meta/classes/npm.bbclass b/import-layers/yocto-poky/meta/classes/npm.bbclass
index a69bedb..c351ff0 100644
--- a/import-layers/yocto-poky/meta/classes/npm.bbclass
+++ b/import-layers/yocto-poky/meta/classes/npm.bbclass
@@ -2,7 +2,15 @@
RDEPENDS_${PN}_prepend = "nodejs "
S = "${WORKDIR}/npmpkg"
-NPM_INSTALLDIR = "${D}${libdir}/node_modules/${PN}"
+def node_pkgname(d):
+ bpn = d.getVar('BPN')
+ if bpn.startswith("node-"):
+ return bpn[5:]
+ return bpn
+
+NPMPN ?= "${@node_pkgname(d)}"
+
+NPM_INSTALLDIR = "${D}${libdir}/node_modules/${NPMPN}"
# function maps arch names to npm arch names
def npm_oe_arch_map(target_arch, d):
@@ -31,7 +39,7 @@
fi
npm set cache ${WORKDIR}/npm_cache
# clear cache before every build
- npm cache clear
+ npm cache clear --force
# Install pkg into ${S} without going to the registry
if [ "${NPM_INSTALL_DEV}" = "1" ]; then
npm --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --no-registry install
@@ -45,7 +53,8 @@
# be created in this directory
export HOME=${WORKDIR}
mkdir -p ${NPM_INSTALLDIR}/
- npm install --prefix ${D}${prefix} -g --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry
+ npm pack .
+ npm install --prefix ${D}${prefix} -g --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry ${NPMPN}-${PV}.tgz
if [ -d ${D}${prefix}/etc ] ; then
# This will be empty
rmdir ${D}${prefix}/etc
@@ -53,13 +62,13 @@
}
python populate_packages_prepend () {
- instdir = d.expand('${D}${libdir}/node_modules/${PN}')
+ instdir = d.expand('${D}${libdir}/node_modules/${NPMPN}')
extrapackages = oe.package.npm_split_package_dirs(instdir)
pkgnames = extrapackages.keys()
d.prependVar('PACKAGES', '%s ' % ' '.join(pkgnames))
for pkgname in pkgnames:
pkgrelpath, pdata = extrapackages[pkgname]
- pkgpath = '${libdir}/node_modules/${PN}/' + pkgrelpath
+ pkgpath = '${libdir}/node_modules/${NPMPN}/' + pkgrelpath
# package names can't have underscores but npm packages sometimes use them
oe_pkg_name = pkgname.replace('_', '-')
expanded_pkgname = d.expand(oe_pkg_name)
@@ -75,7 +84,7 @@
}
FILES_${PN} += " \
- ${libdir}/node_modules/${PN} \
+ ${libdir}/node_modules/${NPMPN} \
"
EXPORT_FUNCTIONS do_compile do_install
diff --git a/import-layers/yocto-poky/meta/classes/package.bbclass b/import-layers/yocto-poky/meta/classes/package.bbclass
index 2053d46..edeffa9 100644
--- a/import-layers/yocto-poky/meta/classes/package.bbclass
+++ b/import-layers/yocto-poky/meta/classes/package.bbclass
@@ -26,7 +26,7 @@
# a list of affected files in FILER{PROVIDES,DEPENDS}FLIST_pkg
#
# h) package_do_shlibs - Look at the shared libraries generated and autotmatically add any
-# depenedencies found. Also stores the package name so anyone else using this library
+# dependencies found. Also stores the package name so anyone else using this library
# knows which package to depend on.
#
# i) package_do_pkgconfig - Keep track of which packages need and provide which .pc files
@@ -52,7 +52,8 @@
ALL_MULTILIB_PACKAGE_ARCHS = "${@all_multilib_tune_values(d, 'PACKAGE_ARCHS')}"
# rpm is used for the per-file dependency identification
-PACKAGE_DEPENDS += "rpm-native"
+# dwarfsrcfiles is used to determine the list of debug source files
+PACKAGE_DEPENDS += "rpm-native dwarfsrcfiles-native"
# If your postinstall can execute at rootfs creation time rather than on
@@ -334,6 +335,33 @@
return False
+def parse_debugsources_from_dwarfsrcfiles_output(dwarfsrcfiles_output):
+ debugfiles = {}
+
+ for line in dwarfsrcfiles_output.splitlines():
+ if line.startswith("\t"):
+ debugfiles[os.path.normpath(line.split()[0])] = ""
+
+ return debugfiles.keys()
+
+def append_source_info(file, sourcefile, d, fatal=True):
+ cmd = "'dwarfsrcfiles' '%s'" % (file)
+ (retval, output) = oe.utils.getstatusoutput(cmd)
+ # 255 means a specific file wasn't fully parsed to get the debug file list, which is not a fatal failure
+ if retval != 0 and retval != 255:
+ msg = "dwarfsrcfiles failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else "")
+ if fatal:
+ bb.fatal(msg)
+ bb.note(msg)
+
+ debugsources = parse_debugsources_from_dwarfsrcfiles_output(output)
+ # filenames are null-separated - this is an artefact of the previous use
+ # of rpm's debugedit, which was writing them out that way, and the code elsewhere
+ # is still assuming that.
+ debuglistoutput = '\0'.join(debugsources) + '\0'
+ open(sourcefile, 'a').write(debuglistoutput)
+
+
def splitdebuginfo(file, debugfile, debugsrcdir, sourcefile, d):
# Function to split a single file into two components, one is the stripped
# target system binary, the other contains any debugging information. The
@@ -345,7 +373,6 @@
dvar = d.getVar('PKGD')
objcopy = d.getVar("OBJCOPY")
- debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/debugedit")
# We ignore kernel modules, we don't generate debug info files.
if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
@@ -359,10 +386,7 @@
# We need to extract the debug src information here...
if debugsrcdir:
- cmd = "'%s' -i -l '%s' '%s'" % (debugedit, sourcefile, file)
- (retval, output) = oe.utils.getstatusoutput(cmd)
- if retval:
- bb.fatal("debugedit failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
+ append_source_info(file, sourcefile, d)
bb.utils.mkdirhier(os.path.dirname(debugfile))
@@ -383,7 +407,7 @@
return 0
def copydebugsources(debugsrcdir, d):
- # The debug src information written out to sourcefile is further procecessed
+ # The debug src information written out to sourcefile is further processed
# and copied to the destination here.
import stat
@@ -393,7 +417,6 @@
dvar = d.getVar('PKGD')
strip = d.getVar("STRIP")
objcopy = d.getVar("OBJCOPY")
- debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit")
workdir = d.getVar("WORKDIR")
workparentdir = os.path.dirname(os.path.dirname(workdir))
workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir)
@@ -633,7 +656,7 @@
# __str__ can be used to print out an entry in the input format
#
# if fs_perms_entry.path is None:
- # an error occured
+ # an error occurred
# if fs_perms_entry.link, you can retrieve:
# fs_perms_entry.path = path
# fs_perms_entry.link = target of link
@@ -860,6 +883,7 @@
dvar = d.getVar('PKGD')
pn = d.getVar('PN')
+ targetos = d.getVar('TARGET_OS')
oldcwd = os.getcwd()
os.chdir(dvar)
@@ -901,7 +925,7 @@
# 16 - kernel module
def isELF(path):
type = 0
- ret, result = oe.utils.getstatusoutput("file \"%s\"" % path.replace("\"", "\\\""))
+ ret, result = oe.utils.getstatusoutput("file -b '%s'" % path)
if ret:
msg = "split_and_strip_files: 'file %s' failed" % path
@@ -919,6 +943,15 @@
type |= 8
return type
+ def isStaticLib(path):
+ if path.endswith('.a') and not os.path.islink(path):
+ with open(path, 'rb') as fh:
+ # The magic must include the first slash to avoid
+ # matching golang static libraries
+ magic = b'!<arch>\x0a/'
+ start = fh.read(len(magic))
+ return start == magic
+ return False
#
# First lets figure out all of the files we may have to process ... do this only once!
@@ -926,9 +959,11 @@
elffiles = {}
symlinks = {}
kernmods = []
+ staticlibs = []
inodes = {}
libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir"))
baselibdir = os.path.abspath(dvar + os.sep + d.getVar("base_libdir"))
+ skipfiles = (d.getVar("INHIBIT_PACKAGE_STRIP_FILES") or "").split()
if (d.getVar('INHIBIT_PACKAGE_STRIP') != '1' or \
d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'):
for root, dirs, files in cpath.walk(dvar):
@@ -937,6 +972,9 @@
if file.endswith(".ko") and file.find("/lib/modules/") != -1:
kernmods.append(file)
continue
+ if isStaticLib(file):
+ staticlibs.append(file)
+ continue
# Skip debug files
if debugappend and file.endswith(debugappend):
@@ -944,6 +982,9 @@
if debugdir and debugdir in os.path.dirname(file[len(dvar):]):
continue
+ if file in skipfiles:
+ continue
+
try:
ltarget = cpath.realpath(file, dvar, False)
s = cpath.lstat(ltarget)
@@ -955,7 +996,7 @@
continue
if not s:
continue
- # Check its an excutable
+ # Check its an executable
if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH) \
or ((file.startswith(libdir) or file.startswith(baselibdir)) and (".so" in f or ".node" in f)):
# If it's a symlink, and points to an ELF file, we capture the readlink target
@@ -983,7 +1024,7 @@
# b) Only strip any hardlinked file once (no races)
# c) Track any hardlinks between files so that we can reconstruct matching debug file hardlinks
- # Use a reference of device ID and inode number to indentify files
+ # Use a reference of device ID and inode number to identify files
file_reference = "%d_%d" % (s.st_dev, s.st_ino)
if file_reference in inodes:
os.unlink(file)
@@ -1012,6 +1053,10 @@
# Only store off the hard link reference if we successfully split!
splitdebuginfo(file, fpath, debugsrcdir, sourcefile, d)
+ if debugsrcdir and not targetos.startswith("mingw"):
+ for file in staticlibs:
+ append_source_info(file, sourcefile, d, fatal=False)
+
# Hardlink our debug symbols to the other hardlink copies
for ref in inodes:
if len(inodes[ref]) == 1:
@@ -1105,7 +1150,7 @@
d.setVar('FILES_%s' % src_package_name, '/usr/src/debug')
# Sanity check PACKAGES for duplicates
- # Sanity should be moved to sanity.bbclass once we have the infrastucture
+ # Sanity should be moved to sanity.bbclass once we have the infrastructure
package_list = []
for pkg in packages.split():
@@ -1303,6 +1348,36 @@
from glob import glob
import json
+ def process_postinst_on_target(pkg, mlprefix):
+ defer_fragment = """
+if [ -n "$D" ]; then
+ $INTERCEPT_DIR/postinst_intercept delay_to_first_boot %s mlprefix=%s
+ exit 0
+fi
+""" % (pkg, mlprefix)
+
+ postinst = d.getVar('pkg_postinst_%s' % pkg)
+ postinst_ontarget = d.getVar('pkg_postinst_ontarget_%s' % pkg)
+
+ if postinst_ontarget:
+ bb.debug(1, 'adding deferred pkg_postinst_ontarget() to pkg_postinst() for %s' % pkg)
+ if not postinst:
+ postinst = '#!/bin/sh\n'
+ postinst += defer_fragment
+ postinst += postinst_ontarget
+ d.setVar('pkg_postinst_%s' % pkg, postinst)
+
+ def add_set_e_to_scriptlets(pkg):
+ for scriptlet_name in ('pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm'):
+ scriptlet = d.getVar('%s_%s' % (scriptlet_name, pkg))
+ if scriptlet:
+ scriptlet_split = scriptlet.split('\n')
+ if scriptlet_split[0].startswith("#!"):
+ scriptlet = scriptlet_split[0] + "\nset -e\n" + "\n".join(scriptlet_split[1:])
+ else:
+ scriptlet = "set -e\n" + "\n".join(scriptlet_split[0:])
+ d.setVar('%s_%s' % (scriptlet_name, pkg), scriptlet)
+
def write_if_exists(f, pkg, var):
def encode(str):
import codecs
@@ -1398,6 +1473,8 @@
write_if_exists(sf, pkg, 'ALLOW_EMPTY')
write_if_exists(sf, pkg, 'FILES')
write_if_exists(sf, pkg, 'CONFFILES')
+ process_postinst_on_target(pkg, d.getVar("MLPREFIX"))
+ add_set_e_to_scriptlets(pkg)
write_if_exists(sf, pkg, 'pkg_postinst')
write_if_exists(sf, pkg, 'pkg_postrm')
write_if_exists(sf, pkg, 'pkg_preinst')
@@ -1541,7 +1618,7 @@
shlibswork_dir = d.getVar('SHLIBSWORKDIR')
# Take shared lock since we're only reading, not writing
- lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
+ lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
def linux_so(file, needed, sonames, renames, pkgver):
needs_ldconfig = False
@@ -1732,6 +1809,9 @@
for pkg in packages.split():
bb.debug(2, "calculating shlib requirements for %s" % pkg)
+ private_libs = d.getVar('PRIVATE_LIBS_' + pkg) or d.getVar('PRIVATE_LIBS') or ""
+ private_libs = private_libs.split()
+
deps = list()
for n in needed[pkg]:
# if n is in private libraries, don't try to search provider for it
@@ -1823,7 +1903,7 @@
pkgconfig_needed[pkg] += exp.replace(',', ' ').split()
# Take shared lock since we're only reading, not writing
- lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
+ lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
for pkg in packages.split():
pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist")
@@ -2156,11 +2236,9 @@
do_package[vardeps] += "${PACKAGEBUILDPKGD} ${PACKAGESPLITFUNCS} ${PACKAGEFUNCS} ${@gen_packagevar(d)}"
addtask package after do_install
-PACKAGELOCK = "${STAGING_DIR}/package-output.lock"
SSTATETASKS += "do_package"
do_package[cleandirs] = "${PKGDEST} ${PKGDESTWORK}"
do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST} ${PKGDESTWORK}"
-do_package[sstate-lockfile-shared] = "${PACKAGELOCK}"
do_package_setscene[dirs] = "${STAGING_DIR}"
python do_package_setscene () {
@@ -2175,10 +2253,13 @@
addtask packagedata before do_build after do_package
SSTATETASKS += "do_packagedata"
+# PACKAGELOCK protects readers of PKGDATA_DIR against writes
+# whilst code is reading in do_package
+PACKAGELOCK = "${STAGING_DIR}/package-output.lock"
do_packagedata[sstate-inputdirs] = "${PKGDESTWORK}"
do_packagedata[sstate-outputdirs] = "${PKGDATA_DIR}"
-do_packagedata[sstate-lockfile-shared] = "${PACKAGELOCK}"
-do_packagedata[stamp-extra-info] = "${MACHINE}"
+do_packagedata[sstate-lockfile] = "${PACKAGELOCK}"
+do_packagedata[stamp-extra-info] = "${MACHINE_ARCH}"
python do_packagedata_setscene () {
sstate_setscene(d)
diff --git a/import-layers/yocto-poky/meta/classes/package_deb.bbclass b/import-layers/yocto-poky/meta/classes/package_deb.bbclass
index 5d29793..2e8d17d 100644
--- a/import-layers/yocto-poky/meta/classes/package_deb.bbclass
+++ b/import-layers/yocto-poky/meta/classes/package_deb.bbclass
@@ -230,9 +230,11 @@
# '>' = greater or equal
# adjust these to the '<<' and '>>' equivalents
#
- for dep in var:
- if '(' in dep:
- newdep = re.sub(r'[(:)]', '__', dep)
+ for dep in list(var.keys()):
+ if '(' in dep or '/' in dep:
+ newdep = re.sub(r'[(:)/]', '__', dep)
+ if newdep.startswith("__"):
+ newdep = "A" + newdep
if newdep != dep:
var[newdep] = var[dep]
del var[dep]
diff --git a/import-layers/yocto-poky/meta/classes/package_ipk.bbclass b/import-layers/yocto-poky/meta/classes/package_ipk.bbclass
index 6c1fdaa..a0b34fa 100644
--- a/import-layers/yocto-poky/meta/classes/package_ipk.bbclass
+++ b/import-layers/yocto-poky/meta/classes/package_ipk.bbclass
@@ -8,7 +8,7 @@
PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks"
# Program to be used to build opkg packages
-OPKGBUILDCMD ??= "opkg-build"
+OPKGBUILDCMD ??= "opkg-build -Z xz"
OPKG_ARGS += "--force_postinstall --prefer-arch-to-version"
OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}"
@@ -307,7 +307,7 @@
python () {
if d.getVar('PACKAGES') != '':
- deps = ' opkg-utils-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot'
+ deps = ' opkg-utils-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot xz-native:do_populate_sysroot'
d.appendVarFlag('do_package_write_ipk', 'depends', deps)
d.setVarFlag('do_package_write_ipk', 'fakeroot', "1")
}
diff --git a/import-layers/yocto-poky/meta/classes/package_rpm.bbclass b/import-layers/yocto-poky/meta/classes/package_rpm.bbclass
index a428d30..21ada34 100644
--- a/import-layers/yocto-poky/meta/classes/package_rpm.bbclass
+++ b/import-layers/yocto-poky/meta/classes/package_rpm.bbclass
@@ -382,6 +382,12 @@
# Gather special src/first package data
if srcname == splitname:
+ archiving = d.getVarFlag('ARCHIVER_MODE', 'srpm') == '1' and \
+ bb.data.inherits_class('archiver', d)
+ if archiving and srclicense != splitlicense:
+ bb.warn("The SRPM produced may not have the correct overall source license in the License tag. This is due to the LICENSE for the primary package and SRPM conflicting.")
+
+ srclicense = splitlicense
srcrdepends = splitrdepends
srcrrecommends = splitrrecommends
srcrsuggests = splitrsuggests
@@ -421,8 +427,7 @@
spec_preamble_bottom.append('Release: %s' % splitrelease)
if srcepoch != splitepoch:
spec_preamble_bottom.append('Epoch: %s' % splitepoch)
- if srclicense != splitlicense:
- spec_preamble_bottom.append('License: %s' % splitlicense)
+ spec_preamble_bottom.append('License: %s' % splitlicense)
spec_preamble_bottom.append('Group: %s' % splitsection)
if srccustomtagschunk != splitcustomtagschunk:
@@ -665,13 +670,15 @@
cmd = rpmbuild
cmd = cmd + " --noclean --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
- cmd = cmd + " --define '_builddir " + d.getVar('S') + "'"
+ cmd = cmd + " --define '_builddir " + d.getVar('B') + "'"
cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
cmd = cmd + " --define '_use_internal_dependency_generator 0'"
cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'"
cmd = cmd + " --define '_build_id_links none'"
cmd = cmd + " --define '_binary_payload w6T.xzdio'"
cmd = cmd + " --define '_source_payload w6T.xzdio'"
+ cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'"
+ cmd = cmd + " --define '_buildhost reproducible'"
if perfiledeps:
cmd = cmd + " --define '__find_requires " + outdepends + "'"
cmd = cmd + " --define '__find_provides " + outprovides + "'"
diff --git a/import-layers/yocto-poky/meta/classes/packagegroup.bbclass b/import-layers/yocto-poky/meta/classes/packagegroup.bbclass
index eea2e5b..d540d42 100644
--- a/import-layers/yocto-poky/meta/classes/packagegroup.bbclass
+++ b/import-layers/yocto-poky/meta/classes/packagegroup.bbclass
@@ -56,3 +56,4 @@
bb.fatal("Please ensure that your setting of VIRTUAL-RUNTIME_init_manager (%s) matches the entries enabled in DISTRO_FEATURES" % initman)
}
+CVE_PRODUCT = ""
diff --git a/import-layers/yocto-poky/meta/classes/patch.bbclass b/import-layers/yocto-poky/meta/classes/patch.bbclass
index 8f35cb4..2fc6925 100644
--- a/import-layers/yocto-poky/meta/classes/patch.bbclass
+++ b/import-layers/yocto-poky/meta/classes/patch.bbclass
@@ -26,9 +26,23 @@
python patch_task_patch_prefunc() {
# Prefunc for do_patch
- func = d.getVar('BB_RUNTASK')
srcsubdir = d.getVar('S')
+ workdir = os.path.abspath(d.getVar('WORKDIR'))
+ testsrcdir = os.path.abspath(srcsubdir)
+ if (testsrcdir + os.sep).startswith(workdir + os.sep):
+ # Double-check that either workdir or S or some directory in-between is a git repository
+ found = False
+ while testsrcdir != '/':
+ if os.path.exists(os.path.join(testsrcdir, '.git')):
+ found = True
+ break
+ if testsrcdir == workdir:
+ break
+ testsrcdir = os.path.dirname(testsrcdir)
+ if not found:
+ bb.fatal('PATCHTOOL = "git" set for source tree that is not a git repository. Refusing to continue as that may result in commits being made in your metadata repository.')
+
patchdir = os.path.join(srcsubdir, 'patches')
if os.path.exists(patchdir):
if os.listdir(patchdir):
diff --git a/import-layers/yocto-poky/meta/classes/populate_sdk_base.bbclass b/import-layers/yocto-poky/meta/classes/populate_sdk_base.bbclass
index 30fcefc..3da3507 100644
--- a/import-layers/yocto-poky/meta/classes/populate_sdk_base.bbclass
+++ b/import-layers/yocto-poky/meta/classes/populate_sdk_base.bbclass
@@ -20,6 +20,9 @@
SDKIMAGE_FEATURES ??= "dev-pkgs dbg-pkgs ${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'doc-pkgs', '', d)}"
SDKIMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("SDKIMAGE_FEATURES", d)}'
+PACKAGE_ARCHS_append_task-populate-sdk = " sdk-provides-dummy-target"
+SDK_PACKAGE_ARCHS += "sdk-provides-dummy-${SDKPKGSUFFIX}"
+
# List of locales to install, or "all" for all of them, or unset for none.
SDKIMAGE_LINGUAS ?= "all"
@@ -37,12 +40,13 @@
TOOLCHAIN_HOST_TASK ?= "nativesdk-packagegroup-sdk-host packagegroup-cross-canadian-${MACHINE}"
TOOLCHAIN_HOST_TASK_ATTEMPTONLY ?= ""
-TOOLCHAIN_TARGET_TASK ?= "${@multilib_pkg_extend(d, 'packagegroup-core-standalone-sdk-target')}"
+TOOLCHAIN_TARGET_TASK ?= "${@multilib_pkg_extend(d, 'packagegroup-core-standalone-sdk-target')} \
+ ${@multilib_pkg_extend(d, 'target-sdk-provides-dummy')}"
TOOLCHAIN_TARGET_TASK_ATTEMPTONLY ?= ""
TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
SDK_RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}"
-SDK_DEPENDS = "virtual/fakeroot-native pixz-native cross-localedef-native"
+SDK_DEPENDS = "virtual/fakeroot-native xz-native cross-localedef-native ${MLPREFIX}qemuwrapper-cross"
SDK_DEPENDS_append_libc-glibc = " nativesdk-glibc-locale"
# We want the MULTIARCH_TARGET_SYS to point to the TUNE_PKGARCH, not PACKAGE_ARCH as it
@@ -152,7 +156,7 @@
do_populate_sdk[cleandirs] = "${SDKDEPLOYDIR}"
do_populate_sdk[sstate-inputdirs] = "${SDKDEPLOYDIR}"
do_populate_sdk[sstate-outputdirs] = "${SDK_DEPLOY}"
-do_populate_sdk[stamp-extra-info] = "${MACHINE}${SDKMACHINE}"
+do_populate_sdk[stamp-extra-info] = "${MACHINE_ARCH}${SDKMACHINE}"
fakeroot create_sdk_files() {
cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/
@@ -221,7 +225,7 @@
# Package it up
mkdir -p ${SDKDEPLOYDIR}
cd ${SDK_OUTPUT}/${SDKPATH}
- tar ${SDKTAROPTS} -cf - . | pixz > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.tar.xz
+ tar ${SDKTAROPTS} -cf - . | xz -T 0 > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.tar.xz
}
fakeroot create_shar() {
diff --git a/import-layers/yocto-poky/meta/classes/populate_sdk_ext.bbclass b/import-layers/yocto-poky/meta/classes/populate_sdk_ext.bbclass
index 2dd2123..e1bba49 100644
--- a/import-layers/yocto-poky/meta/classes/populate_sdk_ext.bbclass
+++ b/import-layers/yocto-poky/meta/classes/populate_sdk_ext.bbclass
@@ -162,18 +162,16 @@
except FileNotFoundError:
pass
os.rename(sdkbasepath, temp_sdkbasepath)
+ cmdprefix = '. %s .; ' % conf_initpath
+ logfile = d.getVar('WORKDIR') + '/tasklist_bb_log.txt'
try:
- cmdprefix = '. %s .; ' % conf_initpath
- logfile = d.getVar('WORKDIR') + '/tasklist_bb_log.txt'
- try:
- oe.copy_buildsystem.check_sstate_task_list(d, get_sdk_install_targets(d), tasklistfile, cmdprefix=cmdprefix, cwd=temp_sdkbasepath, logfile=logfile)
- except bb.process.ExecutionError as e:
- msg = 'Failed to generate filtered task list for extensible SDK:\n%s' % e.stdout.rstrip()
- if 'attempted to execute unexpectedly and should have been setscened' in e.stdout:
- msg += '\n----------\n\nNOTE: "attempted to execute unexpectedly and should have been setscened" errors indicate this may be caused by missing sstate artifacts that were likely produced in earlier builds, but have been subsequently deleted for some reason.\n'
- bb.fatal(msg)
- finally:
- os.rename(temp_sdkbasepath, sdkbasepath)
+ oe.copy_buildsystem.check_sstate_task_list(d, get_sdk_install_targets(d), tasklistfile, cmdprefix=cmdprefix, cwd=temp_sdkbasepath, logfile=logfile)
+ except bb.process.ExecutionError as e:
+ msg = 'Failed to generate filtered task list for extensible SDK:\n%s' % e.stdout.rstrip()
+ if 'attempted to execute unexpectedly and should have been setscened' in e.stdout:
+ msg += '\n----------\n\nNOTE: "attempted to execute unexpectedly and should have been setscened" errors indicate this may be caused by missing sstate artifacts that were likely produced in earlier builds, but have been subsequently deleted for some reason.\n'
+ bb.fatal(msg)
+ os.rename(temp_sdkbasepath, sdkbasepath)
# Clean out residue of running bitbake, which check_sstate_task_list()
# will effectively do
clean_esdk_builddir(d, sdkbasepath)
@@ -535,7 +533,7 @@
install_tools() {
install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}
- scripts="devtool recipetool oe-find-native-sysroot runqemu*"
+ scripts="devtool recipetool oe-find-native-sysroot runqemu* wic"
for script in $scripts; do
for scriptfn in `find ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath} -maxdepth 1 -executable -name "$script"`; do
lnr ${scriptfn} ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/`basename $scriptfn`
@@ -724,6 +722,6 @@
do_populate_sdk_ext[cleandirs] = "${SDKEXTDEPLOYDIR}"
do_populate_sdk_ext[sstate-inputdirs] = "${SDKEXTDEPLOYDIR}"
do_populate_sdk_ext[sstate-outputdirs] = "${SDK_DEPLOY}"
-do_populate_sdk_ext[stamp-extra-info] = "${MACHINE}"
+do_populate_sdk_ext[stamp-extra-info] = "${MACHINE_ARCH}"
addtask populate_sdk_ext after do_sdk_depends
diff --git a/import-layers/yocto-poky/meta/classes/ptest-perl.bbclass b/import-layers/yocto-poky/meta/classes/ptest-perl.bbclass
new file mode 100644
index 0000000..a4bc40b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/ptest-perl.bbclass
@@ -0,0 +1,30 @@
+inherit ptest
+
+FILESEXTRAPATHS_prepend := "${COREBASE}/meta/files:"
+
+SRC_URI += "file://ptest-perl/run-ptest"
+
+do_install_ptest_perl() {
+ install -d ${D}${PTEST_PATH}
+ if [ ! -f ${D}${PTEST_PATH}/run-ptest ]; then
+ install -m 0755 ${WORKDIR}/ptest-perl/run-ptest ${D}${PTEST_PATH}
+ fi
+ cp -r ${B}/t ${D}${PTEST_PATH}
+ chown -R root:root ${D}${PTEST_PATH}
+}
+
+FILES_${PN}-ptest_prepend = "${PTEST_PATH}/t/* ${PTEST_PATH}/run-ptest "
+
+RDEPENDS_${PN}-ptest_prepend = "perl "
+
+addtask install_ptest_perl after do_install_ptest_base before do_package
+
+python () {
+ if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
+ d.setVarFlag('do_install_ptest_perl', 'fakeroot', '1')
+
+ # Remove all '*ptest_perl' tasks when ptest is not enabled
+ if not(d.getVar('PTEST_ENABLED') == "1"):
+ for i in ['do_install_ptest_perl']:
+ bb.build.deltask(i, d)
+}
diff --git a/import-layers/yocto-poky/meta/classes/reproducible_build.bbclass b/import-layers/yocto-poky/meta/classes/reproducible_build.bbclass
new file mode 100644
index 0000000..2df8053
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/reproducible_build.bbclass
@@ -0,0 +1,150 @@
+#
+# reproducible_build.bbclass
+#
+# This bbclass is mainly responsible to determine SOURCE_DATE_EPOCH on a per recipe base.
+# We need to set a recipe specific SOURCE_DATE_EPOCH in each recipe environment for various tasks.
+# One way would be to modify all recipes one-by-one to specify SOURCE_DATE_EPOCH explicitly,
+# but that is not realistic as there are hundreds (probably thousands) of recipes in various meta-layers.
+# Therefore we do it this class.
+# After sources are unpacked but before they are patched, we try to determine the value for SOURCE_DATE_EPOCH.
+#
+# There are 4 ways to determine SOURCE_DATE_EPOCH:
+#
+# 1. Use value from __source_date_epoch.txt file if this file exists.
+# This file was most likely created in the previous build by one of the following methods 2,3,4.
+# In principle, it could actually provided by a recipe via SRC_URI
+#
+# If the file does not exist, first try to determine the value for SOURCE_DATE_EPOCH:
+#
+# 2. If we detected a folder .git, use .git last commit date timestamp, as git does not allow checking out
+# files and preserving their timestamps.
+#
+# 3. Use the mtime of "known" files such as NEWS, CHANGLELOG, ...
+# This will work fine for any well kept repository distributed via tarballs.
+#
+# 4. If the above steps fail, we need to check all package source files and use the youngest file of the source tree.
+#
+# Once the value of SOURCE_DATE_EPOCH is determined, it is stored in the recipe ${WORKDIR}/source_date_epoch folder
+# in a text file "__source_date_epoch.txt'. If this file is found by other recipe task, the value is exported in
+# the SOURCE_DATE_EPOCH variable in the task environment. This is done in an anonymous python function,
+# so SOURCE_DATE_EPOCH is guaranteed to exist for all tasks the may use it (do_configure, do_compile, do_package, ...)
+
+BUILD_REPRODUCIBLE_BINARIES ??= '1'
+inherit ${@oe.utils.ifelse(d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1', 'reproducible_build_simple', '')}
+
+SDE_DIR ="${WORKDIR}/source-date-epoch"
+SDE_FILE = "${SDE_DIR}/__source_date_epoch.txt"
+
+SSTATETASKS += "do_deploy_source_date_epoch"
+
+do_deploy_source_date_epoch () {
+ echo "Deploying SDE to ${SDE_DIR}."
+}
+
+python do_deploy_source_date_epoch_setscene () {
+ sstate_setscene(d)
+}
+
+do_deploy_source_date_epoch[dirs] = "${SDE_DIR}"
+do_deploy_source_date_epoch[sstate-plaindirs] = "${SDE_DIR}"
+addtask do_deploy_source_date_epoch_setscene
+addtask do_deploy_source_date_epoch before do_configure after do_patch
+
+def get_source_date_epoch_known_files(d, path):
+ source_date_epoch = 0
+ known_files = set(["NEWS", "ChangeLog", "Changelog", "CHANGES"])
+ for file in known_files:
+ filepath = os.path.join(path,file)
+ if os.path.isfile(filepath):
+ mtime = int(os.path.getmtime(filepath))
+ # There may be more than one "known_file" present, if so, use the youngest one
+ if mtime > source_date_epoch:
+ source_date_epoch = mtime
+ return source_date_epoch
+
+def find_git_folder(path):
+ exclude = set(["temp", "license-destdir", "patches", "recipe-sysroot-native", "recipe-sysroot", "pseudo", "build", "image", "sysroot-destdir"])
+ for root, dirs, files in os.walk(path, topdown=True):
+ dirs[:] = [d for d in dirs if d not in exclude]
+ if '.git' in dirs:
+ #bb.warn("found root:%s" % (str(root)))
+ return root
+
+def get_source_date_epoch_git(d, path):
+ source_date_epoch = 0
+ if "git://" in d.getVar('SRC_URI'):
+ gitpath = find_git_folder(d.getVar('WORKDIR'))
+ if gitpath != None:
+ import subprocess
+ if os.path.isdir(os.path.join(gitpath,".git")):
+ try:
+ source_date_epoch = int(subprocess.check_output(['git','log','-1','--pretty=%ct'], cwd=path))
+ #bb.warn("JB *** gitpath:%s sde: %d" % (gitpath,source_date_epoch))
+ bb.debug(1, "git repo path:%s sde: %d" % (gitpath,source_date_epoch))
+ except subprocess.CalledProcessError as grepexc:
+ #bb.warn( "Expected git repository not found, (path: %s) error:%d" % (gitpath, grepexc.returncode))
+ bb.debug(1, "Expected git repository not found, (path: %s) error:%d" % (gitpath, grepexc.returncode))
+ else:
+ bb.warn("Failed to find a git repository for path:%s" % (path))
+ return source_date_epoch
+
+python do_create_source_date_epoch_stamp() {
+ path = d.getVar('S')
+ if not os.path.isdir(path):
+ bb.warn("Unable to determine source_date_epoch! path:%s" % path)
+ return
+
+ epochfile = d.getVar('SDE_FILE')
+ if os.path.isfile(epochfile):
+ bb.debug(1, " path: %s reusing __source_date_epoch.txt" % epochfile)
+ return
+
+ # Try to detect/find a git repository
+ source_date_epoch = get_source_date_epoch_git(d, path)
+ if source_date_epoch == 0:
+ source_date_epoch = get_source_date_epoch_known_files(d, path)
+ if source_date_epoch == 0:
+ # Do it the hard way: check all files and find the youngest one...
+ filename_dbg = None
+ exclude = set(["temp", "license-destdir", "patches", "recipe-sysroot-native", "recipe-sysroot", "pseudo", "build", "image", "sysroot-destdir"])
+ for root, dirs, files in os.walk(path, topdown=True):
+ files = [f for f in files if not f[0] == '.']
+ dirs[:] = [d for d in dirs if d not in exclude]
+
+ for fname in files:
+ filename = os.path.join(root, fname)
+ try:
+ mtime = int(os.path.getmtime(filename))
+ except ValueError:
+ mtime = 0
+ if mtime > source_date_epoch:
+ source_date_epoch = mtime
+ filename_dbg = filename
+
+ if filename_dbg != None:
+ bb.debug(1," SOURCE_DATE_EPOCH %d derived from: %s" % (source_date_epoch, filename_dbg))
+
+ if source_date_epoch == 0:
+ # empty folder, not a single file ...
+ # kernel source do_unpack is special cased
+ if not bb.data.inherits_class('kernel', d):
+ bb.debug(1, "Unable to determine source_date_epoch! path:%s" % path)
+
+ bb.utils.mkdirhier(d.getVar('SDE_DIR'))
+ with open(epochfile, 'w') as f:
+ f.write(str(source_date_epoch))
+}
+
+BB_HASHBASE_WHITELIST += "SOURCE_DATE_EPOCH"
+
+python () {
+ if d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1':
+ d.appendVarFlag("do_unpack", "postfuncs", " do_create_source_date_epoch_stamp")
+ epochfile = d.getVar('SDE_FILE')
+ source_date_epoch = "0"
+ if os.path.isfile(epochfile):
+ with open(epochfile, 'r') as f:
+ source_date_epoch = f.read()
+ bb.debug(1, "source_date_epoch stamp found ---> stamp %s" % source_date_epoch)
+ d.setVar('SOURCE_DATE_EPOCH', source_date_epoch)
+}
diff --git a/import-layers/yocto-poky/meta/classes/reproducible_build_simple.bbclass b/import-layers/yocto-poky/meta/classes/reproducible_build_simple.bbclass
new file mode 100644
index 0000000..8a60dee
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/reproducible_build_simple.bbclass
@@ -0,0 +1,10 @@
+# Setup default environment for reproducible builds.
+
+BUILD_REPRODUCIBLE_BINARIES = "1"
+
+export PYTHONHASHSEED = "0"
+export PERL_HASH_SEED = "0"
+export SOURCE_DATE_EPOCH ??= "1520598896"
+
+REPRODUCIBLE_TIMESTAMP_ROOTFS ??= "1520598896"
+
diff --git a/import-layers/yocto-poky/meta/classes/rootfs-postcommands.bbclass b/import-layers/yocto-poky/meta/classes/rootfs-postcommands.bbclass
index a4e627f..5522209 100644
--- a/import-layers/yocto-poky/meta/classes/rootfs-postcommands.bbclass
+++ b/import-layers/yocto-poky/meta/classes/rootfs-postcommands.bbclass
@@ -56,6 +56,7 @@
SORT_PASSWD_POSTPROCESS_COMMAND ??= " sort_passwd; "
python () {
d.appendVar('ROOTFS_POSTPROCESS_COMMAND', '${SORT_PASSWD_POSTPROCESS_COMMAND}')
+ d.appendVar('ROOTFS_POSTPROCESS_COMMAND', 'rootfs_reproducible;')
}
systemd_create_users () {
@@ -256,10 +257,17 @@
os.symlink(os.path.basename(manifest_name), manifest_link)
}
-# Can be use to create /etc/timestamp during image construction to give a reasonably
+# Can be used to create /etc/timestamp during image construction to give a reasonably
# sane default time setting
rootfs_update_timestamp () {
- date -u +%4Y%2m%2d%2H%2M%2S >${IMAGE_ROOTFS}/etc/timestamp
+ if [ "${REPRODUCIBLE_TIMESTAMP_ROOTFS}" != "" ]; then
+ # Convert UTC into %4Y%2m%2d%2H%2M%2S
+ sformatted=`date -u -d @${REPRODUCIBLE_TIMESTAMP_ROOTFS} +%4Y%2m%2d%2H%2M%2S`
+ else
+ sformatted=`date -u +%4Y%2m%2d%2H%2M%2S`
+ fi
+ echo $sformatted > ${IMAGE_ROOTFS}/etc/timestamp
+ bbnote "rootfs_update_timestamp: set /etc/timestamp to $sformatted"
}
# Prevent X from being started
@@ -328,3 +336,16 @@
if 'unsatisfied recommendation for' in line:
bb.warn('[log_check] %s: %s' % (d.getVar('PN'), line))
}
+
+# Perform any additional adjustments needed to make rootf binary reproducible
+rootfs_reproducible () {
+ if [ "${REPRODUCIBLE_TIMESTAMP_ROOTFS}" != "" ]; then
+ # Convert UTC into %4Y%2m%2d%2H%2M%2S
+ sformatted=`date -u -d @${REPRODUCIBLE_TIMESTAMP_ROOTFS} +%4Y%2m%2d%2H%2M%2S`
+ echo $sformatted > ${IMAGE_ROOTFS}/etc/version
+ bbnote "rootfs_reproducible: set /etc/version to $sformatted"
+
+ find ${IMAGE_ROOTFS}/etc/gconf -name '%gconf.xml' -print0 | xargs -0r \
+ sed -i -e 's@\bmtime="[0-9][0-9]*"@mtime="'${REPRODUCIBLE_TIMESTAMP_ROOTFS}'"@g'
+ fi
+}
diff --git a/import-layers/yocto-poky/meta/classes/sanity.bbclass b/import-layers/yocto-poky/meta/classes/sanity.bbclass
index 1feb794..e0e57ce 100644
--- a/import-layers/yocto-poky/meta/classes/sanity.bbclass
+++ b/import-layers/yocto-poky/meta/classes/sanity.bbclass
@@ -336,7 +336,7 @@
return ""
def get_filesystem_id(path):
- status, result = oe.utils.getstatusoutput("stat -f -c '%s' %s" % ("%t", path))
+ status, result = oe.utils.getstatusoutput("stat -f -c '%s' '%s'" % ("%t", path))
if status == 0:
return result
else:
@@ -456,13 +456,29 @@
return messages
+# Patch before 2.7 can't handle all the features in git-style diffs. Some
+# patches may incorrectly apply, and others won't apply at all.
+def check_patch_version(sanity_data):
+ from distutils.version import LooseVersion
+ import re, subprocess
+
+ try:
+ result = subprocess.check_output(["patch", "--version"], stderr=subprocess.STDOUT, universal_newlines=True)
+ version = re.search(r"[0-9.]+", result.splitlines()[0]).group()
+ if LooseVersion(version) < LooseVersion("2.7"):
+ return "Your version of patch is older than 2.7 and has bugs which will break builds. Please install a newer version of patch.\n"
+ else:
+ return None
+ except subprocess.CalledProcessError as e:
+ return "Unable to execute patch --version, exit code %d:\n%s\n" % (e.returncode, e.output)
+
# Unpatched versions of make 3.82 are known to be broken. See GNU Savannah Bug 30612.
# Use a modified reproducer from http://savannah.gnu.org/bugs/?30612 to validate.
def check_make_version(sanity_data):
from distutils.version import LooseVersion
status, result = oe.utils.getstatusoutput("make --version")
if status != 0:
- return "Unable to execute make --version, exit code %s\n" % status
+ return "Unable to execute make --version, exit code %d\n" % status
version = result.split()[2]
if LooseVersion(version) == LooseVersion("3.82"):
# Construct a test file
@@ -498,7 +514,7 @@
from distutils.version import LooseVersion
status, result = oe.utils.getstatusoutput("tar --version")
if status != 0:
- return "Unable to execute tar --version, exit code %s\n" % status
+ return "Unable to execute tar --version, exit code %d\n" % status
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"
@@ -511,7 +527,7 @@
from distutils.version import LooseVersion
status, result = oe.utils.getstatusoutput("git --version 2> /dev/null")
if status != 0:
- return "Unable to execute git --version, exit code %s\n" % status
+ return "Unable to execute git --version, exit code %d\n" % status
version = result.split()[2]
if LooseVersion(version) < LooseVersion("1.8.3.1"):
return "Your version of git is older than 1.8.3.1 and has bugs which will break builds. Please install a newer version of git.\n"
@@ -596,6 +612,7 @@
import stat
status.addresult(check_make_version(d))
+ status.addresult(check_patch_version(d))
status.addresult(check_tar_version(d))
status.addresult(check_git_version(d))
status.addresult(check_perl_modules(d))
@@ -692,7 +709,7 @@
try:
locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
except locale.Error:
- raise_sanity_error("You system needs to support the en_US.UTF-8 locale.", d)
+ raise_sanity_error("Your system needs to support the en_US.UTF-8 locale.", d)
def check_sanity_everybuild(status, d):
import os, stat
diff --git a/import-layers/yocto-poky/meta/classes/sign_package_feed.bbclass b/import-layers/yocto-poky/meta/classes/sign_package_feed.bbclass
index f03c480..7ff3a35 100644
--- a/import-layers/yocto-poky/meta/classes/sign_package_feed.bbclass
+++ b/import-layers/yocto-poky/meta/classes/sign_package_feed.bbclass
@@ -43,4 +43,4 @@
}
do_package_index[depends] += "signing-keys:do_deploy"
-do_rootfs[depends] += "signing-keys:do_populate_sysroot"
+do_rootfs[depends] += "signing-keys:do_populate_sysroot gnupg-native:do_populate_sysroot"
diff --git a/import-layers/yocto-poky/meta/classes/sign_rpm.bbclass b/import-layers/yocto-poky/meta/classes/sign_rpm.bbclass
index 4961b03..64ae7ce 100644
--- a/import-layers/yocto-poky/meta/classes/sign_rpm.bbclass
+++ b/import-layers/yocto-poky/meta/classes/sign_rpm.bbclass
@@ -68,8 +68,4 @@
do_package_index[depends] += "signing-keys:do_deploy"
do_rootfs[depends] += "signing-keys:do_populate_sysroot"
-# Newer versions of gpg (at least 2.1.5 and 2.2.1) have issues when signing occurs in parallel
-# so unfortunately the signing must be done serially. Once the upstream problem is fixed,
-# the following line must be removed otherwise we loose all the intrinsic parallelism from
-# bitbake. For more information, check https://bugzilla.yoctoproject.org/show_bug.cgi?id=12022.
-do_package_write_rpm[lockfiles] += "${TMPDIR}/gpg.lock"
+PACKAGE_WRITE_DEPS += "gnupg-native"
diff --git a/import-layers/yocto-poky/meta/classes/siteinfo.bbclass b/import-layers/yocto-poky/meta/classes/siteinfo.bbclass
index 1aada40..86bb853 100644
--- a/import-layers/yocto-poky/meta/classes/siteinfo.bbclass
+++ b/import-layers/yocto-poky/meta/classes/siteinfo.bbclass
@@ -47,6 +47,8 @@
"ppc": "endian-big bit-32 powerpc-common",
"ppc64": "endian-big bit-64 powerpc-common",
"ppc64le" : "endian-little bit-64 powerpc-common",
+ "riscv32": "endian-little bit-32 riscv-common",
+ "riscv64": "endian-little bit-64 riscv-common",
"sh3": "endian-little bit-32 sh-common",
"sh4": "endian-little bit-32 sh-common",
"sparc": "endian-big bit-32",
@@ -58,6 +60,7 @@
"darwin9": "common-darwin",
"linux": "common-linux common-glibc",
"linux-gnu": "common-linux common-glibc",
+ "linux-gnu_ilp32": "common-linux common-glibc",
"linux-gnux32": "common-linux common-glibc",
"linux-gnun32": "common-linux common-glibc",
"linux-gnueabi": "common-linux common-glibc",
@@ -73,12 +76,18 @@
targetinfo = {
"aarch64-linux-gnu": "aarch64-linux",
"aarch64_be-linux-gnu": "aarch64_be-linux",
+ "aarch64-linux-gnu_ilp32": "bit-32 aarch64_be-linux arm-32",
+ "aarch64_be-linux-gnu_ilp32": "bit-32 aarch64_be-linux arm-32",
"aarch64-linux-musl": "aarch64-linux",
"aarch64_be-linux-musl": "aarch64_be-linux",
"arm-linux-gnueabi": "arm-linux",
"arm-linux-musleabi": "arm-linux",
"armeb-linux-gnueabi": "armeb-linux",
"armeb-linux-musleabi": "armeb-linux",
+ "microblazeeb-linux" : "microblaze-linux",
+ "microblazeeb-linux-musl" : "microblaze-linux",
+ "microblazeel-linux" : "microblaze-linux",
+ "microblazeel-linux-musl" : "microblaze-linux",
"mips-linux-musl": "mips-linux",
"mipsel-linux-musl": "mipsel-linux",
"mips64-linux-musl": "mips64-linux",
@@ -95,6 +104,10 @@
"powerpc64-linux-muslspe": "powerpc-linux powerpc64-linux",
"powerpc64-linux": "powerpc-linux",
"powerpc64-linux-musl": "powerpc-linux",
+ "riscv32-linux": "riscv32-linux",
+ "riscv32-linux-musl": "riscv32-linux",
+ "riscv64-linux": "riscv64-linux",
+ "riscv64-linux-musl": "riscv64-linux",
"x86_64-cygwin": "bit-64",
"x86_64-darwin": "bit-64",
"x86_64-darwin9": "bit-64",
diff --git a/import-layers/yocto-poky/meta/classes/sstate.bbclass b/import-layers/yocto-poky/meta/classes/sstate.bbclass
index e30fbe1..0b28850 100644
--- a/import-layers/yocto-poky/meta/classes/sstate.bbclass
+++ b/import-layers/yocto-poky/meta/classes/sstate.bbclass
@@ -28,6 +28,9 @@
SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_RPM}/noarch/"
# Avoid docbook/sgml catalog warnings for now
SSTATE_DUPWHITELIST += "${STAGING_ETCDIR_NATIVE}/sgml ${STAGING_DATADIR_NATIVE}/sgml"
+# sdk-provides-dummy-nativesdk and nativesdk-buildtools-perl-dummy overlap for different SDKMACHINE
+SSTATE_DUPWHITELIST += "${DEPLOY_DIR_RPM}/sdk_provides_dummy_nativesdk/ ${DEPLOY_DIR_IPK}/sdk-provides-dummy-nativesdk/"
+SSTATE_DUPWHITELIST += "${DEPLOY_DIR_RPM}/buildtools_dummy_nativesdk/ ${DEPLOY_DIR_IPK}/buildtools-dummy-nativesdk/"
# Archive the sources for many architectures in one deploy folder
SSTATE_DUPWHITELIST += "${DEPLOY_DIR_SRC}"
@@ -45,7 +48,8 @@
${SDK_ARCH}_${PACKAGE_ARCH} \
allarch \
${PACKAGE_ARCH} \
- ${MACHINE}"
+ ${PACKAGE_EXTRA_ARCHS} \
+ ${MACHINE_ARCH}"
SSTATE_MANMACH ?= "${SSTATE_PKGARCH}"
@@ -538,15 +542,15 @@
staging_host = d.getVar('RECIPE_SYSROOT_NATIVE')
sstate_builddir = d.getVar('SSTATE_BUILDDIR')
+ sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % staging_host
if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross-canadian', d):
sstate_grep_cmd = "grep -l -e '%s'" % (staging_host)
- sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % (staging_host)
elif bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d):
sstate_grep_cmd = "grep -l -e '%s' -e '%s'" % (staging_target, staging_host)
- sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRTARGET:g; s:%s:FIXMESTAGINGDIRHOST:g'" % (staging_target, staging_host)
+ sstate_sed_cmd += " -e 's:%s:FIXMESTAGINGDIRTARGET:g'" % staging_target
else:
- sstate_grep_cmd = "grep -l -e '%s'" % (staging_target)
- sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRTARGET:g'" % (staging_target)
+ sstate_grep_cmd = "grep -l -e '%s' -e '%s'" % (staging_target, staging_host)
+ sstate_sed_cmd += " -e 's:%s:FIXMESTAGINGDIRTARGET:g'" % staging_target
extra_staging_fixmes = d.getVar('EXTRA_STAGING_FIXMES') or ''
for fixmevar in extra_staging_fixmes.split():
@@ -845,7 +849,7 @@
missed.append(task)
bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri)
pass
- bb.event.fire(bb.event.ProcessProgress("Checking sstate mirror object availability", len(tasklist) - thread_worker.tasks.qsize()), d)
+ bb.event.fire(bb.event.ProcessProgress(msg, len(tasklist) - thread_worker.tasks.qsize()), d)
tasklist = []
for task in range(len(sq_fn)):
@@ -856,7 +860,8 @@
tasklist.append((task, sstatefile))
if tasklist:
- bb.event.fire(bb.event.ProcessStarted("Checking sstate mirror object availability", len(tasklist)), d)
+ msg = "Checking sstate mirror object availability"
+ bb.event.fire(bb.event.ProcessStarted(msg, len(tasklist)), d)
import multiprocessing
nproc = min(multiprocessing.cpu_count(), len(tasklist))
@@ -870,7 +875,7 @@
pool.wait_completion()
bb.event.disable_threadlock()
- bb.event.fire(bb.event.ProcessFinished("Checking sstate mirror object availability"), d)
+ bb.event.fire(bb.event.ProcessFinished(msg), d)
inheritlist = d.getVar("INHERIT")
if "toaster" in inheritlist:
@@ -1022,7 +1027,7 @@
with open(preservestampfile, 'r') as f:
preservestamps = f.readlines()
seen = []
- for a in d.getVar("SSTATE_ARCHS").split():
+ for a in sorted(list(set(d.getVar("SSTATE_ARCHS").split()))):
toremove = []
i = d.expand("${SSTATE_MANIFESTS}/index-" + a)
if not os.path.exists(i):
@@ -1038,18 +1043,25 @@
seen.append(stamp)
if toremove:
- bb.note("There are %d recipes to be removed from sysroot %s, removing..." % (len(toremove), a))
+ msg = "Removing %d recipes from the %s sysroot" % (len(toremove), a)
+ bb.event.fire(bb.event.ProcessStarted(msg, len(toremove)), d)
- for r in toremove:
- (stamp, manifest, workdir) = r.split()
- for m in glob.glob(manifest + ".*"):
- if m.endswith(".postrm"):
- continue
- sstate_clean_manifest(m, d)
- bb.utils.remove(stamp + "*")
- if removeworkdir:
- bb.utils.remove(workdir, recurse = True)
- lines.remove(r)
+ removed = 0
+ for r in toremove:
+ (stamp, manifest, workdir) = r.split()
+ for m in glob.glob(manifest + ".*"):
+ if m.endswith(".postrm"):
+ continue
+ sstate_clean_manifest(m, d)
+ bb.utils.remove(stamp + "*")
+ if removeworkdir:
+ bb.utils.remove(workdir, recurse = True)
+ lines.remove(r)
+ removed = removed + 1
+ bb.event.fire(bb.event.ProcessProgress(msg, removed), d)
+
+ bb.event.fire(bb.event.ProcessFinished(msg), d)
+
with open(i, "w") as f:
for l in lines:
f.write(l)
diff --git a/import-layers/yocto-poky/meta/classes/staging.bbclass b/import-layers/yocto-poky/meta/classes/staging.bbclass
index c479bd9..3fcbc9f 100644
--- a/import-layers/yocto-poky/meta/classes/staging.bbclass
+++ b/import-layers/yocto-poky/meta/classes/staging.bbclass
@@ -171,7 +171,7 @@
fixme_path = d.getVar(fixmevar)
cmd += " -e 's:FIXME_%s:%s:g'" % (fixmevar, fixme_path)
bb.debug(2, cmd)
- subprocess.check_output(cmd, shell=True)
+ subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
def staging_populate_sysroot_dir(targetsysroot, nativesysroot, native, d):
@@ -228,7 +228,7 @@
staging_processfixme(fixme, targetdir, targetsysroot, nativesysroot, d)
for p in postinsts:
- subprocess.check_output(p, shell=True)
+ subprocess.check_output(p, shell=True, stderr=subprocess.STDOUT)
#
# Manifests here are complicated. The main sysroot area has the unpacked sstate
@@ -470,40 +470,14 @@
os.symlink(c + "." + taskhash, depdir + "/" + c)
- d2 = d
- destsysroot = recipesysroot
- variant = ''
- if setscenedeps[dep][2].startswith("virtual:multilib"):
- variant = setscenedeps[dep][2].split(":")[2]
- if variant != current_variant:
- if variant not in multilibs:
- multilibs[variant] = get_multilib_datastore(variant, d)
- d2 = multilibs[variant]
- destsysroot = d2.getVar("RECIPE_SYSROOT")
+ manifest, d2 = oe.sstatesig.find_sstate_manifest(c, setscenedeps[dep][2], "populate_sysroot", d, multilibs)
+ destsysroot = d2.getVar("RECIPE_SYSROOT")
native = False
- if c.endswith("-native"):
- manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}-%s.populate_sysroot" % c)
+ if c.endswith("-native") or "-cross-" in c or "-crosssdk" in c:
native = True
- elif c.startswith("nativesdk-"):
- manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${SDK_ARCH}_${SDK_OS}-%s.populate_sysroot" % c)
- elif "-cross-" in c:
- manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}_${TARGET_ARCH}-%s.populate_sysroot" % c)
- native = True
- elif "-crosssdk" in c:
- manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}-%s.populate_sysroot" % c)
- native = True
- else:
- pkgarchs = ['${MACHINE_ARCH}']
- pkgarchs = pkgarchs + list(reversed(d2.getVar("PACKAGE_EXTRA_ARCHS").split()))
- pkgarchs.append('allarch')
- for pkgarch in pkgarchs:
- manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-%s-%s.populate_sysroot" % (pkgarch, c))
- if os.path.exists(manifest):
- break
- if not os.path.exists(manifest):
- bb.warn("Manifest %s not found?" % manifest)
- else:
+
+ if manifest:
newmanifest = collections.OrderedDict()
if native:
fm = fixme['native']
@@ -576,7 +550,7 @@
staging_processfixme(fixme[f], multilibs[f].getVar("RECIPE_SYSROOT"), recipesysroot, recipesysrootnative, d)
for p in postinsts:
- subprocess.check_output(p, shell=True)
+ subprocess.check_output(p, shell=True, stderr=subprocess.STDOUT)
for dep in manifests:
c = setscenedeps[dep][0]
diff --git a/import-layers/yocto-poky/meta/classes/syslinux.bbclass b/import-layers/yocto-poky/meta/classes/syslinux.bbclass
index d6f8824..031dacb 100644
--- a/import-layers/yocto-poky/meta/classes/syslinux.bbclass
+++ b/import-layers/yocto-poky/meta/classes/syslinux.bbclass
@@ -173,8 +173,9 @@
if not root:
bb.fatal('SYSLINUX_ROOT not defined')
+ kernel = localdata.getVar('KERNEL_IMAGETYPE')
for btype in btypes:
- cfgfile.write('LABEL %s%s\nKERNEL /vmlinuz\n' % (btype[0], label))
+ cfgfile.write('LABEL %s%s\nKERNEL /%s\n' % (btype[0], label, kernel))
exargs = d.getVar('SYSLINUX_KERNEL_ARGS')
if exargs:
diff --git a/import-layers/yocto-poky/meta/classes/systemd-boot-cfg.bbclass b/import-layers/yocto-poky/meta/classes/systemd-boot-cfg.bbclass
new file mode 100644
index 0000000..021c9f9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/systemd-boot-cfg.bbclass
@@ -0,0 +1,68 @@
+SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
+SYSTEMD_BOOT_ENTRIES ?= ""
+SYSTEMD_BOOT_TIMEOUT ?= "10"
+
+# Need UUID utility code.
+inherit fs-uuid
+
+python build_efi_cfg() {
+ s = d.getVar("S")
+ labels = d.getVar('LABELS')
+ if not labels:
+ bb.debug(1, "LABELS not defined, nothing to do")
+ return
+
+ if labels == []:
+ bb.debug(1, "No labels, nothing to do")
+ return
+
+ cfile = d.getVar('SYSTEMD_BOOT_CFG')
+ cdir = os.path.dirname(cfile)
+ if not os.path.exists(cdir):
+ os.makedirs(cdir)
+ try:
+ cfgfile = open(cfile, 'w')
+ except OSError:
+ bb.fatal('Unable to open %s' % cfile)
+
+ cfgfile.write('# Automatically created by OE\n')
+ cfgfile.write('default %s\n' % (labels.split()[0]))
+ timeout = d.getVar('SYSTEMD_BOOT_TIMEOUT')
+ if timeout:
+ cfgfile.write('timeout %s\n' % timeout)
+ else:
+ cfgfile.write('timeout 10\n')
+ cfgfile.close()
+
+ for label in labels.split():
+ localdata = d.createCopy()
+
+ entryfile = "%s/%s.conf" % (s, label)
+ if not os.path.exists(s):
+ os.makedirs(s)
+ d.appendVar("SYSTEMD_BOOT_ENTRIES", " " + entryfile)
+ try:
+ entrycfg = open(entryfile, "w")
+ except OSError:
+ bb.fatal('Unable to open %s' % entryfile)
+
+ entrycfg.write('title %s\n' % label)
+
+ kernel = localdata.getVar("KERNEL_IMAGETYPE")
+ entrycfg.write('linux /%s\n' % kernel)
+
+ append = localdata.getVar('APPEND')
+ initrd = localdata.getVar('INITRD')
+
+ if initrd:
+ entrycfg.write('initrd /initrd\n')
+ lb = label
+ if label == "install":
+ lb = "install-efi"
+ entrycfg.write('options LABEL=%s ' % lb)
+ if append:
+ append = replace_rootfs_uuid(d, append)
+ entrycfg.write('%s' % append)
+ entrycfg.write('\n')
+ entrycfg.close()
+}
diff --git a/import-layers/yocto-poky/meta/classes/systemd-boot.bbclass b/import-layers/yocto-poky/meta/classes/systemd-boot.bbclass
index 9373070..3cd6811 100644
--- a/import-layers/yocto-poky/meta/classes/systemd-boot.bbclass
+++ b/import-layers/yocto-poky/meta/classes/systemd-boot.bbclass
@@ -12,11 +12,6 @@
do_bootimg[depends] += "${MLPREFIX}systemd-boot:do_deploy"
EFIDIR = "/EFI/BOOT"
-
-SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
-SYSTEMD_BOOT_ENTRIES ?= ""
-SYSTEMD_BOOT_TIMEOUT ?= "10"
-
# Need UUID utility code.
inherit fs-uuid
@@ -50,7 +45,7 @@
mkdir -p ${EFIIMGDIR}/${EFIDIR}
cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
cp -r $iso_dir/loader ${EFIIMGDIR}
- cp $iso_dir/vmlinuz ${EFIIMGDIR}
+ cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR}
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
echo "fs0:${EFIPATH}\\${DEST_EFI_IMAGE}" > ${EFIIMGDIR}/startup.nsh
if [ -f "$iso_dir/initrd" ] ; then
@@ -62,67 +57,4 @@
efi_populate $1
}
-python build_efi_cfg() {
- s = d.getVar("S")
- labels = d.getVar('LABELS')
- if not labels:
- bb.debug(1, "LABELS not defined, nothing to do")
- return
-
- if labels == []:
- bb.debug(1, "No labels, nothing to do")
- return
-
- cfile = d.getVar('SYSTEMD_BOOT_CFG')
- cdir = os.path.dirname(cfile)
- if not os.path.exists(cdir):
- os.makedirs(cdir)
- try:
- cfgfile = open(cfile, 'w')
- except OSError:
- bb.fatal('Unable to open %s' % cfile)
-
- cfgfile.write('# Automatically created by OE\n')
- cfgfile.write('default %s\n' % (labels.split()[0]))
- timeout = d.getVar('SYSTEMD_BOOT_TIMEOUT')
- if timeout:
- cfgfile.write('timeout %s\n' % timeout)
- else:
- cfgfile.write('timeout 10\n')
- cfgfile.close()
-
- for label in labels.split():
- localdata = d.createCopy()
-
- overrides = localdata.getVar('OVERRIDES')
- if not overrides:
- bb.fatal('OVERRIDES not defined')
-
- entryfile = "%s/%s.conf" % (s, label)
- if not os.path.exists(s):
- os.makedirs(s)
- d.appendVar("SYSTEMD_BOOT_ENTRIES", " " + entryfile)
- try:
- entrycfg = open(entryfile, "w")
- except OSError:
- bb.fatal('Unable to open %s' % entryfile)
- localdata.setVar('OVERRIDES', label + ':' + overrides)
-
- entrycfg.write('title %s\n' % label)
- entrycfg.write('linux /vmlinuz\n')
-
- append = localdata.getVar('APPEND')
- initrd = localdata.getVar('INITRD')
-
- if initrd:
- entrycfg.write('initrd /initrd\n')
- lb = label
- if label == "install":
- lb = "install-efi"
- entrycfg.write('options LABEL=%s ' % lb)
- if append:
- append = replace_rootfs_uuid(d, append)
- entrycfg.write('%s' % append)
- entrycfg.write('\n')
- entrycfg.close()
-}
+inherit systemd-boot-cfg
diff --git a/import-layers/yocto-poky/meta/classes/testimage.bbclass b/import-layers/yocto-poky/meta/classes/testimage.bbclass
index 45bb2bd..77291c2 100644
--- a/import-layers/yocto-poky/meta/classes/testimage.bbclass
+++ b/import-layers/yocto-poky/meta/classes/testimage.bbclass
@@ -44,20 +44,22 @@
DEFAULT_TEST_SUITES = "${MINTESTSUITE} auto"
DEFAULT_TEST_SUITES_pn-core-image-minimal = "${MINTESTSUITE}"
DEFAULT_TEST_SUITES_pn-core-image-minimal-dev = "${MINTESTSUITE}"
-DEFAULT_TEST_SUITES_pn-core-image-full-cmdline = "${NETTESTSUITE} perl python logrotate"
+DEFAULT_TEST_SUITES_pn-core-image-full-cmdline = "${NETTESTSUITE} perl python logrotate ptest"
DEFAULT_TEST_SUITES_pn-core-image-x11 = "${MINTESTSUITE}"
-DEFAULT_TEST_SUITES_pn-core-image-lsb = "${NETTESTSUITE} pam parselogs ${RPMTESTSUITE}"
+DEFAULT_TEST_SUITES_pn-core-image-lsb = "${NETTESTSUITE} pam parselogs ${RPMTESTSUITE} ptest"
DEFAULT_TEST_SUITES_pn-core-image-sato = "${NETTESTSUITE} connman xorg parselogs ${RPMTESTSUITE} \
- ${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python', '', d)}"
+ ${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python', '', d)} ptest gi"
DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "${NETTESTSUITE} buildcpio buildlzip buildgalculator \
- connman ${DEVTESTSUITE} logrotate perl parselogs python ${RPMTESTSUITE} xorg"
-DEFAULT_TEST_SUITES_pn-core-image-lsb-dev = "${NETTESTSUITE} pam perl python parselogs ${RPMTESTSUITE}"
+ connman ${DEVTESTSUITE} logrotate perl parselogs python ${RPMTESTSUITE} xorg ptest gi stap"
+DEFAULT_TEST_SUITES_pn-core-image-lsb-dev = "${NETTESTSUITE} pam perl python parselogs ${RPMTESTSUITE} ptest gi"
DEFAULT_TEST_SUITES_pn-core-image-lsb-sdk = "${NETTESTSUITE} buildcpio buildlzip buildgalculator \
- connman ${DEVTESTSUITE} logrotate pam parselogs perl python ${RPMTESTSUITE}"
+ connman ${DEVTESTSUITE} logrotate pam parselogs perl python ${RPMTESTSUITE} ptest gi stap"
DEFAULT_TEST_SUITES_pn-meta-toolchain = "auto"
# aarch64 has no graphics
DEFAULT_TEST_SUITES_remove_aarch64 = "xorg"
+# musl doesn't support systemtap
+DEFAULT_TEST_SUITES_remove_libc-musl = "stap"
# qemumips is quite slow and has reached the timeout limit several times on the YP build cluster,
# mitigate this by removing build tests for qemumips machines.
@@ -215,7 +217,7 @@
# Get use_kvm
qemu_use_kvm = d.getVar("QEMU_USE_KVM")
if qemu_use_kvm and \
- (qemu_use_kvm == 'True' and 'x86' in machine or \
+ (oe.types.boolean(qemu_use_kvm) and 'x86' in machine or \
d.getVar('MACHINE') in qemu_use_kvm.split()):
kvm = True
else:
diff --git a/import-layers/yocto-poky/meta/classes/testsdk.bbclass b/import-layers/yocto-poky/meta/classes/testsdk.bbclass
index 6b51a33..2e43343 100644
--- a/import-layers/yocto-poky/meta/classes/testsdk.bbclass
+++ b/import-layers/yocto-poky/meta/classes/testsdk.bbclass
@@ -156,10 +156,11 @@
with open(os.path.join(sdk_dir, 'conf', 'auto.conf'), 'a+') as f:
f.write('SSTATE_MIRRORS += " \\n file://.* file://%s/PATH"\n' % test_data.get('SSTATE_DIR'))
f.write('SOURCE_MIRROR_URL = "file://%s"\n' % test_data.get('DL_DIR'))
- f.write('INHERIT += "own-mirrors"')
+ f.write('INHERIT += "own-mirrors"\n')
# We need to do this in case we have a minimal SDK
- subprocess.check_output(". %s > /dev/null; devtool sdk-install meta-extsdk-toolchain" % sdk_env, cwd=sdk_dir, shell=True)
+ subprocess.check_output(". %s > /dev/null; devtool sdk-install meta-extsdk-toolchain" % \
+ sdk_env, cwd=sdk_dir, shell=True, stderr=subprocess.STDOUT)
tc = OESDKExtTestContext(td=test_data, logger=logger, sdk_dir=sdk_dir,
sdk_env=sdk_env, target_pkg_manifest=target_pkg_manifest,
diff --git a/import-layers/yocto-poky/meta/classes/toolchain-scripts.bbclass b/import-layers/yocto-poky/meta/classes/toolchain-scripts.bbclass
index 9bcfe70..71da5e5 100644
--- a/import-layers/yocto-poky/meta/classes/toolchain-scripts.bbclass
+++ b/import-layers/yocto-poky/meta/classes/toolchain-scripts.bbclass
@@ -62,7 +62,8 @@
script=${TMPDIR}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
rm -f $script
touch $script
- echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:${PATH}' >> $script
+ echo 'orig=`pwd`; cd ${COREBASE}; . ./oe-init-build-env ${TOPDIR}; cd $orig' >> $script
+ echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:${STAGING_BINDIR_TOOLCHAIN}:$PATH' >> $script
echo 'export PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR}' >> $script
echo 'export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}' >> $script
echo 'export CONFIG_SITE="${@siteinfo_get_files(d)}"' >> $script
@@ -116,6 +117,21 @@
EOF
}
+toolchain_create_post_relocate_script() {
+ script=$1
+ rm -f $script
+ touch $script
+
+ cat >> $script <<EOF
+if [ -d "${SDKPATHNATIVE}/post-relocate-setup.d/" ]; then
+ for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*.sh; do
+ \$s "\$1"
+ done
+ rm -rf "${SDKPATHNATIVE}/post-relocate-setup.d"
+fi
+EOF
+}
+
#we get the cached site config in the runtime
TOOLCHAIN_CONFIGSITE_NOCACHE = "${@siteinfo_get_files(d)}"
TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DIR}/${MLPREFIX}${MACHINE}/${target_datadir}/${TARGET_SYS}_config_site.d"
diff --git a/import-layers/yocto-poky/meta/classes/uboot-config.bbclass b/import-layers/yocto-poky/meta/classes/uboot-config.bbclass
index 533e175..89ff970 100644
--- a/import-layers/yocto-poky/meta/classes/uboot-config.bbclass
+++ b/import-layers/yocto-poky/meta/classes/uboot-config.bbclass
@@ -27,13 +27,13 @@
FILE = os.path.basename(d.getVar("FILE"))
bb.debug(1, "To build %s, see %s for instructions on \
setting up your machine config" % (PN, FILE))
- raise bb.parse.SkipPackage("Either UBOOT_MACHINE or UBOOT_CONFIG must be set in the %s machine configuration." % d.getVar("MACHINE"))
+ raise bb.parse.SkipRecipe("Either UBOOT_MACHINE or UBOOT_CONFIG must be set in the %s machine configuration." % d.getVar("MACHINE"))
if ubootmachine and ubootconfig:
- raise bb.parse.SkipPackage("You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.")
+ raise bb.parse.SkipRecipe("You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.")
if ubootconfigflags and ubootbinaries:
- raise bb.parse.SkipPackage("You cannot use UBOOT_BINARIES as it is internal to uboot_config.bbclass.")
+ raise bb.parse.SkipRecipe("You cannot use UBOOT_BINARIES as it is internal to uboot_config.bbclass.")
if len(ubootconfig) > 0:
for config in ubootconfig:
@@ -41,7 +41,7 @@
if config == f:
items = v.split(',')
if items[0] and len(items) > 3:
- raise bb.parse.SkipPackage('Only config,images,binary can be specified!')
+ raise bb.parse.SkipRecipe('Only config,images,binary can be specified!')
d.appendVar('UBOOT_MACHINE', ' ' + items[0])
# IMAGE_FSTYPES appending
if len(items) > 1 and items[1]:
diff --git a/import-layers/yocto-poky/meta/classes/uninative.bbclass b/import-layers/yocto-poky/meta/classes/uninative.bbclass
index 1723364..de2221a 100644
--- a/import-layers/yocto-poky/meta/classes/uninative.bbclass
+++ b/import-layers/yocto-poky/meta/classes/uninative.bbclass
@@ -8,6 +8,9 @@
#UNINATIVE_CHECKSUM[x86_64] = "dead"
UNINATIVE_DLDIR ?= "${DL_DIR}/uninative/"
+# Enabling uninative will change the following variables so they need to go the parsing white list to prevent multiple recipe parsing
+BB_HASHCONFIG_WHITELIST += "NATIVELSBSTRING SSTATEPOSTUNPACKFUNCS BUILD_LDFLAGS"
+
addhandler uninative_event_fetchloader
uninative_event_fetchloader[eventmask] = "bb.event.BuildStarted"
@@ -126,6 +129,9 @@
d.setVar("NATIVELSBSTRING", "universal%s" % oe.utils.host_gcc_version(d))
d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp")
d.appendVarFlag("SSTATEPOSTUNPACKFUNCS", "vardepvalueexclude", "| uninative_changeinterp")
+ d.appendVar("BUILD_LDFLAGS", " -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=${UNINATIVE_LOADER}")
+ d.appendVarFlag("BUILD_LDFLAGS", "vardepvalueexclude", "| -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=${UNINATIVE_LOADER}")
+ d.appendVarFlag("BUILD_LDFLAGS", "vardepsexclude", "UNINATIVE_LOADER")
d.prependVar("PATH", "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${bindir_native}:")
python uninative_changeinterp () {
diff --git a/import-layers/yocto-poky/meta/classes/useradd-staticids.bbclass b/import-layers/yocto-poky/meta/classes/useradd-staticids.bbclass
index 589a99f..64bf6dc 100644
--- a/import-layers/yocto-poky/meta/classes/useradd-staticids.bbclass
+++ b/import-layers/yocto-poky/meta/classes/useradd-staticids.bbclass
@@ -307,5 +307,5 @@
update_useradd_static_config(d)
except NotImplementedError as f:
bb.debug(1, "Skipping recipe %s: %s" % (d.getVar('PN'), f))
- raise bb.parse.SkipPackage(f)
+ raise bb.parse.SkipRecipe(f)
}
diff --git a/import-layers/yocto-poky/meta/classes/utility-tasks.bbclass b/import-layers/yocto-poky/meta/classes/utility-tasks.bbclass
index 587bfd4..b1f27d3 100644
--- a/import-layers/yocto-poky/meta/classes/utility-tasks.bbclass
+++ b/import-layers/yocto-poky/meta/classes/utility-tasks.bbclass
@@ -50,17 +50,4 @@
bb.fatal(str(e))
}
-addtask checkuriall after do_checkuri
-do_checkuriall[recrdeptask] = "do_checkuriall do_checkuri"
-do_checkuriall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_checkuriall[nostamp] = "1"
-do_checkuriall() {
- :
-}
-addtask fetchall after do_fetch
-do_fetchall[recrdeptask] = "do_fetchall do_fetch"
-do_fetchall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_fetchall() {
- :
-}
diff --git a/import-layers/yocto-poky/meta/classes/utils.bbclass b/import-layers/yocto-poky/meta/classes/utils.bbclass
index 8e07eac..4f016e3 100644
--- a/import-layers/yocto-poky/meta/classes/utils.bbclass
+++ b/import-layers/yocto-poky/meta/classes/utils.bbclass
@@ -1,44 +1,3 @@
-# For compatibility
-def base_path_join(a, *p):
- return oe.path.join(a, *p)
-
-def base_path_relative(src, dest):
- return oe.path.relative(src, dest)
-
-def base_path_out(path, d):
- return oe.path.format_display(path, d)
-
-def base_read_file(filename):
- return oe.utils.read_file(filename)
-
-def base_ifelse(condition, iftrue = True, iffalse = False):
- return oe.utils.ifelse(condition, iftrue, iffalse)
-
-def base_conditional(variable, checkvalue, truevalue, falsevalue, d):
- return oe.utils.conditional(variable, checkvalue, truevalue, falsevalue, d)
-
-def base_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
- return oe.utils.less_or_equal(variable, checkvalue, truevalue, falsevalue, d)
-
-def base_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
- return oe.utils.version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d)
-
-def base_contains(variable, checkvalues, truevalue, falsevalue, d):
- bb.note('base_contains is deprecated, please use bb.utils.contains instead.')
- return bb.utils.contains(variable, checkvalues, truevalue, falsevalue, d)
-
-def base_both_contain(variable1, variable2, checkvalue, d):
- return oe.utils.both_contain(variable1, variable2, checkvalue, d)
-
-def base_prune_suffix(var, suffixes, d):
- return oe.utils.prune_suffix(var, suffixes, d)
-
-def oe_filter(f, str, d):
- return oe.utils.str_filter(f, str, d)
-
-def oe_filter_out(f, str, d):
- return oe.utils.str_filter_out(f, str, d)
-
def machine_paths(d):
"""List any existing machine specific filespath directories"""
machine = d.getVar("MACHINE")
@@ -364,12 +323,7 @@
return pkgs
def get_multilib_datastore(variant, d):
- localdata = bb.data.createCopy(d)
- overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + variant
- localdata.setVar("OVERRIDES", overrides)
- localdata.setVar("MLPREFIX", variant + "-")
- return localdata
-get_multilib_datastore[vardepsexclude] = "OVERRIDES"
+ return oe.utils.get_multilib_datastore(variant, d)
def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = ' '):
"""Return a string of all ${var} in all multilib tune configuration"""
diff --git a/import-layers/yocto-poky/meta/classes/waf.bbclass b/import-layers/yocto-poky/meta/classes/waf.bbclass
index acbda27..19e9376 100644
--- a/import-layers/yocto-poky/meta/classes/waf.bbclass
+++ b/import-layers/yocto-poky/meta/classes/waf.bbclass
@@ -3,39 +3,20 @@
EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
-def get_waf_parallel_make(d):
- pm = d.getVar('PARALLEL_MAKE')
- if pm:
- # look for '-j' and throw other options (e.g. '-l') away
- # because they might have different meaning in bjam
- pm = pm.split()
- while pm:
- v = None
- opt = pm.pop(0)
- if opt == '-j':
- v = pm.pop(0)
- elif opt.startswith('-j'):
- v = opt[2:].strip()
- else:
- v = None
-
- if v:
- v = min(64, int(v))
- return '-j' + str(v)
-
- return ""
-
python waf_preconfigure() {
+ import subprocess
from distutils.version import StrictVersion
- srcsubdir = d.getVar('S')
- wafbin = os.path.join(srcsubdir, 'waf')
- status, result = oe.utils.getstatusoutput(wafbin + " --version")
- if status != 0:
- bb.warn("Unable to execute waf --version, exit code %d. Assuming waf version without bindir/libdir support." % status)
- return
- version = result.split()[1]
- if StrictVersion(version) >= StrictVersion("1.8.7"):
- d.setVar("WAF_EXTRA_CONF", "--bindir=${bindir} --libdir=${libdir}")
+ subsrcdir = d.getVar('S')
+ wafbin = os.path.join(subsrcdir, 'waf')
+ try:
+ result = subprocess.check_output([wafbin, '--version'], cwd=subsrcdir, stderr=subprocess.STDOUT)
+ version = result.decode('utf-8').split()[1]
+ if StrictVersion(version) >= StrictVersion("1.8.7"):
+ d.setVar("WAF_EXTRA_CONF", "--bindir=${bindir} --libdir=${libdir}")
+ except subprocess.CalledProcessError as e:
+ bb.warn("Unable to execute waf --version, exit code %d. Assuming waf version without bindir/libdir support." % e.returncode)
+ except FileNotFoundError:
+ bb.fatal("waf does not exist in %s" % subsrcdir)
}
do_configure[prefuncs] += "waf_preconfigure"
@@ -44,8 +25,9 @@
${S}/waf configure --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF}
}
+do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
waf_do_compile() {
- ${S}/waf build ${@get_waf_parallel_make(d)}
+ ${S}/waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)}
}
waf_do_install() {
diff --git a/import-layers/yocto-poky/meta/conf/bitbake.conf b/import-layers/yocto-poky/meta/conf/bitbake.conf
index 1cdbf43..a21b728 100644
--- a/import-layers/yocto-poky/meta/conf/bitbake.conf
+++ b/import-layers/yocto-poky/meta/conf/bitbake.conf
@@ -187,6 +187,7 @@
tar-native \
virtual/libintl-native \
virtual/libiconv-native \
+ virtual/crypt-native \
texinfo-native \
bash-native \
sed-native \
@@ -220,7 +221,7 @@
# Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
# otherwise it is the same as PN and P
SPECIAL_PKGSUFFIX = "-native -cross -initial -intermediate -crosssdk -cross-canadian"
-BPN = "${@base_prune_suffix(d.getVar('PN'), d.getVar('SPECIAL_PKGSUFFIX').split(), d)}"
+BPN = "${@oe.utils.prune_suffix(d.getVar('PN'), d.getVar('SPECIAL_PKGSUFFIX').split(), d)}"
BP = "${BPN}-${PV}"
# Package info.
@@ -423,6 +424,8 @@
OLDEST_KERNEL = "3.2.0"
OLDEST_KERNEL_aarch64 = "3.14"
OLDEST_KERNEL_nios2 = "3.19"
+OLDEST_KERNEL_riscv32 = "4.15"
+OLDEST_KERNEL_riscv64 = "4.15"
# SDK_OLDEST_KERNEL can't be set using overrides since there are
# none for the SDK architecture. Best to set it from a machine-sdk
@@ -495,6 +498,9 @@
# Used by bzr fetcher
HOSTTOOLS_NONFATAL += "bzr"
+# Used by ssh fetcher
+HOSTTOOLS_NONFATAL += "scp"
+
CCACHE ??= ""
# ccache < 3.1.10 will create CCACHE_DIR on startup even if disabled, and
# autogen sets HOME=/dev/null so in certain situations builds can fail.
@@ -536,6 +542,7 @@
EXTRA_OEMAKE = ""
EXTRA_OECONF = ""
export LC_ALL = "en_US.UTF-8"
+export TZ = 'UTC'
##################################################################
# Patch handling.
@@ -593,9 +600,10 @@
##################################################################
# Optimization flags.
##################################################################
+# Beware: applied last to first
DEBUG_PREFIX_MAP ?= "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
- -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
-fdebug-prefix-map=${STAGING_DIR_HOST}= \
+ -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
"
DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}"
@@ -663,6 +671,7 @@
SRCDATE = "${DATE}"
SRCREV ??= "INVALID"
AUTOREV = "${@bb.fetch2.get_autorev(d)}"
+AUTOREV[vardepvalue] = "${SRCPV}"
# Set Dynamically in base.bbclass
# SRCPV = "${@bb.fetch2.get_srcrev(d)}"
SRCPV[vardepvalue] = "${SRCPV}"
@@ -757,7 +766,7 @@
DL_DIR ?= "${TOPDIR}/downloads"
SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
IMAGE_FSTYPES ?= "tar.gz"
-IMAGE_FSTYPES_DEBUGFS ?= "${IMAGE_FSTYPES}"
+IMAGE_FSTYPES_DEBUGFS ?= "tar.gz"
INITRAMFS_FSTYPES ?= "cpio.gz"
# The maximum size in Kbytes for the generated initramfs image size.
@@ -807,7 +816,7 @@
# Native distro features (will always be used for -native, even if they
# are not enabled for target)
-DISTRO_FEATURES_NATIVE ?= "x11 ipv6"
+DISTRO_FEATURES_NATIVE ?= "x11 ipv6 xattr"
DISTRO_FEATURES_NATIVESDK ?= "x11 libc-charsets libc-locales libc-locale-code"
# Normally target distro features will not be applied to native builds:
@@ -856,7 +865,7 @@
BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH BBSERVER DL_DIR \
SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
- PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
+ STAMPS_DIR PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_NOHASHDIR LICENSE_PATH SDKPKGSUFFIX \
WARN_QA ERROR_QA WORKDIR STAMPCLEAN PKGDATA_DIR BUILD_ARCH SSTATE_PKGARCH \
BB_WORKERCONTEXT BB_LIMITEDDEPS extend_recipe_sysroot DEPLOY_DIR"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/default-distrovars.inc b/import-layers/yocto-poky/meta/conf/distro/include/default-distrovars.inc
index 76d09af..9620ad4 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/default-distrovars.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/default-distrovars.inc
@@ -47,3 +47,9 @@
GTK2DISTROFEATURES = "directfb x11"
GTK3DISTROFEATURES = "x11 wayland"
+
+ARCH_DEFAULT_KERNELIMAGETYPE = "zImage"
+ARCH_DEFAULT_KERNELIMAGETYPE_x86 = "bzImage"
+ARCH_DEFAULT_KERNELIMAGETYPE_x86-64 = "bzImage"
+KERNEL_IMAGETYPE ??= "${ARCH_DEFAULT_KERNELIMAGETYPE}"
+KERNEL_IMAGETYPES ??= "${KERNEL_IMAGETYPE}"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/default-providers.inc b/import-layers/yocto-poky/meta/conf/distro/include/default-providers.inc
index 2b76c3c..e65c1ed 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/default-providers.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/default-providers.inc
@@ -1,8 +1,6 @@
#
# Default virtual providers
#
-PREFERRED_PROVIDER_virtual/db ?= "db"
-PREFERRED_PROVIDER_virtual/db-native ?= "db-native"
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xorg"
PREFERRED_PROVIDER_virtual/egl ?= "mesa"
@@ -44,7 +42,6 @@
PREFERRED_PROVIDER_opkg-native ?= "opkg-native"
PREFERRED_PROVIDER_nativesdk-opkg ?= "nativesdk-opkg"
PREFERRED_PROVIDER_console-tools ?= "kbd"
-PREFERRED_PROVIDER_gzip-native ?= "pigz-native"
PREFERRED_PROVIDER_udev ?= "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','eudev',d)}"
PREFERRED_RPROVIDER_bluez-hcidump ?= "${@bb.utils.contains('DISTRO_FEATURES','bluetooth bluez5','bluez5','bluez-hcidump',d)}"
# Alternative is ltp-ddt in meta-oe: meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_0.0.4.bb
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/distro_alias.inc b/import-layers/yocto-poky/meta/conf/distro/include/distro_alias.inc
index f7c8b4a..13c7e65 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/distro_alias.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/distro_alias.inc
@@ -138,7 +138,6 @@
DISTRO_PN_ALIAS_pn-gtk-icon-utils-native = "OSPDT"
DISTRO_PN_ALIAS_pn-systemd-boot = "Ubuntu=systemd-boot Fedora=systemd-boot"
DISTRO_PN_ALIAS_pn-hello-mod = "OE-Core"
-DISTRO_PN_ALIAS_pn-hostap-conf = "OE-Core"
DISTRO_PN_ALIAS_pn-hwlatdetect = "OSPDT"
DISTRO_PN_ALIAS_pn-icecc-create-env = "OE-Core"
DISTRO_PN_ALIAS_pn-init-ifupdown = "Debian=ifupdown Ubuntu=ifupdown"
@@ -160,7 +159,6 @@
DISTRO_PN_ALIAS_pn-keymaps = "OE-Core"
DISTRO_PN_ALIAS_pn-kf = "OSPDT"
DISTRO_PN_ALIAS_pn-lame = "Debian=lame Ubuntu=lame"
-DISTRO_PN_ALIAS_pn-latencytop = "Meego=latencytop Fedora=latencytop Debian=latencytop OpenSuSE=latencytop"
DISTRO_PN_ALIAS_pn-ldconfig-native = "Ubuntu=libc-bin Fedora=glibc"
DISTRO_PN_ALIAS_pn-liba52 = "Mandriva=a52dec Debian=a52dec"
DISTRO_PN_ALIAS_pn-libacpi = "Ubuntu=libacpi Mandriva=libacpi"
@@ -278,7 +276,6 @@
DISTRO_PN_ALIAS_pn-opkg-keyrings = "OSPDT upstream=git://git.yoctoproject.org/opkg-utils"
DISTRO_PN_ALIAS_pn-opkg-nogpg = "OSPDT upstream=git://git.yoctoproject.org/opkg-utils"
DISTRO_PN_ALIAS_pn-opkg-utils = "OSPDT upstream=git://git.yoctoproject.org/opkg-utils"
-DISTRO_PN_ALIAS_pn-oprofile = "Debian=oprofile Fedora=oprofile"
DISTRO_PN_ALIAS_pn-os-release = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-base = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-core = "OE-Core"
@@ -316,7 +313,6 @@
DISTRO_PN_ALIAS_pn-pointercal-xinput = "OE-Core"
DISTRO_PN_ALIAS_pn-pong-clock = "OpenedHand"
DISTRO_PN_ALIAS_pn-portmap = "Debian=rpcbind Fedora=rpcbind"
-DISTRO_PN_ALIAS_pn-postinst-intercept = "OE-Core"
DISTRO_PN_ALIAS_pn-powertop = "Meego=powertop Fedora=powertop Debian=powertop OpenSuSE=powertop Mandriva=powertop"
DISTRO_PN_ALIAS_pn-ppp-dialin = "OE-Core"
DISTRO_PN_ALIAS_pn-presentproto = "Debian=x11proto-present-dev Fedora=xorg-x11-proto-devel"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/maintainers.inc b/import-layers/yocto-poky/meta/conf/distro/include/maintainers.inc
index d0e6450..48aff95 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/maintainers.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/maintainers.inc
@@ -31,7 +31,7 @@
RECIPE_MAINTAINER_pn-acpica = "Fathi Boudra <fathi.boudra@linaro.org>"
RECIPE_MAINTAINER_pn-acpid = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-acpitests = "Fathi Boudra <fathi.boudra@linaro.org>"
-RECIPE_MAINTAINER_pn-adwaita-icon-theme = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-adwaita-icon-theme = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-alsa-lib = "Tanu Kaskinen <tanuk@iki.fi>"
RECIPE_MAINTAINER_pn-alsa-plugins = "Tanu Kaskinen <tanuk@iki.fi>"
RECIPE_MAINTAINER_pn-alsa-state = "Tanu Kaskinen <tanuk@iki.fi>"
@@ -46,11 +46,11 @@
RECIPE_MAINTAINER_pn-argp-standalone = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-asciidoc = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-aspell = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-assimp = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-assimp = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-at = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-at-spi2-atk = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-at-spi2-core = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-atk = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-at-spi2-atk = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-at-spi2-core = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-atk = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-attr = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-autoconf = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-autoconf-archive = "Robert Yang <liezhi.yang@windriver.com>"
@@ -59,8 +59,8 @@
RECIPE_MAINTAINER_pn-avahi = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-avahi-ui = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-babeltrace = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-base-files = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-base-passwd = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-base-files = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
+RECIPE_MAINTAINER_pn-base-passwd = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
RECIPE_MAINTAINER_pn-bash = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-bash-completion = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-bc = "Jose Lamego <jose.a.lamego@linux.intel.com>"
@@ -77,7 +77,7 @@
RECIPE_MAINTAINER_pn-blktool = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-blktrace = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-bluez5 = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-bmap-tools = "Ed Bartosh <ed.bartosh@linux.intel.com>"
+RECIPE_MAINTAINER_pn-bmap-tools = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
RECIPE_MAINTAINER_pn-boost = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-bootchart2 = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-bsd-headers = "Khem Raj <raj.khem@gmail.com>"
@@ -89,10 +89,9 @@
RECIPE_MAINTAINER_pn-buildtools-tarball = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-busybox = "Armin Kuster <akuster808@gmail.com>"
RECIPE_MAINTAINER_pn-busybox-inittab = "Denys Dmytriyenko <denys@ti.com>"
-RECIPE_MAINTAINER_pn-byacc = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-bzip2 = "Denys Dmytriyenko <denys@ti.com>"
RECIPE_MAINTAINER_pn-ca-certificates = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-cairo = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-cairo = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-calibrateproto = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-cantarell-fonts = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-ccache = "Robert Yang <liezhi.yang@windriver.com>"
@@ -100,12 +99,12 @@
RECIPE_MAINTAINER_pn-chkconfig = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-chkconfig-alternatives-native = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-chrpath = "Yi Zhao <yi.zhao@windriver.com>"
-RECIPE_MAINTAINER_pn-clutter-1.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-clutter-gst-3.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-clutter-gtk-1.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-clutter-1.0 = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-clutter-gst-3.0 = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-clutter-gtk-1.0 = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-cmake = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
RECIPE_MAINTAINER_pn-cmake-native = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
-RECIPE_MAINTAINER_pn-cogl-1.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-cogl-1.0 = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-compositeproto = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-connman = "Changhyeok Bae <changhyeok.bae@lge.com>"
RECIPE_MAINTAINER_pn-connman-conf = "Maxin B. John <maxin.john@intel.com>"
@@ -116,22 +115,22 @@
RECIPE_MAINTAINER_pn-cpio = "Denys Dmytriyenko <denys@ti.com>"
RECIPE_MAINTAINER_pn-cracklib = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-createrepo-c = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-cronie = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-cronie = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-cross-localedef-native = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-cryptodev-linux = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-cryptodev-module = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-cryptodev-tests = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-cups = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-curl = "Armin Kuster <akuster@mvista.com>"
-RECIPE_MAINTAINER_pn-cve-check-tool = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-cve-check-tool = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-cwautomacros = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-damageproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-damageproto = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-db = "Mark Hatle <mark.hatle@windriver.com>"
RECIPE_MAINTAINER_pn-dbus = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-dbus-glib = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-dbus-test = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-dbus-wait = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-debianutils = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-debianutils = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-depmodwrapper-cross = "Mark Hatle <mark.hatle@windriver.com>"
RECIPE_MAINTAINER_pn-desktop-file-utils-native = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-dhcp = "Hongxu Jia <hongxu.jia@windriver.com>"
@@ -152,6 +151,7 @@
RECIPE_MAINTAINER_pn-dri3proto = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-dropbear = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-dtc = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-dwarfsrcfiles = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-e2fsprogs = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-ed = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-eee-acpi-scripts = "Alexander Kanavin <alexander.kanavin@intel.com>"
@@ -164,22 +164,22 @@
RECIPE_MAINTAINER_pn-encodings = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-epiphany = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-ethtool = "Changhyeok Bae <changhyeok.bae@lge.com>"
-RECIPE_MAINTAINER_pn-eudev = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-eudev = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
RECIPE_MAINTAINER_pn-expat = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-expect = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-ffmpeg = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-file = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-file = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-findutils = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-fixesproto = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-flac = "Tanu Kaskinen <tanuk@iki.fi>"
RECIPE_MAINTAINER_pn-flex = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-font-alias = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-font-util = "Armin Kuster <akuster@mvista.com>"
-RECIPE_MAINTAINER_pn-fontconfig = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-fontconfig = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-fontsproto = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-foomatic-filters = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-formfactor = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-freetype = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-freetype = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-fstests = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-fts = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-gawk = "Chen Qi <Qi.Chen@windriver.com>"
@@ -193,34 +193,35 @@
RECIPE_MAINTAINER_pn-gcc-sanitizers = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-gcc-source = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-gccmakedep = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-gconf = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gconf = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-gcr = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-gdb = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-gdb-cross = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-gdb-cross-canadian = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-gdbm = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-gdk-pixbuf = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gdk-pixbuf = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-gettext = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-gettext-minimal-native = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-ghostscript = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-git = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-glew = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-glib-2.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-glib-networking = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-glew = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-glib-2.0 = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-glib-networking = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-glibc = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-glibc-initial = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-glibc-locale = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-glibc-mtrace = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-glibc-scripts = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-glide = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
RECIPE_MAINTAINER_pn-glproto = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-gmp = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-gnome-common = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gnome-desktop-testing = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gnome-common = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gnome-desktop-testing = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-gnome-desktop3 = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-gnome-doc-utils = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gnome-themes-standard = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gnome-doc-utils = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gnome-themes-standard = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-gnu-config = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-gnu-efi = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-gnu-efi = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-gnupg = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-gnutls = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-go = "Khem Raj <raj.khem@gmail.com>"
@@ -235,51 +236,51 @@
RECIPE_MAINTAINER_pn-grep = "Denys Dmytriyenko <denys@ti.com>"
RECIPE_MAINTAINER_pn-groff = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-grub = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-grub-bootconf = "California Sullivan <california.l.sullivan@intel.com>"
RECIPE_MAINTAINER_pn-grub-efi = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-gsettings-desktop-schemas = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gst-player = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0 = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-libav = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-omx = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-meta-base = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-bad = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-base = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-good = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-ugly = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-python = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-rtsp-server = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-vaapi = "Wei Tee Ng <wei.tee.ng@intel.com>"
-RECIPE_MAINTAINER_pn-gtk+ = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gtk+3 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gsettings-desktop-schemas = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gst-examples = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gst-validate = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0 = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-libav = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-omx = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-meta-base = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-bad = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-base = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-good = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-ugly = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-python = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-rtsp-server = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-vaapi = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gtk+ = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gtk+3 = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-gtk-doc = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-gtk-engines = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gtk-icon-utils-native = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gtk-sato-engine = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-guile = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-gtk-engines = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gtk-icon-utils-native = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gtk-sato-engine = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-guilt-native = "Bruce Ashfield <bruce.ashfield@windriver.com>"
RECIPE_MAINTAINER_pn-gummiboot = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-gzip = "Denys Dmytriyenko <denys@ti.com>"
RECIPE_MAINTAINER_pn-harfbuzz = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-hdparm = "Denys Dmytriyenko <denys@ti.com>"
RECIPE_MAINTAINER_pn-help2man-native = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-hicolor-icon-theme = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-hostap-conf = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-hostap-utils = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-hicolor-icon-theme = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-hwlatdetect = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-i2c-tools = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-icecc-create-env-native = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-icecc-create-env = "Joshua Watt <JPEWhacker@gmail.com>"
RECIPE_MAINTAINER_pn-icon-naming-utils = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-icu = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-ifupdown = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-init-ifupdown = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-initramfs-boot = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
RECIPE_MAINTAINER_pn-initramfs-framework = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
-RECIPE_MAINTAINER_pn-initramfs-live-boot = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-initramfs-live-install = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-initramfs-live-install-efi = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-initramfs-live-install-efi-testfs = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-initramfs-live-install-testfs = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-initscripts = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-boot = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-boot-tiny = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-install = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-install-efi = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-install-efi-testfs = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-install-testfs = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
+RECIPE_MAINTAINER_pn-initscripts = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
RECIPE_MAINTAINER_pn-inputproto = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-intltool = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-iproute2 = "Changhyeok Bae <changhyeok.bae@lge.com>"
@@ -302,43 +303,37 @@
RECIPE_MAINTAINER_pn-kmod = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-kmod-native = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-kmscube = "Carlos Rafael Giani <dv@pseudoterminal.org>"
-RECIPE_MAINTAINER_pn-l3afpad = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-l3afpad = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-lame = "Tanu Kaskinen <tanuk@iki.fi>"
-RECIPE_MAINTAINER_pn-latencytop = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-ldconfig-native = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-less = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-less = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-liba52 = "Tanu Kaskinen <tanuk@iki.fi>"
RECIPE_MAINTAINER_pn-libacpi = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libaio = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-libarchive = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
-RECIPE_MAINTAINER_pn-libart-lgpl = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libart-lgpl = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libassuan = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-libatomic-ops = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-libav = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libbsd = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libcap = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libcap-ng = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-libbsd = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-libcap = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-libcap-ng = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-libcgroup = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libcheck = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libclass-isa-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libcheck = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-libcomps = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libconvert-asn1-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libcroco = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libconvert-asn1-perl = "Tim Orling <timothy.t.orling@intel.com>"
+RECIPE_MAINTAINER_pn-libcroco = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libdaemon = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-libdmx = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-libdnf = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-libdrm = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
-RECIPE_MAINTAINER_pn-libdumpvalue-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libenv-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libepoxy = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libepoxy = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-liberation-fonts = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-liberror-perl = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libevdev = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libevent = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-liberror-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libevdev = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libevent = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libexif = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-libfakekey = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-libffi = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libfile-checktree-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
RECIPE_MAINTAINER_pn-libfm = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-libfm-extra = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-libfontenc = "Armin Kuster <akuster@mvista.com>"
@@ -346,56 +341,55 @@
RECIPE_MAINTAINER_pn-libgcc-initial = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-libgcrypt = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-libgfortran = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-libglade = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libglu = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libglu = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libgpg-error = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-libgudev = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libi18n-collate-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libgudev = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libical = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libice = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-libiconv = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-libid3tag = "Tanu Kaskinen <tanuk@iki.fi>"
RECIPE_MAINTAINER_pn-libidn = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libinput = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libinput = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libjson = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-libksba = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libmatchbox = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libmatchbox = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libmnl = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-libmpc = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-libnewt = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-libnewt-python = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-libnfsidmap = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libnl = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libnotify = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libnotify = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libnsl2 = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-libnss-mdns = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-libogg = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libomxil = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-libowl = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libowl = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libpam = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libpcap = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libpciaccess = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libpcre = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-libpcre = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-libpcre2 = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-libpfm4 = "Matthew McClintock <msm@freescale.com>"
+RECIPE_MAINTAINER_pn-libpipeline = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-libpng = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libpng12 = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-libpod-plainer-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
RECIPE_MAINTAINER_pn-libproxy = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libpthread-stubs = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-librepo = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-librsvg = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-librsvg = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libsamplerate0 = "Tanu Kaskinen <tanuk@iki.fi>"
-RECIPE_MAINTAINER_pn-libsdl = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libsdl2 = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-libsdl = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-libsdl2 = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-libsecret = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-libsm = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-libsndfile1 = "Tanu Kaskinen <tanuk@iki.fi>"
RECIPE_MAINTAINER_pn-libsolv = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-libsoup-2.4 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libsoup-2.4 = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libtasn1 = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libtest-needs-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
RECIPE_MAINTAINER_pn-libtheora = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libtimedate-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libtimedate-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
RECIPE_MAINTAINER_pn-libtirpc = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libtool = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-libtool-cross = "Robert Yang <liezhi.yang@windriver.com>"
@@ -403,12 +397,12 @@
RECIPE_MAINTAINER_pn-libunistring = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libunwind = "Bruce Ashfield <bruce.ashfield@windriver.com>"
RECIPE_MAINTAINER_pn-liburcu = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-liburi-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libusb-compat = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libusb1 = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-liburi-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libusb-compat = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libusb1 = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libuser = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libva = "Wei Tee Ng <wei.tee.ng@intel.com>"
-RECIPE_MAINTAINER_pn-libva-utils = "Wei Tee Ng <wei.tee.ng@intel.com>"
+RECIPE_MAINTAINER_pn-libva = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libva-utils = "Anuj Mittal <anuj.mittal@intel.com>"
RECIPE_MAINTAINER_pn-libvorbis = "Tanu Kaskinen <tanuk@iki.fi>"
RECIPE_MAINTAINER_pn-libwebp = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-libx11 = "Armin Kuster <akuster@mvista.com>"
@@ -429,12 +423,12 @@
RECIPE_MAINTAINER_pn-libxinerama = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-libxkbcommon = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-libxkbfile = "Armin Kuster <akuster@mvista.com>"
-RECIPE_MAINTAINER_pn-libxml-namespacesupport-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libxml-parser-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libxml-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libxml-sax-base-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libxml-sax-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libxml-simple-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-namespacesupport-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-parser-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-sax-base-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-sax-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-simple-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
RECIPE_MAINTAINER_pn-libxml2 = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-libxmu = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-libxpm = "Armin Kuster <akuster@mvista.com>"
@@ -442,7 +436,7 @@
RECIPE_MAINTAINER_pn-libxrender = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-libxres = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-libxscrnsaver = "Armin Kuster <akuster@mvista.com>"
-RECIPE_MAINTAINER_pn-libxsettings-client = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxsettings-client = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-libxshmfence = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-libxslt = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-libxt = "Armin Kuster <akuster@mvista.com>"
@@ -462,10 +456,10 @@
RECIPE_MAINTAINER_pn-linux-yocto-rt = "Bruce Ashfield <bruce.ashfield@windriver.com>"
RECIPE_MAINTAINER_pn-linux-yocto-tiny = "Bruce Ashfield <bruce.ashfield@windriver.com>"
RECIPE_MAINTAINER_pn-llvm = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-logrotate = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-logrotate = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-lrzsz = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-lsb = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-lsbinitscripts = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-lsbinitscripts = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
RECIPE_MAINTAINER_pn-lsbtest = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-lsof = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-ltp = "Yi Zhao <yi.zhao@windriver.com>"
@@ -478,35 +472,36 @@
RECIPE_MAINTAINER_pn-lzop = "Denys Dmytriyenko <denys@ti.com>"
RECIPE_MAINTAINER_pn-m4 = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-m4-native = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-mailx = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-make = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-makedepend = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-makedevs = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-man = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-make-mod-scripts = "Bruce Ashfield <bruce.ashfield@windriver.com>"
+RECIPE_MAINTAINER_pn-man-db = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-man-pages = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-matchbox-config-gtk = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-desktop = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-desktop-sato = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-keyboard = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-panel-2 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-session = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-session-sato = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-terminal = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-theme-sato = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-wm = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-config-gtk = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-desktop = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-desktop-sato = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-keyboard = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-panel-2 = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-session = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-session-sato = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-terminal = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-theme-sato = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-wm = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-mc = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-mdadm = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-menu-cache = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-menu-cache = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-mesa = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
RECIPE_MAINTAINER_pn-mesa-demos = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
RECIPE_MAINTAINER_pn-mesa-gl = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
+RECIPE_MAINTAINER_pn-meson = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-meta-environment = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-meta-environment-extsdk = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-meta-extsdk-toolchain = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-meta-ide-support = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-meta-toolchain = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-meta-world-pkgdata = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-mingetty = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-mingetty = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-mini-x-session = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-minicom = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-mkelfimage = "Alexander Kanavin <alexander.kanavin@intel.com>"
@@ -516,22 +511,22 @@
RECIPE_MAINTAINER_pn-mktemp = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-mmc-utils = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-mobile-broadband-provider-info = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-modutils-initscripts = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-modutils-initscripts = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-mpeg2dec = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-mpfr = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-mpg123 = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-msmtp = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-mtd-utils = "Denys Dmytriyenko <denys@ti.com>"
-RECIPE_MAINTAINER_pn-mtdev = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-mtdev = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-mtools = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-musl = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-mx-1.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-musl-utils = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-mx-1.0 = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-nasm = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-nativesdk-buildtools-perl-dummy = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-nativesdk-buildtools-perl-dummy = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-nativesdk-libtool = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-nativesdk-packagegroup-sdk-host = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-nativesdk-qemu-helper = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-nativesdk-postinst-intercept = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-nativesdk-qemu-helper = "Juro Bystricky <juro.bystricky@intel.com>"
RECIPE_MAINTAINER_pn-ncurses = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-neard = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-neon = "Maxin B. John <maxin.john@intel.com>"
@@ -539,14 +534,14 @@
RECIPE_MAINTAINER_pn-netbase = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-nettle = "Armin Kuster <akuster808@gmail.com>"
RECIPE_MAINTAINER_pn-nfs-export-root = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-nfs-utils = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-nfs-utils = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-ninja = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-npth = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-nspr = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-nss = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-nss-myhostname = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-ofono = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-oh-puzzles = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-oh-puzzles = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-openssh = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-openssl = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-opkg = "Alejandro del Castillo <alejandro.delcastillo@ni.com>"
@@ -561,31 +556,29 @@
RECIPE_MAINTAINER_pn-ovmf-shell-image = "Ricardo Neri <ricardo.neri-calderon@linux.intel.com>"
RECIPE_MAINTAINER_pn-p11-kit = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-package-index = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-pango = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-pango = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-parted = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-patch = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-patchelf = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-pax = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-pax-utils = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-pbzip2 = "Denys Dmytriyenko <denys@ti.com>"
RECIPE_MAINTAINER_pn-pciutils = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-pcmanfm = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-pcmciautils = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-perf = "Bruce Ashfield <bruce.ashfield@windriver.com>"
-RECIPE_MAINTAINER_pn-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-perl-native = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-piglit = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-perl = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-perl-native = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-piglit = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-pigz = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-pinentry = "Armin Kuster <akuster808@gmail.com>"
-RECIPE_MAINTAINER_pn-pixman = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-pixman = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-pixz = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-pkgconf = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-pkgconfig = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-pm-utils = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-pointercal = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-pointercal-xinput = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-pong-clock = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-pong-clock = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-popt = "Yi Zhao <yi.zhao@windriver.com>"
-RECIPE_MAINTAINER_pn-portmap = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-powertop = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-ppp = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-ppp-dialin = "Hongxu Jia <hongxu.jia@windriver.com>"
@@ -595,54 +588,37 @@
RECIPE_MAINTAINER_pn-pseudo = "Mark Hatle <mark.hatle@windriver.com>"
RECIPE_MAINTAINER_pn-psmisc = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-psplash = "Yi Zhao <yi.zhao@windriver.com>"
-RECIPE_MAINTAINER_pn-ptest-runner = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-ptest-runner = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-pulseaudio = "Tanu Kaskinen <tanuk@iki.fi>"
RECIPE_MAINTAINER_pn-pulseaudio-client-conf-sato = "Tanu Kaskinen <tanuk@iki.fi>"
-RECIPE_MAINTAINER_pn-puzzles = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-python = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-native = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-async = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-distribute = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-git = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-gitdb = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-imaging = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-mako = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-native = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-nose = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-numpy = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-pexpect = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-ptyprocess = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-pycairo = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-pycurl = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-pygtk = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-pyrex = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-scons = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-scons-native = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-setuptools = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-six = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-smartpm = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-smmap = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3 = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-async = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-dbus = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-distribute = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-docutils = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-git = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-gitdb = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-iniparse = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-mako = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-native = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-nose = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-numpy = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-pip = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-pycairo = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-pygobject = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-setuptools = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-six = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-smmap = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-qemu = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-qemu-helper-native = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-qemuwrapper-cross = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-puzzles = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-python = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python-native = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python-nose = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python-numpy = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python-scons = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python-scons-native = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python-setuptools = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3 = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-async = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-dbus = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-docutils = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-git = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-gitdb = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-iniparse = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-mako = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-native = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-nose = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-numpy = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-pip = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-pycairo = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-pygobject = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-setuptools = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-six = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-smmap = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-qemu = "Juro Bystricky <juro.bystricky@intel.com>"
+RECIPE_MAINTAINER_pn-qemu-helper-native = "Juro Bystricky <juro.bystricky@intel.com>"
+RECIPE_MAINTAINER_pn-qemuwrapper-cross = "Juro Bystricky <juro.bystricky@intel.com>"
RECIPE_MAINTAINER_pn-quilt = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-quilt-native = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-quota = "Maxin B. John <maxin.john@intel.com>"
@@ -659,27 +635,26 @@
RECIPE_MAINTAINER_pn-rng-tools = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-rpm = "Mark Hatle <mark.hatle@windriver.com>"
RECIPE_MAINTAINER_pn-rpmresolve = "Mark Hatle <mark.hatle@windriver.com>"
-RECIPE_MAINTAINER_pn-rsync = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-rsync = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-rt-tests = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-ruby = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-ruby = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-run-postinsts = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-rxvt-unicode = "Armin Kuster <akuster@mvista.com>"
-RECIPE_MAINTAINER_pn-sato-icon-theme = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-sato-screenshot = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-sato-screenshot = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-sbc = "Tanu Kaskinen <tanuk@iki.fi>"
RECIPE_MAINTAINER_pn-screen = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-scrnsaverproto = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-sed = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-serf = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-setserial = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-settings-daemon = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-setserial = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-settings-daemon = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-shadow = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-shadow-securetty = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-shadow-sysroot = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-shared-mime-info = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-shared-mime-info = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-shutdown-desktop = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-signing-keys = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-slang = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-slang = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-socat = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-source-highlight = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-speex = "Tanu Kaskinen <tanuk@iki.fi>"
@@ -687,13 +662,12 @@
RECIPE_MAINTAINER_pn-sqlite3 = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-squashfs-tools = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-startup-notification = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-stat = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-strace = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-stress = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-subversion = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-sudo = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-swabber-native = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-swig = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-swig = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-sysfsutils = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-sysklogd = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-syslinux = "Alexander Kanavin <alexander.kanavin@intel.com>"
@@ -702,29 +676,28 @@
RECIPE_MAINTAINER_pn-systemd = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-systemd-boot = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-systemd-bootchart = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-systemd-bootconf = "California Sullivan <california.l.sullivan@intel.com>"
RECIPE_MAINTAINER_pn-systemd-compat-units = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-systemd-serialgetty = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-systemd-systemctl-native = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-systemtap = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-systemtap-uprobes = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-sysvinit = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-sysvinit-inittab = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-sysvinit = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
+RECIPE_MAINTAINER_pn-sysvinit-inittab = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
RECIPE_MAINTAINER_pn-taglib = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-tar = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-tcf-agent = "Randy Witt <randy.e.witt@linux.intel.com>"
-RECIPE_MAINTAINER_pn-tcl = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-tcl = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-tcp-wrappers = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-testexport-tarball = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-texi2html = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-texinfo = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-texinfo-dummy-native = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-texinfo = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-texinfo-dummy-native = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-tiff = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-time = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-tiny-init = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-trace-cmd = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-tremor = "Tanu Kaskinen <tanuk@iki.fi>"
-RECIPE_MAINTAINER_pn-tslib = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-ttf-bitstream-vera = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-ttf-bitstream-vera = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-tzcode-native = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-tzdata = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-u-boot = "Marek Vasut <marek.vasut@gmail.com>"
@@ -736,7 +709,7 @@
RECIPE_MAINTAINER_pn-unifdef = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-uninative-tarball = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-unzip = "Denys Dmytriyenko <denys@ti.com>"
-RECIPE_MAINTAINER_pn-update-rc.d = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-update-rc.d = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
RECIPE_MAINTAINER_pn-usbinit = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-usbutils = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-util-linux = "Chen Qi <Qi.Chen@windriver.com>"
@@ -746,10 +719,10 @@
RECIPE_MAINTAINER_pn-valgrind = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-videoproto = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-volatile-binds = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-vte = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-vulkan = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-vulkan-demos = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-waffle = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-vte = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-vulkan = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-vulkan-demos = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-waffle = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-watchdog = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-watchdog-config = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-wayland = "Denys Dmytriyenko <denys@ti.com>"
@@ -757,14 +730,14 @@
RECIPE_MAINTAINER_pn-webkitgtk = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-weston = "Denys Dmytriyenko <denys@ti.com>"
RECIPE_MAINTAINER_pn-weston-init = "Denys Dmytriyenko <denys@ti.com>"
-RECIPE_MAINTAINER_pn-wget = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-which = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-wic-tools = "Ed Bartosh <ed.bartosh@linux.intel.com>"
+RECIPE_MAINTAINER_pn-wget = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-which = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-wic-tools = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
RECIPE_MAINTAINER_pn-wireless-tools = "Changhyeok Bae <changhyeok.bae@lge.com>"
RECIPE_MAINTAINER_pn-wpa-supplicant = "Changhyeok Bae <changhyeok.bae@lge.com>"
RECIPE_MAINTAINER_pn-x11-common = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-x11perf = "Armin Kuster <akuster@mvista.com>"
-RECIPE_MAINTAINER_pn-x264 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-x264 = "Anuj Mittal <anuj.mittal@intel.com>"
RECIPE_MAINTAINER_pn-xauth = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-xcb-proto = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-xcb-util = "Armin Kuster <akuster@mvista.com>"
@@ -774,7 +747,7 @@
RECIPE_MAINTAINER_pn-xcb-util-wm = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-xcmiscproto = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-xcursor-transparent-theme = "Armin Kuster <akuster@mvista.com>"
-RECIPE_MAINTAINER_pn-xdg-utils = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xdg-utils = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-xdpyinfo = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-xev = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-xextproto = "Armin Kuster <akuster@mvista.com>"
@@ -816,7 +789,6 @@
RECIPE_MAINTAINER_pn-xserver-xorg = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-xset = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-xtrans = "Armin Kuster <akuster@mvista.com>"
-RECIPE_MAINTAINER_pn-xtscal = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-xuser-account = "Armin Kuster <akuster@mvista.com>"
RECIPE_MAINTAINER_pn-xvideo-tests = "Maxin B. John <maxin.john@intel.com>"
RECIPE_MAINTAINER_pn-xvinfo = "Armin Kuster <akuster@mvista.com>"
@@ -824,5 +796,4 @@
RECIPE_MAINTAINER_pn-xz = "Denys Dmytriyenko <denys@ti.com>"
RECIPE_MAINTAINER_pn-yasm = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER_pn-zip = "Denys Dmytriyenko <denys@ti.com>"
-RECIPE_MAINTAINER_pn-zisofs-tools-native = "Alexander Kanavin <alexander.kanavin@intel.com>"
RECIPE_MAINTAINER_pn-zlib = "Denys Dmytriyenko <denys@ti.com>"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/security_flags.inc b/import-layers/yocto-poky/meta/conf/distro/include/security_flags.inc
index ab2062b..d66dd57 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/security_flags.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/security_flags.inc
@@ -6,10 +6,11 @@
# in the DISTRO="poky-lsb" configuration.
GCCPIE ?= "--enable-default-pie"
+GLIBCPIE ?= "--enable-static-pie"
# _FORTIFY_SOURCE requires -O1 or higher, so disable in debug builds as they use
# -O0 which then results in a compiler warning.
-lcl_maybe_fortify = "${@base_conditional('DEBUG_BUILD','1','','-D_FORTIFY_SOURCE=2',d)}"
+lcl_maybe_fortify = "${@oe.utils.conditional('DEBUG_BUILD','1','','-D_FORTIFY_SOURCE=2',d)}"
# Error on use of format strings that represent possible security problems
SECURITY_STRINGFORMAT ?= "-Wformat -Wformat-security -Werror=format-security"
@@ -30,6 +31,7 @@
SECURITY_CFLAGS_powerpc = "-fstack-protector-strong ${lcl_maybe_fortify} ${SECURITY_NOPIE_CFLAGS}"
SECURITY_CFLAGS_pn-libgcc_powerpc = ""
GCCPIE_powerpc = ""
+GLIBCPIE_powerpc = ""
# arm specific security flag issues
SECURITY_CFLAGS_pn-glibc = ""
@@ -59,12 +61,8 @@
SECURITY_LDFLAGS_remove_pn-gcc-runtime = "-fstack-protector-strong"
SECURITY_LDFLAGS_remove_pn-glibc = "-fstack-protector-strong"
SECURITY_LDFLAGS_remove_pn-glibc-initial = "-fstack-protector-strong"
-SECURITY_LDFLAGS_pn-xf86-video-fbdev = "${SECURITY_X_LDFLAGS}"
-SECURITY_LDFLAGS_pn-xf86-video-intel = "${SECURITY_X_LDFLAGS}"
-SECURITY_LDFLAGS_pn-xf86-video-omapfb = "${SECURITY_X_LDFLAGS}"
-SECURITY_LDFLAGS_pn-xf86-video-omap = "${SECURITY_X_LDFLAGS}"
-SECURITY_LDFLAGS_pn-xf86-video-vesa = "${SECURITY_X_LDFLAGS}"
-SECURITY_LDFLAGS_pn-xf86-video-vmware = "${SECURITY_X_LDFLAGS}"
+# All xorg module drivers need to be linked this way as well and are
+# handled in recipes-graphics/xorg-driver/xorg-driver-common.inc
SECURITY_LDFLAGS_pn-xserver-xorg = "${SECURITY_X_LDFLAGS}"
TARGET_CC_ARCH_append_pn-binutils = " ${SELECTED_OPTIMIZATION}"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/tclibc-musl.inc b/import-layers/yocto-poky/meta/conf/distro/include/tclibc-musl.inc
index 9ae2a93..54e1acf 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/tclibc-musl.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/tclibc-musl.inc
@@ -26,4 +26,7 @@
musl \
musl-dbg \
musl-dev \
+ musl-utils \
+ musl-utils-iconv \
+ bsd-headers-dev \
"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/tcmode-default.inc b/import-layers/yocto-poky/meta/conf/distro/include/tcmode-default.inc
index 1787a82..00399ae 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/tcmode-default.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/tcmode-default.inc
@@ -24,10 +24,11 @@
GCCVERSION ?= "7.%"
SDKGCCVERSION ?= "${GCCVERSION}"
-BINUVERSION ?= "2.29%"
+BINUVERSION ?= "2.30%"
GDBVERSION ?= "8.0%"
-GLIBCVERSION ?= "2.26%"
-LINUXLIBCVERSION ?= "4.12%"
+GLIBCVERSION ?= "2.27%"
+LINUXLIBCVERSION ?= "4.15%"
+QEMUVERSION ?= "2.11%"
PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
@@ -63,10 +64,21 @@
PREFERRED_VERSION_glibc-initial ?= "${GLIBCVERSION}"
PREFERRED_VERSION_nativesdk-glibc-initial ?= "${GLIBCVERSION}"
PREFERRED_VERSION_cross-localedef-native ?= "${GLIBCVERSION}"
-# don't use version earlier than 1.4 for gzip-native, as it's necessary for
-# some packages using an archive format incompatible with earlier gzip
-PREFERRED_VERSION_gzip-native ?= "1.8"
+
+PREFERRED_VERSION_qemu ?= "${QEMUVERSION}"
+PREFERRED_VERSION_qemu-native ?= "${QEMUVERSION}"
+PREFERRED_VERSION_nativesdk-qemu ?= "${QEMUVERSION}"
# Setup suitable toolchain flags
require conf/distro/include/as-needed.inc
+GOVERSION ?= "1.9%"
+PREFERRED_VERSION_virtual/${TARGET_PREFIX}go ?= "${GOVERSION}"
+PREFERRED_VERSION_go-cross-${TARGET_ARCH} ?= "${GOVERSION}"
+PREFERRED_VERSION_go-crosssdk-${SDK_ARCH} ?= "${GOVERSION}"
+PREFERRED_VERSION_go-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "${GOVERSION}"
+PREFERRED_VERSION_go ?= "${GOVERSION}"
+PREFERRED_VERSION_go-native ?= "${GOVERSION}"
+PREFERRED_VERSION_go-runtime ?= "${GOVERSION}"
+PREFERRED_VERSION_nativesdk-go ?= "${GOVERSION}"
+PREFERRED_VERSION_nativesdk-go-runtime ?= "${GOVERSION}"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/yocto-uninative.inc b/import-layers/yocto-poky/meta/conf/distro/include/yocto-uninative.inc
index cd5fc0b..a8e82cb 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/yocto-uninative.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/yocto-uninative.inc
@@ -8,6 +8,6 @@
UNINATIVE_MAXGLIBCVERSION = "2.27"
-UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/1.8/"
-UNINATIVE_CHECKSUM[i686] ?= "427ce522ec97f65c75fd89587d90ef789e8cbca4a617abc4b5822abb01c2d0ae"
-UNINATIVE_CHECKSUM[x86_64] ?= "de4947e98e09e1432d069311cc2093974ecb9138a714fd5466f73524de66a693"
+UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/1.9/"
+UNINATIVE_CHECKSUM[i686] ?= "83a4f927da81d9889ef0cbe5c12cb782e21c6cc11e6155600b94ff0c99576dce"
+UNINATIVE_CHECKSUM[x86_64] ?= "c26622a1f27dbf5b25de986b11584b5c5b2f322d9eb367f705a744f58a5561ec"
diff --git a/import-layers/yocto-poky/meta/conf/documentation.conf b/import-layers/yocto-poky/meta/conf/documentation.conf
index 081e726..254f8f1 100644
--- a/import-layers/yocto-poky/meta/conf/documentation.conf
+++ b/import-layers/yocto-poky/meta/conf/documentation.conf
@@ -8,7 +8,6 @@
do_build[doc] = "Default task for a recipe - depends on all other normal tasks required to 'build' a recipe"
do_bundle_initramfs[doc] = "Combines an initial ramdisk image and kernel together to form a single image"
do_checkuri[doc] = "Validates the SRC_URI value"
-do_checkuriall[doc] = "Validates the SRC_URI value for all recipes required to build a target"
do_clean[doc] = "Removes all output files for a target"
do_cleanall[doc] = "Removes all output files, shared state cache, and downloaded source files for a target"
do_cleansstate[doc] = "Removes all output files and shared state cache for a target"
@@ -22,7 +21,6 @@
do_devshell[doc] = "Starts a shell with the environment set up for development/debugging"
do_diffconfig[doc] = "Compares the old and new config files after running do_menuconfig for the kernel"
do_fetch[doc] = "Fetches the source code"
-do_fetchall[doc] = "Fetches all remote sources required to build a target"
do_install[doc] = "Copies files from the compilation directory to a holding area"
do_install_ptest_base[doc] = "Copies the runtime test suite files from the compilation directory to a holding area"
do_kernel_checkout[doc] = "Checks out source/meta branches for a linux-yocto style kernel"
@@ -247,6 +245,7 @@
KERNEL_IMAGETYPES[doc] = "The list of types of kernel to build for a device, usually set by the machine configuration files and defaults to KERNEL_IMAGETYPE."
KERNEL_MODULE_AUTOLOAD[doc] = "Lists kernel modules that need to be auto-loaded during boot"
KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules for which the build system expects to find module_conf_* values that specify configuration for each of the modules"
+KERNEL_PACKAGE_NAME[doc] = "Name prefix for kernel packages. Defaults to 'kernel'."
KERNEL_PATH[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
KERNEL_SRC[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
KFEATURE_DESCRIPTION[doc] = "Provides a short description of a configuration fragment. You use this variable in the .scc file that describes a configuration fragment file."
@@ -333,7 +332,6 @@
PREFERRED_PROVIDER[doc] = "If multiple recipes provide an item, this variable determines which recipe should be given preference."
PREFERRED_VERSION[doc] = "If there are multiple versions of recipes available, this variable determines which recipe should be given preference."
PREMIRRORS[doc] = "Specifies additional paths from which the OpenEmbedded build system gets source code."
-PRINC[doc] = "Causes the PR variable of .bbappend files to dynamically increment. This increment minimizes the impact of layer ordering. This variable defaults to '0'."
PRIORITY[doc] = "Indicates the importance of a package. The default value is 'optional'. Other standard values are 'required', 'standard' and 'extra'."
PROVIDES[doc] = "A list of aliases that a recipe also provides. These aliases are useful for satisfying dependencies of other recipes during the build as specified by DEPENDS."
PRSERV_HOST[doc] = "The network based PR service host and port."
diff --git a/import-layers/yocto-poky/meta/conf/layer.conf b/import-layers/yocto-poky/meta/conf/layer.conf
index 0c3dae5..315fb93 100644
--- a/import-layers/yocto-poky/meta/conf/layer.conf
+++ b/import-layers/yocto-poky/meta/conf/layer.conf
@@ -7,11 +7,12 @@
BBFILE_PATTERN_core = "^${LAYERDIR}/"
BBFILE_PRIORITY_core = "5"
+LAYERSERIES_CORENAMES = "sumo"
+
# This should only be incremented on significant changes that will
# cause compatibility issues with other layers
LAYERVERSION_core = "11"
-
-LAYERSERIES_CORENAMES = "rocko"
+LAYERSERIES_COMPAT_core = "sumo"
BBLAYERS_LAYERINDEX_NAME_core = "openembedded-core"
@@ -45,6 +46,11 @@
"
SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
+ *->quilt-native \
+ *->subversion-native \
+ *->git-native \
+ *->ccache-native \
+ *->icecc-create-env-native \
gcc-cross-${TARGET_ARCH}->virtual/${TARGET_PREFIX}libc-for-gcc \
gcc-cross-${TARGET_ARCH}->linux-libc-headers \
ppp-dialin->ppp \
@@ -62,13 +68,14 @@
initramfs-module-install->grub \
initramfs-module-install->parted \
initramfs-module-install->util-linux \
+ grub-efi->grub-bootconf \
liberation-fonts->fontconfig \
cantarell-fonts->fontconfig \
gnome-icon-theme->librsvg \
font-alias->font-util \
+ systemd-boot->systemd-bootconf \
weston-init->weston \
weston-init->kbd \
- oprofile->virtual/kernel \
"
# We need to keep bitbake tools in PATH
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/microblaze/arch-microblaze.inc b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/arch-microblaze.inc
new file mode 100644
index 0000000..eab7171
--- /dev/null
+++ b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/arch-microblaze.inc
@@ -0,0 +1,53 @@
+# MicroBlaze architecture tune feature configuration
+
+# Architecture feature and override
+TUNEVALID[microblaze] = "MicroBlaze"
+MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "microblaze", "microblaze:", "", d)}"
+
+# Endian
+TUNEVALID[bigendian] = "Use Microblaze Big Endian"
+TUNECONFLICTS[bigendian] += "v10.0"
+
+MBPKGARCH_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el", d)}"
+
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "-mbig-endian", "-mlittle-endian", d)}"
+
+# General features
+TUNEVALID[barrel-shift] = "Enable Hardware Barrel Shifter"
+TUNEVALID[pattern-compare] = "Enable Pattern Compare Instructions"
+TUNEVALID[reorder] = "Enable Reorder Instructions"
+TUNECONFLICTS[reorder] += "v8.00 v8.10 v8.20"
+
+# Core configuration tune optimizations
+TUNEVALID[frequency-optimized] = "Enabling tuning for frequency optimized core (AREA_OPTIMIZED_2)"
+TUNECONFLICTS[frequency-optimized] += "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5 v9.6"
+
+# Feature compiler args
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-mxl-barrel-shift", "-mno-xl-barrel-shift", d)}"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-mxl-pattern-compare", "-mno-xl-pattern-compare", d)}"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "frequency-optimized", "-mxl-frequency", "", d)}"
+
+# Disable reorder for v8.30 if pattern-compare is not enabled
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "reorder", \
+ bb.utils.contains("TUNE_FEATURES", "v8.30", \
+ bb.utils.contains("TUNE_FEATURES", "pattern-compare", \
+ "-mxl-reorder", "-mno-xl-reorder", d), \
+ "-mxl-reorder", d), "-mno-xl-reorder", d)}"
+
+# Feature package architecture formatting
+MBPKGARCH_TUNE = ""
+MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-bs", "", d)}"
+MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-cmp", "", d)}"
+MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "reorder", "-re", "", d)}"
+MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "frequency-optimized", "-fo", "", d)}"
+
+# Additional features
+require conf/machine/include/microblaze/feature-microblaze-versions.inc
+require conf/machine/include/microblaze/feature-microblaze-math.inc
+
+# Architecture name, either 'microblazeeb' or 'microblazeel' depending on endianess
+TUNE_ARCH = "microblaze${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el", d)}"
+
+# Package Architecture formatting
+TUNE_PKGARCH = "microblaze${MBPKGARCH_ENDIAN}${MBPKGARCH_VERSION}${MBPKGARCH_TUNE}${MBPKGARCH_MATH}"
+
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-math.inc b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-math.inc
new file mode 100644
index 0000000..a315166
--- /dev/null
+++ b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-math.inc
@@ -0,0 +1,33 @@
+# This include describes the math features (integer and floating point) that
+# are available for the MicroBlaze ISA
+
+TUNEVALID[multiply-low] = "Hardware multipler with 32 bit result"
+TUNEVALID[multiply-high] = "Hardware multipler with 64 bit result"
+TUNEVALID[divide-hard] = "Hardware divider"
+TUNEVALID[fpu-soft] = "Software FPU"
+TUNEVALID[fpu-hard] = "Hardware FPU in basic mode"
+TUNEVALID[fpu-hard-extended] = "Hardware FPU in extended mode (conversion and square root instructions)"
+
+TUNECONFLICTS[fpu-soft] = "fpu-hard fpu-hard-extended"
+TUNECONFLICTS[fpu-hard] = "fpu-soft"
+TUNECONFLICTS[fpu-hard-extended] = "fpu-soft"
+
+# Compiler args
+TUNE_CCARGS += "${@bb.utils.contains_any('TUNE_FEATURES', ['multiply-low', 'multiply-high'], '-mno-xl-soft-mul', '-mxl-soft-mul', d)}"
+TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'multiply-high', '-mxl-multiply-high', '', d)}"
+
+TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'divide-hard', '-mno-xl-soft-div', '-mxl-soft-div', d)}"
+
+TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'fpu-soft', '', '', d)}"
+TUNE_CCARGS += "${@bb.utils.contains_any('TUNE_FEATURES', ['fpu-hard', 'fpu-hard-extended'], '-mhard-float', '', d)}"
+TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard-extended', '-mxl-float-convert -mxl-float-sqrt', '', d)}"
+
+# Set target fpu (bitbake known target) to soft or hard (basic or extended)
+TARGET_FPU = "${@bb.utils.contains_any('TUNE_FEATURES', 'fpu-hard fpu-hard-extended', 'fpu-hard', 'fpu-soft', d)}"
+
+# Package Architecture formatting
+MBPKGARCH_MATH = ""
+MBPKGARCH_MATH .= "${@bb.utils.contains('TUNE_FEATURES', 'multiply-high', '-mh', bb.utils.contains('TUNE_FEATURES', 'multiply-low', '-ml', '', d), d)}"
+MBPKGARCH_MATH .= "${@bb.utils.contains('TUNE_FEATURES', 'divide-hard', '-div', '', d)}"
+MBPKGARCH_MATH .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard-extended', '-fe', bb.utils.contains('TUNE_FEATURES', 'fpu-hard', '-fb', '', d), d)}"
+
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
new file mode 100644
index 0000000..955674f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
@@ -0,0 +1,67 @@
+# MicroBlaze versions are defined as features, the features are setup to
+# conflict with other versions as well as unavailable features for particular
+# versions.
+#
+# Versions before v9.0 of MicroBlaze use a versioning scheme of "vX.YY.Z"
+# (where Z = [abc]). For v8.* versions of MicroBlaze the revision (Z) changes
+# did not affect ABI and are ignored by this tune configuration. Though this
+# format is expected by GCC including the revision, but this is defaulted to
+# ".a".
+#
+# Since v9.0 of MicroBlaze the revision (Z) part of versions was entirely
+# dropped and the version scheme was changed to "vX.Y".
+
+def microblaze_current_version(d, gcc = False):
+ import re
+ # find the current version, and convert it to major/minor integers
+ version = None
+ for t in (d.getVar("TUNE_FEATURES") or "").split():
+ m = re.search("^v(\d+)\.(\d+)", t)
+ if m:
+ version = int(m.group(1)), int(m.group(2))
+ break
+
+ # format the version string in generic or GCC specific formats
+ if version:
+ if version[0] <= 8:
+ return ("v%d.%02d" % version[0:2]) + (".a" if gcc else "")
+ else:
+ return "v%d.%d" % version[0:2]
+ return ""
+
+# MicroBlaze versions
+TUNEVALID[v8.00] = "MicroBlaze version 8.00"
+TUNEVALID[v8.10] = "MicroBlaze version 8.10"
+TUNEVALID[v8.20] = "MicroBlaze version 8.20"
+TUNEVALID[v8.30] = "MicroBlaze version 8.30"
+TUNEVALID[v8.40] = "MicroBlaze version 8.40"
+TUNEVALID[v8.50] = "MicroBlaze version 8.50"
+TUNEVALID[v9.0] = "MicroBlaze version 9.0"
+TUNEVALID[v9.1] = "MicroBlaze version 9.1"
+TUNEVALID[v9.2] = "MicroBlaze version 9.2"
+TUNEVALID[v9.3] = "MicroBlaze version 9.3"
+TUNEVALID[v9.4] = "MicroBlaze version 9.4"
+TUNEVALID[v9.5] = "MicroBlaze version 9.5"
+TUNEVALID[v9.6] = "MicroBlaze version 9.6"
+TUNEVALID[v10.0] = "MicroBlaze version 10.0"
+
+# Version conflict matrix
+TUNECONFLICTS[v8.00] = ""
+TUNECONFLICTS[v8.10] = "v8.00"
+TUNECONFLICTS[v8.20] = "v8.00 v8.10"
+TUNECONFLICTS[v8.30] = "v8.00 v8.10 v8.20"
+TUNECONFLICTS[v8.40] = "v8.00 v8.10 v8.20 v8.30"
+TUNECONFLICTS[v8.50] = "v8.00 v8.10 v8.20 v8.30 v8.40"
+TUNECONFLICTS[v9.0] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50"
+TUNECONFLICTS[v9.1] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0"
+TUNECONFLICTS[v9.2] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1"
+TUNECONFLICTS[v9.3] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2"
+TUNECONFLICTS[v9.4] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3"
+TUNECONFLICTS[v9.5] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4"
+TUNECONFLICTS[v9.6] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5"
+TUNECONFLICTS[v10.0] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5 v9.6"
+
+# Version flags
+TUNE_CCARGS += "-mcpu=${@microblaze_current_version(d, True)}"
+MBPKGARCH_VERSION = "-${@microblaze_current_version(d)}"
+
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/qemu.inc b/import-layers/yocto-poky/meta/conf/machine/include/qemu.inc
index e64b0c8..aa332fe 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/qemu.inc
+++ b/import-layers/yocto-poky/meta/conf/machine/include/qemu.inc
@@ -16,7 +16,7 @@
IMAGE_FSTYPES += "tar.bz2 ext4"
# Don't include kernels in standard images
-RDEPENDS_kernel-base = ""
+RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
# Use a common kernel recipe for all QEMU machines
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
@@ -27,6 +27,4 @@
KERNEL_FEATURES_append_pn-linux-yocto = " features/nfsd/nfsd-enable.scc"
KERNEL_FEATURES_append_pn-linux-yocto-rt = " features/nfsd/nfsd-enable.scc"
-MACHINE_EXTRA_RRECOMMENDS += "rng-tools"
-
IMAGE_CLASSES += "qemuboot"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/tune-core2.inc b/import-layers/yocto-poky/meta/conf/machine/include/tune-core2.inc
index f4ba43f..c686bb4 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/tune-core2.inc
+++ b/import-layers/yocto-poky/meta/conf/machine/include/tune-core2.inc
@@ -8,11 +8,8 @@
#
DEFAULTTUNE ?= "core2-32"
-# Set x86 target arch to i686, so that glibc enables SSE optimised memcpy, etc.
-X86ARCH32 ?= "i686"
-
# Include the previous tune to pull in PACKAGE_EXTRA_ARCHS
-require conf/machine/include/tune-i586.inc
+require conf/machine/include/tune-i686.inc
# Extra tune features
TUNEVALID[core2] = "Enable core2 specific processor optimizations"
@@ -23,16 +20,19 @@
TUNE_FEATURES_tune-core2-32 = "${TUNE_FEATURES_tune-x86} core2"
BASE_LIB_tune-core2-32 = "lib"
TUNE_PKGARCH_tune-core2-32 = "core2-32"
-PACKAGE_EXTRA_ARCHS_tune-core2-32 = "${PACKAGE_EXTRA_ARCHS_tune-i586} core2-32"
+PACKAGE_EXTRA_ARCHS_tune-core2-32 = "${PACKAGE_EXTRA_ARCHS_tune-i686} core2-32"
+QEMU_EXTRAOPTIONS_core2-32 = " -cpu core2duo"
AVAILTUNES += "core2-64"
TUNE_FEATURES_tune-core2-64 = "${TUNE_FEATURES_tune-x86-64} core2"
BASE_LIB_tune-core2-64 = "lib64"
TUNE_PKGARCH_tune-core2-64 = "core2-64"
PACKAGE_EXTRA_ARCHS_tune-core2-64 = "${PACKAGE_EXTRA_ARCHS_tune-x86-64} core2-64"
+QEMU_EXTRAOPTIONS_core2-64 = " -cpu core2duo"
AVAILTUNES += "core2-64-x32"
TUNE_FEATURES_tune-core2-64-x32 = "${TUNE_FEATURES_tune-x86-64-x32} core2"
BASE_LIB_tune-core2-64-x32 = "libx32"
TUNE_PKGARCH_tune-core2-64-x32 = "core2-64-x32"
PACKAGE_EXTRA_ARCHS_tune-core2-64-x32 = "${PACKAGE_EXTRA_ARCHS_tune-x86-64-x32} core2-64-x32"
+QEMU_EXTRAOPTIONS_core2-64-x32 = " -cpu core2duo"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/tune-i686.inc b/import-layers/yocto-poky/meta/conf/machine/include/tune-i686.inc
new file mode 100644
index 0000000..bdb4799
--- /dev/null
+++ b/import-layers/yocto-poky/meta/conf/machine/include/tune-i686.inc
@@ -0,0 +1,27 @@
+#
+# The i686 CPU family was introduced with the Intel Pentium Pro in 1995.
+# It has as required feature flags: fpu tsc cx8 cmov.
+#
+# It is the minimum CPU required by the Debian i386 port.
+# https://lists.debian.org/debian-devel-announce/2016/05/msg00001.html
+#
+#
+
+DEFAULTTUNE ?= "i686"
+
+# Set x86 target arch to i686, so that glibc enables SSE optimised memcpy, etc.
+X86ARCH32 ?= "i686"
+
+# Include the previous tune to pull in PACKAGE_EXTRA_ARCHS
+require conf/machine/include/tune-i586.inc
+
+# Extra tune features
+TUNEVALID[i686] = "Enable i686 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'i686', ' -march=i686', '', d)}"
+
+# Extra tune selections
+AVAILTUNES += "i686"
+TUNE_FEATURES_tune-i686 = "${TUNE_FEATURES_tune-x86} i686"
+BASE_LIB_tune-i686 = "lib"
+TUNE_PKGARCH_tune-i686 = "i686"
+PACKAGE_EXTRA_ARCHS_tune-i686 = "${PACKAGE_EXTRA_ARCHS_tune-i586} i686"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/tune-microblaze.inc b/import-layers/yocto-poky/meta/conf/machine/include/tune-microblaze.inc
new file mode 100644
index 0000000..41f0afe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/conf/machine/include/tune-microblaze.inc
@@ -0,0 +1,8 @@
+DEFAULTTUNE ?= "microblaze"
+
+require conf/machine/include/microblaze/arch-microblaze.inc
+
+AVAILTUNES += "microblaze"
+TUNE_FEATURES_tune-microblaze = "microblaze"
+PACKAGE_EXTRA_ARCHS_tune-microblaze = "${TUNE_PKGARCH}"
+
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/x86-base.inc b/import-layers/yocto-poky/meta/conf/machine/include/x86-base.inc
index 023eb5e..f8aacea 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/x86-base.inc
+++ b/import-layers/yocto-poky/meta/conf/machine/include/x86-base.inc
@@ -21,7 +21,7 @@
# kernel-related variables
#
PREFERRED_PROVIDER_virtual/kernel ??= "linux-yocto"
-PREFERRED_VERSION_linux-yocto ??= "4.12%"
+PREFERRED_VERSION_linux-yocto ??= "4.15%"
#
# XSERVER subcomponents, used to build the XSERVER variable
diff --git a/import-layers/yocto-poky/meta/conf/machine/qemuarm.conf b/import-layers/yocto-poky/meta/conf/machine/qemuarm.conf
index c8932dd..9403b1e 100644
--- a/import-layers/yocto-poky/meta/conf/machine/qemuarm.conf
+++ b/import-layers/yocto-poky/meta/conf/machine/qemuarm.conf
@@ -16,5 +16,5 @@
QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,115200 console=tty"
# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
QB_OPT_APPEND = "-show-cursor -usb -device usb-tablet -device virtio-rng-pci"
-PREFERRED_VERSION_linux-yocto ??= "4.12%"
-QB_DTB = "${@base_version_less_or_equal('PREFERRED_VERSION_linux-yocto', '4.7', '', 'zImage-versatile-pb.dtb', d)}"
+PREFERRED_VERSION_linux-yocto ??= "4.15%"
+QB_DTB = "${@oe.utils.version_less_or_equal('PREFERRED_VERSION_linux-yocto', '4.7', '', 'zImage-versatile-pb.dtb', d)}"
diff --git a/import-layers/yocto-poky/meta/files/common-licenses/BSD-1-Clause b/import-layers/yocto-poky/meta/files/common-licenses/BSD-1-Clause
new file mode 100644
index 0000000..ded8897
--- /dev/null
+++ b/import-layers/yocto-poky/meta/files/common-licenses/BSD-1-Clause
@@ -0,0 +1,9 @@
+
+Copyright (c) <YEAR>, <OWNER>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/import-layers/yocto-poky/meta/files/ptest-perl/run-ptest b/import-layers/yocto-poky/meta/files/ptest-perl/run-ptest
new file mode 100644
index 0000000..c9f9ca9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/files/ptest-perl/run-ptest
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+for case in `find t -type f -name '*.t'`; do
+ perl $case >$case.output 2>&1
+ ret=$?
+ cat $case.output
+ if [ $ret -ne 0 ]; then
+ echo "FAIL: ${case%.t}"
+ elif grep -i 'SKIP' $case.output; then
+ echo "SKIP: ${case%.t}"
+ else
+ echo "PASS: ${case%.t}"
+ fi
+
+ rm -f $case.output
+done
diff --git a/import-layers/yocto-poky/meta/files/toolchain-shar-extract.sh b/import-layers/yocto-poky/meta/files/toolchain-shar-extract.sh
index 91804ec..f7ab430 100644
--- a/import-layers/yocto-poky/meta/files/toolchain-shar-extract.sh
+++ b/import-layers/yocto-poky/meta/files/toolchain-shar-extract.sh
@@ -259,6 +259,14 @@
$SUDO_EXEC rm -f ${env_setup_script%/*}/relocate_sdk.py ${env_setup_script%/*}/relocate_sdk.sh
fi
+# Execute post-relocation script
+post_relocate="$target_sdk_dir/post-relocate-setup.sh"
+if [ -e "$post_relocate" ]; then
+ $SUDO_EXEC sed -e "s:@SDKPATH@:$target_sdk_dir:g" -i $post_relocate
+ $SUDO_EXEC /bin/sh $post_relocate "$target_sdk_dir" "@SDKPATH@"
+ $SUDO_EXEC rm -f $post_relocate
+fi
+
echo "SDK has been successfully set up and is ready to be used."
echo "Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g."
for env_setup_script in `ls $target_sdk_dir/environment-setup-*`; do
diff --git a/import-layers/yocto-poky/meta/lib/oe/buildhistory_analysis.py b/import-layers/yocto-poky/meta/lib/oe/buildhistory_analysis.py
index 3e86a46..b0365ab 100644
--- a/import-layers/yocto-poky/meta/lib/oe/buildhistory_analysis.py
+++ b/import-layers/yocto-poky/meta/lib/oe/buildhistory_analysis.py
@@ -36,10 +36,29 @@
related_fields['RDEPENDS'] = ['DEPENDS']
related_fields['RRECOMMENDS'] = ['DEPENDS']
related_fields['FILELIST'] = ['FILES']
-related_fields['PKGSIZE'] = ['FILELIST']
related_fields['files-in-image.txt'] = ['installed-package-names.txt', 'USER_CLASSES', 'IMAGE_CLASSES', 'ROOTFS_POSTPROCESS_COMMAND', 'IMAGE_POSTPROCESS_COMMAND']
related_fields['installed-package-names.txt'] = ['IMAGE_FEATURES', 'IMAGE_LINGUAS', 'IMAGE_INSTALL', 'BAD_RECOMMENDATIONS', 'NO_RECOMMENDATIONS', 'PACKAGE_EXCLUDE']
+colours = {
+ 'colour_default': '',
+ 'colour_add': '',
+ 'colour_remove': '',
+}
+
+def init_colours(use_colours):
+ global colours
+ if use_colours:
+ colours = {
+ 'colour_default': '\033[0m',
+ 'colour_add': '\033[1;32m',
+ 'colour_remove': '\033[1;31m',
+ }
+ else:
+ colours = {
+ 'colour_default': '',
+ 'colour_add': '',
+ 'colour_remove': '',
+ }
class ChangeRecord:
def __init__(self, path, fieldname, oldvalue, newvalue, monitored):
@@ -79,7 +98,17 @@
for name in adirs - bdirs]
files_ba = [(name, sorted(os.path.basename(item) for item in bitems if os.path.dirname(item) == name)) \
for name in bdirs - adirs]
- renamed_dirs = [(dir1, dir2) for dir1, files1 in files_ab for dir2, files2 in files_ba if files1 == files2]
+ renamed_dirs = []
+ for dir1, files1 in files_ab:
+ rename = False
+ for dir2, files2 in files_ba:
+ if files1 == files2 and not rename:
+ renamed_dirs.append((dir1,dir2))
+ # Make sure that we don't use this (dir, files) pair again.
+ files_ba.remove((dir2,files2))
+ # If a dir has already been found to have a rename, stop and go no further.
+ rename = True
+
# remove files that belong to renamed dirs from aitems and bitems
for dir1, dir2 in renamed_dirs:
aitems = [item for item in aitems if os.path.dirname(item) not in (dir1, dir2)]
@@ -88,6 +117,7 @@
if self.fieldname in list_fields or self.fieldname in list_order_fields:
renamed_dirs = []
+ changed_order = False
if self.fieldname in ['RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RREPLACES', 'RCONFLICTS']:
(depvera, depverb) = compare_pkg_lists(self.oldvalue, self.newvalue)
aitems = pkglist_combine(depvera)
@@ -101,22 +131,33 @@
removed = list(set(aitems) - set(bitems))
added = list(set(bitems) - set(aitems))
+ if not removed and not added:
+ depvera = bb.utils.explode_dep_versions2(self.oldvalue, sort=False)
+ depverb = bb.utils.explode_dep_versions2(self.newvalue, sort=False)
+ for i, j in zip(depvera.items(), depverb.items()):
+ if i[0] != j[0]:
+ changed_order = True
+ break
+
lines = []
if renamed_dirs:
for dfrom, dto in renamed_dirs:
- lines.append('directory renamed %s -> %s' % (dfrom, dto))
+ lines.append('directory renamed {colour_remove}{}{colour_default} -> {colour_add}{}{colour_default}'.format(dfrom, dto, **colours))
if removed or added:
if removed and not bitems:
- lines.append('removed all items "%s"' % ' '.join(removed))
+ lines.append('removed all items "{colour_remove}{}{colour_default}"'.format(' '.join(removed), **colours))
else:
if removed:
- lines.append('removed "%s"' % ' '.join(removed))
+ lines.append('removed "{colour_remove}{value}{colour_default}"'.format(value=' '.join(removed), **colours))
if added:
- lines.append('added "%s"' % ' '.join(added))
+ lines.append('added "{colour_add}{value}{colour_default}"'.format(value=' '.join(added), **colours))
else:
lines.append('changed order')
- out = '%s: %s' % (self.fieldname, ', '.join(lines))
+ if not (removed or added or changed_order):
+ out = ''
+ else:
+ out = '%s: %s' % (self.fieldname, ', '.join(lines))
elif self.fieldname in numeric_fields:
aval = int(self.oldvalue or 0)
@@ -125,9 +166,9 @@
percentchg = ((bval - aval) / float(aval)) * 100
else:
percentchg = 100
- out = '%s changed from %s to %s (%s%d%%)' % (self.fieldname, self.oldvalue or "''", self.newvalue or "''", '+' if percentchg > 0 else '', percentchg)
+ out = '{} changed from {colour_remove}{}{colour_default} to {colour_add}{}{colour_default} ({}{:.0f}%)'.format(self.fieldname, self.oldvalue or "''", self.newvalue or "''", '+' if percentchg > 0 else '', percentchg, **colours)
elif self.fieldname in defaultval_map:
- out = '%s changed from %s to %s' % (self.fieldname, self.oldvalue, self.newvalue)
+ out = '{} changed from {colour_remove}{}{colour_default} to {colour_add}{}{colour_default}'.format(self.fieldname, self.oldvalue, self.newvalue, **colours)
if self.fieldname == 'PKG' and '[default]' in self.newvalue:
out += ' - may indicate debian renaming failure'
elif self.fieldname in ['pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm']:
@@ -163,7 +204,7 @@
else:
out = ''
else:
- out = '%s changed from "%s" to "%s"' % (self.fieldname, self.oldvalue, self.newvalue)
+ out = '{} changed from "{colour_remove}{}{colour_default}" to "{colour_add}{}{colour_default}"'.format(self.fieldname, self.oldvalue, self.newvalue, **colours)
if self.related:
for chg in self.related:
diff --git a/import-layers/yocto-poky/meta/lib/oe/copy_buildsystem.py b/import-layers/yocto-poky/meta/lib/oe/copy_buildsystem.py
index ac2fae1..4b94806 100644
--- a/import-layers/yocto-poky/meta/lib/oe/copy_buildsystem.py
+++ b/import-layers/yocto-poky/meta/lib/oe/copy_buildsystem.py
@@ -95,7 +95,7 @@
destname = os.path.join(layerdestpath, f_basename)
_smart_copy(f, destname)
else:
- if os.path.exists(layerdestpath):
+ if os.path.exists(os.path.join(layerdestpath, 'conf/layer.conf')):
bb.note("Skipping layer %s, already handled" % layer)
else:
_smart_copy(layer, layerdestpath)
diff --git a/import-layers/yocto-poky/meta/lib/oe/gpg_sign.py b/import-layers/yocto-poky/meta/lib/oe/gpg_sign.py
index 9cc88f0..b172729 100644
--- a/import-layers/yocto-poky/meta/lib/oe/gpg_sign.py
+++ b/import-layers/yocto-poky/meta/lib/oe/gpg_sign.py
@@ -12,6 +12,7 @@
self.gpg_path = d.getVar('GPG_PATH')
self.gpg_version = self.get_gpg_version()
self.rpm_bin = bb.utils.which(os.getenv('PATH'), "rpmsign")
+ self.gpg_agent_bin = bb.utils.which(os.getenv('PATH'), "gpg-agent")
def export_pubkey(self, output_file, keyid, armor=True):
"""Export GPG public key to a file"""
@@ -31,7 +32,7 @@
"""Sign RPM files"""
cmd = self.rpm_bin + " --addsign --define '_gpg_name %s' " % keyid
- gpg_args = '--no-permission-warning --batch --passphrase=%s' % passphrase
+ gpg_args = '--no-permission-warning --batch --passphrase=%s --agent-program=%s|--auto-expand-secmem' % (passphrase, self.gpg_agent_bin)
if self.gpg_version > (2,1,):
gpg_args += ' --pinentry-mode=loopback'
cmd += "--define '_gpg_sign_cmd_extra_args %s' " % gpg_args
@@ -71,6 +72,9 @@
if self.gpg_version > (2,1,):
cmd += ['--pinentry-mode', 'loopback']
+ if self.gpg_agent_bin:
+ cmd += ["--agent-program=%s|--auto-expand-secmem" % (self.gpg_agent_bin)]
+
cmd += [input_file]
try:
@@ -99,7 +103,7 @@
import subprocess
try:
ver_str = subprocess.check_output((self.gpg_bin, "--version", "--no-permission-warning")).split()[2].decode("utf-8")
- return tuple([int(i) for i in ver_str.split('.')])
+ return tuple([int(i) for i in ver_str.split("-")[0].split('.')])
except subprocess.CalledProcessError as e:
raise bb.build.FuncFailed("Could not get gpg version: %s" % e)
diff --git a/import-layers/yocto-poky/meta/lib/oe/manifest.py b/import-layers/yocto-poky/meta/lib/oe/manifest.py
index 60c49be..674303c 100644
--- a/import-layers/yocto-poky/meta/lib/oe/manifest.py
+++ b/import-layers/yocto-poky/meta/lib/oe/manifest.py
@@ -274,8 +274,8 @@
if pkg_list is not None:
pkgs[self.var_maps[self.manifest_type][var]] = self.d.getVar(var)
- for pkg_type in pkgs:
- for pkg in pkgs[pkg_type].split():
+ for pkg_type in sorted(pkgs):
+ for pkg in sorted(pkgs[pkg_type].split()):
manifest.write("%s,%s\n" % (pkg_type, pkg))
def create_final(self):
diff --git a/import-layers/yocto-poky/meta/lib/oe/package.py b/import-layers/yocto-poky/meta/lib/oe/package.py
index 1e5c3aa..4f3e21a 100644
--- a/import-layers/yocto-poky/meta/lib/oe/package.py
+++ b/import-layers/yocto-poky/meta/lib/oe/package.py
@@ -72,8 +72,7 @@
# 16 - kernel module
def is_elf(path):
exec_type = 0
- ret, result = oe.utils.getstatusoutput(
- "file \"%s\"" % path.replace("\"", "\\\""))
+ ret, result = oe.utils.getstatusoutput("file -b '%s'" % path)
if ret:
bb.error("split_and_strip_files: 'file %s' failed" % path)
diff --git a/import-layers/yocto-poky/meta/lib/oe/package_manager.py b/import-layers/yocto-poky/meta/lib/oe/package_manager.py
index ed8fec8..2d8aeba 100644
--- a/import-layers/yocto-poky/meta/lib/oe/package_manager.py
+++ b/import-layers/yocto-poky/meta/lib/oe/package_manager.py
@@ -12,6 +12,7 @@
import oe.path
import string
from oe.gpg_sign import get_signer
+import hashlib
# this can be used by all PM backends to create the index files in parallel
def create_index(arg):
@@ -22,12 +23,12 @@
if result:
bb.note(result)
-"""
-This method parse the output from the package managerand return
-a dictionary with the information of the packages. This is used
-when the packages are in deb or ipk format.
-"""
def opkg_query(cmd_output):
+ """
+ This method parse the output from the package managerand return
+ a dictionary with the information of the packages. This is used
+ when the packages are in deb or ipk format.
+ """
verregex = re.compile(' \([=<>]* [^ )]*\)')
output = dict()
pkg = ""
@@ -83,6 +84,11 @@
return output
+# Note: this should be bb.fatal in the future.
+def failed_postinsts_warn(pkgs, log_path):
+ bb.warn("""Intentionally failing postinstall scriptlets of %s to defer them to first boot is deprecated. Please place them into pkg_postinst_ontarget_${PN} ().
+If deferring to first boot wasn't the intent, then scriptlet failure may mean an issue in the recipe, or a regression elsewhere.
+Details of the failure are in %s.""" %(pkgs, log_path))
class Indexer(object, metaclass=ABCMeta):
def __init__(self, d, deploy_dir):
@@ -96,13 +102,16 @@
class RpmIndexer(Indexer):
def write_index(self):
+ self.do_write_index(self.deploy_dir)
+
+ def do_write_index(self, deploy_dir):
if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND'))
else:
signer = None
createrepo_c = bb.utils.which(os.environ['PATH'], "createrepo_c")
- result = create_index("%s --update -q %s" % (createrepo_c, self.deploy_dir))
+ result = create_index("%s --update -q %s" % (createrepo_c, deploy_dir))
if result:
bb.fatal(result)
@@ -110,17 +119,28 @@
if signer:
sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE')
is_ascii_sig = (sig_type.upper() != "BIN")
- signer.detach_sign(os.path.join(self.deploy_dir, 'repodata', 'repomd.xml'),
+ signer.detach_sign(os.path.join(deploy_dir, 'repodata', 'repomd.xml'),
self.d.getVar('PACKAGE_FEED_GPG_NAME'),
self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE'),
armor=is_ascii_sig)
+class RpmSubdirIndexer(RpmIndexer):
+ def write_index(self):
+ bb.note("Generating package index for %s" %(self.deploy_dir))
+ self.do_write_index(self.deploy_dir)
+ for entry in os.walk(self.deploy_dir):
+ if os.path.samefile(self.deploy_dir, entry[0]):
+ for dir in entry[1]:
+ if dir != 'repodata':
+ dir_path = oe.path.join(self.deploy_dir, dir)
+ bb.note("Generating package index for %s" %(dir_path))
+ self.do_write_index(dir_path)
class OpkgIndexer(Indexer):
def write_index(self):
arch_vars = ["ALL_MULTILIB_PACKAGE_ARCHS",
"SDK_PACKAGE_ARCHS",
- "MULTILIB_ARCHS"]
+ ]
opkg_index_cmd = bb.utils.which(os.getenv('PATH'), "opkg-make-index")
if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
@@ -307,39 +327,103 @@
This is an abstract class. Do not instantiate this directly.
"""
- def __init__(self, d):
+ def __init__(self, d, target_rootfs):
self.d = d
+ self.target_rootfs = target_rootfs
self.deploy_dir = None
self.deploy_lock = None
+ self._initialize_intercepts()
- """
- Update the package manager package database.
- """
+ def _initialize_intercepts(self):
+ bb.note("Initializing intercept dir for %s" % self.target_rootfs)
+ postinst_intercepts_dir = self.d.getVar("POSTINST_INTERCEPTS_DIR")
+ if not postinst_intercepts_dir:
+ postinst_intercepts_dir = self.d.expand("${COREBASE}/scripts/postinst-intercepts")
+ # As there might be more than one instance of PackageManager operating at the same time
+ # we need to isolate the intercept_scripts directories from each other,
+ # hence the ugly hash digest in dir name.
+ self.intercepts_dir = os.path.join(self.d.getVar('WORKDIR'),
+ "intercept_scripts-%s" %(hashlib.sha256(self.target_rootfs.encode()).hexdigest()) )
+
+ bb.utils.remove(self.intercepts_dir, True)
+ shutil.copytree(postinst_intercepts_dir, self.intercepts_dir)
+
+ @abstractmethod
+ def _handle_intercept_failure(self, failed_script):
+ pass
+
+ def _postpone_to_first_boot(self, postinst_intercept_hook):
+ with open(postinst_intercept_hook) as intercept:
+ registered_pkgs = None
+ for line in intercept.read().split("\n"):
+ m = re.match("^##PKGS:(.*)", line)
+ if m is not None:
+ registered_pkgs = m.group(1).strip()
+ break
+
+ if registered_pkgs is not None:
+ bb.note("If an image is being built, the postinstalls for the following packages "
+ "will be postponed for first boot: %s" %
+ registered_pkgs)
+
+ # call the backend dependent handler
+ self._handle_intercept_failure(registered_pkgs)
+
+
+ def run_intercepts(self):
+ intercepts_dir = self.intercepts_dir
+
+ bb.note("Running intercept scripts:")
+ os.environ['D'] = self.target_rootfs
+ os.environ['STAGING_DIR_NATIVE'] = self.d.getVar('STAGING_DIR_NATIVE')
+ for script in os.listdir(intercepts_dir):
+ script_full = os.path.join(intercepts_dir, script)
+
+ if script == "postinst_intercept" or not os.access(script_full, os.X_OK):
+ continue
+
+ if script == "delay_to_first_boot":
+ self._postpone_to_first_boot(script_full)
+ continue
+
+ bb.note("> Executing %s intercept ..." % script)
+
+ try:
+ output = subprocess.check_output(script_full, stderr=subprocess.STDOUT)
+ if output: bb.note(output.decode("utf-8"))
+ except subprocess.CalledProcessError as e:
+ bb.warn("The postinstall intercept hook '%s' failed, details in %s/log.do_%s" % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
+ bb.note("Exit code %d. Output:\n%s" % (e.returncode, e.output.decode("utf-8")))
+ self._postpone_to_first_boot(script_full)
+
@abstractmethod
def update(self):
+ """
+ Update the package manager package database.
+ """
pass
- """
- Install a list of packages. 'pkgs' is a list object. If 'attempt_only' is
- True, installation failures are ignored.
- """
@abstractmethod
def install(self, pkgs, attempt_only=False):
+ """
+ Install a list of packages. 'pkgs' is a list object. If 'attempt_only' is
+ True, installation failures are ignored.
+ """
pass
- """
- Remove a list of packages. 'pkgs' is a list object. If 'with_dependencies'
- is False, the any dependencies are left in place.
- """
@abstractmethod
def remove(self, pkgs, with_dependencies=True):
+ """
+ Remove a list of packages. 'pkgs' is a list object. If 'with_dependencies'
+ is False, then any dependencies are left in place.
+ """
pass
- """
- This function creates the index files
- """
@abstractmethod
def write_index(self):
+ """
+ This function creates the index files
+ """
pass
@abstractmethod
@@ -350,30 +434,28 @@
def list_installed(self):
pass
- """
- Returns the path to a tmpdir where resides the contents of a package.
-
- Deleting the tmpdir is responsability of the caller.
-
- """
@abstractmethod
def extract(self, pkg):
+ """
+ Returns the path to a tmpdir where resides the contents of a package.
+ Deleting the tmpdir is responsability of the caller.
+ """
pass
- """
- Add remote package feeds into repository manager configuration. The parameters
- for the feeds are set by feed_uris, feed_base_paths and feed_archs.
- See http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGE_FEED_URIS
- for their description.
- """
@abstractmethod
def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+ """
+ Add remote package feeds into repository manager configuration. The parameters
+ for the feeds are set by feed_uris, feed_base_paths and feed_archs.
+ See http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGE_FEED_URIS
+ for their description.
+ """
pass
- """
- Install all packages that match a glob.
- """
def install_glob(self, globs, sdk=False):
+ """
+ Install all packages that match a glob.
+ """
# TODO don't have sdk here but have a property on the superclass
# (and respect in install_complementary)
if sdk:
@@ -393,14 +475,14 @@
"'%s' returned %d:\n%s" %
(' '.join(cmd), e.returncode, e.output.decode("utf-8")))
- """
- Install complementary packages based upon the list of currently installed
- packages e.g. locales, *-dev, *-dbg, etc. This will only attempt to install
- these packages, if they don't exist then no error will occur. Note: every
- backend needs to call this function explicitly after the normal package
- installation
- """
def install_complementary(self, globs=None):
+ """
+ Install complementary packages based upon the list of currently installed
+ packages e.g. locales, *-dev, *-dbg, etc. This will only attempt to install
+ these packages, if they don't exist then no error will occur. Note: every
+ backend needs to call this function explicitly after the normal package
+ installation
+ """
if globs is None:
globs = self.d.getVar('IMAGE_INSTALL_COMPLEMENTARY')
split_linguas = set()
@@ -457,13 +539,13 @@
self.deploy_lock = None
- """
- Construct URIs based on the following pattern: uri/base_path where 'uri'
- and 'base_path' correspond to each element of the corresponding array
- argument leading to len(uris) x len(base_paths) elements on the returned
- array
- """
def construct_uris(self, uris, base_paths):
+ """
+ Construct URIs based on the following pattern: uri/base_path where 'uri'
+ and 'base_path' correspond to each element of the corresponding array
+ argument leading to len(uris) x len(base_paths) elements on the returned
+ array
+ """
def _append(arr1, arr2, sep='/'):
res = []
narr1 = [a.rstrip(sep) for a in arr1]
@@ -477,18 +559,98 @@
return res
return _append(uris, base_paths)
+def create_packages_dir(d, rpm_repo_dir, deploydir, taskname, filterbydependencies):
+ """
+ Go through our do_package_write_X dependencies and hardlink the packages we depend
+ upon into the repo directory. This prevents us seeing other packages that may
+ have been built that we don't depend upon and also packages for architectures we don't
+ support.
+ """
+ import errno
+
+ taskdepdata = d.getVar("BB_TASKDEPDATA", False)
+ mytaskname = d.getVar("BB_RUNTASK")
+ pn = d.getVar("PN")
+ seendirs = set()
+ multilibs = {}
+
+ rpm_subrepo_dir = oe.path.join(rpm_repo_dir, "rpm")
+
+ bb.utils.remove(rpm_subrepo_dir, recurse=True)
+ bb.utils.mkdirhier(rpm_subrepo_dir)
+
+ # Detect bitbake -b usage
+ nodeps = d.getVar("BB_LIMITEDDEPS") or False
+ if nodeps or not filterbydependencies:
+ oe.path.symlink(deploydir, rpm_subrepo_dir, True)
+ return
+
+ start = None
+ for dep in taskdepdata:
+ data = taskdepdata[dep]
+ if data[1] == mytaskname and data[0] == pn:
+ start = dep
+ break
+ if start is None:
+ bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?")
+ rpmdeps = set()
+ start = [start]
+ seen = set(start)
+ # Support direct dependencies (do_rootfs -> rpms)
+ # or indirect dependencies within PN (do_populate_sdk_ext -> do_rootfs -> rpms)
+ while start:
+ next = []
+ for dep2 in start:
+ for dep in taskdepdata[dep2][3]:
+ if taskdepdata[dep][0] != pn:
+ if "do_" + taskname in dep:
+ rpmdeps.add(dep)
+ elif dep not in seen:
+ next.append(dep)
+ seen.add(dep)
+ start = next
+
+ for dep in rpmdeps:
+ c = taskdepdata[dep][0]
+ manifest, d2 = oe.sstatesig.find_sstate_manifest(c, taskdepdata[dep][2], taskname, d, multilibs)
+ if not manifest:
+ bb.fatal("No manifest generated from: %s in %s" % (c, taskdepdata[dep][2]))
+ if not os.path.exists(manifest):
+ continue
+ with open(manifest, "r") as f:
+ for l in f:
+ l = l.strip()
+ dest = l.replace(deploydir, "")
+ dest = rpm_subrepo_dir + dest
+ if l.endswith("/"):
+ if dest not in seendirs:
+ bb.utils.mkdirhier(dest)
+ seendirs.add(dest)
+ continue
+ # Try to hardlink the file, copy if that fails
+ destdir = os.path.dirname(dest)
+ if destdir not in seendirs:
+ bb.utils.mkdirhier(destdir)
+ seendirs.add(destdir)
+ try:
+ os.link(l, dest)
+ except OSError as err:
+ if err.errno == errno.EXDEV:
+ bb.utils.copyfile(l, dest)
+ else:
+ raise
+
class RpmPM(PackageManager):
def __init__(self,
d,
target_rootfs,
target_vendor,
task_name='target',
- providename=None,
arch_var=None,
os_var=None,
- rpm_repo_workdir="oe-rootfs-repo"):
- super(RpmPM, self).__init__(d)
- self.target_rootfs = target_rootfs
+ rpm_repo_workdir="oe-rootfs-repo",
+ filterbydependencies=True):
+ super(RpmPM, self).__init__(d, target_rootfs)
self.target_vendor = target_vendor
self.task_name = task_name
if arch_var == None:
@@ -501,8 +663,7 @@
self.primary_arch = self.d.getVar('MACHINE_ARCH')
self.rpm_repo_dir = oe.path.join(self.d.getVar('WORKDIR'), rpm_repo_workdir)
- bb.utils.mkdirhier(self.rpm_repo_dir)
- oe.path.symlink(self.d.getVar('DEPLOY_DIR_RPM'), oe.path.join(self.rpm_repo_dir, "rpm"), True)
+ create_packages_dir(self.d, self.rpm_repo_dir, d.getVar("DEPLOY_DIR_RPM"), "package_write_rpm", filterbydependencies)
self.saved_packaging_data = self.d.expand('${T}/saved_packaging_data/%s' % self.task_name)
if not os.path.exists(self.d.expand('${T}/saved_packaging_data')):
@@ -577,7 +738,7 @@
gpg_opts += 'repo_gpgcheck=1\n'
gpg_opts += 'gpgkey=file://%s/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-%s-%s\n' % (self.d.getVar('sysconfdir'), self.d.getVar('DISTRO'), self.d.getVar('DISTRO_CODENAME'))
- if self.d.getVar('RPM_SIGN_PACKAGES') == '0':
+ if self.d.getVar('RPM_SIGN_PACKAGES') != '1':
gpg_opts += 'gpgcheck=0\n'
bb.utils.mkdirhier(oe.path.join(self.target_rootfs, "etc", "yum.repos.d"))
@@ -602,8 +763,7 @@
os.environ['OFFLINE_ROOT'] = self.target_rootfs
os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
- os.environ['INTERCEPT_DIR'] = oe.path.join(self.d.getVar('WORKDIR'),
- "intercept_scripts")
+ os.environ['INTERCEPT_DIR'] = self.intercepts_dir
os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
@@ -628,6 +788,8 @@
if line.startswith("Non-fatal POSTIN scriptlet failure in rpm package"):
failed_scriptlets_pkgnames[line.split()[-1]] = True
+ if len(failed_scriptlets_pkgnames) > 0:
+ failed_postinsts_warn(list(failed_scriptlets_pkgnames.keys()), self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
for pkg in failed_scriptlets_pkgnames.keys():
self.save_rpmpostinst(pkg)
@@ -730,6 +892,7 @@
"--setopt=logdir=%s" % (self.d.getVar('T'))
]
cmd = [dnf_cmd] + standard_dnf_args + dnf_args
+ bb.note('Running %s' % ' '.join(cmd))
try:
output = subprocess.check_output(cmd,stderr=subprocess.STDOUT).decode("utf-8")
if print_output:
@@ -782,6 +945,14 @@
open(saved_script_name, 'w').write(output)
os.chmod(saved_script_name, 0o755)
+ def _handle_intercept_failure(self, registered_pkgs):
+ rpm_postinsts_dir = self.target_rootfs + self.d.expand('${sysconfdir}/rpm-postinsts/')
+ bb.utils.mkdirhier(rpm_postinsts_dir)
+
+ # Save the package postinstalls in /etc/rpm-postinsts
+ for pkg in registered_pkgs.split():
+ self.save_rpmpostinst(pkg)
+
def extract(self, pkg):
output = self._invoke_dnf(["repoquery", "--queryformat", "%{location}", pkg])
pkg_name = output.splitlines()[-1]
@@ -819,18 +990,18 @@
class OpkgDpkgPM(PackageManager):
- """
- This is an abstract class. Do not instantiate this directly.
- """
- def __init__(self, d):
- super(OpkgDpkgPM, self).__init__(d)
+ def __init__(self, d, target_rootfs):
+ """
+ This is an abstract class. Do not instantiate this directly.
+ """
+ super(OpkgDpkgPM, self).__init__(d, target_rootfs)
- """
- Returns a dictionary with the package info.
-
- This method extracts the common parts for Opkg and Dpkg
- """
def package_info(self, pkg, cmd):
+ """
+ Returns a dictionary with the package info.
+
+ This method extracts the common parts for Opkg and Dpkg
+ """
try:
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
@@ -839,14 +1010,14 @@
"returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
return opkg_query(output)
- """
- Returns the path to a tmpdir where resides the contents of a package.
-
- Deleting the tmpdir is responsability of the caller.
-
- This method extracts the common parts for Opkg and Dpkg
- """
def extract(self, pkg, pkg_info):
+ """
+ Returns the path to a tmpdir where resides the contents of a package.
+
+ Deleting the tmpdir is responsability of the caller.
+
+ This method extracts the common parts for Opkg and Dpkg
+ """
ar_cmd = bb.utils.which(os.getenv("PATH"), "ar")
tar_cmd = bb.utils.which(os.getenv("PATH"), "tar")
@@ -885,12 +1056,13 @@
return tmp_dir
+ def _handle_intercept_failure(self, registered_pkgs):
+ self.mark_packages("unpacked", registered_pkgs.split())
class OpkgPM(OpkgDpkgPM):
def __init__(self, d, target_rootfs, config_file, archs, task_name='target'):
- super(OpkgPM, self).__init__(d)
+ super(OpkgPM, self).__init__(d, target_rootfs)
- self.target_rootfs = target_rootfs
self.config_file = config_file
self.pkg_archs = archs
self.task_name = task_name
@@ -921,12 +1093,12 @@
self.indexer = OpkgIndexer(self.d, self.deploy_dir)
- """
- This function will change a package's status in /var/lib/opkg/status file.
- If 'packages' is None then the new_status will be applied to all
- packages
- """
def mark_packages(self, status_tag, packages=None):
+ """
+ This function will change a package's status in /var/lib/opkg/status file.
+ If 'packages' is None then the new_status will be applied to all
+ packages
+ """
status_file = os.path.join(self.opkg_dir, "status")
with open(status_file, "r") as sf:
@@ -1079,8 +1251,7 @@
os.environ['OFFLINE_ROOT'] = self.target_rootfs
os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
- os.environ['INTERCEPT_DIR'] = os.path.join(self.d.getVar('WORKDIR'),
- "intercept_scripts")
+ os.environ['INTERCEPT_DIR'] = self.intercepts_dir
os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
try:
@@ -1088,6 +1259,13 @@
bb.note(cmd)
output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT).decode("utf-8")
bb.note(output)
+ failed_pkgs = []
+ for line in output.split('\n'):
+ if line.endswith("configuration required on target."):
+ bb.warn(line)
+ failed_pkgs.append(line.split(".")[0])
+ if failed_pkgs:
+ failed_postinsts_warn(failed_pkgs, self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
except subprocess.CalledProcessError as e:
(bb.fatal, bb.warn)[attempt_only]("Unable to install packages. "
"Command '%s' returned %d:\n%s" %
@@ -1170,10 +1348,10 @@
# is separated from the following entry
status.write("\n")
- '''
- The following function dummy installs pkgs and returns the log of output.
- '''
def dummy_install(self, pkgs):
+ """
+ The following function dummy installs pkgs and returns the log of output.
+ """
if len(pkgs) == 0:
return
@@ -1228,10 +1406,10 @@
self.opkg_dir,
symlinks=True)
- """
- Returns a dictionary with the package info.
- """
def package_info(self, pkg):
+ """
+ Returns a dictionary with the package info.
+ """
cmd = "%s %s info %s" % (self.opkg_cmd, self.opkg_args, pkg)
pkg_info = super(OpkgPM, self).package_info(pkg, cmd)
@@ -1242,12 +1420,12 @@
return pkg_info
- """
- Returns the path to a tmpdir where resides the contents of a package.
-
- Deleting the tmpdir is responsability of the caller.
- """
def extract(self, pkg):
+ """
+ Returns the path to a tmpdir where resides the contents of a package.
+
+ Deleting the tmpdir is responsability of the caller.
+ """
pkg_info = self.package_info(pkg)
if not pkg_info:
bb.fatal("Unable to get information for package '%s' while "
@@ -1260,8 +1438,7 @@
class DpkgPM(OpkgDpkgPM):
def __init__(self, d, target_rootfs, archs, base_archs, apt_conf_dir=None):
- super(DpkgPM, self).__init__(d)
- self.target_rootfs = target_rootfs
+ super(DpkgPM, self).__init__(d, target_rootfs)
self.deploy_dir = self.d.getVar('DEPLOY_DIR_DEB')
if apt_conf_dir is None:
self.apt_conf_dir = self.d.expand("${APTCONF_TARGET}/apt")
@@ -1281,12 +1458,12 @@
self.indexer = DpkgIndexer(self.d, self.deploy_dir)
- """
- This function will change a package's status in /var/lib/dpkg/status file.
- If 'packages' is None then the new_status will be applied to all
- packages
- """
def mark_packages(self, status_tag, packages=None):
+ """
+ This function will change a package's status in /var/lib/dpkg/status file.
+ If 'packages' is None then the new_status will be applied to all
+ packages
+ """
status_file = self.target_rootfs + "/var/lib/dpkg/status"
with open(status_file, "r") as sf:
@@ -1309,11 +1486,11 @@
os.rename(status_file + ".tmp", status_file)
- """
- Run the pre/post installs for package "package_name". If package_name is
- None, then run all pre/post install scriptlets.
- """
def run_pre_post_installs(self, package_name=None):
+ """
+ Run the pre/post installs for package "package_name". If package_name is
+ None, then run all pre/post install scriptlets.
+ """
info_dir = self.target_rootfs + "/var/lib/dpkg/info"
ControlScript = collections.namedtuple("ControlScript", ["suffix", "name", "argument"])
control_scripts = [
@@ -1335,8 +1512,7 @@
os.environ['OFFLINE_ROOT'] = self.target_rootfs
os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
- os.environ['INTERCEPT_DIR'] = os.path.join(self.d.getVar('WORKDIR'),
- "intercept_scripts")
+ os.environ['INTERCEPT_DIR'] = self.intercepts_dir
os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
failed_pkgs = []
@@ -1351,9 +1527,10 @@
stderr=subprocess.STDOUT).decode("utf-8")
bb.note(output)
except subprocess.CalledProcessError as e:
- bb.note("%s for package %s failed with %d:\n%s" %
+ bb.warn("%s for package %s failed with %d:\n%s" %
(control_script.name, pkg_name, e.returncode,
e.output.decode("utf-8")))
+ failed_postinsts_warn([pkg_name], self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
failed_pkgs.append(pkg_name)
break
@@ -1558,10 +1735,10 @@
def list_installed(self):
return DpkgPkgsList(self.d, self.target_rootfs).list_pkgs()
- """
- Returns a dictionary with the package info.
- """
def package_info(self, pkg):
+ """
+ Returns a dictionary with the package info.
+ """
cmd = "%s show %s" % (self.apt_cache_cmd, pkg)
pkg_info = super(DpkgPM, self).package_info(pkg, cmd)
@@ -1572,12 +1749,12 @@
return pkg_info
- """
- Returns the path to a tmpdir where resides the contents of a package.
-
- Deleting the tmpdir is responsability of the caller.
- """
def extract(self, pkg):
+ """
+ Returns the path to a tmpdir where resides the contents of a package.
+
+ Deleting the tmpdir is responsability of the caller.
+ """
pkg_info = self.package_info(pkg)
if not pkg_info:
bb.fatal("Unable to get information for package '%s' while "
@@ -1592,7 +1769,7 @@
classes = d.getVar('PACKAGE_CLASSES').replace("package_", "").split()
indexer_map = {
- "rpm": (RpmIndexer, d.getVar('DEPLOY_DIR_RPM')),
+ "rpm": (RpmSubdirIndexer, d.getVar('DEPLOY_DIR_RPM')),
"ipk": (OpkgIndexer, d.getVar('DEPLOY_DIR_IPK')),
"deb": (DpkgIndexer, d.getVar('DEPLOY_DIR_DEB'))
}
@@ -1608,12 +1785,3 @@
if result is not None:
bb.fatal(result)
-
-if __name__ == "__main__":
- """
- We should be able to run this as a standalone script, from outside bitbake
- environment.
- """
- """
- TBD
- """
diff --git a/import-layers/yocto-poky/meta/lib/oe/patch.py b/import-layers/yocto-poky/meta/lib/oe/patch.py
index 584bf6c..af7aa52 100644
--- a/import-layers/yocto-poky/meta/lib/oe/patch.py
+++ b/import-layers/yocto-poky/meta/lib/oe/patch.py
@@ -36,6 +36,22 @@
(exitstatus, output) = oe.utils.getstatusoutput(cmd)
if exitstatus != 0:
raise CmdError(cmd, exitstatus >> 8, output)
+ if " fuzz " in output:
+ bb.warn("""
+Some of the context lines in patches were ignored. This can lead to incorrectly applied patches.
+The context lines in the patches can be updated with devtool:
+
+ devtool modify <recipe>
+ devtool finish --force-patch-refresh <recipe> <layer_path>
+
+Then the updated patches and the source tree (in devtool's workspace)
+should be reviewed to make sure the patches apply in the correct place
+and don't introduce duplicate lines (which can, and does happen
+when some of the context is ignored). Further information:
+http://lists.openembedded.org/pipermail/openembedded-core/2018-March/148675.html
+https://bugzilla.yoctoproject.org/show_bug.cgi?id=10450
+Details:
+{}""".format(output))
return output
finally:
@@ -212,7 +228,7 @@
self.patches.insert(i, patch)
def _applypatch(self, patch, force = False, reverse = False, run = True):
- shellcmd = ["cat", patch['file'], "|", "patch", "-p", patch['strippath']]
+ shellcmd = ["cat", patch['file'], "|", "patch", "--no-backup-if-mismatch", "-p", patch['strippath']]
if reverse:
shellcmd.append('-R')
@@ -432,7 +448,7 @@
import re
tempdir = tempfile.mkdtemp(prefix='oepatch')
try:
- shellcmd = ["git", "format-patch", startcommit, "-o", tempdir]
+ shellcmd = ["git", "format-patch", "--no-signature", "--no-numbered", startcommit, "-o", tempdir]
if paths:
shellcmd.append('--')
shellcmd.extend(paths)
diff --git a/import-layers/yocto-poky/meta/lib/oe/path.py b/import-layers/yocto-poky/meta/lib/oe/path.py
index 1ea03d5..76c58fa 100644
--- a/import-layers/yocto-poky/meta/lib/oe/path.py
+++ b/import-layers/yocto-poky/meta/lib/oe/path.py
@@ -237,3 +237,25 @@
raise
return file
+
+def is_path_parent(possible_parent, *paths):
+ """
+ Return True if a path is the parent of another, False otherwise.
+ Multiple paths to test can be specified in which case all
+ specified test paths must be under the parent in order to
+ return True.
+ """
+ def abs_path_trailing(pth):
+ pth_abs = os.path.abspath(pth)
+ if not pth_abs.endswith(os.sep):
+ pth_abs += os.sep
+ return pth_abs
+
+ possible_parent_abs = abs_path_trailing(possible_parent)
+ if not paths:
+ return False
+ for path in paths:
+ path_abs = abs_path_trailing(path)
+ if not path_abs.startswith(possible_parent_abs):
+ return False
+ return True
diff --git a/import-layers/yocto-poky/meta/lib/oe/recipeutils.py b/import-layers/yocto-poky/meta/lib/oe/recipeutils.py
index cab8e40..aa64553 100644
--- a/import-layers/yocto-poky/meta/lib/oe/recipeutils.py
+++ b/import-layers/yocto-poky/meta/lib/oe/recipeutils.py
@@ -22,7 +22,7 @@
# Help us to find places to insert values
recipe_progression = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION', 'LICENSE', 'LICENSE_FLAGS', 'LIC_FILES_CHKSUM', 'PROVIDES', 'DEPENDS', 'PR', 'PV', 'SRCREV', 'SRCPV', 'SRC_URI', 'S', 'do_fetch()', 'do_unpack()', 'do_patch()', 'EXTRA_OECONF', 'EXTRA_OECMAKE', 'EXTRA_OESCONS', 'do_configure()', 'EXTRA_OEMAKE', 'do_compile()', 'do_install()', 'do_populate_sysroot()', 'INITSCRIPT', 'USERADD', 'GROUPADD', 'PACKAGES', 'FILES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RPROVIDES', 'RREPLACES', 'RCONFLICTS', 'ALLOW_EMPTY', 'populate_packages()', 'do_package()', 'do_deploy()']
# Variables that sometimes are a bit long but shouldn't be wrapped
-nowrap_vars = ['SUMMARY', 'HOMEPAGE', 'BUGTRACKER', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]']
+nowrap_vars = ['SUMMARY', 'HOMEPAGE', 'BUGTRACKER', 'SRC_URI\[(.+\.)?md5sum\]', 'SRC_URI\[(.+\.)?sha256sum\]']
list_vars = ['SRC_URI', 'LIC_FILES_CHKSUM']
meta_vars = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION']
@@ -142,6 +142,10 @@
else:
newline = ''
+ nowrap_vars_res = []
+ for item in nowrap_vars:
+ nowrap_vars_res.append(re.compile('^%s$' % item))
+
recipe_progression_res = []
recipe_progression_restrs = []
for item in recipe_progression:
@@ -174,7 +178,12 @@
return
rawtext = '%s = "%s"%s' % (name, values[name], newline)
addlines = []
- if name in nowrap_vars:
+ nowrap = False
+ for nowrap_re in nowrap_vars_res:
+ if nowrap_re.match(name):
+ nowrap = True
+ break
+ if nowrap:
addlines.append(rawtext)
elif name in list_vars:
splitvalue = split_var_value(values[name], assignment=False)
@@ -242,7 +251,7 @@
return changed, tolines
-def patch_recipe_file(fn, values, patch=False, relpath=''):
+def patch_recipe_file(fn, values, patch=False, relpath='', redirect_output=None):
"""Update or insert variable values into a recipe file (assuming you
have already identified the exact file you want to update.)
Note that some manual inspection/intervention may be required
@@ -254,7 +263,11 @@
_, tolines = patch_recipe_lines(fromlines, values)
- if patch:
+ if redirect_output:
+ with open(os.path.join(redirect_output, os.path.basename(fn)), 'w') as f:
+ f.writelines(tolines)
+ return None
+ elif patch:
relfn = os.path.relpath(fn, relpath)
diff = difflib.unified_diff(fromlines, tolines, 'a/%s' % relfn, 'b/%s' % relfn)
return diff
@@ -304,7 +317,7 @@
return filevars
-def patch_recipe(d, fn, varvalues, patch=False, relpath=''):
+def patch_recipe(d, fn, varvalues, patch=False, relpath='', redirect_output=None):
"""Modify a list of variable values in the specified recipe. Handles inc files if
used by the recipe.
"""
@@ -314,7 +327,7 @@
patches = []
for f,v in locs.items():
vals = {k: varvalues[k] for k in v}
- patchdata = patch_recipe_file(f, vals, patch, relpath)
+ patchdata = patch_recipe_file(f, vals, patch, relpath, redirect_output)
if patch:
patches.append(patchdata)
@@ -395,7 +408,7 @@
# fetcher) though note that this only encompasses actual container formats
# i.e. that can contain multiple files as opposed to those that only
# contain a compressed stream (i.e. .tar.gz as opposed to just .gz)
- archive_exts = ['.tar', '.tgz', '.tar.gz', '.tar.Z', '.tbz', '.tbz2', '.tar.bz2', '.tar.xz', '.tar.lz', '.zip', '.jar', '.rpm', '.srpm', '.deb', '.ipk', '.tar.7z', '.7z']
+ archive_exts = ['.tar', '.tgz', '.tar.gz', '.tar.Z', '.tbz', '.tbz2', '.tar.bz2', '.txz', '.tar.xz', '.tar.lz', '.zip', '.jar', '.rpm', '.srpm', '.deb', '.ipk', '.tar.7z', '.7z']
ret = {}
for uri in uris:
if fetch.ud[uri].type == 'file':
@@ -575,7 +588,7 @@
return (appendpath, pathok)
-def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, machine=None, extralines=None, removevalues=None):
+def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, machine=None, extralines=None, removevalues=None, redirect_output=None):
"""
Writes a bbappend file for a recipe
Parameters:
@@ -602,6 +615,9 @@
value pairs, or simply a list of the lines.
removevalues:
Variable values to remove - a dict of names/values.
+ redirect_output:
+ If specified, redirects writing the output file to the
+ specified directory (for dry-run purposes)
"""
if not removevalues:
@@ -616,7 +632,8 @@
bb.warn('Unable to determine correct subdirectory path for bbappend file - check that what %s adds to BBFILES also matches .bbappend files. Using %s for now, but until you fix this the bbappend will not be applied.' % (os.path.join(destlayerdir, 'conf', 'layer.conf'), os.path.dirname(appendpath)))
appenddir = os.path.dirname(appendpath)
- bb.utils.mkdirhier(appenddir)
+ if not redirect_output:
+ bb.utils.mkdirhier(appenddir)
# FIXME check if the bbappend doesn't get overridden by a higher priority layer?
@@ -693,9 +710,18 @@
if instfunclines:
bbappendlines.append(('do_install_append%s()' % appendoverride, '', instfunclines))
- bb.note('Writing append file %s' % appendpath)
+ if redirect_output:
+ bb.note('Writing append file %s (dry-run)' % appendpath)
+ outfile = os.path.join(redirect_output, os.path.basename(appendpath))
+ # Only take a copy if the file isn't already there (this function may be called
+ # multiple times per operation when we're handling overrides)
+ if os.path.exists(appendpath) and not os.path.exists(outfile):
+ shutil.copy2(appendpath, outfile)
+ else:
+ bb.note('Writing append file %s' % appendpath)
+ outfile = appendpath
- if os.path.exists(appendpath):
+ if os.path.exists(outfile):
# Work around lack of nonlocal in python 2
extvars = {'destsubdir': destsubdir}
@@ -767,7 +793,7 @@
if removevalues:
varnames.extend(list(removevalues.keys()))
- with open(appendpath, 'r') as f:
+ with open(outfile, 'r') as f:
(updated, newlines) = bb.utils.edit_metadata(f, varnames, appendfile_varfunc)
destsubdir = extvars['destsubdir']
@@ -784,20 +810,27 @@
updated = True
if updated:
- with open(appendpath, 'w') as f:
+ with open(outfile, 'w') as f:
f.writelines(newlines)
if copyfiles:
if machine:
destsubdir = os.path.join(destsubdir, machine)
+ if redirect_output:
+ outdir = redirect_output
+ else:
+ outdir = appenddir
for newfile, srcfile in copyfiles.items():
- filedest = os.path.join(appenddir, destsubdir, os.path.basename(srcfile))
+ filedest = os.path.join(outdir, destsubdir, os.path.basename(srcfile))
if os.path.abspath(newfile) != os.path.abspath(filedest):
if newfile.startswith(tempfile.gettempdir()):
newfiledisp = os.path.basename(newfile)
else:
newfiledisp = newfile
- bb.note('Copying %s to %s' % (newfiledisp, filedest))
+ if redirect_output:
+ bb.note('Copying %s to %s (dry-run)' % (newfiledisp, os.path.join(appenddir, destsubdir, os.path.basename(srcfile))))
+ else:
+ bb.note('Copying %s to %s' % (newfiledisp, filedest))
bb.utils.mkdirhier(os.path.dirname(filedest))
shutil.copyfile(newfile, filedest)
@@ -867,25 +900,25 @@
FetchError when don't have network access or upstream site don't response.
NoMethodError when uri latest_versionstring method isn't implemented.
- Returns a dictonary with version, type and datetime.
+ Returns a dictonary with version, repository revision, current_version, type and datetime.
Type can be A for Automatic, M for Manual and U for Unknown.
"""
from bb.fetch2 import decodeurl
from datetime import datetime
ru = {}
+ ru['current_version'] = rd.getVar('PV')
ru['version'] = ''
ru['type'] = 'U'
ru['datetime'] = ''
-
- pv = rd.getVar('PV')
+ ru['revision'] = ''
# XXX: If don't have SRC_URI means that don't have upstream sources so
# returns the current recipe version, so that upstream version check
# declares a match.
src_uris = rd.getVar('SRC_URI')
if not src_uris:
- ru['version'] = pv
+ ru['version'] = ru['current_version']
ru['type'] = 'M'
ru['datetime'] = datetime.now()
return ru
@@ -894,6 +927,9 @@
src_uri = src_uris.split()[0]
uri_type, _, _, _, _, _ = decodeurl(src_uri)
+ (pv, pfx, sfx) = get_recipe_pv_without_srcpv(rd.getVar('PV'), uri_type)
+ ru['current_version'] = pv
+
manual_upstream_version = rd.getVar("RECIPE_UPSTREAM_VERSION")
if manual_upstream_version:
# manual tracking of upstream version.
@@ -914,33 +950,22 @@
ru['datetime'] = datetime.now()
else:
ud = bb.fetch2.FetchData(src_uri, rd)
- pupver = ud.method.latest_versionstring(ud, rd)
- (upversion, revision) = pupver
-
- # format git version version+gitAUTOINC+HASH
- if uri_type == 'git':
- (pv, pfx, sfx) = get_recipe_pv_without_srcpv(pv, uri_type)
-
- # if contains revision but not upversion use current pv
- if upversion == '' and revision:
- upversion = pv
-
- if upversion:
- tmp = upversion
- upversion = ''
-
- if pfx:
- upversion = pfx + tmp
- else:
- upversion = tmp
-
- if sfx:
- upversion = upversion + sfx + revision[:10]
+ if rd.getVar("UPSTREAM_CHECK_COMMITS") == "1":
+ revision = ud.method.latest_revision(ud, rd, 'default')
+ upversion = pv
+ if revision != rd.getVar("SRCREV"):
+ upversion = upversion + "-new-commits-available"
+ else:
+ pupver = ud.method.latest_versionstring(ud, rd)
+ (upversion, revision) = pupver
if upversion:
ru['version'] = upversion
ru['type'] = 'A'
+ if revision:
+ ru['revision'] = revision
+
ru['datetime'] = datetime.now()
return ru
diff --git a/import-layers/yocto-poky/meta/lib/oe/rootfs.py b/import-layers/yocto-poky/meta/lib/oe/rootfs.py
index 754ef56..f8f717c 100644
--- a/import-layers/yocto-poky/meta/lib/oe/rootfs.py
+++ b/import-layers/yocto-poky/meta/lib/oe/rootfs.py
@@ -92,10 +92,6 @@
self.d.getVar('PACKAGE_FEED_ARCHS'))
- @abstractmethod
- def _handle_intercept_failure(self, failed_script):
- pass
-
"""
The _cleanup() method should be used to clean-up stuff that we don't really
want to end up on target. For example, in the case of RPM, the DB locks.
@@ -178,20 +174,10 @@
post_process_cmds = self.d.getVar("ROOTFS_POSTPROCESS_COMMAND")
rootfs_post_install_cmds = self.d.getVar('ROOTFS_POSTINSTALL_COMMAND')
- postinst_intercepts_dir = self.d.getVar("POSTINST_INTERCEPTS_DIR")
- if not postinst_intercepts_dir:
- postinst_intercepts_dir = self.d.expand("${COREBASE}/scripts/postinst-intercepts")
- intercepts_dir = os.path.join(self.d.getVar('WORKDIR'),
- "intercept_scripts")
-
- bb.utils.remove(intercepts_dir, True)
-
bb.utils.mkdirhier(self.image_rootfs)
bb.utils.mkdirhier(self.deploydir)
- shutil.copytree(postinst_intercepts_dir, intercepts_dir)
-
execute_pre_post_process(self.d, pre_process_cmds)
if self.progress_reporter:
@@ -207,7 +193,7 @@
execute_pre_post_process(self.d, rootfs_post_install_cmds)
- self._run_intercepts()
+ self.pm.run_intercepts()
execute_pre_post_process(self.d, post_process_cmds)
@@ -293,44 +279,6 @@
# Remove the package manager data files
self.pm.remove_packaging_data()
- def _run_intercepts(self):
- intercepts_dir = os.path.join(self.d.getVar('WORKDIR'),
- "intercept_scripts")
-
- bb.note("Running intercept scripts:")
- os.environ['D'] = self.image_rootfs
- os.environ['STAGING_DIR_NATIVE'] = self.d.getVar('STAGING_DIR_NATIVE')
- for script in os.listdir(intercepts_dir):
- script_full = os.path.join(intercepts_dir, script)
-
- if script == "postinst_intercept" or not os.access(script_full, os.X_OK):
- continue
-
- bb.note("> Executing %s intercept ..." % script)
-
- try:
- output = subprocess.check_output(script_full, stderr=subprocess.STDOUT)
- if output: bb.note(output.decode("utf-8"))
- except subprocess.CalledProcessError as e:
- bb.warn("The postinstall intercept hook '%s' failed, details in log.do_rootfs" % script)
- bb.note("Exit code %d. Output:\n%s" % (e.returncode, e.output.decode("utf-8")))
-
- with open(script_full) as intercept:
- registered_pkgs = None
- for line in intercept.read().split("\n"):
- m = re.match("^##PKGS:(.*)", line)
- if m is not None:
- registered_pkgs = m.group(1).strip()
- break
-
- if registered_pkgs is not None:
- bb.warn("The postinstalls for the following packages "
- "will be postponed for first boot: %s" %
- registered_pkgs)
-
- # call the backend dependent handler
- self._handle_intercept_failure(registered_pkgs)
-
def _run_ldconfig(self):
if self.d.getVar('LDCONFIGDEPEND'):
bb.note("Executing: ldconfig -r" + self.image_rootfs + "-c new -v")
@@ -523,14 +471,6 @@
self._log_check_warn()
self._log_check_error()
- def _handle_intercept_failure(self, registered_pkgs):
- rpm_postinsts_dir = self.image_rootfs + self.d.expand('${sysconfdir}/rpm-postinsts/')
- bb.utils.mkdirhier(rpm_postinsts_dir)
-
- # Save the package postinstalls in /etc/rpm-postinsts
- for pkg in registered_pkgs.split():
- self.pm.save_rpmpostinst(pkg)
-
def _cleanup(self):
self.pm._invoke_dnf(["clean", "all"])
@@ -711,9 +651,6 @@
src_postinst_dir = self.d.expand("${IMAGE_ROOTFS}/var/lib/dpkg/info")
return self._save_postinsts_common(dst_postinst_dir, src_postinst_dir)
- def _handle_intercept_failure(self, registered_pkgs):
- self.pm.mark_packages("unpacked", registered_pkgs.split())
-
def _log_check(self):
self._log_check_warn()
self._log_check_error()
@@ -982,9 +919,6 @@
src_postinst_dir = self.d.expand("${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg/info")
return self._save_postinsts_common(dst_postinst_dir, src_postinst_dir)
- def _handle_intercept_failure(self, registered_pkgs):
- self.pm.mark_packages("unpacked", registered_pkgs.split())
-
def _log_check(self):
self._log_check_warn()
self._log_check_error()
diff --git a/import-layers/yocto-poky/meta/lib/oe/sdk.py b/import-layers/yocto-poky/meta/lib/oe/sdk.py
index 7f71cfb..d6a5033 100644
--- a/import-layers/yocto-poky/meta/lib/oe/sdk.py
+++ b/import-layers/yocto-poky/meta/lib/oe/sdk.py
@@ -162,40 +162,21 @@
self.host_manifest = RpmManifest(d, self.manifest_dir,
Manifest.MANIFEST_TYPE_SDK_HOST)
- target_providename = ['/bin/sh',
- '/bin/bash',
- '/usr/bin/env',
- '/usr/bin/perl',
- 'pkgconfig'
- ]
-
rpm_repo_workdir = "oe-sdk-repo"
if "sdk_ext" in d.getVar("BB_RUNTASK"):
rpm_repo_workdir = "oe-sdk-ext-repo"
-
self.target_pm = RpmPM(d,
self.sdk_target_sysroot,
self.d.getVar('TARGET_VENDOR'),
'target',
- target_providename,
rpm_repo_workdir=rpm_repo_workdir
)
- sdk_providename = ['/bin/sh',
- '/bin/bash',
- '/usr/bin/env',
- '/usr/bin/perl',
- 'pkgconfig',
- 'libGL.so()(64bit)',
- 'libGL.so'
- ]
-
self.host_pm = RpmPM(d,
self.sdk_host_sysroot,
self.d.getVar('SDK_VENDOR'),
'host',
- sdk_providename,
"SDK_PACKAGE_ARCHS",
"SDK_OS",
rpm_repo_workdir=rpm_repo_workdir
@@ -228,6 +209,8 @@
self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
+ self.target_pm.run_intercepts()
+
execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
@@ -237,6 +220,8 @@
self._populate_sysroot(self.host_pm, self.host_manifest)
self.install_locales(self.host_pm)
+ self.host_pm.run_intercepts()
+
execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
@@ -312,6 +297,8 @@
self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
+ self.target_pm.run_intercepts()
+
execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
@@ -321,6 +308,8 @@
self._populate_sysroot(self.host_pm, self.host_manifest)
self.install_locales(self.host_pm)
+ self.host_pm.run_intercepts()
+
execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
@@ -397,6 +386,8 @@
self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
+ self.target_pm.run_intercepts()
+
execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
self._copy_apt_dir_to(os.path.join(self.sdk_target_sysroot, "etc", "apt"))
@@ -408,6 +399,8 @@
self._populate_sysroot(self.host_pm, self.host_manifest)
self.install_locales(self.host_pm)
+ self.host_pm.run_intercepts()
+
execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
self._copy_apt_dir_to(os.path.join(self.sdk_output, self.sdk_native_path,
diff --git a/import-layers/yocto-poky/meta/lib/oe/sstatesig.py b/import-layers/yocto-poky/meta/lib/oe/sstatesig.py
index 3a8778e..b82e0f4 100644
--- a/import-layers/yocto-poky/meta/lib/oe/sstatesig.py
+++ b/import-layers/yocto-poky/meta/lib/oe/sstatesig.py
@@ -1,4 +1,5 @@
import bb.siggen
+import oe
def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
# Return True if we should keep the dependency, False to drop it
@@ -28,15 +29,14 @@
return False
return True
- # Quilt (patch application) changing isn't likely to affect anything
- excludelist = ['quilt-native', 'subversion-native', 'git-native', 'ccache-native']
- if depname in excludelist and recipename != depname:
- return False
-
# Exclude well defined recipe->dependency
if "%s->%s" % (recipename, depname) in siggen.saferecipedeps:
return False
+ # Check for special wildcard
+ if "*->%s" % depname in siggen.saferecipedeps and recipename != depname:
+ return False
+
# Don't change native/cross/nativesdk recipe dependencies any further
if isNative(recipename) or isCross(recipename) or isNativeSDK(recipename):
return True
@@ -368,3 +368,37 @@
if extrainf:
d2.setVar("SSTATE_MANMACH", extrainf)
return (d2.expand("${SSTATE_MANFILEPREFIX}.%s" % task), d2)
+
+def find_sstate_manifest(taskdata, taskdata2, taskname, d, multilibcache):
+ d2 = d
+ variant = ''
+ if taskdata2.startswith("virtual:multilib"):
+ variant = taskdata2.split(":")[2]
+ if variant not in multilibcache:
+ multilibcache[variant] = oe.utils.get_multilib_datastore(variant, d)
+ d2 = multilibcache[variant]
+
+ if taskdata.endswith("-native"):
+ pkgarchs = ["${BUILD_ARCH}"]
+ elif taskdata.startswith("nativesdk-"):
+ pkgarchs = ["${SDK_ARCH}_${SDK_OS}", "allarch"]
+ elif "-cross-canadian" in taskdata:
+ pkgarchs = ["${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX}"]
+ elif "-cross-" in taskdata:
+ pkgarchs = ["${BUILD_ARCH}_${TARGET_ARCH}"]
+ elif "-crosssdk" in taskdata:
+ pkgarchs = ["${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}"]
+ else:
+ pkgarchs = ['${MACHINE_ARCH}']
+ pkgarchs = pkgarchs + list(reversed(d2.getVar("PACKAGE_EXTRA_ARCHS").split()))
+ pkgarchs.append('allarch')
+ pkgarchs.append('${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX}')
+
+ for pkgarch in pkgarchs:
+ manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-%s-%s.%s" % (pkgarch, taskdata, taskname))
+ if os.path.exists(manifest):
+ return manifest, d2
+ bb.warn("Manifest %s not found in %s (variant '%s')?" % (manifest, d2.expand(" ".join(pkgarchs)), variant))
+ return None, d2
+
+
diff --git a/import-layers/yocto-poky/meta/lib/oe/utils.py b/import-layers/yocto-poky/meta/lib/oe/utils.py
index 643ab78..80f0442 100644
--- a/import-layers/yocto-poky/meta/lib/oe/utils.py
+++ b/import-layers/yocto-poky/meta/lib/oe/utils.py
@@ -86,17 +86,6 @@
from re import match
return " ".join([x for x in str.split() if not match(f, x, 0)])
-def param_bool(cfg, field, dflt = None):
- """Lookup <field> in <cfg> map and convert it to a boolean; take
- <dflt> when this <field> does not exist"""
- value = cfg.get(field, dflt)
- strvalue = str(value).lower()
- if strvalue in ('yes', 'y', 'true', 't', '1'):
- return True
- elif strvalue in ('no', 'n', 'false', 'f', '0'):
- return False
- raise ValueError("invalid value for boolean parameter '%s': '%s'" % (field, value))
-
def build_depends_string(depends, task):
"""Append a taskname to a string of dependencies as used by the [depends] flag"""
return " ".join(dep + ":" + task for dep in depends.split())
@@ -167,6 +156,49 @@
"""
return bb.utils.contains_any("DISTRO_FEATURES", features, truevalue, falsevalue, d)
+def parallel_make(d):
+ """
+ Return the integer value for the number of parallel threads to use when
+ building, scraped out of PARALLEL_MAKE. If no parallelization option is
+ found, returns None
+
+ e.g. if PARALLEL_MAKE = "-j 10", this will return 10 as an integer.
+ """
+ pm = (d.getVar('PARALLEL_MAKE') or '').split()
+ # look for '-j' and throw other options (e.g. '-l') away
+ while pm:
+ opt = pm.pop(0)
+ if opt == '-j':
+ v = pm.pop(0)
+ elif opt.startswith('-j'):
+ v = opt[2:].strip()
+ else:
+ continue
+
+ return int(v)
+
+ return None
+
+def parallel_make_argument(d, fmt, limit=None):
+ """
+ Helper utility to construct a parallel make argument from the number of
+ parallel threads specified in PARALLEL_MAKE.
+
+ Returns the input format string `fmt` where a single '%d' will be expanded
+ with the number of parallel threads to use. If `limit` is specified, the
+ number of parallel threads will be no larger than it. If no parallelization
+ option is found in PARALLEL_MAKE, returns an empty string
+
+ e.g. if PARALLEL_MAKE = "-j 10", parallel_make_argument(d, "-n %d") will return
+ "-n 10"
+ """
+ v = parallel_make(d)
+ if v:
+ if limit:
+ v = min(limit, v)
+ return fmt % v
+ return ''
+
def packages_filter_out_system(d):
"""
Return a list of packages from PACKAGES with the "system" packages such as
@@ -292,6 +324,14 @@
version = match.group(1)
return "-%s" % version if version in ("4.8", "4.9") else ""
+
+def get_multilib_datastore(variant, d):
+ localdata = bb.data.createCopy(d)
+ overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + variant
+ localdata.setVar("OVERRIDES", overrides)
+ localdata.setVar("MLPREFIX", variant + "-")
+ return localdata
+
#
# Python 2.7 doesn't have threaded pools (just multiprocessing)
# so implement a version here
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/buildperf/base.py b/import-layers/yocto-poky/meta/lib/oeqa/buildperf/base.py
index 7b2b4aa..ac6ee15 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/buildperf/base.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/buildperf/base.py
@@ -282,7 +282,7 @@
if not os.path.isdir(self.tmp_dir):
os.mkdir(self.tmp_dir)
if self.build_target:
- self.run_cmd(['bitbake', self.build_target, '-c', 'fetchall'])
+ self.run_cmd(['bitbake', self.build_target, '--runall=fetch'])
def tearDown(self):
"""Tear-down fixture for each test"""
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/buildperf/test_basic.py b/import-layers/yocto-poky/meta/lib/oeqa/buildperf/test_basic.py
index a19089a..6d6b01b 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/buildperf/test_basic.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/buildperf/test_basic.py
@@ -15,8 +15,7 @@
import oe.path
from oeqa.buildperf import BuildPerfTestCase
-from oeqa.utils.commands import get_bb_vars
-
+from oeqa.utils.commands import get_bb_var, get_bb_vars
class Test1P1(BuildPerfTestCase):
build_target = 'core-image-sato'
@@ -30,6 +29,7 @@
self.measure_cmd_resources(['bitbake', self.build_target], 'build',
'bitbake ' + self.build_target, save_bs=True)
self.measure_disk_usage(self.bb_vars['TMPDIR'], 'tmpdir', 'tmpdir')
+ self.measure_disk_usage(get_bb_var("IMAGE_ROOTFS", self.build_target), 'rootfs', 'rootfs', True)
class Test1P2(BuildPerfTestCase):
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/core/loader.py b/import-layers/yocto-poky/meta/lib/oeqa/core/loader.py
index 975a081..a4744de 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/core/loader.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/core/loader.py
@@ -43,7 +43,7 @@
for module in modules:
# Assumption: package and module names do not contain upper case
# characters, whereas class names do
- m = re.match(r'^([^A-Z]+)(?:\.([A-Z][^.]*)(?:\.([^.]+))?)?$', module)
+ m = re.match(r'^(\w+)(?:\.(\w[^.]*)(?:\.([^.]+))?)?$', module, flags=re.ASCII)
module_name, class_name, test_name = m.groups()
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/core/target/qemu.py b/import-layers/yocto-poky/meta/lib/oeqa/core/target/qemu.py
index d359bf9..bf3b633 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/core/target/qemu.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/core/target/qemu.py
@@ -9,7 +9,7 @@
from .ssh import OESSHTarget
from oeqa.utils.qemurunner import QemuRunner
-supported_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic', 'elf']
+supported_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic']
class OEQemuTarget(OESSHTarget):
def __init__(self, logger, ip, server_ip, timeout=300, user='root',
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/apt.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/apt.py
new file mode 100644
index 0000000..8d4dd35
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/apt.py
@@ -0,0 +1,47 @@
+import os
+from oeqa.utils.httpserver import HTTPService
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class AptTest(OERuntimeTestCase):
+
+ def pkg(self, command, expected = 0):
+ command = 'apt-get %s' % command
+ status, output = self.target.run(command, 1500)
+ message = os.linesep.join([command, output])
+ self.assertEqual(status, expected, message)
+ return output
+
+class AptRepoTest(AptTest):
+
+ @classmethod
+ def setUpClass(cls):
+ service_repo = os.path.join(cls.tc.td['DEPLOY_DIR_DEB'], 'all')
+ cls.repo_server = HTTPService(service_repo, cls.tc.target.server_ip)
+ cls.repo_server.start()
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.repo_server.stop()
+
+ def setup_source_config_for_package_install(self):
+ apt_get_source_server = 'http://%s:%s/' % (self.tc.target.server_ip, self.repo_server.port)
+ apt_get_sourceslist_dir = '/etc/apt/'
+ self.target.run('cd %s; echo deb %s ./ > sources.list' % (apt_get_sourceslist_dir, apt_get_source_server))
+
+ def cleanup_source_config_for_package_install(self):
+ apt_get_sourceslist_dir = '/etc/apt/'
+ self.target.run('cd %s; rm sources.list' % (apt_get_sourceslist_dir))
+
+ @skipIfNotFeature('package-management',
+ 'Test requires package-management to be in IMAGE_FEATURES')
+ @skipIfNotDataVar('IMAGE_PKGTYPE', 'deb',
+ 'DEB is not the primary package manager')
+ @OEHasPackage(['apt'])
+ def test_apt_install_from_repo(self):
+ self.setup_source_config_for_package_install()
+ self.pkg('update')
+ self.pkg('remove --yes run-postinsts-dev')
+ self.pkg('install --yes --allow-unauthenticated run-postinsts-dev')
+ self.cleanup_source_config_for_package_install()
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/gi.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/gi.py
new file mode 100644
index 0000000..19073e5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/gi.py
@@ -0,0 +1,15 @@
+import os
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class GObjectIntrospectionTest(OERuntimeTestCase):
+
+ @OETestDepends(["ssh.SSHTest.test_ssh"])
+ @OEHasPackage(["python3-pygobject"])
+ def test_python(self):
+ script = """from gi.repository import GObject; print(GObject.markup_escape_text("<testing&testing>"))"""
+ status, output = self.target.run("python3 -c '%s'" % script)
+ self.assertEqual(status, 0, msg="Python failed (%s)" % (output))
+ self.assertEqual(output, "<testing&testing>", msg="Unexpected output (%s)" % output)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/kernelmodule.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/kernelmodule.py
index 11ad7b7..de1a5aa 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/kernelmodule.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/kernelmodule.py
@@ -28,7 +28,7 @@
@OETestDepends(['gcc.GccCompileTest.test_gcc_compile'])
def test_kernel_module(self):
cmds = [
- 'cd /usr/src/kernel && make scripts',
+ 'cd /usr/src/kernel && make scripts prepare',
'cd /tmp && make',
'cd /tmp && insmod hellomod.ko',
'lsmod | grep hellomod',
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/opkg.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/opkg.py
new file mode 100644
index 0000000..671ee06
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/opkg.py
@@ -0,0 +1,47 @@
+import os
+from oeqa.utils.httpserver import HTTPService
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class OpkgTest(OERuntimeTestCase):
+
+ def pkg(self, command, expected = 0):
+ command = 'opkg %s' % command
+ status, output = self.target.run(command, 1500)
+ message = os.linesep.join([command, output])
+ self.assertEqual(status, expected, message)
+ return output
+
+class OpkgRepoTest(OpkgTest):
+
+ @classmethod
+ def setUpClass(cls):
+ service_repo = os.path.join(cls.tc.td['DEPLOY_DIR_IPK'], 'all')
+ cls.repo_server = HTTPService(service_repo, cls.tc.target.server_ip)
+ cls.repo_server.start()
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.repo_server.stop()
+
+ def setup_source_config_for_package_install(self):
+ apt_get_source_server = 'http://%s:%s/' % (self.tc.target.server_ip, self.repo_server.port)
+ apt_get_sourceslist_dir = '/etc/opkg/'
+ self.target.run('cd %s; echo src/gz all %s >> opkg.conf' % (apt_get_sourceslist_dir, apt_get_source_server))
+
+ def cleanup_source_config_for_package_install(self):
+ apt_get_sourceslist_dir = '/etc/opkg/'
+ self.target.run('cd %s; sed -i "/^src/d" opkg.conf' % (apt_get_sourceslist_dir))
+
+ @skipIfNotFeature('package-management',
+ 'Test requires package-management to be in IMAGE_FEATURES')
+ @skipIfNotDataVar('IMAGE_PKGTYPE', 'ipk',
+ 'IPK is not the primary package manager')
+ @OEHasPackage(['opkg'])
+ def test_opkg_install_from_repo(self):
+ self.setup_source_config_for_package_install()
+ self.pkg('update')
+ self.pkg('remove run-postinsts-dev')
+ self.pkg('install run-postinsts-dev')
+ self.cleanup_source_config_for_package_install()
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/ptest.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/ptest.py
index ec8c038..f60a433 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/ptest.py
@@ -48,9 +48,12 @@
@OETestID(1600)
@skipIfNotFeature('ptest', 'Test requires ptest to be in DISTRO_FEATURES')
- @skipIfNotFeature('ptest-pkgs', 'Test requires ptest-pkgs to be in IMAGE_FEATURES')
@OETestDepends(['ssh.SSHTest.test_ssh'])
def test_ptestrunner(self):
+ status, output = self.target.run('which ptest-runner', 0)
+ if status != 0:
+ self.skipTest("No -ptest packages are installed in the image")
+
import datetime
test_log_dir = self.td.get('TEST_LOG_DIR', '')
@@ -80,3 +83,11 @@
# Remove the old link to create a new one
os.remove(ptest_log_dir_link)
os.symlink(os.path.basename(ptest_log_dir), ptest_log_dir_link)
+
+ failed_tests = {}
+ for section in parse_result.result_dict:
+ failed_testcases = [ test for test, result in parse_result.result_dict[section] if result == 'fail' ]
+ if failed_testcases:
+ failed_tests[section] = failed_testcases
+
+ self.assertFalse(failed_tests, msg = "Failed ptests: %s" %(str(failed_tests)))
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/stap.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/stap.py
new file mode 100644
index 0000000..fc728bf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/stap.py
@@ -0,0 +1,33 @@
+import os
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.oeid import OETestID
+from oeqa.core.decorator.data import skipIfNotFeature
+
+class StapTest(OERuntimeTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ src = os.path.join(cls.tc.runtime_files_dir, 'hello.stp')
+ dst = '/tmp/hello.stp'
+ cls.tc.target.copyTo(src, dst)
+
+ @classmethod
+ def tearDownClass(cls):
+ files = '/tmp/hello.stp'
+ cls.tc.target.run('rm %s' % files)
+
+ @OETestID(1652)
+ @skipIfNotFeature('tools-profile',
+ 'Test requires tools-profile to be in IMAGE_FEATURES')
+ @OETestDepends(['kernelmodule.KernelModuleTest.test_kernel_module'])
+ def test_stap(self):
+ cmds = [
+ 'cd /usr/src/kernel && make scripts prepare',
+ 'cd /lib/modules/`uname -r` && (if [ ! -L build ]; then ln -s /usr/src/kernel build; fi)',
+ 'stap --disable-cache -DSTP_NO_VERREL_CHECK /tmp/hello.stp'
+ ]
+ for cmd in cmds:
+ status, output = self.target.run(cmd, 900)
+ self.assertEqual(status, 0, msg='\n'.join([cmd, output]))
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/files/hello.stp b/import-layers/yocto-poky/meta/lib/oeqa/runtime/files/hello.stp
new file mode 100644
index 0000000..3677147
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/files/hello.stp
@@ -0,0 +1 @@
+probe oneshot { println("hello world") }
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/archiver.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/archiver.py
index f61a522..0a6d4e3 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/archiver.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/archiver.py
@@ -116,3 +116,16 @@
excluded_present = len(glob.glob(src_path_target + '/%s-*' % target_recipes[1]))
self.assertFalse(excluded_present, 'Recipe %s was not excluded.' % target_recipes[1])
+
+
+
+ def test_archiver_srpm_mode(self):
+ """
+ Test that in srpm mode, the added recipe dependencies at least exist/work [YOCTO #11121]
+ """
+
+ features = 'INHERIT += "archiver"\n'
+ features += 'ARCHIVER_MODE[srpm] = "1"\n'
+ self.write_config(features)
+
+ bitbake('-n core-image-sato')
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/bbtests.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/bbtests.py
index 4c82049..3506149 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -64,15 +64,14 @@
@OETestID(108)
def test_invalid_patch(self):
- # This patch already exists in SRC_URI so adding it again will cause the
- # patch to fail.
- self.write_recipeinc('man', 'SRC_URI += "file://man-1.5h1-make.patch"')
+ # This patch should fail to apply.
+ self.write_recipeinc('man-db', 'FILESEXTRAPATHS_prepend := "${THISDIR}/files:"\nSRC_URI += "file://0001-Test-patch-here.patch"')
self.write_config("INHERIT_remove = \"report-error\"")
- result = bitbake('man -c patch', ignore_status=True)
- self.delete_recipeinc('man')
- bitbake('-cclean man')
+ result = bitbake('man-db -c patch', ignore_status=True)
+ self.delete_recipeinc('man-db')
+ bitbake('-cclean man-db')
line = self.getline(result, "Function failed: patch_do_patch")
- self.assertTrue(line and line.startswith("ERROR:"), msg = "Repeated patch application didn't fail. bitbake output: %s" % result.output)
+ self.assertTrue(line and line.startswith("ERROR:"), msg = "Incorrectly formed patch application didn't fail. bitbake output: %s" % result.output)
@OETestID(1354)
def test_force_task_1(self):
@@ -132,17 +131,17 @@
@OETestID(168)
def test_invalid_recipe_src_uri(self):
data = 'SRC_URI = "file://invalid"'
- self.write_recipeinc('man', data)
+ self.write_recipeinc('man-db', data)
self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
SSTATE_DIR = \"${TOPDIR}/download-selftest\"
INHERIT_remove = \"report-error\"
""")
self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
- bitbake('-ccleanall man')
- result = bitbake('-c fetch man', ignore_status=True)
- bitbake('-ccleanall man')
- self.delete_recipeinc('man')
+ bitbake('-ccleanall man-db')
+ result = bitbake('-c fetch man-db', ignore_status=True)
+ 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)
@@ -222,9 +221,9 @@
INHERIT_remove = \"report-error\"
""")
self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
- self.write_recipeinc('man',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" )
- runCmd('bitbake -c cleanall man xcursor-transparent-theme')
- result = runCmd('bitbake -c unpack -k man xcursor-transparent-theme', ignore_status=True)
+ self.write_recipeinc('man-db',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" )
+ runCmd('bitbake -c cleanall man-db xcursor-transparent-theme')
+ result = runCmd('bitbake -c unpack -k man-db xcursor-transparent-theme', ignore_status=True)
errorpos = result.output.find('ERROR: Function failed: do_fail_task')
manver = re.search("NOTE: recipe xcursor-transparent-theme-(.*?): task do_unpack: Started", result.output)
continuepos = result.output.find('NOTE: recipe xcursor-transparent-theme-%s: task do_unpack: Started' % manver.group(1))
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/buildoptions.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/buildoptions.py
index cf221c3..e60e32d 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/buildoptions.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/buildoptions.py
@@ -164,3 +164,17 @@
src_file_glob = str(pkgs_path[0]) + "/xcursor*.src.rpm"
tar_file_glob = str(pkgs_path[0]) + "/xcursor*.tar.gz"
self.assertTrue((g.glob(src_file_glob) and g.glob(tar_file_glob)), "Couldn't find .src.rpm and .tar.gz files under %s/allarch*/xcursor*" % deploy_dir_src)
+
+class ToolchainOptions(OESelftestTestCase):
+
+ def test_toolchain_fortran(self):
+ """
+ Test whether we can enable and build fortran and its supporting libraries
+ """
+
+ features = 'FORTRAN_forcevariable = ",fortran"\n'
+ features += 'RUNTIMETARGET_append_pn-gcc-runtime = " libquadmath"\n'
+ self.write_config(features)
+
+ bitbake('gcc-runtime libgfortran')
+
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/devtool.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/devtool.py
index 43280cd..d5b6a46 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/devtool.py
@@ -174,7 +174,7 @@
def test_create_workspace(self):
# Check preconditions
result = runCmd('bitbake-layers show-layers')
- self.assertTrue('/workspace' not in result.output, 'This test cannot be run with a workspace layer in bblayers.conf')
+ self.assertTrue('\nworkspace' not in result.output, 'This test cannot be run with a workspace layer in bblayers.conf')
# Try creating a workspace layer with a specific path
tempdir = tempfile.mkdtemp(prefix='devtoolqa')
self.track_for_cleanup(tempdir)
@@ -611,7 +611,7 @@
@OETestID(1165)
def test_devtool_modify_git(self):
# Check preconditions
- testrecipe = 'mkelfimage'
+ testrecipe = 'psplash'
src_uri = get_bb_var('SRC_URI', testrecipe)
self.assertIn('git://', src_uri, 'This test expects the %s recipe to be a git recipe' % testrecipe)
# Clean up anything in the workdir/sysroot/sstate cache
@@ -623,9 +623,9 @@
self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe)
result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
- self.assertExists(os.path.join(tempdir, 'Makefile'), 'Extracted source could not be found')
+ self.assertExists(os.path.join(tempdir, 'Makefile.am'), 'Extracted source could not be found')
self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created. devtool output: %s' % result.output)
- matches = glob.glob(os.path.join(self.workspacedir, 'appends', 'mkelfimage_*.bbappend'))
+ matches = glob.glob(os.path.join(self.workspacedir, 'appends', 'psplash_*.bbappend'))
self.assertTrue(matches, 'bbappend not created')
# Test devtool status
result = runCmd('devtool status')
@@ -899,6 +899,7 @@
f.write('BBFILE_PATTERN_oeselftesttemplayer = "^${LAYERDIR}/"\n')
f.write('BBFILE_PRIORITY_oeselftesttemplayer = "999"\n')
f.write('BBFILE_PATTERN_IGNORE_EMPTY_oeselftesttemplayer = "1"\n')
+ f.write('LAYERSERIES_COMPAT_oeselftesttemplayer = "${LAYERSERIES_COMPAT_core}"\n')
self.add_command_to_tearDown('bitbake-layers remove-layer %s || true' % templayerdir)
result = runCmd('bitbake-layers add-layer %s' % templayerdir, cwd=self.builddir)
# Create the bbappend
@@ -987,8 +988,12 @@
@OETestID(1371)
def test_devtool_update_recipe_local_files_2(self):
"""Check local source files support when oe-local-files is in Git"""
- testrecipe = 'lzo'
+ testrecipe = 'devtool-test-local'
recipefile = get_bb_var('FILE', testrecipe)
+ recipedir = os.path.dirname(recipefile)
+ result = runCmd('git status --porcelain .', cwd=recipedir)
+ if result.output.strip():
+ self.fail('Recipe directory for %s contains uncommitted changes' % testrecipe)
# Setup srctree for modifying the recipe
tempdir = tempfile.mkdtemp(prefix='devtoolqa')
self.track_for_cleanup(tempdir)
@@ -1002,9 +1007,9 @@
runCmd('git add oe-local-files', cwd=tempdir)
runCmd('git commit -m "Add local sources"', cwd=tempdir)
# Edit / commit local sources
- runCmd('echo "# Foobar" >> oe-local-files/acinclude.m4', cwd=tempdir)
+ runCmd('echo "# Foobar" >> oe-local-files/file1', cwd=tempdir)
runCmd('git commit -am "Edit existing file"', cwd=tempdir)
- runCmd('git rm oe-local-files/run-ptest', cwd=tempdir)
+ runCmd('git rm oe-local-files/file2', cwd=tempdir)
runCmd('git commit -m"Remove file"', cwd=tempdir)
runCmd('echo "Foo" > oe-local-files/new-local', cwd=tempdir)
runCmd('git add oe-local-files/new-local', cwd=tempdir)
@@ -1016,11 +1021,11 @@
os.path.dirname(recipefile))
# Checkout unmodified file to working copy -> devtool should still pick
# the modified version from HEAD
- runCmd('git checkout HEAD^ -- oe-local-files/acinclude.m4', cwd=tempdir)
+ runCmd('git checkout HEAD^ -- oe-local-files/file1', cwd=tempdir)
runCmd('devtool update-recipe %s' % testrecipe)
expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)),
- (' M', '.*/acinclude.m4$'),
- (' D', '.*/run-ptest$'),
+ (' M', '.*/file1$'),
+ (' D', '.*/file2$'),
('??', '.*/new-local$'),
('??', '.*/0001-Add-new-file.patch$')]
self._check_repo_status(os.path.dirname(recipefile), expected_status)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/distrodata.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/distrodata.py
index 12540ad..7b28004 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/distrodata.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/distrodata.py
@@ -9,6 +9,11 @@
@classmethod
def setUpClass(cls):
super(Distrodata, cls).setUpClass()
+ feature = 'INHERIT += "distrodata"\n'
+ feature += 'LICENSE_FLAGS_WHITELIST += " commercial"\n'
+
+ cls.write_config(cls, feature)
+ bitbake('-c checkpkg world')
@OETestID(1902)
def test_checkpkg(self):
@@ -18,11 +23,6 @@
Product: oe-core
Author: Alexander Kanavin <alexander.kanavin@intel.com>
"""
- feature = 'INHERIT += "distrodata"\n'
- feature += 'LICENSE_FLAGS_WHITELIST += " commercial"\n'
-
- self.write_config(feature)
- bitbake('-c checkpkg world')
checkpkg_result = open(os.path.join(get_bb_var("LOG_DIR"), "checkpkg.csv")).readlines()[1:]
regressed_failures = [pkg_data[0] for pkg_data in [pkg_line.split('\t') for pkg_line in checkpkg_result] if pkg_data[11] == 'UNKNOWN_BROKEN']
regressed_successes = [pkg_data[0] for pkg_data in [pkg_line.split('\t') for pkg_line in checkpkg_result] if pkg_data[11] == 'KNOWN_BROKEN']
@@ -40,3 +40,60 @@
but their recipes claim otherwise by setting UPSTREAM_VERSION_UNKNOWN. Please remove that line from the recipes.
""" + "\n".join(regressed_successes)
self.assertTrue(len(regressed_failures) == 0 and len(regressed_successes) == 0, msg)
+
+ def test_maintainers(self):
+ """
+ Summary: Test that oe-core recipes have a maintainer
+ Expected: All oe-core recipes (except a few special static/testing ones) should have a maintainer listed in maintainers.inc file.
+ Product: oe-core
+ Author: Alexander Kanavin <alexander.kanavin@intel.com>
+ """
+ def is_exception(pkg):
+ exceptions = ["packagegroup-", "initramfs-", "systemd-machine-units", "target-sdk-provides-dummy"]
+ for i in exceptions:
+ if i in pkg:
+ return True
+ return False
+
+ def is_in_oe_core(recipe, recipes):
+ self.assertTrue(recipe in recipes.keys(), "Recipe %s was not in 'bitbake-layers show-recipes' output" %(recipe))
+ self.assertTrue(len(recipes[recipe]) > 0, "'bitbake-layers show-recipes' could not determine what layer(s) a recipe %s is in" %(recipe))
+ try:
+ recipes[recipe].index('meta')
+ return True
+ except ValueError:
+ return False
+
+ def get_recipe_layers():
+ import re
+
+ recipes = {}
+ recipe_regex = re.compile('^(?P<name>.*):$')
+ layer_regex = re.compile('^ (?P<name>\S*) +')
+ output = runCmd('bitbake-layers show-recipes').output
+ for line in output.split('\n'):
+ recipe_name_obj = recipe_regex.search(line)
+ if recipe_name_obj:
+ recipe_name = recipe_name_obj.group('name')
+ recipes[recipe_name] = []
+ recipe_layer_obj = layer_regex.search(line)
+ if recipe_layer_obj:
+ layer_name = recipe_layer_obj.group('name')
+ recipes[recipe_name].append(layer_name)
+ return recipes
+
+ checkpkg_result = open(os.path.join(get_bb_var("LOG_DIR"), "checkpkg.csv")).readlines()[1:]
+ recipes_layers = get_recipe_layers()
+ no_maintainer_list = [pkg_data[0] for pkg_data in [pkg_line.split('\t') for pkg_line in checkpkg_result] \
+ if pkg_data[14] == '' and is_in_oe_core(pkg_data[0], recipes_layers) and not is_exception(pkg_data[0])]
+ msg = """
+The following packages do not have a maintainer assigned to them. Please add an entry to meta/conf/distro/include/maintainers.inc file.
+""" + "\n".join(no_maintainer_list)
+ self.assertTrue(len(no_maintainer_list) == 0, msg)
+
+ with_maintainer_list = [pkg_data[0] for pkg_data in [pkg_line.split('\t') for pkg_line in checkpkg_result] \
+ if pkg_data[14] != '' and is_in_oe_core(pkg_data[0], recipes_layers) and not is_exception(pkg_data[0])]
+ msg = """
+The list of oe-core packages with maintainers is empty. This may indicate that the test has regressed and needs fixing.
+"""
+ self.assertTrue(len(with_maintainer_list) > 0, msg)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/efibootpartition.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/efibootpartition.py
new file mode 100644
index 0000000..0c83256
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/efibootpartition.py
@@ -0,0 +1,45 @@
+# Based on runqemu.py test file
+#
+# Copyright (c) 2017 Wind River Systems, Inc.
+#
+
+import re
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake, runqemu, get_bb_var
+
+class GenericEFITest(OESelftestTestCase):
+ """EFI booting test class"""
+
+ buffer = True
+ cmd_common = "runqemu nographic serial wic ovmf"
+ efi_provider = "systemd-boot"
+ image = "core-image-minimal"
+ machine = "qemux86-64"
+ recipes_built = False
+
+ @classmethod
+ def setUpLocal(self):
+ super(GenericEFITest, self).setUpLocal(self)
+
+ self.write_config(self,
+"""
+EFI_PROVIDER = "%s"
+IMAGE_FSTYPES_pn-%s_append = " wic"
+MACHINE = "%s"
+MACHINE_FEATURES_append = " efi"
+WKS_FILE = "efi-bootdisk.wks.in"
+IMAGE_INSTALL_append = " grub-efi systemd-boot kernel-image-bzimage"
+"""
+% (self.efi_provider, self.image, self.machine))
+ if not self.recipes_built:
+ bitbake("ovmf")
+ bitbake(self.image)
+ self.recipes_built = True
+
+ @classmethod
+ def test_boot_efi(self):
+ """Test generic boot partition with qemu"""
+ cmd = "%s %s" % (self.cmd_common, self.machine)
+ with runqemu(self.image, ssh=False, launch_cmd=cmd) as qemu:
+ self.assertTrue(qemu.runner.logged, "Failed: %s" % cmd)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/gotoolchain.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/gotoolchain.py
new file mode 100644
index 0000000..1e23257
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/gotoolchain.py
@@ -0,0 +1,67 @@
+import glob
+import os
+import shutil
+import tempfile
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, bitbake, get_bb_vars
+
+
+class oeGoToolchainSelfTest(OESelftestTestCase):
+ """
+ Test cases for OE's Go toolchain
+ """
+
+ @staticmethod
+ def get_sdk_environment(tmpdir_SDKQA):
+ pattern = os.path.join(tmpdir_SDKQA, "environment-setup-*")
+ # FIXME: this is a very naive implementation
+ return glob.glob(pattern)[0]
+
+ @staticmethod
+ def get_sdk_toolchain():
+ bb_vars = get_bb_vars(['SDK_DEPLOY', 'TOOLCHAIN_OUTPUTNAME'],
+ "meta-go-toolchain")
+ sdk_deploy = bb_vars['SDK_DEPLOY']
+ toolchain_name = bb_vars['TOOLCHAIN_OUTPUTNAME']
+ return os.path.join(sdk_deploy, toolchain_name + ".sh")
+
+ @classmethod
+ def setUpClass(cls):
+ super(oeGoToolchainSelfTest, cls).setUpClass()
+ cls.tmpdir_SDKQA = tempfile.mkdtemp(prefix='SDKQA')
+ cls.go_path = os.path.join(cls.tmpdir_SDKQA, "go")
+ # Build the SDK and locate it in DEPLOYDIR
+ bitbake("meta-go-toolchain")
+ cls.sdk_path = oeGoToolchainSelfTest.get_sdk_toolchain()
+ # Install the SDK into the tmpdir
+ runCmd("sh %s -y -d \"%s\"" % (cls.sdk_path, cls.tmpdir_SDKQA))
+ cls.env_SDK = oeGoToolchainSelfTest.get_sdk_environment(cls.tmpdir_SDKQA)
+
+ @classmethod
+ def tearDownClass(cls):
+ shutil.rmtree(cls.tmpdir_SDKQA, ignore_errors=True)
+ super(oeGoToolchainSelfTest, cls).tearDownClass()
+
+ def run_sdk_go_command(self, gocmd):
+ cmd = "cd %s; " % self.tmpdir_SDKQA
+ cmd = cmd + ". %s; " % self.env_SDK
+ cmd = cmd + "export GOPATH=%s; " % self.go_path
+ cmd = cmd + "${CROSS_COMPILE}go %s" % gocmd
+ return runCmd(cmd).status
+
+ def test_go_dep_build(self):
+ proj = "github.com/golang"
+ name = "dep"
+ ver = "v0.3.1"
+ archive = ".tar.gz"
+ url = "https://%s/%s/archive/%s%s" % (proj, name, ver, archive)
+
+ runCmd("cd %s; wget %s" % (self.tmpdir_SDKQA, url))
+ runCmd("cd %s; tar -xf %s" % (self.tmpdir_SDKQA, ver+archive))
+ runCmd("mkdir -p %s/src/%s" % (self.go_path, proj))
+ runCmd("mv %s/dep-0.3.1 %s/src/%s/%s"
+ % (self.tmpdir_SDKQA, self.go_path, proj, name))
+ retv = self.run_sdk_go_command('build %s/%s/cmd/dep'
+ % (proj, name))
+ self.assertEqual(retv, 0,
+ msg="Running go build failed for %s" % name)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/imagefeatures.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/imagefeatures.py
index 0ffb686..09e0b20 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -211,7 +211,7 @@
image_name = 'core-image-minimal'
img_types = [itype for itype in get_bb_var("IMAGE_TYPES", image_name).split() \
- if itype not in ('container', 'elf', 'multiubi')]
+ if itype not in ('container', 'elf', 'f2fs', 'multiubi')]
config = 'IMAGE_FSTYPES += "%s"\n'\
'MKUBIFS_ARGS ?= "-m 2048 -e 129024 -c 2047"\n'\
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/meta_ide.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/meta_ide.py
new file mode 100644
index 0000000..5df9d3e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/meta_ide.py
@@ -0,0 +1,49 @@
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject
+from oeqa.utils.commands import bitbake, get_bb_vars, runCmd
+from oeqa.core.decorator.oeid import OETestID
+import tempfile
+import shutil
+
+class MetaIDE(OESelftestTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ super(MetaIDE, cls).setUpClass()
+ bitbake('meta-ide-support')
+ bb_vars = get_bb_vars(['MULTIMACH_TARGET_SYS', 'TMPDIR', 'COREBASE'])
+ cls.environment_script = 'environment-setup-%s' % bb_vars['MULTIMACH_TARGET_SYS']
+ cls.tmpdir = bb_vars['TMPDIR']
+ cls.environment_script_path = '%s/%s' % (cls.tmpdir, cls.environment_script)
+ cls.corebasedir = bb_vars['COREBASE']
+ cls.tmpdir_metaideQA = tempfile.mkdtemp(prefix='metaide')
+
+ @classmethod
+ def tearDownClass(cls):
+ shutil.rmtree(cls.tmpdir_metaideQA, ignore_errors=True)
+ super(MetaIDE, cls).tearDownClass()
+
+ @OETestID(1982)
+ def test_meta_ide_had_installed_meta_ide_support(self):
+ self.assertExists(self.environment_script_path)
+
+ @OETestID(1983)
+ def test_meta_ide_can_compile_c_program(self):
+ runCmd('cp %s/test.c %s' % (self.tc.files_dir, self.tmpdir_metaideQA))
+ runCmd("cd %s; . %s; $CC test.c -lm" % (self.tmpdir_metaideQA, self.environment_script_path))
+ compiled_file = '%s/a.out' % self.tmpdir_metaideQA
+ self.assertExists(compiled_file)
+
+ @OETestID(1984)
+ def test_meta_ide_can_build_cpio_project(self):
+ dl_dir = self.td.get('DL_DIR', None)
+ self.project = SDKBuildProject(self.tmpdir_metaideQA + "/cpio/", self.environment_script_path,
+ "https://ftp.gnu.org/gnu/cpio/cpio-2.12.tar.gz",
+ self.tmpdir_metaideQA, self.td['DATETIME'], dl_dir=dl_dir)
+ self.project.download_archive()
+ self.assertEqual(self.project.run_configure(), 0,
+ msg="Running configure failed")
+ self.assertEqual(self.project.run_make(), 0,
+ msg="Running make failed")
+ self.assertEqual(self.project.run_install(), 0,
+ msg="Running make install failed")
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/runqemu.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/runqemu.py
index 47d41f5..5ebdd57 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/runqemu.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/runqemu.py
@@ -3,9 +3,10 @@
#
import re
-
+import tempfile
+import time
from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import bitbake, runqemu, get_bb_var
+from oeqa.utils.commands import bitbake, runqemu, get_bb_var, runCmd
from oeqa.core.decorator.oeid import OETestID
class RunqemuTests(OESelftestTestCase):
@@ -136,3 +137,70 @@
cmd = "%s %s" % (self.cmd_common, rootfs)
with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
self.assertTrue(qemu.runner.logged, "Failed: %s" % cmd)
+
+# This test was designed as a separate class to test that shutdown
+# command will shutdown qemu as expected on each qemu architecture
+# based on the MACHINE configuration inside the config file
+# (eg. local.conf).
+#
+# This was different compared to RunqemuTests, where RunqemuTests was
+# dedicated for MACHINE=qemux86-64 where it test that qemux86-64 will
+# bootup various filesystem types, including live image(iso and hddimg)
+# where live image was not supported on all qemu architecture.
+class QemuTest(OESelftestTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ super(QemuTest, cls).setUpClass()
+ cls.recipe = 'core-image-minimal'
+ cls.machine = get_bb_var('MACHINE')
+ cls.deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
+ cls.cmd_common = "runqemu nographic"
+ cls.qemuboot_conf = "%s-%s.qemuboot.conf" % (cls.recipe, cls.machine)
+ cls.qemuboot_conf = os.path.join(cls.deploy_dir_image, cls.qemuboot_conf)
+ bitbake(cls.recipe)
+
+ def _start_qemu_shutdown_check_if_shutdown_succeeded(self, qemu, timeout):
+ qemu.run_serial("shutdown -h now")
+ # Stop thread will stop the LoggingThread instance used for logging
+ # qemu through serial console, stop thread will prevent this code
+ # from facing exception (Console connection closed unexpectedly)
+ # when qemu was shutdown by the above shutdown command
+ qemu.runner.stop_thread()
+ time_track = 0
+ while True:
+ is_alive = qemu.check()
+ if not is_alive:
+ return True
+ if time_track > timeout:
+ return False
+ time.sleep(1)
+ time_track += 1
+
+ def test_qemu_can_shutdown(self):
+ self.assertExists(self.qemuboot_conf)
+ cmd = "%s %s" % (self.cmd_common, self.qemuboot_conf)
+ shutdown_timeout = 120
+ with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+ qemu_shutdown_succeeded = self._start_qemu_shutdown_check_if_shutdown_succeeded(qemu, shutdown_timeout)
+ self.assertTrue(qemu_shutdown_succeeded, 'Failed: %s does not shutdown within timeout(%s)' % (self.machine, shutdown_timeout))
+
+ # Need to have portmap/rpcbind running to allow this test to work and
+ # current autobuilder setup does not have this.
+ def disabled_test_qemu_can_boot_nfs_and_shutdown(self):
+ self.assertExists(self.qemuboot_conf)
+ bitbake('meta-ide-support')
+ rootfs_tar = "%s-%s.tar.bz2" % (self.recipe, self.machine)
+ rootfs_tar = os.path.join(self.deploy_dir_image, rootfs_tar)
+ self.assertExists(rootfs_tar)
+ tmpdir = tempfile.mkdtemp(prefix='qemu_nfs')
+ tmpdir_nfs = os.path.join(tmpdir, 'nfs')
+ cmd_extract_nfs = 'runqemu-extract-sdk %s %s' % (rootfs_tar, tmpdir_nfs)
+ result = runCmd(cmd_extract_nfs)
+ self.assertEqual(0, result.status, "runqemu-extract-sdk didn't run as expected. %s" % result.output)
+ cmd = "%s nfs %s %s" % (self.cmd_common, self.qemuboot_conf, tmpdir_nfs)
+ shutdown_timeout = 120
+ with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+ qemu_shutdown_succeeded = self._start_qemu_shutdown_check_if_shutdown_succeeded(qemu, shutdown_timeout)
+ self.assertTrue(qemu_shutdown_succeeded, 'Failed: %s does not shutdown within timeout(%s)' % (self.machine, shutdown_timeout))
+ runCmd('rm -rf %s' % tmpdir)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/runtime_test.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/runtime_test.py
index 25270b7..9c9b4b3 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -167,55 +167,6 @@
class Postinst(OESelftestTestCase):
@OETestID(1540)
- def test_verify_postinst(self):
- """
- Summary: The purpose of this test is to verify the execution order of postinst Bugzilla ID: [5319]
- Expected :
- 1. Compile a minimal image.
- 2. The compiled image will add the created layer with the recipes postinst[ abdpt]
- 3. Run qemux86
- 4. Validate the task execution order
- Author: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>
- """
- features = 'INHERIT += "testimage"\n'
- features += 'CORE_IMAGE_EXTRA_INSTALL += "postinst-at-rootfs \
-postinst-delayed-a \
-postinst-delayed-b \
-postinst-delayed-d \
-postinst-delayed-p \
-postinst-delayed-t \
-"\n'
- self.write_config(features)
-
- bitbake('core-image-minimal -f ')
-
- postinst_list = ['100-postinst-at-rootfs',
- '101-postinst-delayed-a',
- '102-postinst-delayed-b',
- '103-postinst-delayed-d',
- '104-postinst-delayed-p',
- '105-postinst-delayed-t']
- path_workdir = get_bb_var('WORKDIR','core-image-minimal')
- workspacedir = 'testimage/qemu_boot_log'
- workspacedir = os.path.join(path_workdir, workspacedir)
- rexp = re.compile("^Running postinst .*/(?P<postinst>.*)\.\.\.$")
- with runqemu('core-image-minimal') as qemu:
- with open(workspacedir) as f:
- found = False
- idx = 0
- for line in f.readlines():
- line = line.strip().replace("^M","")
- if not line: # To avoid empty lines
- continue
- m = rexp.search(line)
- if m:
- self.assertEqual(postinst_list[idx], m.group('postinst'), "Fail")
- idx = idx+1
- found = True
- elif found:
- self.assertEqual(idx, len(postinst_list), "Not found all postinsts")
- break
-
@OETestID(1545)
def test_postinst_rootfs_and_boot(self):
"""
@@ -234,16 +185,22 @@
for initialization managers: sysvinit and systemd.
"""
- file_rootfs_name = "this-was-created-at-rootfstime"
- fileboot_name = "this-was-created-at-first-boot"
- rootfs_pkg = 'postinst-at-rootfs'
- boot_pkg = 'postinst-delayed-a'
+
+ import oe.path
+
+ vars = get_bb_vars(("IMAGE_ROOTFS", "sysconfdir"), "core-image-minimal")
+ rootfs = vars["IMAGE_ROOTFS"]
+ self.assertIsNotNone(rootfs)
+ sysconfdir = vars["sysconfdir"]
+ self.assertIsNotNone(sysconfdir)
+ # Need to use oe.path here as sysconfdir starts with /
+ hosttestdir = oe.path.join(rootfs, sysconfdir, "postinst-test")
+ targettestdir = os.path.join(sysconfdir, "postinst-test")
for init_manager in ("sysvinit", "systemd"):
for classes in ("package_rpm", "package_deb", "package_ipk"):
with self.subTest(init_manager=init_manager, package_class=classes):
- features = 'MACHINE = "qemux86"\n'
- features += 'CORE_IMAGE_EXTRA_INSTALL += "%s %s "\n'% (rootfs_pkg, boot_pkg)
+ features = 'CORE_IMAGE_EXTRA_INSTALL = "postinst-delayed-b"\n'
features += 'IMAGE_FEATURES += "package-management empty-root-password"\n'
features += 'PACKAGE_CLASSES = "%s"\n' % classes
if init_manager == "systemd":
@@ -255,13 +212,49 @@
bitbake('core-image-minimal')
- file_rootfs_created = os.path.join(get_bb_var('IMAGE_ROOTFS', "core-image-minimal"),
- file_rootfs_name)
- found = os.path.isfile(file_rootfs_created)
- self.assertTrue(found, "File %s was not created at rootfs time by %s" % \
- (file_rootfs_name, rootfs_pkg))
+ self.assertTrue(os.path.isfile(os.path.join(hosttestdir, "rootfs")),
+ "rootfs state file was not created")
- testcommand = 'ls /etc/' + fileboot_name
with runqemu('core-image-minimal') as qemu:
- status, output = qemu.run_serial("-f /etc/" + fileboot_name)
- self.assertEqual(status, 0, 'File %s was not created at first boot (%s)' % (fileboot_name, output))
+ # Make the test echo a string and search for that as
+ # run_serial()'s status code is useless.'
+ for filename in ("rootfs", "delayed-a", "delayed-b"):
+ status, output = qemu.run_serial("test -f %s && echo found" % os.path.join(targettestdir, filename))
+ self.assertEqual(output, "found", "%s was not present on boot" % filename)
+
+
+
+ def test_failing_postinst(self):
+ """
+ Summary: The purpose of this test case is to verify that post-installation
+ scripts that contain errors are properly reported.
+ Expected: The scriptlet failure is properly reported.
+ The file that is created after the error in the scriptlet is not present.
+ Product: oe-core
+ Author: Alexander Kanavin <alexander.kanavin@intel.com>
+ """
+
+ import oe.path
+
+ vars = get_bb_vars(("IMAGE_ROOTFS", "sysconfdir"), "core-image-minimal")
+ rootfs = vars["IMAGE_ROOTFS"]
+ self.assertIsNotNone(rootfs)
+ sysconfdir = vars["sysconfdir"]
+ self.assertIsNotNone(sysconfdir)
+ # Need to use oe.path here as sysconfdir starts with /
+ hosttestdir = oe.path.join(rootfs, sysconfdir, "postinst-test")
+
+ for classes in ("package_rpm", "package_deb", "package_ipk"):
+ with self.subTest(package_class=classes):
+ features = 'CORE_IMAGE_EXTRA_INSTALL = "postinst-rootfs-failing"\n'
+ features += 'PACKAGE_CLASSES = "%s"\n' % classes
+ self.write_config(features)
+ bb_result = bitbake('core-image-minimal')
+ self.assertGreaterEqual(bb_result.output.find("Intentionally failing postinstall scriptlets of ['postinst-rootfs-failing'] to defer them to first boot is deprecated."), 0,
+ "Warning about a failed scriptlet not found in bitbake output: %s" %(bb_result.output))
+
+ self.assertTrue(os.path.isfile(os.path.join(hosttestdir, "rootfs-before-failure")),
+ "rootfs-before-failure file was not created")
+ self.assertFalse(os.path.isfile(os.path.join(hosttestdir, "rootfs-after-failure")),
+ "rootfs-after-failure file was created")
+
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/signing.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/signing.py
index b3d1a82..a750cfc 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/signing.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/signing.py
@@ -87,7 +87,7 @@
ret = runCmd('%s/rpmkeys --define "_dbpath %s" --checksig %s' %
(staging_bindir_native, rpmdb, pkg_deploy))
# tmp/deploy/rpm/i586/ed-1.9-r0.i586.rpm: rsa sha1 md5 OK
- self.assertIn('rsa sha1 (md5) pgp md5 OK', ret.output, 'Package signed incorrectly.')
+ self.assertIn('digests signatures OK', ret.output, 'Package signed incorrectly.')
shutil.rmtree(rpmdb)
#Check that an image can be built from signed packages
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/sstatetests.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/sstatetests.py
index 4790088..7b008e4 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -2,15 +2,51 @@
import shutil
import glob
import subprocess
+import tempfile
from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer, create_temp_layer
from oeqa.selftest.cases.sstate import SStateBase
from oeqa.core.decorator.oeid import OETestID
import bb.siggen
class SStateTests(SStateBase):
+ def test_autorev_sstate_works(self):
+ # Test that a git repository which changes is correctly handled by SRCREV = ${AUTOREV}
+ # when PV does not contain SRCPV
+
+ tempdir = tempfile.mkdtemp(prefix='oeqa')
+ self.track_for_cleanup(tempdir)
+ create_temp_layer(tempdir, 'selftestrecipetool')
+ self.add_command_to_tearDown('bitbake-layers remove-layer %s' % tempdir)
+ runCmd('bitbake-layers add-layer %s' % tempdir)
+
+ # Use dbus-wait as a local git repo we can add a commit between two builds in
+ pn = 'dbus-wait'
+ srcrev = '6cc6077a36fe2648a5f993fe7c16c9632f946517'
+ url = 'git://git.yoctoproject.org/dbus-wait'
+ result = runCmd('git clone %s noname' % url, cwd=tempdir)
+ srcdir = os.path.join(tempdir, 'noname')
+ result = runCmd('git reset --hard %s' % srcrev, cwd=srcdir)
+ self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure.ac')), 'Unable to find configure script in source directory')
+
+ recipefile = os.path.join(tempdir, "recipes-test", "dbus-wait-test", 'dbus-wait-test_git.bb')
+ os.makedirs(os.path.dirname(recipefile))
+ srcuri = 'git://' + srcdir + ';protocol=file'
+ result = runCmd(['recipetool', 'create', '-o', recipefile, srcuri])
+ self.assertTrue(os.path.isfile(recipefile), 'recipetool did not create recipe file; output:\n%s' % result.output)
+
+ with open(recipefile, 'a') as f:
+ f.write('SRCREV = "${AUTOREV}"\n')
+ f.write('PV = "1.0"\n')
+
+ bitbake("dbus-wait-test -c fetch")
+ with open(os.path.join(srcdir, "bar.txt"), "w") as f:
+ f.write("foo")
+ result = runCmd('git add bar.txt; git commit -asm "add bar"', cwd=srcdir)
+ bitbake("dbus-wait-test -c unpack")
+
# Test sstate files creation and their location
def run_test_sstate_creation(self, targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True, should_pass=True):
@@ -490,7 +526,7 @@
# this is an expensive computation, thus just compare the first 'max_sigfiles_to_compare' k files
max_sigfiles_to_compare = 20
first, rest = files[:max_sigfiles_to_compare], files[max_sigfiles_to_compare:]
- compare_sigfiles(first, files1.keys(), files2.keys(), compare=True)
- compare_sigfiles(rest, files1.keys(), files2.keys(), compare=False)
+ compare_sigfiles(first, files1, files2, compare=True)
+ compare_sigfiles(rest, files1, files2, compare=False)
self.fail("sstate hashes not identical.")
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/wic.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/wic.py
index 651d575..b84466d 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/wic.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/wic.py
@@ -623,7 +623,7 @@
self.assertTrue(os.path.islink(path))
self.assertTrue(os.path.isfile(os.path.realpath(path)))
- @OETestID(1422)
+ @OETestID(1424)
@only_for_arch(['i586', 'i686', 'x86_64'])
def test_qemu(self):
"""Test wic-image-minimal under qemu"""
@@ -634,10 +634,13 @@
self.remove_config(config)
with runqemu('wic-image-minimal', ssh=False) as qemu:
- cmd = "mount |grep '^/dev/' | cut -f1,3 -d ' '"
+ cmd = "mount |grep '^/dev/' | cut -f1,3 -d ' ' | sort"
+ status, output = qemu.run_serial(cmd)
+ self.assertEqual(output, '/dev/root /\r\n/dev/sda1 /boot\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
+ cmd = "grep UUID= /etc/fstab"
status, output = qemu.run_serial(cmd)
self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
- self.assertEqual(output, '/dev/root /\r\n/dev/sda1 /boot\r\n/dev/sda3 /mnt')
+ self.assertEqual(output, 'UUID=2c71ef06-a81d-4735-9d3a-379b69c6bdba\t/media\text4\tdefaults\t0\t0')
@only_for_arch(['i586', 'i686', 'x86_64'])
@OETestID(1852)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/targetcontrol.py b/import-layers/yocto-poky/meta/lib/oeqa/targetcontrol.py
index f63936c..59a9c35 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/targetcontrol.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/targetcontrol.py
@@ -91,6 +91,8 @@
def __init__(self, d, logger, image_fstype=None):
+ import oe.types
+
super(QemuTarget, self).__init__(d, logger)
self.rootfs = ''
@@ -107,7 +109,7 @@
dump_dir = d.getVar("TESTIMAGE_DUMP_DIR")
qemu_use_kvm = d.getVar("QEMU_USE_KVM")
if qemu_use_kvm and \
- (qemu_use_kvm == "True" and "x86" in d.getVar("MACHINE") or \
+ (oe.types.boolean(qemu_use_kvm) and "x86" in d.getVar("MACHINE") or \
d.getVar("MACHINE") in qemu_use_kvm.split()):
use_kvm = True
else:
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/commands.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/commands.py
index 0bb9002..0d9cf23 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/utils/commands.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/commands.py
@@ -227,7 +227,7 @@
bbenv = get_bb_env(target, postconfig=postconfig)
if variables is not None:
- variables = variables.copy()
+ variables = list(variables)
var_re = re.compile(r'^(export )?(?P<var>\w+(_.*)?)="(?P<value>.*)"$')
unset_re = re.compile(r'^unset (?P<var>\w+)$')
lastline = None
@@ -285,7 +285,7 @@
f.write('BBFILE_PATTERN_%s = "^${LAYERDIR}/"\n' % templayername)
f.write('BBFILE_PRIORITY_%s = "%d"\n' % (templayername, priority))
f.write('BBFILE_PATTERN_IGNORE_EMPTY_%s = "1"\n' % templayername)
-
+ f.write('LAYERSERIES_COMPAT_%s = "${LAYERSERIES_COMPAT_core}"\n' % templayername)
@contextlib.contextmanager
def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None, overrides={}, discard_writes=True):
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/package_manager.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/package_manager.py
index 724afb2..afd5b8e 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/utils/package_manager.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/package_manager.py
@@ -14,7 +14,8 @@
if pkg_class == "rpm":
pm = RpmPM(d,
root_path,
- d.getVar('TARGET_VENDOR'))
+ d.getVar('TARGET_VENDOR'),
+ filterbydependencies=False)
pm.create_configs()
elif pkg_class == "ipk":
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/qemurunner.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/qemurunner.py
index 0631d43..c962602 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/utils/qemurunner.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/qemurunner.py
@@ -194,7 +194,8 @@
sys.exit(0)
self.logger.debug("runqemu started, pid is %s" % self.runqemu.pid)
- self.logger.debug("waiting at most %s seconds for qemu pid" % self.runqemutime)
+ self.logger.debug("waiting at most %s seconds for qemu pid (%s)" %
+ (self.runqemutime, time.strftime("%D %H:%M:%S")))
endtime = time.time() + self.runqemutime
while not self.is_alive() and time.time() < endtime:
if self.runqemu.poll():
@@ -208,7 +209,8 @@
time.sleep(0.5)
if not self.is_alive():
- self.logger.error("Qemu pid didn't appear in %s seconds" % self.runqemutime)
+ self.logger.error("Qemu pid didn't appear in %s seconds (%s)" %
+ (self.runqemutime, time.strftime("%D %H:%M:%S")))
# Dump all processes to help us to figure out what is going on...
ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,command '], stdout=subprocess.PIPE).communicate()[0]
processes = ps.decode("utf-8")
@@ -225,7 +227,9 @@
# We are alive: qemu is running
out = self.getOutput(output)
netconf = False # network configuration is not required by default
- self.logger.debug("qemu started in %s seconds - qemu procces pid is %s" % (time.time() - (endtime - self.runqemutime), self.qemupid))
+ self.logger.debug("qemu started in %s seconds - qemu procces pid is %s (%s)" %
+ (time.time() - (endtime - self.runqemutime),
+ self.qemupid, time.strftime("%D %H:%M:%S")))
if get_ip:
cmdline = ''
with open('/proc/%s/cmdline' % self.qemupid) as p:
@@ -269,7 +273,8 @@
return False
self.logger.debug("Output from runqemu:\n%s", out)
- self.logger.debug("Waiting at most %d seconds for login banner" % self.boottime)
+ self.logger.debug("Waiting at most %d seconds for login banner (%s)" %
+ (self.boottime, time.strftime("%D %H:%M:%S")))
endtime = time.time() + self.boottime
socklist = [self.server_socket]
reachedlogin = False
@@ -298,15 +303,22 @@
self.server_socket = qemusock
stopread = True
reachedlogin = True
- self.logger.debug("Reached login banner")
+ self.logger.debug("Reached login banner in %s seconds (%s)" %
+ (time.time() - (endtime - self.boottime),
+ time.strftime("%D %H:%M:%S")))
else:
+ # no need to check if reachedlogin unless we support multiple connections
+ self.logger.debug("QEMU socket disconnected before login banner reached. (%s)" %
+ time.strftime("%D %H:%M:%S"))
socklist.remove(sock)
sock.close()
stopread = True
if not reachedlogin:
- self.logger.debug("Target didn't reached login boot in %d seconds" % self.boottime)
+ if time.time() >= endtime:
+ self.logger.debug("Target didn't reach login banner in %d seconds (%s)" %
+ (self.boottime, time.strftime("%D %H:%M:%S")))
tail = lambda l: "\n".join(l.splitlines()[-25:])
# in case bootlog is empty, use tail qemu log store at self.msg
lines = tail(bootlog if bootlog else self.msg)
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/files/gcc8.patch b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/gcc8.patch
new file mode 100644
index 0000000..fa7331f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/gcc8.patch
@@ -0,0 +1,74 @@
+From 563b1da6e6ae7af46cc8354cadb5dab416989f0a Mon Sep 17 00:00:00 2001
+From: Michael Chang <mchang@suse.com>
+Date: Mon, 26 Mar 2018 16:52:34 +0800
+Subject: Fix packed-not-aligned error on GCC 8
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When building with GCC 8, there are several errors regarding packed-not-aligned.
+
+./include/grub/gpt_partition.h:79:1: error: alignment 1 of ‘struct grub_gpt_partentry’ is less than 8 [-Werror=packed-not-aligned]
+
+This patch fixes the build error by cleaning up the ambiguity of placing
+aligned structure in a packed one. In "struct grub_btrfs_time" and "struct
+grub_gpt_part_type", the aligned attribute seems to be superfluous, and also
+has to be packed, to ensure the structure is bit-to-bit mapped to the format
+laid on disk. I think we could blame to copy and paste error here for the
+mistake. In "struct efi_variable", we have to use grub_efi_packed_guid_t, as
+the name suggests. :)
+
+Signed-off-by: Michael Chang <mchang@suse.com>
+Tested-by: Michael Chang <mchang@suse.com>
+Tested-by: Paul Menzel <paulepanter@users.sourceforge.net>
+Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
+
+Upstream-Status: Backport http://git.savannah.gnu.org/cgit/grub.git/commit/?id=563b1da6e6ae7af46cc8354cadb5dab416989f0a
+---
+ grub-core/fs/btrfs.c | 2 +-
+ include/grub/efiemu/runtime.h | 2 +-
+ include/grub/gpt_partition.h | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
+index 4849c1c..be19544 100644
+--- a/grub-core/fs/btrfs.c
++++ b/grub-core/fs/btrfs.c
+@@ -175,7 +175,7 @@ struct grub_btrfs_time
+ {
+ grub_int64_t sec;
+ grub_uint32_t nanosec;
+-} __attribute__ ((aligned (4)));
++} GRUB_PACKED;
+
+ struct grub_btrfs_inode
+ {
+diff --git a/include/grub/efiemu/runtime.h b/include/grub/efiemu/runtime.h
+index 9b6b729..36d2ded 100644
+--- a/include/grub/efiemu/runtime.h
++++ b/include/grub/efiemu/runtime.h
+@@ -29,7 +29,7 @@ struct grub_efiemu_ptv_rel
+
+ struct efi_variable
+ {
+- grub_efi_guid_t guid;
++ grub_efi_packed_guid_t guid;
+ grub_uint32_t namelen;
+ grub_uint32_t size;
+ grub_efi_uint32_t attributes;
+diff --git a/include/grub/gpt_partition.h b/include/grub/gpt_partition.h
+index 1b32f67..9668a68 100644
+--- a/include/grub/gpt_partition.h
++++ b/include/grub/gpt_partition.h
+@@ -28,7 +28,7 @@ struct grub_gpt_part_type
+ grub_uint16_t data2;
+ grub_uint16_t data3;
+ grub_uint8_t data4[8];
+-} __attribute__ ((aligned(8)));
++} GRUB_PACKED;
+ typedef struct grub_gpt_part_type grub_gpt_part_type_t;
+
+ #define GRUB_GPT_PARTITION_TYPE_EMPTY \
+--
+cgit v1.0-41-gc330
+
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
index 935c472..ffc2d40 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
@@ -43,19 +43,16 @@
grub-core/genmod.sh.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/grub-core/genmod.sh.in b/grub-core/genmod.sh.in
-index 76df0bb..39a9cfc 100644
---- a/grub-core/genmod.sh.in
-+++ b/grub-core/genmod.sh.in
-@@ -59,7 +59,7 @@ if test x@TARGET_APPLE_CC@ != x1; then
+Index: grub-2.02/grub-core/genmod.sh.in
+===================================================================
+--- grub-2.02.orig/grub-core/genmod.sh.in
++++ grub-2.02/grub-core/genmod.sh.in
+@@ -56,7 +56,7 @@ if test x@TARGET_APPLE_LINKER@ != x1; th
if test x@platform@ != xemu; then
- @STRIP@ --strip-unneeded \
+ @TARGET_STRIP@ --strip-unneeded \
-K grub_mod_init -K grub_mod_fini \
- -K _grub_mod_init -K _grub_mod_fini \
+ -K _grub_mod_init -K _grub_mod_fini -K .module_license \
-R .note.gnu.gold-version -R .note.GNU-stack \
- -R .note -R .comment $tmpfile || exit 1
+ -R .note -R .comment -R .ARM.exidx $tmpfile || exit 1
fi
---
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-bootconf_1.00.bb b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-bootconf_1.00.bb
new file mode 100644
index 0000000..750f8c8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-bootconf_1.00.bb
@@ -0,0 +1,29 @@
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+SUMMARY = "Basic grub.cfg for use in EFI systems"
+
+RPROVIDES_${PN} += "virtual/grub-bootconf"
+
+inherit grub-efi-cfg
+
+S = "${WORKDIR}"
+
+GRUB_CFG = "${S}/grub-bootconf"
+LABELS = "boot"
+
+ROOT ?= "root=/dev/sda2"
+
+python do_configure() {
+ bb.build.exec_func('build_efi_cfg', d)
+}
+
+do_configure[vardeps] += "APPEND ROOT"
+
+do_install() {
+ install -d ${D}/boot
+ install -d ${D}/boot/EFI
+ install -d ${D}/boot/EFI/BOOT
+ install grub-bootconf ${D}/boot/EFI/BOOT/grub.cfg
+}
+
+FILES_${PN} = "/boot/EFI/BOOT/grub.cfg"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-efi_2.02.bb b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-efi_2.02.bb
index 128da16..7bfc8ee 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-efi_2.02.bb
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-efi_2.02.bb
@@ -3,7 +3,7 @@
GRUBPLATFORM = "efi"
DEPENDS_append_class-target = " grub-efi-native"
-RDEPENDS_${PN}_class-target = "diffutils freetype"
+RDEPENDS_${PN}_class-target = "diffutils freetype grub-common virtual/grub-bootconf"
SRC_URI += " \
file://cfg \
@@ -15,16 +15,22 @@
python __anonymous () {
import re
target = d.getVar('TARGET_ARCH')
+ prefix = "" if d.getVar('EFI_PROVIDER') == "grub-efi" else "grub-efi-"
if target == "x86_64":
grubtarget = 'x86_64'
- grubimage = "grub-efi-bootx64.efi"
+ grubimage = prefix + "bootx64.efi"
elif re.match('i.86', target):
grubtarget = 'i386'
- grubimage = "grub-efi-bootia32.efi"
+ grubimage = prefix + "bootia32.efi"
+ elif re.match('aarch64', target):
+ grubtarget = 'arm64'
+ grubimage = prefix + "bootaa64.efi"
else:
- raise bb.parse.SkipPackage("grub-efi is incompatible with target %s" % target)
+ raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % target)
d.setVar("GRUB_TARGET", grubtarget)
d.setVar("GRUB_IMAGE", grubimage)
+ prefix = "grub-efi-" if prefix == "" else ""
+ d.setVar("GRUB_IMAGE_PREFIX", prefix)
}
inherit deploy
@@ -36,12 +42,36 @@
# and many other places in the grub code when compiled with some native gcc compilers (specifically, gentoo)
CFLAGS_append_class-native = " -Wno-error=trampolines"
+do_mkimage() {
+ cd ${B}
+ # Search for the grub.cfg on the local boot media by using the
+ # built in cfg file provided via this recipe
+ grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
+ -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \
+ ${GRUB_BUILDIN}
+}
+
+addtask mkimage before do_install after do_compile
+
+do_mkimage_class-native() {
+ :
+}
+
+do_install_append_class-target() {
+ install -d ${D}/boot
+ install -d ${D}/boot/EFI
+ install -d ${D}/boot/EFI/BOOT
+ install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}/boot/EFI/BOOT/${GRUB_IMAGE}
+}
+
do_install_class-native() {
install -d ${D}${bindir}
install -m 755 grub-mkimage ${D}${bindir}
}
-do_install_append_class-target() {
+do_install_class-target() {
+ oe_runmake 'DESTDIR=${D}' -C grub-core install
+
# Remove build host references...
find "${D}" -name modinfo.sh -type f -exec \
sed -i \
@@ -52,15 +82,10 @@
}
GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal \
- efi_gop iso9660 search loadenv test"
+ efi_gop iso9660 configfile search loadenv test"
do_deploy() {
- # Search for the grub.cfg on the local boot media by using the
- # built in cfg file provided via this recipe
- grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
- -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \
- ${GRUB_BUILDIN}
- install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR}
+ install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${DEPLOYDIR}
}
do_deploy_class-native() {
@@ -69,9 +94,11 @@
addtask deploy after do_install before do_build
-FILES_${PN} += "${libdir}/grub/${GRUB_TARGET}-efi \
- ${datadir}/grub \
- "
+FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \
+ ${datadir}/grub \
+ /boot/EFI/BOOT/${GRUB_IMAGE} \
+ "
+
# 64-bit binaries are expected for the bootloader with an x32 userland
INSANE_SKIP_${PN}_append_linux-gnux32 = " arch"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub2.inc b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub2.inc
index 28f96bb..a8f335e 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub2.inc
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub2.inc
@@ -18,6 +18,7 @@
file://grub-module-explicitly-keeps-symbole-.module_license.patch \
file://0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch \
file://fix.build.with.gcc-7.patch \
+ file://gcc8.patch \
"
SRC_URI[md5sum] = "1116d1f60c840e6dbd67abbc99acb45d"
SRC_URI[sha256sum] = "660ee136fbcee08858516ed4de2ad87068bfe1b6b8b37896ce3529ff054a726d"
@@ -47,7 +48,7 @@
PACKAGECONFIG ??= ""
PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
-PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,lvm2"
+PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper"
# grub2 creates its own set of -nostdinc / -isystem / -ffreestanding CFLAGS and
# OE's default BUILD_CFLAGS (assigned to CFLAGS for native builds) etc, conflict
@@ -67,12 +68,4 @@
${S}/autogen.sh )
}
-# grub and grub-efi's sysroot/${datadir}/grub/grub-mkconfig_lib are
-# conflicted, remove it since no one uses it.
-SYSROOT_DIRS_BLACKLIST += "${datadir}/grub/grub-mkconfig_lib"
-
-PACKAGES =+ "${PN}-editenv"
-
-FILES_${PN}-editenv = "${bindir}/grub-editenv"
-RDEPENDS_${PN} += "${PN}-editenv"
RDEPENDS_${PN}_class-native = ""
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub_2.02.bb b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub_2.02.bb
index 3e61f6a..e097375 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub_2.02.bb
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub_2.02.bb
@@ -1,6 +1,18 @@
require grub2.inc
-RDEPENDS_${PN} += "diffutils freetype"
+RDEPENDS_${PN}-common += "${PN}-editenv"
+RDEPENDS_${PN} += "diffutils freetype ${PN}-common"
+
+RPROVIDES_${PN}-editenv += "${PN}-efi-editenv"
+
+PACKAGES =+ "${PN}-editenv ${PN}-common"
+FILES_${PN}-editenv = "${bindir}/grub-editenv"
+FILES_${PN}-common = " \
+ ${bindir} \
+ ${sysconfdir} \
+ ${sbindir} \
+ ${datadir}/grub \
+"
do_install_append () {
install -d ${D}${sysconfdir}/grub.d
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/COPYING.patch b/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/COPYING.patch
deleted file mode 100644
index 05c70c9..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/COPYING.patch
+++ /dev/null
@@ -1,346 +0,0 @@
-Upstream-Status: Inappropriate [other]
-
-diff -ruN hostap-conf-1.0-orig/COPYING hostap-conf-1.0/COPYING
---- hostap-conf-1.0-orig/COPYING 1970-01-01 08:00:00.000000000 +0800
-+++ hostap-conf-1.0/COPYING 2010-12-09 16:36:48.000000000 +0800
-@@ -0,0 +1,340 @@
-+ GNU GENERAL PUBLIC LICENSE
-+ Version 2, June 1991
-+
-+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+ Everyone is permitted to copy and distribute verbatim copies
-+ of this license document, but changing it is not allowed.
-+
-+ Preamble
-+
-+ The licenses for most software are designed to take away your
-+freedom to share and change it. By contrast, the GNU General Public
-+License is intended to guarantee your freedom to share and change free
-+software--to make sure the software is free for all its users. This
-+General Public License applies to most of the Free Software
-+Foundation's software and to any other program whose authors commit to
-+using it. (Some other Free Software Foundation software is covered by
-+the GNU Library General Public License instead.) You can apply it to
-+your programs, too.
-+
-+ When we speak of free software, we are referring to freedom, not
-+price. Our General Public Licenses are designed to make sure that you
-+have the freedom to distribute copies of free software (and charge for
-+this service if you wish), that you receive source code or can get it
-+if you want it, that you can change the software or use pieces of it
-+in new free programs; and that you know you can do these things.
-+
-+ To protect your rights, we need to make restrictions that forbid
-+anyone to deny you these rights or to ask you to surrender the rights.
-+These restrictions translate to certain responsibilities for you if you
-+distribute copies of the software, or if you modify it.
-+
-+ For example, if you distribute copies of such a program, whether
-+gratis or for a fee, you must give the recipients all the rights that
-+you have. You must make sure that they, too, receive or can get the
-+source code. And you must show them these terms so they know their
-+rights.
-+
-+ We protect your rights with two steps: (1) copyright the software, and
-+(2) offer you this license which gives you legal permission to copy,
-+distribute and/or modify the software.
-+
-+ Also, for each author's protection and ours, we want to make certain
-+that everyone understands that there is no warranty for this free
-+software. If the software is modified by someone else and passed on, we
-+want its recipients to know that what they have is not the original, so
-+that any problems introduced by others will not reflect on the original
-+authors' reputations.
-+
-+ Finally, any free program is threatened constantly by software
-+patents. We wish to avoid the danger that redistributors of a free
-+program will individually obtain patent licenses, in effect making the
-+program proprietary. To prevent this, we have made it clear that any
-+patent must be licensed for everyone's free use or not licensed at all.
-+
-+ The precise terms and conditions for copying, distribution and
-+modification follow.
-+
-+ GNU GENERAL PUBLIC LICENSE
-+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-+
-+ 0. This License applies to any program or other work which contains
-+a notice placed by the copyright holder saying it may be distributed
-+under the terms of this General Public License. The "Program", below,
-+refers to any such program or work, and a "work based on the Program"
-+means either the Program or any derivative work under copyright law:
-+that is to say, a work containing the Program or a portion of it,
-+either verbatim or with modifications and/or translated into another
-+language. (Hereinafter, translation is included without limitation in
-+the term "modification".) Each licensee is addressed as "you".
-+
-+Activities other than copying, distribution and modification are not
-+covered by this License; they are outside its scope. The act of
-+running the Program is not restricted, and the output from the Program
-+is covered only if its contents constitute a work based on the
-+Program (independent of having been made by running the Program).
-+Whether that is true depends on what the Program does.
-+
-+ 1. You may copy and distribute verbatim copies of the Program's
-+source code as you receive it, in any medium, provided that you
-+conspicuously and appropriately publish on each copy an appropriate
-+copyright notice and disclaimer of warranty; keep intact all the
-+notices that refer to this License and to the absence of any warranty;
-+and give any other recipients of the Program a copy of this License
-+along with the Program.
-+
-+You may charge a fee for the physical act of transferring a copy, and
-+you may at your option offer warranty protection in exchange for a fee.
-+
-+ 2. You may modify your copy or copies of the Program or any portion
-+of it, thus forming a work based on the Program, and copy and
-+distribute such modifications or work under the terms of Section 1
-+above, provided that you also meet all of these conditions:
-+
-+ a) You must cause the modified files to carry prominent notices
-+ stating that you changed the files and the date of any change.
-+
-+ b) You must cause any work that you distribute or publish, that in
-+ whole or in part contains or is derived from the Program or any
-+ part thereof, to be licensed as a whole at no charge to all third
-+ parties under the terms of this License.
-+
-+ c) If the modified program normally reads commands interactively
-+ when run, you must cause it, when started running for such
-+ interactive use in the most ordinary way, to print or display an
-+ announcement including an appropriate copyright notice and a
-+ notice that there is no warranty (or else, saying that you provide
-+ a warranty) and that users may redistribute the program under
-+ these conditions, and telling the user how to view a copy of this
-+ License. (Exception: if the Program itself is interactive but
-+ does not normally print such an announcement, your work based on
-+ the Program is not required to print an announcement.)
-+
-+These requirements apply to the modified work as a whole. If
-+identifiable sections of that work are not derived from the Program,
-+and can be reasonably considered independent and separate works in
-+themselves, then this License, and its terms, do not apply to those
-+sections when you distribute them as separate works. But when you
-+distribute the same sections as part of a whole which is a work based
-+on the Program, the distribution of the whole must be on the terms of
-+this License, whose permissions for other licensees extend to the
-+entire whole, and thus to each and every part regardless of who wrote it.
-+
-+Thus, it is not the intent of this section to claim rights or contest
-+your rights to work written entirely by you; rather, the intent is to
-+exercise the right to control the distribution of derivative or
-+collective works based on the Program.
-+
-+In addition, mere aggregation of another work not based on the Program
-+with the Program (or with a work based on the Program) on a volume of
-+a storage or distribution medium does not bring the other work under
-+the scope of this License.
-+
-+ 3. You may copy and distribute the Program (or a work based on it,
-+under Section 2) in object code or executable form under the terms of
-+Sections 1 and 2 above provided that you also do one of the following:
-+
-+ a) Accompany it with the complete corresponding machine-readable
-+ source code, which must be distributed under the terms of Sections
-+ 1 and 2 above on a medium customarily used for software interchange; or,
-+
-+ b) Accompany it with a written offer, valid for at least three
-+ years, to give any third party, for a charge no more than your
-+ cost of physically performing source distribution, a complete
-+ machine-readable copy of the corresponding source code, to be
-+ distributed under the terms of Sections 1 and 2 above on a medium
-+ customarily used for software interchange; or,
-+
-+ c) Accompany it with the information you received as to the offer
-+ to distribute corresponding source code. (This alternative is
-+ allowed only for noncommercial distribution and only if you
-+ received the program in object code or executable form with such
-+ an offer, in accord with Subsection b above.)
-+
-+The source code for a work means the preferred form of the work for
-+making modifications to it. For an executable work, complete source
-+code means all the source code for all modules it contains, plus any
-+associated interface definition files, plus the scripts used to
-+control compilation and installation of the executable. However, as a
-+special exception, the source code distributed need not include
-+anything that is normally distributed (in either source or binary
-+form) with the major components (compiler, kernel, and so on) of the
-+operating system on which the executable runs, unless that component
-+itself accompanies the executable.
-+
-+If distribution of executable or object code is made by offering
-+access to copy from a designated place, then offering equivalent
-+access to copy the source code from the same place counts as
-+distribution of the source code, even though third parties are not
-+compelled to copy the source along with the object code.
-+
-+ 4. You may not copy, modify, sublicense, or distribute the Program
-+except as expressly provided under this License. Any attempt
-+otherwise to copy, modify, sublicense or distribute the Program is
-+void, and will automatically terminate your rights under this License.
-+However, parties who have received copies, or rights, from you under
-+this License will not have their licenses terminated so long as such
-+parties remain in full compliance.
-+
-+ 5. You are not required to accept this License, since you have not
-+signed it. However, nothing else grants you permission to modify or
-+distribute the Program or its derivative works. These actions are
-+prohibited by law if you do not accept this License. Therefore, by
-+modifying or distributing the Program (or any work based on the
-+Program), you indicate your acceptance of this License to do so, and
-+all its terms and conditions for copying, distributing or modifying
-+the Program or works based on it.
-+
-+ 6. Each time you redistribute the Program (or any work based on the
-+Program), the recipient automatically receives a license from the
-+original licensor to copy, distribute or modify the Program subject to
-+these terms and conditions. You may not impose any further
-+restrictions on the recipients' exercise of the rights granted herein.
-+You are not responsible for enforcing compliance by third parties to
-+this License.
-+
-+ 7. If, as a consequence of a court judgment or allegation of patent
-+infringement or for any other reason (not limited to patent issues),
-+conditions are imposed on you (whether by court order, agreement or
-+otherwise) that contradict the conditions of this License, they do not
-+excuse you from the conditions of this License. If you cannot
-+distribute so as to satisfy simultaneously your obligations under this
-+License and any other pertinent obligations, then as a consequence you
-+may not distribute the Program at all. For example, if a patent
-+license would not permit royalty-free redistribution of the Program by
-+all those who receive copies directly or indirectly through you, then
-+the only way you could satisfy both it and this License would be to
-+refrain entirely from distribution of the Program.
-+
-+If any portion of this section is held invalid or unenforceable under
-+any particular circumstance, the balance of the section is intended to
-+apply and the section as a whole is intended to apply in other
-+circumstances.
-+
-+It is not the purpose of this section to induce you to infringe any
-+patents or other property right claims or to contest validity of any
-+such claims; this section has the sole purpose of protecting the
-+integrity of the free software distribution system, which is
-+implemented by public license practices. Many people have made
-+generous contributions to the wide range of software distributed
-+through that system in reliance on consistent application of that
-+system; it is up to the author/donor to decide if he or she is willing
-+to distribute software through any other system and a licensee cannot
-+impose that choice.
-+
-+This section is intended to make thoroughly clear what is believed to
-+be a consequence of the rest of this License.
-+
-+ 8. If the distribution and/or use of the Program is restricted in
-+certain countries either by patents or by copyrighted interfaces, the
-+original copyright holder who places the Program under this License
-+may add an explicit geographical distribution limitation excluding
-+those countries, so that distribution is permitted only in or among
-+countries not thus excluded. In such case, this License incorporates
-+the limitation as if written in the body of this License.
-+
-+ 9. The Free Software Foundation may publish revised and/or new versions
-+of the General Public License from time to time. Such new versions will
-+be similar in spirit to the present version, but may differ in detail to
-+address new problems or concerns.
-+
-+Each version is given a distinguishing version number. If the Program
-+specifies a version number of this License which applies to it and "any
-+later version", you have the option of following the terms and conditions
-+either of that version or of any later version published by the Free
-+Software Foundation. If the Program does not specify a version number of
-+this License, you may choose any version ever published by the Free Software
-+Foundation.
-+
-+ 10. If you wish to incorporate parts of the Program into other free
-+programs whose distribution conditions are different, write to the author
-+to ask for permission. For software which is copyrighted by the Free
-+Software Foundation, write to the Free Software Foundation; we sometimes
-+make exceptions for this. Our decision will be guided by the two goals
-+of preserving the free status of all derivatives of our free software and
-+of promoting the sharing and reuse of software generally.
-+
-+ NO WARRANTY
-+
-+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-+REPAIR OR CORRECTION.
-+
-+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-+POSSIBILITY OF SUCH DAMAGES.
-+
-+ END OF TERMS AND CONDITIONS
-+
-+ How to Apply These Terms to Your New Programs
-+
-+ If you develop a new program, and you want it to be of the greatest
-+possible use to the public, the best way to achieve this is to make it
-+free software which everyone can redistribute and change under these terms.
-+
-+ To do so, attach the following notices to the program. It is safest
-+to attach them to the start of each source file to most effectively
-+convey the exclusion of warranty; and each file should have at least
-+the "copyright" line and a pointer to where the full notice is found.
-+
-+ <one line to give the program's name and a brief idea of what it does.>
-+ Copyright (C) <year> <name of author>
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+
-+
-+Also add information on how to contact you by electronic and paper mail.
-+
-+If the program is interactive, make it output a short notice like this
-+when it starts in an interactive mode:
-+
-+ Gnomovision version 69, Copyright (C) year name of author
-+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-+ This is free software, and you are welcome to redistribute it
-+ under certain conditions; type `show c' for details.
-+
-+The hypothetical commands `show w' and `show c' should show the appropriate
-+parts of the General Public License. Of course, the commands you use may
-+be called something other than `show w' and `show c'; they could even be
-+mouse-clicks or menu items--whatever suits your program.
-+
-+You should also get your employer (if you work as a programmer) or your
-+school, if any, to sign a "copyright disclaimer" for the program, if
-+necessary. Here is a sample; alter the names:
-+
-+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
-+
-+ <signature of Ty Coon>, 1 April 1989
-+ Ty Coon, President of Vice
-+
-+This General Public License does not permit incorporating your program into
-+proprietary programs. If your program is a subroutine library, you may
-+consider it more useful to permit linking proprietary applications with the
-+library. If this is what you want to do, use the GNU Library General
-+Public License instead of this License.
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap-fw-load.patch b/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap-fw-load.patch
deleted file mode 100644
index 050bdc1..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap-fw-load.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-
-#
-# Patch managed by http://www.holgerschurig.de/patcher.html
-#
-
-Upstream-Status: Inappropriate [configuration]
-
---- hostap-utils-0.2.4/hostap_fw_load~hostap-fw-load
-+++ hostap-utils-0.2.4/hostap_fw_load
-@@ -6,9 +6,9 @@
- # Firmware images for the card
- # TODO: could try to select correct firmware type automatically
-
--PRI=/etc/pcmcia/PM010102.HEX
--STA=/etc/pcmcia/RF010802.HEX
--PRISM2_SREC=/usr/local/bin/prism2_srec
-+PRI=/etc/pcmcia/pm010102.hex
-+STA=/etc/pcmcia/rf010804.hex
-+PRISM2_SREC=/usr/sbin/prism2_srec
-
- set -e
-
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.conf b/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.conf
deleted file mode 100644
index 8dda82a..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.conf
+++ /dev/null
@@ -1,193 +0,0 @@
-module "hostap_cs" opts "channel=3 iw_mode=2 essid=any ignore_cis_vcc=1"
-
-card "Actiontec 802CI2"
- manfid 0x1668, 0x0101
- bind "hostap_cs"
-
-card "AirWay 802.11 Adapter (PCMCIA)"
- #version "AirWay", "802.11 Adapter (PCMCIA)"
- manfid 0x0261, 0x0002
- bind "hostap_cs"
-
-card "Asus SpaceLink WL110"
- manfid 0x02aa,0x0002
- bind "hostap_cs"
-
-## handhelds.org bug 964
-card "Belkin F5D6060 Ethernet"
- #version "PCMCIA", "11M WLAN Card v2.5", "ISL37300P", "RevA"
- manfid 0x0274, 0x1612
- bind "hostap_cs"
-
-card "Compaq 11Mbps Wireless PC Card"
- manfid 0x028a, 0x0002
- bind "hostap_cs"
-
-card "Compaq WL100 11 Mbps Wireless Adapter"
- manfid 0x0138, 0x0002
- bind "hostap_cs"
-
-card "Compaq HNW-100 11 Mbps Wireless Adapter"
- manfid 0x028a, 0x0002
- bind "hostap_cs"
-
-card "D-Link DWL-650"
- version "D", "Link DWL-650 11Mbps WLAN Card"
- bind "hostap_cs"
-
-card "D-Link DRC-650"
- version "D", "Link DRC-650 11Mbps WLAN Card"
- bind "hostap_cs"
-
-card "D-Link DCF660"
- manfid 0xd601, 0x0005
- bind "hostap_cs"
-
-card "Farallon SkyLINE"
- version "INTERSIL", "HFA384x/IEEE"
- bind "hostap_cs"
-
-card "HyperLink Wireless PC Card 11Mbps"
- version "HyperLink", "Wireless PC Card 11Mbps"
- bind "hostap_cs"
-
-# card "Intersil PRISM2 11 Mbps Wireless Adapter"
-# manfid 0x0156, 0x0002
-# bind "hostap_cs"
-
-card "LA4111 Spectrum24 Wireless LAN PC Card"
- version "Symbol Technologies"
- bind "hostap_cs"
-
-card "Linksys WPC11 11Mbps 802.11b WLAN Card"
- version "Instant Wireless ", " Network PC CARD", "Version 01.02"
- bind "hostap_cs"
-
-card "Linksys WCF11 11Mbps 802.11b WLAN Card"
- manfid 0x0274, 0x3301
- bind "hostap_cs"
-
-## handhelds.org bug #790
-card "Linksys Wireless CompactFlash Card WCF12"
- manfid 0x028a, 0x0673
- bind "hostap_cs"
-
-card "Linksys WLAN CF Card"
- manfid 0x0274, 0x3301
- bind "hostap_cs"
-
-card "NETGEAR MA701 Wireless CF Card"
- manfid 0xd601, 0x0002
- bind "hostap_cs"
-
-card "Nortel Networks eMobility 802.11 Wireless Adapter"
- manfid 0x01eb, 0x080a
- bind "hostap_cs"
-
-card "PLANEX GeoWave GW-CF110"
- version "PLANEX", "GeoWave/GW-CF110"
- bind "hostap_cs"
-
-card "PROXIM LAN PC CARD HARMONY 80211B"
- version "PROXIM", "LAN PC CARD HARMONY 80211B"
- bind "hostap_cs"
-
-card "Proxim RangeLAN/DS"
- version "PROXIM","RangeLAN-DS/LAN PC CARD"
- manfid 0x0126, 0x8000
- bind "hostap_cs"
-
-card "Safeway 802.11b Wireless Adapter"
- manfid 0xd601, 0x0002
- bind "hostap_cs"
-
-card "SAMSUNG 11Mbps WLAN Card"
- version "SAMSUNG", "11Mbps WLAN Card"
- bind "hostap_cs"
-
-# needs firmware upload via hostap_fw_load
-card "SanDisk ConnectPlus OEM (0MB)"
- manfid 0xd601, 0x0010
- bind "hostap_cs"
-
-# needs special activation (>=hostap 0.3.2 only) plus firmware upload
-card "SanDisk ConnectPlus w/ Memory"
- version "SanDisk", "ConnectPlus"
- manfid 0xd601, 0x0101
- bind "hostap_cs" to 0
-# bind "ide-cs" to 1
-
-card "Senao/Origo 80211b WLAN Card"
- manfid 0x000b,0x7100
- bind "hostap_cs"
-
-card "Sitecom WL-007 WLAN CF Card"
- manfid 0xd601, 0x0004
- bind "hostap_cs"
-
-card "SMC2632 802.11 (prism2) Card"
- version "SMC", "SMC2632W", "Version 01.02", ""
- bind "hostap_cs"
-
-card "SpeedStream SS1021 Wireless Adapter"
- #version "Siemens", "SpeedStream Wireless PCMCIA"
- manfid 0x02ac, 0x0002
- bind "hostap_cs"
-
-card "ZCOMAX AirRunner/XI-300"
- #version "ZCOMAX", "AirRunner/XI-300"
- manfid 0xd601, 0x0002
- bind "hostap_cs"
-
-card "Zonet ZCF1100"
- manfid 0x000b, 0x7100
- bind "hostap_cs"
-
-card "Wireless LAN Adapter Version 01.02"
- version "Wireless", "LAN Adapter", "Version 01.02"
-# manfid 0x0156, 0x0002
- bind "hostap_cs"
-
-card "Ambicom WL1100C 11Mbs Card 802.11b"
- version "AmbiCom", "WL1100C 802.11b CF-Card", "2.2"
- manfid 0xd601,0x0002
- bind "hostap_cs"
-
-card "Ambicom WL1100C 11Mbs Card 802.11b"
- manfid 0xd601,0x0002
- bind "hostap_cs"
-
-card "Sandisk Connect SDWCFB-000"
- manfid 0xd601,0x0005
- bind "hostap_cs"
-
-# Cards with Intersil firmware (Prism chipset)
-
-card "Linksys WPC11 11Mbps 802.11b WLAN Card"
- version "The Linksys Group, Inc.", "Instant Wireless Network PC Card", "ISL37300P", "RevA"
- bind "hostap_cs"
-
-card "Linksys CompactFlash Wireless Card"
- version "Linksys", "Wireless CompactFlash Card"
- bind "hostap_cs"
-
-card "ACTIONTEC PRISM Wireless LAN PC Card"
- version "ACTIONTEC", "PRISM Wireless LAN PC Card"
- bind "hostap_cs"
-
-card "Linksys WPC11 Version 3"
- manfid 0x0274,0x1613
- bind "hostap_cs"
-
-card "BENQ AWL100"
- version "BENQ", "AWL100 PCMCIA ADAPTER"
- bind "hostap_cs"
-
-card "Pretec WLAN"
- version "Pretec", "CompactWLAN Card 802.11b", "2.5"
- manfid 0x0156, 0x0002
- bind "hostap_cs"
-
-card "TrendNet TEW PC16"
- manfid 0x0274, 0x1601
- bind "hostap_cs"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.conf-upstream b/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.conf-upstream
deleted file mode 100644
index 5b7385a..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.conf-upstream
+++ /dev/null
@@ -1,191 +0,0 @@
-device "hostap_cs"
- class "network" module "hostap", "hostap_cs"
-
-card "Intersil PRISM2 Reference Design 11Mb/s WLAN Card"
- version "INTERSIL", "HFA384x/IEEE"
- bind "hostap_cs"
-
-card "Compaq WL100 11Mb/s WLAN Card"
- manfid 0x0138, 0x0002
- bind "hostap_cs"
-
-card "Compaq WL200"
- version "Compaq", "WL200_11Mbps_Wireless_PCI_Card"
- bind "hostap_cs"
-
-card "EMTAC A2424i 11Mbps WLAN Card"
- manfid 0xc250, 0x0002
-# cis "cis/Emtac.dat"
- bind "hostap_cs"
-
-card "Linksys WPC11 11Mbps WLAN Card"
- version "Instant Wireless ", " Network PC CARD", "Version 01.02"
- bind "hostap_cs"
-
-card "Linksys WPC11 Ver 2.5 11Mbps WLAN Card"
- manfid 0x0274, 0x1612
- bind "hostap_cs"
-
-card "Linksys WPC11 Ver 3 11Mbps WLAN Card"
- manfid 0x0274, 0x1613
- bind "hostap_cs"
-
-card "Linksys WCF12 Wireless CompactFlash Card"
- version "Linksys", "Wireless CompactFlash Card"
- bind "hostap_cs"
-
-card "D-Link DWL-650 11Mbps WLAN Card"
- version "D", "Link DWL-650 11Mbps WLAN Card", "Version 01.02"
- bind "hostap_cs"
-
-card "D-Link DRC-650 11Mbps WLAN Card"
-# version "D", "Link DRC-650 11Mbps WLAN Card", "Version 01.02"
- manfid 0x028a, 0x0002
- bind "hostap_cs"
-
-card "ZoomAir 4100 11Mb/s WLAN Card"
- version "ZoomAir 11Mbps High", "Rate wireless Networking"
- bind "hostap_cs"
-
-card "Addtron AWP-100 11Mbps WLAN Card"
- version "Addtron", "AWP-100 Wireless PCMCIA", "Version 01.02"
- bind "hostap_cs"
-
-card "Samsung SWL2000-N 11Mb/s WLAN Card"
- manfid 0x0250, 0x0002
- bind "hostap_cs"
-
-card "SMC 2632W 11Mbps WLAN Card"
- version "SMC", "SMC2632W", "Version 01.02"
- bind "hostap_cs"
-
-card "BroMax Freeport 11Mbps WLAN Card"
- version "Intersil", "PRISM 2_5 PCMCIA ADAPTER", "ISL37300P", "Eval-RevA"
- bind "hostap_cs"
-
-card "Z-Com XI300 11Mb/s WLAN Card"
- manfid 0xd601, 0x0002
- bind "hostap_cs"
-
-card "Zcomax XI-325H 200mW"
-# version " ", "IEEE 802.11 Wireless LAN/PC Card"
- manfid 0xd601, 0x0005
- bind "hostap_cs"
-
-card "3Com AirConnect PCI 777A"
- manfid 0x0101, 0x0777
- bind "hostap_cs"
-
-card "U.S. Robotics IEEE 802.11b PC-CARD"
- version "U.S. Robotics", "IEEE 802.11b PC-CARD", "Version 01.02"
-# manfid 0x0156, 0x0002
- bind "hostap_cs"
-
-card "Longshine LCR-8531 11Mbps WLAN PCMCIA CARD"
- version "OEM", "PRISM2 IEEE 802.11 PC-Card", "Version 01.02"
-# manfid 0x0156, 0x0002
- bind "hostap_cs"
-
-card "Philips 802.11b WLAN PCMCIA"
- manfid 0x000b, 0x7300
- bind "hostap_cs"
-
-card "Proxim RangeLAN"
-# version "PROXIM", "RangeLAN-DS/LAN PC CARD"
- manfid 0x0126, 0x8000
- bind "hostap_cs"
-
-card "Buffalo WLI-CF-S11G"
- version "BUFFALO", "WLI-CF-S11G"
-# manfid 0x026f, 0x030b
- bind "hostap_cs"
-
-card "Level-One WPC-0100"
- version "Digital Data Communications", "WPC-0100", "Version 00.00"
- manfid 0x0156, 0x0002
- bind "hostap_cs"
-
-card "Belkin 802.11b WLAN PCMCIA"
- version "Belkin", "11Mbps Wireless Notebook Network Adapter", "Version 01.02"
- manfid 0x0156, 0x0002
- bind "hostap_cs"
-
-card "Senao SL-2011CD/SL-2011CDPLUS"
- version "INTERSIL", "HFA384x/IEEE", "Version 01.02"
- manfid 0x0156, 0x0002
- bind "hostap_cs"
-
-card "Fulbond Airbond XI-300B"
- version " ", "IEEE 802.11 Wireless LAN/PC Card"
- manfid 0xd601, 0x0002
- bind "hostap_cs"
-
-card "Netgear MA401"
- version "NETGEAR MA401 Wireless PC", "Card", "Version 01.00"
-# manfid 0x0156, 0x0002
- bind "hostap_cs"
-
-card "D-Link DWL-650 Rev. P1"
- version "D-Link", "DWL-650 Wireless PC Card RevP", "ISL37101P-10", "A3"
-# manfid 0x000b, 0x7110
- bind "hostap_cs"
-
-card "SonicWALL Long Range Wireless Card"
- version "SonicWALL", "Long Range Wireless Card", "ISL37100P", "1.0"
- manfid 0x000b, 0x7100
- bind "hostap_cs"
-
-card "Senao NL-2011CD PLUS Ext2 Mercury"
- version "WLAN", "11Mbps_PC-Card_3.0", "ISL37100P", "Eval-RevA"
- manfid 0x000b, 0x7100
- bind "hostap_cs"
-
-card "Airvast WL100"
- version "AIRVAST", "IEEE 802.11b Wireless PCMCIA Card", "HFA3863"
- manfid 0x50c2, 0x0001
- bind "hostap_cs"
-
-card "Microsoft Wireless Notebook Adapter MN-520 1.0.3"
- version "Microsoft", "Wireless Notebook Adapter MN-520", "", "1.0.3"
- manfid 0x02d2, 0x0001
- bind "hostap_cs"
-
-card "NETGEAR MA401RA"
- version "NETGEAR MA401RA Wireless PC", "Card", "ISL37300P", "Eval-RevA"
- manfid 0x000b, 0x7300
- bind "hostap_cs"
-
-card "Allied Telesyn AT-WCL452"
- version "Allied Telesyn", "AT-WCL452 Wireless PCMCIA Radio", "Ver. 1.00"
- manfid 0xc00f, 0x0000
- bind "hostap_cs"
-
-card "corega WL PCCL-11"
- version "corega", "WL PCCL-11", "ISL37300P", "RevA"
- manfid 0xc00f, 0x0000
- bind "hostap_cs"
-
-card "SanDisk ConnectPlus"
- version "SanDisk", "ConnectPlus"
- manfid 0xd601, 0x0101
- bind "hostap_cs" to 0
- bind "ide-cs" to 1
-
-card "ASUS WL-100 8011b WLAN PC Card"
- version "ASUS", "802_11b_PC_CARD_25", "Version 01.00"
- manfid 0x02aa, 0x0002
- bind "hostap_cs"
-
-card "ZyXel Zyair B-101 802.11b WLAN card"
- version " ", "IEEE 802.11 Wireless LAN/PC Card"
- manfid 0xd601, 0x0010
- bind "hostap_cs"
-
-card "WLAN PRISM PCMCIA CARD 37300P RevB6"
- version "WLAN", "PRISM PCMCIA CARD", "37300P", "Revision B6"
- manfid 0x50c2, 0x7300
- bind "hostap_cs"
-
-
-# Optional configuration parameters for hostap_cs.o
-# module "hostap_cs" opts "channel=3 iw_mode=3 essid=test ignore_cis_vcc=0"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.modalias b/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.modalias
deleted file mode 100644
index 2848351..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.modalias
+++ /dev/null
@@ -1,28 +0,0 @@
-# product info: "Pretec", "CompactWLAN Card 802.11b", "2.5"
-alias pcmcia:m0156c0002f06fn00pfn00pa1CADD3E5pbE697636Cpc7A5BFCF1pd00000000 hostap_cs
-
-# manufacturer ID which exist in orinoco_cs AND in hostap_cs
-alias pcmcia:m000Bc7100f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m000Bc7300f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m0126c8000f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m0138c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m0250c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m0274c1612f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m0274c1613f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m028Ac0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m02AAc0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m50C2c7300f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:mD601c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:mD601c0005f06fn00pfn00pa*pb*pc*pd* hostap_cs
-
-# product info: "Linksys", "Wireless CompactFlash Card", "", ""
-alias pcmcia:m028Ac0673f06fn00pfn00pa0733CC81pb0C52F395pc00000000pd00000000 hostap_cs
-
-# product info:"PLANEX COMMUNICATION INC","PLANEX GW-CF11X Wireless CF Card", "", ""
-alias pcmcia:mD601c0010f06fn00pfn00pa4703CF68pbFAD7318Dpc00000000pd00000000 hostap_cs
-
-# 0x0156, 0x0002 and "Version 01.02" only appear for Prism based cards.
-alias pcmcia:m0156c0002f06fn00pfn00pa*pb*pc4B74BAA0pd00000000 hostap_cs
-
-# "BUFFALO", "WLI-CF-S11G", "", ""
-alias pcmcia:m026Fc030Bf06fn00pfn00pa2DECECE3pb82067C18pc00000000pd00000000 hostap_cs
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-conf_1.0.bb b/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
deleted file mode 100644
index e1d4c54..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Configuration files for HostAP (wifi) driver"
-DESCRIPTION = "PCMCIA-cs configuration files for wireless LAN cards based on Intersil's Prism2/2.5/3 chipset."
-SECTION = "kernel/modules"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-PR = "r15"
-
-SRC_URI = "file://hostap_cs.modalias \
- file://COPYING.patch"
-
-inherit allarch
-
-S = "${WORKDIR}"
-
-do_compile() {
-}
-
-do_install() {
- install -d ${D}${sysconfdir}/modprobe.d
-
- install -m 0644 ${WORKDIR}/hostap_cs.modalias ${D}${sysconfdir}/modprobe.d/hostap_cs.conf
-}
-
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch b/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
deleted file mode 100644
index b44dca3..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 742fb110d9841a04b3ced256b0bf80ff304dcaff Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 31 Aug 2015 05:45:08 +0000
-Subject: [PATCH] Define _u32/__s32/__u16/__s16/__u8 in terms of c99 types
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- wireless_copy.h | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/wireless_copy.h b/wireless_copy.h
-index 8208258..1171a35 100644
---- a/wireless_copy.h
-+++ b/wireless_copy.h
-@@ -86,11 +86,11 @@
- #else
- #include <sys/types.h>
- #include <net/if.h>
--typedef __uint32_t __u32;
--typedef __int32_t __s32;
--typedef __uint16_t __u16;
--typedef __int16_t __s16;
--typedef __uint8_t __u8;
-+typedef u_int32_t __u32;
-+typedef int32_t __s32;
-+typedef u_int16_t __u16;
-+typedef int16_t __s16;
-+typedef u_int8_t __u8;
- #ifndef __user
- #define __user
- #endif /* __user */
---
-2.5.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils-0.4.7/ldflags.patch b/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils-0.4.7/ldflags.patch
deleted file mode 100644
index 3e99d0d..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils-0.4.7/ldflags.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Obey LDFLAGS
-
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-Upstream-Status: Pending
-
---- hostap-utils-0.4.7.orig/Makefile
-+++ hostap-utils-0.4.7/Makefile
-@@ -14,17 +14,17 @@ prism2_srec.o: prism2_srec.c util.h
- hostap_crypt_conf: hostap_crypt_conf.c
-
- hostap_diag: hostap_diag.o util.o
-- $(CC) -o hostap_diag $(CFLAGS) hostap_diag.o util.o
-+ $(CC) -o hostap_diag $(CFLAGS) $(LDFLAGS) hostap_diag.o util.o
-
- hostap_diag.o: hostap_diag.c util.h
-
- util.o: util.c util.h
-
- hostap_io_debug: hostap_io_debug.c
-- $(CC) -o hostap_io_debug $(CFLAGS) hostap_io_debug.c
-+ $(CC) -o hostap_io_debug $(CFLAGS) $(LDFLAGS) hostap_io_debug.c
-
- hostap_rid: hostap_rid.o util.o
-- $(CC) -o hostap_rid $(CFLAGS) hostap_rid.o util.o
-+ $(CC) -o hostap_rid $(CFLAGS) $(LDFLAGS) hostap_rid.o util.o
-
- hostap_rid.o: hostap_rid.c util.h
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils.inc b/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils.inc
deleted file mode 100644
index 6d98e3a..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "User mode helpers for the hostap driver"
-DESCRIPTION = "The hostap driver supports Host AP mode, it allows for IEEE 802.11 \
-management functions on the host computer and allows the system to act as an access point."
-HOMEPAGE = "https://w1.fi"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
- file://util.c;beginline=1;endline=9;md5=d3b9280851302e5ba34e5fb717489b6d"
-SECTION = "kernel/userland"
-PR = "r4"
-
-SRC_URI = "https://w1.fi/releases/hostap-utils-${PV}.tar.gz \
- file://hostap-fw-load.patch \
- file://0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch \
-"
-S = "${WORKDIR}/hostap-utils-${PV}"
-
-BINARIES = "hostap_crypt_conf hostap_diag hostap_fw_load hostap_io_debug \
- hostap_rid prism2_param prism2_srec split_combined_hex"
-
-do_install() {
- install -d ${D}${sbindir}/
- for f in ${BINARIES}
- do
- install -m 0755 $f ${D}${sbindir}/
- done
-}
-
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb b/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb
deleted file mode 100644
index be5481f..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require hostap-utils.inc
-
-SRC_URI += "file://ldflags.patch"
-SRC_URI[md5sum] = "afe041581b8f01666e353bec20917c85"
-SRC_URI[sha256sum] = "c6f598d8e356c1620fa009eca0a700bf1105e16817eefd77d891994261009355"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch b/import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch
index 86a16c2..06f20e5 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch
+++ b/import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch
@@ -3,9 +3,10 @@
Fix libacpi for x32
libacpi doesn't use base_libdir for install. This patch adds
- base_libdir support so that x32 libraries are installed properly.
+ libdir support so that x32 libraries are installed properly.
Patch Received from: H.J. Lu <hjl.tools@gmail.com>
+Updated by: Ricardo Salveti <ricardo@opensourcefoundries.com> 2018/02/03
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/05
@@ -13,18 +14,7 @@
===================================================================
--- libacpi-0.2.orig/Makefile
+++ libacpi-0.2/Makefile
-@@ -8,6 +8,10 @@ SRC_test = test-libacpi.c libacpi.c list
- OBJ = ${SRC:.c=.o}
- OBJ_test = ${SRC_test:.c=.o}
-
-+ifndef base_libdir
-+base_libdir=/lib
-+endif
-+
- all: options libacpi.a libacpi.so test-libacpi
-
- options:
-@@ -42,13 +46,13 @@ install: all
+@@ -42,13 +42,13 @@ install: all
@mkdir -p ${DESTDIR}${PREFIX}/include
@cp -f libacpi.h ${DESTDIR}${PREFIX}/include
@chmod 644 ${DESTDIR}${PREFIX}/include/libacpi.h
@@ -35,13 +25,13 @@
- @cp -f ${SONAME} ${DESTDIR}${PREFIX}/lib/
- @chmod 644 ${DESTDIR}${PREFIX}/lib/${SONAME}
- @ln -s ${SONAME} ${DESTDIR}${PREFIX}/lib/libacpi.so
-+ @echo installing library to ${DESTDIR}${PREFIX}${base_libdir}
-+ @mkdir -p ${DESTDIR}${PREFIX}${base_libdir}
-+ @cp -f libacpi.a ${DESTDIR}${PREFIX}${base_libdir}
-+ @chmod 644 ${DESTDIR}${PREFIX}${base_libdir}/libacpi.a
-+ @cp -f ${SONAME} ${DESTDIR}${PREFIX}${base_libdir}/
-+ @chmod 644 ${DESTDIR}${PREFIX}${base_libdir}/${SONAME}
-+ @ln -s ${SONAME} ${DESTDIR}${PREFIX}${base_libdir}/libacpi.so
++ @echo installing library to ${DESTDIR}${LIBDIR}
++ @mkdir -p ${DESTDIR}${LIBDIR}
++ @cp -f libacpi.a ${DESTDIR}${LIBDIR}
++ @chmod 644 ${DESTDIR}${LIBDIR}/libacpi.a
++ @cp -f ${SONAME} ${DESTDIR}${LIBDIR}/
++ @chmod 644 ${DESTDIR}${LIBDIR}/${SONAME}
++ @ln -s ${SONAME} ${DESTDIR}${LIBDIR}/libacpi.so
@echo installing test-libacpi to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin
@cp -f test-libacpi ${DESTDIR}${PREFIX}/bin
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/libacpi/libacpi_0.2.bb b/import-layers/yocto-poky/meta/recipes-bsp/libacpi/libacpi_0.2.bb
index 6dc66ea..5e7f7fa 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/libacpi/libacpi_0.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-bsp/libacpi/libacpi_0.2.bb
@@ -28,5 +28,5 @@
TARGET_CC_ARCH += "${LDFLAGS}"
do_install() {
- oe_runmake install DESTDIR=${D} PREFIX=${exec_prefix}
+ oe_runmake install DESTDIR=${D} PREFIX=${exec_prefix} LIBDIR=${libdir}
}
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils/configure.patch b/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils/configure.patch
index 55edfea..a7e4457 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils/configure.patch
+++ b/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils/configure.patch
@@ -13,11 +13,11 @@
Upstream-Status: Inappropriate [embedded specific]
-Index: pciutils-3.5.4/Makefile
+Index: pciutils-3.5.6/Makefile
===================================================================
---- pciutils-3.5.4.orig/Makefile
-+++ pciutils-3.5.4/Makefile
-@@ -96,7 +95,7 @@ example: example.o lib/$(PCILIB)
+--- pciutils-3.5.6.orig/Makefile
++++ pciutils-3.5.6/Makefile
+@@ -96,7 +96,7 @@ example: example.o lib/$(PCILIB)
example.o: example.c $(PCIINC)
%: %.o
@@ -26,12 +26,12 @@
%.8 %.7: %.man
M=`echo $(DATE) | sed 's/-01-/-January-/;s/-02-/-February-/;s/-03-/-March-/;s/-04-/-April-/;s/-05-/-May-/;s/-06-/-June-/;s/-07-/-July-/;s/-08-/-August-/;s/-09-/-September-/;s/-10-/-October-/;s/-11-/-November-/;s/-12-/-December-/;s/\(.*\)-\(.*\)-\(.*\)/\3 \2 \1/'` ; sed <$< >$@ "s/@TODAY@/$$M/;s/@VERSION@/pciutils-$(VERSION)/;s#@IDSDIR@#$(IDSDIR)#"
-Index: pciutils-3.5.4/lib/configure
+Index: pciutils-3.5.6/lib/configure
===================================================================
---- pciutils-3.5.4.orig/lib/configure
-+++ pciutils-3.5.4/lib/configure
-@@ -14,6 +14,10 @@ echo_n() {
- fi
+--- pciutils-3.5.6.orig/lib/configure
++++ pciutils-3.5.6/lib/configure
+@@ -9,6 +9,10 @@ echo_n() {
+ printf '%s' "$*"
}
+VERSION=$1
@@ -41,7 +41,7 @@
if [ -z "$VERSION" -o -z "$IDSDIR" ] ; then
echo >&2 "Please run the configure script from the top-level Makefile"
exit 1
-@@ -21,8 +25,8 @@ fi
+@@ -16,8 +20,8 @@ fi
echo_n "Configuring libpci for your system..."
if [ -z "$HOST" ] ; then
@@ -52,7 +52,7 @@
realsys="$sys"
if [ "$sys" = "AIX" -a -x /usr/bin/oslevel -a -x /usr/sbin/lsattr ]
then
-@@ -30,7 +34,7 @@ if [ -z "$HOST" ] ; then
+@@ -25,7 +29,7 @@ if [ -z "$HOST" ] ; then
proc=`/usr/sbin/lsdev -C -c processor -S available -F name | head -1`
cpu=`/usr/sbin/lsattr -F value -l $proc -a type | sed 's/_.*//'`
else
@@ -61,7 +61,7 @@
fi
if [ "$sys" = "GNU/kFreeBSD" -o "$sys" = "DragonFly" ]
then
-@@ -40,7 +44,7 @@ if [ -z "$HOST" ] ; then
+@@ -35,7 +39,7 @@ if [ -z "$HOST" ] ; then
then
sys=cygwin
fi
@@ -70,7 +70,7 @@
fi
[ -n "$RELEASE" ] && rel="${RELEASE}"
# CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless.
-@@ -49,6 +53,8 @@ cpu=`echo $host | sed 's/^\([^-]*\)-\([^
+@@ -44,6 +48,8 @@ cpu=`echo $host | sed 's/^\([^-]*\)-\([^
sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo " $host $rel $cpu $sys"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.5.5.bb b/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.5.5.bb
deleted file mode 100644
index 0051fd8..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.5.5.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-SUMMARY = "PCI utilities"
-DESCRIPTION = 'The PCI Utilities package contains a library for portable access \
-to PCI bus configuration space and several utilities based on this library.'
-HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml"
-SECTION = "console/utils"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-DEPENDS = "zlib kmod"
-
-SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
- file://configure.patch"
-
-SRC_URI[md5sum] = "238d9969cc0de8b9105d972007d9d546"
-SRC_URI[sha256sum] = "1d62f8fa192f90e61c35a6fc15ff3cb9a7a792f782407acc42ef67817c5939f5"
-
-inherit multilib_header pkgconfig
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}"
-PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
-
-PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes STRIP= LIBDIR=${libdir}"
-
-# see configure.patch
-do_configure () {
- (
- cd lib && \
- # PACKAGECONFIG_CONFARGS for this recipe could only possibly contain 'HWDB=yes/no',
- # so we put it before ./configure
- ${PCI_CONF_FLAG} ${PACKAGECONFIG_CONFARGS} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
- )
-}
-
-export PREFIX = "${prefix}"
-export SBINDIR = "${sbindir}"
-export SHAREDIR = "${datadir}"
-export MANDIR = "${mandir}"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}"
-
-# The configure script breaks if the HOST variable is set
-HOST[unexport] = "1"
-
-do_install () {
- oe_runmake DESTDIR=${D} install install-lib
-
- install -d ${D}${bindir}
- ln -s ../sbin/lspci ${D}${bindir}/lspci
-
- oe_multilib_header pci/config.h
-}
-
-PACKAGES =+ "${PN}-ids libpci"
-FILES_${PN}-ids = "${datadir}/pci.ids*"
-FILES_libpci = "${libdir}/libpci.so.*"
-SUMMARY_${PN}-ids = "PCI utilities - device ID database"
-DESCRIPTION_${PN}-ids = "Package providing the PCI device ID database for pciutils."
-RDEPENDS_${PN} += "${PN}-ids"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.5.6.bb b/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.5.6.bb
new file mode 100644
index 0000000..b18b7da
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.5.6.bb
@@ -0,0 +1,58 @@
+SUMMARY = "PCI utilities"
+DESCRIPTION = 'The PCI Utilities package contains a library for portable access \
+to PCI bus configuration space and several utilities based on this library.'
+HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml"
+SECTION = "console/utils"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+DEPENDS = "zlib kmod"
+
+SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
+ file://configure.patch"
+
+SRC_URI[md5sum] = "8e52278399b7b35fcfc031bc05da80a8"
+SRC_URI[sha256sum] = "f346eeb90cce0910c05b877fe49eadc760fa084c0455fd313e39d4b2c2d4bb21"
+
+inherit multilib_header pkgconfig
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}"
+PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
+
+PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes STRIP= LIBDIR=${libdir}"
+
+# see configure.patch
+do_configure () {
+ (
+ cd lib && \
+ # PACKAGECONFIG_CONFARGS for this recipe could only possibly contain 'HWDB=yes/no',
+ # so we put it before ./configure
+ ${PCI_CONF_FLAG} ${PACKAGECONFIG_CONFARGS} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
+ )
+}
+
+export PREFIX = "${prefix}"
+export SBINDIR = "${sbindir}"
+export SHAREDIR = "${datadir}"
+export MANDIR = "${mandir}"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}"
+
+# The configure script breaks if the HOST variable is set
+HOST[unexport] = "1"
+
+do_install () {
+ oe_runmake DESTDIR=${D} install install-lib
+
+ install -d ${D}${bindir}
+ ln -s ../sbin/lspci ${D}${bindir}/lspci
+
+ oe_multilib_header pci/config.h
+}
+
+PACKAGES =+ "${PN}-ids libpci"
+FILES_${PN}-ids = "${datadir}/pci.ids*"
+FILES_libpci = "${libdir}/libpci.so.*"
+SUMMARY_${PN}-ids = "PCI utilities - device ID database"
+DESCRIPTION_${PN}-ids = "Package providing the PCI device ID database for pciutils."
+RDEPENDS_${PN} += "${PN}-ids"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch b/import-layers/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch
index f5a518f..4c5eba7 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch
+++ b/import-layers/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch
@@ -16,20 +16,6 @@
===================================================================
--- pcmciautils-018.orig/Makefile
+++ pcmciautils-018/Makefile
-@@ -249,6 +249,9 @@ $(PCMCIA_SOCKET_STARTUP): $(LIBC) src/st
- yacc_config.o lex_config.o: %.o: %.c src/yacc_config.h
- $(CC) -c -MD -O -pipe $(CPPFLAGS) $<
-
-+src/lex_config.o : src/lex_config.c src/yacc_config.h
-+ $(QUIET) $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
-+
- debugtools: ccdv $(CBDUMP) $(CISDUMP)
-
- $(CBDUMP): $(LIBC) debug/cbdump.o
-Index: pcmciautils-018/Makefile
-===================================================================
---- pcmciautils-018.orig/Makefile
-+++ pcmciautils-018/Makefile
@@ -246,8 +246,8 @@ $(PCMCIA_SOCKET_STARTUP): $(LIBC) src/st
$(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) src/startup.o src/yacc_config.o src/lex_config.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
$(QUIET) $(STRIPCMD) $@
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/files/10m50-update-device-tree.patch b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/files/10m50-update-device-tree.patch
deleted file mode 100644
index 841953c..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/files/10m50-update-device-tree.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Nios II for MAX10 10m50 board requires update to
-its device tree to enable CPU driver during
-u-boot pre-relocation. This patch tag the CPU
-with dm-pre-reloc flag.
-
-Upstream-Status: Submitted
-
-Signed-off-by: Gan, Yau Wai <yau.wai.gan@intel.com>
-
----
- arch/nios2/dts/10m50_devboard.dts | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/nios2/dts/10m50_devboard.dts b/arch/nios2/dts/10m50_devboard.dts
-index 05eac30..461ae68 100644
---- a/arch/nios2/dts/10m50_devboard.dts
-+++ b/arch/nios2/dts/10m50_devboard.dts
-@@ -19,6 +19,7 @@
- #size-cells = <0>;
-
- cpu: cpu@0 {
-+ u-boot,dm-pre-reloc;
- device_type = "cpu";
- compatible = "altr,nios2-1.1";
- reg = <0x00000000>;
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch
index cea52b7..ecaa179 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch
+++ b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch
@@ -5,15 +5,15 @@
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
-diff --git a/configs/MPC8315ERDB_defconfig b/configs/MPC8315ERDB_defconfig
-index 4e2b705..b02ab1f 100644
---- a/configs/MPC8315ERDB_defconfig
-+++ b/configs/MPC8315ERDB_defconfig
-@@ -9,6 +9,7 @@ CONFIG_HUSH_PARSER=y
- CONFIG_CMD_I2C=y
+Index: git/configs/MPC8315ERDB_defconfig
+===================================================================
+--- git.orig/configs/MPC8315ERDB_defconfig
++++ git/configs/MPC8315ERDB_defconfig
+@@ -12,6 +12,7 @@ CONFIG_CMD_PCI=y
+ CONFIG_CMD_SATA=y
CONFIG_CMD_USB=y
# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
- CONFIG_CMD_EXT2=y
+ CONFIG_CMD_DATE=y
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-common_2017.09.inc b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-common_2017.09.inc
deleted file mode 100644
index 02e5124..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-common_2017.09.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
-SECTION = "bootloaders"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
-PE = "1"
-
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "c98ac3487e413c71e5d36322ef3324b21c6f60f9"
-
-SRC_URI = "git://git.denx.de/u-boot.git \
- file://MPC8315ERDB-enable-DHCP.patch \
- file://10m50-update-device-tree.patch \
-"
-
-S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc
new file mode 100644
index 0000000..d2073ea
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc
@@ -0,0 +1,16 @@
+HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
+SECTION = "bootloaders"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
+PE = "1"
+
+# We use the revision in order to avoid having to fetch it from the
+# repo during parse
+SRCREV = "f3dd87e0b98999a78e500e8c6d2b063ebadf535a"
+
+SRC_URI = "git://git.denx.de/u-boot.git \
+ file://MPC8315ERDB-enable-DHCP.patch \
+"
+
+S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2018.01.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb
rename to import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2018.01.bb
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2017.09.bb b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2017.09.bb
deleted file mode 100644
index f1fc564..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2017.09.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-require u-boot-common_${PV}.inc
-
-SUMMARY = "U-Boot bootloader image creation tool"
-DEPENDS = "openssl"
-
-EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
-EXTRA_OEMAKE_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
-EXTRA_OEMAKE_class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
-
-do_compile () {
- oe_runmake sandbox_defconfig
-
- # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and
- # generating it requires bin2header tool, which for target build
- # is built with target tools and thus cannot be executed on host.
- sed -i "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" .config
-
- oe_runmake cross_tools NO_SDL=1
-}
-
-do_install () {
- install -d ${D}${bindir}
- install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage
- ln -sf uboot-mkimage ${D}${bindir}/mkimage
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.01.bb b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.01.bb
new file mode 100644
index 0000000..1c008be
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.01.bb
@@ -0,0 +1,29 @@
+require u-boot-common_${PV}.inc
+
+SUMMARY = "U-Boot bootloader image creation tool"
+DEPENDS = "openssl"
+
+EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
+EXTRA_OEMAKE_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
+EXTRA_OEMAKE_class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
+
+do_compile () {
+ oe_runmake sandbox_defconfig
+
+ # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and
+ # generating it requires bin2header tool, which for target build
+ # is built with target tools and thus cannot be executed on host.
+ sed -i "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" .config
+
+ oe_runmake cross_tools NO_SDL=1
+}
+
+do_install () {
+ install -d ${D}${bindir}
+ install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage
+ ln -sf uboot-mkimage ${D}${bindir}/mkimage
+}
+
+RDEPENDS_${PN} += "dtc"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot_2017.09.bb b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot_2018.01.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot_2017.09.bb
rename to import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot_2018.01.bb
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch b/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch
deleted file mode 100644
index 0efdc59..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Fix NULL pointer crash.
-
-Before use usbbuslist, we should check if it is valid.
-
-Upstream-Status: Pending
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- lsusb-t.c | 4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/lsusb-t.c b/lsusb-t.c
-index f604155..583a46a 100644
---- a/lsusb-t.c
-+++ b/lsusb-t.c
-@@ -643,6 +643,10 @@ static void sort_busses(void)
- /* need to reverse sort bus numbers */
- struct usbbusnode *t, *p, **pp;
- int swapped;
-+
-+ if (!usbbuslist)
-+ return;
-+
- do {
- p = usbbuslist;
- pp = &usbbuslist;
---
-1.7.4.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils/iconv.patch b/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils/iconv.patch
deleted file mode 100644
index 6455567..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils/iconv.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-This patch adds support for detecting iconv support using autotools
-uclibc does not have iconv implementation inside libc like glibc, therefore
-the existing checks were not sufficient, it worked for glibc but not for
-uclibc. The new patch portably detects the iconv support and adds the
-libiconv to linker cmdline
-
-This patch should be submitted upstream too
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: usbutils-008/configure.ac
-===================================================================
---- usbutils-008.orig/configure.ac
-+++ usbutils-008/configure.ac
-@@ -10,7 +10,9 @@ AC_USE_SYSTEM_EXTENSIONS
- AC_SYS_LARGEFILE
-
- AC_CHECK_HEADERS([byteswap.h])
--AC_CHECK_FUNCS([nl_langinfo iconv])
-+
-+AM_GNU_GETTEXT
-+AM_ICONV
-
- PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0.0)
-
-Index: usbutils-008/Makefile.am
-===================================================================
---- usbutils-008.orig/Makefile.am
-+++ usbutils-008/Makefile.am
-@@ -29,7 +29,8 @@ lsusb_CPPFLAGS = \
-
- lsusb_LDADD = \
- $(LIBUSB_LIBS) \
-- $(UDEV_LIBS)
-+ $(UDEV_LIBS) \
-+ $(LIBICONV)
-
- man_MANS = \
- lsusb.8 \
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils_008.bb b/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils_008.bb
deleted file mode 100644
index d3c5bd5..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils_008.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Host side USB console utilities"
-DESCRIPTION = "Contains the lsusb utility for inspecting the devices connected to the USB bus."
-HOMEPAGE = "http://www.linux-usb.org"
-SECTION = "base"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-DEPENDS = "libusb zlib virtual/libiconv udev"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \
- file://usb-devices-avoid-dependency-on-bash.patch \
- file://Fix-NULL-pointer-crash.patch \
- file://iconv.patch \
- "
-
-SRC_URI[md5sum] = "cb20148c2e784577e924a7b4c560c8fb"
-SRC_URI[sha256sum] = "6d5f16c2961df37e22e492c736a3e162a8fde24480f23a40d85f79af80d3fe95"
-
-inherit autotools gettext pkgconfig distro_features_check
-
-FILES_${PN}-dev += "${datadir}/pkgconfig"
-
-RRECOMMENDS_${PN} = "udev-hwdb"
-RDEPENDS_${PN}-ptest = "libboost-system libboost-thread"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils_009.bb b/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils_009.bb
new file mode 100644
index 0000000..3ffc0dd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils_009.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Host side USB console utilities"
+DESCRIPTION = "Contains the lsusb utility for inspecting the devices connected to the USB bus."
+HOMEPAGE = "http://www.linux-usb.org"
+SECTION = "base"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS = "libusb zlib virtual/libiconv udev"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \
+ file://usb-devices-avoid-dependency-on-bash.patch \
+ "
+
+SRC_URI[md5sum] = "b5dbc498b2eb5058f7a57fc6532d0aad"
+SRC_URI[sha256sum] = "e73543293a17c7803994eac97a49e58b377e08e6299ba11aad09794b91340e8b"
+
+inherit autotools pkgconfig distro_features_check update-alternatives
+
+ALTERNATIVE_${PN} = "lsusb"
+ALTERNATIVE_PRIORITY = "100"
+
+FILES_${PN}-dev += "${datadir}/pkgconfig"
+
+RRECOMMENDS_${PN} = "udev-hwdb"
+RDEPENDS_${PN}-ptest = "libboost-system libboost-thread"
+
+PACKAGE_BEFORE_PN =+ "${PN}-python"
+FILES_${PN}-python += "${bindir}/lsusb.py"
+RDEPENDS_${PN}-python = "python3-core"
+
+do_install_append() {
+ sed -i -E '1s,#!.+python,#!${bindir}/python3,' ${D}${bindir}/lsusb.py
+}
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb b/import-layers/yocto-poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb
index e5f6fff..f97b80d 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb
+++ b/import-layers/yocto-poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb
@@ -9,7 +9,7 @@
RRECOMMENDS_${PN} = "kernel-module-uvesafb"
PR = "r2"
-SRC_URI = "${DEBIAN_MIRROR}/main/v/${BPN}/${BPN}_${PV}.orig.tar.gz \
+SRC_URI = "http://snapshot.debian.org/archive/debian/20110427T035506Z/pool/main/v/${BPN}/${BPN}_${PV}.orig.tar.gz \
file://Update-x86emu-from-X.org.patch \
file://ar-from-env.patch \
file://aarch64-host.patch \
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb
deleted file mode 100644
index ac36461..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb
+++ /dev/null
@@ -1,64 +0,0 @@
-LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
- file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
- file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
- file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
-
-require avahi.inc
-
-inherit distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
-
-SRC_URI += "file://0001-configure.ac-install-GtkBuilder-interface-files-for-.patch"
-SRC_URI[md5sum] = "22b5e705d3eabb31d26f2e1e7b074013"
-SRC_URI[sha256sum] = "d54991185d514a0aba54ebeb408d7575b60f5818a772e28fa0e18b98bc1db454"
-
-DEPENDS += "avahi"
-
-AVAHI_GTK = "gtk3"
-
-S = "${WORKDIR}/avahi-${PV}"
-
-PACKAGES = "${PN} ${PN}-utils ${PN}-dbg ${PN}-dev ${PN}-staticdev ${PN}-doc avahi-discover"
-
-FILES_${PN} = "${libdir}/libavahi-ui*.so.*"
-FILES_${PN}-dev += "${libdir}/libavahi-ui${SOLIBSDEV}"
-FILES_${PN}-staticdev += "${libdir}/libavahi-ui.a"
-
-FILES_${PN}-utils = "${bindir}/b* ${datadir}/applications/b*"
-
-FILES_avahi-discover = "${datadir}/applications/avahi-discover.desktop \
- ${datadir}/avahi/interfaces/avahi-discover.ui \
- ${bindir}/avahi-discover-standalone \
- "
-
-do_install_append () {
- rm ${D}${sysconfdir} -rf
- rm ${D}${base_libdir} -rf
- rm ${D}${systemd_unitdir} -rf
- # The ${systemd_unitdir} is /lib/systemd, so we need rmdir /lib,
- # but not ${base_libdir} here. And the /lib may not exist
- # whithout systemd.
- [ ! -d ${D}/lib ] || rmdir ${D}/lib --ignore-fail-on-non-empty
- rm ${D}${bindir}/avahi-b*
- rm ${D}${bindir}/avahi-p*
- rm ${D}${bindir}/avahi-r*
- rm ${D}${bindir}/avahi-s*
- rm ${D}${includedir}/avahi-c* -rf
- rm ${D}${includedir}/avahi-g* -rf
- rm ${D}${libdir}/libavahi-c*
- rm ${D}${libdir}/libavahi-g*
- rm ${D}${libdir}/pkgconfig/avahi-c*
- rm ${D}${libdir}/pkgconfig/avahi-g*
- rm ${D}${sbindir} -rf
- rm ${D}${datadir}/avahi/a*
- rm ${D}${datadir}/avahi/s*
- rm ${D}${datadir}/locale/ -rf
- rm ${D}${datadir}/dbus* -rf
- rm ${D}${mandir}/man1/a*
- rm ${D}${mandir}/man5 -rf
- rm ${D}${mandir}/man8 -rf
- rm ${D}${libdir}/girepository-1.0/ -rf
- rm ${D}${datadir}/gir-1.0/ -rf
-}
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb
new file mode 100644
index 0000000..5648e38
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb
@@ -0,0 +1,62 @@
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
+ file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
+ file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
+ file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
+
+require avahi.inc
+
+inherit distro_features_check
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+SRC_URI[md5sum] = "d76c59d0882ac6c256d70a2a585362a6"
+SRC_URI[sha256sum] = "57a99b5dfe7fdae794e3d1ee7a62973a368e91e414bd0dfa5d84434de5b14804"
+
+DEPENDS += "avahi"
+
+AVAHI_GTK = "gtk3"
+
+S = "${WORKDIR}/avahi-${PV}"
+
+PACKAGES = "${PN} ${PN}-utils ${PN}-dbg ${PN}-dev ${PN}-staticdev ${PN}-doc avahi-discover"
+
+FILES_${PN} = "${libdir}/libavahi-ui*.so.*"
+FILES_${PN}-dev += "${libdir}/libavahi-ui${SOLIBSDEV}"
+FILES_${PN}-staticdev += "${libdir}/libavahi-ui.a"
+
+FILES_${PN}-utils = "${bindir}/b* ${datadir}/applications/b*"
+
+FILES_avahi-discover = "${datadir}/applications/avahi-discover.desktop \
+ ${datadir}/avahi/interfaces/avahi-discover.ui \
+ ${bindir}/avahi-discover-standalone \
+ "
+
+do_install_append () {
+ rm ${D}${sysconfdir} -rf
+ rm ${D}${base_libdir} -rf
+ rm ${D}${systemd_unitdir} -rf
+ # The ${systemd_unitdir} is /lib/systemd, so we need rmdir /lib,
+ # but not ${base_libdir} here. And the /lib may not exist
+ # whithout systemd.
+ [ ! -d ${D}/lib ] || rmdir ${D}/lib --ignore-fail-on-non-empty
+ rm ${D}${bindir}/avahi-b*
+ rm ${D}${bindir}/avahi-p*
+ rm ${D}${bindir}/avahi-r*
+ rm ${D}${bindir}/avahi-s*
+ rm ${D}${includedir}/avahi-c* -rf
+ rm ${D}${includedir}/avahi-g* -rf
+ rm ${D}${libdir}/libavahi-c*
+ rm ${D}${libdir}/libavahi-g*
+ rm ${D}${libdir}/pkgconfig/avahi-c*
+ rm ${D}${libdir}/pkgconfig/avahi-g*
+ rm ${D}${sbindir} -rf
+ rm ${D}${datadir}/avahi/a*
+ rm ${D}${datadir}/locale/ -rf
+ rm ${D}${datadir}/dbus* -rf
+ rm ${D}${mandir}/man1/a*
+ rm ${D}${mandir}/man5 -rf
+ rm ${D}${mandir}/man8 -rf
+ rm ${D}${libdir}/girepository-1.0/ -rf
+ rm ${D}${datadir}/gir-1.0/ -rf
+}
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi.inc b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi.inc
index 7814464..ec368de 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi.inc
@@ -23,21 +23,20 @@
"
UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/"
-# For gtk related PACKAGECONFIGs: gtk, gtk3 and pygtk
+# For gtk related PACKAGECONFIGs: gtk, gtk3
AVAHI_GTK ?= ""
PACKAGECONFIG ??= "dbus ${AVAHI_GTK}"
PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+"
PACKAGECONFIG[gtk3] = "--enable-gtk3,--disable-gtk3,gtk+3"
-PACKAGECONFIG[pygtk] = "--enable-pygtk,--disable-pygtk,"
USERADD_PACKAGES = "avahi-daemon avahi-autoipd"
-USERADD_PARAM_avahi-daemon = "--system --home /var/run/avahi-daemon \
+USERADD_PARAM_avahi-daemon = "--system --home /run/avahi-daemon \
--no-create-home --shell /bin/false \
--user-group avahi"
-USERADD_PARAM_avahi-autoipd = "--system --home /var/run/avahi-autoipd \
+USERADD_PARAM_avahi-autoipd = "--system --home /run/avahi-autoipd \
--no-create-home --shell /bin/false \
--user-group \
-c \"Avahi autoip daemon\" \
@@ -110,11 +109,6 @@
RRECOMMENDS_avahi-daemon_append_libc-glibc = " libnss-mdns"
RRECOMMENDS_${PN}_append_libc-glibc = " libnss-mdns"
-RRECOMMENDS_avahi-dev = "expat-dev libcap-dev libdaemon-dev dbus-dev glib-2.0-dev update-rc.d-dev"
-RRECOMMENDS_avahi-dev_append_libc-glibc = " gettext-dev"
-
-RRECOMMENDS_avahi-dev[nodeprrecs] = "1"
-
CONFFILES_avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf"
INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd"
@@ -125,12 +119,7 @@
do_install() {
autotools_do_install
-
- # don't install /var/run when populating rootfs. Do it through volatile
- # /var/run of current version is empty, so just remove it.
- # if /var/run become non-empty in the future, need to install it via volatile
- rm -rf ${D}${localstatedir}/run
- rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
+ rm -rf ${D}/run
rm -rf ${D}${datadir}/dbus-1/interfaces
test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
rm -rf ${D}${libdir}/avahi
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.6.32.bb b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.6.32.bb
deleted file mode 100644
index bfa6304..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.6.32.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-require avahi.inc
-
-inherit systemd
-
-SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-dnsconfd"
-SYSTEMD_SERVICE_${PN}-daemon = "avahi-daemon.service"
-SYSTEMD_SERVICE_${PN}-dnsconfd = "avahi-dnsconfd.service"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
- file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
- file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
- file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
-
-SRC_URI += "file://avahi-fix-resource-unavaiable.patch"
-
-SRC_URI[md5sum] = "22b5e705d3eabb31d26f2e1e7b074013"
-SRC_URI[sha256sum] = "d54991185d514a0aba54ebeb408d7575b60f5818a772e28fa0e18b98bc1db454"
-
-DEPENDS += "intltool-native"
-
-PACKAGES =+ "libavahi-gobject"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.7.bb b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.7.bb
new file mode 100644
index 0000000..7c91f10
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.7.bb
@@ -0,0 +1,20 @@
+require avahi.inc
+
+inherit systemd
+
+SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-dnsconfd"
+SYSTEMD_SERVICE_${PN}-daemon = "avahi-daemon.service"
+SYSTEMD_SERVICE_${PN}-dnsconfd = "avahi-dnsconfd.service"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
+ file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
+ file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
+ file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
+
+SRC_URI[md5sum] = "d76c59d0882ac6c256d70a2a585362a6"
+SRC_URI[sha256sum] = "57a99b5dfe7fdae794e3d1ee7a62973a368e91e414bd0dfa5d84434de5b14804"
+
+DEPENDS += "intltool-native"
+
+PACKAGES =+ "libavahi-gobject"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/0001-configure.ac-install-GtkBuilder-interface-files-for-.patch b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/0001-configure.ac-install-GtkBuilder-interface-files-for-.patch
deleted file mode 100644
index 942607a..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/0001-configure.ac-install-GtkBuilder-interface-files-for-.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 6ff255eff4fea6350b5e0462fee176fadc26fc1c Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Sun, 12 Jun 2016 18:32:49 +0300
-Subject: [PATCH] configure.ac: install GtkBuilder interface files for GTK+3
- too
-
-Upstream-Status: Submitted [https://github.com/lathiat/avahi/pull/130]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 87a9a17..9860dcc 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -965,7 +965,7 @@ AC_SUBST(avahi_socket)
- #
- # Avahi interfaces dir
- #
--if test "x$HAVE_PYTHON_DBUS" = "xyes" -o "x$HAVE_GTK" = "xyes"; then
-+if test "x$HAVE_PYTHON_DBUS" = "xyes" -o "x$HAVE_GTK" = "xyes" -o "x$HAVE_GTK3" = "xyes"; then
- interfacesdir="${datadir}/${PACKAGE}/interfaces/"
- AC_SUBST(interfacesdir)
- fi
---
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/avahi-fix-resource-unavaiable.patch b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/avahi-fix-resource-unavaiable.patch
deleted file mode 100644
index 5a2fd75..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/avahi-fix-resource-unavaiable.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Upstream-Status: Backport
-
-Backport from:
-https://github.com/experimental-platform/platform-hostname-avahi/pull/9
-
-It sometimes fails to run avahi with error: "Could not receive return value
-from daemon process". It has same root cause with
-https://github.com/lxc/lxc/issues/25.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From 5150983102ad5ad43f0dae203cb332c168eb5a71 Mon Sep 17 00:00:00 2001
-From: Hinnerk Haardt <haardt@information-control.de>
-Date: Thu, 17 Dec 2015 11:52:19 +0100
-Subject: [PATCH] Fix `chroot.c: fork() failed: Resource temporarily
- unavailable` as per https://github.com/lxc/lxc/issues/25.
-
----
- avahi-daemon/avahi-daemon.conf | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/avahi-daemon/avahi-daemon.conf b/avahi-daemon/avahi-daemon.conf
-index 95166f8..3d5b7a6 100644
---- a/avahi-daemon/avahi-daemon.conf
-+++ b/avahi-daemon/avahi-daemon.conf
-@@ -65,4 +65,3 @@ rlimit-data=4194304
- rlimit-fsize=0
- rlimit-nofile=768
- rlimit-stack=4194304
--rlimit-nproc=3
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/initscript.patch b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/initscript.patch
index 193889e..c856c3d 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/initscript.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/initscript.patch
@@ -1,10 +1,10 @@
Upstream-Status: Pending
-diff --git a/initscript/debian/avahi-daemon.in b/initscript/debian/avahi-daemon.in
-index 30a2c2f..b5848a8 100755
---- a/initscript/debian/avahi-daemon.in
-+++ b/initscript/debian/avahi-daemon.in
-@@ -1,2 +1,14 @@
+Index: avahi-0.7/initscript/debian/avahi-daemon.in
+===================================================================
+--- avahi-0.7.orig/initscript/debian/avahi-daemon.in
++++ avahi-0.7/initscript/debian/avahi-daemon.in
+@@ -1,5 +1,17 @@
#!/bin/sh
-
+### BEGIN INIT INFO
@@ -20,11 +20,14 @@
+# automatically
+### END INIT INFO
+#
-diff --git a/initscript/debian/avahi-dnsconfd.in b/initscript/debian/avahi-dnsconfd.in
-index ac34804..f95c340 100755
---- a/initscript/debian/avahi-dnsconfd.in
-+++ b/initscript/debian/avahi-dnsconfd.in
-@@ -1,1 +1,14 @@
+ # This file is part of avahi.
+ #
+ # avahi is free software; you can redistribute it and/or modify it
+Index: avahi-0.7/initscript/debian/avahi-dnsconfd.in
+===================================================================
+--- avahi-0.7.orig/initscript/debian/avahi-dnsconfd.in
++++ avahi-0.7/initscript/debian/avahi-dnsconfd.in
+@@ -1,4 +1,17 @@
#!/bin/sh
+### BEGIN INIT INFO
+# Provides: avahi-dnsconfd
@@ -39,3 +42,6 @@
+# automatically
+### END INIT INFO
+#
+
+ # This file is part of avahi.
+ #
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.5-P3.bb b/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.5-P3.bb
deleted file mode 100644
index 13724a8..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.5-P3.bb
+++ /dev/null
@@ -1,119 +0,0 @@
-SUMMARY = "ISC Internet Domain Name Server"
-HOMEPAGE = "http://www.isc.org/sw/bind/"
-SECTION = "console/network"
-
-LICENSE = "ISC & BSD"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=dba46507446198119bcde32a4feaab43"
-
-DEPENDS = "openssl libcap"
-
-SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
- file://conf.patch \
- file://make-etc-initd-bind-stop-work.patch \
- file://dont-test-on-host.patch \
- file://generate-rndc-key.sh \
- file://named.service \
- file://bind9 \
- file://init.d-add-support-for-read-only-rootfs.patch \
- file://bind-confgen-build-unix.o-once.patch \
- file://0001-build-use-pkg-config-to-find-libxml2.patch \
- file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
- file://0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \
- file://0001-lib-dns-gen.c-fix-too-long-error.patch \
- file://use-python3-and-fix-install-lib-path.patch \
- "
-
-UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/"
-UPSTREAM_CHECK_REGEX = "(?P<pver>9(\.\d+)+(-P\d+)*)/"
-
-SRC_URI[md5sum] = "d79cafbd9ac76239ee532dd89d05cc83"
-SRC_URI[sha256sum] = "8d7e96b5b0bbac7b900d4c4bbb82e0956b4e509433c5fa392bb72a929b96606a"
-
-ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}"
-EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool --enable-threads \
- --disable-devpoll --enable-epoll --with-gost=no \
- --with-gssapi=no --with-ecdsa=yes \
- --sysconfdir=${sysconfdir}/bind \
- --with-openssl=${STAGING_LIBDIR}/.. \
- "
-
-inherit autotools update-rc.d systemd useradd pkgconfig python3-dir
-
-export PYTHON_SITEPACKAGES_DIR
-
-# PACKAGECONFIGs readline and libedit should NOT be set at same time
-PACKAGECONFIG ?= "readline"
-PACKAGECONFIG[httpstats] = "--with-libxml2,--without-libxml2,libxml2"
-PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline"
-PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit"
-PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,,"
-
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \
- --user-group bind"
-
-INITSCRIPT_NAME = "bind"
-INITSCRIPT_PARAMS = "defaults"
-
-SYSTEMD_SERVICE_${PN} = "named.service"
-
-PARALLEL_MAKE = ""
-
-RDEPENDS_${PN} = "python3-core"
-RDEPENDS_${PN}-dev = ""
-
-PACKAGE_BEFORE_PN += "${PN}-utils"
-FILES_${PN}-utils = "${bindir}/host ${bindir}/dig"
-FILES_${PN}-dev += "${bindir}/isc-config.h"
-FILES_${PN} += "${sbindir}/generate-rndc-key.sh ${PYTHON_SITEPACKAGES_DIR}"
-
-do_install_prepend() {
- # clean host path in isc-config.sh before the hardlink created
- # by "make install":
- # bind9-config -> isc-config.sh
- sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${B}/isc-config.sh
-}
-
-do_install_append() {
- rm "${D}${bindir}/nslookup"
- rm "${D}${mandir}/man1/nslookup.1"
- rmdir "${D}${localstatedir}/run"
- rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
- install -d -o bind "${D}${localstatedir}/cache/bind"
- install -d "${D}${sysconfdir}/bind"
- install -d "${D}${sysconfdir}/init.d"
- install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
- install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
- sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
-
- # Install systemd related files
- install -d ${D}${sbindir}
- install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
- -e 's,@SBINDIR@,${sbindir},g' \
- ${D}${systemd_unitdir}/system/named.service
-
- install -d ${D}${sysconfdir}/default
- install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
-
- if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
- install -d ${D}${sysconfdir}/tmpfiles.d
- echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf
- fi
-
- rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/isc/*.pyc
-}
-
-CONFFILES_${PN} = " \
- ${sysconfdir}/bind/named.conf \
- ${sysconfdir}/bind/named.conf.local \
- ${sysconfdir}/bind/named.conf.options \
- ${sysconfdir}/bind/db.0 \
- ${sysconfdir}/bind/db.127 \
- ${sysconfdir}/bind/db.empty \
- ${sysconfdir}/bind/db.local \
- ${sysconfdir}/bind/db.root \
- "
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.6.bb b/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.6.bb
new file mode 100644
index 0000000..8b8835b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.6.bb
@@ -0,0 +1,123 @@
+SUMMARY = "ISC Internet Domain Name Server"
+HOMEPAGE = "http://www.isc.org/sw/bind/"
+SECTION = "console/network"
+
+LICENSE = "ISC & BSD"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=dba46507446198119bcde32a4feaab43"
+
+DEPENDS = "openssl libcap"
+
+SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
+ file://conf.patch \
+ file://make-etc-initd-bind-stop-work.patch \
+ file://dont-test-on-host.patch \
+ file://generate-rndc-key.sh \
+ file://named.service \
+ file://bind9 \
+ file://init.d-add-support-for-read-only-rootfs.patch \
+ file://bind-confgen-build-unix.o-once.patch \
+ file://0001-build-use-pkg-config-to-find-libxml2.patch \
+ file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
+ file://0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \
+ file://0001-lib-dns-gen.c-fix-too-long-error.patch \
+ file://use-python3-and-fix-install-lib-path.patch \
+ "
+
+SRC_URI[md5sum] = "84e663284b17aee0df1ce6f248b137d7"
+SRC_URI[sha256sum] = "17bbcd2bd7b1d32f5ba4b30d5dbe8a39bce200079048073d1e0d050fdf47e69d"
+
+UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/"
+UPSTREAM_CHECK_REGEX = "(?P<pver>9(\.\d+)+(-P\d+)*)/"
+
+
+ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}"
+EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool --enable-threads \
+ --disable-devpoll --enable-epoll --with-gost=no \
+ --with-gssapi=no --with-ecdsa=yes \
+ --sysconfdir=${sysconfdir}/bind \
+ --with-openssl=${STAGING_LIBDIR}/.. \
+ "
+
+inherit autotools update-rc.d systemd useradd pkgconfig python3-dir
+
+export PYTHON_SITEPACKAGES_DIR
+
+# PACKAGECONFIGs readline and libedit should NOT be set at same time
+PACKAGECONFIG ?= "readline"
+PACKAGECONFIG[httpstats] = "--with-libxml2,--without-libxml2,libxml2"
+PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline"
+PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit"
+PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,,"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \
+ --user-group bind"
+
+INITSCRIPT_NAME = "bind"
+INITSCRIPT_PARAMS = "defaults"
+
+SYSTEMD_SERVICE_${PN} = "named.service"
+
+PARALLEL_MAKE = ""
+
+RDEPENDS_${PN} = "python3-core"
+RDEPENDS_${PN}-dev = ""
+
+PACKAGE_BEFORE_PN += "${PN}-utils"
+FILES_${PN}-utils = "${bindir}/host ${bindir}/dig"
+FILES_${PN}-dev += "${bindir}/isc-config.h"
+FILES_${PN} += "${sbindir}/generate-rndc-key.sh ${PYTHON_SITEPACKAGES_DIR}"
+
+PACKAGE_BEFORE_PN += "${PN}-libs"
+FILES_${PN}-libs = "${libdir}/*.so*"
+
+do_install_prepend() {
+ # clean host path in isc-config.sh before the hardlink created
+ # by "make install":
+ # bind9-config -> isc-config.sh
+ sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${B}/isc-config.sh
+}
+
+do_install_append() {
+ rm "${D}${bindir}/nslookup"
+ rm "${D}${mandir}/man1/nslookup.1"
+ rmdir "${D}${localstatedir}/run"
+ rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
+ install -d -o bind "${D}${localstatedir}/cache/bind"
+ install -d "${D}${sysconfdir}/bind"
+ install -d "${D}${sysconfdir}/init.d"
+ install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
+ install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
+ sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
+
+ # Install systemd related files
+ install -d ${D}${sbindir}
+ install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ ${D}${systemd_unitdir}/system/named.service
+
+ install -d ${D}${sysconfdir}/default
+ install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf
+ fi
+
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/isc/*.pyc
+}
+
+CONFFILES_${PN} = " \
+ ${sysconfdir}/bind/named.conf \
+ ${sysconfdir}/bind/named.conf.local \
+ ${sysconfdir}/bind/named.conf.options \
+ ${sysconfdir}/bind/db.0 \
+ ${sysconfdir}/bind/db.127 \
+ ${sysconfdir}/bind/db.empty \
+ ${sysconfdir}/bind/db.local \
+ ${sysconfdir}/bind/db.root \
+ "
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5.inc b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5.inc
index 1807aa7..ae2a833 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -6,7 +6,7 @@
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e"
-DEPENDS = "udev dbus-glib glib-2.0 libcheck"
+DEPENDS = "udev dbus-glib glib-2.0"
PROVIDES += "bluez-hcidump"
RPROVIDES_${PN} += "bluez-hcidump"
@@ -41,6 +41,7 @@
PACKAGECONFIG[tools] = "--enable-tools,--disable-tools"
PACKAGECONFIG[threads] = "--enable-threads,--disable-threads"
PACKAGECONFIG[deprecated] = "--enable-deprecated,--disable-deprecated"
+PACKAGECONFIG[mesh] = "--enable-mesh,--disable-mesh, json-c"
SRC_URI = "\
${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
@@ -49,14 +50,12 @@
file://run-ptest \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
- file://0001-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch \
- file://cve-2017-1000250.patch \
"
S = "${WORKDIR}/bluez-${PV}"
CVE_PRODUCT = "bluez"
-inherit autotools pkgconfig systemd update-rc.d distro_features_check ptest
+inherit autotools pkgconfig systemd update-rc.d distro_features_check ptest gobject-introspection-data
EXTRA_OECONF = "\
--enable-test \
@@ -130,14 +129,13 @@
FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS'))}"
-RDEPENDS_${PN}-testtools += "python3 python3-dbus python3-pygobject"
+RDEPENDS_${PN}-testtools += "python3 python3-dbus"
+RDEPENDS_${PN}-testtools += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-pygobject', '', d)}"
SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'bluetooth.service', '', d)}"
INITSCRIPT_PACKAGES = "${PN}"
INITSCRIPT_NAME_${PN} = "bluetooth"
-EXCLUDE_FROM_WORLD = "1"
-
do_compile_ptest() {
oe_runmake buildtests
}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/0001-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/0001-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch
deleted file mode 100644
index 4679438..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/0001-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 3b341fb421ef61db7782bf1314ec693828467de9 Mon Sep 17 00:00:00 2001
-From: Andy Duan <fugang.duan@nxp.com>
-Date: Wed, 23 Nov 2016 17:12:12 +0800
-Subject: [PATCH] hciattach: bcm43xx: fix the delay timer for firmware download
-
-From the log in .bcm43xx_load_firmware():
- /* Wait 50ms to let the firmware placed in download mode */
- nanosleep(&tm_mode, NULL);
-
-But timespec tm_mode is real is 50us. Correct the delayed timer count.
-
-Upstream-Status: Accepted [https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=76255f732d68aef2b90d36d9c7be51a9e1739ce7]
-
-Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
----
- tools/hciattach_bcm43xx.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
-index 81f38cb..ac1b3c1 100644
---- a/tools/hciattach_bcm43xx.c
-+++ b/tools/hciattach_bcm43xx.c
-@@ -228,8 +228,8 @@ static int bcm43xx_set_speed(int fd, struct termios *ti, uint32_t speed)
- static int bcm43xx_load_firmware(int fd, const char *fw)
- {
- unsigned char cmd[] = { HCI_COMMAND_PKT, 0x2e, 0xfc, 0x00 };
-- struct timespec tm_mode = { 0, 50000 };
-- struct timespec tm_ready = { 0, 2000000 };
-+ struct timespec tm_mode = { 0, 50000000 };
-+ struct timespec tm_ready = { 0, 200000000 };
- unsigned char resp[CC_MIN_SIZE];
- unsigned char tx_buf[1024];
- int len, fd_fw, n;
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/cve-2017-1000250.patch b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/cve-2017-1000250.patch
deleted file mode 100644
index 9fac961..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/cve-2017-1000250.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-All versions of the SDP server in BlueZ 5.46 and earlier are vulnerable to an
-information disclosure vulnerability which allows remote attackers to obtain
-sensitive information from the bluetoothd process memory. This vulnerability
-lies in the processing of SDP search attribute requests.
-
-CVE: CVE-2017-1000250
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 9e009647b14e810e06626dde7f1bb9ea3c375d09 Mon Sep 17 00:00:00 2001
-From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
-Date: Wed, 13 Sep 2017 10:01:40 +0300
-Subject: sdp: Fix Out-of-bounds heap read in service_search_attr_req function
-
-Check if there is enough data to continue otherwise return an error.
----
- src/sdpd-request.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/sdpd-request.c b/src/sdpd-request.c
-index 1eefdce..318d044 100644
---- a/src/sdpd-request.c
-+++ b/src/sdpd-request.c
-@@ -917,7 +917,7 @@ static int service_search_attr_req(sdp_req_t *req, sdp_buf_t *buf)
- } else {
- /* continuation State exists -> get from cache */
- sdp_buf_t *pCache = sdp_get_cached_rsp(cstate);
-- if (pCache) {
-+ if (pCache && cstate->cStateValue.maxBytesSent < pCache->data_size) {
- uint16_t sent = MIN(max, pCache->data_size - cstate->cStateValue.maxBytesSent);
- pResponse = pCache->data;
- memcpy(buf->data, pResponse + cstate->cStateValue.maxBytesSent, sent);
---
-cgit v1.1
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.46.bb b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.46.bb
deleted file mode 100644
index e1f8587..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.46.bb
+++ /dev/null
@@ -1,69 +0,0 @@
-require bluez5.inc
-
-REQUIRED_DISTRO_FEATURES = "bluez5"
-
-SRC_URI[md5sum] = "913f35d6fa4ca5772c53adb936bf1947"
-SRC_URI[sha256sum] = "ddab3d3837c1afb8ae228a94ba17709a4650bd4db24211b6771ab735c8908e28"
-
-# noinst programs in Makefile.tools that are conditional on READLINE
-# support
-NOINST_TOOLS_READLINE ?= " \
- ${@bb.utils.contains('PACKAGECONFIG', 'deprecated', 'attrib/gatttool', '', d)} \
- tools/obex-client-tool \
- tools/obex-server-tool \
- tools/bluetooth-player \
- tools/obexctl \
- tools/btmgmt \
-"
-
-# noinst programs in Makefile.tools that are conditional on TESTING
-# support
-NOINST_TOOLS_TESTING ?= " \
- emulator/btvirt \
- emulator/b1ee \
- emulator/hfp \
- peripheral/btsensor \
- tools/3dsp \
- tools/mgmt-tester \
- tools/gap-tester \
- tools/l2cap-tester \
- tools/sco-tester \
- tools/smp-tester \
- tools/hci-tester \
- tools/rfcomm-tester \
- tools/bnep-tester \
- tools/userchan-tester \
-"
-
-# noinst programs in Makefile.tools that are conditional on TOOLS
-# support
-NOINST_TOOLS_BT ?= " \
- tools/bdaddr \
- tools/avinfo \
- tools/avtest \
- tools/scotest \
- tools/amptest \
- tools/hwdb \
- tools/hcieventmask \
- tools/hcisecfilter \
- tools/btinfo \
- tools/btsnoop \
- tools/btproxy \
- tools/btiotest \
- tools/bneptest \
- tools/mcaptest \
- tools/cltest \
- tools/oobtest \
- tools/advtest \
- tools/seq2bseq \
- tools/nokfw \
- tools/create-image \
- tools/eddystone \
- tools/ibeacon \
- tools/btgatt-client \
- tools/btgatt-server \
- tools/test-runner \
- tools/check-selftest \
- tools/gatt-service \
- profiles/iap/iapd \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.48.bb b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.48.bb
new file mode 100644
index 0000000..84a6cd2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.48.bb
@@ -0,0 +1,69 @@
+require bluez5.inc
+
+REQUIRED_DISTRO_FEATURES = "bluez5"
+
+SRC_URI[md5sum] = "c9c853f3c90564cabec75ab35106c355"
+SRC_URI[sha256sum] = "b9a8723072ef66bae7ec301c774902ebcb444c9c5b149b5a199e60a1ba970e90"
+
+# noinst programs in Makefile.tools that are conditional on READLINE
+# support
+NOINST_TOOLS_READLINE ?= " \
+ ${@bb.utils.contains('PACKAGECONFIG', 'deprecated', 'attrib/gatttool', '', d)} \
+ tools/obex-client-tool \
+ tools/obex-server-tool \
+ tools/bluetooth-player \
+ tools/obexctl \
+ tools/btmgmt \
+"
+
+# noinst programs in Makefile.tools that are conditional on TESTING
+# support
+NOINST_TOOLS_TESTING ?= " \
+ emulator/btvirt \
+ emulator/b1ee \
+ emulator/hfp \
+ peripheral/btsensor \
+ tools/3dsp \
+ tools/mgmt-tester \
+ tools/gap-tester \
+ tools/l2cap-tester \
+ tools/sco-tester \
+ tools/smp-tester \
+ tools/hci-tester \
+ tools/rfcomm-tester \
+ tools/bnep-tester \
+ tools/userchan-tester \
+"
+
+# noinst programs in Makefile.tools that are conditional on TOOLS
+# support
+NOINST_TOOLS_BT ?= " \
+ tools/bdaddr \
+ tools/avinfo \
+ tools/avtest \
+ tools/scotest \
+ tools/amptest \
+ tools/hwdb \
+ tools/hcieventmask \
+ tools/hcisecfilter \
+ tools/btinfo \
+ tools/btsnoop \
+ tools/btproxy \
+ tools/btiotest \
+ tools/bneptest \
+ tools/mcaptest \
+ tools/cltest \
+ tools/oobtest \
+ tools/advtest \
+ tools/seq2bseq \
+ tools/nokfw \
+ tools/create-image \
+ tools/eddystone \
+ tools/ibeacon \
+ tools/btgatt-client \
+ tools/btgatt-server \
+ tools/test-runner \
+ tools/check-selftest \
+ tools/gatt-service \
+ profiles/iap/iapd \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch
deleted file mode 100644
index cfafbd1..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 4058ce3186a99fd5f03350fc11a7fc8d38b6a381 Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Mon, 8 May 2017 10:53:18 +0300
-Subject: [PATCH] firewall-nftables: fix build with libnftnl-1.0.7
-
-We need these updates to accommodate the changes caused by the following
-commit in libnftnl-1.0.7
-
-commit 907a9f8e5a93f5bcd449643eb3916a656d634758
-Author: Pablo Neira Ayuso <pablo@netfilter.org>
-Date: Tue Dec 20 13:47:11 2016 +0100
-
-src: get rid of aliases and compat
-
-This machinery was introduced to avoid sudden compilation breakage of
-old nftables releases. With the upcoming release of 0.7 (and 0.6 which
-is now 6 months old) this is not required anymore.
-
-Moreover, users gain nothing from older releases since they are
-half-boiled and buggy.
-
-So let's get rid of aliases now. Bump LIBVERSION and update map file.
-
-Upstream-Status: Submitted
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- src/firewall-nftables.c | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/src/firewall-nftables.c b/src/firewall-nftables.c
-index 583d1c4..83b137b 100644
---- a/src/firewall-nftables.c
-+++ b/src/firewall-nftables.c
-@@ -387,9 +387,9 @@ static int add_cmp(struct nftnl_rule *rule, uint32_t sreg, uint32_t op,
- if (!expr)
- return -ENOMEM;
-
-- nftnl_expr_set_u32(expr, NFT_EXPR_CMP_SREG, sreg);
-- nftnl_expr_set_u32(expr, NFT_EXPR_CMP_OP, op);
-- nftnl_expr_set(expr, NFT_EXPR_CMP_DATA, data, data_len);
-+ nftnl_expr_set_u32(expr, NFTNL_EXPR_CMP_SREG, sreg);
-+ nftnl_expr_set_u32(expr, NFTNL_EXPR_CMP_OP, op);
-+ nftnl_expr_set(expr, NFTNL_EXPR_CMP_DATA, data, data_len);
-
- nftnl_rule_add_expr(rule, expr);
-
-@@ -575,8 +575,8 @@ static int build_rule_nat(const char *address, unsigned char prefixlen,
- expr = nftnl_expr_alloc("meta");
- if (!expr)
- goto err;
-- nftnl_expr_set_u32(expr, NFT_EXPR_META_KEY, NFT_META_OIFNAME);
-- nftnl_expr_set_u32(expr, NFT_EXPR_META_DREG, NFT_REG_1);
-+ nftnl_expr_set_u32(expr, NFTNL_EXPR_META_KEY, NFT_META_OIFNAME);
-+ nftnl_expr_set_u32(expr, NFTNL_EXPR_META_DREG, NFT_REG_1);
- nftnl_rule_add_expr(rule, expr);
- err = add_cmp(rule, NFT_REG_1, NFT_CMP_EQ, interface,
- strlen(interface) + 1);
-@@ -677,8 +677,8 @@ static int build_rule_snat(int index, const char *address,
- expr = nftnl_expr_alloc("meta");
- if (!expr)
- goto err;
-- nftnl_expr_set_u32(expr, NFT_EXPR_META_KEY, NFT_META_OIF);
-- nftnl_expr_set_u32(expr, NFT_EXPR_META_DREG, NFT_REG_1);
-+ nftnl_expr_set_u32(expr, NFTNL_EXPR_META_KEY, NFT_META_OIF);
-+ nftnl_expr_set_u32(expr, NFTNL_EXPR_META_DREG, NFT_REG_1);
- nftnl_rule_add_expr(rule, expr);
- err = add_cmp(rule, NFT_REG_1, NFT_CMP_EQ, &index, sizeof(index));
- if (err < 0)
---
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-giognutls-Fix-a-crash-using-wispr-over-TLS.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-giognutls-Fix-a-crash-using-wispr-over-TLS.patch
new file mode 100644
index 0000000..f9080d4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-giognutls-Fix-a-crash-using-wispr-over-TLS.patch
@@ -0,0 +1,41 @@
+From 929fc9b7068100444e0ffcccd25841f78791e619 Mon Sep 17 00:00:00 2001
+From: Jian Liang <jianliang@tycoint.com>
+Date: Fri, 15 Sep 2017 06:40:08 -0400
+Subject: [PATCH] gweb: Fix a crash using wispr over TLS
+To: connman@lists.01.org
+Cc: wagi@monom.org
+
+When gnutls_channel is instantiated, the gnutls_channel->established
+has to be initiated as FALSE. Otherwise, check_handshake function
+won't work. A random initial value 1 of gnutls_channel->established
+will make check_handshake return G_IO_STATUS_NORMAL, when the channel
+is actually not ready to be used. The observed behaviours are,
+
+- wispr is getting random errors in wispr_portal_web_result
+- ConnMan crashes on exit after those random errors
+- when wispr is luckly working, ConnMan doesn't crash on exit
+
+Signed-off-by: Jian Liang <jianliang@tycoint.com>
+
+---
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=73e53f3bd9e7debae86341f1eee7b97862a56a5e]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+ gweb/giognutls.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gweb/giognutls.c b/gweb/giognutls.c
+index 09dc9e7..c029a8b 100644
+--- a/gweb/giognutls.c
++++ b/gweb/giognutls.c
+@@ -421,7 +421,7 @@ GIOChannel *g_io_channel_gnutls_new(int fd)
+
+ DBG("");
+
+- gnutls_channel = g_new(GIOGnuTLSChannel, 1);
++ gnutls_channel = g_new0(GIOGnuTLSChannel, 1);
+
+ channel = (GIOChannel *) gnutls_channel;
+
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-inet-Add-prefixlen-to-iproute_default_function.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-inet-Add-prefixlen-to-iproute_default_function.patch
new file mode 100644
index 0000000..dd7b356
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-inet-Add-prefixlen-to-iproute_default_function.patch
@@ -0,0 +1,63 @@
+From 508dc60a1f0758ebc586b6b086478a176d493086 Mon Sep 17 00:00:00 2001
+From: Jian Liang <jianliang@tycoint.com>
+Date: Thu, 5 Oct 2017 09:34:41 +0100
+Subject: [PATCH 1/4] inet: Add prefixlen to iproute_default_function
+To: connman@lists.01.org
+Cc: wagi@monom.org
+
+Add prefixlen parameter to this function in preparation for using
+it also in creating subnet route later, e.g.
+
+default via 192.168.100.1 dev eth0
+192.168.100.0/24 dev eth0
+
+Signed-off-by: Jian Liang <jianliang@tycoint.com>
+
+---
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=edda5b695de2ee79f02314abc9b46fdd46b388e1]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+ src/inet.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/inet.c b/src/inet.c
+index b887aa0..ab8aec8 100644
+--- a/src/inet.c
++++ b/src/inet.c
+@@ -2796,7 +2796,7 @@ int __connman_inet_del_fwmark_rule(uint32_t table_id, int family, uint32_t fwmar
+ }
+
+ static int iproute_default_modify(int cmd, uint32_t table_id, int ifindex,
+- const char *gateway)
++ const char *gateway, unsigned char prefixlen)
+ {
+ struct __connman_inet_rtnl_handle rth;
+ unsigned char buf[sizeof(struct in6_addr)];
+@@ -2829,6 +2829,7 @@ static int iproute_default_modify(int cmd, uint32_t table_id, int ifindex,
+ rth.req.u.r.rt.rtm_protocol = RTPROT_BOOT;
+ rth.req.u.r.rt.rtm_scope = RT_SCOPE_UNIVERSE;
+ rth.req.u.r.rt.rtm_type = RTN_UNICAST;
++ rth.req.u.r.rt.rtm_dst_len = prefixlen;
+
+ __connman_inet_rtnl_addattr_l(&rth.req.n, sizeof(rth.req), RTA_GATEWAY,
+ buf, len);
+@@ -2860,7 +2861,7 @@ int __connman_inet_add_default_to_table(uint32_t table_id, int ifindex,
+ {
+ /* ip route add default via 1.2.3.4 dev wlan0 table 1234 */
+
+- return iproute_default_modify(RTM_NEWROUTE, table_id, ifindex, gateway);
++ return iproute_default_modify(RTM_NEWROUTE, table_id, ifindex, gateway, 0);
+ }
+
+ int __connman_inet_del_default_from_table(uint32_t table_id, int ifindex,
+@@ -2868,7 +2869,7 @@ int __connman_inet_del_default_from_table(uint32_t table_id, int ifindex,
+ {
+ /* ip route del default via 1.2.3.4 dev wlan0 table 1234 */
+
+- return iproute_default_modify(RTM_DELROUTE, table_id, ifindex, gateway);
++ return iproute_default_modify(RTM_DELROUTE, table_id, ifindex, gateway, 0);
+ }
+
+ int __connman_inet_get_interface_ll_address(int index, int family,
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-session-Keep-track-of-addr-in-fw_snat-session.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-session-Keep-track-of-addr-in-fw_snat-session.patch
new file mode 100644
index 0000000..f1b4d0a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-session-Keep-track-of-addr-in-fw_snat-session.patch
@@ -0,0 +1,112 @@
+From b5fd5945886fa1845db5c969424b63d894fe0376 Mon Sep 17 00:00:00 2001
+From: Jian Liang <jianliang@tycoint.com>
+Date: Fri, 25 Aug 2017 10:02:16 -0400
+Subject: [PATCH 1/2] session: Keep track of addr in fw_snat & session
+To: connman@lists.01.org
+Cc: wagi@monom.org
+
+When there is more than one session in fw_snat's list of sessions,
+fw_snat failed to be re-created when update-session-state is triggered
+with new IP address. This is because index alone is not sufficient to
+decide if fw_snat needs to be re-created. The solution here is to keep
+a track of IP addr and use it to avoid false lookup of fw_snat.
+
+Signed-off-by: Jian Liang <jianliang@tycoint.com>
+
+---
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=f9e27d4abfcab5c80a38e0850b5ddb26277f97c1]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+ src/session.c | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/session.c b/src/session.c
+index 9e3c559..965ac06 100644
+--- a/src/session.c
++++ b/src/session.c
+@@ -65,6 +65,7 @@ struct connman_session {
+ struct firewall_context *fw;
+ uint32_t mark;
+ int index;
++ char *addr;
+ char *gateway;
+ bool policy_routing;
+ bool snat_enabled;
+@@ -79,6 +80,7 @@ struct fw_snat {
+ GSList *sessions;
+ int id;
+ int index;
++ char *addr;
+ struct firewall_context *fw;
+ };
+
+@@ -200,7 +202,7 @@ static char *service2bearer(enum connman_service_type type)
+ return "";
+ }
+
+-static struct fw_snat *fw_snat_lookup(int index)
++static struct fw_snat *fw_snat_lookup(int index, const char *addr)
+ {
+ struct fw_snat *fw_snat;
+ GSList *list;
+@@ -208,8 +210,11 @@ static struct fw_snat *fw_snat_lookup(int index)
+ for (list = fw_snat_list; list; list = list->next) {
+ fw_snat = list->data;
+
+- if (fw_snat->index == index)
++ if (fw_snat->index == index) {
++ if (g_strcmp0(addr, fw_snat->addr) != 0)
++ continue;
+ return fw_snat;
++ }
+ }
+ return NULL;
+ }
+@@ -224,6 +229,7 @@ static int fw_snat_create(struct connman_session *session,
+
+ fw_snat->fw = __connman_firewall_create();
+ fw_snat->index = index;
++ fw_snat->addr = g_strdup(addr);
+
+ fw_snat->id = __connman_firewall_enable_snat(fw_snat->fw,
+ index, ifname, addr);
+@@ -238,6 +244,7 @@ static int fw_snat_create(struct connman_session *session,
+ return 0;
+ err:
+ __connman_firewall_destroy(fw_snat->fw);
++ g_free(fw_snat->addr);
+ g_free(fw_snat);
+ return err;
+ }
+@@ -393,7 +400,7 @@ static void del_nat_rules(struct connman_session *session)
+ return;
+
+ session->snat_enabled = false;
+- fw_snat = fw_snat_lookup(session->index);
++ fw_snat = fw_snat_lookup(session->index, session->addr);
+
+ if (!fw_snat)
+ return;
+@@ -420,8 +427,11 @@ static void add_nat_rules(struct connman_session *session)
+ if (!addr)
+ return;
+
++ g_free(session->addr);
++ session->addr = g_strdup(addr);
++
+ session->snat_enabled = true;
+- fw_snat = fw_snat_lookup(index);
++ fw_snat = fw_snat_lookup(index, session->addr);
+ if (fw_snat) {
+ fw_snat_ref(session, fw_snat);
+ return;
+@@ -502,6 +512,7 @@ static void free_session(struct connman_session *session)
+ g_free(session->info);
+ g_free(session->info_last);
+ g_free(session->gateway);
++ g_free(session->addr);
+
+ g_free(session);
+ }
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0002-inet-Implement-subnet-route-creation-deletion-in-ipr.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0002-inet-Implement-subnet-route-creation-deletion-in-ipr.patch
new file mode 100644
index 0000000..9c953e5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0002-inet-Implement-subnet-route-creation-deletion-in-ipr.patch
@@ -0,0 +1,69 @@
+From 08cda4004491d3971a8b9df937426c43800d15b1 Mon Sep 17 00:00:00 2001
+From: Jian Liang <jianliang@tycoint.com>
+Date: Thu, 5 Oct 2017 09:37:06 +0100
+Subject: [PATCH 2/4] inet: Implement subnet route creation/deletion in
+ iproute_default_modify
+To: connman@lists.01.org
+Cc: wagi@monom.org
+
+- Calculate subnet address base on gateway address and prefixlen
+- Differentiate creation of routes to gateway and subnet
+
+Signed-off-by: Jian Liang <jianliang@tycoint.com>
+
+---
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=ff7dcf91f12a2a237feebc6e606d0a8e92975528]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+ src/inet.c | 22 +++++++++++++++++++---
+ 1 file changed, 19 insertions(+), 3 deletions(-)
+
+diff --git a/src/inet.c b/src/inet.c
+index ab8aec8..0ddb030 100644
+--- a/src/inet.c
++++ b/src/inet.c
+@@ -2802,6 +2802,9 @@ static int iproute_default_modify(int cmd, uint32_t table_id, int ifindex,
+ unsigned char buf[sizeof(struct in6_addr)];
+ int ret, len;
+ int family = connman_inet_check_ipaddress(gateway);
++ char *dst = NULL;
++
++ DBG("gateway %s/%u table %u", gateway, prefixlen, table_id);
+
+ switch (family) {
+ case AF_INET:
+@@ -2814,7 +2817,19 @@ static int iproute_default_modify(int cmd, uint32_t table_id, int ifindex,
+ return -EINVAL;
+ }
+
+- ret = inet_pton(family, gateway, buf);
++ if (prefixlen) {
++ struct in_addr ipv4_subnet_addr, ipv4_mask;
++
++ memset(&ipv4_subnet_addr, 0, sizeof(ipv4_subnet_addr));
++ ipv4_mask.s_addr = htonl((0xffffffff << (32 - prefixlen)) & 0xffffffff);
++ ipv4_subnet_addr.s_addr = inet_addr(gateway);
++ ipv4_subnet_addr.s_addr &= ipv4_mask.s_addr;
++
++ dst = g_strdup(inet_ntoa(ipv4_subnet_addr));
++ }
++
++ ret = inet_pton(family, dst ? dst : gateway, buf);
++ g_free(dst);
+ if (ret <= 0)
+ return -EINVAL;
+
+@@ -2831,8 +2846,9 @@ static int iproute_default_modify(int cmd, uint32_t table_id, int ifindex,
+ rth.req.u.r.rt.rtm_type = RTN_UNICAST;
+ rth.req.u.r.rt.rtm_dst_len = prefixlen;
+
+- __connman_inet_rtnl_addattr_l(&rth.req.n, sizeof(rth.req), RTA_GATEWAY,
+- buf, len);
++ __connman_inet_rtnl_addattr_l(&rth.req.n, sizeof(rth.req),
++ prefixlen > 0 ? RTA_DST : RTA_GATEWAY, buf, len);
++
+ if (table_id < 256) {
+ rth.req.u.r.rt.rtm_table = table_id;
+ } else {
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0003-inet-Implement-APIs-for-creating-and-deleting-subnet.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0003-inet-Implement-APIs-for-creating-and-deleting-subnet.patch
new file mode 100644
index 0000000..56ba5c3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0003-inet-Implement-APIs-for-creating-and-deleting-subnet.patch
@@ -0,0 +1,68 @@
+From a9243f13d6e1aadd69bfcc27f75f69c38be51677 Mon Sep 17 00:00:00 2001
+From: Jian Liang <jianliang@tycoint.com>
+Date: Wed, 4 Oct 2017 17:30:17 +0100
+Subject: [PATCH 3/4] inet: Implement APIs for creating and deleting subnet
+ route
+To: connman@lists.01.org
+Cc: wagi@monom.org
+
+Signed-off-by: Jian Liang <jianliang@tycoint.com>
+
+---
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=3a15b0b7fccd053aff91da2cc68585509d0c509b]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+ src/connman.h | 4 ++++
+ src/inet.c | 14 ++++++++++++++
+ 2 files changed, 18 insertions(+)
+
+diff --git a/src/connman.h b/src/connman.h
+index 21b7080..da4446a 100644
+--- a/src/connman.h
++++ b/src/connman.h
+@@ -240,7 +240,11 @@ int __connman_inet_rtnl_addattr32(struct nlmsghdr *n, size_t maxlen,
+ int __connman_inet_add_fwmark_rule(uint32_t table_id, int family, uint32_t fwmark);
+ int __connman_inet_del_fwmark_rule(uint32_t table_id, int family, uint32_t fwmark);
+ int __connman_inet_add_default_to_table(uint32_t table_id, int ifindex, const char *gateway);
++int __connman_inet_add_subnet_to_table(uint32_t table_id, int ifindex,
++ const char *gateway, unsigned char prefixlen);
+ int __connman_inet_del_default_from_table(uint32_t table_id, int ifindex, const char *gateway);
++int __connman_inet_del_subnet_from_table(uint32_t table_id, int ifindex,
++ const char *gateway, unsigned char prefixlen);
+ int __connman_inet_get_address_netmask(int ifindex,
+ struct sockaddr_in *address, struct sockaddr_in *netmask);
+
+diff --git a/src/inet.c b/src/inet.c
+index 0ddb030..dcd1ab2 100644
+--- a/src/inet.c
++++ b/src/inet.c
+@@ -2880,6 +2880,13 @@ int __connman_inet_add_default_to_table(uint32_t table_id, int ifindex,
+ return iproute_default_modify(RTM_NEWROUTE, table_id, ifindex, gateway, 0);
+ }
+
++int __connman_inet_add_subnet_to_table(uint32_t table_id, int ifindex,
++ const char *gateway, unsigned char prefixlen)
++{
++ /* ip route add 1.2.3.4/24 dev eth0 table 1234 */
++ return iproute_default_modify(RTM_NEWROUTE, table_id, ifindex, gateway, prefixlen);
++}
++
+ int __connman_inet_del_default_from_table(uint32_t table_id, int ifindex,
+ const char *gateway)
+ {
+@@ -2888,6 +2895,13 @@ int __connman_inet_del_default_from_table(uint32_t table_id, int ifindex,
+ return iproute_default_modify(RTM_DELROUTE, table_id, ifindex, gateway, 0);
+ }
+
++int __connman_inet_del_subnet_from_table(uint32_t table_id, int ifindex,
++ const char *gateway, unsigned char prefixlen)
++{
++ /* ip route del 1.2.3.4/24 dev eth0 table 1234 */
++ return iproute_default_modify(RTM_DELROUTE, table_id, ifindex, gateway, prefixlen);
++}
++
+ int __connman_inet_get_interface_ll_address(int index, int family,
+ void *address)
+ {
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0004-session-Use-subnet-route-creation-and-deletion-APIs.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0004-session-Use-subnet-route-creation-and-deletion-APIs.patch
new file mode 100644
index 0000000..ca213eb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0004-session-Use-subnet-route-creation-and-deletion-APIs.patch
@@ -0,0 +1,77 @@
+From deb9372db8396da4f7cd20555ce7c9a8b3ad96bd Mon Sep 17 00:00:00 2001
+From: Jian Liang <jianliang@tycoint.com>
+Date: Fri, 6 Oct 2017 11:40:16 +0100
+Subject: [PATCH 4/4] session: Use subnet route creation and deletion APIs
+To: connman@lists.01.org
+Cc: wagi@monom.org
+
+As subnet route is address and session specific in this case, so add
+prefixlen into struct connman_session, and update it along with ipconfig.
+Then use it in subnet route related APIs.
+
+Signed-off-by: Jian Liang <jianliang@tycoint.com>
+
+---
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=285f25ef6cc9e4a43dab83523f3e2eab4365ac26]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+ src/session.c | 20 ++++++++++++++++----
+ 1 file changed, 16 insertions(+), 4 deletions(-)
+
+diff --git a/src/session.c b/src/session.c
+index 965ac06..7b7a14b 100644
+--- a/src/session.c
++++ b/src/session.c
+@@ -67,6 +67,7 @@ struct connman_session {
+ int index;
+ char *addr;
+ char *gateway;
++ unsigned char prefixlen;
+ bool policy_routing;
+ bool snat_enabled;
+ };
+@@ -357,13 +358,17 @@ static void del_default_route(struct connman_session *session)
+ if (!session->gateway)
+ return;
+
+- DBG("index %d routing table %d default gateway %s",
+- session->index, session->mark, session->gateway);
++ DBG("index %d routing table %d default gateway %s/%u",
++ session->index, session->mark, session->gateway, session->prefixlen);
++
++ __connman_inet_del_subnet_from_table(session->mark,
++ session->index, session->gateway, session->prefixlen);
+
+ __connman_inet_del_default_from_table(session->mark,
+ session->index, session->gateway);
+ g_free(session->gateway);
+ session->gateway = NULL;
++ session->prefixlen = 0;
+ session->index = -1;
+ }
+
+@@ -383,13 +388,20 @@ static void add_default_route(struct connman_session *session)
+ if (!session->gateway)
+ session->gateway = g_strdup(inet_ntoa(addr));
+
+- DBG("index %d routing table %d default gateway %s",
+- session->index, session->mark, session->gateway);
++ session->prefixlen = __connman_ipconfig_get_prefixlen(ipconfig);
++
++ DBG("index %d routing table %d default gateway %s/%u",
++ session->index, session->mark, session->gateway, session->prefixlen);
+
+ err = __connman_inet_add_default_to_table(session->mark,
+ session->index, session->gateway);
+ if (err < 0)
+ DBG("session %p %s", session, strerror(-err));
++
++ err = __connman_inet_add_subnet_to_table(session->mark,
++ session->index, session->gateway, session->prefixlen);
++ if (err < 0)
++ DBG("session add subnet route %p %s", session, strerror(-err));
+ }
+
+ static void del_nat_rules(struct connman_session *session)
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/CVE-2017-12865.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/CVE-2017-12865.patch
deleted file mode 100644
index 45f78f1..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/CVE-2017-12865.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 5c281d182ecdd0a424b64f7698f32467f8f67b71 Mon Sep 17 00:00:00 2001
-From: Jukka Rissanen <jukka.rissanen@linux.intel.com>
-Date: Wed, 9 Aug 2017 10:16:46 +0300
-Subject: dnsproxy: Fix crash on malformed DNS response
-
-If the response query string is malformed, we might access memory
-pass the end of "name" variable in parse_response().
-
-CVE: CVE-2017-12865
-Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/patch/?id=5c281d182ecdd0a424b64f7698f32467f8f67b71]
-
-Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
----
- src/dnsproxy.c | 16 ++++++++++------
- 1 file changed, 10 insertions(+), 6 deletions(-)
-
-diff --git a/src/dnsproxy.c b/src/dnsproxy.c
-index 38ac5bf..40b4f15 100644
---- a/src/dnsproxy.c
-+++ b/src/dnsproxy.c
-@@ -838,7 +838,7 @@ static struct cache_entry *cache_check(gpointer request, int *qtype, int proto)
- static int get_name(int counter,
- unsigned char *pkt, unsigned char *start, unsigned char *max,
- unsigned char *output, int output_max, int *output_len,
-- unsigned char **end, char *name, int *name_len)
-+ unsigned char **end, char *name, size_t max_name, int *name_len)
- {
- unsigned char *p;
-
-@@ -859,7 +859,7 @@ static int get_name(int counter,
-
- return get_name(counter + 1, pkt, pkt + offset, max,
- output, output_max, output_len, end,
-- name, name_len);
-+ name, max_name, name_len);
- } else {
- unsigned label_len = *p;
-
-@@ -869,6 +869,9 @@ static int get_name(int counter,
- if (*output_len > output_max)
- return -ENOBUFS;
-
-+ if ((*name_len + 1 + label_len + 1) > max_name)
-+ return -ENOBUFS;
-+
- /*
- * We need the original name in order to check
- * if this answer is the correct one.
-@@ -900,14 +903,14 @@ static int parse_rr(unsigned char *buf, unsigned char *start,
- unsigned char *response, unsigned int *response_size,
- uint16_t *type, uint16_t *class, int *ttl, int *rdlen,
- unsigned char **end,
-- char *name)
-+ char *name, size_t max_name)
- {
- struct domain_rr *rr;
- int err, offset;
- int name_len = 0, output_len = 0, max_rsp = *response_size;
-
- err = get_name(0, buf, start, max, response, max_rsp,
-- &output_len, end, name, &name_len);
-+ &output_len, end, name, max_name, &name_len);
- if (err < 0)
- return err;
-
-@@ -1033,7 +1036,8 @@ static int parse_response(unsigned char *buf, int buflen,
- memset(rsp, 0, sizeof(rsp));
-
- ret = parse_rr(buf, ptr, buf + buflen, rsp, &rsp_len,
-- type, class, ttl, &rdlen, &next, name);
-+ type, class, ttl, &rdlen, &next, name,
-+ sizeof(name) - 1);
- if (ret != 0) {
- err = ret;
- goto out;
-@@ -1099,7 +1103,7 @@ static int parse_response(unsigned char *buf, int buflen,
- */
- ret = get_name(0, buf, next - rdlen, buf + buflen,
- rsp, rsp_len, &output_len, &end,
-- name, &name_len);
-+ name, sizeof(name) - 1, &name_len);
- if (ret != 0) {
- /* just ignore the error at this point */
- ptr = next;
---
-cgit v1.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.34.bb b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.34.bb
deleted file mode 100644
index dc2c688..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.34.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require connman.inc
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
- file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
- file://0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch \
- file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \
- file://connman \
- file://no-version-scripts.patch \
- file://includes.patch \
- file://CVE-2017-12865.patch \
- "
-SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch \
- "
-
-SRC_URI[md5sum] = "e200028702c831d5f535d20d61e608ef"
-SRC_URI[sha256sum] = "a9a0808c729c1f348fc36d8cecb52d19b72bc34cb411c502608cb0e0190fc71e"
-
-RRECOMMENDS_${PN} = "connman-conf"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.35.bb b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.35.bb
new file mode 100644
index 0000000..ff21181
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.35.bb
@@ -0,0 +1,22 @@
+require connman.inc
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
+ file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
+ file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \
+ file://connman \
+ file://no-version-scripts.patch \
+ file://includes.patch \
+ file://0001-session-Keep-track-of-addr-in-fw_snat-session.patch \
+ file://0001-giognutls-Fix-a-crash-using-wispr-over-TLS.patch \
+ file://0001-inet-Add-prefixlen-to-iproute_default_function.patch \
+ file://0002-inet-Implement-subnet-route-creation-deletion-in-ipr.patch \
+ file://0003-inet-Implement-APIs-for-creating-and-deleting-subnet.patch \
+ file://0004-session-Use-subnet-route-creation-and-deletion-APIs.patch \
+ "
+SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch \
+ "
+
+SRC_URI[md5sum] = "bae37b45ee9b3db5ec8115188f8a7652"
+SRC_URI[sha256sum] = "66d7deb98371545c6e417239a9b3b3e3201c1529d08eedf40afbc859842cf2aa"
+
+RRECOMMENDS_${PN} = "connman-conf"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/0002-dhclient-dbus.patch b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/0002-dhclient-dbus.patch
index 6459dc0..101c33f 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/0002-dhclient-dbus.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/0002-dhclient-dbus.patch
@@ -3,7 +3,7 @@
Date: Tue, 15 Aug 2017 14:56:56 +0800
Subject: [PATCH 02/11] dhclient dbus
-upstream-Status: Inappropriate [distribution]
+Upstream-Status: Inappropriate [distribution]
Rebase to 4.3.6
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2017-3144.patch b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2017-3144.patch
new file mode 100644
index 0000000..2b2688c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2017-3144.patch
@@ -0,0 +1,74 @@
+From 8cfdedee369c26d2869b6ec4a64460b5f5a30934 Mon Sep 17 00:00:00 2001
+From: Thomas Markwalder <tmark@isc.org>
+Date: Thu, 7 Dec 2017 11:39:30 -0500
+Subject: [PATCH] [v4_3] Plugs a socket descriptor leak in OMAPI
+
+ Merges in rt46767.
+
+Upstream-Status: Backport
+[https://source.isc.org/cgi-bin/gitweb.cgi?p=dhcp.git;a=commitdiff;h=5097bc0559f592683faac1f67bf350e1bddf6ed4]
+
+CVE: CVE-2017-3144
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ RELNOTES | 7 +++++++
+ omapip/buffer.c | 9 +++++++++
+ omapip/message.c | 2 +-
+ 3 files changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/RELNOTES b/RELNOTES
+index dd40aaf..3741b80 100644
+--- a/RELNOTES
++++ b/RELNOTES
+@@ -66,6 +66,13 @@ We welcome comments from DHCP users, about this or anything else we do.
+ Email Vicky Risk, Product Manager at vicky@isc.org or discuss on
+ dhcp-users@lists.isc.org.
+
++- Plugged a socket descriptor leak in OMAPI, that can occur when there is
++ data pending to be written to an OMAPI connection, when the connection
++ is closed by the reader. Thanks to Pavel Zhukov at RedHat for bringing
++ this issue to our attention and whose patch helped guide us in the right
++ direction.
++ [ISc-Bugs #46767]
++
+ Changes since 4.3.6b1
+
+ - None
+diff --git a/omapip/buffer.c b/omapip/buffer.c
+index f7fdc32..809034d 100644
+--- a/omapip/buffer.c
++++ b/omapip/buffer.c
+@@ -566,6 +566,15 @@ isc_result_t omapi_connection_writer (omapi_object_t *h)
+ omapi_buffer_dereference (&buffer, MDL);
+ }
+ }
++
++ /* If we had data left to write when we're told to disconnect,
++ * we need recall disconnect, now that we're done writing.
++ * See rt46767. */
++ if (c->out_bytes == 0 && c->state == omapi_connection_disconnecting) {
++ omapi_disconnect (h, 1);
++ return ISC_R_SHUTTINGDOWN;
++ }
++
+ return ISC_R_SUCCESS;
+ }
+
+diff --git a/omapip/message.c b/omapip/message.c
+index 59ccdc2..21bcfc3 100644
+--- a/omapip/message.c
++++ b/omapip/message.c
+@@ -339,7 +339,7 @@ isc_result_t omapi_message_unregister (omapi_object_t *mo)
+ }
+
+ #ifdef DEBUG_PROTOCOL
+-static const char *omapi_message_op_name(int op) {
++const char *omapi_message_op_name(int op) {
+ switch (op) {
+ case OMAPI_OP_OPEN: return "OMAPI_OP_OPEN";
+ case OMAPI_OP_REFRESH: return "OMAPI_OP_REFRESH";
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb
index 6615ae2..cc13549 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb
@@ -12,6 +12,7 @@
file://0010-build-shared-libs.patch \
file://0011-Moved-the-call-to-isc_app_ctxstart-to-not-get-signal.patch \
file://0012-dhcp-correct-the-intention-for-xml2-lib-search.patch \
+ file://CVE-2017-3144.patch \
"
SRC_URI[md5sum] = "afa6e9b3eb7539ea048421a82c668adc"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2.inc b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2.inc
index a578eb3..4fbfec6 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2.inc
@@ -13,6 +13,8 @@
inherit update-alternatives bash-completion pkgconfig
+CLEANBROKEN = "1"
+
PACKAGECONFIG ??= "tipc"
PACKAGECONFIG[tipc] = ",,libmnl,"
@@ -21,7 +23,7 @@
do_configure_append () {
sh configure ${STAGING_INCDIR}
# Explicitly disable ATM support
- sed -i -e '/TC_CONFIG_ATM/d' Config
+ sed -i -e '/TC_CONFIG_ATM/d' config.mk
}
do_install () {
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-include-stdint.h-explicitly-for-UINT16_MAX.patch b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-include-stdint.h-explicitly-for-UINT16_MAX.patch
deleted file mode 100644
index eb0c0ab..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-include-stdint.h-explicitly-for-UINT16_MAX.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 3c885d87befc706bb923933b9819de6fe2de897e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 20 May 2017 14:03:19 -0700
-Subject: [PATCH] include stdint.h explicitly for UINT16_MAX)
-
-Fixes
-| tc_core.c:190:29: error: 'UINT16_MAX' undeclared (first use in this function); did you mean '__INT16_MAX__'?
-| if ((sz >> s->size_log) > UINT16_MAX) {
-| ^~~~~~~~~~
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- tc/tc_core.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/tc/tc_core.c b/tc/tc_core.c
-index 7bbe0d7..821b741 100644
---- a/tc/tc_core.c
-+++ b/tc/tc_core.c
-@@ -12,6 +12,7 @@
-
- #include <stdio.h>
- #include <stdlib.h>
-+#include <stdint.h>
- #include <unistd.h>
- #include <syslog.h>
- #include <fcntl.h>
---
-2.13.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-ip-Remove-unneed-header.patch b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-ip-Remove-unneed-header.patch
index a9f8db6..a9027c5 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-ip-Remove-unneed-header.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-ip-Remove-unneed-header.patch
@@ -1,6 +1,6 @@
-From f58fc99c88a54135e55a6e0956ce8ae71078d1cc Mon Sep 17 00:00:00 2001
+From 02ed10fc5215c4a32e6740b0a0c2439659be6801 Mon Sep 17 00:00:00 2001
From: Changhyeok Bae <changhyeok.bae@gmail.com>
-Date: Mon, 12 Jun 2017 04:29:07 +0000
+Date: Mon, 13 Nov 2017 15:59:35 +0000
Subject: [PATCH] ip: Remove unneed header
Fix redefinition of struct ethhdr with a suitably patched musl libc
@@ -8,23 +8,23 @@
Signed-off-by: Changhyeok Bae <changhyeok.bae@gmail.com>
-Upstream-Status: Submitted [netdev@vger.kernel.org]
+Upstream-Status: Pending [netdev@vger.kernel.org]
---
ip/iplink_bridge.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c
-index 818b43c..f065b22 100644
+index cccdec1..f065b22 100644
--- a/ip/iplink_bridge.c
+++ b/ip/iplink_bridge.c
-@@ -15,7 +15,6 @@
+@@ -13,7 +13,6 @@
+ #include <stdlib.h>
+ #include <string.h>
#include <netinet/in.h>
+-#include <netinet/ether.h>
#include <linux/if_link.h>
#include <linux/if_bridge.h>
--#include <netinet/ether.h>
#include <net/if.h>
-
- #include "rt_names.h"
--
2.7.4
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch
index 39c7d40..c3d3fea 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch
@@ -5,14 +5,13 @@
Upstream-Status: Pending
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-
---
- ip/ifcfg | 15 ++++++++-------
- ip/rtpr | 2 +-
+ ip/ifcfg | 15 ++++++++-------
+ ip/rtpr | 2 +-
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/ip/ifcfg b/ip/ifcfg
-index 083d9df..60bcf1f 100644
+index 30a2dc4..8677b2e 100644
--- a/ip/ifcfg
+++ b/ip/ifcfg
@@ -1,12 +1,13 @@
@@ -43,7 +42,7 @@
-ip route add unreachable 255.255.255.255 >& /dev/null
+ip route add unreachable 224.0.0.0/24 > /dev/null 2>&1
+ip route add unreachable 255.255.255.255 > /dev/null 2>&1
- if [ `ip link ls $dev | grep -c MULTICAST` -ge 1 ]; then
+ if [ "`ip link ls $dev | grep -c MULTICAST`" -ge 1 ]; then
- ip route add 224.0.0.0/4 dev $dev scope global >& /dev/null
+ ip route add 224.0.0.0/4 dev $dev scope global > /dev/null 2>&1
fi
@@ -60,5 +59,5 @@
exec tr "[\\\\]" "[
]"
--
-1.7.9.5
+2.7.4
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch
index 3d324c9..50c4bfb 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch
@@ -15,13 +15,13 @@
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
- include/linux/libc-compat.h | 4 +++-
+ include/uapi/linux/libc-compat.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
-diff --git a/include/linux/libc-compat.h b/include/linux/libc-compat.h
+diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
index f38571d..30f0b67 100644
---- a/include/linux/libc-compat.h
-+++ b/include/linux/libc-compat.h
+--- a/include/uapi/linux/libc-compat.h
++++ b/include/uapi/linux/libc-compat.h
@@ -49,10 +49,12 @@
#define _LIBC_COMPAT_H
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/configure-cross.patch b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/configure-cross.patch
index 866609c..8b75a2a 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/configure-cross.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/configure-cross.patch
@@ -9,19 +9,19 @@
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Shane Wang <shane.wang@intel.com>
-Index: iproute2-3.7.0/configure
+Index: iproute2-4.14.1/configure
===================================================================
---- iproute2-3.7.0.orig/configure
-+++ iproute2-3.7.0/configure
+--- iproute2-4.14.1.orig/configure
++++ iproute2-4.14.1/configure
@@ -2,6 +2,7 @@
- # This is not an autconf generated configure
+ # This is not an autoconf generated configure
#
INCLUDE=${1:-"$PWD/include"}
+SYSROOT=$1
- # Make a temp directory in build tree.
- TMPDIR=$(mktemp -d config.XXXXXX)
-@@ -158,7 +159,7 @@ check_ipt_lib_dir()
+ # Output file which is input to Makefile
+ CONFIG=config.mk
+@@ -195,7 +196,7 @@ check_ipt_lib_dir()
return
fi
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.11.0.bb b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.11.0.bb
deleted file mode 100644
index dbd0545..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.11.0.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require iproute2.inc
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
- file://configure-cross.patch \
- file://0001-iproute2-de-bash-scripts.patch \
- file://0001-libc-compat.h-add-musl-workaround.patch \
- file://0001-include-stdint.h-explicitly-for-UINT16_MAX.patch \
- file://0001-ip-Remove-unneed-header.patch \
- "
-
-SRC_URI[md5sum] = "7a9498de88bcca95c305df6108ae197e"
-SRC_URI[sha256sum] = "72671028bda696d0cb8f48ec8e702581c3a501caeed33eec3a81d7041cbc8026"
-
-# CFLAGS are computed in Makefile and reference CCOPTS
-#
-EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.14.1.bb b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.14.1.bb
new file mode 100644
index 0000000..81e2e4a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.14.1.bb
@@ -0,0 +1,15 @@
+require iproute2.inc
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
+ file://configure-cross.patch \
+ file://0001-iproute2-de-bash-scripts.patch \
+ file://0001-libc-compat.h-add-musl-workaround.patch \
+ file://0001-ip-Remove-unneed-header.patch \
+ "
+
+SRC_URI[md5sum] = "1075423d7029e02a8f23ed4f42b7e372"
+SRC_URI[sha256sum] = "d43ac068afcc350a448f4581b6e292331ef7e4e7aa746e34981582d5fdb10067"
+
+# CFLAGS are computed in Makefile and reference CCOPTS
+#
+EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/ldflags.patch b/import-layers/yocto-poky/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/ldflags.patch
index e95fe35..b246de8 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/ldflags.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/ldflags.patch
@@ -3,72 +3,84 @@
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Upstream-Status: Pending
+Index: irda-utils-0.9.18/findchip/Makefile
+===================================================================
--- irda-utils-0.9.18.orig/findchip/Makefile
+++ irda-utils-0.9.18/findchip/Makefile
@@ -65,5 +65,5 @@ install: findchip
-
- gfindchip: gfindchip.c
- $(prn_cc)
+
+ gfindchip: gfindchip.c
+ $(prn_cc)
- $(ECMD))$(CC) $(CFLAGS) `gtk-config --cflags` $< -o $@ `gtk-config --libs`
+ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) `gtk-config --cflags` $< -o $@ `gtk-config --libs`
-
+
+Index: irda-utils-0.9.18/irattach/Makefile
+===================================================================
--- irda-utils-0.9.18.orig/irattach/Makefile
+++ irda-utils-0.9.18/irattach/Makefile
@@ -49,13 +49,13 @@ all: $(TARGETS)
-
+
irattach: irattach.o util.o
- $(prn_cc_o)
+ $(prn_cc_o)
- $(ECMD)$(CC) $(CFLAGS) irattach.o util.o -o $@
+ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) irattach.o util.o -o $@
-
-
-
+
+
+
dongle_attach: dongle_attach.o
- $(prn_cc_o)
+ $(prn_cc_o)
- $(ECMD)$(CC) $(CFLAGS) dongle_attach.o -o $@
+ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) dongle_attach.o -o $@
-
-
+
+
install: $(TARGETS)
+Index: irda-utils-0.9.18/irdadump/Makefile
+===================================================================
--- irda-utils-0.9.18.orig/irdadump/Makefile
+++ irda-utils-0.9.18/irdadump/Makefile
@@ -40,7 +40,7 @@ lib_irdadump.a: $(LIBIRDADUMP_OBJS)
-
+
irdadump: $(IRDADUMP_OBJS) $(LIBIRDADUMP_TARGET)
- $(prn_cc_o)
+ $(prn_cc_o)
- $(ECMD)$(CC) $(CFLAGS) `pkg-config --libs glib-2.0` -o $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET)
+ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) `pkg-config --libs glib-2.0` -o $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET)
-
-
+
+
.c.o:
+Index: irda-utils-0.9.18/irdaping/Makefile
+===================================================================
--- irda-utils-0.9.18.orig/irdaping/Makefile
+++ irda-utils-0.9.18/irdaping/Makefile
@@ -56,7 +56,7 @@ all: $(TARGETS)
-
+
irdaping: $(OBJS)
- $(prn_cc_o)
+ $(prn_cc_o)
- $(ECMD)$(CC) $(CFLAGS) $(OBJS) -o $@
+ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@
-
-
+
+
.c.o:
+Index: irda-utils-0.9.18/irnetd/Makefile
+===================================================================
--- irda-utils-0.9.18.orig/irnetd/Makefile
+++ irda-utils-0.9.18/irnetd/Makefile
@@ -50,7 +50,7 @@ all: $(TARGETS)
-
+
irnetd: $(OBJS)
- $(prn_cc_o)
+ $(prn_cc_o)
- $(ECMD)$(CC) $(CFLAGS) $(OBJS) -o $@
+ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@
-
-
+
+
install: irnetd
+Index: irda-utils-0.9.18/psion/Makefile
+===================================================================
--- irda-utils-0.9.18.orig/psion/Makefile
+++ irda-utils-0.9.18/psion/Makefile
@@ -25,4 +25,4 @@ install: $(PSION_TARGETS)
CFLAGS += -g -I../include -Wall -Wstrict-prototypes $(RPM_OPT_FLAGS)
- irpsion5:
- $(prn_cc_o)
+ irpsion5:
+ $(prn_cc_o)
- $(ECMD)$(CC) $(CFLAGS) $(PSION_SRC) -o $@
\ No newline at end of file
+ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) $(PSION_SRC) -o $@
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.14.bb b/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.14.bb
new file mode 100644
index 0000000..e1b17de
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.14.bb
@@ -0,0 +1,33 @@
+SUMMARY = "nl80211 based CLI configuration utility for wireless devices"
+DESCRIPTION = "iw is a new nl80211 based CLI configuration utility for \
+wireless devices. It supports almost all new drivers that have been added \
+to the kernel recently. "
+HOMEPAGE = "http://wireless.kernel.org/en/users/Documentation/iw"
+SECTION = "base"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774"
+
+DEPENDS = "libnl"
+
+SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \
+ file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \
+ file://separate-objdir.patch \
+"
+
+SRC_URI[md5sum] = "2067516ca9940fdb8c091ee3250da374"
+SRC_URI[sha256sum] = "a0c3aad6ff52234d03a2522ba2eba570e36abb3e60dc29bf0b1ce88dd725d6d4"
+
+inherit pkgconfig
+
+EXTRA_OEMAKE = "\
+ -f '${S}/Makefile' \
+ \
+ 'PREFIX=${prefix}' \
+ 'SBINDIR=${sbindir}' \
+ 'MANDIR=${mandir}' \
+"
+B = "${WORKDIR}/build"
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.9.bb b/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.9.bb
deleted file mode 100644
index 6daeb07..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.9.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "nl80211 based CLI configuration utility for wireless devices"
-DESCRIPTION = "iw is a new nl80211 based CLI configuration utility for \
-wireless devices. It supports almost all new drivers that have been added \
-to the kernel recently. "
-HOMEPAGE = "http://wireless.kernel.org/en/users/Documentation/iw"
-SECTION = "base"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774"
-
-DEPENDS = "libnl"
-
-SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \
- file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \
- file://separate-objdir.patch \
-"
-
-SRC_URI[md5sum] = "06e96ab7a5c652f8eaed6f71533a9e0f"
-SRC_URI[sha256sum] = "12f921f3dbe0f33c309f5f2891cccf5325c94bd48dceeb102de183f5f048a9e2"
-
-inherit pkgconfig
-
-EXTRA_OEMAKE = "\
- -f '${S}/Makefile' \
- \
- 'PREFIX=${prefix}' \
- 'SBINDIR=${sbindir}' \
- 'MANDIR=${mandir}' \
-"
-B = "${WORKDIR}/build"
-
-do_install() {
- oe_runmake 'DESTDIR=${D}' install
-}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch b/import-layers/yocto-poky/meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch
index 4660676..6e86407 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch
@@ -16,18 +16,15 @@
Makefile.am | 1 +
1 file changed, 1 insertion(+)
-diff --git a/Makefile.am b/Makefile.am
-index 3241311..a43eaa2 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -164,6 +164,7 @@ MAINTAINERCLEANFILES = Makefile.in \
+Index: neard-0.16/Makefile.am
+===================================================================
+--- neard-0.16.orig/Makefile.am
++++ neard-0.16/Makefile.am
+@@ -244,6 +244,7 @@ SED_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(di
src/plugin.$(OBJEXT): src/builtin.h
src/builtin.h: src/genbuiltin $(builtin_sources)
+ $(AM_V_at)$(MKDIR_P) src
$(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
- $(src_neard_OBJECTS) \
---
-1.7.9.5
-
+ se/plugin.$(OBJEXT): se/builtin.h
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/files/bugfix-adjust-statd-service-name.patch b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/files/bugfix-adjust-statd-service-name.patch
index 14bd403..822939f 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/files/bugfix-adjust-statd-service-name.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/files/bugfix-adjust-statd-service-name.patch
@@ -16,11 +16,11 @@
utils/statd/start-statd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/utils/statd/start-statd b/utils/statd/start-statd
-index 8211a90..3c2aa6f 100755
---- a/utils/statd/start-statd
-+++ b/utils/statd/start-statd
-@@ -16,7 +16,7 @@ fi
+Index: nfs-utils-2.1.1/utils/statd/start-statd
+===================================================================
+--- nfs-utils-2.1.1.orig/utils/statd/start-statd
++++ nfs-utils-2.1.1/utils/statd/start-statd
+@@ -28,7 +28,7 @@ fi
# First try systemd if it's installed.
if [ -d /run/systemd/system ]; then
# Quit only if the call worked.
@@ -28,7 +28,4 @@
+ systemctl start nfs-statd.service && exit
fi
- # Fall back to launching it ourselves.
---
-2.1.4
-
+ cd /
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure-Allow-to-explicitly-disable-nfsidmap.patch b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure-Allow-to-explicitly-disable-nfsidmap.patch
index 7025fb5..26b558c 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure-Allow-to-explicitly-disable-nfsidmap.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure-Allow-to-explicitly-disable-nfsidmap.patch
@@ -12,11 +12,11 @@
configure.ac | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
-diff --git a/configure.ac b/configure.ac
-index bf433d6..28a8f62 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -69,6 +69,12 @@ AC_ARG_ENABLE(nfsv4,
+Index: nfs-utils-2.1.1/configure.ac
+===================================================================
+--- nfs-utils-2.1.1.orig/configure.ac
++++ nfs-utils-2.1.1/configure.ac
+@@ -92,6 +92,12 @@ AC_ARG_ENABLE(nfsv4,
AC_SUBST(enable_nfsv4)
AM_CONDITIONAL(CONFIG_NFSV4, [test "$enable_nfsv4" = "yes"])
@@ -27,9 +27,9 @@
+ enable_nfsidmap=yes)
+
AC_ARG_ENABLE(nfsv41,
- [AC_HELP_STRING([--enable-nfsv41],
- [enable support for NFSv41 @<:@default=yes@:>@])],
-@@ -296,7 +302,7 @@ fi
+ [AC_HELP_STRING([--disable-nfsv41],
+ [disable support for NFSv41 @<:@default=no@:>@])],
+@@ -339,7 +345,7 @@ fi
dnl enable nfsidmap when its support by libnfsidmap
AM_CONDITIONAL(CONFIG_NFSDCLTRACK, [test "$enable_nfsdcltrack" = "yes" ])
@@ -38,6 +38,3 @@
if test "$knfsd_cv_glibc2" = no; then
---
-1.8.4.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
index d8f8181..89a8a57 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
@@ -13,9 +13,10 @@
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-diff -up nfs-utils-1.2.3/utils/statd/sm-notify.c.orig nfs-utils-1.2.3/utils/statd/sm-notify.c
---- nfs-utils-1.2.3/utils/statd/sm-notify.c.orig 2010-09-28 08:24:16.000000000 -0400
-+++ nfs-utils-1.2.3/utils/statd/sm-notify.c 2010-10-15 16:44:43.487119601 -0400
+Index: nfs-utils-2.1.1/utils/statd/sm-notify.c
+===================================================================
+--- nfs-utils-2.1.1.orig/utils/statd/sm-notify.c
++++ nfs-utils-2.1.1/utils/statd/sm-notify.c
@@ -28,6 +28,9 @@
#include <netdb.h>
#include <errno.h>
@@ -24,9 +25,9 @@
+#include <arpa/nameser.h>
+#include <resolv.h>
+ #include "conffile.h"
#include "sockaddr.h"
- #include "xlog.h"
-@@ -84,6 +87,7 @@ smn_lookup(const char *name)
+@@ -89,6 +92,7 @@ smn_lookup(const char *name)
};
int error;
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_2.1.1.bb b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_2.1.1.bb
index d917c4d..79453ad 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_2.1.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_2.1.1.bb
@@ -56,7 +56,6 @@
EXTRA_OECONF = "--with-statduser=rpcuser \
--enable-mountconfig \
--enable-libmount-mount \
- --disable-nfsv41 \
--enable-uuid \
--disable-gss \
--disable-nfsdcltrack \
@@ -70,6 +69,8 @@
PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers"
PACKAGECONFIG[nfsidmap] = "--enable-nfsidmap,--disable-nfsidmap,keyutils"
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+# libdevmapper is available in meta-oe
+PACKAGECONFIG[nfsv41] = "--enable-nfsv41,--disable-nfsv41,libdevmapper"
PACKAGES =+ "${PN}-client ${PN}-mount ${PN}-stats"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono.inc b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono.inc
index 676a0c0..0472414 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono.inc
@@ -5,7 +5,7 @@
LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
file://src/ofono.h;beginline=1;endline=20;md5=3ce17d5978ef3445def265b98899c2ee"
-inherit autotools pkgconfig update-rc.d systemd bluetooth
+inherit autotools pkgconfig update-rc.d systemd bluetooth gobject-introspection-data
DEPENDS = "dbus glib-2.0 udev mobile-broadband-provider-info"
@@ -26,10 +26,6 @@
do_install_append() {
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/ofono ${D}${sysconfdir}/init.d/ofono
-
- # Ofono still has one test tool that refers to Python 2 in the shebang
- sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/ofono/test/set-ddr
-
}
PACKAGES =+ "${PN}-tests"
@@ -39,4 +35,5 @@
FILES_${PN} += "${systemd_unitdir}"
FILES_${PN}-tests = "${libdir}/${BPN}/test"
-RDEPENDS_${PN}-tests = "python3 python3-pygobject python3-dbus"
+RDEPENDS_${PN}-tests = "python3 python3-dbus"
+RDEPENDS_${PN}-tests += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-pygobject', '', d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono/use-python3.patch b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono/use-python3.patch
new file mode 100644
index 0000000..7b84075
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono/use-python3.patch
@@ -0,0 +1,27 @@
+set-ddr should use Python3 like all the other tests.
+
+Upstream-Status: Submitted
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 17b69cd1da4c5c5f732acb38ca1602446c567ee7 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Mon, 29 Jan 2018 11:31:25 +0000
+Subject: [PATCH] test/setddr: use Python 3
+
+All the other tests use Python 3, so this should to.
+---
+ test/set-ddr | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/set-ddr b/test/set-ddr
+index 5d061b95..33631f31 100755
+--- a/test/set-ddr
++++ b/test/set-ddr
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python3
+
+ import sys
+ import dbus
+--
+2.11.0
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.20.bb b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.20.bb
deleted file mode 100644
index 18f983e..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.20.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require ofono.inc
-
-SRC_URI = "\
- ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
- file://ofono \
-"
-SRC_URI[md5sum] = "fad0630fce6a9aecdb7db37bc1f1db7d"
-SRC_URI[sha256sum] = "5d7ba8f481a7715d013a79f8d6477eb89d8aaae399395d5d008a1317c34a31d5"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.22.bb b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.22.bb
new file mode 100644
index 0000000..e57eaa7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.22.bb
@@ -0,0 +1,9 @@
+require ofono.inc
+
+SRC_URI = "\
+ ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
+ file://ofono \
+ file://use-python3.patch \
+"
+SRC_URI[md5sum] = "2a683ab8e98448ad8bc5dc9868d2893e"
+SRC_URI[sha256sum] = "8e34a6696c300c9841b55e8dff640bd3096e49f5dbe55bbebaa69a71676f687e"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/0001-openssh-Fix-syntax-error-on-x32.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/0001-openssh-Fix-syntax-error-on-x32.patch
deleted file mode 100644
index ce9e200..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/0001-openssh-Fix-syntax-error-on-x32.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From a7e359d4ba345aa2a13c07f1057184e9b4e598a2 Mon Sep 17 00:00:00 2001
-From: sweeaun <swee.aun.khor@intel.com>
-Date: Tue, 22 Aug 2017 11:19:48 -0700
-Subject: [PATCH] openssh: Fix syntax error on x32
-
-Upstream-Status: Backport
-This bug has been fixed in v_7.5 branch https://github.com/openssh/
-openssh-portable/tree/V_7_5 and master branch https://github.com/
-openssh/openssh-portable/tree/master.
-
-Fix compilation error during openssh x32 build due to syntax error.
-
-Signed-off-by: sweeaun <swee.aun.khor@intel.com>
----
- sandbox-seccomp-filter.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c
-index 3a1aedc..a8d472a 100644
---- a/sandbox-seccomp-filter.c
-+++ b/sandbox-seccomp-filter.c
-@@ -235,7 +235,7 @@ static const struct sock_filter preauth_insns[] = {
- * x86-64 syscall under some circumstances, e.g.
- * https://bugs.debian.org/849923
- */
-- SC_ALLOW(__NR_clock_gettime & ~__X32_SYSCALL_BIT);
-+ SC_ALLOW(__NR_clock_gettime & ~__X32_SYSCALL_BIT),
- #endif
-
- /* Default deny */
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch
index adc25c6..b8402a4 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch
@@ -6,64 +6,42 @@
Signed-off-by: Maxin B. John <maxin.john@enea.com>
Upstream-Status: Pending
-Index: openssh-6.8p1/regress/cipher-speed.sh
+Index: openssh-7.6p1/regress/cipher-speed.sh
===================================================================
---- openssh-6.8p1.orig/regress/cipher-speed.sh
-+++ openssh-6.8p1/regress/cipher-speed.sh
+--- openssh-7.6p1.orig/regress/cipher-speed.sh
++++ openssh-7.6p1/regress/cipher-speed.sh
@@ -17,7 +17,7 @@ for c in `${SSH} -Q cipher`; do n=0; for
printf "%-60s" "$c/$m:"
( ${SSH} -o 'compression no' \
- -F $OBJ/ssh_proxy -2 -m $m -c $c somehost \
+ -F $OBJ/ssh_proxy -m $m -c $c somehost \
- exec sh -c \'"dd of=/dev/null obs=32k"\' \
+ exec sh -c \'"dd of=/dev/null bs=32k"\' \
< ${DATA} ) 2>&1 | getbytes
if [ $? -ne 0 ]; then
-@@ -42,7 +42,7 @@ for c in $ciphers; do
- printf "%-60s" "$c:"
- ( ${SSH} -o 'compression no' \
- -F $OBJ/ssh_proxy -1 -c $c somehost \
-- exec sh -c \'"dd of=/dev/null obs=32k"\' \
-+ exec sh -c \'"dd of=/dev/null bs=32k"\' \
- < ${DATA} ) 2>&1 | getbytes
- if [ $? -ne 0 ]; then
- fail "ssh -1 failed with cipher $c"
-Index: openssh-6.8p1/regress/transfer.sh
+Index: openssh-7.6p1/regress/transfer.sh
===================================================================
---- openssh-6.8p1.orig/regress/transfer.sh
-+++ openssh-6.8p1/regress/transfer.sh
-@@ -15,7 +15,7 @@ for p in ${SSH_PROTOCOLS}; do
- for s in 10 100 1k 32k 64k 128k 256k; do
- trace "proto $p dd-size ${s}"
- rm -f ${COPY}
-- dd if=$DATA obs=${s} 2> /dev/null | \
-+ dd if=$DATA bs=${s} 2> /dev/null | \
- ${SSH} -q -$p -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
- if [ $? -ne 0 ]; then
- fail "ssh cat $DATA failed"
-Index: openssh-6.8p1/regress/yes-head.sh
-===================================================================
---- openssh-6.8p1.orig/regress/yes-head.sh
-+++ openssh-6.8p1/regress/yes-head.sh
-@@ -4,7 +4,7 @@
- tid="yes pipe head"
-
- for p in ${SSH_PROTOCOLS}; do
-- lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -2000"' | (sleep 3 ; wc -l)`
-+ lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -n 2000"' | (sleep 3 ; wc -l)`
+--- openssh-7.6p1.orig/regress/transfer.sh
++++ openssh-7.6p1/regress/transfer.sh
+@@ -13,7 +13,7 @@ cmp ${DATA} ${COPY} || fail "corrupted
+ for s in 10 100 1k 32k 64k 128k 256k; do
+ trace "dd-size ${s}"
+ rm -f ${COPY}
+- dd if=$DATA obs=${s} 2> /dev/null | \
++ dd if=$DATA bs=${s} 2> /dev/null | \
+ ${SSH} -q -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
if [ $? -ne 0 ]; then
- fail "yes|head test failed"
- lines = 0;
-Index: openssh-6.8p1/regress/key-options.sh
+ fail "ssh cat $DATA failed"
+Index: openssh-7.6p1/regress/key-options.sh
===================================================================
---- openssh-6.8p1.orig/regress/key-options.sh
-+++ openssh-6.8p1/regress/key-options.sh
-@@ -54,7 +54,7 @@ for p in ${SSH_PROTOCOLS}; do
+--- openssh-7.6p1.orig/regress/key-options.sh
++++ openssh-7.6p1/regress/key-options.sh
+@@ -47,7 +47,7 @@ for f in 127.0.0.1 '127.0.0.0\/8'; do
fi
sed 's/.*/from="'"$f"'" &/' $origkeys >$authkeys
- from=`head -1 $authkeys | cut -f1 -d ' '`
+ from=`head -n 1 $authkeys | cut -f1 -d ' '`
- verbose "key option proto $p $from"
- r=`${SSH} -$p -q -F $OBJ/ssh_proxy somehost 'echo true'`
+ verbose "key option $from"
+ r=`${SSH} -q -F $OBJ/ssh_proxy somehost 'echo true'`
if [ "$r" = "true" ]; then
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/disable-ciphers-not-supported-by-OpenSSL-DES.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/disable-ciphers-not-supported-by-OpenSSL-DES.patch
new file mode 100644
index 0000000..8a2d1a0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/disable-ciphers-not-supported-by-OpenSSL-DES.patch
@@ -0,0 +1,39 @@
+From 265eaab8b39d8d8721224a48eefed5bf1696d353 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 18 Apr 2018 21:58:32 +0800
+Subject: [PATCH] disable ciphers not supported by OpenSSL DES
+
+While compiling openssl with option `no-des', it caused the openssh
+build failure
+...
+cipher.c:85:41: error: 'EVP_des_ede3_cbc' undeclared here (not in a function);
+...
+
+OpenSSL configured that way defines OPENSSL_NO_DES to disable des
+
+Suggested by dtucker@
+
+Upstream-Status: Submitted [openssh-unix-dev@mindrot.org]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ cipher.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/cipher.c b/cipher.c
+index c3cd5dc..86558e1 100644
+--- a/cipher.c
++++ b/cipher.c
+@@ -82,7 +82,9 @@ struct sshcipher {
+
+ static const struct sshcipher ciphers[] = {
+ #ifdef WITH_OPENSSL
++#ifndef OPENSSL_NO_DES
+ { "3des-cbc", 8, 24, 0, 0, CFLAG_CBC, EVP_des_ede3_cbc },
++#endif
+ { "aes128-cbc", 16, 16, 0, 0, CFLAG_CBC, EVP_aes_128_cbc },
+ { "aes192-cbc", 16, 24, 0, 0, CFLAG_CBC, EVP_aes_192_cbc },
+ { "aes256-cbc", 16, 32, 0, 0, CFLAG_CBC, EVP_aes_256_cbc },
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch
deleted file mode 100644
index 1098b97..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From 27740c918fe5d78441bcf69e7d2eefb23ddeca4c Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Thu, 19 Jan 2017 03:00:08 -0500
-Subject: [PATCH 1/3] Remove des in cipher.
-
-Upstream-Status: Pending
-
-Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- cipher.c | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-diff --git a/cipher.c b/cipher.c
-index 2def333..59f6792 100644
---- a/cipher.c
-+++ b/cipher.c
-@@ -53,8 +53,10 @@
-
- #ifdef WITH_SSH1
- extern const EVP_CIPHER *evp_ssh1_bf(void);
-+#ifndef OPENSSL_NO_DES
- extern const EVP_CIPHER *evp_ssh1_3des(void);
- extern int ssh1_3des_iv(EVP_CIPHER_CTX *, int, u_char *, int);
-+#endif /* OPENSSL_NO_DES */
- #endif
-
- struct sshcipher_ctx {
-@@ -88,15 +90,19 @@ struct sshcipher {
-
- static const struct sshcipher ciphers[] = {
- #ifdef WITH_SSH1
-+#ifndef OPENSSL_NO_DES
- { "des", SSH_CIPHER_DES, 8, 8, 0, 0, 0, 1, EVP_des_cbc },
- { "3des", SSH_CIPHER_3DES, 8, 16, 0, 0, 0, 1, evp_ssh1_3des },
-+#endif /* OPENSSL_NO_DES */
- # ifndef OPENSSL_NO_BF
- { "blowfish", SSH_CIPHER_BLOWFISH, 8, 32, 0, 0, 0, 1, evp_ssh1_bf },
- # endif /* OPENSSL_NO_BF */
- #endif /* WITH_SSH1 */
- #ifdef WITH_OPENSSL
-+#ifndef OPENSSL_NO_DES
- { "none", SSH_CIPHER_NONE, 8, 0, 0, 0, 0, 0, EVP_enc_null },
- { "3des-cbc", SSH_CIPHER_SSH2, 8, 24, 0, 0, 0, 1, EVP_des_ede3_cbc },
-+#endif /* OPENSSL_NO_DES */
- # ifndef OPENSSL_NO_BF
- { "blowfish-cbc",
- SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 1, EVP_bf_cbc },
-@@ -180,8 +186,10 @@ cipher_keylen(const struct sshcipher *c)
- u_int
- cipher_seclen(const struct sshcipher *c)
- {
-+#ifndef OPENSSL_NO_DES
- if (strcmp("3des-cbc", c->name) == 0)
- return 14;
-+#endif /* OPENSSL_NO_DES */
- return cipher_keylen(c);
- }
-
-@@ -230,11 +238,13 @@ u_int
- cipher_mask_ssh1(int client)
- {
- u_int mask = 0;
-+#ifndef OPENSSL_NO_DES
- mask |= 1 << SSH_CIPHER_3DES; /* Mandatory */
- mask |= 1 << SSH_CIPHER_BLOWFISH;
- if (client) {
- mask |= 1 << SSH_CIPHER_DES;
- }
-+#endif /*OPENSSL_NO_DES*/
- return mask;
- }
-
-@@ -606,7 +616,9 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
- switch (c->number) {
- #ifdef WITH_OPENSSL
- case SSH_CIPHER_SSH2:
-+#ifndef OPENSSL_NO_DES
- case SSH_CIPHER_DES:
-+#endif /* OPENSSL_NO_DES */
- case SSH_CIPHER_BLOWFISH:
- evplen = EVP_CIPHER_CTX_iv_length(cc->evp);
- if (evplen == 0)
-@@ -629,8 +641,10 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
- break;
- #endif
- #ifdef WITH_SSH1
-+#ifndef OPENSSL_NO_DES
- case SSH_CIPHER_3DES:
- return ssh1_3des_iv(cc->evp, 0, iv, 24);
-+#endif /* OPENSSL_NO_DES */
- #endif
- default:
- return SSH_ERR_INVALID_ARGUMENT;
-@@ -654,7 +668,9 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv)
- switch (c->number) {
- #ifdef WITH_OPENSSL
- case SSH_CIPHER_SSH2:
-+#ifndef OPENSSL_NO_DES
- case SSH_CIPHER_DES:
-+#endif /* OPENSSL_NO_DES */
- case SSH_CIPHER_BLOWFISH:
- evplen = EVP_CIPHER_CTX_iv_length(cc->evp);
- if (evplen <= 0)
-@@ -675,8 +691,10 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv)
- break;
- #endif
- #ifdef WITH_SSH1
-+#ifndef OPENSSL_NO_DES
- case SSH_CIPHER_3DES:
- return ssh1_3des_iv(cc->evp, 1, (u_char *)iv, 24);
-+#endif /* OPENSSL_NO_DES */
- #endif
- default:
- return SSH_ERR_INVALID_ARGUMENT;
---
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-pkcs11.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-pkcs11.patch
deleted file mode 100644
index 47dc73b..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-pkcs11.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From e816fc06e4f8070b09e677ead4d21768784e4c99 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Thu, 19 Jan 2017 03:21:40 -0500
-Subject: [PATCH 2/3] remove des in pkcs11.
-
-Upstream-Status: Pending
-
-Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- pkcs11.h | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/pkcs11.h b/pkcs11.h
-index b01d58f..98b36e6 100644
---- a/pkcs11.h
-+++ b/pkcs11.h
-@@ -342,9 +342,11 @@ typedef unsigned long ck_key_type_t;
- #define CKK_GENERIC_SECRET (0x10)
- #define CKK_RC2 (0x11)
- #define CKK_RC4 (0x12)
-+#ifndef OPENSSL_NO_DES
- #define CKK_DES (0x13)
- #define CKK_DES2 (0x14)
- #define CKK_DES3 (0x15)
-+#endif /* OPENSSL_NO_DES */
- #define CKK_CAST (0x16)
- #define CKK_CAST3 (0x17)
- #define CKK_CAST128 (0x18)
-@@ -512,6 +514,7 @@ typedef unsigned long ck_mechanism_type_t;
- #define CKM_RC2_CBC_PAD (0x105)
- #define CKM_RC4_KEY_GEN (0x110)
- #define CKM_RC4 (0x111)
-+#ifndef OPENSSL_NO_DES
- #define CKM_DES_KEY_GEN (0x120)
- #define CKM_DES_ECB (0x121)
- #define CKM_DES_CBC (0x122)
-@@ -525,6 +528,7 @@ typedef unsigned long ck_mechanism_type_t;
- #define CKM_DES3_MAC (0x134)
- #define CKM_DES3_MAC_GENERAL (0x135)
- #define CKM_DES3_CBC_PAD (0x136)
-+#endif /* OPENSSL_NO_DES */
- #define CKM_CDMF_KEY_GEN (0x140)
- #define CKM_CDMF_ECB (0x141)
- #define CKM_CDMF_CBC (0x142)
-@@ -610,8 +614,10 @@ typedef unsigned long ck_mechanism_type_t;
- #define CKM_MD5_KEY_DERIVATION (0x390)
- #define CKM_MD2_KEY_DERIVATION (0x391)
- #define CKM_SHA1_KEY_DERIVATION (0x392)
-+#ifndef OPENSSL_NO_DES
- #define CKM_PBE_MD2_DES_CBC (0x3a0)
- #define CKM_PBE_MD5_DES_CBC (0x3a1)
-+#endif /* OPENSSL_NO_DES */
- #define CKM_PBE_MD5_CAST_CBC (0x3a2)
- #define CKM_PBE_MD5_CAST3_CBC (0x3a3)
- #define CKM_PBE_MD5_CAST5_CBC (0x3a4)
-@@ -620,8 +626,10 @@ typedef unsigned long ck_mechanism_type_t;
- #define CKM_PBE_SHA1_CAST128_CBC (0x3a5)
- #define CKM_PBE_SHA1_RC4_128 (0x3a6)
- #define CKM_PBE_SHA1_RC4_40 (0x3a7)
-+#ifndef OPENSSL_NO_DES
- #define CKM_PBE_SHA1_DES3_EDE_CBC (0x3a8)
- #define CKM_PBE_SHA1_DES2_EDE_CBC (0x3a9)
-+#endif /* OPENSSL_NO_DES */
- #define CKM_PBE_SHA1_RC2_128_CBC (0x3aa)
- #define CKM_PBE_SHA1_RC2_40_CBC (0x3ab)
- #define CKM_PKCS5_PBKD2 (0x3b0)
---
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.5p1.bb b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.5p1.bb
deleted file mode 100644
index 86ca6ff..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.5p1.bb
+++ /dev/null
@@ -1,168 +0,0 @@
-SUMMARY = "A suite of security-related network utilities based on \
-the SSH protocol including the ssh client and sshd server"
-DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \
-Ssh (Secure Shell) is a program for logging into a remote machine \
-and for executing commands on a remote machine."
-HOMEPAGE = "http://www.openssh.com/"
-SECTION = "console/network"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENCE;md5=e326045657e842541d3f35aada442507"
-
-# openssl 1.1 patches are proposed at https://github.com/openssh/openssh-portable/pull/48
-DEPENDS = "zlib openssl10"
-DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-
-SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
- file://sshd_config \
- file://ssh_config \
- file://init \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
- file://sshd.socket \
- file://sshd@.service \
- file://sshdgenkeys.service \
- file://volatiles.99_sshd \
- file://add-test-support-for-busybox.patch \
- file://run-ptest \
- file://openssh-7.1p1-conditional-compile-des-in-cipher.patch \
- file://openssh-7.1p1-conditional-compile-des-in-pkcs11.patch \
- file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \
- file://0001-openssh-Fix-syntax-error-on-x32.patch \
- file://sshd_check_keys \
- "
-
-PAM_SRC_URI = "file://sshd"
-
-SRC_URI[md5sum] = "652fdc7d8392f112bef11cacf7e69e23"
-SRC_URI[sha256sum] = "9846e3c5fab9f0547400b4d2c017992f914222b3fd1f8eee6c7dc6bc5e59f9f0"
-
-inherit useradd update-rc.d update-alternatives systemd
-
-USERADD_PACKAGES = "${PN}-sshd"
-USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"
-INITSCRIPT_PACKAGES = "${PN}-sshd"
-INITSCRIPT_NAME_${PN}-sshd = "sshd"
-INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9"
-
-SYSTEMD_PACKAGES = "${PN}-sshd"
-SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"
-
-inherit autotools-brokensep ptest
-
-# LFS support:
-CFLAGS += "-D__FILE_OFFSET_BITS=64"
-
-# login path is hardcoded in sshd
-EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
- --without-zlib-version-check \
- --with-privsep-path=/var/run/sshd \
- --sysconfdir=${sysconfdir}/ssh \
- --with-xauth=/usr/bin/xauth \
- --disable-strip \
- "
-
-# Since we do not depend on libbsd, we do not want configure to use it
-# just because it finds libutil.h. But, specifying --disable-libutil
-# causes compile errors, so...
-CACHED_CONFIGUREVARS += "ac_cv_header_bsd_libutil_h=no ac_cv_header_libutil_h=no"
-
-# passwd path is hardcoded in sshd
-CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd"
-
-# We don't want to depend on libblockfile
-CACHED_CONFIGUREVARS += "ac_cv_header_maillock_h=no"
-
-do_configure_prepend () {
- export LD="${CC}"
- install -m 0644 ${WORKDIR}/sshd_config ${B}/
- install -m 0644 ${WORKDIR}/ssh_config ${B}/
- if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
- cp aclocal.m4 acinclude.m4
- fi
-}
-
-do_compile_ptest() {
- # skip regress/unittests/ binaries: this will silently skip
- # unittests in run-ptests which is good because they are so slow.
- oe_runmake regress/modpipe regress/setuid-allowed regress/netcat
-}
-
-do_install_append () {
- if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
- install -D -m 0644 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
- sed -i -e 's:#UsePAM no:UsePAM yes:' ${D}${sysconfdir}/ssh/sshd_config
- fi
-
- if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
- sed -i -e 's:#X11Forwarding no:X11Forwarding yes:' ${D}${sysconfdir}/ssh/sshd_config
- fi
-
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
- rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin
- rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir}
- install -d ${D}/${sysconfdir}/default/volatiles
- install -m 644 ${WORKDIR}/volatiles.99_sshd ${D}/${sysconfdir}/default/volatiles/99_sshd
- install -m 0755 ${S}/contrib/ssh-copy-id ${D}${bindir}
-
- # Create config files for read-only rootfs
- install -d ${D}${sysconfdir}/ssh
- install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly
- sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly
- echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
- echo "HostKey /var/run/ssh/ssh_host_dsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
- echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
- echo "HostKey /var/run/ssh/ssh_host_ed25519_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
-
- install -d ${D}${systemd_unitdir}/system
- install -c -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_unitdir}/system
- install -c -m 0644 ${WORKDIR}/sshd@.service ${D}${systemd_unitdir}/system
- install -c -m 0644 ${WORKDIR}/sshdgenkeys.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
- -e 's,@SBINDIR@,${sbindir},g' \
- -e 's,@BINDIR@,${bindir},g' \
- -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \
- ${D}${systemd_unitdir}/system/sshd.socket ${D}${systemd_unitdir}/system/*.service
-
- sed -i -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \
- ${D}${sysconfdir}/init.d/sshd
-
- install -D -m 0755 ${WORKDIR}/sshd_check_keys ${D}${libexecdir}/${BPN}/sshd_check_keys
-}
-
-do_install_ptest () {
- sed -i -e "s|^SFTPSERVER=.*|SFTPSERVER=${libexecdir}/sftp-server|" regress/test-exec.sh
- cp -r regress ${D}${PTEST_PATH}
-}
-
-ALLOW_EMPTY_${PN} = "1"
-
-PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server"
-FILES_${PN}-scp = "${bindir}/scp.${BPN}"
-FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config"
-FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_unitdir}/system"
-FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd"
-FILES_${PN}-sshd += "${libexecdir}/${BPN}/sshd_check_keys"
-FILES_${PN}-sftp = "${bindir}/sftp"
-FILES_${PN}-sftp-server = "${libexecdir}/sftp-server"
-FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*"
-FILES_${PN}-keygen = "${bindir}/ssh-keygen"
-
-RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
-RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}"
-RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make"
-
-RPROVIDES_${PN}-ssh = "ssh"
-RPROVIDES_${PN}-sshd = "sshd"
-
-RCONFLICTS_${PN} = "dropbear"
-RCONFLICTS_${PN}-sshd = "dropbear"
-RCONFLICTS_${PN}-keygen = "ssh-keygen"
-
-CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config"
-CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"
-
-ALTERNATIVE_PRIORITY = "90"
-ALTERNATIVE_${PN}-scp = "scp"
-ALTERNATIVE_${PN}-ssh = "ssh"
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.6p1.bb b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.6p1.bb
new file mode 100644
index 0000000..e11e8d7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.6p1.bb
@@ -0,0 +1,167 @@
+SUMMARY = "A suite of security-related network utilities based on \
+the SSH protocol including the ssh client and sshd server"
+DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \
+Ssh (Secure Shell) is a program for logging into a remote machine \
+and for executing commands on a remote machine."
+HOMEPAGE = "http://www.openssh.com/"
+SECTION = "console/network"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=429658c6612f3a9b1293782366ab29d8"
+
+# openssl 1.1 patches are proposed at https://github.com/openssh/openssh-portable/pull/48
+DEPENDS = "zlib openssl10"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
+ file://sshd_config \
+ file://ssh_config \
+ file://init \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+ file://sshd.socket \
+ file://sshd@.service \
+ file://sshdgenkeys.service \
+ file://volatiles.99_sshd \
+ file://run-ptest \
+ file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \
+ file://sshd_check_keys \
+ file://add-test-support-for-busybox.patch \
+ file://disable-ciphers-not-supported-by-OpenSSL-DES.patch \
+ "
+
+PAM_SRC_URI = "file://sshd"
+
+SRC_URI[md5sum] = "06a88699018e5fef13d4655abfed1f63"
+SRC_URI[sha256sum] = "a323caeeddfe145baaa0db16e98d784b1fbc7dd436a6bf1f479dfd5cd1d21723"
+
+inherit useradd update-rc.d update-alternatives systemd
+
+USERADD_PACKAGES = "${PN}-sshd"
+USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"
+INITSCRIPT_PACKAGES = "${PN}-sshd"
+INITSCRIPT_NAME_${PN}-sshd = "sshd"
+INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9"
+
+SYSTEMD_PACKAGES = "${PN}-sshd"
+SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"
+
+inherit autotools-brokensep ptest
+
+# LFS support:
+CFLAGS += "-D__FILE_OFFSET_BITS=64"
+
+EXTRA_AUTORECONF += "--exclude=aclocal"
+
+# login path is hardcoded in sshd
+EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
+ --without-zlib-version-check \
+ --with-privsep-path=/var/run/sshd \
+ --sysconfdir=${sysconfdir}/ssh \
+ --with-xauth=/usr/bin/xauth \
+ --disable-strip \
+ "
+
+# musl doesn't implement wtmp/utmp
+EXTRA_OECONF_append_libc-musl = " --disable-wtmp"
+
+# Since we do not depend on libbsd, we do not want configure to use it
+# just because it finds libutil.h. But, specifying --disable-libutil
+# causes compile errors, so...
+CACHED_CONFIGUREVARS += "ac_cv_header_bsd_libutil_h=no ac_cv_header_libutil_h=no"
+
+# passwd path is hardcoded in sshd
+CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd"
+
+# We don't want to depend on libblockfile
+CACHED_CONFIGUREVARS += "ac_cv_header_maillock_h=no"
+
+do_configure_prepend () {
+ export LD="${CC}"
+ install -m 0644 ${WORKDIR}/sshd_config ${B}/
+ install -m 0644 ${WORKDIR}/ssh_config ${B}/
+}
+
+do_compile_ptest() {
+ # skip regress/unittests/ binaries: this will silently skip
+ # unittests in run-ptests which is good because they are so slow.
+ oe_runmake regress/modpipe regress/setuid-allowed regress/netcat
+}
+
+do_install_append () {
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+ install -D -m 0644 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
+ sed -i -e 's:#UsePAM no:UsePAM yes:' ${D}${sysconfdir}/ssh/sshd_config
+ fi
+
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
+ sed -i -e 's:#X11Forwarding no:X11Forwarding yes:' ${D}${sysconfdir}/ssh/sshd_config
+ fi
+
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
+ rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin
+ rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir}
+ install -d ${D}/${sysconfdir}/default/volatiles
+ install -m 644 ${WORKDIR}/volatiles.99_sshd ${D}/${sysconfdir}/default/volatiles/99_sshd
+ install -m 0755 ${S}/contrib/ssh-copy-id ${D}${bindir}
+
+ # Create config files for read-only rootfs
+ install -d ${D}${sysconfdir}/ssh
+ install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly
+ sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly
+ echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+ echo "HostKey /var/run/ssh/ssh_host_dsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+ echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+ echo "HostKey /var/run/ssh/ssh_host_ed25519_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+
+ install -d ${D}${systemd_unitdir}/system
+ install -c -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_unitdir}/system
+ install -c -m 0644 ${WORKDIR}/sshd@.service ${D}${systemd_unitdir}/system
+ install -c -m 0644 ${WORKDIR}/sshdgenkeys.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ -e 's,@BINDIR@,${bindir},g' \
+ -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \
+ ${D}${systemd_unitdir}/system/sshd.socket ${D}${systemd_unitdir}/system/*.service
+
+ sed -i -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \
+ ${D}${sysconfdir}/init.d/sshd
+
+ install -D -m 0755 ${WORKDIR}/sshd_check_keys ${D}${libexecdir}/${BPN}/sshd_check_keys
+}
+
+do_install_ptest () {
+ sed -i -e "s|^SFTPSERVER=.*|SFTPSERVER=${libexecdir}/sftp-server|" regress/test-exec.sh
+ cp -r regress ${D}${PTEST_PATH}
+}
+
+ALLOW_EMPTY_${PN} = "1"
+
+PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server"
+FILES_${PN}-scp = "${bindir}/scp.${BPN}"
+FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config"
+FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_unitdir}/system"
+FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd"
+FILES_${PN}-sshd += "${libexecdir}/${BPN}/sshd_check_keys"
+FILES_${PN}-sftp = "${bindir}/sftp"
+FILES_${PN}-sftp-server = "${libexecdir}/sftp-server"
+FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*"
+FILES_${PN}-keygen = "${bindir}/ssh-keygen"
+
+RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
+RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}"
+RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make"
+
+RPROVIDES_${PN}-ssh = "ssh"
+RPROVIDES_${PN}-sshd = "sshd"
+
+RCONFLICTS_${PN} = "dropbear"
+RCONFLICTS_${PN}-sshd = "dropbear"
+RCONFLICTS_${PN}-keygen = "ssh-keygen"
+
+CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config"
+CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"
+
+ALTERNATIVE_PRIORITY = "90"
+ALTERNATIVE_${PN}-scp = "scp"
+ALTERNATIVE_${PN}-ssh = "ssh"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/c_rehash-compat.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/c_rehash-compat.patch
deleted file mode 100644
index 68e54d5..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/c_rehash-compat.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 83f318d68bbdab1ca898c94576a838cc97df4700 Mon Sep 17 00:00:00 2001
-From: Ludwig Nussel <ludwig.nussel@suse.de>
-Date: Wed, 21 Apr 2010 15:52:10 +0200
-Subject: [PATCH] also create old hash for compatibility
-
-Upstream-Status: Backport [debian]
-
-diff --git a/tools/c_rehash.in b/tools/c_rehash.in
-index b086ff9..b777d79 100644
---- a/tools/c_rehash.in
-+++ b/tools/c_rehash.in
-@@ -8,8 +8,6 @@ my $prefix;
-
- my $openssl = $ENV{OPENSSL} || "openssl";
- my $pwd;
--my $x509hash = "-subject_hash";
--my $crlhash = "-hash";
- my $verbose = 0;
- my $symlink_exists=eval {symlink("",""); 1};
- my $removelinks = 1;
-@@ -18,10 +16,7 @@ my $removelinks = 1;
- while ( $ARGV[0] =~ /^-/ ) {
- my $flag = shift @ARGV;
- last if ( $flag eq '--');
-- if ( $flag eq '-old') {
-- $x509hash = "-subject_hash_old";
-- $crlhash = "-hash_old";
-- } elsif ( $flag eq '-h') {
-+ if ( $flag eq '-h') {
- help();
- } elsif ( $flag eq '-n' ) {
- $removelinks = 0;
-@@ -113,7 +108,9 @@ sub hash_dir {
- next;
- }
- link_hash_cert($fname) if($cert);
-+ link_hash_cert_old($fname) if($cert);
- link_hash_crl($fname) if($crl);
-+ link_hash_crl_old($fname) if($crl);
- }
- }
-
-@@ -146,6 +143,7 @@ sub check_file {
-
- sub link_hash_cert {
- my $fname = $_[0];
-+ my $x509hash = $_[1] || '-subject_hash';
- $fname =~ s/'/'\\''/g;
- my ($hash, $fprint) = `"$openssl" x509 $x509hash -fingerprint -noout -in "$fname"`;
- chomp $hash;
-@@ -176,11 +174,21 @@ sub link_hash_cert {
- $hashlist{$hash} = $fprint;
- }
-
-+sub link_hash_cert_old {
-+ link_hash_cert($_[0], '-subject_hash_old');
-+}
-+
-+sub link_hash_crl_old {
-+ link_hash_crl($_[0], '-hash_old');
-+}
-+
-+
- # Same as above except for a CRL. CRL links are of the form <hash>.r<n>
-
- sub link_hash_crl {
- my $fname = $_[0];
-+ my $crlhash = $_[1] || "-hash";
- $fname =~ s/'/'\\''/g;
- my ($hash, $fprint) = `"$openssl" crl $crlhash -fingerprint -noout -in '$fname'`;
- chomp $hash;
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/debian-targets.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/debian-targets.patch
deleted file mode 100644
index 39d4328..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/debian-targets.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-Upstream-Status: Backport [debian]
-
-Index: openssl-1.0.2/Configure
-===================================================================
---- openssl-1.0.2.orig/Configure
-+++ openssl-1.0.2/Configure
-@@ -107,6 +107,10 @@ my $gcc_devteam_warn = "-Wall -pedantic
-
- my $clang_disabled_warnings = "-Wno-language-extension-token -Wno-extended-offsetof -Wno-padded -Wno-shorten-64-to-32 -Wno-format-nonliteral -Wno-missing-noreturn -Wno-unused-parameter -Wno-sign-conversion -Wno-unreachable-code -Wno-conversion -Wno-documentation -Wno-missing-variable-declarations -Wno-cast-align -Wno-incompatible-pointer-types-discards-qualifiers -Wno-missing-variable-declarations -Wno-missing-field-initializers -Wno-unused-macros -Wno-disabled-macro-expansion -Wno-conditional-uninitialized -Wno-switch-enum";
-
-+# There are no separate CFLAGS/CPPFLAGS/LDFLAGS, set everything in CFLAGS
-+my $debian_cflags = `dpkg-buildflags --get CFLAGS` . `dpkg-buildflags --get CPPFLAGS` . `dpkg-buildflags --get LDFLAGS` . "-Wa,--noexecstack -Wall";
-+$debian_cflags =~ s/\n/ /g;
-+
- my $strict_warnings = 0;
-
- my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL";
-@@ -343,6 +347,55 @@ my %table=(
- "osf1-alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so",
- "tru64-alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared::-msym:.so",
-
-+# Debian GNU/* (various architectures)
-+"debian-alpha","gcc:-DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-alpha-ev4","gcc:-DTERMIO ${debian_cflags} -mcpu=ev4::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-alpha-ev5","gcc:-DTERMIO ${debian_cflags} -mcpu=ev5::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-arm64","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-armel","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-armhf","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-amd64", "gcc:-m64 -DL_ENDIAN -DTERMIO ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::",
-+"debian-avr32", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -fomit-frame-pointer::-D_REENTRANT::-ldl:BN_LLONG_BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -march=i486::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-hppa","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-hurd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mtune=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-ia64","gcc:-DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-i386","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-i386-i486","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i486::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-i386-i586","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i586::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-i386-i686/cmov","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i686::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-m68k","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mips", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mipsel", "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mipsn32", "mips64-linux-gnuabin32-gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mipsn32el", "mips64el-linux-gnuabin32-gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mips64", "mips64-linux-gnuabi64-gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mips64el", "mips64el-linux-gnuabi64-gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-netbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-netbsd-m68k", "gcc:-DB_ENDIAN -DTERMIOS ${debian_cflags}::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-netbsd-sparc", "gcc:-DB_ENDIAN -DTERMIOS ${debian_cflags} -mv8::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-openbsd-alpha","gcc:-DTERMIOS ${debian_cflags}::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-openbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-openbsd-mips","gcc:-DL_ENDIAN ${debian_cflags}::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-or1k", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-powerpc","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-powerpcspe","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-ppc64","gcc:-m64 -DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-ppc64el","gcc:-m64 -DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64le:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-s390","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-s390x","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sh3", "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sh4", "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sh3eb", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sh4eb", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-m32r","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sparc","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sparc-v8","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -mcpu=v8 -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sparc-v9","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -mcpu=v9 -Wa,-Av8plus -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sparc64","gcc:-m64 -DB_ENDIAN -DTERMIO ${debian_cflags} -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-x32","gcc:-mx32 -DL_ENDIAN -DTERMIO ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::x32",
-+
- ####
- #### Variety of LINUX:-)
- ####
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-1.0.2a-x32-asm.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-1.0.2a-x32-asm.patch
deleted file mode 100644
index 1e5bfa1..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-1.0.2a-x32-asm.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-https://rt.openssl.org/Ticket/Display.html?id=3759&user=guest&pass=guest
-
-From 6257d59b3a68d2feb9d64317a1c556dc3813ee61 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sat, 21 Mar 2015 06:01:25 -0400
-Subject: [PATCH] crypto: use bigint in x86-64 perl
-
-Upstream-Status: Pending
-Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
-
-When building on x32 systems where the default type is 32bit, make sure
-we can transparently represent 64bit integers. Otherwise we end up with
-build errors like:
-/usr/bin/perl asm/ghash-x86_64.pl elf > ghash-x86_64.s
-Integer overflow in hexadecimal number at asm/../../perlasm/x86_64-xlate.pl line 201, <> line 890.
-...
-ghash-x86_64.s: Assembler messages:
-ghash-x86_64.s:890: Error: junk '.15473355479995e+19' after expression
-
-We don't enable this globally as there are some cases where we'd get
-32bit values interpreted as unsigned when we need them as signed.
-
-Reported-by: Bertrand Jacquin <bertrand@jacquin.bzh>
-URL: https://bugs.gentoo.org/542618
----
- crypto/perlasm/x86_64-xlate.pl | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl
-index aae8288..0bf9774 100755
---- a/crypto/perlasm/x86_64-xlate.pl
-+++ b/crypto/perlasm/x86_64-xlate.pl
-@@ -195,6 +195,10 @@ my %globals;
- sub out {
- my $self = shift;
-
-+ # When building on x32 ABIs, the expanded hex value might be too
-+ # big to fit into 32bits. Enable transparent 64bit support here
-+ # so we can safely print it out.
-+ use bigint;
- if ($gas) {
- # Solaris /usr/ccs/bin/as can't handle multiplications
- # in $self->{value}
---
-2.3.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/0001-Fix-build-with-clang-using-external-assembler.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/0001-Fix-build-with-clang-using-external-assembler.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/0001-Fix-build-with-clang-using-external-assembler.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/0001-Fix-build-with-clang-using-external-assembler.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/0001-openssl-force-soft-link-to-avoid-rare-race.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/0001-openssl-force-soft-link-to-avoid-rare-race.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/0001-openssl-force-soft-link-to-avoid-rare-race.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/0001-openssl-force-soft-link-to-avoid-rare-race.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/Makefiles-ptest.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/Makefiles-ptest.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/Makefiles-ptest.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/Makefiles-ptest.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/Use-SHA256-not-MD5-as-default-digest.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/Use-SHA256-not-MD5-as-default-digest.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/Use-SHA256-not-MD5-as-default-digest.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/Use-SHA256-not-MD5-as-default-digest.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/configure-musl-target.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/configure-musl-target.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/configure-musl-target.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/configure-musl-target.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/configure-targets.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/configure-targets.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/configure-targets.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/configure-targets.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/c_rehash-compat.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/c_rehash-compat.patch
new file mode 100644
index 0000000..3820e3e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/c_rehash-compat.patch
@@ -0,0 +1,71 @@
+From 83f318d68bbdab1ca898c94576a838cc97df4700 Mon Sep 17 00:00:00 2001
+From: Ludwig Nussel <ludwig.nussel@suse.de>
+Date: Wed, 21 Apr 2010 15:52:10 +0200
+Subject: [PATCH] also create old hash for compatibility
+
+Upstream-Status: Backport [debian]
+
+Index: openssl-1.0.2n/tools/c_rehash.in
+===================================================================
+--- openssl-1.0.2n.orig/tools/c_rehash.in
++++ openssl-1.0.2n/tools/c_rehash.in
+@@ -8,8 +8,6 @@ my $prefix;
+
+ my $openssl = $ENV{OPENSSL} || "openssl";
+ my $pwd;
+-my $x509hash = "-subject_hash";
+-my $crlhash = "-hash";
+ my $verbose = 0;
+ my $symlink_exists=eval {symlink("",""); 1};
+ my $removelinks = 1;
+@@ -18,10 +16,7 @@ my $removelinks = 1;
+ while ( $ARGV[0] =~ /^-/ ) {
+ my $flag = shift @ARGV;
+ last if ( $flag eq '--');
+- if ( $flag eq '-old') {
+- $x509hash = "-subject_hash_old";
+- $crlhash = "-hash_old";
+- } elsif ( $flag eq '-h') {
++ if ( $flag eq '-h') {
+ help();
+ } elsif ( $flag eq '-n' ) {
+ $removelinks = 0;
+@@ -113,7 +108,9 @@ sub hash_dir {
+ next;
+ }
+ link_hash_cert($fname) if($cert);
++ link_hash_cert_old($fname) if($cert);
+ link_hash_crl($fname) if($crl);
++ link_hash_crl_old($fname) if($crl);
+ }
+ }
+
+@@ -146,6 +143,7 @@ sub check_file {
+
+ sub link_hash_cert {
+ my $fname = $_[0];
++ my $x509hash = $_[1] || '-subject_hash';
+ $fname =~ s/'/'\\''/g;
+ my ($hash, $fprint) = `"$openssl" x509 $x509hash -fingerprint -noout -in "$fname"`;
+ chomp $hash;
+@@ -177,10 +175,20 @@ sub link_hash_cert {
+ $hashlist{$hash} = $fprint;
+ }
+
++sub link_hash_cert_old {
++ link_hash_cert($_[0], '-subject_hash_old');
++}
++
++sub link_hash_crl_old {
++ link_hash_crl($_[0], '-hash_old');
++}
++
++
+ # Same as above except for a CRL. CRL links are of the form <hash>.r<n>
+
+ sub link_hash_crl {
+ my $fname = $_[0];
++ my $crlhash = $_[1] || "-hash";
+ $fname =~ s/'/'\\''/g;
+ my ($hash, $fprint) = `"$openssl" crl $crlhash -fingerprint -noout -in '$fname'`;
+ chomp $hash;
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/ca.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/ca.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/ca.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/ca.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/debian-targets.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/debian-targets.patch
new file mode 100644
index 0000000..35d92be
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/debian-targets.patch
@@ -0,0 +1,73 @@
+Upstream-Status: Backport [debian]
+
+Index: openssl-1.0.2n/Configure
+===================================================================
+--- openssl-1.0.2n.orig/Configure
++++ openssl-1.0.2n/Configure
+@@ -133,6 +133,10 @@ my $clang_devteam_warn = "-Wno-unused-pa
+ # Warn that "make depend" should be run?
+ my $warn_make_depend = 0;
+
++# There are no separate CFLAGS/CPPFLAGS/LDFLAGS, set everything in CFLAGS
++my $debian_cflags = `dpkg-buildflags --get CFLAGS` . `dpkg-buildflags --get CPPFLAGS` . `dpkg-buildflags --get LDFLAGS` . "-Wa,--noexecstack -Wall";
++$debian_cflags =~ s/\n/ /g;
++
+ my $strict_warnings = 0;
+
+ my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL";
+@@ -369,6 +373,55 @@ my %table=(
+ "osf1-alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so",
+ "tru64-alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared::-msym:.so",
+
++# Debian GNU/* (various architectures)
++"debian-alpha","gcc:-DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-alpha-ev4","gcc:-DTERMIO ${debian_cflags} -mcpu=ev4::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-alpha-ev5","gcc:-DTERMIO ${debian_cflags} -mcpu=ev5::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-arm64","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-armel","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-armhf","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-amd64", "gcc:-m64 -DL_ENDIAN -DTERMIO ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::",
++"debian-avr32", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -fomit-frame-pointer::-D_REENTRANT::-ldl:BN_LLONG_BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -march=i486::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-hppa","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-hurd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mtune=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-ia64","gcc:-DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-i386","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-i386-i486","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i486::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-i386-i586","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i586::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-i386-i686/cmov","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i686::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-m68k","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mips", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mipsel", "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mipsn32", "mips64-linux-gnuabin32-gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mipsn32el", "mips64el-linux-gnuabin32-gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mips64", "mips64-linux-gnuabi64-gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mips64el", "mips64el-linux-gnuabi64-gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-netbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-netbsd-m68k", "gcc:-DB_ENDIAN -DTERMIOS ${debian_cflags}::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-netbsd-sparc", "gcc:-DB_ENDIAN -DTERMIOS ${debian_cflags} -mv8::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-openbsd-alpha","gcc:-DTERMIOS ${debian_cflags}::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-openbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-openbsd-mips","gcc:-DL_ENDIAN ${debian_cflags}::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-or1k", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-powerpc","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-powerpcspe","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-ppc64","gcc:-m64 -DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-ppc64el","gcc:-m64 -DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64le:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-s390","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-s390x","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sh3", "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sh4", "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sh3eb", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sh4eb", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-m32r","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sparc","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sparc-v8","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -mcpu=v8 -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sparc-v9","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -mcpu=v9 -Wa,-Av8plus -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sparc64","gcc:-m64 -DB_ENDIAN -DTERMIO ${debian_cflags} -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-x32","gcc:-mx32 -DL_ENDIAN -DTERMIO ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::x32",
++
+ ####
+ #### Variety of LINUX:-)
+ ####
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/man-dir.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/man-dir.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/man-dir.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/man-dir.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/man-section.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/man-section.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/man-section.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/man-section.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/no-rpath.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/no-rpath.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/no-rpath.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/no-rpath.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/no-symbolic.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/no-symbolic.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/no-symbolic.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/no-symbolic.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/pic.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/pic.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/pic.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/pic.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian1.0.2/block_digicert_malaysia.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian1.0.2/block_digicert_malaysia.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian1.0.2/block_digicert_malaysia.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian1.0.2/block_digicert_malaysia.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian1.0.2/block_diginotar.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian1.0.2/block_diginotar.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian1.0.2/block_diginotar.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian1.0.2/block_diginotar.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian1.0.2/soname.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian1.0.2/soname.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian1.0.2/soname.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian1.0.2/soname.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian1.0.2/version-script.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian1.0.2/version-script.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian1.0.2/version-script.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian1.0.2/version-script.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/engines-install-in-libdir-ssl.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/engines-install-in-libdir-ssl.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/engines-install-in-libdir-ssl.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/engines-install-in-libdir-ssl.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/find.pl b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/find.pl
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/find.pl
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/find.pl
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/oe-ldflags.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/oe-ldflags.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/oe-ldflags.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/oe-ldflags.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-c_rehash.sh b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/openssl-c_rehash.sh
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-c_rehash.sh
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/openssl-c_rehash.sh
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-fix-des.pod-error.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/openssl-fix-des.pod-error.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-fix-des.pod-error.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/openssl-fix-des.pod-error.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-util-perlpath.pl-cwd.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/openssl-util-perlpath.pl-cwd.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-util-perlpath.pl-cwd.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/openssl-util-perlpath.pl-cwd.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl_fix_for_x32.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/openssl_fix_for_x32.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl_fix_for_x32.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/openssl_fix_for_x32.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/parallel.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/parallel.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/parallel.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/parallel.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/ptest-deps.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/ptest-deps.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/ptest-deps.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/ptest-deps.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/ptest_makefile_deps.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/ptest_makefile_deps.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/ptest_makefile_deps.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/ptest_makefile_deps.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-cflags.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/reproducible-cflags.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-cflags.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/reproducible-cflags.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-mkbuildinf.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/reproducible-mkbuildinf.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-mkbuildinf.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/reproducible-mkbuildinf.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/run-ptest b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/run-ptest
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/run-ptest
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/run-ptest
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/shared-libs.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/shared-libs.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/shared-libs.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/shared-libs.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/0001-Remove-test-that-requires-running-as-non-root.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/0001-Remove-test-that-requires-running-as-non-root.patch
deleted file mode 100644
index 736bb39..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/0001-Remove-test-that-requires-running-as-non-root.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 3fdb1e2a16ea405c6731447a8994f222808ef7e6 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 7 Apr 2017 18:01:52 +0300
-Subject: [PATCH] Remove test that requires running as non-root
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- test/recipes/40-test_rehash.t | 17 +----------------
- 1 file changed, 1 insertion(+), 16 deletions(-)
-
-diff --git a/test/recipes/40-test_rehash.t b/test/recipes/40-test_rehash.t
-index f902c23..c7567c1 100644
---- a/test/recipes/40-test_rehash.t
-+++ b/test/recipes/40-test_rehash.t
-@@ -23,7 +23,7 @@ setup("test_rehash");
- plan skip_all => "test_rehash is not available on this platform"
- unless run(app(["openssl", "rehash", "-help"]));
-
--plan tests => 5;
-+plan tests => 3;
-
- indir "rehash.$$" => sub {
- prepare();
-@@ -42,21 +42,6 @@ indir "rehash.$$" => sub {
- 'Testing rehash operations on empty directory');
- }, create => 1, cleanup => 1;
-
--indir "rehash.$$" => sub {
-- prepare();
-- chmod 0500, curdir();
-- SKIP: {
-- if (!ok(!open(FOO, ">unwritable.txt"),
-- "Testing that we aren't running as a privileged user, such as root")) {
-- close FOO;
-- skip "It's pointless to run the next test as root", 1;
-- }
-- isnt(run(app(["openssl", "rehash", curdir()])), 1,
-- 'Testing rehash operations on readonly directory');
-- }
-- chmod 0700, curdir(); # make it writable again, so cleanup works
--}, create => 1, cleanup => 1;
--
- sub prepare {
- my @pemsourcefiles = sort glob(srctop_file('test', "*.pem"));
- my @destfiles = ();
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch
deleted file mode 100644
index bb0a168..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From bcc096a50811bf0f0c4fd34b2993fed7a7015972 Mon Sep 17 00:00:00 2001
-From: Andy Polyakov <appro@openssl.org>
-Date: Fri, 3 Nov 2017 23:30:01 +0100
-Subject: [PATCH] aes/asm/{aes-armv4|bsaes-armv7}.pl: make it work with
- binutils-2.29.
-
-It's not clear if it's a feature or bug, but binutils-2.29[.1]
-interprets 'adr' instruction with Thumb2 code reference differently,
-in a way that affects calculation of addresses of constants' tables.
-
-Upstream-Status: Backport
-
-Reviewed-by: Tim Hudson <tjh@openssl.org>
-Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
-Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
-(Merged from https://github.com/openssl/openssl/pull/4669)
-
-(cherry picked from commit b82acc3c1a7f304c9df31841753a0fa76b5b3cda)
----
- crypto/aes/asm/aes-armv4.pl | 6 +++---
- crypto/aes/asm/bsaes-armv7.pl | 6 +++---
- 2 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/crypto/aes/asm/aes-armv4.pl b/crypto/aes/asm/aes-armv4.pl
-index 16d79aae53..c6474b8aad 100644
---- a/crypto/aes/asm/aes-armv4.pl
-+++ b/crypto/aes/asm/aes-armv4.pl
-@@ -200,7 +200,7 @@ AES_encrypt:
- #ifndef __thumb2__
- sub r3,pc,#8 @ AES_encrypt
- #else
-- adr r3,AES_encrypt
-+ adr r3,.
- #endif
- stmdb sp!,{r1,r4-r12,lr}
- #ifdef __APPLE__
-@@ -450,7 +450,7 @@ _armv4_AES_set_encrypt_key:
- #ifndef __thumb2__
- sub r3,pc,#8 @ AES_set_encrypt_key
- #else
-- adr r3,AES_set_encrypt_key
-+ adr r3,.
- #endif
- teq r0,#0
- #ifdef __thumb2__
-@@ -976,7 +976,7 @@ AES_decrypt:
- #ifndef __thumb2__
- sub r3,pc,#8 @ AES_decrypt
- #else
-- adr r3,AES_decrypt
-+ adr r3,.
- #endif
- stmdb sp!,{r1,r4-r12,lr}
- #ifdef __APPLE__
-diff --git a/crypto/aes/asm/bsaes-armv7.pl b/crypto/aes/asm/bsaes-armv7.pl
-index 9f288660ef..a27bb4a179 100644
---- a/crypto/aes/asm/bsaes-armv7.pl
-+++ b/crypto/aes/asm/bsaes-armv7.pl
-@@ -744,7 +744,7 @@ $code.=<<___;
- .type _bsaes_decrypt8,%function
- .align 4
- _bsaes_decrypt8:
-- adr $const,_bsaes_decrypt8
-+ adr $const,.
- vldmia $key!, {@XMM[9]} @ round 0 key
- #ifdef __APPLE__
- adr $const,.LM0ISR
-@@ -843,7 +843,7 @@ _bsaes_const:
- .type _bsaes_encrypt8,%function
- .align 4
- _bsaes_encrypt8:
-- adr $const,_bsaes_encrypt8
-+ adr $const,.
- vldmia $key!, {@XMM[9]} @ round 0 key
- #ifdef __APPLE__
- adr $const,.LM0SR
-@@ -951,7 +951,7 @@ $code.=<<___;
- .type _bsaes_key_convert,%function
- .align 4
- _bsaes_key_convert:
-- adr $const,_bsaes_key_convert
-+ adr $const,.
- vld1.8 {@XMM[7]}, [$inp]! @ load round 0 key
- #ifdef __APPLE__
- adr $const,.LM0
---
-2.15.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl10.inc b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl10.inc
index 9335b0b..645d64e 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl10.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl10.inc
@@ -25,7 +25,7 @@
TERMIO ?= "-DTERMIO"
# Avoid binaries being marked as requiring an executable stack since it
# doesn't(which causes and this causes issues with SELinux
-CFLAG = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
+CFLAG = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
${TERMIO} ${CFLAGS} -Wall -Wa,--noexecstack"
export DIRS = "crypto ssl apps"
@@ -135,6 +135,12 @@
linux-powerpc64)
target=linux-ppc64
;;
+ linux-riscv64)
+ target=linux-generic64
+ ;;
+ linux-riscv32)
+ target=linux-generic32
+ ;;
linux-supersparc)
target=linux-sparcv8
;;
@@ -151,7 +157,8 @@
if [ "x$useprefix" = "x" ]; then
useprefix=/
fi
- perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl --libdir=`basename ${libdir}` $target
+ libdirleaf="$(echo ${libdir} | sed s:$useprefix::)"
+ perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl --libdir=${libdirleaf} $target
}
do_compile_prepend_class-target () {
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2n.bb b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2n.bb
deleted file mode 100644
index f07289d..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2n.bb
+++ /dev/null
@@ -1,65 +0,0 @@
-require openssl10.inc
-
-# For target side versions of openssl enable support for OCF Linux driver
-# if they are available.
-
-CFLAG += "-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS"
-CFLAG_append_class-native = " -fPIC"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=057d9218c6180e1d9ee407572b2dd225"
-
-export DIRS = "crypto ssl apps engines"
-export OE_LDFLAGS="${LDFLAGS}"
-
-SRC_URI += "file://find.pl;subdir=openssl-${PV}/util/ \
- file://run-ptest \
- file://openssl-c_rehash.sh \
- file://configure-targets.patch \
- file://shared-libs.patch \
- file://oe-ldflags.patch \
- file://engines-install-in-libdir-ssl.patch \
- file://debian1.0.2/block_diginotar.patch \
- file://debian1.0.2/block_digicert_malaysia.patch \
- file://debian/ca.patch \
- file://debian/c_rehash-compat.patch \
- file://debian/debian-targets.patch \
- file://debian/man-dir.patch \
- file://debian/man-section.patch \
- file://debian/no-rpath.patch \
- file://debian/no-symbolic.patch \
- file://debian/pic.patch \
- file://debian1.0.2/version-script.patch \
- file://debian1.0.2/soname.patch \
- file://openssl_fix_for_x32.patch \
- file://openssl-fix-des.pod-error.patch \
- file://Makefiles-ptest.patch \
- file://ptest-deps.patch \
- file://openssl-1.0.2a-x32-asm.patch \
- file://ptest_makefile_deps.patch \
- file://configure-musl-target.patch \
- file://parallel.patch \
- file://openssl-util-perlpath.pl-cwd.patch \
- file://Use-SHA256-not-MD5-as-default-digest.patch \
- file://0001-Fix-build-with-clang-using-external-assembler.patch \
- file://0001-openssl-force-soft-link-to-avoid-rare-race.patch \
- "
-
-SRC_URI_append_class-target = "\
- file://reproducible-cflags.patch \
- file://reproducible-mkbuildinf.patch \
- "
-SRC_URI[md5sum] = "13bdc1b1d1ff39b6fd42a255e74676a4"
-SRC_URI[sha256sum] = "370babb75f278c39e0c50e8c4e7493bc0f18db6867478341a832a982fd15a8fe"
-
-PACKAGES =+ "${PN}-engines"
-FILES_${PN}-engines = "${libdir}/ssl/engines/*.so ${libdir}/engines"
-
-# The crypto_use_bigint patch means that perl's bignum module needs to be
-# installed, but some distributions (for example Fedora 23) don't ship it by
-# default. As the resulting error is very misleading check for bignum before
-# building.
-do_configure_prepend() {
- if ! perl -Mbigint -e true; then
- bbfatal "The perl module 'bignum' was not found but this is required to build openssl. Please install this module (often packaged as perl-bignum) and re-run bitbake."
- fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb
new file mode 100644
index 0000000..413ebf3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb
@@ -0,0 +1,64 @@
+require openssl10.inc
+
+# For target side versions of openssl enable support for OCF Linux driver
+# if they are available.
+
+CFLAG += "-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS"
+CFLAG_append_class-native = " -fPIC"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f475368924827d06d4b416111c8bdb77"
+
+export DIRS = "crypto ssl apps engines"
+export OE_LDFLAGS="${LDFLAGS}"
+
+SRC_URI += "file://find.pl;subdir=openssl-${PV}/util/ \
+ file://run-ptest \
+ file://openssl-c_rehash.sh \
+ file://configure-targets.patch \
+ file://shared-libs.patch \
+ file://oe-ldflags.patch \
+ file://engines-install-in-libdir-ssl.patch \
+ file://debian1.0.2/block_diginotar.patch \
+ file://debian1.0.2/block_digicert_malaysia.patch \
+ file://debian/ca.patch \
+ file://debian/c_rehash-compat.patch \
+ file://debian/debian-targets.patch \
+ file://debian/man-dir.patch \
+ file://debian/man-section.patch \
+ file://debian/no-rpath.patch \
+ file://debian/no-symbolic.patch \
+ file://debian/pic.patch \
+ file://debian1.0.2/version-script.patch \
+ file://debian1.0.2/soname.patch \
+ file://openssl_fix_for_x32.patch \
+ file://openssl-fix-des.pod-error.patch \
+ file://Makefiles-ptest.patch \
+ file://ptest-deps.patch \
+ file://ptest_makefile_deps.patch \
+ file://configure-musl-target.patch \
+ file://parallel.patch \
+ file://openssl-util-perlpath.pl-cwd.patch \
+ file://Use-SHA256-not-MD5-as-default-digest.patch \
+ file://0001-Fix-build-with-clang-using-external-assembler.patch \
+ file://0001-openssl-force-soft-link-to-avoid-rare-race.patch \
+ "
+
+SRC_URI_append_class-target = "\
+ file://reproducible-cflags.patch \
+ file://reproducible-mkbuildinf.patch \
+ "
+SRC_URI[md5sum] = "44279b8557c3247cbe324e2322ecd114"
+SRC_URI[sha256sum] = "ec3f5c9714ba0fd45cb4e087301eb1336c317e0d20b575a125050470e8089e4d"
+
+PACKAGES =+ "${PN}-engines"
+FILES_${PN}-engines = "${libdir}/ssl/engines/*.so ${libdir}/engines"
+
+# The crypto_use_bigint patch means that perl's bignum module needs to be
+# installed, but some distributions (for example Fedora 23) don't ship it by
+# default. As the resulting error is very misleading check for bignum before
+# building.
+do_configure_prepend() {
+ if ! perl -Mbigint -e true; then
+ bbfatal "The perl module 'bignum' was not found but this is required to build openssl. Please install this module (often packaged as perl-bignum) and re-run bitbake."
+ fi
+}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.1.0g.bb b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.1.0g.bb
deleted file mode 100644
index 1649bff..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.1.0g.bb
+++ /dev/null
@@ -1,156 +0,0 @@
-SUMMARY = "Secure Socket Layer"
-DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools."
-HOMEPAGE = "http://www.openssl.org/"
-BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html"
-SECTION = "libs/network"
-
-# "openssl | SSLeay" dual license
-LICENSE = "openssl"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=cae6da10f4ffd9703214776d2aabce32"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "ba5f1b8b835b88cadbce9b35ed9531a6"
-SRC_URI[sha256sum] = "de4d501267da39310905cb6dc8c6121f7a2cad45a7707f76df828fe1b85073af"
-
-SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
- file://run-ptest \
- file://openssl-c_rehash.sh \
- file://0001-Take-linking-flags-from-LDFLAGS-env-var.patch \
- file://0001-Remove-test-that-requires-running-as-non-root.patch \
- file://0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch \
- "
-
-S = "${WORKDIR}/openssl-${PV}"
-
-inherit lib_package multilib_header ptest
-
-do_configure () {
- os=${HOST_OS}
- case $os in
- linux-uclibc |\
- linux-uclibceabi |\
- linux-gnueabi |\
- linux-uclibcspe |\
- linux-gnuspe |\
- linux-musl*)
- os=linux
- ;;
- *)
- ;;
- esac
- target="$os-${HOST_ARCH}"
- case $target in
- linux-arm)
- target=linux-armv4
- ;;
- linux-armeb)
- target=linux-armv4
- ;;
- linux-aarch64*)
- target=linux-aarch64
- ;;
- linux-sh3)
- target=linux-generic32
- ;;
- linux-sh4)
- target=linux-generic32
- ;;
- linux-i486)
- target=linux-elf
- ;;
- linux-i586 | linux-viac3)
- target=linux-elf
- ;;
- linux-i686)
- target=linux-elf
- ;;
- linux-gnux32-x86_64)
- target=linux-x32
- ;;
- linux-gnu64-x86_64)
- target=linux-x86_64
- ;;
- linux-mips)
- # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags
- target="linux-mips32 ${TARGET_CC_ARCH}"
- ;;
- linux-mipsel)
- target="linux-mips32 ${TARGET_CC_ARCH}"
- ;;
- linux-gnun32-mips*)
- target=linux-mips64
- ;;
- linux-*-mips64 | linux-mips64)
- target=linux64-mips64
- ;;
- linux-*-mips64el | linux-mips64el)
- target=linux64-mips64
- ;;
- linux-microblaze*|linux-nios2*)
- target=linux-generic32
- ;;
- linux-powerpc)
- target=linux-ppc
- ;;
- linux-powerpc64)
- target=linux-ppc64
- ;;
- linux-supersparc)
- target=linux-sparcv9
- ;;
- linux-sparc)
- target=linux-sparcv9
- ;;
- darwin-i386)
- target=darwin-i386-cc
- ;;
- esac
- useprefix=${prefix}
- if [ "x$useprefix" = "x" ]; then
- useprefix=/
- fi
- perl ./Configure ${EXTRA_OECONF} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=`basename ${libdir}` $target
-}
-
-#| engines/afalg/e_afalg.c: In function 'eventfd':
-#| engines/afalg/e_afalg.c:110:20: error: '__NR_eventfd' undeclared (first use in this function)
-#| return syscall(__NR_eventfd, n);
-#| ^~~~~~~~~~~~
-EXTRA_OECONF_aarch64 += "no-afalgeng"
-
-#| ./libcrypto.so: undefined reference to `getcontext'
-#| ./libcrypto.so: undefined reference to `setcontext'
-#| ./libcrypto.so: undefined reference to `makecontext'
-EXTRA_OECONF_libc-musl += "-DOPENSSL_NO_ASYNC"
-
-do_install () {
- oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install
- oe_multilib_header openssl/opensslconf.h
-}
-
-do_install_append_class-native () {
- # Install a custom version of c_rehash that can handle sysroots properly.
- # This version is used for example when installing ca-certificates during
- # image creation.
- install -Dm 0755 ${WORKDIR}/openssl-c_rehash.sh ${D}${bindir}/c_rehash
- sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash
-}
-
-do_install_ptest() {
- cp -r * ${D}${PTEST_PATH}
-
- # Putting .so files in ptest package will mess up the dependencies of the main openssl package
- # so we rename them to .so.ptest and patch the test accordingly
- mv ${D}${PTEST_PATH}/libcrypto.so ${D}${PTEST_PATH}/libcrypto.so.ptest
- mv ${D}${PTEST_PATH}/libssl.so ${D}${PTEST_PATH}/libssl.so.ptest
- sed -i 's/$target{shared_extension_simple}/".so.ptest"/' ${D}${PTEST_PATH}/test/recipes/90-test_shlibload.t
-}
-
-RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python"
-
-FILES_${PN} =+ " ${libdir}/ssl-1.1/*"
-
-PACKAGES =+ "${PN}-engines"
-FILES_${PN}-engines = "${libdir}/engines-1.1"
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb
new file mode 100644
index 0000000..94b75eb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb
@@ -0,0 +1,161 @@
+SUMMARY = "Secure Socket Layer"
+DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools."
+HOMEPAGE = "http://www.openssl.org/"
+BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html"
+SECTION = "libs/network"
+
+# "openssl | SSLeay" dual license
+LICENSE = "openssl"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d57d511030c9d66ef5f5966bee5a7eff"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI[md5sum] = "5271477e4d93f4ea032b665ef095ff24"
+SRC_URI[sha256sum] = "5835626cde9e99656585fc7aaa2302a73a7e1340bf8c14fd635a62c66802a517"
+
+SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
+ file://run-ptest \
+ file://openssl-c_rehash.sh \
+ file://0001-Take-linking-flags-from-LDFLAGS-env-var.patch \
+ "
+
+S = "${WORKDIR}/openssl-${PV}"
+
+inherit lib_package multilib_header ptest
+
+do_configure () {
+ os=${HOST_OS}
+ case $os in
+ linux-uclibc |\
+ linux-uclibceabi |\
+ linux-gnueabi |\
+ linux-uclibcspe |\
+ linux-gnuspe |\
+ linux-musl*)
+ os=linux
+ ;;
+ *)
+ ;;
+ esac
+ target="$os-${HOST_ARCH}"
+ case $target in
+ linux-arm)
+ target=linux-armv4
+ ;;
+ linux-armeb)
+ target=linux-armv4
+ ;;
+ linux-aarch64*)
+ target=linux-aarch64
+ ;;
+ linux-sh3)
+ target=linux-generic32
+ ;;
+ linux-sh4)
+ target=linux-generic32
+ ;;
+ linux-i486)
+ target=linux-elf
+ ;;
+ linux-i586 | linux-viac3)
+ target=linux-elf
+ ;;
+ linux-i686)
+ target=linux-elf
+ ;;
+ linux-gnux32-x86_64)
+ target=linux-x32
+ ;;
+ linux-gnu64-x86_64)
+ target=linux-x86_64
+ ;;
+ linux-mips)
+ # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags
+ target="linux-mips32 ${TARGET_CC_ARCH}"
+ ;;
+ linux-mipsel)
+ target="linux-mips32 ${TARGET_CC_ARCH}"
+ ;;
+ linux-gnun32-mips*)
+ target=linux-mips64
+ ;;
+ linux-*-mips64 | linux-mips64)
+ target=linux64-mips64
+ ;;
+ linux-*-mips64el | linux-mips64el)
+ target=linux64-mips64
+ ;;
+ linux-microblaze*|linux-nios2*)
+ target=linux-generic32
+ ;;
+ linux-powerpc)
+ target=linux-ppc
+ ;;
+ linux-powerpc64)
+ target=linux-ppc64
+ ;;
+ linux-riscv64)
+ target=linux-generic64
+ ;;
+ linux-riscv32)
+ target=linux-generic32
+ ;;
+ linux-supersparc)
+ target=linux-sparcv9
+ ;;
+ linux-sparc)
+ target=linux-sparcv9
+ ;;
+ darwin-i386)
+ target=darwin-i386-cc
+ ;;
+ esac
+ useprefix=${prefix}
+ if [ "x$useprefix" = "x" ]; then
+ useprefix=/
+ fi
+ libdirleaf="$(echo ${libdir} | sed s:$useprefix::)"
+ perl ./Configure ${EXTRA_OECONF} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdirleaf} $target
+}
+
+#| engines/afalg/e_afalg.c: In function 'eventfd':
+#| engines/afalg/e_afalg.c:110:20: error: '__NR_eventfd' undeclared (first use in this function)
+#| return syscall(__NR_eventfd, n);
+#| ^~~~~~~~~~~~
+EXTRA_OECONF_aarch64 += "no-afalgeng"
+
+#| ./libcrypto.so: undefined reference to `getcontext'
+#| ./libcrypto.so: undefined reference to `setcontext'
+#| ./libcrypto.so: undefined reference to `makecontext'
+EXTRA_OECONF_libc-musl += "-DOPENSSL_NO_ASYNC"
+
+do_install () {
+ oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install
+ oe_multilib_header openssl/opensslconf.h
+}
+
+do_install_append_class-native () {
+ # Install a custom version of c_rehash that can handle sysroots properly.
+ # This version is used for example when installing ca-certificates during
+ # image creation.
+ install -Dm 0755 ${WORKDIR}/openssl-c_rehash.sh ${D}${bindir}/c_rehash
+ sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash
+}
+
+do_install_ptest() {
+ cp -r * ${D}${PTEST_PATH}
+
+ # Putting .so files in ptest package will mess up the dependencies of the main openssl package
+ # so we rename them to .so.ptest and patch the test accordingly
+ mv ${D}${PTEST_PATH}/libcrypto.so ${D}${PTEST_PATH}/libcrypto.so.ptest
+ mv ${D}${PTEST_PATH}/libssl.so ${D}${PTEST_PATH}/libssl.so.ptest
+ sed -i 's/$target{shared_extension_simple}/".so.ptest"/' ${D}${PTEST_PATH}/test/recipes/90-test_shlibload.t
+}
+
+RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python"
+
+FILES_${PN} =+ " ${libdir}/ssl-1.1/*"
+
+PACKAGES =+ "${PN}-engines"
+FILES_${PN}-engines = "${libdir}/engines-1.1"
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch
new file mode 100644
index 0000000..9362d12
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch
@@ -0,0 +1,54 @@
+From 50a2997b256e0e0ef7a46fae133f56f60fce539c Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak@v3.sk>
+Date: Mon, 9 Jan 2017 13:34:23 +0000
+Subject: [PATCH] pppoe: include netinet/in.h before linux/in.h
+
+This fixes builds with newer kernels. Basically, <netinet/in.h> needs to be
+included before <linux/in.h> otherwise the earlier, unaware of the latter,
+tries to redefine symbols and structures. Also, <linux/if_pppox.h> doesn't work
+alone anymore, since it pulls the headers in the wrong order, so we better
+include <netinet/in.h> early.
+
+Upstream-Status: Backport
+[https://github.com/paulusmack/ppp/commit/50a2997b256e0e0ef7a46fae133f56f60fce539c]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ pppd/plugins/rp-pppoe/pppoe.h | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
+index 9ab2eee..c4aaa6e 100644
+--- a/pppd/plugins/rp-pppoe/pppoe.h
++++ b/pppd/plugins/rp-pppoe/pppoe.h
+@@ -47,6 +47,10 @@
+ #include <sys/socket.h>
+ #endif
+
++/* This has to be included before Linux 4.8's linux/in.h
++ * gets dragged in. */
++#include <netinet/in.h>
++
+ /* Ugly header files on some Linux boxes... */
+ #if defined(HAVE_LINUX_IF_H)
+ #include <linux/if.h>
+@@ -84,8 +88,6 @@ typedef unsigned long UINT32_t;
+ #include <linux/if_ether.h>
+ #endif
+
+-#include <netinet/in.h>
+-
+ #ifdef HAVE_NETINET_IF_ETHER_H
+ #include <sys/types.h>
+
+@@ -98,7 +100,6 @@ typedef unsigned long UINT32_t;
+ #endif
+
+
+-
+ /* Ethernet frame types according to RFC 2516 */
+ #define ETH_PPPOE_DISCOVERY 0x8863
+ #define ETH_PPPOE_SESSION 0x8864
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/cifdefroute.patch b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/cifdefroute.patch
index db4dbc2..7dd69d8 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/cifdefroute.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/cifdefroute.patch
@@ -4,10 +4,11 @@
Upstream-Status: Inappropriate [debian/suse patches]
-diff -urN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
---- ppp-2.4.5-orig/pppd/ipcp.c 2010-06-30 15:51:12.050166398 +0800
-+++ ppp-2.4.5/pppd/ipcp.c 2010-06-30 16:40:00.478716855 +0800
-@@ -198,6 +198,16 @@
+Index: ppp-2.4.7/pppd/ipcp.c
+===================================================================
+--- ppp-2.4.7.orig/pppd/ipcp.c
++++ ppp-2.4.7/pppd/ipcp.c
+@@ -198,6 +198,16 @@ static option_t ipcp_option_list[] = {
"disable defaultroute option", OPT_ALIAS | OPT_A2CLR,
&ipcp_wantoptions[0].default_route },
@@ -24,7 +25,7 @@
{ "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp,
"Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp },
{ "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp,
-@@ -271,7 +281,7 @@
+@@ -271,7 +281,7 @@ struct protent ipcp_protent = {
ip_active_pkt
};
@@ -33,7 +34,7 @@
static void ipcp_script __P((char *, int)); /* Run an up/down script */
static void ipcp_script_done __P((void *));
-@@ -1742,7 +1752,12 @@
+@@ -1761,7 +1771,12 @@ ip_demand_conf(u)
if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))
return 0;
if (wo->default_route)
@@ -46,7 +47,7 @@
default_route_set[u] = 1;
if (wo->proxy_arp)
if (sifproxyarp(u, wo->hisaddr))
-@@ -1830,7 +1845,8 @@
+@@ -1849,7 +1864,8 @@ ipcp_up(f)
*/
if (demand) {
if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) {
@@ -56,7 +57,7 @@
if (go->ouraddr != wo->ouraddr) {
warn("Local IP address changed to %I", go->ouraddr);
script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0);
-@@ -1855,7 +1871,12 @@
+@@ -1874,7 +1890,12 @@ ipcp_up(f)
/* assign a default route through the interface if required */
if (ipcp_wantoptions[f->unit].default_route)
@@ -69,7 +70,7 @@
default_route_set[f->unit] = 1;
/* Make a proxy ARP entry if requested. */
-@@ -1905,7 +1926,12 @@
+@@ -1924,7 +1945,12 @@ ipcp_up(f)
/* assign a default route through the interface if required */
if (ipcp_wantoptions[f->unit].default_route)
@@ -82,7 +83,7 @@
default_route_set[f->unit] = 1;
/* Make a proxy ARP entry if requested. */
-@@ -1983,7 +2009,7 @@
+@@ -2002,7 +2028,7 @@ ipcp_down(f)
sifnpmode(f->unit, PPP_IP, NPMODE_DROP);
sifdown(f->unit);
ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr,
@@ -91,7 +92,7 @@
}
/* Execute the ip-down script */
-@@ -1999,12 +2025,21 @@
+@@ -2018,12 +2044,21 @@ ipcp_down(f)
* proxy arp entries, etc.
*/
static void
@@ -115,10 +116,11 @@
cifproxyarp(unit, hisaddr);
proxy_arp_set[unit] = 0;
}
-diff -urN ppp-2.4.5-orig/pppd/ipcp.h ppp-2.4.5/pppd/ipcp.h
---- ppp-2.4.5-orig/pppd/ipcp.h 2010-06-30 15:51:12.043682063 +0800
-+++ ppp-2.4.5/pppd/ipcp.h 2010-06-30 16:40:49.586203129 +0800
-@@ -70,6 +70,7 @@
+Index: ppp-2.4.7/pppd/ipcp.h
+===================================================================
+--- ppp-2.4.7.orig/pppd/ipcp.h
++++ ppp-2.4.7/pppd/ipcp.h
+@@ -70,6 +70,7 @@ typedef struct ipcp_options {
bool old_addrs; /* Use old (IP-Addresses) option? */
bool req_addr; /* Ask peer to send IP address? */
bool default_route; /* Assign default route through interface? */
@@ -126,10 +128,11 @@
bool proxy_arp; /* Make proxy ARP entry for peer? */
bool neg_vj; /* Van Jacobson Compression? */
bool old_vj; /* use old (short) form of VJ option? */
-diff -urN ppp-2.4.5-orig/pppd/pppd.8 ppp-2.4.5/pppd/pppd.8
---- ppp-2.4.5-orig/pppd/pppd.8 2010-06-30 15:51:12.043682063 +0800
-+++ ppp-2.4.5/pppd/pppd.8 2010-06-30 16:42:47.102413859 +0800
-@@ -121,6 +121,13 @@
+Index: ppp-2.4.7/pppd/pppd.8
+===================================================================
+--- ppp-2.4.7.orig/pppd/pppd.8
++++ ppp-2.4.7/pppd/pppd.8
+@@ -121,6 +121,13 @@ the gateway, when IPCP negotiation is su
This entry is removed when the PPP connection is broken. This option
is privileged if the \fInodefaultroute\fR option has been specified.
.TP
@@ -143,7 +146,7 @@
.B disconnect \fIscript
Execute the command specified by \fIscript\fR, by passing it to a
shell, after
-@@ -717,7 +724,12 @@
+@@ -734,7 +741,12 @@ disable both forms of hardware flow cont
.TP
.B nodefaultroute
Disable the \fIdefaultroute\fR option. The system administrator who
@@ -157,10 +160,11 @@
can do so by placing this option in the /etc/ppp/options file.
.TP
.B nodeflate
-diff -urN ppp-2.4.5-orig/pppd/pppd.h ppp-2.4.5/pppd/pppd.h
---- ppp-2.4.5-orig/pppd/pppd.h 2010-06-30 15:51:12.050166398 +0800
-+++ ppp-2.4.5/pppd/pppd.h 2010-06-30 16:43:36.514148327 +0800
-@@ -643,7 +643,11 @@
+Index: ppp-2.4.7/pppd/pppd.h
+===================================================================
+--- ppp-2.4.7.orig/pppd/pppd.h
++++ ppp-2.4.7/pppd/pppd.h
+@@ -665,7 +665,11 @@ int sif6addr __P((int, eui64_t, eui64_t
int cif6addr __P((int, eui64_t, eui64_t));
/* Remove an IPv6 address from i/f */
#endif
@@ -172,19 +176,20 @@
/* Create default route through i/f */
int cifdefaultroute __P((int, u_int32_t, u_int32_t));
/* Delete default route through i/f */
-diff -urN ppp-2.4.5-orig/pppd/sys-linux.c ppp-2.4.5/pppd/sys-linux.c
---- ppp-2.4.5-orig/pppd/sys-linux.c 2010-06-30 15:51:12.050166398 +0800
-+++ ppp-2.4.5/pppd/sys-linux.c 2010-06-30 16:54:00.362716231 +0800
-@@ -206,6 +206,8 @@
-
+Index: ppp-2.4.7/pppd/sys-linux.c
+===================================================================
+--- ppp-2.4.7.orig/pppd/sys-linux.c
++++ ppp-2.4.7/pppd/sys-linux.c
+@@ -207,6 +207,8 @@ static unsigned char inbuf[512]; /* buff
static int if_is_up; /* Interface has been marked up */
+ static int if6_is_up; /* Interface has been marked up for IPv6, to help differentiate */
static int have_default_route; /* Gateway for default route added */
+static struct rtentry old_def_rt; /* Old default route */
+static int default_rt_repl_rest; /* replace and restore old default rt */
static u_int32_t proxy_arp_addr; /* Addr for proxy arp entry added */
static char proxy_arp_dev[16]; /* Device for proxy arp entry */
static u_int32_t our_old_addr; /* for detecting address changes */
-@@ -1537,6 +1539,9 @@
+@@ -1545,6 +1547,9 @@ static int read_route_table(struct rtent
p = NULL;
}
@@ -194,7 +199,7 @@
SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16);
SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16);
SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16);
-@@ -1606,20 +1611,51 @@
+@@ -1614,20 +1619,51 @@ int have_route_to(u_int32_t addr)
/********************************************************************
*
* sifdefaultroute - assign a default route through the address given.
@@ -260,7 +265,7 @@
}
memset (&rt, 0, sizeof (rt));
-@@ -1638,6 +1674,12 @@
+@@ -1646,6 +1682,12 @@ int sifdefaultroute (int unit, u_int32_t
error("default route ioctl(SIOCADDRT): %m");
return 0;
}
@@ -273,7 +278,7 @@
have_default_route = 1;
return 1;
-@@ -1673,6 +1715,16 @@
+@@ -1681,6 +1723,16 @@ int cifdefaultroute (int unit, u_int32_t
return 0;
}
}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch
index d59717e..8a69396 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch
@@ -6,10 +6,11 @@
Upstream-Status: Inappropriate [configuration]
-diff -urN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux
---- ppp-2.4.5-orig/pppd/Makefile.linux 2010-06-30 15:51:12.043682063 +0800
-+++ ppp-2.4.5/pppd/Makefile.linux 2010-06-30 17:08:21.806363042 +0800
-@@ -117,10 +117,10 @@
+Index: ppp-2.4.7/pppd/Makefile.linux
+===================================================================
+--- ppp-2.4.7.orig/pppd/Makefile.linux
++++ ppp-2.4.7/pppd/Makefile.linux
+@@ -120,10 +120,10 @@ CFLAGS += -DHAS_SHADOW
#LIBS += -lshadow $(LIBS)
endif
@@ -20,9 +21,9 @@
-endif
+#endif
- ifdef NEEDDES
- ifndef USE_CRYPT
-@@ -169,10 +169,10 @@
+ ifdef USE_LIBUTIL
+ CFLAGS += -DHAVE_LOGWTMP=1
+@@ -177,10 +177,10 @@ LIBS += -ldl
endif
ifdef FILTER
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch
deleted file mode 100644
index f77b0de..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 3da19af53e2eee2e77b456cfbb9d633b06656d38 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Thu, 13 Oct 2016 13:41:43 +0800
-Subject: [PATCH] ppp: fix building with linux-4.8
-
-Fix a build error when using the linux-4.8 headers that results in:
-
-In file included from pppoe.h:87:0,
- from plugin.c:29:
-../usr/include/netinet/in.h:211:8: note: originally defined here
- struct in6_addr
- ^~~~~~~~
-In file included from ../usr/include/linux/if_pppol2tp.h:20:0,
- from ../usr/include/linux/if_pppox.h:26,
- from plugin.c:52:
-../usr/include/linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6'
- struct sockaddr_in6 {
- ^~~~~~~~~~~~
-
-Upstream-Status: Submitted [1]
-
-[1] https://github.com/paulusmack/ppp/pull/69
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- pppd/plugins/rp-pppoe/pppoe.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
-index 9ab2eee..96d2794 100644
---- a/pppd/plugins/rp-pppoe/pppoe.h
-+++ b/pppd/plugins/rp-pppoe/pppoe.h
-@@ -84,7 +84,7 @@ typedef unsigned long UINT32_t;
- #include <linux/if_ether.h>
- #endif
-
--#include <netinet/in.h>
-+#include <linux/in.h>
-
- #ifdef HAVE_NETINET_IF_ETHER_H
- #include <sys/types.h>
---
-2.8.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp_2.4.7.bb b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
index b2c4d4c..a5f764f 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
@@ -30,7 +30,7 @@
file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \
file://ppp@.service \
file://fix-CVE-2015-3310.patch \
- file://ppp-fix-building-with-linux-4.8.patch \
+ file://0001-pppoe-include-netinet-in.h-before-linux-in.h.patch \
file://0001-ppp-Remove-unneeded-include.patch \
"
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
deleted file mode 100644
index 5715378..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 06fcf98f6ca40dc6b823d7d6231a240a1794ef2d Mon Sep 17 00:00:00 2001
-From: Haiqing Bai <Haiqing.Bai@windriver.com>
-Date: Tue, 28 Feb 2017 10:40:37 +0800
-Subject: [PATCH] ifupdown: pass interface device name for ipv6 route commands
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-commit 028524317d8d0011ed38e86e507a06738a5b5a97 from upstream
-
-IPv6 routes need the device argument for link-local routes, or they
-cannot be used at all. E.g. "gateway fe80::def" seems to be used in
-some places, but kernel refuses to insert the route unless device
-name is explicitly specified in the route addition.
-
-Signed-off-by: Timo Teräs <timo.teras@iki.fi>
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
----
- networking/ifupdown.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/networking/ifupdown.c b/networking/ifupdown.c
-index 17bc4e9..a00f68d 100644
---- a/networking/ifupdown.c
-+++ b/networking/ifupdown.c
-@@ -394,8 +394,8 @@ static int FAST_FUNC static_up6(struct interface_defn_t *ifd, execfn *exec)
- # if ENABLE_FEATURE_IFUPDOWN_IP
- result = execute("ip addr add %address%/%netmask% dev %iface%[[ label %label%]]", ifd, exec);
- result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] %iface% up", ifd, exec);
-- /* Was: "[[ ip ....%gateway% ]]". Removed extra spaces w/o checking */
-- result += execute("[[ip route add ::/0 via %gateway%]][[ metric %metric%]]", ifd, exec);
-+ /* Reportedly, IPv6 needs "dev %iface%", but IPv4 does not: */
-+ result += execute("[[ip route add ::/0 via %gateway% dev %iface%]][[ metric %metric%]]", ifd, exec);
- # else
- result = execute("ifconfig %iface%[[ media %media%]][[ hw %hwaddress%]][[ mtu %mtu%]] up", ifd, exec);
- result += execute("ifconfig %iface% add %address%/%netmask%", ifd, exec);
-@@ -421,7 +421,8 @@ static int FAST_FUNC v4tunnel_up(struct interface_defn_t *ifd, execfn *exec)
- "%endpoint%[[ local %local%]][[ ttl %ttl%]]", ifd, exec);
- result += execute("ip link set %iface% up", ifd, exec);
- result += execute("ip addr add %address%/%netmask% dev %iface%", ifd, exec);
-- result += execute("[[ip route add ::/0 via %gateway%]]", ifd, exec);
-+ /* Reportedly, IPv6 needs "dev %iface%", but IPv4 does not: */
-+ result += execute("[[ip route add ::/0 via %gateway% dev %iface%]]", ifd, exec);
- return ((result == 4) ? 4 : 0);
- }
-
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox-inittab_1.24.1.bb b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox-inittab_1.27.2.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/busybox/busybox-inittab_1.24.1.bb
rename to import-layers/yocto-poky/meta/recipes-core/busybox/busybox-inittab_1.27.2.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc
index a6bfd46..d1675c3 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc
@@ -106,7 +106,7 @@
}
do_prepare_config () {
- if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+ if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
export KCONFIG_NOTIMESTAMP=1
fi
sed -e '/CONFIG_STATIC/d' \
@@ -146,7 +146,7 @@
do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
- if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+ if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
export KCONFIG_NOTIMESTAMP=1
fi
if [ "${BUSYBOX_SPLIT_SUID}" = "1" -a x`grep "CONFIG_FEATURE_INDIVIDUAL=y" .config` = x ]; then
@@ -158,6 +158,12 @@
cp .config .config.orig
oe_runmake busybox.cfg.suid
oe_runmake busybox.cfg.nosuid
+
+ # workaround for suid bug 10346
+ if ! grep -q "CONFIG_SH_IS_NONE" busybox.cfg.nosuid; then
+ echo "CONFIG_SH_IS_NONE" >> busybox.cfg.suid
+ fi
+
for i in `cat busybox.cfg.suid busybox.cfg.nosuid`; do
echo "# $i is not set" >> .config.disable.apps
done
@@ -167,12 +173,24 @@
cat busybox.cfg.$s | while read item; do
grep -w "$item" .config.orig
done > .config.app.$s
+
+ # workaround for suid bug 10346
+ if [ "$s" = "suid" ] ; then
+ sed "s/.*CONFIG_SH_IS_NONE.*$/CONFIG_SH_IS_NONE=y/" -i .config.app.suid
+ fi
+
merge_config.sh -m .config.nonapps .config.app.$s
oe_runmake busybox_unstripped
mv busybox_unstripped busybox.$s
oe_runmake busybox.links
mv busybox.links busybox.links.$s
done
+
+ # hard fail if sh is being linked to the suid busybox (detects bug 10346)
+ if grep -q -x "/bin/sh" busybox.links.suid; then
+ bbfatal "busybox suid binary incorrectly provides /bin/sh"
+ fi
+
# copy .config.orig back to .config, because the install process may check this file
cp .config.orig .config
# cleanup
@@ -206,7 +224,7 @@
install -m 0755 ${B}/busybox.nosuid ${D}${base_bindir}
install -m 0644 ${S}/busybox.links.suid ${D}${sysconfdir}
install -m 0644 ${S}/busybox.links.nosuid ${D}${sysconfdir}
- if grep -q "CONFIG_FEATURE_SH_IS_ASH=y" ${B}/.config; then
+ if grep -q "CONFIG_SH_IS_ASH=y" ${B}/.config; then
ln -sf busybox.nosuid ${D}${base_bindir}/sh
fi
# Keep a default busybox for people who want to invoke busybox directly.
@@ -220,7 +238,7 @@
install -m 0755 ${B}/busybox ${D}${base_bindir}
fi
install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
- if grep -q "CONFIG_FEATURE_SH_IS_ASH=y" ${B}/.config; then
+ if grep -q "CONFIG_SH_IS_ASH=y" ${B}/.config; then
ln -sf busybox ${D}${base_bindir}/sh
fi
# We make this symlink here to eliminate the error when upgrading together
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch
deleted file mode 100644
index 78520f0..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From e1d426fd65c00a6d01a10d85edf8a294ae8a2d2b Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 24 Apr 2016 18:19:49 +0200
-Subject: [PATCH] flock: fix -c; improve error handling of fork+exec
-
-function old new delta
-flock_main 254 334 +80
-
-Upstream-Status: Backport
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- util-linux/flock.c | 19 +++++++++++++++++--
- 1 file changed, 17 insertions(+), 2 deletions(-)
-
-diff --git a/util-linux/flock.c b/util-linux/flock.c
-index 05a747f..539a835 100644
---- a/util-linux/flock.c
-+++ b/util-linux/flock.c
-@@ -57,7 +57,6 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
- /* If it is "flock FILE -c PROG", then -c isn't caught by getopt32:
- * we use "+" in order to support "flock -opt FILE PROG -with-opts",
- * we need to remove -c by hand.
-- * TODO: in upstream, -c 'PROG ARGS' means "run sh -c 'PROG ARGS'"
- */
- if (argv[0]
- && argv[0][0] == '-'
-@@ -66,6 +65,9 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
- )
- ) {
- argv++;
-+ if (argv[1])
-+ bb_error_msg_and_die("-c takes only one argument");
-+ opt |= OPT_c;
- }
-
- if (OPT_s == LOCK_SH && OPT_x == LOCK_EX && OPT_n == LOCK_NB && OPT_u == LOCK_UN) {
-@@ -90,8 +92,21 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
- bb_perror_nomsg_and_die();
- }
-
-- if (argv[0])
-+ if (argv[0]) {
-+ if (!(opt & OPT_c)) {
-+ int rc = spawn_and_wait(argv);
-+ if (rc < 0)
-+ bb_simple_perror_msg(argv[0]);
-+ return rc;
-+ }
-+ /* -c 'PROG ARGS' means "run sh -c 'PROG ARGS'" */
-+ argv -= 2;
-+ argv[0] = (char*)get_shell_name();
-+ argv[1] = (char*)"-c";
-+ /* argv[2] = "PROG ARGS"; */
-+ /* argv[3] = NULL; */
- return spawn_and_wait(argv);
-+ }
-
- return EXIT_SUCCESS;
- }
---
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-ip-fix-an-improper-optimization-req.r.rtm_scope-may-.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-ip-fix-an-improper-optimization-req.r.rtm_scope-may-.patch
deleted file mode 100644
index 812a507..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-ip-fix-an-improper-optimization-req.r.rtm_scope-may-.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 34ecc3b7aefdd6c31e8691bd5485037bbabedbd4 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 14 Aug 2016 01:30:34 +0200
-Subject: [PATCH] ip: fix an improper optimization: req.r.rtm_scope may be
- nonzero here
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
-Upstream-Status: Backport
-Signed-off-by: André Draszik <adraszik@tycoint.com>
-
- networking/libiproute/iproute.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
-index e674e9a0d..48dc6e3d9 100644
---- a/networking/libiproute/iproute.c
-+++ b/networking/libiproute/iproute.c
-@@ -362,10 +362,9 @@ IF_FEATURE_IP_RULE(ARG_table,)
- req.r.rtm_scope = RT_SCOPE_NOWHERE;
-
- if (cmd != RTM_DELROUTE) {
-+ req.r.rtm_scope = RT_SCOPE_UNIVERSE;
- if (RTPROT_BOOT != 0)
- req.r.rtm_protocol = RTPROT_BOOT;
-- if (RT_SCOPE_UNIVERSE != 0)
-- req.r.rtm_scope = RT_SCOPE_UNIVERSE;
- if (RTN_UNICAST != 0)
- req.r.rtm_type = RTN_UNICAST;
- }
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-iproute-support-scope-.-Closes-8561.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-iproute-support-scope-.-Closes-8561.patch
deleted file mode 100644
index 66bc76e..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-iproute-support-scope-.-Closes-8561.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From ce4bc1ed048233e89ee4cb95830bf6f01d523d1e Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Wed, 30 Dec 2015 17:32:51 +0100
-Subject: [PATCH] iproute: support "scope". Closes 8561
-
-function old new delta
-iproute_modify 1051 1120 +69
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-Modified patch to build against busybox 1.24.1:
-- s/invarg_1_to_2/invarg
-Signed-off-by: André Draszik <adraszik@tycoint.com>
----
- networking/libiproute/iproute.c | 52 ++++++++++++++++++++++++++---------------
- 1 file changed, 33 insertions(+), 19 deletions(-)
-
-diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
-index d232ee6fd..82827488f 100644
---- a/networking/libiproute/iproute.c
-+++ b/networking/libiproute/iproute.c
-@@ -313,12 +313,13 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- static int iproute_modify(int cmd, unsigned flags, char **argv)
- {
- static const char keywords[] ALIGN1 =
-- "src\0""via\0""mtu\0""lock\0""protocol\0"IF_FEATURE_IP_RULE("table\0")
-+ "src\0""via\0""mtu\0""lock\0""scope\0""protocol\0"IF_FEATURE_IP_RULE("table\0")
- "dev\0""oif\0""to\0""metric\0""onlink\0";
- enum {
- ARG_src,
- ARG_via,
- ARG_mtu, PARM_lock,
-+ ARG_scope,
- ARG_protocol,
- IF_FEATURE_IP_RULE(ARG_table,)
- ARG_dev,
-@@ -344,6 +345,7 @@ IF_FEATURE_IP_RULE(ARG_table,)
- unsigned mxlock = 0;
- char *d = NULL;
- smalluint ok = 0;
-+ smalluint scope_ok = 0;
- int arg;
-
- memset(&req, 0, sizeof(req));
-@@ -352,15 +354,18 @@ IF_FEATURE_IP_RULE(ARG_table,)
- req.n.nlmsg_flags = NLM_F_REQUEST | flags;
- req.n.nlmsg_type = cmd;
- req.r.rtm_family = preferred_family;
-- if (RT_TABLE_MAIN) /* if it is zero, memset already did it */
-+ if (RT_TABLE_MAIN != 0) /* if it is zero, memset already did it */
- req.r.rtm_table = RT_TABLE_MAIN;
-- if (RT_SCOPE_NOWHERE)
-+ if (RT_SCOPE_NOWHERE != 0)
- req.r.rtm_scope = RT_SCOPE_NOWHERE;
-
- if (cmd != RTM_DELROUTE) {
-- req.r.rtm_protocol = RTPROT_BOOT;
-- req.r.rtm_scope = RT_SCOPE_UNIVERSE;
-- req.r.rtm_type = RTN_UNICAST;
-+ if (RTPROT_BOOT != 0)
-+ req.r.rtm_protocol = RTPROT_BOOT;
-+ if (RT_SCOPE_UNIVERSE != 0)
-+ req.r.rtm_scope = RT_SCOPE_UNIVERSE;
-+ if (RTN_UNICAST != 0)
-+ req.r.rtm_type = RTN_UNICAST;
- }
-
- mxrta->rta_type = RTA_METRICS;
-@@ -393,6 +398,13 @@ IF_FEATURE_IP_RULE(ARG_table,)
- }
- mtu = get_unsigned(*argv, "mtu");
- rta_addattr32(mxrta, sizeof(mxbuf), RTAX_MTU, mtu);
-+ } else if (arg == ARG_scope) {
-+ uint32_t scope;
-+ NEXT_ARG();
-+ if (rtnl_rtscope_a2n(&scope, *argv))
-+ invarg(*argv, "scope");
-+ req.r.rtm_scope = scope;
-+ scope_ok = 1;
- } else if (arg == ARG_protocol) {
- uint32_t prot;
- NEXT_ARG();
-@@ -469,20 +481,22 @@ IF_FEATURE_IP_RULE(ARG_table,)
- addattr_l(&req.n, sizeof(req), RTA_METRICS, RTA_DATA(mxrta), RTA_PAYLOAD(mxrta));
- }
-
-- if (req.r.rtm_type == RTN_LOCAL || req.r.rtm_type == RTN_NAT)
-- req.r.rtm_scope = RT_SCOPE_HOST;
-- else
-- if (req.r.rtm_type == RTN_BROADCAST
-- || req.r.rtm_type == RTN_MULTICAST
-- || req.r.rtm_type == RTN_ANYCAST
-- ) {
-- req.r.rtm_scope = RT_SCOPE_LINK;
-- }
-- else if (req.r.rtm_type == RTN_UNICAST || req.r.rtm_type == RTN_UNSPEC) {
-- if (cmd == RTM_DELROUTE)
-- req.r.rtm_scope = RT_SCOPE_NOWHERE;
-- else if (!(ok & gw_ok))
-+ if (!scope_ok) {
-+ if (req.r.rtm_type == RTN_LOCAL || req.r.rtm_type == RTN_NAT)
-+ req.r.rtm_scope = RT_SCOPE_HOST;
-+ else
-+ if (req.r.rtm_type == RTN_BROADCAST
-+ || req.r.rtm_type == RTN_MULTICAST
-+ || req.r.rtm_type == RTN_ANYCAST
-+ ) {
- req.r.rtm_scope = RT_SCOPE_LINK;
-+ }
-+ else if (req.r.rtm_type == RTN_UNICAST || req.r.rtm_type == RTN_UNSPEC) {
-+ if (cmd == RTM_DELROUTE)
-+ req.r.rtm_scope = RT_SCOPE_NOWHERE;
-+ else if (!(ok & gw_ok))
-+ req.r.rtm_scope = RT_SCOPE_LINK;
-+ }
- }
-
- if (req.r.rtm_family == AF_UNSPEC) {
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch
deleted file mode 100644
index aac5b40..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-From b5a9234272e6084557224c73ab7737ed47f09848 Mon Sep 17 00:00:00 2001
-From: Lukasz Nowak <lnowak@tycoint.com>
-Date: Wed, 23 Nov 2016 12:48:21 +0000
-Subject: [PATCH v2] libiproute: handle table ids larger than 255
-
-Linux kernel, starting from 2.6.19 allows ip table ids to have 32-bit values.
-In order to preserve compatibility, the old 8-bit field: rtm_table is still
-in use when table id is lower than 256.
-
-Add support for the 32-bit table id (RTA_TABLE attribute) in:
-- ip route print
-- ip route modify
-- ip rule print
-- ip rule modify
-
-Add printing of table ids to ip route.
-
-Changes are compatible with the mainline iproute2 utilities.
-
-These changes are required for compatibility with ConnMan, which by default
-uses table ids greater than 255.
-
-Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2016-December/084989.html]
-
-Signed-off-by: Lukasz Nowak <lnowak@tycoint.com>
----
- networking/libiproute/iproute.c | 24 ++++++++++++++++++++----
- networking/libiproute/iprule.c | 11 +++++++++--
- 2 files changed, 29 insertions(+), 6 deletions(-)
-
-diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
-index 6ecd5f7..d5af498 100644
---- a/networking/libiproute/iproute.c
-+++ b/networking/libiproute/iproute.c
-@@ -87,6 +87,7 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- inet_prefix dst;
- inet_prefix src;
- int host_len = -1;
-+ uint32_t tid;
-
- if (n->nlmsg_type != RTM_NEWROUTE && n->nlmsg_type != RTM_DELROUTE) {
- fprintf(stderr, "Not a route: %08x %08x %08x\n",
-@@ -99,6 +100,14 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- if (len < 0)
- bb_error_msg_and_die("wrong nlmsg len %d", len);
-
-+ memset(tb, 0, sizeof(tb));
-+ parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len);
-+
-+ if (tb[RTA_TABLE])
-+ tid = *(uint32_t *)RTA_DATA(tb[RTA_TABLE]);
-+ else
-+ tid = r->rtm_table;
-+
- if (r->rtm_family == AF_INET6)
- host_len = 128;
- else if (r->rtm_family == AF_INET)
-@@ -128,7 +137,7 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- }
- }
- } else {
-- if (G_filter.tb > 0 && G_filter.tb != r->rtm_table) {
-+ if (G_filter.tb > 0 && G_filter.tb != tid) {
- return 0;
- }
- }
-@@ -157,10 +166,8 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- return 0;
- }
-
-- memset(tb, 0, sizeof(tb));
- memset(&src, 0, sizeof(src));
- memset(&dst, 0, sizeof(dst));
-- parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len);
-
- if (tb[RTA_SRC]) {
- src.bitlen = r->rtm_src_len;
-@@ -283,6 +290,10 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- if (tb[RTA_OIF]) {
- printf("dev %s ", ll_index_to_name(*(int*)RTA_DATA(tb[RTA_OIF])));
- }
-+#if ENABLE_FEATURE_IP_RULE
-+ if (tid && tid != RT_TABLE_MAIN && !G_filter.tb)
-+ printf("table %s ", rtnl_rttable_n2a(tid));
-+#endif
-
- /* Todo: parse & show "proto kernel", "scope link" here */
-
-@@ -434,7 +445,12 @@ IF_FEATURE_IP_RULE(ARG_table,)
- NEXT_ARG();
- if (rtnl_rttable_a2n(&tid, *argv))
- invarg(*argv, "table");
-- req.r.rtm_table = tid;
-+ if (tid < 256)
-+ req.r.rtm_table = tid;
-+ else {
-+ req.r.rtm_table = RT_TABLE_UNSPEC;
-+ addattr32(&req.n, sizeof(req), RTA_TABLE, tid);
-+ }
- #endif
- } else if (arg == ARG_dev || arg == ARG_oif) {
- NEXT_ARG();
-diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c
-index 774a3e2..3fac7c5 100644
---- a/networking/libiproute/iprule.c
-+++ b/networking/libiproute/iprule.c
-@@ -119,7 +119,9 @@ static int FAST_FUNC print_rule(const struct sockaddr_nl *who UNUSED_PARAM,
- printf("iif %s ", (char*)RTA_DATA(tb[RTA_IIF]));
- }
-
-- if (r->rtm_table)
-+ if (tb[RTA_TABLE])
-+ printf("lookup %s ", rtnl_rttable_n2a(*(uint32_t*)RTA_DATA(tb[RTA_TABLE])));
-+ else if (r->rtm_table)
- printf("lookup %s ", rtnl_rttable_n2a(r->rtm_table));
-
- if (tb[RTA_FLOW]) {
-@@ -259,7 +261,12 @@ static int iprule_modify(int cmd, char **argv)
- NEXT_ARG();
- if (rtnl_rttable_a2n(&tid, *argv))
- invarg(*argv, "table ID");
-- req.r.rtm_table = tid;
-+ if (tid < 256)
-+ req.r.rtm_table = tid;
-+ else {
-+ req.r.rtm_table = RT_TABLE_UNSPEC;
-+ addattr32(&req.n, sizeof(req), RTA_TABLE, tid);
-+ }
- table_ok = 1;
- } else if (key == ARG_dev ||
- key == ARG_iif
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch
deleted file mode 100644
index 4f53984..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 903542f7331c58007a3ef938d41e1c55fc329648 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Wed, 31 Aug 2016 23:40:43 -0400
-Subject: [PATCH] sed: fix "sed n (flushes pattern space, terminates early)"
- testcase failure
-
-This patch fix "sed n (flushes pattern space, terminates early)"
-testcase failure. We can see it at:
-
- https://git.busybox.net/busybox/commit/?id=76d72376e0244a5cafd4880cdc623e37d86a75e4
-
-Upstream-Status: Backport
-
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- editors/sed.c | 19 ++++++++++---------
- testsuite/sed.tests | 6 +-----
- 2 files changed, 11 insertions(+), 14 deletions(-)
-
-diff --git a/editors/sed.c b/editors/sed.c
-index 7bbf820..259c39c 100644
---- a/editors/sed.c
-+++ b/editors/sed.c
-@@ -1274,16 +1274,17 @@ static void process_files(void)
- case 'n':
- if (!G.be_quiet)
- sed_puts(pattern_space, last_gets_char);
-- if (next_line) {
-- free(pattern_space);
-- pattern_space = next_line;
-- last_gets_char = next_gets_char;
-- next_line = get_next_line(&next_gets_char, &last_puts_char, last_gets_char);
-- substituted = 0;
-- linenum++;
-- break;
-+ if (next_line == NULL) {
-+ /* If no next line, jump to end of script and exit. */
-+ goto discard_line;
- }
-- /* fall through */
-+ free(pattern_space);
-+ pattern_space = next_line;
-+ last_gets_char = next_gets_char;
-+ next_line = get_next_line(&next_gets_char, &last_puts_char, last_gets_char);
-+ substituted = 0;
-+ linenum++;
-+ break;
-
- /* Quit. End of script, end of input. */
- case 'q':
-diff --git a/testsuite/sed.tests b/testsuite/sed.tests
-index 34479e5..96ff7a5 100755
---- a/testsuite/sed.tests
-+++ b/testsuite/sed.tests
-@@ -73,13 +73,9 @@ testing "sed t (test/branch clears test bit)" "sed -e 's/a/b/;:loop;t loop'" \
- testing "sed T (!test/branch)" "sed -e 's/a/1/;T notone;p;: notone;p'" \
- "1\n1\n1\nb\nb\nc\nc\n" "" "a\nb\nc\n"
-
--test x"$SKIP_KNOWN_BUGS" = x"" && {
--# Normal sed end-of-script doesn't print "c" because n flushed the pattern
--# space. If n hits EOF, pattern space is empty when script ends.
--# Query: how does this interact with no newline at EOF?
- testing "sed n (flushes pattern space, terminates early)" "sed -e 'n;p'" \
- "a\nb\nb\nc\n" "" "a\nb\nc\n"
--}
-+
- # non-GNU sed: N does _not_ flush pattern space, therefore c is eaten @ script end
- # GNU sed: N flushes pattern space, therefore c is printed too @ script end
- testing "sed N (flushes pattern space (GNU behavior))" "sed -e 'N;p'" \
---
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/BUG9071_buffer_overflow_arp.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/BUG9071_buffer_overflow_arp.patch
deleted file mode 100644
index 828694c..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/BUG9071_buffer_overflow_arp.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-busybox1.24.1: Fix busybox - (local) cmdline stack buffer overwrite
-
-[No upstream tracking] -- https://bugs.busybox.net/show_bug.cgi?id=9071
-
-busybox - (local) cmdline stack buffer overwrite
-
-Busybox provides an `arp` applet which is missing an array bounds check for
-command-line parameter `IFNAME`. It is therefore vulnerable to a command-line
-based local stack buffer overwrite effectively allowing local users to write
-past a 16 bytes fixed stack buffer. This leads to two scenarios, one (A) where
-an IOCTL for GET_HW_ADDRESS (`SIOCGIFHWADDR`) fails and results in a corrupted
-`va_list` being passed to `*printf()` and one (B) where an attacker might provide
-valid params for the IOCTL and trick the program to proceed and result in a
-`RET eip overwrite` eventually gaining code execution.
-
-Upstream-Status: Backport [https://git.busybox.net/busybox/commit/networking/arp.c?id=88e2b1cb626761b1924305b761a5dfc723613c4e]
-BUG: BUG9071
-Signed-off-by: Martin Balik <martin.balik@siemens.com>
-Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
-
---
-
-diff --git a/networking/arp.c b/networking/arp.c
-index 0099aa5..87eb327 100644
---- a/networking/arp.c
-+++ b/networking/arp.c
-@@ -176,7 +176,7 @@ static int arp_del(char **args)
- if (flags == 0)
- flags = 3;
-
-- strncpy(req.arp_dev, device, sizeof(req.arp_dev));
-+ strncpy_IFNAMSIZ(req.arp_dev, device);
-
- err = -1;
-
-@@ -217,7 +217,7 @@ static void arp_getdevhw(char *ifname, struct sockaddr *sa)
- struct ifreq ifr;
- const struct hwtype *xhw;
-
-- strcpy(ifr.ifr_name, ifname);
-+ strncpy_IFNAMSIZ(ifr.ifr_name, ifname);
- ioctl_or_perror_and_die(sockfd, SIOCGIFHWADDR, &ifr,
- "can't get HW-Address for '%s'", ifname);
- if (hw_set && (ifr.ifr_hwaddr.sa_family != hw->type)) {
-@@ -330,7 +330,7 @@ static int arp_set(char **args)
- /* Fill in the remainder of the request. */
- req.arp_flags = flags;
-
-- strncpy(req.arp_dev, device, sizeof(req.arp_dev));
-+ strncpy_IFNAMSIZ(req.arp_dev, device);
-
- /* Call the kernel. */
- if (option_mask32 & ARP_OPT_v)
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2011-5325.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2011-5325.patch
new file mode 100755
index 0000000..0926107
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2011-5325.patch
@@ -0,0 +1,481 @@
+busybox-1.27.2: Fix CVE-2011-5325
+
+[No upstream tracking] -- https://bugs.busybox.net/show_bug.cgi?id=8411
+
+libarchive: do not extract unsafe symlinks
+
+Prevent unsafe links extracting unless env variable $EXTRACT_UNSAFE_SYMLINKS=1
+is not set. Untarring file with -C DESTDIR parameter could be extracted with
+unwanted symlinks. This doesn't feel right, and IIRC GNU tar doesn't do that.
+Include necessary changes from previous commits.
+
+Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=bc9bbeb2b81001e8731cd2ae501c8fccc8d87cc7]
+CVE: CVE-2011-5325
+bug: 8411
+Signed-off-by: Radovan Scasny <radovan.scasny@siemens.com>
+Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
+
+diff --git a/archival/libarchive/Kbuild.src b/archival/libarchive/Kbuild.src
+index 942e755..e1a8a75 100644
+--- a/archival/libarchive/Kbuild.src
++++ b/archival/libarchive/Kbuild.src
+@@ -12,6 +12,8 @@ COMMON_FILES:= \
+ data_extract_all.o \
+ data_extract_to_stdout.o \
+ \
++ unsafe_symlink_target.o \
++\
+ filter_accept_all.o \
+ filter_accept_list.o \
+ filter_accept_reject_list.o \
+diff --git a/archival/libarchive/data_extract_all.c b/archival/libarchive/data_extract_all.c
+index 1830ffb..b828b65 100644
+--- a/archival/libarchive/data_extract_all.c
++++ b/archival/libarchive/data_extract_all.c
+@@ -128,10 +128,9 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
+ res = link(hard_link, dst_name);
+ if (res != 0 && !(archive_handle->ah_flags & ARCHIVE_EXTRACT_QUIET)) {
+ /* shared message */
+- bb_perror_msg("can't create %slink "
+- "%s to %s", "hard",
+- dst_name,
+- hard_link);
++ bb_perror_msg("can't create %slink '%s' to '%s'",
++ "hard", dst_name, hard_link
++ );
+ }
+ /* Hardlinks have no separate mode/ownership, skip chown/chmod */
+ goto ret;
+@@ -178,15 +177,17 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
+ case S_IFLNK:
+ /* Symlink */
+ //TODO: what if file_header->link_target == NULL (say, corrupted tarball?)
+- res = symlink(file_header->link_target, dst_name);
+- if (res != 0
+- && !(archive_handle->ah_flags & ARCHIVE_EXTRACT_QUIET)
+- ) {
+- /* shared message */
+- bb_perror_msg("can't create %slink "
+- "%s to %s", "sym",
+- dst_name,
+- file_header->link_target);
++ if (!unsafe_symlink_target(file_header->link_target)) {
++ res = symlink(file_header->link_target, dst_name);
++ if (res != 0
++ && !(archive_handle->ah_flags & ARCHIVE_EXTRACT_QUIET)
++ ) {
++ /* shared message */
++ bb_perror_msg("can't create %slink '%s' to '%s'",
++ "sym",
++ dst_name, file_header->link_target
++ );
++ }
+ }
+ break;
+ case S_IFSOCK:
+diff --git a/archival/libarchive/unsafe_symlink_target.c b/archival/libarchive/unsafe_symlink_target.c
+new file mode 100644
+index 0000000..ee46e28
+--- /dev/null
++++ b/archival/libarchive/unsafe_symlink_target.c
+@@ -0,0 +1,48 @@
++/* vi: set sw=4 ts=4: */
++/*
++ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
++ */
++#include "libbb.h"
++#include "bb_archive.h"
++
++int FAST_FUNC unsafe_symlink_target(const char *target)
++{
++ const char *dot;
++
++ if (target[0] == '/') {
++ const char *var;
++unsafe:
++ var = getenv("EXTRACT_UNSAFE_SYMLINKS");
++ if (var) {
++ if (LONE_CHAR(var, '1'))
++ return 0; /* pretend it's safe */
++ return 1; /* "UNSAFE!" */
++ }
++ bb_error_msg("skipping unsafe symlink to '%s' in archive,"
++ " set %s=1 to extract",
++ target,
++ "EXTRACT_UNSAFE_SYMLINKS"
++ );
++ /* Prevent further messages */
++ setenv("EXTRACT_UNSAFE_SYMLINKS", "0", 0);
++ return 1; /* "UNSAFE!" */
++ }
++
++ dot = target;
++ for (;;) {
++ dot = strchr(dot, '.');
++ if (!dot)
++ return 0; /* safe target */
++
++ /* Is it a path component starting with ".."? */
++ if ((dot[1] == '.')
++ && (dot == target || dot[-1] == '/')
++ /* Is it exactly ".."? */
++ && (dot[2] == '/' || dot[2] == '\0')
++ ) {
++ goto unsafe;
++ }
++ /* NB: it can even be trailing ".", should only add 1 */
++ dot += 1;
++ }
++}
+\ No newline at end of file
+diff --git a/archival/unzip.c b/archival/unzip.c
+index 9037262..270e261 100644
+--- a/archival/unzip.c
++++ b/archival/unzip.c
+@@ -335,6 +335,44 @@ static void unzip_create_leading_dirs(const char *fn)
+ free(name);
+ }
+
++static void unzip_extract_symlink(zip_header_t *zip, const char *dst_fn)
++{
++ char *target;
++
++ if (zip->fmt.ucmpsize > 0xfff) /* no funny business please */
++ bb_error_msg_and_die("bad archive");
++
++ if (zip->fmt.method == 0) {
++ /* Method 0 - stored (not compressed) */
++ target = xzalloc(zip->fmt.ucmpsize + 1);
++ xread(zip_fd, target, zip->fmt.ucmpsize);
++ } else {
++#if 1
++ bb_error_msg_and_die("compressed symlink is not supported");
++#else
++ transformer_state_t xstate;
++ init_transformer_state(&xstate);
++ xstate.mem_output_size_max = zip->fmt.ucmpsize;
++ /* ...unpack... */
++ if (!xstate.mem_output_buf)
++ WTF();
++ target = xstate.mem_output_buf;
++ target = xrealloc(target, xstate.mem_output_size + 1);
++ target[xstate.mem_output_size] = '\0';
++#endif
++ }
++ if (!unsafe_symlink_target(target)) {
++//TODO: libbb candidate
++ if (symlink(target, dst_fn)) {
++ /* shared message */
++ bb_perror_msg_and_die("can't create %slink '%s' to '%s'",
++ "sym", dst_fn, target
++ );
++ }
++ }
++ free(target);
++}
++
+ static void unzip_extract(zip_header_t *zip, int dst_fd)
+ {
+ transformer_state_t xstate;
+@@ -813,7 +851,7 @@ int unzip_main(int argc, char **argv)
+ }
+ check_file:
+ /* Extract file */
+- if (stat(dst_fn, &stat_buf) == -1) {
++ if (lstat(dst_fn, &stat_buf) == -1) {
+ /* File does not exist */
+ if (errno != ENOENT) {
+ bb_perror_msg_and_die("can't stat '%s'", dst_fn);
+@@ -834,6 +872,7 @@ int unzip_main(int argc, char **argv)
+ goto do_open_and_extract;
+ printf("replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ", dst_fn);
+ my_fgets80(key_buf);
++//TODO: redo lstat + ISREG check! user input could have taken a long time!
+
+ switch (key_buf[0]) {
+ case 'A':
+@@ -842,7 +881,8 @@ int unzip_main(int argc, char **argv)
+ do_open_and_extract:
+ unzip_create_leading_dirs(dst_fn);
+ #if ENABLE_FEATURE_UNZIP_CDF
+- dst_fd = xopen3(dst_fn, O_WRONLY | O_CREAT | O_TRUNC, file_mode);
++ if (!S_ISLNK(file_mode))
++ dst_fd = xopen3(dst_fn, O_WRONLY | O_CREAT | O_TRUNC, file_mode);
+ #else
+ dst_fd = xopen(dst_fn, O_WRONLY | O_CREAT | O_TRUNC);
+ #endif
+@@ -852,10 +892,18 @@ int unzip_main(int argc, char **argv)
+ ? " extracting: %s\n"
+ : */ " inflating: %s\n", dst_fn);
+ }
+- unzip_extract(&zip, dst_fd);
+- if (dst_fd != STDOUT_FILENO) {
+- /* closing STDOUT is potentially bad for future business */
+- close(dst_fd);
++#if ENABLE_FEATURE_UNZIP_CDF
++ if (S_ISLNK(file_mode)) {
++ if (dst_fd != STDOUT_FILENO) /* no -p */
++ unzip_extract_symlink(&zip, dst_fn);
++ } else
++#endif
++ {
++ unzip_extract(&zip, dst_fd);
++ if (dst_fd != STDOUT_FILENO) {
++ /* closing STDOUT is potentially bad for future business */
++ close(dst_fd);
++ };
+ }
+ break;
+
+diff --git a/coreutils/link.c b/coreutils/link.c
+index ac3ef85..aab249d 100644
+--- a/coreutils/link.c
++++ b/coreutils/link.c
+@@ -32,9 +32,8 @@ int link_main(int argc UNUSED_PARAM, char **argv)
+ argv += optind;
+ if (link(argv[0], argv[1]) != 0) {
+ /* shared message */
+- bb_perror_msg_and_die("can't create %slink "
+- "%s to %s", "hard",
+- argv[1], argv[0]
++ bb_perror_msg_and_die("can't create %slink '%s' to '%s'",
++ "hard", argv[1], argv[0]
+ );
+ }
+ return EXIT_SUCCESS;
+diff --git a/include/bb_archive.h b/include/bb_archive.h
+index 2b9c5f0..1e4da3c 100644
+--- a/include/bb_archive.h
++++ b/include/bb_archive.h
+@@ -196,6 +196,7 @@ void seek_by_jump(int fd, off_t amount) FAST_FUNC;
+ void seek_by_read(int fd, off_t amount) FAST_FUNC;
+
+ const char *strip_unsafe_prefix(const char *str) FAST_FUNC;
++int unsafe_symlink_target(const char *target) FAST_FUNC;
+
+ void data_align(archive_handle_t *archive_handle, unsigned boundary) FAST_FUNC;
+ const llist_t *find_list_entry(const llist_t *list, const char *filename) FAST_FUNC;
+diff --git a/libbb/copy_file.c b/libbb/copy_file.c
+index 23c0f83..be90066 100644
+--- a/libbb/copy_file.c
++++ b/libbb/copy_file.c
+@@ -371,7 +371,10 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags)
+ int r = symlink(lpath, dest);
+ free(lpath);
+ if (r < 0) {
+- bb_perror_msg("can't create symlink '%s'", dest);
++ /* shared message */
++ bb_perror_msg("can't create %slink '%s' to '%s'",
++ "sym", dest, lpath
++ );
+ return -1;
+ }
+ if (flags & FILEUTILS_PRESERVE_STATUS)
+diff --git a/testsuite/tar.tests b/testsuite/tar.tests
+index 9f7ce15..b7cd74c 100755
+--- a/testsuite/tar.tests
++++ b/testsuite/tar.tests
+@@ -10,9 +10,6 @@ unset LC_COLLATE
+ unset LC_ALL
+ umask 022
+
+-rm -rf tar.tempdir 2>/dev/null
+-mkdir tar.tempdir && cd tar.tempdir || exit 1
+-
+ # testing "test name" "script" "expected result" "file input" "stdin"
+
+ testing "Empty file is not a tarball" '\
+@@ -53,6 +50,7 @@ dd if=/dev/zero bs=512 count=20 2>/dev/null | tar xvf - 2>&1; echo $?
+ "" ""
+ SKIP=
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # "tar cf test.tar input input_dir/ input_hard1 input_hard2 input_hard1 input_dir/ input":
+ # GNU tar 1.26 records as hardlinks:
+ # input_hard2 -> input_hard1
+@@ -64,7 +62,6 @@ SKIP=
+ # We also don't use "hrw-r--r--" notation for hardlinks in "tar tv" listing.
+ optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES
+ testing "tar hardlinks and repeated files" '\
+-rm -rf input_* test.tar 2>/dev/null
+ >input_hard1
+ ln input_hard1 input_hard2
+ mkdir input_dir
+@@ -95,10 +92,11 @@ drwxr-xr-x input_dir
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES
+ testing "tar hardlinks mode" '\
+-rm -rf input_* test.tar 2>/dev/null
+ >input_hard1
+ chmod 741 input_hard1
+ ln input_hard1 input_hard2
+@@ -128,10 +126,11 @@ Ok: 0
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES
+ testing "tar symlinks mode" '\
+-rm -rf input_* test.tar 2>/dev/null
+ >input_file
+ chmod 741 input_file
+ ln -s input_file input_soft
+@@ -159,10 +158,11 @@ lrwxrwxrwx input_file
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ optional FEATURE_TAR_CREATE FEATURE_TAR_LONG_OPTIONS
+ testing "tar --overwrite" "\
+-rm -rf input_* test.tar 2>/dev/null
+ ln input input_hard
+ tar cf test.tar input_hard
+ echo WRONG >input
+@@ -174,12 +174,13 @@ Ok
+ " \
+ "Ok\n" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ test x"$SKIP_KNOWN_BUGS" = x"" && {
+ # Needs to be run under non-root for meaningful test
+ optional FEATURE_TAR_CREATE
+ testing "tar writing into read-only dir" '\
+-rm -rf input_* test.tar 2>/dev/null
+ mkdir input_dir
+ >input_dir/input_file
+ chmod 550 input_dir
+@@ -201,7 +202,9 @@ dr-xr-x--- input_dir
+ "" ""
+ SKIP=
+ }
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # Had a bug where on extract autodetect first "switched off" -z
+ # and then failed to recognize .tgz extension
+ optional FEATURE_TAR_CREATE FEATURE_SEAMLESS_GZ GUNZIP
+@@ -217,7 +220,9 @@ Ok
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # Do we detect XZ-compressed data (even w/o .tar.xz or txz extension)?
+ # (the uuencoded hello_world.txz contains one empty file named "hello_world")
+ optional UUDECODE FEATURE_TAR_AUTODETECT FEATURE_SEAMLESS_XZ
+@@ -236,7 +241,9 @@ AAAEWVo=
+ ====
+ "
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # On extract, everything up to and including last ".." component is stripped
+ optional FEATURE_TAR_CREATE
+ testing "tar strips /../ on extract" "\
+@@ -255,7 +262,9 @@ Ok
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # attack.tar.bz2 has symlink pointing to a system file
+ # followed by a regular file with the same name
+ # containing "root::0:0::/root:/bin/sh":
+@@ -270,6 +279,7 @@ optional UUDECODE FEATURE_TAR_AUTODETECT FEATURE_SEAMLESS_BZ2
+ testing "tar does not extract into symlinks" "\
+ >>/tmp/passwd && uudecode -o input && tar xf input 2>&1 && rm passwd; cat /tmp/passwd; echo \$?
+ " "\
++tar: skipping unsafe symlink to '/tmp/passwd' in archive, set EXTRACT_UNSAFE_SYMLINKS=1 to extract
+ 0
+ " \
+ "" "\
+@@ -281,12 +291,15 @@ l4/V8LDoe90yiWJhOJvIypgEfxdyRThQkBVn/bI=
+ ====
+ "
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
++
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # And same with -k
+ optional UUDECODE FEATURE_TAR_AUTODETECT FEATURE_SEAMLESS_BZ2
+ testing "tar -k does not extract into symlinks" "\
+ >>/tmp/passwd && uudecode -o input && tar xf input -k 2>&1 && rm passwd; cat /tmp/passwd; echo \$?
+ " "\
+-tar: can't open 'passwd': File exists
++tar: skipping unsafe symlink to '/tmp/passwd' in archive, set EXTRACT_UNSAFE_SYMLINKS=1 to extract
+ 0
+ " \
+ "" "\
+@@ -298,7 +311,9 @@ l4/V8LDoe90yiWJhOJvIypgEfxdyRThQkBVn/bI=
+ ====
+ "
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ optional UNICODE_SUPPORT FEATURE_TAR_GNU_EXTENSIONS FEATURE_SEAMLESS_BZ2 FEATURE_TAR_AUTODETECT
+ testing "Pax-encoded UTF8 names and symlinks" '\
+ tar xvf ../tar.utf8.tar.bz2 2>&1; echo $?
+@@ -309,17 +324,45 @@ rm -rf etc usr
+ ' "\
+ etc/ssl/certs/3b2716e5.0
+ etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem
++tar: skipping unsafe symlink to '/usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.crt' in archive, set EXTRACT_UNSAFE_SYMLINKS=1 to extract
+ etc/ssl/certs/f80cc7f6.0
+ usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.crt
+ 0
+ etc/ssl/certs/3b2716e5.0 -> EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem
+-etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem -> /usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.crt
+ etc/ssl/certs/f80cc7f6.0 -> EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
+-
+-cd .. && rm -rf tar.tempdir || exit 1
++mkdir tar.tempdir && cd tar.tempdir || exit 1
++optional UUDECODE FEATURE_SEAMLESS_BZ2 FEATURE_TAR_AUTODETECT
++testing "Symlink attack: create symlink and then write through it" '\
++exec 2>&1
++uudecode -o input && tar xvf input; echo $?
++ls /tmp/bb_test_evilfile
++ls bb_test_evilfile
++ls symlink/bb_test_evilfile
++' "\
++anything.txt
++symlink
++tar: skipping unsafe symlink to '/tmp' in archive, set EXTRACT_UNSAFE_SYMLINKS=1 to extract
++symlink/bb_test_evilfile
++0
++ls: /tmp/bb_test_evilfile: No such file or directory
++ls: bb_test_evilfile: No such file or directory
++symlink/bb_test_evilfile
++" \
++"" "\
++begin-base64 644 tar_symlink_attack.tar.bz2
++QlpoOTFBWSZTWZgs7bQAALT/hMmQAFBAAf+AEMAGJPPv32AAAIAIMAC5thlR
++omAjAmCMADQT1BqNE0AEwAAjAEwElTKeo9NTR6h6gaeoA0DQNLVdwZZ5iNTk
++AQwCAV6S00QFJYhrlfFkVCEDEGtgNVqYrI0uK3ggnt30gqk4e1TTQm5QIAKa
++SJqzRGSFLMmOloHSAcvLiFxxRiQtQZF+qPxbo173ZDISOAoNoPN4PQPhBhKS
++n8fYaKlioCTzL2oXYczyUUIP4u5IpwoSEwWdtoA=
++====
++"
++SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
+ exit $FAILCOUNT
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch
deleted file mode 100644
index 84cae6a..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From d474ffc68290e0a83651c4432eeabfa62cd51e87 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Thu, 10 Mar 2016 11:47:58 +0100
-Subject: [PATCH] udhcp: fix a SEGV on malformed RFC1035-encoded domain name
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-CVE: CVE-2016-2147
-
-https://git.busybox.net/busybox/commit/?id=d474ffc
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/udhcp/domain_codec.c | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-Index: busybox-1.23.2/networking/udhcp/domain_codec.c
-===================================================================
---- busybox-1.23.2.orig/networking/udhcp/domain_codec.c
-+++ busybox-1.23.2/networking/udhcp/domain_codec.c
-@@ -63,11 +63,10 @@ char* FAST_FUNC dname_dec(const uint8_t
- if (crtpos + *c + 1 > clen) /* label too long? abort */
- return NULL;
- if (dst)
-- memcpy(dst + len, c + 1, *c);
-+ /* \3com ---> "com." */
-+ ((char*)mempcpy(dst + len, c + 1, *c))[0] = '.';
- len += *c + 1;
- crtpos += *c + 1;
-- if (dst)
-- dst[len - 1] = '.';
- } else {
- /* NUL: end of current domain name */
- if (retpos == 0) {
-@@ -78,7 +77,10 @@ char* FAST_FUNC dname_dec(const uint8_t
- crtpos = retpos;
- retpos = depth = 0;
- }
-- if (dst)
-+ if (dst && len != 0)
-+ /* \4host\3com\0\4host and we are at \0:
-+ * \3com was converted to "com.", change dot to space.
-+ */
- dst[len - 1] = ' ';
- }
-
-@@ -228,6 +230,9 @@ int main(int argc, char **argv)
- int len;
- uint8_t *encoded;
-
-+ uint8_t str[6] = { 0x00, 0x00, 0x02, 0x65, 0x65, 0x00 };
-+ printf("NUL:'%s'\n", dname_dec(str, 6, ""));
-+
- #define DNAME_DEC(encoded,pre) dname_dec((uint8_t*)(encoded), sizeof(encoded), (pre))
- printf("'%s'\n", DNAME_DEC("\4host\3com\0", "test1:"));
- printf("test2:'%s'\n", DNAME_DEC("\4host\3com\0\4host\3com\0", ""));
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch
deleted file mode 100644
index b8349c0..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 1b7c17391de66502dd7a97c866e0a33681edbb1f Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 11 Mar 2016 00:26:58 +0100
-Subject: [PATCH] udhcpc: fix a warning in debug code
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-Upstream-Status: Backport
-CVE: CVE-2016-2147 regression fix
-
-https://git.busybox.net/busybox/commit/?id=1b7c17
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/udhcp/domain_codec.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/networking/udhcp/domain_codec.c b/networking/udhcp/domain_codec.c
-index cee31f1..5a923cc 100644
---- a/networking/udhcp/domain_codec.c
-+++ b/networking/udhcp/domain_codec.c
-@@ -7,6 +7,7 @@
- * Licensed under GPLv2 or later, see file LICENSE in this source tree.
- */
- #ifdef DNS_COMPR_TESTING
-+# define _GNU_SOURCE
- # define FAST_FUNC /* nothing */
- # define xmalloc malloc
- # include <stdlib.h>
---
-2.3.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch
deleted file mode 100644
index af04a7f..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 352f79acbd759c14399e39baef21fc4ffe180ac2 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 26 Feb 2016 15:54:56 +0100
-Subject: [PATCH] udhcpc: fix OPTION_6RD parsing (could overflow its malloced
- buffer)
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-CVE: CVE-2016-2148
-https://git.busybox.net/busybox/commit/?id=352f79
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/udhcp/common.c | 15 +++++++++++++--
- networking/udhcp/dhcpc.c | 4 ++--
- 2 files changed, 15 insertions(+), 4 deletions(-)
-
-Index: busybox-1.23.2/networking/udhcp/common.c
-===================================================================
---- busybox-1.23.2.orig/networking/udhcp/common.c
-+++ busybox-1.23.2/networking/udhcp/common.c
-@@ -142,7 +142,7 @@ const char dhcp_option_strings[] ALIGN1
- * udhcp_str2optset: to determine how many bytes to allocate.
- * xmalloc_optname_optval: to estimate string length
- * from binary option length: (option[LEN] / dhcp_option_lengths[opt_type])
-- * is the number of elements, multiply in by one element's string width
-+ * is the number of elements, multiply it by one element's string width
- * (len_of_option_as_string[opt_type]) and you know how wide string you need.
- */
- const uint8_t dhcp_option_lengths[] ALIGN1 = {
-@@ -162,7 +162,18 @@ const uint8_t dhcp_option_lengths[] ALIG
- [OPTION_S32] = 4,
- /* Just like OPTION_STRING, we use minimum length here */
- [OPTION_STATIC_ROUTES] = 5,
-- [OPTION_6RD] = 22, /* ignored by udhcp_str2optset */
-+ [OPTION_6RD] = 12, /* ignored by udhcp_str2optset */
-+ /* The above value was chosen as follows:
-+ * len_of_option_as_string[] for this option is >60: it's a string of the form
-+ * "32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 ".
-+ * Each additional ipv4 address takes 4 bytes in binary option and appends
-+ * another "255.255.255.255 " 16-byte string. We can set [OPTION_6RD] = 4
-+ * but this severely overestimates string length: instead of 16 bytes,
-+ * it adds >60 for every 4 bytes in binary option.
-+ * We cheat and declare here that option is in units of 12 bytes.
-+ * This adds more than 60 bytes for every three ipv4 addresses - more than enough.
-+ * (Even 16 instead of 12 should work, but let's be paranoid).
-+ */
- };
-
-
-Index: busybox-1.23.2/networking/udhcp/dhcpc.c
-===================================================================
---- busybox-1.23.2.orig/networking/udhcp/dhcpc.c
-+++ busybox-1.23.2/networking/udhcp/dhcpc.c
-@@ -103,7 +103,7 @@ static const uint8_t len_of_option_as_st
- [OPTION_IP ] = sizeof("255.255.255.255 "),
- [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2,
- [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "),
-- [OPTION_6RD ] = sizeof("32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
-+ [OPTION_6RD ] = sizeof("132 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
- [OPTION_STRING ] = 1,
- [OPTION_STRING_HOST ] = 1,
- #if ENABLE_FEATURE_UDHCP_RFC3397
-@@ -214,7 +214,7 @@ static NOINLINE char *xmalloc_optname_op
- type = optflag->flags & OPTION_TYPE_MASK;
- optlen = dhcp_option_lengths[type];
- upper_length = len_of_option_as_string[type]
-- * ((unsigned)(len + optlen - 1) / (unsigned)optlen);
-+ * ((unsigned)(len + optlen) / (unsigned)optlen);
-
- dest = ret = xmalloc(upper_length + strlen(opt_name) + 2);
- dest += sprintf(ret, "%s=", opt_name);
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-6301.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-6301.patch
deleted file mode 100644
index 851bc20..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-6301.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-busybox1.24.1: Fix CVE-2016-6301
-
-[No upstream tracking] -- https://bugzilla.redhat.com/show_bug.cgi?id=1363710
-
-ntpd: NTP server denial of service flaw
-
-The busybox NTP implementation doesn't check the NTP mode of packets
-received on the server port and responds to any packet with the right
-size. This includes responses from another NTP server. An attacker can
-send a packet with a spoofed source address in order to create an
-infinite loop of responses between two busybox NTP servers. Adding
-more packets to the loop increases the traffic between the servers
-until one of them has a fully loaded CPU and/or network.
-
-Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=150dc7a2b483b8338a3e185c478b4b23ee884e71]
-CVE: CVE-2016-6301
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
-
-diff --git a/networking/ntpd.c b/networking/ntpd.c
-index 9732c9b..0f6a55f 100644
---- a/networking/ntpd.c
-+++ b/networking/ntpd.c
-@@ -1985,6 +1985,13 @@ recv_and_process_client_pkt(void /*int fd*/)
- goto bail;
- }
-
-+ /* Respond only to client and symmetric active packets */
-+ if ((msg.m_status & MODE_MASK) != MODE_CLIENT
-+ && (msg.m_status & MODE_MASK) != MODE_SYM_ACT
-+ ) {
-+ goto bail;
-+ }
-+
- query_status = msg.m_status;
- query_xmttime = msg.m_xmttime;
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2017-15873.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2017-15873.patch
new file mode 100644
index 0000000..5a027c9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2017-15873.patch
@@ -0,0 +1,95 @@
+busybox-1.27.2: Fix CVE-2017-15873
+
+[No upstream tracking] -- https://bugs.busybox.net/show_bug.cgi?id=10431
+
+bunzip2: fix runCnt overflow
+
+The get_next_block function in archival/libarchive/decompress_bunzip2.c
+in BusyBox 1.27.2 has an Integer Overflow that may lead to a write
+access violation.
+
+Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=0402cb32df015d9372578e3db27db47b33d5c7b0]
+CVE: CVE-2017-15873
+bug: 10431
+Signed-off-by: Radovan Scasny <radovan.scasny@siemens.com>
+
+diff --git a/archival/libarchive/decompress_bunzip2.c b/archival/libarchive/decompress_bunzip2.c
+index 7cd18f5..bec89ed 100644
+--- a/archival/libarchive/decompress_bunzip2.c
++++ b/archival/libarchive/decompress_bunzip2.c
+@@ -156,15 +156,15 @@ static unsigned get_bits(bunzip_data *bd, int bits_wanted)
+ static int get_next_block(bunzip_data *bd)
+ {
+ struct group_data *hufGroup;
+- int dbufCount, dbufSize, groupCount, *base, *limit, selector,
+- i, j, runPos, symCount, symTotal, nSelectors, byteCount[256];
+- int runCnt = runCnt; /* for compiler */
++ int groupCount, *base, *limit, selector,
++ i, j, symCount, symTotal, nSelectors, byteCount[256];
+ uint8_t uc, symToByte[256], mtfSymbol[256], *selectors;
+ uint32_t *dbuf;
+ unsigned origPtr, t;
++ unsigned dbufCount, runPos;
++ unsigned runCnt = runCnt; /* for compiler */
+
+ dbuf = bd->dbuf;
+- dbufSize = bd->dbufSize;
+ selectors = bd->selectors;
+
+ /* In bbox, we are ok with aborting through setjmp which is set up in start_bunzip */
+@@ -187,7 +187,7 @@ static int get_next_block(bunzip_data *bd)
+ it didn't actually work. */
+ if (get_bits(bd, 1)) return RETVAL_OBSOLETE_INPUT;
+ origPtr = get_bits(bd, 24);
+- if ((int)origPtr > dbufSize) return RETVAL_DATA_ERROR;
++ if (origPtr > bd->dbufSize) return RETVAL_DATA_ERROR;
+
+ /* mapping table: if some byte values are never used (encoding things
+ like ascii text), the compression code removes the gaps to have fewer
+@@ -435,7 +435,14 @@ static int get_next_block(bunzip_data *bd)
+ symbols, but a run of length 0 doesn't mean anything in this
+ context). Thus space is saved. */
+ runCnt += (runPos << nextSym); /* +runPos if RUNA; +2*runPos if RUNB */
+- if (runPos < dbufSize) runPos <<= 1;
++//The 32-bit overflow of runCnt wasn't yet seen, but probably can happen.
++//This would be the fix (catches too large count way before it can overflow):
++// if (runCnt > bd->dbufSize) {
++// dbg("runCnt:%u > dbufSize:%u RETVAL_DATA_ERROR",
++// runCnt, bd->dbufSize);
++// return RETVAL_DATA_ERROR;
++// }
++ if (runPos < bd->dbufSize) runPos <<= 1;
+ goto end_of_huffman_loop;
+ }
+
+@@ -445,14 +452,15 @@ static int get_next_block(bunzip_data *bd)
+ literal used is the one at the head of the mtfSymbol array.) */
+ if (runPos != 0) {
+ uint8_t tmp_byte;
+- if (dbufCount + runCnt > dbufSize) {
+- dbg("dbufCount:%d+runCnt:%d %d > dbufSize:%d RETVAL_DATA_ERROR",
+- dbufCount, runCnt, dbufCount + runCnt, dbufSize);
++ if (dbufCount + runCnt > bd->dbufSize) {
++ dbg("dbufCount:%u+runCnt:%u %u > dbufSize:%u RETVAL_DATA_ERROR",
++ dbufCount, runCnt, dbufCount + runCnt, bd->dbufSize);
+ return RETVAL_DATA_ERROR;
+ }
+ tmp_byte = symToByte[mtfSymbol[0]];
+ byteCount[tmp_byte] += runCnt;
+- while (--runCnt >= 0) dbuf[dbufCount++] = (uint32_t)tmp_byte;
++ while ((int)--runCnt >= 0)
++ dbuf[dbufCount++] = (uint32_t)tmp_byte;
+ runPos = 0;
+ }
+
+@@ -466,7 +474,7 @@ static int get_next_block(bunzip_data *bd)
+ first symbol in the mtf array, position 0, would have been handled
+ as part of a run above. Therefore 1 unused mtf position minus
+ 2 non-literal nextSym values equals -1.) */
+- if (dbufCount >= dbufSize) return RETVAL_DATA_ERROR;
++ if (dbufCount >= bd->dbufSize) return RETVAL_DATA_ERROR;
+ i = nextSym - 1;
+ uc = mtfSymbol[i];
+
+--
+cgit v0.12
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch
deleted file mode 100644
index cdc9108..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-Upstream-Status: Backport
-
- http://busybox.net/downloads/fixes-1.24.1/
- https://git.busybox.net/busybox/commit/?id=e111a1640494fe87fc913f94fae3bb805de0fc99
- https://git.busybox.net/busybox/commit/?h=1_24_stable&id=be729c1d3b5c923f10871dd68ea94156d0f8c803
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From be729c1d3b5c923f10871dd68ea94156d0f8c803 Mon Sep 17 00:00:00 2001
-From: Ari Sundholm <ari@tuxera.com>
-Date: Mon, 4 Jan 2016 15:40:37 +0200
-Subject: [PATCH] truncate: always set mode when opening file to avoid fortify
- errors
-
-Busybox crashes due to no mode being given when opening:
-$ ./busybox truncate -s 1M foo
-*** invalid open64 call: O_CREAT without mode ***: ./busybox terminated
-======= Backtrace: =========
-/lib/x86_64-linux-gnu/libc.so.6(+0x7338f)[0x7f66d921338f]
-/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f66d92aac9c]
-/lib/x86_64-linux-gnu/libc.so.6(+0xeb6aa)[0x7f66d928b6aa]
-./busybox[0x4899f9]
-======= Memory map: ========
-00400000-004d0000 r-xp 00000000 00:1a 137559 /home/ari/busybox/busybox
-006cf000-006d0000 r--p 000cf000 00:1a 137559 /home/ari/busybox/busybox
-006d0000-006d1000 rw-p 000d0000 00:1a 137559 /home/ari/busybox/busybox
-006d1000-006d4000 rw-p 00000000 00:00 0
-014e7000-01508000 rw-p 00000000 00:00 0 [heap]
-7f66d8f8a000-7f66d8fa0000 r-xp 00000000 08:07 1579008 /lib/x86_64-linux-gnu/libgcc_s.so.1
-7f66d8fa0000-7f66d919f000 ---p 00016000 08:07 1579008 /lib/x86_64-linux-gnu/libgcc_s.so.1
-7f66d919f000-7f66d91a0000 rw-p 00015000 08:07 1579008 /lib/x86_64-linux-gnu/libgcc_s.so.1
-7f66d91a0000-7f66d935b000 r-xp 00000000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d935b000-7f66d955a000 ---p 001bb000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d955a000-7f66d955e000 r--p 001ba000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d955e000-7f66d9560000 rw-p 001be000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d9560000-7f66d9565000 rw-p 00000000 00:00 0
-7f66d9565000-7f66d966a000 r-xp 00000000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d966a000-7f66d9869000 ---p 00105000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d9869000-7f66d986a000 r--p 00104000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d986a000-7f66d986b000 rw-p 00105000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d986b000-7f66d988e000 r-xp 00000000 08:07 1578981 /lib/x86_64-linux-gnu/ld-2.19.so
-7f66d9a64000-7f66d9a67000 rw-p 00000000 00:00 0
-7f66d9a8a000-7f66d9a8d000 rw-p 00000000 00:00 0
-7f66d9a8d000-7f66d9a8e000 r--p 00022000 08:07 1578981 /lib/x86_64-linux-gnu/ld-2.19.so
-7f66d9a8e000-7f66d9a8f000 rw-p 00023000 08:07 1578981 /lib/x86_64-linux-gnu/ld-2.19.so
-7f66d9a8f000-7f66d9a90000 rw-p 00000000 00:00 0
-7ffc47761000-7ffc47782000 rw-p 00000000 00:00 0 [stack]
-7ffc477ab000-7ffc477ad000 r-xp 00000000 00:00 0 [vdso]
-ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
-Aborted (core dumped)
-$
-
-Fix this by simply always setting the mode, as it doesn't hurt even
-when O_CREAT is not specified.
-
-This bug is a regression introduced in fc3e40e, as xopen(), which
-was originally used, would automatically set the mode.
-
-Signed-off-by: Ari Sundholm <ari@tuxera.com>
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-(cherry picked from commit e111a1640494fe87fc913f94fae3bb805de0fc99)
----
- coreutils/truncate.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/coreutils/truncate.c b/coreutils/truncate.c
-index e5fa656..4c997bf 100644
---- a/coreutils/truncate.c
-+++ b/coreutils/truncate.c
-@@ -64,7 +64,7 @@ int truncate_main(int argc UNUSED_PARAM, char **argv)
-
- argv += optind;
- while (*argv) {
-- int fd = open(*argv, flags);
-+ int fd = open(*argv, flags, 0666);
- if (fd < 0) {
- if (errno != ENOENT || !(opts & OPT_NOCREATE)) {
- bb_perror_msg("%s: open", *argv);
---
-2.6.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch
deleted file mode 100644
index e3c5020..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-Upstream-Status: Backport
-
- http://busybox.net/downloads/fixes-1.24.1/
- http://git.busybox.net/busybox/commit/?id=092fabcf1df5d46cd22be4ffcd3b871f6180eb9c
- http://git.busybox.net/busybox/commit/?h=1_24_stable&id=092fabcf1df5d46cd22be4ffcd3b871f6180eb9c
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From 092fabcf1df5d46cd22be4ffcd3b871f6180eb9c Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 30 Oct 2015 23:41:53 +0100
-Subject: [PATCH] [g]unzip: fix recent breakage.
-
-Also, do emit error message we so painstakingly pass from gzip internals
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-(cherry picked from commit 6bd3fff51aa74e2ee2d87887b12182a3b09792ef)
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- archival/libarchive/decompress_gunzip.c | 33 +++++++++++++++++++++------------
- testsuite/unzip.tests | 1 +
- 2 files changed, 22 insertions(+), 12 deletions(-)
-
-diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c
-index c76fd31..357c9bf 100644
---- a/archival/libarchive/decompress_gunzip.c
-+++ b/archival/libarchive/decompress_gunzip.c
-@@ -309,8 +309,7 @@ static int huft_build(const unsigned *b, const unsigned n,
- huft_t *q; /* points to current table */
- huft_t r; /* table entry for structure assignment */
- huft_t *u[BMAX]; /* table stack */
-- unsigned v[N_MAX]; /* values in order of bit length */
-- unsigned v_end;
-+ unsigned v[N_MAX + 1]; /* values in order of bit length. last v[] is never used */
- int ws[BMAX + 1]; /* bits decoded stack */
- int w; /* bits decoded */
- unsigned x[BMAX + 1]; /* bit offsets, then code stack */
-@@ -365,15 +364,17 @@ static int huft_build(const unsigned *b, const unsigned n,
- *xp++ = j;
- }
-
-- /* Make a table of values in order of bit lengths */
-+ /* Make a table of values in order of bit lengths.
-+ * To detect bad input, unused v[i]'s are set to invalid value UINT_MAX.
-+ * In particular, last v[i] is never filled and must not be accessed.
-+ */
-+ memset(v, 0xff, sizeof(v));
- p = b;
- i = 0;
-- v_end = 0;
- do {
- j = *p++;
- if (j != 0) {
- v[x[j]++] = i;
-- v_end = x[j];
- }
- } while (++i < n);
-
-@@ -435,7 +436,9 @@ static int huft_build(const unsigned *b, const unsigned n,
-
- /* set up table entry in r */
- r.b = (unsigned char) (k - w);
-- if (p >= v + v_end) { // Was "if (p >= v + n)" but v[] can be shorter!
-+ if (/*p >= v + n || -- redundant, caught by the second check: */
-+ *p == UINT_MAX /* do we access uninited v[i]? (see memset(v))*/
-+ ) {
- r.e = 99; /* out of values--invalid code */
- } else if (*p < s) {
- r.e = (unsigned char) (*p < 256 ? 16 : 15); /* 256 is EOB code */
-@@ -520,8 +523,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
- e = t->e;
- if (e > 16)
- do {
-- if (e == 99)
-- abort_unzip(PASS_STATE_ONLY);;
-+ if (e == 99) {
-+ abort_unzip(PASS_STATE_ONLY);
-+ }
- bb >>= t->b;
- k -= t->b;
- e -= 16;
-@@ -557,8 +561,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
- e = t->e;
- if (e > 16)
- do {
-- if (e == 99)
-+ if (e == 99) {
- abort_unzip(PASS_STATE_ONLY);
-+ }
- bb >>= t->b;
- k -= t->b;
- e -= 16;
-@@ -824,8 +829,9 @@ static int inflate_block(STATE_PARAM smallint *e)
-
- b_dynamic >>= 4;
- k_dynamic -= 4;
-- if (nl > 286 || nd > 30)
-+ if (nl > 286 || nd > 30) {
- abort_unzip(PASS_STATE_ONLY); /* bad lengths */
-+ }
-
- /* read in bit-length-code lengths */
- for (j = 0; j < nb; j++) {
-@@ -906,12 +912,14 @@ static int inflate_block(STATE_PARAM smallint *e)
- bl = lbits;
-
- i = huft_build(ll, nl, 257, cplens, cplext, &inflate_codes_tl, &bl);
-- if (i != 0)
-+ if (i != 0) {
- abort_unzip(PASS_STATE_ONLY);
-+ }
- bd = dbits;
- i = huft_build(ll + nl, nd, 0, cpdist, cpdext, &inflate_codes_td, &bd);
-- if (i != 0)
-+ if (i != 0) {
- abort_unzip(PASS_STATE_ONLY);
-+ }
-
- /* set up data for inflate_codes() */
- inflate_codes_setup(PASS_STATE bl, bd);
-@@ -999,6 +1007,7 @@ inflate_unzip_internal(STATE_PARAM transformer_state_t *xstate)
- error_msg = "corrupted data";
- if (setjmp(error_jmp)) {
- /* Error from deep inside zip machinery */
-+ bb_error_msg(error_msg);
- n = -1;
- goto ret;
- }
-diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
-index ca0a458..d8738a3 100755
---- a/testsuite/unzip.tests
-+++ b/testsuite/unzip.tests
-@@ -34,6 +34,7 @@ rm foo.zip
- testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
- "Archive: bad.zip
- inflating: ]3j½r«IK-%Ix
-+unzip: corrupted data
- unzip: inflate error
- 1
- " \
---
-2.6.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch
deleted file mode 100644
index 7186726..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-Upstream-Status: Backport
-
- http://busybox.net/downloads/fixes-1.24.1/
- http://git.busybox.net/busybox/commit/?id=1de25a6e87e0e627aa34298105a3d17c60a1f44e
- http://git.busybox.net/busybox/commit/?h=1_24_stable&id=6767af17f11144c7cd3cfe9ef799d7f89a78fe65
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From 1de25a6e87e0e627aa34298105a3d17c60a1f44e Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Mon, 26 Oct 2015 19:33:05 +0100
-Subject: [PATCH] unzip: test for bad archive SEGVing
-
-function old new delta
-huft_build 1296 1300 +4
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
- archival/libarchive/decompress_gunzip.c | 11 +++++++----
- testsuite/unzip.tests | 23 ++++++++++++++++++++++-
- 2 files changed, 29 insertions(+), 5 deletions(-)
-
-diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c
-index 7b6f459..30bf451 100644
---- a/archival/libarchive/decompress_gunzip.c
-+++ b/archival/libarchive/decompress_gunzip.c
-@@ -305,11 +305,12 @@ static int huft_build(const unsigned *b, const unsigned n,
- unsigned i; /* counter, current code */
- unsigned j; /* counter */
- int k; /* number of bits in current code */
-- unsigned *p; /* pointer into c[], b[], or v[] */
-+ const unsigned *p; /* pointer into c[], b[], or v[] */
- huft_t *q; /* points to current table */
- huft_t r; /* table entry for structure assignment */
- huft_t *u[BMAX]; /* table stack */
- unsigned v[N_MAX]; /* values in order of bit length */
-+ unsigned v_end;
- int ws[BMAX + 1]; /* bits decoded stack */
- int w; /* bits decoded */
- unsigned x[BMAX + 1]; /* bit offsets, then code stack */
-@@ -324,7 +325,7 @@ static int huft_build(const unsigned *b, const unsigned n,
-
- /* Generate counts for each bit length */
- memset(c, 0, sizeof(c));
-- p = (unsigned *) b; /* cast allows us to reuse p for pointing to b */
-+ p = b;
- i = n;
- do {
- c[*p]++; /* assume all entries <= BMAX */
-@@ -365,12 +366,14 @@ static int huft_build(const unsigned *b, const unsigned n,
- }
-
- /* Make a table of values in order of bit lengths */
-- p = (unsigned *) b;
-+ p = b;
- i = 0;
-+ v_end = 0;
- do {
- j = *p++;
- if (j != 0) {
- v[x[j]++] = i;
-+ v_end = x[j];
- }
- } while (++i < n);
-
-@@ -432,7 +435,7 @@ static int huft_build(const unsigned *b, const unsigned n,
-
- /* set up table entry in r */
- r.b = (unsigned char) (k - w);
-- if (p >= v + n) {
-+ if (p >= v + v_end) { // Was "if (p >= v + n)" but v[] can be shorter!
- r.e = 99; /* out of values--invalid code */
- } else if (*p < s) {
- r.e = (unsigned char) (*p < 256 ? 16 : 15); /* 256 is EOB code */
-diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
-index 8677a03..ca0a458 100755
---- a/testsuite/unzip.tests
-+++ b/testsuite/unzip.tests
-@@ -7,7 +7,7 @@
-
- . ./testing.sh
-
--# testing "test name" "options" "expected result" "file input" "stdin"
-+# testing "test name" "commands" "expected result" "file input" "stdin"
- # file input will be file called "input"
- # test can create a file "actual" instead of writing to stdout
-
-@@ -30,6 +30,27 @@ testing "unzip (subdir only)" "unzip -q foo.zip foo/ && test -d foo && test ! -f
- rmdir foo
- rm foo.zip
-
-+# File containing some damaged encrypted stream
-+testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
-+"Archive: bad.zip
-+ inflating: ]3j½r«IK-%Ix
-+unzip: inflate error
-+1
-+" \
-+"" "\
-+begin-base64 644 bad.zip
-+UEsDBBQAAgkIAAAAIQA5AAAANwAAADwAAAAQAAcAXTNqwr1ywqtJGxJLLSVJ
-+eCkBD0AdKBk8JzQsIj01JC0/ORJQSwMEFAECCAAAAAAhADoAAAAPAAAANgAA
-+AAwAAQASw73Ct1DCokohPXQiNjoUNTUiHRwgLT4WHlBLAQIQABQAAggIAAAA
-+oQA5AAAANwAAADwAAAAQQAcADAAAACwAMgCAAAAAAABdM2rCvXLCq0kbEkst
-+JUl4KQEPQB0oGSY4Cz4QNgEnJSYIPVBLAQIAABQAAggAAAAAIQAqAAAADwAA
-+BDYAAAAMAAEADQAAADIADQAAAEEAAAASw73Ct1DKokohPXQiNzA+FAI1HCcW
-+NzITNFBLBQUKAC4JAA04Cw0EOhZQSwUGAQAABAIAAgCZAAAAeQAAAAIALhM=
-+====
-+"
-+
-+rm *
-+
- # Clean up scratch directory.
-
- cd ..
---
-2.6.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-CVE-2017-16544.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-CVE-2017-16544.patch
new file mode 100644
index 0000000..fc19ee3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-CVE-2017-16544.patch
@@ -0,0 +1,43 @@
+From c3797d40a1c57352192c6106cc0f435e7d9c11e8 Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <vda.linux@googlemail.com>
+Date: Tue, 7 Nov 2017 18:09:29 +0100
+Subject: lineedit: do not tab-complete any strings which have control
+ characters
+
+function old new delta
+add_match 41 68 +27
+
+CVE: CVE-2017-16544
+Upstream-Status: Backport
+
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
+---
+ libbb/lineedit.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/libbb/lineedit.c b/libbb/lineedit.c
+index c0e35bb..56e8140 100644
+--- a/libbb/lineedit.c
++++ b/libbb/lineedit.c
+@@ -645,6 +645,18 @@ static void free_tab_completion_data(void)
+
+ static void add_match(char *matched)
+ {
++ unsigned char *p = (unsigned char*)matched;
++ while (*p) {
++ /* ESC attack fix: drop any string with control chars */
++ if (*p < ' '
++ || (!ENABLE_UNICODE_SUPPORT && *p >= 0x7f)
++ || (ENABLE_UNICODE_SUPPORT && *p == 0x7f)
++ ) {
++ free(matched);
++ return;
++ }
++ p++;
++ }
+ matches = xrealloc_vector(matches, 4, num_matches);
+ matches[num_matches] = matched;
+ num_matches++;
+--
+cgit v0.12
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
index bda8685..6faca22 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
@@ -33,7 +33,7 @@
scripts/kconfig/lxdialog/Makefile | 2 +-
scripts/kconfig/lxdialog/check-lxdialog.sh | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
-
+
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -4,6 +4,10 @@
@@ -44,10 +44,10 @@
+ echo "$CROSS_CURSES_LIB"
+ exit
+ fi
- for ext in so a dylib ; do
- for lib in ncursesw ncurses curses ; do
- $cc -print-file-name=lib${lib}.${ext} | grep -q /
-@@ -19,6 +23,10 @@ ldflags()
+ pkg-config --libs ncursesw 2>/dev/null && exit
+ pkg-config --libs ncurses 2>/dev/null && exit
+ for ext in so a dll.a dylib ; do
+@@ -21,6 +25,10 @@
# Where is ncurses.h?
ccflags()
{
@@ -55,12 +55,12 @@
+ echo "$CROSS_CURSES_INC"
+ exit
+ fi
- if [ -f /usr/include/ncursesw/ncurses.h ]; then
- echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>"'
- elif [ -f /usr/include/ncursesw/curses.h ]; then
+ if pkg-config --cflags ncursesw 2>/dev/null; then
+ echo '-DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1'
+ elif pkg-config --cflags ncurses 2>/dev/null; then
--- a/scripts/kconfig/lxdialog/Makefile
+++ b/scripts/kconfig/lxdialog/Makefile
-@@ -5,7 +5,7 @@ check-lxdialog := $(srctree)/$(src)/che
+@@ -5,7 +5,7 @@
# Use reursively expanded variables so we do not call gcc unless
# we really need to do so. (Do not call gcc as part of make mrproper)
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch
deleted file mode 100644
index 38302e0..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Upstream-Status: Backport
-
-Patch addressing a parallel make race in Busybox
-
- http://git.busybox.net/busybox/commit/?id=d8e61bbf13d0cf38d477255cfd5dc71c5d51d575
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
-From d8e61bbf13d0cf38d477255cfd5dc71c5d51d575 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 21 Aug 2016 22:00:20 +0200
-Subject: build system: different fix for
- include/applet_tables.h/include/NUM_APPLETS.h
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-diff --git a/applets/Kbuild.src b/applets/Kbuild.src
-index 5cc1827..3aedbbf 100644
---- a/applets/Kbuild.src
-+++ b/applets/Kbuild.src
-@@ -29,7 +29,7 @@ applets/applets.o: include/usage_compressed.h include/applet_tables.h
-
- applets/applet_tables: .config include/applets.h
- applets/usage: .config include/applets.h
--applets/usage_pod: .config include/applets.h include/applet_tables.h include/NUM_APPLETS.h
-+applets/usage_pod: .config include/applets.h include/applet_tables.h
-
- quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
- cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets
-@@ -37,8 +37,21 @@ quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
- include/usage_compressed.h: applets/usage $(srctree_slash)applets/usage_compressed
- $(call cmd,gen_usage_compressed)
-
--quiet_cmd_gen_applet_tables = GEN include/applet_tables.h
-+quiet_cmd_gen_applet_tables = GEN include/applet_tables.h include/NUM_APPLETS.h
- cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h include/NUM_APPLETS.h
-
--include/applet_tables.h include/NUM_APPLETS.h: applets/applet_tables
-+include/NUM_APPLETS.h: applets/applet_tables
-+ $(call cmd,gen_applet_tables)
-+
-+# In fact, include/applet_tables.h depends only on applets/applet_tables,
-+# and is generated by it. But specifying only it can run
-+# applets/applet_tables twice, possibly in parallel.
-+# We say that it also needs NUM_APPLETS.h
-+#
-+# Unfortunately, we need to list the same command,
-+# and it can be executed twice (sequentially).
-+# The alternative is to not list any command,
-+# and then if include/applet_tables.h is deleted, it won't be rebuilt.
-+#
-+include/applet_tables.h: include/NUM_APPLETS.h applets/applet_tables
- $(call cmd,gen_applet_tables)
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-tar-add-IF_FEATURE_-checks.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-tar-add-IF_FEATURE_-checks.patch
deleted file mode 100644
index 0c3c9c0..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-tar-add-IF_FEATURE_-checks.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From f94412f6bb49136694c5478d0aecb19118d1b08d Mon Sep 17 00:00:00 2001
-From: Ming Liu <peter.x.liu@external.atlascopco.com>
-Date: Wed, 31 May 2017 11:48:09 +0200
-Subject: [PATCH] tar: add IF_FEATURE_* checks
-
-A following linking error was observed:
-| ==========
-| archival/lib.a(tar.o): In function `tar_main':
-| archival/tar.c:1168: undefined reference to `unpack_Z_stream'
-| archival/tar.c:1168: undefined reference to `unpack_Z_stream'
-| ld: busybox_unstripped: hidden symbol `unpack_Z_stream' isn't defined
-| ld: final link failed: Bad value
-
-this happened with clang compiler, with the following configs:
-| CONFIG_TAR=y
-| # CONFIG_FEATURE_SEAMLESS_Z is not set
-
-which can be fixed by adding IF_FEATURE_* checks in.
-
-Upstream-Status: Pending [ Sent to busybox upstream on 2017-06-02 ]
-
-Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
----
- archival/tar.c | 25 +++++++++++++++----------
- 1 file changed, 15 insertions(+), 10 deletions(-)
-
-diff --git a/archival/tar.c b/archival/tar.c
-index b70e00a..7598b71 100644
---- a/archival/tar.c
-+++ b/archival/tar.c
-@@ -1216,21 +1216,26 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
- USE_FOR_MMU(IF_DESKTOP(long long) int FAST_FUNC (*xformer)(transformer_state_t *xstate);)
- USE_FOR_NOMMU(const char *xformer_prog;)
-
-- if (opt & OPT_COMPRESS)
-- USE_FOR_MMU(xformer = unpack_Z_stream;)
-+ if (opt & OPT_COMPRESS) {
-+ USE_FOR_MMU(IF_FEATURE_SEAMLESS_Z(xformer = unpack_Z_stream;))
- USE_FOR_NOMMU(xformer_prog = "uncompress";)
-- if (opt & OPT_GZIP)
-- USE_FOR_MMU(xformer = unpack_gz_stream;)
-+ }
-+ if (opt & OPT_GZIP) {
-+ USE_FOR_MMU(IF_FEATURE_SEAMLESS_GZ(xformer = unpack_gz_stream;))
- USE_FOR_NOMMU(xformer_prog = "gunzip";)
-- if (opt & OPT_BZIP2)
-- USE_FOR_MMU(xformer = unpack_bz2_stream;)
-+ }
-+ if (opt & OPT_BZIP2) {
-+ USE_FOR_MMU(IF_FEATURE_SEAMLESS_BZ2(xformer = unpack_bz2_stream;))
- USE_FOR_NOMMU(xformer_prog = "bunzip2";)
-- if (opt & OPT_LZMA)
-- USE_FOR_MMU(xformer = unpack_lzma_stream;)
-+ }
-+ if (opt & OPT_LZMA) {
-+ USE_FOR_MMU(IF_FEATURE_SEAMLESS_LZMA(xformer = unpack_lzma_stream;))
- USE_FOR_NOMMU(xformer_prog = "unlzma";)
-- if (opt & OPT_XZ)
-- USE_FOR_MMU(xformer = unpack_xz_stream;)
-+ }
-+ if (opt & OPT_XZ) {
-+ USE_FOR_MMU(IF_FEATURE_SEAMLESS_XZ(xformer = unpack_xz_stream;))
- USE_FOR_NOMMU(xformer_prog = "unxz";)
-+ }
-
- fork_transformer_with_sig(tar_handle->src_fd, xformer, xformer_prog);
- /* Can't lseek over pipes */
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
index 4c9ce3b..582a258 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
@@ -28,24 +28,23 @@
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
- networking/udhcp/dhcpc.c | 29 +++++++++++++++++++++--------
- 1 files changed, 21 insertions(+), 8 deletions(-)
+ networking/udhcp/dhcpc.c | 29 ++++++++++++++++------
+ 1 file changed, 21 insertions(+), 8 deletions(-)
-Index: busybox-1.20.2/networking/udhcp/dhcpc.c
+Index: busybox-1.27.2/networking/udhcp/dhcpc.c
===================================================================
---- busybox-1.20.2.orig/networking/udhcp/dhcpc.c
-+++ busybox-1.20.2/networking/udhcp/dhcpc.c
-@@ -29,6 +29,9 @@
- #include <netpacket/packet.h>
- #include <linux/filter.h>
+--- busybox-1.27.2.orig/networking/udhcp/dhcpc.c
++++ busybox-1.27.2/networking/udhcp/dhcpc.c
+@@ -49,6 +49,8 @@ struct tpacket_auxdata {
+ };
+ #endif
+/* option whether to down the interface when reconfiguring */
+static int allow_deconfig = 1;
-+
+
/* "struct client_config_t client_config" is in bb_common_bufsiz1 */
-
-@@ -81,8 +84,9 @@ enum {
+@@ -104,8 +106,9 @@ enum {
OPT_x = 1 << 18,
OPT_f = 1 << 19,
OPT_B = 1 << 20,
@@ -56,7 +55,7 @@
USE_FOR_MMU( OPTBIT_b,)
IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,)
IF_FEATURE_UDHCP_PORT( OPTBIT_P,)
-@@ -1040,7 +1044,8 @@ static void perform_renew(void)
+@@ -1110,7 +1113,8 @@ static void perform_renew(void)
state = RENEW_REQUESTED;
break;
case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
@@ -66,36 +65,37 @@
case REQUESTING:
case RELEASED:
change_listen_mode(LISTEN_RAW);
-@@ -1064,7 +1069,8 @@ static void perform_release(uint32_t ser
- bb_info_msg("Unicasting a release of %s to %s",
- inet_ntoa(temp_addr), buffer);
- send_release(server_addr, requested_ip); /* unicast */
-- udhcp_run_script(NULL, "deconfig");
-+ if (allow_deconfig)
-+ udhcp_run_script(NULL, "deconfig");
- }
- bb_info_msg("Entering released state");
+@@ -1146,7 +1150,8 @@ static void perform_release(uint32_t server_addr, uint32_t requested_ip)
+ * Users requested to be notified in all cases, even if not in one
+ * of the states above.
+ */
+- udhcp_run_script(NULL, "deconfig");
++ if (allow_deconfig)
++ udhcp_run_script(NULL, "deconfig");
-@@ -1215,7 +1221,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+ change_listen_mode(LISTEN_NONE);
+ state = RELEASED;
+@@ -1298,7 +1303,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
/* O,x: list; -T,-t,-A take numeric param */
- opt_complementary = "O::x::T+:t+:A+" IF_UDHCP_VERBOSE(":vv") ;
+ IF_UDHCP_VERBOSE(opt_complementary = "vv";)
IF_LONG_OPTS(applet_long_options = udhcpc_longopts;)
-- opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:t:SA:O:ox:fB"
-+ opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:t:SA:O:ox:fBD"
+- opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fB"
++ opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fBD"
USE_FOR_MMU("b")
- IF_FEATURE_UDHCPC_ARPING("a")
+ IF_FEATURE_UDHCPC_ARPING("a::")
IF_FEATURE_UDHCP_PORT("P:")
-@@ -1316,6 +1322,9 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1409,6 +1414,10 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
logmode |= LOGMODE_SYSLOG;
}
-+ if (opt & OPT_D)
++ if (opt & OPT_D) {
+ allow_deconfig = 0;
++ }
+
/* Make sure fd 0,1,2 are open */
bb_sanitize_stdio();
/* Equivalent of doing a fflush after every \n */
-@@ -1330,7 +1339,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1423,7 +1432,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
srand(monotonic_us());
state = INIT_SELECTING;
@@ -105,17 +105,17 @@
change_listen_mode(LISTEN_RAW);
packet_num = 0;
timeout = 0;
-@@ -1484,7 +1494,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1577,7 +1587,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
}
/* Timed out, enter init state */
- bb_info_msg("Lease lost, entering init state");
+ bb_error_msg("lease lost, entering init state");
- udhcp_run_script(NULL, "deconfig");
+ if (allow_deconfig)
+ udhcp_run_script(NULL, "deconfig");
state = INIT_SELECTING;
client_config.first_secs = 0; /* make secs field count from 0 */
/*timeout = 0; - already is */
-@@ -1667,7 +1678,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1770,7 +1781,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
send_decline(/*xid,*/ server_addr, packet.yiaddr);
if (state != REQUESTING)
@@ -125,8 +125,8 @@
change_listen_mode(LISTEN_RAW);
state = INIT_SELECTING;
client_config.first_secs = 0; /* make secs field count from 0 */
-@@ -1711,7 +1723,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
- bb_info_msg("Received DHCP NAK");
+@@ -1840,7 +1852,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
+ bb_error_msg("received %s", "DHCP NAK");
udhcp_run_script(&packet, "nak");
if (state != REQUESTING)
- udhcp_run_script(NULL, "deconfig");
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
deleted file mode 100644
index 7f80a1d..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Upstream-Status: Backport
-
-Patch addressing a parallel make race in Busybox
-
- http://git.busybox.net/busybox/commit/?id=0dddbc1a59795a77679d8c5ef48a2795cb470563
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
-From 0dddbc1a59795a77679d8c5ef48a2795cb470563 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Tue, 23 Aug 2016 20:21:36 +0200
-Subject: build system: always rewrite NUM_APPLETS.h
-
-Conditional rewrite can keep NUM_APPLETS.h mtime old,
-this causes make to try to regenerate it at every invocation.
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-diff --git a/applets/applet_tables.c b/applets/applet_tables.c
-index 8401a15..ef911a4 100644
---- a/applets/applet_tables.c
-+++ b/applets/applet_tables.c
-@@ -192,27 +192,28 @@ int main(int argc, char **argv)
- printf("};\n");
- #endif
- //printf("#endif /* SKIP_definitions */\n");
-+
- // printf("\n");
- // printf("#define MAX_APPLET_NAME_LEN %u\n", MAX_APPLET_NAME_LEN);
-
- if (argv[2]) {
-- char line_old[80];
-- char line_new[80];
- FILE *fp;
-+ char line_new[80];
-+// char line_old[80];
-
-- line_old[0] = 0;
-- fp = fopen(argv[2], "r");
-- if (fp) {
-- fgets(line_old, sizeof(line_old), fp);
-- fclose(fp);
-- }
- sprintf(line_new, "#define NUM_APPLETS %u\n", NUM_APPLETS);
-- if (strcmp(line_old, line_new) != 0) {
-+// line_old[0] = 0;
-+// fp = fopen(argv[2], "r");
-+// if (fp) {
-+// fgets(line_old, sizeof(line_old), fp);
-+// fclose(fp);
-+// }
-+// if (strcmp(line_old, line_new) != 0) {
- fp = fopen(argv[2], "w");
- if (!fp)
- return 1;
- fputs(line_new, fp);
-- }
-+// }
- }
-
- return 0;
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig
index cc68bea..fbb5fd8 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig
@@ -1,43 +1,25 @@
#
# Automatically generated make config: don't edit
-# Busybox version: 1.24.1
-# Tue Oct 31 11:00:00 2015
+# Busybox version: 1.27.2
+# Wed Sep 27 08:56:13 2017
#
CONFIG_HAVE_DOT_CONFIG=y
#
# Busybox Settings
#
-
-#
-# General Configuration
-#
# CONFIG_DESKTOP is not set
# CONFIG_EXTRA_COMPAT is not set
+# CONFIG_FEDORA_COMPAT is not set
# CONFIG_INCLUDE_SUSv2 is not set
# CONFIG_USE_PORTABLE_CODE is not set
-CONFIG_PLATFORM_LINUX=y
-CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
-# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
-# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
CONFIG_SHOW_USAGE=y
# CONFIG_FEATURE_VERBOSE_USAGE is not set
CONFIG_FEATURE_COMPRESS_USAGE=y
+CONFIG_BUSYBOX=y
# CONFIG_FEATURE_INSTALLER is not set
# CONFIG_INSTALL_NO_USR is not set
-# CONFIG_LOCALE_SUPPORT is not set
-# CONFIG_UNICODE_SUPPORT is not set
-# CONFIG_UNICODE_USING_LOCALE is not set
-# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
-CONFIG_SUBST_WCHAR=0
-CONFIG_LAST_SUPPORTED_WCHAR=0
-# CONFIG_UNICODE_COMBINING_WCHARS is not set
-# CONFIG_UNICODE_WIDE_WCHARS is not set
-# CONFIG_UNICODE_BIDI_SUPPORT is not set
-# CONFIG_UNICODE_NEUTRAL_TABLE is not set
-# CONFIG_UNICODE_PRESERVE_BROKEN is not set
# CONFIG_PAM is not set
-CONFIG_FEATURE_USE_SENDFILE=y
CONFIG_LONG_OPTS=y
CONFIG_FEATURE_DEVPTS=y
# CONFIG_FEATURE_CLEAN_UP is not set
@@ -53,6 +35,7 @@
CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
CONFIG_FEATURE_SYSLOG=y
# CONFIG_FEATURE_HAVE_RPC is not set
+CONFIG_PLATFORM_LINUX=y
#
# Build Options
@@ -71,17 +54,6 @@
CONFIG_EXTRA_LDLIBS=""
#
-# Debugging Options
-#
-# CONFIG_DEBUG is not set
-# CONFIG_DEBUG_PESSIMIZE is not set
-# CONFIG_UNIT_TEST is not set
-# CONFIG_WERROR is not set
-CONFIG_NO_DEBUG_LIB=y
-# CONFIG_DMALLOC is not set
-# CONFIG_EFENCE is not set
-
-#
# Installation Options ("make install" behavior)
#
CONFIG_INSTALL_APPLET_SYMLINKS=y
@@ -94,16 +66,30 @@
CONFIG_PREFIX="./_install"
#
+# Debugging Options
+#
+# CONFIG_DEBUG is not set
+# CONFIG_DEBUG_PESSIMIZE is not set
+# CONFIG_DEBUG_SANITIZE is not set
+# CONFIG_UNIT_TEST is not set
+# CONFIG_WERROR is not set
+CONFIG_NO_DEBUG_LIB=y
+# CONFIG_DMALLOC is not set
+# CONFIG_EFENCE is not set
+
+#
# Busybox Library Tuning
#
-CONFIG_FEATURE_SYSTEMD=y
+# CONFIG_FEATURE_USE_BSS_TAIL is not set
CONFIG_FEATURE_RTMINMAX=y
+CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
+# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
+# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
CONFIG_PASSWORD_MINLEN=6
CONFIG_MD5_SMALL=1
CONFIG_SHA3_SMALL=1
CONFIG_FEATURE_FAST_TOP=y
# CONFIG_FEATURE_ETC_NETWORKS is not set
-CONFIG_FEATURE_USE_TERMIOS=y
CONFIG_FEATURE_EDITING=y
CONFIG_FEATURE_EDITING_MAX_LEN=1024
# CONFIG_FEATURE_EDITING_VI is not set
@@ -115,8 +101,20 @@
CONFIG_FEATURE_USERNAME_COMPLETION=y
CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
+# CONFIG_LOCALE_SUPPORT is not set
+# CONFIG_UNICODE_SUPPORT is not set
+# CONFIG_UNICODE_USING_LOCALE is not set
+# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
+CONFIG_SUBST_WCHAR=0
+CONFIG_LAST_SUPPORTED_WCHAR=0
+# CONFIG_UNICODE_COMBINING_WCHARS is not set
+# CONFIG_UNICODE_WIDE_WCHARS is not set
+# CONFIG_UNICODE_BIDI_SUPPORT is not set
+# CONFIG_UNICODE_NEUTRAL_TABLE is not set
+# CONFIG_UNICODE_PRESERVE_BROKEN is not set
CONFIG_FEATURE_NON_POSIX_CP=y
# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
+CONFIG_FEATURE_USE_SENDFILE=y
CONFIG_FEATURE_COPYBUF_KB=4
CONFIG_FEATURE_SKIP_ROOTFS=y
CONFIG_MONOTONIC_SYSCALL=y
@@ -140,76 +138,59 @@
# CONFIG_FEATURE_AR_CREATE is not set
# CONFIG_UNCOMPRESS is not set
CONFIG_GUNZIP=y
+CONFIG_ZCAT=y
+CONFIG_FEATURE_GUNZIP_LONG_OPTIONS=y
CONFIG_BUNZIP2=y
+CONFIG_BZCAT=y
# CONFIG_UNLZMA is not set
-# CONFIG_FEATURE_LZMA_FAST is not set
+CONFIG_LZCAT=y
# CONFIG_LZMA is not set
+# CONFIG_FEATURE_LZMA_FAST is not set
# CONFIG_UNXZ is not set
+CONFIG_XZCAT=y
# CONFIG_XZ is not set
# CONFIG_BZIP2 is not set
+CONFIG_FEATURE_BZIP2_DECOMPRESS=y
CONFIG_CPIO=y
# CONFIG_FEATURE_CPIO_O is not set
# CONFIG_FEATURE_CPIO_P is not set
# CONFIG_DPKG is not set
# CONFIG_DPKG_DEB is not set
-# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
CONFIG_GZIP=y
# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set
CONFIG_GZIP_FAST=0
# CONFIG_FEATURE_GZIP_LEVELS is not set
+CONFIG_FEATURE_GZIP_DECOMPRESS=y
# CONFIG_LZOP is not set
+# CONFIG_UNLZOP is not set
+# CONFIG_LZOPCAT is not set
# CONFIG_LZOP_COMPR_HIGH is not set
# CONFIG_RPM is not set
# CONFIG_RPM2CPIO is not set
CONFIG_TAR=y
+# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
CONFIG_FEATURE_TAR_CREATE=y
CONFIG_FEATURE_TAR_AUTODETECT=y
CONFIG_FEATURE_TAR_FROM=y
CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y
# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
-# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
# CONFIG_FEATURE_TAR_TO_COMMAND is not set
# CONFIG_FEATURE_TAR_UNAME_GNAME is not set
CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y
# CONFIG_FEATURE_TAR_SELINUX is not set
CONFIG_UNZIP=y
+CONFIG_FEATURE_UNZIP_CDF=y
+# CONFIG_FEATURE_UNZIP_BZIP2 is not set
+# CONFIG_FEATURE_UNZIP_LZMA is not set
+# CONFIG_FEATURE_UNZIP_XZ is not set
#
# Coreutils
#
CONFIG_BASENAME=y
CONFIG_CAT=y
-CONFIG_DATE=y
-# CONFIG_FEATURE_DATE_ISOFMT is not set
-# CONFIG_FEATURE_DATE_NANO is not set
-CONFIG_FEATURE_DATE_COMPAT=y
-CONFIG_DD=y
-CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
-# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set
-# CONFIG_FEATURE_DD_IBS_OBS is not set
-# CONFIG_FEATURE_DD_STATUS is not set
-# CONFIG_HOSTID is not set
-CONFIG_ID=y
-CONFIG_GROUPS=y
-CONFIG_SHUF=y
-CONFIG_SYNC=y
-# CONFIG_FEATURE_SYNC_FANCY is not set
-CONFIG_TEST=y
-CONFIG_FEATURE_TEST_64=y
-CONFIG_TOUCH=y
-CONFIG_FEATURE_TOUCH_NODEREF=y
-CONFIG_FEATURE_TOUCH_SUSV3=y
-CONFIG_TR=y
-CONFIG_FEATURE_TR_CLASSES=y
-# CONFIG_FEATURE_TR_EQUIV is not set
-# CONFIG_TRUNCATE is not set
-CONFIG_UNLINK=y
-# CONFIG_BASE64 is not set
-CONFIG_WHO=y
-CONFIG_USERS=y
-# CONFIG_CAL is not set
-# CONFIG_CATV is not set
+# CONFIG_FEATURE_CATV is not set
CONFIG_CHGRP=y
CONFIG_CHMOD=y
CONFIG_CHOWN=y
@@ -220,6 +201,15 @@
CONFIG_CP=y
# CONFIG_FEATURE_CP_LONG_OPTIONS is not set
CONFIG_CUT=y
+CONFIG_DATE=y
+# CONFIG_FEATURE_DATE_ISOFMT is not set
+# CONFIG_FEATURE_DATE_NANO is not set
+CONFIG_FEATURE_DATE_COMPAT=y
+CONFIG_DD=y
+CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
+# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+# CONFIG_FEATURE_DD_STATUS is not set
CONFIG_DF=y
# CONFIG_FEATURE_DF_FANCY is not set
CONFIG_DIRNAME=y
@@ -233,36 +223,57 @@
CONFIG_FEATURE_ENV_LONG_OPTIONS=y
# CONFIG_EXPAND is not set
# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set
+# CONFIG_UNEXPAND is not set
+# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set
CONFIG_EXPR=y
CONFIG_EXPR_MATH_SUPPORT_64=y
+# CONFIG_FACTOR is not set
CONFIG_FALSE=y
# CONFIG_FOLD is not set
# CONFIG_FSYNC is not set
CONFIG_HEAD=y
# CONFIG_FEATURE_FANCY_HEAD is not set
+# CONFIG_HOSTID is not set
+CONFIG_ID=y
+CONFIG_GROUPS=y
# CONFIG_INSTALL is not set
# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+# CONFIG_LINK is not set
CONFIG_LN=y
CONFIG_LOGNAME=y
CONFIG_LS=y
CONFIG_FEATURE_LS_FILETYPES=y
CONFIG_FEATURE_LS_FOLLOWLINKS=y
CONFIG_FEATURE_LS_RECURSIVE=y
+CONFIG_FEATURE_LS_WIDTH=y
CONFIG_FEATURE_LS_SORTFILES=y
CONFIG_FEATURE_LS_TIMESTAMPS=y
CONFIG_FEATURE_LS_USERNAME=y
CONFIG_FEATURE_LS_COLOR=y
# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
CONFIG_MD5SUM=y
+# CONFIG_SHA1SUM is not set
+# CONFIG_SHA256SUM is not set
+# CONFIG_SHA512SUM is not set
+# CONFIG_SHA3SUM is not set
+
+#
+# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum
+#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
CONFIG_MKDIR=y
CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
CONFIG_MKFIFO=y
CONFIG_MKNOD=y
+CONFIG_MKTEMP=y
CONFIG_MV=y
# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
# CONFIG_NICE is not set
+# CONFIG_NL is not set
CONFIG_NOHUP=y
+CONFIG_NPROC=y
CONFIG_OD=y
+# CONFIG_PASTE is not set
# CONFIG_PRINTENV is not set
CONFIG_PRINTF=y
CONFIG_PWD=y
@@ -273,10 +284,8 @@
CONFIG_RMDIR=y
# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
CONFIG_SEQ=y
-# CONFIG_SHA1SUM is not set
-# CONFIG_SHA256SUM is not set
-# CONFIG_SHA512SUM is not set
-# CONFIG_SHA3SUM is not set
+# CONFIG_SHRED is not set
+CONFIG_SHUF=y
CONFIG_SLEEP=y
CONFIG_FEATURE_FANCY_SLEEP=y
CONFIG_FEATURE_FLOAT_SLEEP=y
@@ -286,25 +295,43 @@
# CONFIG_FEATURE_SPLIT_FANCY is not set
CONFIG_STAT=y
CONFIG_FEATURE_STAT_FORMAT=y
+CONFIG_FEATURE_STAT_FILESYSTEM=y
CONFIG_STTY=y
# CONFIG_SUM is not set
+CONFIG_SYNC=y
+# CONFIG_FEATURE_SYNC_FANCY is not set
# CONFIG_TAC is not set
CONFIG_TAIL=y
CONFIG_FEATURE_FANCY_TAIL=y
CONFIG_TEE=y
# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set
+CONFIG_TEST=y
+CONFIG_TEST1=y
+CONFIG_TEST2=y
+CONFIG_FEATURE_TEST_64=y
+# CONFIG_TIMEOUT is not set
+CONFIG_TOUCH=y
+CONFIG_FEATURE_TOUCH_NODEREF=y
+CONFIG_FEATURE_TOUCH_SUSV3=y
+CONFIG_TR=y
+CONFIG_FEATURE_TR_CLASSES=y
+# CONFIG_FEATURE_TR_EQUIV is not set
CONFIG_TRUE=y
+# CONFIG_TRUNCATE is not set
CONFIG_TTY=y
CONFIG_UNAME=y
CONFIG_UNAME_OSNAME="GNU/Linux"
-# CONFIG_UNEXPAND is not set
-# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set
CONFIG_UNIQ=y
+CONFIG_UNLINK=y
CONFIG_USLEEP=y
# CONFIG_UUDECODE is not set
+# CONFIG_BASE64 is not set
# CONFIG_UUENCODE is not set
CONFIG_WC=y
# CONFIG_FEATURE_WC_LARGE is not set
+CONFIG_WHO=y
+# CONFIG_W is not set
+CONFIG_USERS=y
CONFIG_WHOAMI=y
CONFIG_YES=y
@@ -319,30 +346,29 @@
# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set
#
-# Common options for ls, more and telnet
-#
-CONFIG_FEATURE_AUTOWIDTH=y
-
-#
# Common options for df, du, ls
#
CONFIG_FEATURE_HUMAN_READABLE=y
#
-# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum
-#
-CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
-
-#
# Console Utilities
#
CONFIG_CHVT=y
-# CONFIG_FGCONSOLE is not set
CONFIG_CLEAR=y
CONFIG_DEALLOCVT=y
CONFIG_DUMPKMAP=y
+# CONFIG_FGCONSOLE is not set
# CONFIG_KBD_MODE is not set
CONFIG_LOADFONT=y
+# CONFIG_SETFONT is not set
+# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set
+CONFIG_DEFAULT_SETFONT_DIR=""
+
+#
+# Common options for loadfont and setfont
+#
+# CONFIG_FEATURE_LOADFONT_PSF2 is not set
+# CONFIG_FEATURE_LOADFONT_RAW is not set
CONFIG_LOADKMAP=y
CONFIG_OPENVT=y
CONFIG_RESET=y
@@ -350,30 +376,20 @@
# CONFIG_FEATURE_RESIZE_PRINT is not set
CONFIG_SETCONSOLE=y
# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set
-# CONFIG_SETFONT is not set
-# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set
-CONFIG_DEFAULT_SETFONT_DIR=""
# CONFIG_SETKEYCODES is not set
# CONFIG_SETLOGCONS is not set
# CONFIG_SHOWKEY is not set
#
-# Common options for loadfont and setfont
-#
-# CONFIG_FEATURE_LOADFONT_PSF2 is not set
-# CONFIG_FEATURE_LOADFONT_RAW is not set
-
-#
# Debian Utilities
#
-CONFIG_MKTEMP=y
# CONFIG_PIPE_PROGRESS is not set
CONFIG_RUN_PARTS=y
CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
# CONFIG_FEATURE_RUN_PARTS_FANCY is not set
CONFIG_START_STOP_DAEMON=y
-CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
+CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
CONFIG_WHICH=y
#
@@ -436,8 +452,8 @@
# CONFIG_FEATURE_FIND_CONTEXT is not set
# CONFIG_FEATURE_FIND_LINKS is not set
CONFIG_GREP=y
-CONFIG_FEATURE_GREP_EGREP_ALIAS=y
-CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+CONFIG_EGREP=y
+CONFIG_FGREP=y
CONFIG_FEATURE_GREP_CONTEXT=y
CONFIG_XARGS=y
# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
@@ -453,40 +469,45 @@
# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set
# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set
CONFIG_HALT=y
+CONFIG_POWEROFF=y
+CONFIG_REBOOT=y
# CONFIG_FEATURE_CALL_TELINIT is not set
CONFIG_TELINIT_PATH=""
# CONFIG_INIT is not set
+# CONFIG_LINUXRC is not set
# CONFIG_FEATURE_USE_INITTAB is not set
# CONFIG_FEATURE_KILL_REMOVED is not set
CONFIG_FEATURE_KILL_DELAY=0
# CONFIG_FEATURE_INIT_SCTTY is not set
# CONFIG_FEATURE_INIT_SYSLOG is not set
-# CONFIG_FEATURE_EXTRA_QUIET is not set
+# CONFIG_FEATURE_INIT_QUIET is not set
# CONFIG_FEATURE_INIT_COREDUMPS is not set
-# CONFIG_FEATURE_INITRD is not set
CONFIG_INIT_TERMINAL_TYPE=""
-CONFIG_MESG=y
-# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set
+# CONFIG_FEATURE_INIT_MODIFY_CMDLINE is not set
#
# Login/Password Management Utilities
#
-# CONFIG_ADD_SHELL is not set
-# CONFIG_REMOVE_SHELL is not set
# CONFIG_FEATURE_SHADOWPASSWDS is not set
# CONFIG_USE_BB_PWD_GRP is not set
# CONFIG_USE_BB_SHADOW is not set
CONFIG_USE_BB_CRYPT=y
# CONFIG_USE_BB_CRYPT_SHA is not set
+# CONFIG_ADD_SHELL is not set
+# CONFIG_REMOVE_SHELL is not set
+# CONFIG_ADDGROUP is not set
+# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
# CONFIG_ADDUSER is not set
# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
# CONFIG_FEATURE_CHECK_NAMES is not set
CONFIG_LAST_ID=60000
CONFIG_FIRST_SYSTEM_ID=100
CONFIG_LAST_SYSTEM_ID=999
-# CONFIG_ADDGROUP is not set
-# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set
-# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+# CONFIG_CHPASSWD is not set
+CONFIG_FEATURE_DEFAULT_PASSWD_ALGO=""
+# CONFIG_CRYPTPW is not set
+# CONFIG_MKPASSWD is not set
# CONFIG_DELUSER is not set
# CONFIG_DELGROUP is not set
# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
@@ -498,12 +519,10 @@
# CONFIG_FEATURE_SECURETTY is not set
# CONFIG_PASSWD is not set
# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
-# CONFIG_CRYPTPW is not set
-# CONFIG_CHPASSWD is not set
-CONFIG_FEATURE_DEFAULT_PASSWD_ALGO=""
# CONFIG_SU is not set
# CONFIG_FEATURE_SU_SYSLOG is not set
# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
+# CONFIG_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY is not set
# CONFIG_SULOGIN is not set
# CONFIG_VLOCK is not set
@@ -518,29 +537,29 @@
#
# Linux Module Utilities
#
-# CONFIG_MODINFO is not set
# CONFIG_MODPROBE_SMALL is not set
-# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set
-# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
+CONFIG_DEPMOD=y
CONFIG_INSMOD=y
-CONFIG_RMMOD=y
CONFIG_LSMOD=y
# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
+# CONFIG_MODINFO is not set
CONFIG_MODPROBE=y
# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set
-CONFIG_DEPMOD=y
+CONFIG_RMMOD=y
#
# Options common to multiple modutils
#
+CONFIG_FEATURE_CMDLINE_MODULE_OPTIONS=y
+# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
# CONFIG_FEATURE_2_4_MODULES is not set
-# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
CONFIG_FEATURE_MODUTILS_ALIAS=y
CONFIG_FEATURE_MODUTILS_SYMBOLS=y
CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
@@ -549,15 +568,71 @@
#
# Linux System Utilities
#
+# CONFIG_ACPID is not set
+# CONFIG_FEATURE_ACPID_COMPAT is not set
+# CONFIG_BLKDISCARD is not set
+# CONFIG_BLKID is not set
+# CONFIG_FEATURE_BLKID_TYPE is not set
# CONFIG_BLOCKDEV is not set
+# CONFIG_CAL is not set
+CONFIG_DMESG=y
+CONFIG_FEATURE_DMESG_PRETTY=y
+# CONFIG_FALLOCATE is not set
# CONFIG_FATATTR is not set
+CONFIG_FBSET=y
+CONFIG_FEATURE_FBSET_FANCY=y
+CONFIG_FEATURE_FBSET_READMODE=y
+# CONFIG_FDFORMAT is not set
+CONFIG_FDISK=y
+# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
+CONFIG_FEATURE_FDISK_WRITABLE=y
+# CONFIG_FEATURE_AIX_LABEL is not set
+# CONFIG_FEATURE_SGI_LABEL is not set
+# CONFIG_FEATURE_SUN_LABEL is not set
+# CONFIG_FEATURE_OSF_LABEL is not set
+# CONFIG_FEATURE_GPT_LABEL is not set
+# CONFIG_FEATURE_FDISK_ADVANCED is not set
+# CONFIG_FINDFS is not set
+CONFIG_FLOCK=y
+# CONFIG_FDFLUSH is not set
+# CONFIG_FREERAMDISK is not set
+# CONFIG_FSCK_MINIX is not set
+# CONFIG_FSFREEZE is not set
CONFIG_FSTRIM=y
+# CONFIG_GETOPT is not set
+# CONFIG_FEATURE_GETOPT_LONG is not set
+CONFIG_HEXDUMP=y
+# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
+# CONFIG_HD is not set
+# CONFIG_XXD is not set
+CONFIG_HWCLOCK=y
+CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
+CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
+# CONFIG_IPCRM is not set
+# CONFIG_IPCS is not set
+# CONFIG_LAST is not set
+# CONFIG_FEATURE_LAST_FANCY is not set
+CONFIG_LOSETUP=y
+# CONFIG_LSPCI is not set
+# CONFIG_LSUSB is not set
# CONFIG_MDEV is not set
# CONFIG_FEATURE_MDEV_CONF is not set
# CONFIG_FEATURE_MDEV_RENAME is not set
# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set
# CONFIG_FEATURE_MDEV_EXEC is not set
# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
+CONFIG_MESG=y
+# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set
+# CONFIG_MKE2FS is not set
+# CONFIG_MKFS_EXT2 is not set
+# CONFIG_MKFS_MINIX is not set
+# CONFIG_FEATURE_MINIX2 is not set
+# CONFIG_MKFS_REISER is not set
+# CONFIG_MKDOSFS is not set
+# CONFIG_MKFS_VFAT is not set
+CONFIG_MKSWAP=y
+# CONFIG_FEATURE_MKSWAP_UUID is not set
+CONFIG_MORE=y
CONFIG_MOUNT=y
# CONFIG_FEATURE_MOUNT_FAKE is not set
# CONFIG_FEATURE_MOUNT_VERBOSE is not set
@@ -568,67 +643,33 @@
CONFIG_FEATURE_MOUNT_FLAGS=y
CONFIG_FEATURE_MOUNT_FSTAB=y
# CONFIG_FEATURE_MOUNT_OTHERTAB is not set
-# CONFIG_REV is not set
-# CONFIG_UEVENT is not set
-# CONFIG_ACPID is not set
-# CONFIG_FEATURE_ACPID_COMPAT is not set
-# CONFIG_BLKID is not set
-# CONFIG_FEATURE_BLKID_TYPE is not set
-CONFIG_DMESG=y
-CONFIG_FEATURE_DMESG_PRETTY=y
-CONFIG_FBSET=y
-CONFIG_FEATURE_FBSET_FANCY=y
-CONFIG_FEATURE_FBSET_READMODE=y
-# CONFIG_FDFLUSH is not set
-# CONFIG_FDFORMAT is not set
-CONFIG_FDISK=y
-CONFIG_FDISK_SUPPORT_LARGE_DISKS=y
-CONFIG_FEATURE_FDISK_WRITABLE=y
-# CONFIG_FEATURE_AIX_LABEL is not set
-# CONFIG_FEATURE_SGI_LABEL is not set
-# CONFIG_FEATURE_SUN_LABEL is not set
-# CONFIG_FEATURE_OSF_LABEL is not set
-# CONFIG_FEATURE_GPT_LABEL is not set
-# CONFIG_FEATURE_FDISK_ADVANCED is not set
-# CONFIG_FINDFS is not set
-CONFIG_FLOCK=y
-# CONFIG_FREERAMDISK is not set
-# CONFIG_FSCK_MINIX is not set
-# CONFIG_MKFS_EXT2 is not set
-# CONFIG_MKFS_MINIX is not set
-# CONFIG_FEATURE_MINIX2 is not set
-# CONFIG_MKFS_REISER is not set
-# CONFIG_MKFS_VFAT is not set
-# CONFIG_GETOPT is not set
-# CONFIG_FEATURE_GETOPT_LONG is not set
-CONFIG_HEXDUMP=y
-# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
-# CONFIG_HD is not set
-CONFIG_HWCLOCK=y
-CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
-CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
-# CONFIG_IPCRM is not set
-# CONFIG_IPCS is not set
-CONFIG_LOSETUP=y
-# CONFIG_LSPCI is not set
-# CONFIG_LSUSB is not set
-CONFIG_MKSWAP=y
-# CONFIG_FEATURE_MKSWAP_UUID is not set
-CONFIG_MORE=y
+# CONFIG_NSENTER is not set
+# CONFIG_FEATURE_NSENTER_LONG_OPTS is not set
CONFIG_PIVOT_ROOT=y
CONFIG_RDATE=y
# CONFIG_RDEV is not set
# CONFIG_READPROFILE is not set
+CONFIG_RENICE=y
+# CONFIG_REV is not set
# CONFIG_RTCWAKE is not set
# CONFIG_SCRIPT is not set
# CONFIG_SCRIPTREPLAY is not set
# CONFIG_SETARCH is not set
-CONFIG_SWAPONOFF=y
+# CONFIG_LINUX32 is not set
+# CONFIG_LINUX64 is not set
+# CONFIG_SETPRIV is not set
+CONFIG_SWAPON=y
CONFIG_FEATURE_SWAPON_DISCARD=y
CONFIG_FEATURE_SWAPON_PRI=y
+CONFIG_SWAPOFF=y
CONFIG_SWITCH_ROOT=y
+# CONFIG_TASKSET is not set
+# CONFIG_FEATURE_TASKSET_FANCY is not set
+# CONFIG_UEVENT is not set
CONFIG_UMOUNT=y
CONFIG_FEATURE_UMOUNT_ALL=y
+# CONFIG_UNSHARE is not set
+# CONFIG_WALL is not set
#
# Common options for mount/umount
@@ -637,6 +678,7 @@
CONFIG_FEATURE_MOUNT_LOOP_CREATE=y
# CONFIG_FEATURE_MTAB_SUPPORT is not set
# CONFIG_VOLUMEID is not set
+# CONFIG_FEATURE_VOLUMEID_BCACHE is not set
# CONFIG_FEATURE_VOLUMEID_BTRFS is not set
# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set
# CONFIG_FEATURE_VOLUMEID_EXFAT is not set
@@ -656,17 +698,33 @@
# CONFIG_FEATURE_VOLUMEID_ROMFS is not set
# CONFIG_FEATURE_VOLUMEID_SQUASHFS is not set
# CONFIG_FEATURE_VOLUMEID_SYSV is not set
+# CONFIG_FEATURE_VOLUMEID_UBIFS is not set
# CONFIG_FEATURE_VOLUMEID_UDF is not set
# CONFIG_FEATURE_VOLUMEID_XFS is not set
#
# Miscellaneous Utilities
#
+# CONFIG_BEEP is not set
+CONFIG_FEATURE_BEEP_FREQ=0
+CONFIG_FEATURE_BEEP_LENGTH_MS=0
# CONFIG_CONSPY is not set
# CONFIG_CROND is not set
# CONFIG_FEATURE_CROND_D is not set
# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
CONFIG_FEATURE_CROND_DIR=""
+# CONFIG_DEVFSD is not set
+# CONFIG_DEVFSD_MODLOAD is not set
+# CONFIG_DEVFSD_FG_NP is not set
+# CONFIG_DEVFSD_VERBOSE is not set
+# CONFIG_FEATURE_DEVFS is not set
+# CONFIG_HDPARM is not set
+# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set
+# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set
+# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set
# CONFIG_I2CGET is not set
# CONFIG_I2CSET is not set
# CONFIG_I2CDUMP is not set
@@ -682,19 +740,19 @@
# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set
# CONFIG_FEATURE_LESS_DASHCMD is not set
# CONFIG_FEATURE_LESS_LINENUMS is not set
+# CONFIG_LSSCSI is not set
# CONFIG_NANDWRITE is not set
# CONFIG_NANDDUMP is not set
+# CONFIG_PARTPROBE is not set
CONFIG_RFKILL=y
# CONFIG_SETSERIAL is not set
-# CONFIG_TASKSET is not set
-# CONFIG_FEATURE_TASKSET_FANCY is not set
# CONFIG_UBIATTACH is not set
# CONFIG_UBIDETACH is not set
# CONFIG_UBIMKVOL is not set
# CONFIG_UBIRMVOL is not set
# CONFIG_UBIRSVOL is not set
# CONFIG_UBIUPDATEVOL is not set
-# CONFIG_WALL is not set
+# CONFIG_UBIRENAME is not set
# CONFIG_ADJTIMEX is not set
# CONFIG_BBCONFIG is not set
# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set
@@ -729,7 +787,6 @@
# CONFIG_IONICE is not set
# CONFIG_INOTIFYD is not set
# CONFIG_LAST is not set
-# CONFIG_FEATURE_LAST_SMALL is not set
# CONFIG_FEATURE_LAST_FANCY is not set
# CONFIG_HDPARM is not set
# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set
@@ -760,24 +817,6 @@
#
# Networking Utilities
#
-# CONFIG_NAMEIF is not set
-# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
-# CONFIG_NBDCLIENT is not set
-CONFIG_NC=y
-# CONFIG_NC_SERVER is not set
-# CONFIG_NC_EXTRA is not set
-# CONFIG_NC_110_COMPAT is not set
-CONFIG_PING=y
-CONFIG_PING6=y
-CONFIG_FEATURE_FANCY_PING=y
-CONFIG_WGET=y
-CONFIG_FEATURE_WGET_STATUSBAR=y
-CONFIG_FEATURE_WGET_AUTHENTICATION=y
-CONFIG_FEATURE_WGET_LONG_OPTIONS=y
-CONFIG_FEATURE_WGET_TIMEOUT=y
-# CONFIG_FEATURE_WGET_OPENSSL is not set
-# CONFIG_FEATURE_WGET_SSL_HELPER is not set
-# CONFIG_WHOIS is not set
CONFIG_FEATURE_IPV6=y
# CONFIG_FEATURE_UNIX_LOCAL is not set
CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
@@ -789,15 +828,15 @@
# CONFIG_FEATURE_BRCTL_SHOW is not set
# CONFIG_DNSD is not set
# CONFIG_ETHER_WAKE is not set
-# CONFIG_FAKEIDENTD is not set
# CONFIG_FTPD is not set
-# CONFIG_FEATURE_FTP_WRITE is not set
+# CONFIG_FEATURE_FTPD_WRITE is not set
# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set
-# CONFIG_FEATURE_FTP_AUTHENTICATION is not set
+# CONFIG_FEATURE_FTPD_AUTHENTICATION is not set
# CONFIG_FTPGET is not set
# CONFIG_FTPPUT is not set
# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
CONFIG_HOSTNAME=y
+CONFIG_DNSDOMAINNAME=y
# CONFIG_HTTPD is not set
# CONFIG_FEATURE_HTTPD_RANGES is not set
# CONFIG_FEATURE_HTTPD_SETUID is not set
@@ -818,11 +857,10 @@
# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
# CONFIG_IFENSLAVE is not set
# CONFIG_IFPLUGD is not set
-CONFIG_IFUPDOWN=y
+CONFIG_IFUP=y
+CONFIG_IFDOWN=y
CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
CONFIG_FEATURE_IFUPDOWN_IP=y
-CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
-# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set
CONFIG_FEATURE_IFUPDOWN_IPV4=y
CONFIG_FEATURE_IFUPDOWN_IPV6=y
CONFIG_FEATURE_IFUPDOWN_MAPPING=y
@@ -835,22 +873,31 @@
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
# CONFIG_FEATURE_INETD_RPC is not set
CONFIG_IP=y
+# CONFIG_IPADDR is not set
+# CONFIG_IPLINK is not set
+# CONFIG_IPROUTE is not set
+# CONFIG_IPTUNNEL is not set
+# CONFIG_IPRULE is not set
+# CONFIG_IPNEIGH is not set
CONFIG_FEATURE_IP_ADDRESS=y
CONFIG_FEATURE_IP_LINK=y
CONFIG_FEATURE_IP_ROUTE=y
CONFIG_FEATURE_IP_ROUTE_DIR="/etc/iproute2"
CONFIG_FEATURE_IP_TUNNEL=y
# CONFIG_FEATURE_IP_RULE is not set
-# CONFIG_FEATURE_IP_SHORT_FORMS is not set
+# CONFIG_FEATURE_IP_NEIGH is not set
# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
-# CONFIG_IPADDR is not set
-# CONFIG_IPLINK is not set
-# CONFIG_IPROUTE is not set
-# CONFIG_IPTUNNEL is not set
-# CONFIG_IPRULE is not set
# CONFIG_IPCALC is not set
-# CONFIG_FEATURE_IPCALC_FANCY is not set
# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set
+# CONFIG_FEATURE_IPCALC_FANCY is not set
+# CONFIG_FAKEIDENTD is not set
+# CONFIG_NAMEIF is not set
+# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
+# CONFIG_NBDCLIENT is not set
+CONFIG_NC=y
+# CONFIG_NC_SERVER is not set
+# CONFIG_NC_EXTRA is not set
+# CONFIG_NC_110_COMPAT is not set
CONFIG_NETSTAT=y
# CONFIG_FEATURE_NETSTAT_WIDE is not set
# CONFIG_FEATURE_NETSTAT_PRG is not set
@@ -858,13 +905,19 @@
# CONFIG_NTPD is not set
# CONFIG_FEATURE_NTPD_SERVER is not set
# CONFIG_FEATURE_NTPD_CONF is not set
+CONFIG_PING=y
+CONFIG_PING6=y
+CONFIG_FEATURE_FANCY_PING=y
# CONFIG_PSCAN is not set
CONFIG_ROUTE=y
# CONFIG_SLATTACH is not set
+# CONFIG_SSL_CLIENT is not set
# CONFIG_TCPSVD is not set
+# CONFIG_UDPSVD is not set
CONFIG_TELNET=y
# CONFIG_FEATURE_TELNET_TTYPE is not set
CONFIG_FEATURE_TELNET_AUTOLOGIN=y
+CONFIG_FEATURE_TELNET_WIDTH=y
# CONFIG_TELNETD is not set
# CONFIG_FEATURE_TELNETD_STANDALONE is not set
# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set
@@ -879,33 +932,43 @@
# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set
# CONFIG_TFTP_DEBUG is not set
+CONFIG_TLS=y
CONFIG_TRACEROUTE=y
# CONFIG_TRACEROUTE6 is not set
# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set
-# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
# CONFIG_TUNCTL is not set
# CONFIG_FEATURE_TUNCTL_UG is not set
+# CONFIG_VCONFIG is not set
+CONFIG_WGET=y
+CONFIG_FEATURE_WGET_LONG_OPTIONS=y
+CONFIG_FEATURE_WGET_STATUSBAR=y
+CONFIG_FEATURE_WGET_AUTHENTICATION=y
+CONFIG_FEATURE_WGET_TIMEOUT=y
+CONFIG_FEATURE_WGET_HTTPS=y
+# CONFIG_FEATURE_WGET_OPENSSL is not set
+# CONFIG_WHOIS is not set
+# CONFIG_ZCIP is not set
# CONFIG_UDHCPC6 is not set
+# CONFIG_FEATURE_UDHCPC6_RFC3646 is not set
+# CONFIG_FEATURE_UDHCPC6_RFC4704 is not set
+# CONFIG_FEATURE_UDHCPC6_RFC4833 is not set
CONFIG_UDHCPD=y
-# CONFIG_DHCPRELAY is not set
-CONFIG_DUMPLEASES=y
# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set
CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases"
+CONFIG_DUMPLEASES=y
+# CONFIG_DHCPRELAY is not set
CONFIG_UDHCPC=y
CONFIG_FEATURE_UDHCPC_ARPING=y
CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y
+CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
# CONFIG_FEATURE_UDHCP_PORT is not set
CONFIG_UDHCP_DEBUG=0
# CONFIG_FEATURE_UDHCP_RFC3397 is not set
# CONFIG_FEATURE_UDHCP_8021Q is not set
-CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
-CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
-# CONFIG_UDPSVD is not set
-# CONFIG_VCONFIG is not set
-# CONFIG_ZCIP is not set
+CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -b"
#
# Print Utilities
@@ -918,26 +981,45 @@
# Mail Utilities
#
# CONFIG_MAKEMIME is not set
-CONFIG_FEATURE_MIME_CHARSET=""
# CONFIG_POPMAILDIR is not set
# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set
# CONFIG_REFORMIME is not set
# CONFIG_FEATURE_REFORMIME_COMPAT is not set
# CONFIG_SENDMAIL is not set
+CONFIG_FEATURE_MIME_CHARSET=""
#
# Process Utilities
#
+CONFIG_FREE=y
+CONFIG_FUSER=y
# CONFIG_IOSTAT is not set
+CONFIG_KILL=y
+CONFIG_KILLALL=y
+# CONFIG_KILLALL5 is not set
# CONFIG_LSOF is not set
# CONFIG_MPSTAT is not set
# CONFIG_NMETER is not set
+# CONFIG_PGREP is not set
+# CONFIG_PKILL is not set
+CONFIG_PIDOF=y
+# CONFIG_FEATURE_PIDOF_SINGLE is not set
+# CONFIG_FEATURE_PIDOF_OMIT is not set
# CONFIG_PMAP is not set
# CONFIG_POWERTOP is not set
+# CONFIG_FEATURE_POWERTOP_INTERACTIVE is not set
+CONFIG_PS=y
+CONFIG_FEATURE_PS_WIDE=y
+CONFIG_FEATURE_PS_LONG=y
+# CONFIG_FEATURE_PS_TIME is not set
+# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
+# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set
# CONFIG_PSTREE is not set
# CONFIG_PWDX is not set
# CONFIG_SMEMCAP is not set
+CONFIG_BB_SYSCTL=y
CONFIG_TOP=y
+# CONFIG_FEATURE_TOP_INTERACTIVE is not set
CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
# CONFIG_FEATURE_TOP_SMP_CPU is not set
@@ -946,84 +1028,69 @@
# CONFIG_FEATURE_TOPMEM is not set
CONFIG_UPTIME=y
# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set
-CONFIG_FREE=y
-CONFIG_FUSER=y
-CONFIG_KILL=y
-CONFIG_KILLALL=y
-# CONFIG_KILLALL5 is not set
-# CONFIG_PGREP is not set
-CONFIG_PIDOF=y
-# CONFIG_FEATURE_PIDOF_SINGLE is not set
-# CONFIG_FEATURE_PIDOF_OMIT is not set
-# CONFIG_PKILL is not set
-CONFIG_PS=y
-CONFIG_FEATURE_PS_WIDE=y
-CONFIG_FEATURE_PS_LONG=y
-# CONFIG_FEATURE_PS_TIME is not set
-# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set
-# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
-CONFIG_RENICE=y
-CONFIG_BB_SYSCTL=y
-# CONFIG_FEATURE_SHOW_THREADS is not set
CONFIG_WATCH=y
+# CONFIG_FEATURE_SHOW_THREADS is not set
#
# Runit Utilities
#
-# CONFIG_RUNSV is not set
-# CONFIG_RUNSVDIR is not set
-# CONFIG_FEATURE_RUNSVDIR_LOG is not set
-# CONFIG_SV is not set
-CONFIG_SV_DEFAULT_SERVICE_DIR=""
-# CONFIG_SVLOGD is not set
# CONFIG_CHPST is not set
# CONFIG_SETUIDGID is not set
# CONFIG_ENVUIDGID is not set
# CONFIG_ENVDIR is not set
# CONFIG_SOFTLIMIT is not set
-
-#
-# SELinux utilities
-#
+# CONFIG_RUNSV is not set
+# CONFIG_RUNSVDIR is not set
+# CONFIG_FEATURE_RUNSVDIR_LOG is not set
+# CONFIG_SV is not set
+CONFIG_SV_DEFAULT_SERVICE_DIR=""
+# CONFIG_SVC is not set
+# CONFIG_SVLOGD is not set
# CONFIG_CHCON is not set
# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
# CONFIG_GETENFORCE is not set
# CONFIG_GETSEBOOL is not set
# CONFIG_LOAD_POLICY is not set
# CONFIG_MATCHPATHCON is not set
-# CONFIG_RESTORECON is not set
# CONFIG_RUNCON is not set
# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
# CONFIG_SELINUXENABLED is not set
+# CONFIG_SESTATUS is not set
# CONFIG_SETENFORCE is not set
# CONFIG_SETFILES is not set
# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
+# CONFIG_RESTORECON is not set
# CONFIG_SETSEBOOL is not set
-# CONFIG_SESTATUS is not set
#
# Shells
#
+CONFIG_SH_IS_ASH=y
+# CONFIG_SH_IS_HUSH is not set
+# CONFIG_SH_IS_NONE is not set
+# CONFIG_BASH_IS_ASH is not set
+# CONFIG_BASH_IS_HUSH is not set
+CONFIG_BASH_IS_NONE=y
CONFIG_ASH=y
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+CONFIG_ASH_INTERNAL_GLOB=y
CONFIG_ASH_BASH_COMPAT=y
-# CONFIG_ASH_IDLE_TIMEOUT is not set
CONFIG_ASH_JOB_CONTROL=y
CONFIG_ASH_ALIAS=y
-CONFIG_ASH_GETOPTS=y
-CONFIG_ASH_BUILTIN_ECHO=y
-CONFIG_ASH_BUILTIN_PRINTF=y
-CONFIG_ASH_BUILTIN_TEST=y
-CONFIG_ASH_HELP=y
-CONFIG_ASH_CMDCMD=y
-# CONFIG_ASH_MAIL is not set
-CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
# CONFIG_ASH_RANDOM_SUPPORT is not set
CONFIG_ASH_EXPAND_PRMT=y
+# CONFIG_ASH_IDLE_TIMEOUT is not set
+# CONFIG_ASH_MAIL is not set
+CONFIG_ASH_ECHO=y
+CONFIG_ASH_PRINTF=y
+CONFIG_ASH_TEST=y
+CONFIG_ASH_HELP=y
+CONFIG_ASH_GETOPTS=y
+CONFIG_ASH_CMDCMD=y
# CONFIG_CTTYHACK is not set
# CONFIG_HUSH is not set
# CONFIG_HUSH_BASH_COMPAT is not set
# CONFIG_HUSH_BRACE_EXPANSION is not set
-# CONFIG_HUSH_HELP is not set
# CONFIG_HUSH_INTERACTIVE is not set
# CONFIG_HUSH_SAVEHISTORY is not set
# CONFIG_HUSH_JOB is not set
@@ -1034,17 +1101,30 @@
# CONFIG_HUSH_FUNCTIONS is not set
# CONFIG_HUSH_LOCAL is not set
# CONFIG_HUSH_RANDOM_SUPPORT is not set
-# CONFIG_HUSH_EXPORT_N is not set
# CONFIG_HUSH_MODE_X is not set
+# CONFIG_HUSH_ECHO is not set
+# CONFIG_HUSH_PRINTF is not set
+# CONFIG_HUSH_TEST is not set
+# CONFIG_HUSH_HELP is not set
+# CONFIG_HUSH_EXPORT is not set
+# CONFIG_HUSH_EXPORT_N is not set
+# CONFIG_HUSH_KILL is not set
+# CONFIG_HUSH_WAIT is not set
+# CONFIG_HUSH_TRAP is not set
+# CONFIG_HUSH_TYPE is not set
+# CONFIG_HUSH_READ is not set
+# CONFIG_HUSH_SET is not set
+# CONFIG_HUSH_UNSET is not set
+# CONFIG_HUSH_ULIMIT is not set
+# CONFIG_HUSH_UMASK is not set
+# CONFIG_HUSH_MEMLEAK is not set
# CONFIG_MSH is not set
-CONFIG_FEATURE_SH_IS_ASH=y
-# CONFIG_FEATURE_SH_IS_HUSH is not set
-# CONFIG_FEATURE_SH_IS_NONE is not set
-# CONFIG_FEATURE_BASH_IS_ASH is not set
-# CONFIG_FEATURE_BASH_IS_HUSH is not set
-CONFIG_FEATURE_BASH_IS_NONE=y
-CONFIG_SH_MATH_SUPPORT=y
-# CONFIG_SH_MATH_SUPPORT_64 is not set
+
+#
+# Options common to all shells
+#
+CONFIG_FEATURE_SH_MATH=y
+# CONFIG_FEATURE_SH_MATH_64 is not set
CONFIG_FEATURE_SH_EXTRA_QUIET=y
# CONFIG_FEATURE_SH_STANDALONE is not set
# CONFIG_FEATURE_SH_NOFORK is not set
@@ -1053,19 +1133,17 @@
#
# System Logging Utilities
#
+CONFIG_KLOGD=y
+CONFIG_FEATURE_KLOGD_KLOGCTL=y
+CONFIG_LOGGER=y
+# CONFIG_LOGREAD is not set
+# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
# CONFIG_SYSLOGD is not set
# CONFIG_FEATURE_ROTATE_LOGFILE is not set
# CONFIG_FEATURE_REMOTE_LOG is not set
# CONFIG_FEATURE_SYSLOGD_DUP is not set
# CONFIG_FEATURE_SYSLOGD_CFG is not set
+CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0
# CONFIG_FEATURE_IPC_SYSLOG is not set
-# CONFIG_LOGREAD is not set
-# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
+CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0
# CONFIG_FEATURE_KMSG_SYSLOG is not set
-CONFIG_KLOGD=y
-
-#
-# klogd should not be used together with syslog to kernel printk buffer
-#
-CONFIG_FEATURE_KLOGD_KLOGCTL=y
-CONFIG_LOGGER=y
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch
deleted file mode 100644
index 41c5656..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 4ab372d49a6e82b0bf097dedb96d26330c5f2d5f Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz@port70.net>
-Date: Sun, 24 Apr 2016 17:39:02 +0200
-Subject: [PATCH] ip: fix problem on mips64 n64 big endian musl systems
-
-Use designated initializers for struct msghdr.
-The struct layout is non-portable and musl libc does not match what busybox expects.
-
-Signed-off-by: Szabolcs Nagy <nsz@port70.net>
-Tested-by: Waldemar Brodkorb <wbx@openadk.org>
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-
-https://git.busybox.net/busybox/commit/?id=4ab372d49a6e82b0bf097dedb96d26330c5f2d5f
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/libiproute/libnetlink.c | 37 ++++++++++++++++++++++++-------------
- 1 file changed, 24 insertions(+), 13 deletions(-)
-
-diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c
-index c7533a4..cbb5daf 100644
---- a/networking/libiproute/libnetlink.c
-+++ b/networking/libiproute/libnetlink.c
-@@ -71,11 +71,15 @@ int FAST_FUNC rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, in
- struct nlmsghdr nlh;
- struct sockaddr_nl nladdr;
- struct iovec iov[2] = { { &nlh, sizeof(nlh) }, { req, len } };
-+ /* Use designated initializers, struct layout is non-portable */
- struct msghdr msg = {
-- (void*)&nladdr, sizeof(nladdr),
-- iov, 2,
-- NULL, 0,
-- 0
-+ .msg_name = (void*)&nladdr,
-+ .msg_namelen = sizeof(nladdr),
-+ .msg_iov = iov,
-+ .msg_iovlen = 2,
-+ .msg_control = NULL,
-+ .msg_controllen = 0,
-+ .msg_flags = 0
- };
-
- memset(&nladdr, 0, sizeof(nladdr));
-@@ -104,12 +108,15 @@ static int rtnl_dump_filter(struct rtnl_handle *rth,
- while (1) {
- int status;
- struct nlmsghdr *h;
--
-+ /* Use designated initializers, struct layout is non-portable */
- struct msghdr msg = {
-- (void*)&nladdr, sizeof(nladdr),
-- &iov, 1,
-- NULL, 0,
-- 0
-+ .msg_name = (void*)&nladdr,
-+ .msg_namelen = sizeof(nladdr),
-+ .msg_iov = &iov,
-+ .msg_iovlen = 1,
-+ .msg_control = NULL,
-+ .msg_controllen = 0,
-+ .msg_flags = 0
- };
-
- status = recvmsg(rth->fd, &msg, 0);
-@@ -211,11 +218,15 @@ int FAST_FUNC rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
- struct sockaddr_nl nladdr;
- struct iovec iov = { (void*)n, n->nlmsg_len };
- char *buf = xmalloc(8*1024); /* avoid big stack buffer */
-+ /* Use designated initializers, struct layout is non-portable */
- struct msghdr msg = {
-- (void*)&nladdr, sizeof(nladdr),
-- &iov, 1,
-- NULL, 0,
-- 0
-+ .msg_name = (void*)&nladdr,
-+ .msg_namelen = sizeof(nladdr),
-+ .msg_iov = &iov,
-+ .msg_iovlen = 1,
-+ .msg_control = NULL,
-+ .msg_controllen = 0,
-+ .msg_flags = 0
- };
-
- memset(&nladdr, 0, sizeof(nladdr));
---
-2.3.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch
deleted file mode 100644
index 2e9842e..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 9e5820a86277818c2f83c11c2aa76d7f0a38283e Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 14 Aug 2016 02:54:27 +0200
-Subject: build system: fix include/NUM_APPLETS.h generation
-
-TBH, it's more like "work around my bad makefile-fu" than "fix"...
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
- applets/Kbuild.src | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
-Upstream-Status: Backport
-
-diff --git a/applets/Kbuild.src b/applets/Kbuild.src
-index b612399..5cc1827 100644
---- a/applets/Kbuild.src
-+++ b/applets/Kbuild.src
-@@ -29,7 +29,7 @@ applets/applets.o: include/usage_compressed.h include/applet_tables.h
-
- applets/applet_tables: .config include/applets.h
- applets/usage: .config include/applets.h
--applets/usage_pod: .config include/applet_tables.h include/applets.h
-+applets/usage_pod: .config include/applets.h include/applet_tables.h include/NUM_APPLETS.h
-
- quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
- cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets
-@@ -40,8 +40,5 @@ include/usage_compressed.h: applets/usage $(srctree_slash)applets/usage_compress
- quiet_cmd_gen_applet_tables = GEN include/applet_tables.h
- cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h include/NUM_APPLETS.h
-
--include/applet_tables.h: applets/applet_tables
-- $(call cmd,gen_applet_tables)
--
--include/NUM_APPLETS.h: applets/applet_tables
-+include/applet_tables.h include/NUM_APPLETS.h: applets/applet_tables
- $(call cmd,gen_applet_tables)
---
-cgit v0.12
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/musl.cfg b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/musl.cfg
index facfe85..6fffc91 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/musl.cfg
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/musl.cfg
@@ -2,7 +2,6 @@
# CONFIG_SELINUX is not set
# CONFIG_FEATURE_HAVE_RPC is not set
# CONFIG_WERROR is not set
-# CONFIG_FEATURE_SYSTEMD is not set
# CONFIG_FEATURE_VI_REGEX_SEARCH is not set
# CONFIG_PAM is not set
# CONFIG_FEATURE_INETD_RPC is not set
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb
deleted file mode 100644
index 1c85808..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb
+++ /dev/null
@@ -1,68 +0,0 @@
-require busybox.inc
-
-SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
- file://busybox-udhcpc-no_deconfig.patch \
- file://find-touchscreen.sh \
- file://busybox-cron \
- file://busybox-httpd \
- file://busybox-udhcpd \
- file://default.script \
- file://simple.script \
- file://hwclock.sh \
- file://mount.busybox \
- file://syslog \
- file://syslog-startup.conf \
- file://syslog.conf \
- file://busybox-syslog.default \
- file://mdev \
- file://mdev.conf \
- file://mdev-mount.sh \
- file://umount.busybox \
- file://defconfig \
- file://busybox-syslog.service.in \
- file://busybox-klogd.service.in \
- file://fail_on_no_media.patch \
- file://run-ptest \
- file://inetd.conf \
- file://inetd \
- file://login-utilities.cfg \
- file://recognize_connmand.patch \
- file://busybox-cross-menuconfig.patch \
- file://0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch \
- file://busybox-1.24.1-unzip.patch \
- file://busybox-1.24.1-unzip-regression.patch \
- file://busybox-1.24.1-truncate-open-mode.patch \
- file://0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch \
- file://mount-via-label.cfg \
- file://sha1sum.cfg \
- file://sha256sum.cfg \
- file://getopts.cfg \
- file://resize.cfg \
- ${@["", "file://init.cfg"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]} \
- ${@["", "file://mdev.cfg"][(d.getVar('VIRTUAL-RUNTIME_dev_manager') == 'busybox-mdev')]} \
- file://syslog.cfg \
- file://inittab \
- file://rcS \
- file://rcK \
- file://runlevel \
- file://CVE-2016-2148.patch \
- file://CVE-2016-2147.patch \
- file://CVE-2016-2147_2.patch \
- file://CVE-2016-6301.patch \
- file://ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch \
- file://makefile-fix-backport.patch \
- file://0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch \
- file://busybox-kbuild-race-fix-commit-d8e61bb.patch \
- file://commit-applet_tables-fix-commit-0dddbc1.patch \
- file://makefile-libbb-race.patch \
- file://0001-libiproute-handle-table-ids-larger-than-255.patch \
- file://ifupdown-pass-interface-device-name-for-ipv6-route-c.patch \
- file://BUG9071_buffer_overflow_arp.patch \
- file://busybox-tar-add-IF_FEATURE_-checks.patch \
- file://0001-iproute-support-scope-.-Closes-8561.patch \
- file://0001-ip-fix-an-improper-optimization-req.r.rtm_scope-may-.patch \
-"
-SRC_URI_append_libc-musl = " file://musl.cfg "
-
-SRC_URI[tarball.md5sum] = "be98a40cadf84ce2d6b05fa41a275c6a"
-SRC_URI[tarball.sha256sum] = "37d03132cc078937360b392170b7a1d0e5b322eee9f57c0b82292a8b1f0afe3d"
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.27.2.bb b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.27.2.bb
new file mode 100644
index 0000000..36a6342
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.27.2.bb
@@ -0,0 +1,52 @@
+require busybox.inc
+
+SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
+ file://busybox-udhcpc-no_deconfig.patch \
+ file://find-touchscreen.sh \
+ file://busybox-cron \
+ file://busybox-httpd \
+ file://busybox-udhcpd \
+ file://default.script \
+ file://simple.script \
+ file://hwclock.sh \
+ file://mount.busybox \
+ file://syslog \
+ file://syslog-startup.conf \
+ file://syslog.conf \
+ file://busybox-syslog.default \
+ file://mdev \
+ file://mdev.conf \
+ file://mdev-mount.sh \
+ file://umount.busybox \
+ file://defconfig \
+ file://busybox-syslog.service.in \
+ file://busybox-klogd.service.in \
+ file://fail_on_no_media.patch \
+ file://run-ptest \
+ file://inetd.conf \
+ file://inetd \
+ file://login-utilities.cfg \
+ file://recognize_connmand.patch \
+ file://busybox-cross-menuconfig.patch \
+ file://0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch \
+ file://mount-via-label.cfg \
+ file://sha1sum.cfg \
+ file://sha256sum.cfg \
+ file://getopts.cfg \
+ file://resize.cfg \
+ ${@["", "file://init.cfg"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]} \
+ ${@["", "file://mdev.cfg"][(d.getVar('VIRTUAL-RUNTIME_dev_manager') == 'busybox-mdev')]} \
+ file://syslog.cfg \
+ file://inittab \
+ file://rcS \
+ file://rcK \
+ file://runlevel \
+ file://makefile-libbb-race.patch \
+ file://CVE-2011-5325.patch \
+ file://CVE-2017-15873.patch \
+ file://busybox-CVE-2017-16544.patch \
+"
+SRC_URI_append_libc-musl = " file://musl.cfg "
+
+SRC_URI[tarball.md5sum] = "476186f4bab81781dab2369bfd42734e"
+SRC_URI[tarball.sha256sum] = "9d4be516b61e6480f156b11eb42577a13529f75d3383850bb75c50c285de63df"
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/man-decouple-manpages-from-build.patch b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/man-decouple-manpages-from-build.patch
deleted file mode 100644
index 3c896a1..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/man-decouple-manpages-from-build.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From b4d258629f090066783c3b4c91b40f63b9d0a296 Mon Sep 17 00:00:00 2001
-From: Paul Gortmaker <paul.gortmaker@windriver.com>
-Date: Sun, 8 Feb 2015 16:51:57 -0500
-Subject: [PATCH] man: decouple manpages from build
-
-The use of "help2man" doesn't work at all for cross compile, in
-addition to the extra requirement of perl it adds.
-
-Just decouple the manpages from the build in order to pave the way for
-importing prebuilt manpages that can be used in a cross build situation.
-
-Upstream-Status: Inappropriate [upstream doesn't care about x-compile case.]
-Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-
-diff --git a/Makefile.am b/Makefile.am
-index fb4af27..7576b2c 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -214,5 +214,4 @@ AM_CPPFLAGS = -Ilib -I$(top_srcdir)/lib -Isrc -I$(top_srcdir)/src
- include $(top_srcdir)/lib/local.mk
- include $(top_srcdir)/src/local.mk
- include $(top_srcdir)/doc/local.mk
--include $(top_srcdir)/man/local.mk
- include $(top_srcdir)/tests/local.mk
---
-2.2.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.27.bb b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.27.bb
deleted file mode 100644
index ea8740a..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.27.bb
+++ /dev/null
@@ -1,142 +0,0 @@
-SUMMARY = "The basic file, shell and text manipulation utilities"
-DESCRIPTION = "The GNU Core Utilities provide the basic file, shell and text \
-manipulation utilities. These are the core utilities which are expected to exist on \
-every system."
-HOMEPAGE = "http://www.gnu.org/software/coreutils/"
-BUGTRACKER = "http://debbugs.gnu.org/coreutils"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
- file://src/ls.c;beginline=5;endline=16;md5=38b79785ca88537b75871782a2a3c6b8"
-DEPENDS = "gmp libcap"
-DEPENDS_class-native = ""
-
-inherit autotools gettext texinfo
-
-SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz;name=tarball \
- http://distfiles.gentoo.org/distfiles/${BP}-man.tar.xz;name=manpages \
- file://man-decouple-manpages-from-build.patch \
- file://remove-usr-local-lib-from-m4.patch \
- file://fix-selinux-flask.patch \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- file://0001-uname-report-processor-and-hardware-correctly.patch \
- file://disable-ls-output-quoting.patch \
- file://0001-local.mk-fix-cross-compiling-problem.patch \
- "
-
-SRC_URI[tarball.md5sum] = "502795792c212932365e077946d353ae"
-SRC_URI[tarball.sha256sum] = "8891d349ee87b9ff7870f52b6d9312a9db672d2439d289bc57084771ca21656b"
-SRC_URI[manpages.md5sum] = "1b31a688d06764e0e94aa20b7ea08222"
-SRC_URI[manpages.sha256sum] = "1f615819e9167646c731636b6c5ecbe79837e82a18666bacc82c3fb1dfcfaea3"
-
-EXTRA_OECONF_class-native = "--without-gmp"
-EXTRA_OECONF_class-target = "--enable-install-program=arch --libexecdir=${libdir}"
-EXTRA_OECONF_class-nativesdk = "--enable-install-program=arch"
-
-# acl and xattr are not default features
-#
-PACKAGECONFIG_class-target ??= "\
- ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \
-"
-
-# The lib/oe/path.py requires xattr
-PACKAGECONFIG_class-native ??= "xattr"
-
-# with, without, depends, rdepends
-#
-PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
-PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
-
-# [ df mktemp base64 gets a special treatment and is not included in this
-bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname du \
- env expand expr factor fmt fold groups head hostid id install \
- join link logname md5sum mkfifo nice nl nohup nproc od paste pathchk \
- pinky pr printenv printf ptx readlink realpath runcon seq sha1sum sha224sum sha256sum \
- sha384sum sha512sum shred shuf sort split stdbuf 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
-base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
- mknod mv pwd rm rmdir sleep stty sync touch true uname stat"
-
-sbindir_progs= "chroot"
-
-# 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
-# directory.
-acpaths = "-I ./m4"
-
-# Deal with a separate builddir failure if src doesn't exist when creating version.c/version.h
-do_compile_prepend () {
- mkdir -p ${B}/src
-}
-
-do_install_class-native() {
- autotools_do_install
- # remove groups to fix conflict with shadow-native
- rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
- # The return is a must since native doesn't need the
- # do_install_append() in the below.
- return
-}
-
-do_install_append() {
- for i in df mktemp base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done
-
- install -d ${D}${base_bindir}
- [ "${base_bindir}" != "${bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${BPN}; done
-
- install -d ${D}${sbindir}
- [ "${sbindir}" != "${bindir}" ] && for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${BPN}; done
-
- # [ requires special handling because [.coreutils will cause the sed stuff
- # in update-alternatives to fail, therefore use lbracket - the name used
- # for the actual source file.
- mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
-
- # prebuilt man pages
- install -d ${D}/${mandir}/man1
- install -t ${D}/${mandir}/man1 ${S}/man/*.1
- # prebuilt man pages don't do a separate man page for [ vs test.
- # see comment above r.e. sed and update-alternatives
- cp -R --no-dereference --preserve=mode,links -v ${D}${mandir}/man1/test.1 ${D}${mandir}/man1/lbracket.1.${BPN}
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 mktemp df"
-ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 lbracket.1 groups.1 kill.1 uptime.1 stat.1 hostname.1"
-
-ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
-
-ALTERNATIVE_LINK_NAME[base64] = "${base_bindir}/base64"
-ALTERNATIVE_TARGET[base64] = "${bindir}/base64.${BPN}"
-ALTERNATIVE_LINK_NAME[base64.1] = "${mandir}/man1/base64.1"
-
-ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
-ALTERNATIVE_TARGET[mktemp] = "${bindir}/mktemp.${BPN}"
-ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1"
-
-ALTERNATIVE_LINK_NAME[df] = "${base_bindir}/df"
-ALTERNATIVE_TARGET[df] = "${bindir}/df.${BPN}"
-ALTERNATIVE_LINK_NAME[df.1] = "${mandir}/man1/df.1"
-
-ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
-ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
-ALTERNATIVE_LINK_NAME[lbracket.1] = "${mandir}/man1/lbracket.1"
-
-ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
-ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
-ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
-ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
-
-python __anonymous() {
- for prog in d.getVar('base_bindir_progs').split():
- d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
-
- for prog in d.getVar('sbindir_progs').split():
- d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir'), prog))
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.29.bb b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.29.bb
new file mode 100644
index 0000000..0b8acc5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.29.bb
@@ -0,0 +1,133 @@
+SUMMARY = "The basic file, shell and text manipulation utilities"
+DESCRIPTION = "The GNU Core Utilities provide the basic file, shell and text \
+manipulation utilities. These are the core utilities which are expected to exist on \
+every system."
+HOMEPAGE = "http://www.gnu.org/software/coreutils/"
+BUGTRACKER = "http://debbugs.gnu.org/coreutils"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ file://src/ls.c;beginline=1;endline=15;md5=1c3f9411e1842a062ce5ce9210beee0e"
+DEPENDS = "gmp libcap"
+DEPENDS_class-native = ""
+
+inherit autotools gettext texinfo
+
+SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \
+ file://remove-usr-local-lib-from-m4.patch \
+ file://fix-selinux-flask.patch \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+ file://0001-uname-report-processor-and-hardware-correctly.patch \
+ file://disable-ls-output-quoting.patch \
+ file://0001-local.mk-fix-cross-compiling-problem.patch \
+ "
+
+SRC_URI[md5sum] = "960cfe75a42c9907c71439f8eb436303"
+SRC_URI[sha256sum] = "92d0fa1c311cacefa89853bdb53c62f4110cdfda3820346b59cbd098f40f955e"
+
+EXTRA_OECONF_class-native = "--without-gmp"
+EXTRA_OECONF_class-target = "--enable-install-program=arch,hostname --libexecdir=${libdir}"
+EXTRA_OECONF_class-nativesdk = "--enable-install-program=arch"
+
+# acl and xattr are not default features
+#
+PACKAGECONFIG_class-target ??= "\
+ ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \
+"
+
+# The lib/oe/path.py requires xattr
+PACKAGECONFIG_class-native ??= "xattr"
+
+# with, without, depends, rdepends
+#
+PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
+PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
+PACKAGECONFIG[single-binary] = "--enable-single-binary,--disable-single-binary,,"
+
+# [ df mktemp base64 gets a special treatment and is not included in this
+bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname du \
+ env expand expr factor fmt fold groups head hostid id install \
+ join link logname md5sum mkfifo nice nl nohup nproc od paste pathchk \
+ pinky pr printenv printf ptx readlink realpath runcon seq sha1sum sha224sum sha256sum \
+ sha384sum sha512sum shred shuf sort split stdbuf 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
+base_bindir_progs = "cat chgrp chmod chown cp date dd echo false hostname kill ln ls mkdir \
+ mknod mv pwd rm rmdir sleep stty sync touch true uname stat"
+
+sbindir_progs= "chroot"
+
+# 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
+# directory.
+acpaths = "-I ./m4"
+
+# Deal with a separate builddir failure if src doesn't exist when creating version.c/version.h
+do_compile_prepend () {
+ mkdir -p ${B}/src
+}
+
+do_install_class-native() {
+ autotools_do_install
+ # remove groups to fix conflict with shadow-native
+ rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
+ # The return is a must since native doesn't need the
+ # do_install_append() in the below.
+ return
+}
+
+do_install_append() {
+ for i in df mktemp base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done
+
+ install -d ${D}${base_bindir}
+ [ "${base_bindir}" != "${bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${BPN}; done
+
+ install -d ${D}${sbindir}
+ [ "${sbindir}" != "${bindir}" ] && for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${BPN}; done
+
+ # [ requires special handling because [.coreutils will cause the sed stuff
+ # in update-alternatives to fail, therefore use lbracket - the name used
+ # for the actual source file.
+ mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+# Make hostname's priority higher than busybox but lower than net-tools
+ALTERNATIVE_PRIORITY[hostname] = "90"
+ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 mktemp df"
+ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 groups.1 kill.1 uptime.1 stat.1 hostname.1"
+
+ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
+
+ALTERNATIVE_LINK_NAME[base64] = "${base_bindir}/base64"
+ALTERNATIVE_TARGET[base64] = "${bindir}/base64.${BPN}"
+ALTERNATIVE_LINK_NAME[base64.1] = "${mandir}/man1/base64.1"
+
+ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
+ALTERNATIVE_TARGET[mktemp] = "${bindir}/mktemp.${BPN}"
+ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1"
+
+ALTERNATIVE_LINK_NAME[df] = "${base_bindir}/df"
+ALTERNATIVE_TARGET[df] = "${bindir}/df.${BPN}"
+ALTERNATIVE_LINK_NAME[df.1] = "${mandir}/man1/df.1"
+
+ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
+ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
+
+ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
+ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
+ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
+ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
+
+python __anonymous() {
+ for prog in d.getVar('base_bindir_progs').split():
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
+
+ for prog in d.getVar('sbindir_progs').split():
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir'), prog))
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus-wait/dbus-wait_git.bb b/import-layers/yocto-poky/meta/recipes-core/dbus-wait/dbus-wait_git.bb
index 4afb90c..c24295b 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dbus-wait/dbus-wait_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus-wait/dbus-wait_git.bb
@@ -11,7 +11,7 @@
PR = "r2"
SRC_URI = "git://git.yoctoproject.org/${BPN}"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/no-examples.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/no-examples.patch
index fbb4967..32e7611 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/no-examples.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/no-examples.patch
@@ -5,11 +5,13 @@
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---- dbus-glib-0.70/dbus/Makefile.am.orig 2006-07-23 16:04:43.000000000 +0200
-+++ dbus-glib-0.70/dbus/Makefile.am 2006-07-23 16:04:52.000000000 +0200
+Index: dbus-glib-0.108/dbus/Makefile.am
+===================================================================
+--- dbus-glib-0.108.orig/dbus/Makefile.am
++++ dbus-glib-0.108/dbus/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = . examples
+SUBDIRS = .
- INCLUDES=-I$(top_srcdir) $(DBUS_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_GLIB_TOOL_CFLAGS) -DDBUS_COMPILATION=1 -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\"
-
+ AM_CPPFLAGS = \
+ -I$(top_srcdir) \
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.20.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.20.bb
deleted file mode 100644
index eeadb7d..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.20.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-SUMMARY = "D-Bus test package (for D-bus functionality testing only)"
-HOMEPAGE = "http://dbus.freedesktop.org"
-SECTION = "base"
-LICENSE = "AFL-2 | GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
- file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
-
-DEPENDS = "dbus glib-2.0"
-
-RDEPENDS_${PN} += "make"
-RDEPENDS_${PN}-dev = ""
-
-SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
- file://tmpdir.patch \
- file://run-ptest \
- file://python-config.patch \
- file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
- "
-
-SRC_URI[md5sum] = "94c991e763d4f9f13690416b2dcd9411"
-SRC_URI[sha256sum] = "e574b9780b5425fde4d973bb596e7ea0f09e00fe2edd662da9016e976c460b48"
-
-S="${WORKDIR}/dbus-${PV}"
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
-
-inherit autotools pkgconfig gettext ptest upstream-version-is-even
-
-EXTRA_OECONF_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
-EXTRA_OECONF_X_class-native = "--without-x"
-
-EXTRA_OECONF = "--enable-tests \
- --enable-modular-tests \
- --enable-installed-tests \
- --enable-checks \
- --enable-asserts \
- --enable-verbose-mode \
- --disable-xml-docs \
- --disable-doxygen-docs \
- --disable-libaudit \
- --disable-systemd \
- --without-systemdsystemunitdir \
- --with-dbus-test-dir=${PTEST_PATH} \
- ${EXTRA_OECONF_X}"
-
-do_install() {
- :
-}
-
-do_install_ptest() {
- install -d ${D}${PTEST_PATH}/test
- l="shell printf refs syslog marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay"
- for i in $l; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done
- l="bus bus-system bus-launch-helper"
- for i in $l; do install ${B}/bus/.libs/test-$i ${D}${PTEST_PATH}/test; done
- install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test
- cp -r ${B}/test/data ${D}${PTEST_PATH}/test
-}
-RDEPENDS_${PN}-ptest += "bash"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.12.2.bb
new file mode 100644
index 0000000..dce047a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.12.2.bb
@@ -0,0 +1,82 @@
+SUMMARY = "D-Bus test package (for D-bus functionality testing only)"
+HOMEPAGE = "http://dbus.freedesktop.org"
+SECTION = "base"
+LICENSE = "AFL-2 | GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
+ file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
+
+DEPENDS = "dbus glib-2.0"
+
+RDEPENDS_${PN} += "make"
+RDEPENDS_${PN}-dev = ""
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
+ file://tmpdir.patch \
+ file://run-ptest \
+ file://python-config.patch \
+ file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
+ "
+
+SRC_URI[md5sum] = "3361456cadb99aa6601bed5b48964254"
+SRC_URI[sha256sum] = "272bb5091770b047c8188b926d5e6038fa4fe6745488b2add96b23e2d9a83d88"
+
+S="${WORKDIR}/dbus-${PV}"
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
+
+inherit autotools pkgconfig gettext ptest upstream-version-is-even
+
+EXTRA_OECONF_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
+EXTRA_OECONF_X_class-native = "--without-x"
+
+EXTRA_OECONF = "--enable-tests \
+ --enable-modular-tests \
+ --enable-installed-tests \
+ --enable-checks \
+ --enable-asserts \
+ --enable-verbose-mode \
+ --enable-largefile \
+ --disable-xml-docs \
+ --disable-doxygen-docs \
+ --disable-libaudit \
+ --with-dbus-test-dir=${PTEST_PATH} \
+ ${EXTRA_OECONF_X}"
+
+EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)}"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
+PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
+PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
+
+do_install() {
+ :
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/test
+ l="shell printf refs syslog marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay \
+ variant uid-permissions syntax spawn sd-activation names monitor message fdpass "
+ for i in $l; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done
+
+ l="bus bus-system bus-launch-helper"
+ for i in $l; do install ${B}/bus/.libs/test-$i ${D}${PTEST_PATH}/test; done
+
+ cp -r ${B}/test/data ${D}${PTEST_PATH}/test
+ install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test
+
+ install -d ${D}${PTEST_PATH}/test/.libs
+ cp -a ${B}/dbus/.libs/*.so* ${D}${PTEST_PATH}/test/.libs
+
+ # Remove build host references...
+ find "${D}${PTEST_PATH}/test/data" \( -name *.service -o -name *.conf -o -name "*.aaprofile" \) -type f -exec \
+ sed -i \
+ -e 's:${B}:${PTEST_PATH}:g' \
+ {} +
+}
+
+RDEPENDS_${PN}-ptest += "bash"
+
+PRIVATE_LIBS_${PN}-ptest = "libdbus-1.so.3"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch
deleted file mode 100644
index 85acb7b..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 1bfde222926be624a30a6e4b2cdc2c5064a36298 Mon Sep 17 00:00:00 2001
-From: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
-Date: Fri, 29 Jul 2016 01:19:37 +0300
-Subject: [PATCH] configure.ac: explicitely check stdint.h
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Otherwise HAVE_STDINT_H will not be defined or the var will not be
-picked up from cache so builds could fail with errors like:
-| ../../dbus-1.10.8/dbus/dbus-internals.h:239:8: error: ‘uintptr_t’ undeclared (first use in this function)
-
-Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
-[smcv: fix Autoconf underquoting]
-Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-
-Upstream-Status: Backport [from dbus-1.10]
-
----
- configure.ac | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index cf5c5b9..a228d63 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -699,6 +699,8 @@ AC_CHECK_HEADERS(byteswap.h)
-
- AC_CHECK_HEADERS(unistd.h)
-
-+AC_CHECK_HEADERS([stdint.h])
-+
- AC_CHECK_HEADERS(ws2tcpip.h)
-
- AC_CHECK_HEADERS(alloca.h)
---
-2.9.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/os-test.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/os-test.patch
deleted file mode 100644
index 54c257f..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/os-test.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-dbus: remove build host test in configure script
-
-The dbus build tests the build host to detect what initscript
-environment it expects. Remove the test and set it to "redhat"
-unconditionally as the oe-core initscript has a redhat-style pid file
-path.
-
-Signed-off-by: Andy Ross <andy.ross@windriver.com>
-Upstream-Status: Inappropriate [embedded]
-
-diff -u a/configure.ac b/configure.ac
---- a/configure.ac 2012-08-28 11:23:43.040609874 -0700
-+++ b/configure.ac 2012-08-28 11:54:25.602913945 -0700
-@@ -1348,19 +1348,8 @@
- AS_AC_EXPAND(EXPANDED_LIBEXECDIR, "$libexecdir")
- AS_AC_EXPAND(EXPANDED_DATADIR, "$datadir")
-
--#### Check our operating system
--operating_system=unknown
--if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
-- operating_system=redhat
--fi
--
--if test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-version ; then
-- operating_system=slackware
--fi
--
--if test -f /usr/bin/cygwin1.dll || test -f $EXPANDED_BINDIR/cygwin1.dll ; then
-- operating_system=cygwin
--fi
-+#### Build host test removed from upstream code, openembedded initscript is redhat-like:
-+operating_system=redhat
-
- #### Sort out init scripts
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/run-ptest b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/run-ptest
index c72d083..8a8970e 100755
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/run-ptest
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/run-ptest
@@ -1,10 +1,24 @@
#!/bin/sh
output() {
- if [ $? -eq 0 ]
+ retcode=$?
+ if [ $retcode -eq 0 ]
then echo "PASS: $i"
- else echo "FAIL: $i"
+ elif [ $retcode -eq 77 ]
+ then echo "SKIP: $i"
+ else echo "FAIL: $i"
fi
}
-for i in `ls test/test-*`; do ./$i ./test/data DBUS_TEST_HOMEDIR=./test >/dev/null; output; done
+export DBUS_TEST_HOMEDIR=./test
+export XDG_RUNTIME_DIR=./test
+export LD_LIBRARY_PATH=/usr/lib/dbus-test/ptest/test/.libs
+
+files=`ls test/test-*`
+
+for i in $files
+ do
+ ./$i ./test/data >/dev/null
+ output
+ done
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.20.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.20.bb
deleted file mode 100644
index 9ddedc1..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.20.bb
+++ /dev/null
@@ -1,180 +0,0 @@
-SUMMARY = "D-Bus message bus"
-DESCRIPTION = "D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a \"single instance\" application or daemon, and to launch applications and daemons on demand when their services are needed."
-HOMEPAGE = "http://dbus.freedesktop.org"
-SECTION = "base"
-LICENSE = "AFL-2 | GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
- file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
-DEPENDS = "expat virtual/libintl"
-RDEPENDS_dbus_class-native = ""
-RDEPENDS_dbus_class-nativesdk = ""
-PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
-ALLOW_EMPTY_dbus-ptest = "1"
-RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
-
-SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
- file://tmpdir.patch \
- file://dbus-1.init \
- file://os-test.patch \
- file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
- file://0001-configure.ac-explicitely-check-stdint.h.patch \
-"
-
-SRC_URI[md5sum] = "94c991e763d4f9f13690416b2dcd9411"
-SRC_URI[sha256sum] = "e574b9780b5425fde4d973bb596e7ea0f09e00fe2edd662da9016e976c460b48"
-
-inherit useradd autotools pkgconfig gettext update-rc.d upstream-version-is-even
-
-INITSCRIPT_NAME = "dbus-1"
-INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
-
-python __anonymous() {
- if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
- d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
-}
-
-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"
-
-CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
-
-DEBIANNAME_${PN} = "dbus-1"
-
-PACKAGES =+ "${PN}-lib"
-
-OLDPKGNAME = "dbus-x11"
-OLDPKGNAME_class-nativesdk = ""
-
-# for compatibility
-RPROVIDES_${PN} = "${OLDPKGNAME}"
-RREPLACES_${PN} += "${OLDPKGNAME}"
-
-FILES_${PN} = "${bindir}/dbus-daemon* \
- ${bindir}/dbus-uuidgen \
- ${bindir}/dbus-cleanup-sockets \
- ${bindir}/dbus-send \
- ${bindir}/dbus-monitor \
- ${bindir}/dbus-launch \
- ${bindir}/dbus-run-session \
- ${bindir}/dbus-update-activation-environment \
- ${libexecdir}/dbus* \
- ${sysconfdir} \
- ${localstatedir} \
- ${datadir}/dbus-1/services \
- ${datadir}/dbus-1/system-services \
- ${datadir}/dbus-1/session.d \
- ${datadir}/dbus-1/session.conf \
- ${datadir}/dbus-1/system.d \
- ${datadir}/dbus-1/system.conf \
- ${systemd_system_unitdir} \
- ${systemd_user_unitdir} \
-"
-FILES_${PN}-lib = "${libdir}/lib*.so.*"
-RRECOMMENDS_${PN}-lib = "${PN}"
-FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool"
-
-PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}"
-pkg_postinst_dbus() {
- # If both systemd and sysvinit are enabled, mask the dbus-1 init script
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
- if [ -n "$D" ]; then
- OPTS="--root=$D"
- fi
- systemctl $OPTS mask dbus-1.service
- fi
-
- if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
- /etc/init.d/populate-volatile.sh update
- fi
-}
-
-EXTRA_OECONF = "--disable-tests \
- --disable-xml-docs \
- --disable-doxygen-docs \
- --disable-libaudit \
- --enable-largefile \
- "
-
-EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl"
-EXTRA_OECONF_append_class-native = " --disable-selinux"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)}"
-PACKAGECONFIG_class-native = ""
-PACKAGECONFIG_class-nativesdk = ""
-
-PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
-PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
-PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
-
-do_install() {
- autotools_do_install
-
- if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
- install -d ${D}${sysconfdir}/init.d
- sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh
- install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
- fi
-
- if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
- for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \
- install -d ${D}${systemd_system_unitdir}/$i; done
- install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/
- ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket
- ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket
- ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service
- fi
-
- install -d ${D}${sysconfdir}/default/volatiles
- echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
- > ${D}${sysconfdir}/default/volatiles/99_dbus
-
-
- mkdir -p ${D}${localstatedir}/lib/dbus
-
- chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
-
- chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
- chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
-
- # Remove Red Hat initscript
- rm -rf ${D}${sysconfdir}/rc.d
-
- # Remove empty testexec directory as we don't build tests
- rm -rf ${D}${libdir}/dbus-1.0/test
-
- # Remove /var/run as it is created on startup
- rm -rf ${D}${localstatedir}/run
-}
-
-do_install_class-native() {
- autotools_do_install
-
- # for dbus-glib-native introspection generation
- install -d ${D}${STAGING_DATADIR_NATIVE}/dbus/
- # N.B. is below install actually required?
- install -m 0644 bus/session.conf ${D}${STAGING_DATADIR_NATIVE}/dbus/session.conf
-
- # dbus-glib-native and dbus-glib need this xml file
- ./bus/dbus-daemon --introspect > ${D}${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
-
- # dbus-launch has no X support so lets not install it in case the host
- # has a more featured and useful version
- rm -f ${D}${bindir}/dbus-launch
-}
-
-do_install_class-nativesdk() {
- autotools_do_install
-
- # dbus-launch has no X support so lets not install it in case the host
- # has a more featured and useful version
- rm -f ${D}${bindir}/dbus-launch
-
- # Remove /var/run to avoid QA error
- rm -rf ${D}${localstatedir}/run
-}
-BBCLASSEXTEND = "native nativesdk"
-
-INSANE_SKIP_${PN}-ptest += "build-deps"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.12.2.bb
new file mode 100644
index 0000000..fb5b69a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.12.2.bb
@@ -0,0 +1,181 @@
+SUMMARY = "D-Bus message bus"
+DESCRIPTION = "D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a \"single instance\" application or daemon, and to launch applications and daemons on demand when their services are needed."
+HOMEPAGE = "http://dbus.freedesktop.org"
+SECTION = "base"
+LICENSE = "AFL-2 | GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
+ file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
+DEPENDS = "expat virtual/libintl autoconf-archive"
+RDEPENDS_dbus_class-native = ""
+RDEPENDS_dbus_class-nativesdk = ""
+PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
+ALLOW_EMPTY_dbus-ptest = "1"
+RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
+ file://tmpdir.patch \
+ file://dbus-1.init \
+ file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
+"
+
+SRC_URI[md5sum] = "3361456cadb99aa6601bed5b48964254"
+SRC_URI[sha256sum] = "272bb5091770b047c8188b926d5e6038fa4fe6745488b2add96b23e2d9a83d88"
+
+inherit useradd autotools pkgconfig gettext update-rc.d upstream-version-is-even
+
+INITSCRIPT_NAME = "dbus-1"
+INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
+
+python __anonymous() {
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
+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"
+
+CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
+
+DEBIANNAME_${PN} = "dbus-1"
+
+PACKAGES =+ "${PN}-lib"
+
+OLDPKGNAME = "dbus-x11"
+OLDPKGNAME_class-nativesdk = ""
+
+# for compatibility
+RPROVIDES_${PN} = "${OLDPKGNAME}"
+RREPLACES_${PN} += "${OLDPKGNAME}"
+
+FILES_${PN} = "${bindir}/dbus-daemon* \
+ ${bindir}/dbus-uuidgen \
+ ${bindir}/dbus-cleanup-sockets \
+ ${bindir}/dbus-send \
+ ${bindir}/dbus-monitor \
+ ${bindir}/dbus-launch \
+ ${bindir}/dbus-run-session \
+ ${bindir}/dbus-update-activation-environment \
+ ${libexecdir}/dbus* \
+ ${sysconfdir} \
+ ${localstatedir} \
+ ${datadir}/dbus-1/services \
+ ${datadir}/dbus-1/system-services \
+ ${datadir}/dbus-1/session.d \
+ ${datadir}/dbus-1/session.conf \
+ ${datadir}/dbus-1/system.d \
+ ${datadir}/dbus-1/system.conf \
+ ${datadir}/xml/dbus-1 \
+ ${systemd_system_unitdir} \
+ ${systemd_user_unitdir} \
+ ${nonarch_libdir}/sysusers.d/dbus.conf \
+ ${nonarch_libdir}/tmpfiles.d/dbus.conf \
+"
+FILES_${PN}-lib = "${libdir}/lib*.so.*"
+RRECOMMENDS_${PN}-lib = "${PN}"
+FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${libdir}/cmake/DBus1 ${bindir}/dbus-test-tool"
+
+PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}"
+pkg_postinst_dbus() {
+ # If both systemd and sysvinit are enabled, mask the dbus-1 init script
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask dbus-1.service
+ fi
+
+ if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
+ /etc/init.d/populate-volatile.sh update
+ fi
+}
+
+EXTRA_OECONF = "--disable-tests \
+ --disable-xml-docs \
+ --disable-doxygen-docs \
+ --disable-libaudit \
+ --enable-largefile \
+ "
+
+EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl"
+EXTRA_OECONF_append_class-native = " --disable-selinux"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)}"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
+PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
+PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
+
+do_install() {
+ autotools_do_install
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/init.d
+ sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh
+ install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
+ fi
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \
+ install -d ${D}${systemd_system_unitdir}/$i; done
+ install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/
+ ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket
+ ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket
+ ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service
+ fi
+
+ install -d ${D}${sysconfdir}/default/volatiles
+ echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
+ > ${D}${sysconfdir}/default/volatiles/99_dbus
+
+
+ mkdir -p ${D}${localstatedir}/lib/dbus
+
+ chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
+
+ chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
+ chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
+
+ # Remove Red Hat initscript
+ rm -rf ${D}${sysconfdir}/rc.d
+
+ # Remove empty testexec directory as we don't build tests
+ rm -rf ${D}${libdir}/dbus-1.0/test
+
+ # Remove /var/run as it is created on startup
+ rm -rf ${D}${localstatedir}/run
+}
+
+do_install_class-native() {
+ autotools_do_install
+
+ # for dbus-glib-native introspection generation
+ install -d ${D}${STAGING_DATADIR_NATIVE}/dbus/
+ # N.B. is below install actually required?
+ install -m 0644 bus/session.conf ${D}${STAGING_DATADIR_NATIVE}/dbus/session.conf
+
+ # dbus-glib-native and dbus-glib need this xml file
+ ./bus/dbus-daemon --introspect > ${D}${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
+
+ # dbus-launch has no X support so lets not install it in case the host
+ # has a more featured and useful version
+ rm -f ${D}${bindir}/dbus-launch
+}
+
+do_install_class-nativesdk() {
+ autotools_do_install
+
+ # dbus-launch has no X support so lets not install it in case the host
+ # has a more featured and useful version
+ rm -f ${D}${bindir}/dbus-launch
+
+ # Remove /var/run to avoid QA error
+ rm -rf ${D}${localstatedir}/run
+}
+BBCLASSEXTEND = "native nativesdk"
+
+INSANE_SKIP_${PN}-ptest += "build-deps"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0004-fix-2kb-keys.patch b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0004-fix-2kb-keys.patch
index 7539d20..60c6a29 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0004-fix-2kb-keys.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0004-fix-2kb-keys.patch
@@ -5,18 +5,15 @@
kex.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/kex.h b/kex.h
-index 72430e9..375c677 100644
---- a/kex.h
-+++ b/kex.h
-@@ -67,6 +67,6 @@ struct KEXState {
- };
+Index: dropbear-2017.75/kex.h
+===================================================================
+--- dropbear-2017.75.orig/kex.h
++++ dropbear-2017.75/kex.h
+@@ -106,6 +106,6 @@ int curve25519_donna(unsigned char *out,
+ #endif
-#define MAX_KEXHASHBUF 2000
+#define MAX_KEXHASHBUF 3000
- #endif /* _KEX_H_ */
---
-1.7.11.7
-
+ #endif /* DROPBEAR_KEX_H_ */
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat.inc b/import-layers/yocto-poky/meta/recipes-core/expat/expat.inc
deleted file mode 100644
index 0ee6c27..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat.inc
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "A stream-oriented XML parser library"
-DESCRIPTION = "Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags)"
-HOMEPAGE = "http://expat.sourceforge.net/"
-SECTION = "libs"
-LICENSE = "MIT"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \
- file://autotools.patch \
- file://libtool-tag.patch \
- "
-
-SRC_URI_append_class-native = " file://no_getrandom.patch"
-
-inherit autotools lib_package
-
-# This package uses an archive format known to have issue with some
-# versions of gzip
-DEPENDS += "pigz-native"
-do_unpack[depends] += "pigz-native:do_populate_sysroot"
-
-do_configure_prepend () {
- rm -f ${S}/conftools/libtool.m4
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat/autotools.patch b/import-layers/yocto-poky/meta/recipes-core/expat/expat/autotools.patch
index 3d3c5ba..104717e 100644
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat/autotools.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/expat/expat/autotools.patch
@@ -10,11 +10,12 @@
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd expat-2.1.0/configure.in expat-2.1.0/configure.in
---- expat-2.1.0/configure.ac 2012-03-04 01:45:53.000000000 +0200
-+++ expat-2.1.0/configure.ac 2012-05-10 21:04:44.000000000 +0300
-@@ -51,8 +51,6 @@
-
+Index: expat-2.2.5/configure.ac
+===================================================================
+--- expat-2.2.5.orig/configure.ac
++++ expat-2.2.5/configure.ac
+@@ -53,8 +53,6 @@ LIBAGE=6 # CMakeLists.txt!
+ CPPFLAGS="${CPPFLAGS} -DHAVE_EXPAT_CONFIG_H"
AC_CONFIG_HEADER(expat_config.h)
-sinclude(conftools/ac_c_bigendian_cross.m4)
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat/libtool-tag.patch b/import-layers/yocto-poky/meta/recipes-core/expat/expat/libtool-tag.patch
index 3ef4197..0a0aed2 100644
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat/libtool-tag.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/expat/expat/libtool-tag.patch
@@ -1,18 +1,30 @@
+From 10342e6b600858b091bc7771e454d9e06af06410 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 2 Nov 2017 18:20:57 +0800
+Subject: [PATCH] Add CC tag to build
+
Add CC tag to build
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
-Index: expat-2.2.2/Makefile.in
-===================================================================
---- expat-2.2.2.orig/Makefile.in
-+++ expat-2.2.2/Makefile.in
-@@ -109,7 +109,7 @@ mkdir-init:
-
- CC = @CC@
- CXX = @CXX@
+diff --git a/Makefile.in b/Makefile.in
+index 9560a95..d444bd6 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -319,7 +319,7 @@ LIBCURRENT = @LIBCURRENT@
+ LIBOBJS = @LIBOBJS@
+ LIBREVISION = @LIBREVISION@
+ LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
+LIBTOOL = @LIBTOOL@ --tag CC
-
- INCLUDES = -I$(srcdir)/lib -I.
- LDFLAGS = @LDFLAGS@
+ LIPO = @LIPO@
+ LN_S = @LN_S@
+ LTLIBOBJS = @LTLIBOBJS@
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat/no_getrandom.patch b/import-layers/yocto-poky/meta/recipes-core/expat/expat/no_getrandom.patch
deleted file mode 100644
index d64f1bf..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat/no_getrandom.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-The native version of expat may be used on older systems which dont have glibc 2.25
-and hence don't have getrandom() thanks to uninative. Disable the libc call and
-use the syscall instead to avoid a compatibility issue until we have 2.25 everywhere
-we support with uninative.
-
-RP
-2017/8/14
-
-Upstream-Status: Inappropriate
-
-Index: expat-2.2.3/configure.ac
-===================================================================
---- expat-2.2.3.orig/configure.ac
-+++ expat-2.2.3/configure.ac
-@@ -151,7 +151,7 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([
- #include <stdlib.h> /* for NULL */
- #include <sys/random.h>
- int main() {
-- return getrandom(NULL, 0U, 0U);
-+ return getrandomBREAKME(NULL, 0U, 0U);
- }
- ])], [
- AC_DEFINE([HAVE_GETRANDOM], [1],
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.3.bb b/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.3.bb
deleted file mode 100644
index abf8450..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.3.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require expat.inc
-LIC_FILES_CHKSUM = "file://COPYING;md5=5b8620d98e49772d95fc1d291c26aa79"
-SRC_URI[md5sum] = "f053af63ef5f39bd9b78d01fbc203334"
-SRC_URI[sha256sum] = "b31890fb02f85c002a67491923f89bda5028a880fd6c374f707193ad81aace5f"
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.5.bb b/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.5.bb
new file mode 100644
index 0000000..c68a2ef
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.5.bb
@@ -0,0 +1,23 @@
+SUMMARY = "A stream-oriented XML parser library"
+DESCRIPTION = "Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags)"
+HOMEPAGE = "http://expat.sourceforge.net/"
+SECTION = "libs"
+LICENSE = "MIT"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5b8620d98e49772d95fc1d291c26aa79"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \
+ file://autotools.patch \
+ file://libtool-tag.patch \
+ "
+
+SRC_URI[md5sum] = "789e297f547980fc9ecc036f9a070d49"
+SRC_URI[sha256sum] = "d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6"
+
+inherit autotools lib_package
+
+do_configure_prepend () {
+ rm -f ${S}/conftools/libtool.m4
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
new file mode 100644
index 0000000..6156a15
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
@@ -0,0 +1,321 @@
+For reasons which I just can't fathom gnulib doesn't use the expected tools to
+find libraries but badly reinvents the wheel. This will trivially lead to host
+contamination (explicit searches of /usr/lib) or incorrect RPATHs (bad
+canonicalisation resulting in relative paths).
+
+Simply delete all the crazy, and replace with a single call to pkg-config.
+
+Upstream-Status: Inappropriate (upstream still refuse to consider pkg-config)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/gnulib-local/m4/libcroco.m4 b/gnulib-local/m4/libcroco.m4
+index f79ea82f1..1f67274db 100644
+--- a/gettext-tools/gnulib-m4/libcroco.m4
++++ b/gettext-tools/gnulib-m4/libcroco.m4
+@@ -8,6 +8,7 @@ dnl From Bruno Haible.
+
+ AC_DEFUN([gl_LIBCROCO],
+ [
++ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ dnl libcroco depends on libglib.
+ AC_REQUIRE([gl_LIBGLIB])
+
+@@ -23,65 +24,10 @@ AC_DEFUN([gl_LIBCROCO],
+ LTLIBCROCO=
+ INCCROCO=
+ if test "$gl_cv_libcroco_use_included" != yes; then
+- dnl Figure out whether we can use a preinstalled libcroco-0.6, or have to
+- dnl use the included one.
+- AC_CACHE_VAL([gl_cv_libcroco], [
+- gl_cv_libcroco=no
+- gl_cv_LIBCROCO=
+- gl_cv_LTLIBCROCO=
+- gl_cv_INCCROCO=
+- gl_save_LIBS="$LIBS"
+- dnl Search for libcroco and define LIBCROCO_0_6, LTLIBCROCO_0_6 and
+- dnl INCCROCO_0_6 accordingly.
+- dnl Don't use croco-0.6-config nor pkg-config, since it doesn't work when
+- dnl cross-compiling or when the C compiler in use is different from the
+- dnl one that built the library.
+- AC_LIB_LINKFLAGS_BODY([croco-0.6], [glib-2.0])
+- LIBS="$gl_save_LIBS $LIBCROCO_0_6"
+- AC_TRY_LINK([#include <libcroco-config.h>],
+- [const char *version = LIBCROCO_VERSION; return !version;],
+- [gl_cv_libcroco=yes
+- gl_cv_LIBCROCO="$LIBCROCO_0_6"
+- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6"
+- ])
+- if test "$gl_cv_libcroco" != yes; then
+- gl_save_CPPFLAGS="$CPPFLAGS"
+- CPPFLAGS="$CPPFLAGS $INCCROCO_0_6"
+- AC_TRY_LINK([#include <libcroco-config.h>],
+- [const char *version = LIBCROCO_VERSION; return !version;],
+- [gl_cv_libcroco=yes
+- gl_cv_LIBCROCO="$LIBCROCO_0_6"
+- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6"
+- gl_cv_INCCROCO="$INCCROCO_0_6"
+- ])
+- if test "$gl_cv_libcroco" != yes; then
+- dnl Often the include files are installed in
+- dnl /usr/include/libcroco-0.6/libcroco.
+- AC_TRY_LINK([#include <libcroco-0.6/libcroco/libcroco-config.h>],
+- [const char *version = LIBCROCO_VERSION; return !version;],
+- [gl_ABSOLUTE_HEADER([libcroco-0.6/libcroco/libcroco-config.h])
+- libcroco_include_dir=`echo "$gl_cv_absolute_libcroco_0_6_libcroco_libcroco_config_h" | sed -e 's,.libcroco-config\.h$,,'`
+- if test -d "$libcroco_include_dir"; then
+- gl_cv_libcroco=yes
+- gl_cv_LIBCROCO="$LIBCROCO_0_6"
+- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6"
+- gl_cv_INCCROCO="-I$libcroco_include_dir"
+- fi
+- ])
+- fi
+- CPPFLAGS="$gl_save_CPPFLAGS"
+- fi
+- LIBS="$gl_save_LIBS"
+- ])
+- AC_MSG_CHECKING([for libcroco])
+- AC_MSG_RESULT([$gl_cv_libcroco])
+- if test $gl_cv_libcroco = yes; then
+- LIBCROCO="$gl_cv_LIBCROCO"
+- LTLIBCROCO="$gl_cv_LTLIBCROCO"
+- INCCROCO="$gl_cv_INCCROCO"
+- else
+- gl_cv_libcroco_use_included=yes
+- fi
++ PKG_CHECK_MODULES([CROCO], [libcroco-0.6])
++ LIBCROCO=$CROCO_LIBS
++ LTLIBCROCO=$CROCO_LIBS
++ INCCROCO=$CROCO_CFLAGS
+ fi
+ AC_SUBST([LIBCROCO])
+ AC_SUBST([LTLIBCROCO])
+diff --git a/gnulib-local/m4/libglib.m4 b/gnulib-local/m4/libglib.m4
+index 42e55e6fd..ab25a5b22 100644
+--- a/gettext-tools/gnulib-m4/libglib.m4
++++ b/gettext-tools/gnulib-m4/libglib.m4
+@@ -8,6 +8,7 @@ dnl From Bruno Haible.
+
+ AC_DEFUN([gl_LIBGLIB],
+ [
++ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ AC_MSG_CHECKING([whether included glib is requested])
+ AC_ARG_WITH([included-glib],
+ [ --with-included-glib use the glib2 included here],
+@@ -20,76 +21,10 @@ AC_DEFUN([gl_LIBGLIB],
+ LTLIBGLIB=
+ INCGLIB=
+ if test "$gl_cv_libglib_use_included" != yes; then
+- dnl Figure out whether we can use a preinstalled libglib-2.0, or have to use
+- dnl the included one.
+- AC_CACHE_VAL([gl_cv_libglib], [
+- gl_cv_libglib=no
+- gl_cv_LIBGLIB=
+- gl_cv_LTLIBGLIB=
+- gl_cv_INCGLIB=
+- gl_save_LIBS="$LIBS"
+- dnl Search for libglib2 and define LIBGLIB_2_0, LTLIBGLIB_2_0 and
+- dnl INCGLIB_2_0 accordingly.
+- dnl Don't use glib-config nor pkg-config, since it doesn't work when
+- dnl cross-compiling or when the C compiler in use is different from the
+- dnl one that built the library.
+- AC_LIB_LINKFLAGS_BODY([glib-2.0])
+- LIBS="$gl_save_LIBS $LIBGLIB_2_0"
+- AC_TRY_LINK([#include <glib.h>
+-#ifndef G_BEGIN_DECLS
+-error this glib.h includes a glibconfig.h from a glib version 1.x
+-#endif
+-],
+- [g_string_new ("foo");],
+- [gl_cv_libglib=yes
+- gl_cv_LIBGLIB="$LIBGLIB_2_0"
+- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
+- ])
+- if test "$gl_cv_libglib" != yes; then
+- gl_save_CPPFLAGS="$CPPFLAGS"
+- CPPFLAGS="$CPPFLAGS $INCGLIB_2_0"
+- AC_TRY_LINK([#include <glib.h>
+-#ifndef G_BEGIN_DECLS
+-error this glib.h includes a glibconfig.h from a glib version 1.x
+-#endif
+-],
+- [g_string_new ("foo");],
+- [gl_cv_libglib=yes
+- gl_cv_LIBGLIB="$LIBGLIB_2_0"
+- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
+- gl_cv_INCGLIB="$INCGLIB_2_0"
+- ])
+- if test "$gl_cv_libglib" != yes; then
+- dnl Often the include files are installed in /usr/include/glib-2.0
+- dnl and /usr/lib/glib-2.0/include.
+- if test -n "$LIBGLIB_2_0_PREFIX"; then
+- CPPFLAGS="$gl_save_CPPFLAGS -I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include"
+- AC_TRY_LINK([#include <glib.h>
+-#ifndef G_BEGIN_DECLS
+-error this glib.h includes a glibconfig.h from a glib version 1.x
+-#endif
+-],
+- [g_string_new ("foo");],
+- [gl_cv_libglib=yes
+- gl_cv_LIBGLIB="$LIBGLIB_2_0"
+- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
+- gl_cv_INCGLIB="-I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include"
+- ])
+- fi
+- fi
+- CPPFLAGS="$gl_save_CPPFLAGS"
+- fi
+- LIBS="$gl_save_LIBS"
+- ])
+- AC_MSG_CHECKING([for glib])
+- AC_MSG_RESULT([$gl_cv_libglib])
+- if test $gl_cv_libglib = yes; then
+- LIBGLIB="$gl_cv_LIBGLIB"
+- LTLIBGLIB="$gl_cv_LTLIBGLIB"
+- INCGLIB="$gl_cv_INCGLIB"
+- else
+- gl_cv_libglib_use_included=yes
+- fi
++ PKG_CHECK_MODULES([GLIB], [glib-2.0])
++ LIBGLIB="$GLIB_LIBS"
++ LTLIBGLIB="$GLIB_LIBS"
++ INCGLIB="$GLIB_CFLAGS"
+ fi
+ AC_SUBST([LIBGLIB])
+ AC_SUBST([LTLIBGLIB])
+diff --git a/gnulib-local/m4/libxml.m4 b/gnulib-local/m4/libxml.m4
+index 480c700d2..cb39309d5 100644
+--- a/gettext-tools/gnulib-m4/libxml.m4
++++ b/gettext-tools/gnulib-m4/libxml.m4
+@@ -8,6 +8,7 @@ dnl From Bruno Haible.
+
+ AC_DEFUN([gl_LIBXML],
+ [
++ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ AC_REQUIRE([AM_ICONV_LINK])
+
+ AC_MSG_CHECKING([whether included libxml is requested])
+@@ -22,100 +22,10 @@ AC_DEFUN([gl_LIBXML],
+ LTLIBXML=
+ INCXML=
+ if test "$gl_cv_libxml_use_included" != yes; then
+- dnl Figure out whether we can use a preinstalled libxml2, or have to use
+- dnl the included one.
+- AC_CACHE_VAL([gl_cv_libxml], [
+- gl_cv_libxml=no
+- gl_cv_LIBXML=
+- gl_cv_LTLIBXML=
+- gl_cv_INCXML=
+- gl_save_LIBS="$LIBS"
+- LIBS="$LIBS $LIBICONV"
+- dnl Search for libxml2 and define LIBXML2, LTLIBXML2 and INCXML2
+- dnl accordingly.
+- dnl Don't use xml2-config nor pkg-config, since it doesn't work when
+- dnl cross-compiling or when the C compiler in use is different from the
+- dnl one that built the library.
+- dnl Use a test program that tries to invoke xmlFree. On Cygwin 1.7.x,
+- dnl libxml2 is built in such a way that uses of xmlFree work fine with
+- dnl -Wl,--enable-auto-import but lead to a link error with
+- dnl -Wl,--disable-auto-import.
+- AC_LIB_LINKFLAGS_BODY([xml2])
+- LIBS="$gl_save_LIBS $LIBXML2 $LIBICONV"
+- AC_TRY_LINK([#include <libxml/xmlversion.h>
+- #include <libxml/xmlmemory.h>
+- #include <libxml/xpath.h>
+- ],
+- [xmlCheckVersion (0);
+- xmlFree ((void *) 0);
+- xmlXPathSetContextNode ((void *)0, (void *)0);
+- ],
+- [gl_cv_libxml=yes
+- gl_cv_LIBXML="$LIBXML2 $LIBICONV"
+- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
+- ])
+- if test "$gl_cv_libxml" != yes; then
+- gl_save_CPPFLAGS="$CPPFLAGS"
+- CPPFLAGS="$CPPFLAGS $INCXML2"
+- AC_TRY_LINK([#include <libxml/xmlversion.h>
+- #include <libxml/xmlmemory.h>
+- #include <libxml/xpath.h>
+- ],
+- [xmlCheckVersion (0);
+- xmlFree ((void *) 0);
+- xmlXPathSetContextNode ((void *)0, (void *)0);
+- ],
+- [gl_cv_libxml=yes
+- gl_cv_LIBXML="$LIBXML2 $LIBICONV"
+- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
+- gl_cv_INCXML="$INCXML2"
+- ])
+- if test "$gl_cv_libxml" != yes; then
+- dnl Often the include files are installed in /usr/include/libxml2.
+- dnl In libxml2-2.5, <libxml/xmlversion.h> is self-contained.
+- dnl In libxml2-2.6, it includes <libxml/xmlexports.h> which is
+- dnl self-contained.
+- libxml2_include_dir=
+- AC_TRY_CPP([#include <libxml2/libxml/xmlexports.h>],
+- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlexports.h])
+- libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlexports_h" | sed -e 's,.libxml.xmlexports\.h$,,'`
+- ])
+- if test -z "$libxml2_include_dir"; then
+- AC_TRY_CPP([#include <libxml2/libxml/xmlversion.h>],
+- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlversion.h])
+- libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlversion_h" | sed -e 's,.libxml.xmlversion\.h$,,'`
+- ])
+- fi
+- if test -n "$libxml2_include_dir" && test -d "$libxml2_include_dir"; then
+- CPPFLAGS="$gl_save_CPPFLAGS -I$libxml2_include_dir"
+- AC_TRY_LINK([#include <libxml/xmlversion.h>
+- #include <libxml/xmlmemory.h>
+- #include <libxml/xpath.h>
+- ],
+- [xmlCheckVersion (0);
+- xmlFree ((void *) 0);
+- xmlXPathSetContextNode ((void *)0, (void *)0);
+- ],
+- [gl_cv_libxml=yes
+- gl_cv_LIBXML="$LIBXML2 $LIBICONV"
+- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
+- gl_cv_INCXML="-I$libxml2_include_dir"
+- ])
+- fi
+- fi
+- CPPFLAGS="$gl_save_CPPFLAGS"
+- fi
+- LIBS="$gl_save_LIBS"
+- ])
+- AC_MSG_CHECKING([for libxml])
+- AC_MSG_RESULT([$gl_cv_libxml])
+- if test $gl_cv_libxml = yes; then
+- LIBXML="$gl_cv_LIBXML"
+- LTLIBXML="$gl_cv_LTLIBXML"
+- INCXML="$gl_cv_INCXML"
+- else
+- gl_cv_libxml_use_included=yes
+- fi
++ PKG_CHECK_MODULES([XML], [libxml-2.0])
++ LIBXML=$XML_LIBS
++ LTLIBXML=$XML_LIBS
++ INCXML=$XML_CFLAGS
+ fi
+ AC_SUBST([LIBXML])
+ AC_SUBST([LTLIBXML])
+diff --git a/gnulib-local/lib/term-styled-ostream.oo.c b/gnulib-local/lib/term-styled-ostream.oo.c
+index 81a407467..218565329 100644
+--- a/gettext-tools/gnulib-lib/term-styled-ostream.oo.c
++++ b/gettext-tools/gnulib-lib/term-styled-ostream.oo.c
+@@ -25,4 +25,4 @@
+-#include <cr-om-parser.h>
+-#include <cr-sel-eng.h>
+-#include <cr-style.h>
+-#include <cr-rgb.h>
++#include <libcroco/cr-om-parser.h>
++#include <libcroco/cr-sel-eng.h>
++#include <libcroco/cr-style.h>
++#include <libcroco/cr-rgb.h>
+@@ -31 +31 @@
+-# include <cr-fonts.h>
++# include <libcroco/cr-fonts.h>
+@@ -33 +33 @@
+-#include <cr-string.h>
++#include <libcroco/cr-string.h>
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb
index c2059e6..68f5cc3 100644
--- a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb
@@ -8,7 +8,7 @@
LICENSE = "GPLv3+ & LGPL-2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "gettext-native virtual/libiconv expat"
+DEPENDS = "gettext-native virtual/libiconv"
DEPENDS_class-native = "gettext-minimal-native"
PROVIDES = "virtual/libintl virtual/gettext"
PROVIDES_class-native = "virtual/gettext-native"
@@ -17,14 +17,13 @@
file://parallel.patch \
file://add-with-bisonlocaledir.patch \
file://cr-statement.c-timsort.h-fix-formatting-issues.patch \
+ file://use-pkgconfig.patch \
"
SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092"
SRC_URI[sha256sum] = "ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43"
-PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"
-
-inherit autotools texinfo
+inherit autotools texinfo pkgconfig
EXTRA_OECONF += "--without-lispdir \
--disable-csharp \
@@ -33,18 +32,26 @@
--disable-native-java \
--disable-openmp \
--disable-acl \
- --with-included-glib \
--without-emacs \
--without-cvs \
--without-git \
- --with-included-libxml \
- --with-included-libcroco \
- --with-included-libunistring \
"
EXTRA_OECONF_append_class-target = " \
--with-bisonlocaledir=${datadir}/locale \
"
+PACKAGECONFIG ??= "croco glib libxml"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[croco] = "--without-included-libcroco,--with-included-libcroco,libcroco"
+PACKAGECONFIG[glib] = "--without-included-glib,--with-included-glib,glib-2.0"
+PACKAGECONFIG[libxml] = "--without-included-libxml,--with-included-libxml,libxml2"
+# Need paths here to avoid host contamination but this can cause RPATH warnings
+# or problems if $libdir isn't $prefix/lib.
+PACKAGECONFIG[libunistring] = "--with-libunistring-prefix=${STAGING_LIBDIR}/..,--with-included-libunistring,libunistring"
+PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"
+
acpaths = '-I ${S}/gettext-runtime/m4 \
-I ${S}/gettext-tools/m4'
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
index 41a190e..67ca624 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
@@ -1,7 +1,7 @@
-From 41534253b6b61ed4769eb6a3966698a50ee73b71 Mon Sep 17 00:00:00 2001
+From 2acf40361eecd17c6981743dabd06e25a9934258 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 12 Jun 2015 17:08:46 +0300
-Subject: [PATCH] Remove the warning about deprecated paths in schemas
+Subject: [PATCH 05/10] Remove the warning about deprecated paths in schemas
Some schemas in gsettings-desktop-schemas (such as proxy and locale)
are still using deprecated paths, as of 3.16.1. This causes warning
@@ -11,26 +11,33 @@
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
- gio/glib-compile-schemas.c | 6 ------
- 1 file changed, 6 deletions(-)
+ gio/glib-compile-schemas.c | 13 -------------
+ 1 file changed, 13 deletions(-)
diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
-index e42949b..ec79d7c 100644
+index b8de090..130f89b 100644
--- a/gio/glib-compile-schemas.c
+++ b/gio/glib-compile-schemas.c
-@@ -1202,12 +1202,6 @@ parse_state_start_schema (ParseState *state,
+@@ -1219,19 +1219,6 @@ parse_state_start_schema (ParseState *state,
return;
}
- if (path && (g_str_has_prefix (path, "/apps/") ||
- g_str_has_prefix (path, "/desktop/") ||
- g_str_has_prefix (path, "/system/")))
-- g_printerr ("warning: Schema '%s' has path '%s'. Paths starting with "
-- "'/apps/', '/desktop/' or '/system/' are deprecated.\n", id, path);
+- {
+- gchar *message = NULL;
+- message = g_strdup_printf (_("Warning: Schema “%s” has path “%s”. "
+- "Paths starting with "
+- "“/apps/”, “/desktop/” or “/system/” are deprecated."),
+- id, path);
+- g_printerr ("%s\n", message);
+- g_free (message);
+- }
-
state->schema_state = schema_state_new (path, gettext_domain,
extends, extends_name, list_of);
--
-2.1.4
+2.14.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch
new file mode 100644
index 0000000..697d63d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch
@@ -0,0 +1,46 @@
+From b9160d951b9af647b97766c57295ca4f45cf9521 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 3 Oct 2017 10:45:55 +0300
+Subject: [PATCH 10/10] Do not hardcode python path into various tools
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gio/gdbus-2.0/codegen/gdbus-codegen.in | 2 +-
+ gobject/glib-genmarshal.in | 2 +-
+ gobject/glib-mkenums.in | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in
+index 8050981..e693ef3 100644
+--- a/gio/gdbus-2.0/codegen/gdbus-codegen.in
++++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env @PYTHON@
++#!/usr/bin/env python3
+
+ # GDBus - GLib D-Bus Library
+ #
+diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in
+index 09e8408..b2f9d99 100755
+--- a/gobject/glib-genmarshal.in
++++ b/gobject/glib-genmarshal.in
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env @PYTHON@
++#!/usr/bin/env python3
+
+ # pylint: disable=too-many-lines, missing-docstring, invalid-name
+
+diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
+index d4bfd11..051fce4 100755
+--- a/gobject/glib-mkenums.in
++++ b/gobject/glib-mkenums.in
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env @PYTHON@
++#!/usr/bin/env python3
+
+ # If the code below looks horrible and unpythonic, do not panic.
+ #
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
index 9b4ded1..b98f933 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
@@ -1,7 +1,7 @@
-From 310dfe1bdd16d4b254732fcc202c6211629bc7b6 Mon Sep 17 00:00:00 2001
+From d762907d33b81cf7469b5696c87f2188d2050afb Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Mon, 9 Nov 2015 11:07:27 +0200
-Subject: [PATCH] Enable more tests while cross-compiling
+Subject: [PATCH 06/10] Enable more tests while cross-compiling
Upstream disables a few tests while cross-compiling because their build requires
running other built binaries. This usually makes sense but in the cross-compile
@@ -9,16 +9,17 @@
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
---
- gio/tests/Makefile.am | 8 +++-----
- tests/gobject/Makefile.am | 8 +++-----
- 2 files changed, 6 insertions(+), 10 deletions(-)
+ gio/tests/Makefile.am | 10 ++++++----
+ tests/gobject/Makefile.am | 8 +++++---
+ 2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
-index 868873f..533e454 100644
+index acc1da4..9176640 100644
--- a/gio/tests/Makefile.am
+++ b/gio/tests/Makefile.am
-@@ -503,10 +503,9 @@ test_programs += \
+@@ -516,10 +516,9 @@ test_programs += \
endif
# -----------------------------------------------------------------------------
@@ -31,7 +32,7 @@
test_programs += resources
resources_SOURCES = resources.c
nodist_resources_SOURCES = test_resources.c test_resources2.c test_resources2.h
-@@ -528,7 +527,11 @@ if !ENABLE_INSTALLED_TESTS
+@@ -543,7 +542,11 @@ if !ENABLE_INSTALLED_TESTS
libresourceplugin_la_LDFLAGS += -rpath /
endif
@@ -41,18 +42,18 @@
+glib_compile_resources=glib-compile-resources
+endif
- resources.o: test_resources2.h
- test_resources.c: test2.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test2.gresource.xml)
-@@ -545,7 +548,6 @@ test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --
+ test-generated.txt: test1.txt
+ $(AM_V_GEN) echo "Generated" > $@ && \
+@@ -564,7 +567,6 @@ test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --
EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml
CLEANFILES += test-generated.txt test_resources.c test_resources2.[ch] plugin_resources.c test.gresource
-endif # !CROSS_COMPILING
- BUILT_SOURCES += giotypefuncs.c
+ BUILT_SOURCES += giotypefuncs.inc
diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am
-index 16f2827..4c2208e 100644
+index 656941d..68555ff 100644
--- a/tests/gobject/Makefile.am
+++ b/tests/gobject/Makefile.am
@@ -48,10 +48,13 @@ if ENABLE_TIMELOOP
@@ -79,3 +80,6 @@
dist-hook: $(BUILT_EXTRA_DIST)
files='$(BUILT_EXTRA_DIST)'; \
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
index aa5de27..59b8913 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
@@ -1,7 +1,7 @@
-From e8740833336c59d6f616a1781b256e648e338c26 Mon Sep 17 00:00:00 2001
+From 1dd1e6ddca5deada049bac2e1ee1fe4ecc5342c5 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Sat, 28 Apr 2012 18:24:50 +0200
-Subject: [PATCH] configure: use $host_alias-libtool instead of libtool
+Subject: [PATCH 01/10] configure: use $host_alias-libtool instead of libtool
directly
Poky renames libtool to $host_alias-libtool.
@@ -18,24 +18,16 @@
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
---
- configure.ac | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 1af90c5..f6b7a73 100644
+index 6fa6eb0..b6f78a6 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1378,7 +1378,7 @@ if test x"$glib_native_win32" = xyes; then
- G_MODULE_LDFLAGS=
- else
- export SED
-- G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
-+ G_MODULE_LDFLAGS=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
- fi
- dnl G_MODULE_IMPL= don't reset, so cmd-line can override
- G_MODULE_NEED_USCORE=0
-@@ -1427,13 +1427,13 @@ AS_IF([ test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL" ], [
+@@ -1428,9 +1428,9 @@ AS_IF([ test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL" ], [
LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
echo "void glib_plugin_test(void) { }" > plugin.c
@@ -47,20 +39,6 @@
${LDFLAGS} -module -o plugin.la -export-dynamic \
-shrext ".o" -avoid-version plugin.lo \
-rpath /dont/care >/dev/null 2>&1
-- eval `./libtool --config | grep ^objdir`
-+ eval `./$host_alias-libtool --config | grep ^objdir`
- AC_CACHE_CHECK([for RTLD_GLOBAL brokenness],
- glib_cv_rtldglobal_broken,[
- AC_TRY_RUN([
-@@ -1506,7 +1506,7 @@ fi
-
- AC_MSG_CHECKING(for the suffix of module shared libraries)
- export SED
--shrext_cmds=`./libtool --config | grep '^shrext_cmds='`
-+shrext_cmds=`./$host_alias-libtool --config | grep '^shrext_cmds='`
- eval $shrext_cmds
- module=yes eval std_shrext=$shrext_cmds
- # chop the initial dot
--
-1.9.1
+2.14.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.52.3.bb b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.52.3.bb
deleted file mode 100644
index b1fe600..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.52.3.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-require glib.inc
-
-PE = "1"
-
-SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
- file://configure-libtool.patch \
- file://run-ptest \
- file://ptest-paths.patch \
- file://uclibc_musl_translation.patch \
- file://allow-run-media-sdX-drive-mount-if-username-root.patch \
- file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
- file://Enable-more-tests-while-cross-compiling.patch \
- file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
- file://0001-Do-not-ignore-return-value-of-write.patch \
- file://0001-Test-for-pthread_getname_np-before-using-it.patch \
- "
-
-SRC_URI_append_class-native = " file://relocate-modules.patch"
-
-SRC_URI[md5sum] = "89265d0289a436e99cad54491eb21ef4"
-SRC_URI[sha256sum] = "25ee7635a7c0fcd4ec91cbc3ae07c7f8f5ce621d8183511f414ded09e7e4e128"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.54.3.bb b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.54.3.bb
new file mode 100644
index 0000000..faf5945
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.54.3.bb
@@ -0,0 +1,24 @@
+require glib.inc
+
+PE = "1"
+
+SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
+ file://configure-libtool.patch \
+ file://run-ptest \
+ file://ptest-paths.patch \
+ file://uclibc_musl_translation.patch \
+ file://allow-run-media-sdX-drive-mount-if-username-root.patch \
+ file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
+ file://Enable-more-tests-while-cross-compiling.patch \
+ file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
+ file://0001-Do-not-ignore-return-value-of-write.patch \
+ file://0001-Test-for-pthread_getname_np-before-using-it.patch \
+ file://0010-Do-not-hardcode-python-path-into-various-tools.patch \
+ "
+
+SRC_URI_append_class-native = " file://relocate-modules.patch"
+
+SRC_URI[md5sum] = "16e886ad677bf07b7d48eb8188bcf759"
+SRC_URI[sha256sum] = "963fdc6685dc3da8e5381dfb9f15ca4b5709b28be84d9d05a9bb8e446abac0a8"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
index 4cdf141..f645ed6 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
@@ -3,12 +3,12 @@
HOMEPAGE = "https://developer.gnome.org/glib/"
# pcre is under BSD;
-# docs/reference/COPYING is with a 'public domai'-like license!
-LICENSE = "LGPLv2+ & BSD & PD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://glib/glib.h;beginline=4;endline=17;md5=b4f0f4a399c19e5ebb20c31b79d6bc32 \
- file://gmodule/COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://gmodule/gmodule.h;beginline=4;endline=17;md5=b4f0f4a399c19e5ebb20c31b79d6bc32 \
+# docs/reference/COPYING is with a 'public domain'-like license!
+LICENSE = "LGPLv2.1+ & BSD & PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://glib/glib.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \
+ file://gmodule/COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://gmodule/gmodule.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \
file://glib/pcre/COPYING;md5=266ebc3ff74ee9ce6fad65577667c0f4 \
file://glib/pcre/pcre.h;beginline=11;endline=35;md5=de27f2bf633d20a2b7af0b1983423283 \
file://docs/reference/COPYING;md5=f51a5100c17af6bae00735cd791e1fcc"
@@ -19,16 +19,18 @@
BBCLASSEXTEND = "native nativesdk"
-DEPENDS = "virtual/libiconv libffi zlib glib-2.0-native"
-DEPENDS_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' dbus', '', d)}"
-DEPENDS_class-native = "pkgconfig-native gettext-native libffi-native zlib-native"
-DEPENDS_class-nativesdk = "nativesdk-libtool nativesdk-gettext nativesdk-libffi nativesdk-zlib glib-2.0-native"
+DEPENDS = "glib-2.0-native \
+ virtual/libintl \
+ virtual/libiconv \
+ libffi \
+ zlib \
+ ${@bb.utils.contains('PTEST_ENABLED', '1', 'dbus', '', d)}"
PACKAGES += "${PN}-codegen ${PN}-utils"
LEAD_SONAME = "libglib-2.0.*"
-inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache python3native manpages
+inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages
S = "${WORKDIR}/glib-${PV}"
@@ -47,7 +49,7 @@
EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux"
# Tell configure that we'll have dbus-daemon on the target for the tests
-EXTRA_OECONF_class-target_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' ac_cv_prog_DBUS_DAEMON=dbus-daemon', '', d)}"
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' ac_cv_prog_DBUS_DAEMON=dbus-daemon', '', d)}"
do_configure_prepend() {
sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -83,7 +85,14 @@
# doesn't support mips16e
CPPFLAGS_append_class-target_mips16e = " -DNVALGRIND=1"
-USE_NLS = "yes"
+# GLib generally requires gettext to be present so for USE_NLS to yes. For
+# native builds as i18n is disabled globally we can tell it to use a fake msgfmt.
+USE_NLS_class-target = "yes"
+USE_NLS_class-nativesdk = "yes"
+CACHED_CONFIGUREVARS_append_class-native = " ac_cv_path_MSGFMT=/bin/false"
+
+EXEEXT = ""
+EXEEXT_mingw32 = ".exe"
do_install_append () {
if [ -f ${D}${bindir}/gtester-report ]; then
@@ -95,15 +104,14 @@
rm -f ${D}${datadir}/glib-2.0/codegen/*.pyc
rm -f ${D}${datadir}/glib-2.0/codegen/*.pyo
- # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
- # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
- if [ -f ${D}${bindir}/glib-mkenums ]; then
- sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/glib-mkenums
- fi
-
if [ -e ${D}${libdir}/charset.alias ]; then
rm -f ${D}${libdir}/charset.alias
fi
+
+ # Make sure gio-querymodules is unique among multilibs
+ if test "x${MLPREFIX}" != "x"; then
+ mv ${D}${libexecdir}/gio-querymodules${EXEEXT} ${D}${libexecdir}/${MLPREFIX}gio-querymodules${EXEEXT}
+ fi
}
do_install_append_class-target () {
@@ -114,18 +122,12 @@
rm ${D}${datadir}/installed-tests/glib/gdbus-serialization.test
fi
fi
-
- # Make sure gio-querymodules is unique among multilibs
- if test "x${MLPREFIX}" != "x"; then
- mv ${D}${libexecdir}/gio-querymodules ${D}${libexecdir}/${MLPREFIX}gio-querymodules
- fi
}
-RDEPENDS_${PN}-codegen += "\
- python3 \
- python3-distutils \
- python3-xml \
- "
+CODEGEN_PYTHON_RDEPENDS = "python3 python3-distutils python3-xml"
+CODEGEN_PYTHON_RDEPENDS_mingw32 = ""
+
+RDEPENDS_${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}"
RDEPENDS_${PN}-ptest += "\
dbus \
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.50.0.bb b/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.50.0.bb
deleted file mode 100644
index 2782bd9..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.50.0.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "GLib networking extensions"
-DESCRIPTION = "glib-networking contains the implementations of certain GLib networking features that cannot be implemented directly in GLib itself because of their dependencies."
-HOMEPAGE = "http://git.gnome.org/browse/glib-networking/"
-BUGTRACKER = "http://bugzilla.gnome.org"
-
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-SECTION = "libs"
-DEPENDS = "glib-2.0"
-
-SRC_URI[archive.md5sum] = "4d06d0224646f274918b1cb6da9a07f6"
-SRC_URI[archive.sha256sum] = "3f1a442f3c2a734946983532ce59ed49120319fdb10c938447c373d5e5286bee"
-
-PACKAGECONFIG ??= "ca-certificates gnutls"
-
-# No explicit dependency as it works without ca-certificates installed
-PACKAGECONFIG[ca-certificates] = "--with-ca-certificates=${sysconfdir}/ssl/certs/ca-certificates.crt,--without-ca-certificates"
-PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
-PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy"
-PACKAGECONFIG[pkcs11] = "--with-pkcs11,--without-pkcs11,p11-kit"
-
-EXTRA_OECONF = "--without-gnome-proxy"
-
-inherit gnomebase gettext upstream-version-is-even gio-module-cache
-
-FILES_${PN} += "${libdir}/gio/modules/libgio*.so ${datadir}/dbus-1/services/"
-FILES_${PN}-dev += "${libdir}/gio/modules/libgio*.la"
-FILES_${PN}-staticdev += "${libdir}/gio/modules/libgio*.a"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.54.1.bb b/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.54.1.bb
new file mode 100644
index 0000000..2a6f8af
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.54.1.bb
@@ -0,0 +1,29 @@
+SUMMARY = "GLib networking extensions"
+DESCRIPTION = "glib-networking contains the implementations of certain GLib networking features that cannot be implemented directly in GLib itself because of their dependencies."
+HOMEPAGE = "http://git.gnome.org/browse/glib-networking/"
+BUGTRACKER = "http://bugzilla.gnome.org"
+
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+SECTION = "libs"
+DEPENDS = "glib-2.0"
+
+SRC_URI[archive.md5sum] = "99867463f182c2767bce0c74bc9cc981"
+SRC_URI[archive.sha256sum] = "eaa787b653015a0de31c928e9a17eb57b4ce23c8cf6f277afaec0d685335012f"
+
+PACKAGECONFIG ??= "ca-certificates gnutls"
+
+# No explicit dependency as it works without ca-certificates installed
+PACKAGECONFIG[ca-certificates] = "--with-ca-certificates=${sysconfdir}/ssl/certs/ca-certificates.crt,--without-ca-certificates"
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy"
+PACKAGECONFIG[pkcs11] = "--with-pkcs11,--without-pkcs11,p11-kit"
+
+EXTRA_OECONF = "--without-gnome-proxy"
+
+inherit gnomebase gettext upstream-version-is-even gio-module-cache
+
+FILES_${PN} += "${libdir}/gio/modules/libgio*.so ${datadir}/dbus-1/services/"
+FILES_${PN}-dev += "${libdir}/gio/modules/libgio*.la"
+FILES_${PN}-staticdev += "${libdir}/gio/modules/libgio*.a"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.26.bb
deleted file mode 100644
index 744085f..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.26.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Cross locale generation tool for glibc"
-HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
-SECTION = "libs"
-LICENSE = "LGPL-2.1"
-
-LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
- file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
- file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
-
-# Tell autotools that we're working in the localedef directory
-#
-AUTOTOOLS_SCRIPT_PATH = "${S}/localedef"
-
-inherit native
-inherit autotools
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:"
-
-SRCBRANCH ?= "release/${PV}/master"
-GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
-
-SRCREV_glibc ?= "d300041c533a3d837c9f37a099bcc95466860e98"
-SRCREV_localedef ?= "dfb4afe551c6c6e94f9cc85417bd1f582168c843"
-
-SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
- git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
- file://0015-timezone-re-written-tzselect-as-posix-sh.patch \
- file://0016-Remove-bash-dependency-for-nscd-init-script.patch \
- file://0017-eglibc-Cross-building-and-testing-instructions.patch \
- file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \
- file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \
- file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \
- file://0021-eglibc-Install-PIC-archives.patch \
- file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
- file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
- file://archive-path.patch \
-"
-# Makes for a rather long rev (22 characters), but...
-#
-SRCREV_FORMAT = "glibc_localedef"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OECONF = "--with-glibc=${S}"
-CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'"
-
-do_install() {
- install -d ${D}${bindir}
- install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
-}
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.27.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.27.bb
new file mode 100644
index 0000000..5e92eb7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.27.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Cross locale generation tool for glibc"
+HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
+SECTION = "libs"
+LICENSE = "LGPL-2.1"
+
+LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
+ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
+ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+# Tell autotools that we're working in the localedef directory
+#
+AUTOTOOLS_SCRIPT_PATH = "${S}/localedef"
+
+inherit native
+inherit autotools
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:"
+
+SRCBRANCH ?= "release/${PV}/master"
+GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.(?!90)\d+)*)"
+
+SRCREV_glibc ?= "df3ff4e49d4ee3cbbdaeb0b1cb5dc2344c08be98"
+SRCREV_localedef ?= "de5bdbd5e76b5403a4151b9b9f958b6cca36b3e7"
+
+SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
+ git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
+ file://0015-timezone-re-written-tzselect-as-posix-sh.patch \
+ file://0016-Remove-bash-dependency-for-nscd-init-script.patch \
+ file://0017-eglibc-Cross-building-and-testing-instructions.patch \
+ file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \
+ file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \
+ file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+ file://0021-eglibc-Install-PIC-archives.patch \
+ file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
+ file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
+ file://archive-path.patch \
+"
+# Makes for a rather long rev (22 characters), but...
+#
+SRCREV_FORMAT = "glibc_localedef"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = "--with-glibc=${S}"
+CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
+}
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-collateral.inc b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-collateral.inc
index de859d5..aa871ac 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-collateral.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-collateral.inc
@@ -7,7 +7,8 @@
# This needs to match with glibc.inc, otherwise glibc-scripts and glibc-locale
# will fail to find main glibc, for details see
# http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100679.html
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
deltask do_fetch
deltask do_unpack
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.27.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.26.bb
rename to import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.27.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.27.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.26.bb
rename to import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.27.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.27.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.26.bb
rename to import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.27.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-package.inc b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-package.inc
index b6d8074..728bc53 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-package.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-package.inc
@@ -66,7 +66,7 @@
rmdir --ignore-fail-on-non-empty ${D}${libexecdir}
fi
- oe_multilib_header bits/syscall.h bits/long-double.h
+ oe_multilib_header bits/syscall.h bits/long-double.h bits/floatn.h
if [ -f ${D}${bindir}/mtrace ]; then
sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' -e '2s,exec.*perl,exec ${USRBINPATH}/env perl,' ${D}${bindir}/mtrace
@@ -97,6 +97,7 @@
install -m 0755 ${S}/nscd/nscd.init ${D}${sysconfdir}/init.d/nscd
install -m 0755 ${S}/nscd/nscd.conf ${D}${sysconfdir}/nscd.conf
sed -i "s%daemon%start-stop-daemon --start --exec%g" ${D}${sysconfdir}/init.d/nscd
+ sed -i "s|\(enable-cache\t\+netgroup\t\+\)yes|\1no|" ${D}${sysconfdir}/nscd.conf
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${S}/nscd/nscd.service ${D}${systemd_unitdir}/system/
@@ -117,10 +118,10 @@
# The aarch64 ABI says the dynamic linker -must- be /lib/ld-linux-aarch64[_be].so.1
install -d ${D}${nonarch_base_libdir}
if [ -e ${D}${base_libdir}/ld-linux-aarch64.so.1 ]; then
- ln -s ${@base_path_relative('${nonarch_base_libdir}', '${base_libdir}')}/ld-linux-aarch64.so.1 \
+ ln -s ${@oe.path.relative('${nonarch_base_libdir}', '${base_libdir}')}/ld-linux-aarch64.so.1 \
${D}${nonarch_base_libdir}/ld-linux-aarch64.so.1
elif [ -e ${D}${base_libdir}/ld-linux-aarch64_be.so.1 ]; then
- ln -s ${@base_path_relative('${nonarch_base_libdir}', '${base_libdir}')}/ld-linux-aarch64_be.so.1 \
+ ln -s ${@oe.path.relative('${nonarch_base_libdir}', '${base_libdir}')}/ld-linux-aarch64_be.so.1 \
${D}${nonarch_base_libdir}/ld-linux-aarch64_be.so.1
fi
fi
@@ -206,8 +207,11 @@
rm -rf ${D}/${localedir}
rm -rf ${D}${datadir}/locale
if [ "${libdir}" != "${exec_prefix}/lib" ]; then
- # This dir only exists to hold locales
- rm -rf ${D}${exec_prefix}/lib
+ if [ -d ${D}${exec_prefix}/lib/locale ] ; then
+ rm -rf ${D}${exec_prefix}/lib/locale
+ # error out if directory isn't empty
+ rm -f ${D}${exec_prefix}/lib
+ fi
fi
}
addtask do_poststash_install_cleanup after do_stash_locale do_install before do_populate_sysroot do_package
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.27.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.26.bb
rename to import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.27.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc
index 21bbdc2..ce1222b 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc
@@ -35,7 +35,10 @@
DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers virtual/${TARGET_PREFIX}libc-initial"
# nptl needs libgcc but dlopens it, so our shlibs code doesn't detect this
#RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}"
-PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
+
+CRYPTPROVIDES = "virtual/crypt"
+CRYPTPROVIDES_class-nativesdk = ""
+PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc ${CRYPTPROVIDES}"
PROVIDES += "virtual/libintl virtual/libiconv"
inherit autotools texinfo distro_features_check systemd
@@ -47,6 +50,7 @@
libc_cv_rootsbindir=${base_sbindir} \
libc_cv_localedir=${localedir} \
libc_cv_ssp_strong=no \
+ libc_cv_ssp_all=no \
libc_cv_ssp=no \
"
@@ -57,7 +61,8 @@
# This needs to match with glibc-collateral.inc, otherwise glibc-scripts and glibc-locale
# will fail to find main glibc, for details see
# http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100679.html
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
# glibc uses PARALLELMFLAGS variable to pass parallel build info so transfer
# PARALLEL_MAKE into PARALLELMFLAGS and empty out PARALLEL_MAKE
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
index 19c1d9b..86234c9 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
@@ -1,7 +1,7 @@
-From 81346b2f7735698078d5bf919a78b6c0269d6fee Mon Sep 17 00:00:00 2001
+From bd91b60ce6ff01f49b173b6b45e23ce94911b2a6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:48:24 +0000
-Subject: [PATCH 01/25] nativesdk-glibc: Look for host system ld.so.cache as
+Subject: [PATCH 01/27] nativesdk-glibc: Look for host system ld.so.cache as
well
Upstream-Status: Inappropriate [embedded specific]
@@ -31,10 +31,10 @@
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/elf/dl-load.c b/elf/dl-load.c
-index c1b6d4ba0f..d7af9ebcbc 100644
+index 7554a99b5a..a73d11a62f 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
-@@ -2054,6 +2054,14 @@ _dl_map_object (struct link_map *loader, const char *name,
+@@ -2007,6 +2007,14 @@ _dl_map_object (struct link_map *loader, const char *name,
}
}
@@ -49,7 +49,7 @@
#ifdef USE_LDCONFIG
if (fd == -1
&& (__glibc_likely ((mode & __RTLD_SECURE) == 0)
-@@ -2112,14 +2120,6 @@ _dl_map_object (struct link_map *loader, const char *name,
+@@ -2065,14 +2073,6 @@ _dl_map_object (struct link_map *loader, const char *name,
}
#endif
@@ -65,5 +65,5 @@
if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
_dl_debug_printf ("\n");
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
index 2ce240b..899481f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
@@ -1,7 +1,7 @@
-From 82f2e910ec0e2de6a9e2b007825bddfc5850575d Mon Sep 17 00:00:00 2001
+From 50736f7fc1fdc9e1f7c05f1fec75c977d9be9228 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:50:00 +0000
-Subject: [PATCH 02/25] nativesdk-glibc: Fix buffer overrun with a relocated
+Subject: [PATCH 02/27] nativesdk-glibc: Fix buffer overrun with a relocated
SDK
When ld-linux-*.so.2 is relocated to a path that is longer than the
@@ -22,10 +22,10 @@
1 file changed, 12 insertions(+)
diff --git a/elf/dl-load.c b/elf/dl-load.c
-index d7af9ebcbc..19c1db9948 100644
+index a73d11a62f..62e3eee478 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
-@@ -1753,7 +1753,19 @@ open_path (const char *name, size_t namelen, int mode,
+@@ -1707,7 +1707,19 @@ open_path (const char *name, size_t namelen, int mode,
given on the command line when rtld is run directly. */
return -1;
@@ -46,5 +46,5 @@
{
struct r_search_path_elem *this_dir = *dirs;
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
index 397e8b3..03f9991 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
@@ -1,7 +1,7 @@
-From 490a0eb4da1af726ea5d68e3efc0d18ba94c4054 Mon Sep 17 00:00:00 2001
+From 695e1cbff6ee6db3435c33e55311c67adf44476d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:51:38 +0000
-Subject: [PATCH 03/25] nativesdk-glibc: Raise the size of arrays containing dl
+Subject: [PATCH 03/27] nativesdk-glibc: Raise the size of arrays containing dl
paths
This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
@@ -26,7 +26,7 @@
7 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/elf/dl-cache.c b/elf/dl-cache.c
-index e9632da0b3..4de529d2cf 100644
+index 6ee5153ff9..37a5f701fa 100644
--- a/elf/dl-cache.c
+++ b/elf/dl-cache.c
@@ -133,6 +133,10 @@ do \
@@ -38,14 +38,14 @@
+
+
int
- internal_function
_dl_cache_libcmp (const char *p1, const char *p2)
+ {
diff --git a/elf/dl-load.c b/elf/dl-load.c
-index 19c1db9948..70c259b400 100644
+index 62e3eee478..6ddba73650 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
-@@ -106,8 +106,8 @@ static size_t max_capstrlen attribute_relro;
- /* Get the generated information about the trusted directories. */
+@@ -109,8 +109,8 @@ static size_t max_capstrlen attribute_relro;
+ gen-trusted-dirs.awk. */
#include "trusted-dirs.h"
-static const char system_dirs[] = SYSTEM_DIRS;
@@ -56,7 +56,7 @@
SYSTEM_DIRS_LEN
};
diff --git a/elf/interp.c b/elf/interp.c
-index b6e8f04444..47c20415bc 100644
+index 9cd50c7291..fc2f39d73c 100644
--- a/elf/interp.c
+++ b/elf/interp.c
@@ -18,5 +18,5 @@
@@ -67,7 +67,7 @@
+const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp")))
= RUNTIME_LINKER;
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
-index 99caf9e9bb..36ea5df5f1 100644
+index fbdd814edf..9f4d8d69b1 100644
--- a/elf/ldconfig.c
+++ b/elf/ldconfig.c
@@ -168,6 +168,9 @@ static struct argp argp =
@@ -81,7 +81,7 @@
a platform. */
static int
diff --git a/elf/rtld.c b/elf/rtld.c
-index 65647fb1c8..cd8381cb33 100644
+index 453f56eb15..08e0c4c94b 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -128,6 +128,7 @@ dso_name_valid_for_suid (const char *p)
@@ -92,7 +92,7 @@
/* LD_AUDIT variable contents. Must be processed before the
audit_list below. */
-@@ -999,12 +1000,12 @@ of this helper program; chances are you did not intend to run this program.\n\
+@@ -1000,12 +1001,12 @@ of this helper program; chances are you did not intend to run this program.\n\
--list list all dependencies and how they are resolved\n\
--verify verify that given object really is a dynamically linked\n\
object we can handle\n\
@@ -108,7 +108,7 @@
++_dl_skip_args;
--_dl_argc;
diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
-index 5aa055de6e..b9a14b9bd3 100644
+index d6cf9d2a3e..9fcf970144 100644
--- a/iconv/gconv_conf.c
+++ b/iconv/gconv_conf.c
@@ -36,7 +36,7 @@
@@ -121,7 +121,7 @@
/* The path elements, as determined by the __gconv_get_path function.
All path elements end in a slash. */
diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h
-index 1f0b8f629d..acbe68399d 100644
+index cf43f1cf3b..7f07adde53 100644
--- a/sysdeps/generic/dl-cache.h
+++ b/sysdeps/generic/dl-cache.h
@@ -27,10 +27,6 @@
@@ -136,5 +136,5 @@
# define add_system_dir(dir) add_dir (dir)
#endif
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
index 8db47bc..f9d70c2 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
@@ -1,7 +1,7 @@
-From 8fe1b56180c30d237cc2ab9a5a9c97a0311f41da Mon Sep 17 00:00:00 2001
+From 2bafdbd7067794c6a24e5e85608c0ec4638c5667 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 14:35:35 -0800
-Subject: [PATCH 04/25] nativesdk-glibc: Allow 64 bit atomics for x86
+Subject: [PATCH 04/27] nativesdk-glibc: Allow 64 bit atomics for x86
The fix consist of allowing 64bit atomic ops for x86.
This should be safe for i586 and newer CPUs.
@@ -17,7 +17,7 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysdeps/i386/atomic-machine.h b/sysdeps/i386/atomic-machine.h
-index 0e24200617..1532f52dec 100644
+index 272da5dd8f..409c759f14 100644
--- a/sysdeps/i386/atomic-machine.h
+++ b/sysdeps/i386/atomic-machine.h
@@ -54,7 +54,7 @@ typedef uintmax_t uatomic_max_t;
@@ -30,5 +30,5 @@
#define ATOMIC_EXCHANGE_USES_CAS 0
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
index 956b2aa..ad9106e 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
@@ -1,7 +1,7 @@
-From b9edcc845641956b7286c60c833f05a9f70cfab9 Mon Sep 17 00:00:00 2001
+From 661adfe9c220d10617bf6bb283827471c3956b01 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:01:50 +0000
-Subject: [PATCH 05/25] fsl e500/e5500/e6500/603e fsqrt implementation
+Subject: [PATCH 05/27] fsl e500/e5500/e6500/603e fsqrt implementation
Upstream-Status: Pending
Signed-off-by: Edmar Wienskoski <edmar@freescale.com>
@@ -1580,5 +1580,5 @@
@@ -0,0 +1 @@
+powerpc/powerpc64/e6500/fpu
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
index c74fead..a3d50fd 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
@@ -1,7 +1,7 @@
-From 324202488a1c2439be345745722f5cb04c0e0847 Mon Sep 17 00:00:00 2001
+From 615598fcca64461a71d84f756d75374f02d914ad Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:11:22 +0000
-Subject: [PATCH 06/25] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
+Subject: [PATCH 06/27] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
names
This bolts in a hook for OE to pass its own version of interpreter
@@ -17,7 +17,7 @@
1 file changed, 1 insertion(+)
diff --git a/elf/readlib.c b/elf/readlib.c
-index d278a189b2..a84cb85158 100644
+index 573c01476c..d8c7412287 100644
--- a/elf/readlib.c
+++ b/elf/readlib.c
@@ -51,6 +51,7 @@ static struct known_names interpreters[] =
@@ -29,5 +29,5 @@
static struct known_names known_libs[] =
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
index b643276..1234df0 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
@@ -1,7 +1,7 @@
-From cf00bf9de8128171e79a019de809e35f3aeed281 Mon Sep 17 00:00:00 2001
+From 804b73ae295bdfda29341e89f2d0c1b99492dc9a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:15:07 +0000
-Subject: [PATCH 07/25] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
+Subject: [PATCH 07/27] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
on ppc fixes the errors like below
| ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite'
@@ -204,5 +204,5 @@
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
index 3aeec52..1b43647 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
@@ -1,7 +1,7 @@
-From babe311deca9ee2730278f13b061b914b5286dc3 Mon Sep 17 00:00:00 2001
+From 1a53084249d9dae1ef4281246efc899c8f9d63ed Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:16:38 +0000
-Subject: [PATCH 08/25] __ieee754_sqrt{,f} are now inline functions and call
+Subject: [PATCH 08/27] __ieee754_sqrt{,f} are now inline functions and call
out __slow versions
Upstream-Status: Pending
@@ -383,5 +383,5 @@
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
index 7d5c2e3..ea49856 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
@@ -1,7 +1,7 @@
-From 93b5d6bed19939039031c45b777d29619db06184 Mon Sep 17 00:00:00 2001
+From 48262b6dda935278a40374ddf0080ab6cc999582 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:20:09 +0000
-Subject: [PATCH 09/25] Quote from bug 1443 which explains what the patch does
+Subject: [PATCH 09/27] Quote from bug 1443 which explains what the patch does
:
We build some random program and link it with -lust. When we run it,
@@ -45,10 +45,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
-index 7053ead16e..0b1e1716b0 100644
+index 8a00eab5e3..623edcb1bd 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
-@@ -500,7 +500,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
+@@ -510,7 +510,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
case R_ARM_TLS_DTPOFF32:
if (sym != NULL)
@@ -58,5 +58,5 @@
case R_ARM_TLS_TPOFF32:
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
index 7275c3e..1751318 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
@@ -1,7 +1,7 @@
-From 1a6e0f4ee8584b04226156df1a3de3e467f0ef6f Mon Sep 17 00:00:00 2001
+From 72ea5410909aef6b6aee70e7f9a88d534583aa00 Mon Sep 17 00:00:00 2001
From: Ting Liu <b28495@freescale.com>
Date: Wed, 19 Dec 2012 04:39:57 -0600
-Subject: [PATCH 10/25] eglibc: run libm-err-tab.pl with specific dirs in ${S}
+Subject: [PATCH 10/27] eglibc: run libm-err-tab.pl with specific dirs in ${S}
libm-err-tab.pl will parse all the files named "libm-test-ulps"
in the given dir recursively. To avoid parsing the one in
@@ -18,10 +18,10 @@
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/manual/Makefile b/manual/Makefile
-index 4ed63a8ef3..e89919eb19 100644
+index c2756640a7..1b5bb16a96 100644
--- a/manual/Makefile
+++ b/manual/Makefile
-@@ -105,7 +105,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err
+@@ -102,7 +102,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err
$(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
$(dir)/libm-test-ulps))
pwd=`pwd`; \
@@ -32,5 +32,5 @@
touch $@
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
index 84f2ca5..1e70b2a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
@@ -1,7 +1,7 @@
-From 9b2af6cbf68d3353d72519e7f6c46becb7bd1d0f Mon Sep 17 00:00:00 2001
+From 8ae998a10b24545e0c12f1f3d8be97b191178204 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:24:46 +0000
-Subject: [PATCH 11/25] __ieee754_sqrt{,f} are now inline functions and call
+Subject: [PATCH 11/27] __ieee754_sqrt{,f} are now inline functions and call
out __slow versions
Upstream-Status: Pending
@@ -57,5 +57,5 @@
#endif
{
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
index 2bf6b23..c35b759 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
@@ -1,7 +1,7 @@
-From ffd3c5a04d8f2f26fea71fed4ce41e88b6f51086 Mon Sep 17 00:00:00 2001
+From 4f9f39761909e67bd6d29b970b7165863e33e565 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:27:10 +0000
-Subject: [PATCH 12/25] sysdeps/gnu/configure.ac: handle correctly
+Subject: [PATCH 12/27] sysdeps/gnu/configure.ac: handle correctly
$libc_cv_rootsbindir
Upstream-Status:Pending
@@ -14,7 +14,7 @@
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure
-index 71243ad0c6..f578187576 100644
+index c15d1087e8..37cc983f2a 100644
--- a/sysdeps/gnu/configure
+++ b/sysdeps/gnu/configure
@@ -32,6 +32,6 @@ case "$prefix" in
@@ -38,5 +38,5 @@
;;
esac
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch
index 099fe50..62c6525 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch
@@ -1,7 +1,7 @@
-From 049cce82f35e0d864d98075b83888dbba4d68afd Mon Sep 17 00:00:00 2001
+From bba7a647b636618d5fd083e904f995f7736b9168 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:28:41 +0000
-Subject: [PATCH 13/25] Add unused attribute
+Subject: [PATCH 13/27] Add unused attribute
Helps in avoiding gcc warning when header is is included in
a source file which does not use both functions
@@ -17,7 +17,7 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/iconv/gconv_charset.h b/iconv/gconv_charset.h
-index 18d8bd6ae7..eb729da5d3 100644
+index 123e2a62ce..63cc83ec84 100644
--- a/iconv/gconv_charset.h
+++ b/iconv/gconv_charset.h
@@ -21,7 +21,7 @@
@@ -30,5 +30,5 @@
{
int slash_count = 0;
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-yes-within-the-path-sets-wrong-config-variables.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-yes-within-the-path-sets-wrong-config-variables.patch
index ddc70e0..6691128 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-yes-within-the-path-sets-wrong-config-variables.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-yes-within-the-path-sets-wrong-config-variables.patch
@@ -1,7 +1,7 @@
-From 3b904bee81a1cfe81e3f437b5f3296efd54a51ac Mon Sep 17 00:00:00 2001
+From 62f44ce3dd01a257cf67116e355492cb1659a917 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:31:06 +0000
-Subject: [PATCH 14/25] 'yes' within the path sets wrong config variables
+Subject: [PATCH 14/27] 'yes' within the path sets wrong config variables
It seems that the 'AC_EGREP_CPP(yes...' example is quite popular
but being such a short word to grep it is likely to produce
@@ -165,7 +165,7 @@
], libc_cv_nios2_be=yes, libc_cv_nios2_be=no)])
if test $libc_cv_nios2_be = yes; then
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
-index a5513fad48..283b293ff3 100644
+index 1ee7f41a36..77e38bebde 100644
--- a/sysdeps/unix/sysv/linux/mips/configure
+++ b/sysdeps/unix/sysv/linux/mips/configure
@@ -414,11 +414,11 @@ else
@@ -199,7 +199,7 @@
libc_mips_nan=
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
-index 4e7fcf1d97..44a9cb3791 100644
+index ae7f254da4..874519000b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
@@ -155,12 +155,12 @@ else
@@ -259,5 +259,5 @@
], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)])
if test $libc_cv_ppc64_def_call_elf = no; then
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch
index b5feffa..66bf4fd 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch
@@ -1,7 +1,7 @@
-From b8cb8cb242cb751d888feb1ada5c4d0f05cbc1d7 Mon Sep 17 00:00:00 2001
+From ac240fb01f6470ac207968adfbe20ccc93b16f8b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:33:03 +0000
-Subject: [PATCH 15/25] timezone: re-written tzselect as posix sh
+Subject: [PATCH 15/27] timezone: re-written tzselect as posix sh
To avoid the bash dependency.
@@ -15,7 +15,7 @@
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/timezone/Makefile b/timezone/Makefile
-index d6cc7ba357..e4ead6e1a7 100644
+index 0194aba4a1..58e5405a05 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -122,7 +122,7 @@ $(testdata)/XT%: testdata/XT%
@@ -41,5 +41,5 @@
# Output one argument as-is to standard output.
# Safer than 'echo', which can mishandle '\' or leading '-'.
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch
index 1d9983b..0b1ee96 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch
@@ -1,7 +1,7 @@
-From 69d378001adfe9a359d2f4b069c1ed2d36de4480 Mon Sep 17 00:00:00 2001
+From 790b133ff2bc5b77ed8533b8999abc65ed0da02b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 14:33:02 -0800
-Subject: [PATCH 16/25] Remove bash dependency for nscd init script
+Subject: [PATCH 16/27] Remove bash dependency for nscd init script
The nscd init script uses #! /bin/bash but only really uses one bashism
(translated strings), so remove them and switch the shell to #!/bin/sh.
@@ -71,5 +71,5 @@
;;
esac
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch
index 3e39d74..fd82132 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch
@@ -1,7 +1,7 @@
-From cdc88dffa226815e3a218604655459e33dc86483 Mon Sep 17 00:00:00 2001
+From 897430bbb65a0f22284d7957206b5fd4efd6607f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:42:58 +0000
-Subject: [PATCH 17/25] eglibc: Cross building and testing instructions
+Subject: [PATCH 17/27] eglibc: Cross building and testing instructions
Ported from eglibc
Upstream-Status: Pending
@@ -615,5 +615,5 @@
+ simply place copies of these libraries in the top GLIBC build
+ directory.
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch
index 02f35f4..80d547c 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch
@@ -1,7 +1,7 @@
-From 1161cd1c683547d29a03626d9d7de7f9cc03b74a Mon Sep 17 00:00:00 2001
+From fcfa19b69e8749477022161a808a201807ef72ec Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:49:28 +0000
-Subject: [PATCH 18/25] eglibc: Help bootstrap cross toolchain
+Subject: [PATCH 18/27] eglibc: Help bootstrap cross toolchain
Taken from EGLIBC, r1484 + r1525
@@ -29,7 +29,7 @@
create mode 100644 include/stubs-bootstrap.h
diff --git a/Makefile b/Makefile
-index 3e0ae6f43b..24dc66d17c 100644
+index bea4e27f8d..8c83cfadc6 100644
--- a/Makefile
+++ b/Makefile
@@ -70,9 +70,18 @@ subdir-dirs = include
@@ -96,5 +96,5 @@
+ EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but
+ an empty stubs.h like this will do fine for GCC. */
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch
index adb28cf..17bfe4f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch
@@ -1,7 +1,7 @@
-From 1732c7f25453c879c17701839ef34876a7357008 Mon Sep 17 00:00:00 2001
+From c6f2db0d7c5c65bfa19766a0e1ce8210111f9c7d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 15:15:09 -0800
-Subject: [PATCH 19/25] eglibc: Clear cache lines on ppc8xx
+Subject: [PATCH 19/27] eglibc: Clear cache lines on ppc8xx
2007-06-13 Nathan Sidwell <nathan@codesourcery.com>
Mark Shinwell <shinwell@codesourcery.com>
@@ -21,7 +21,7 @@
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
-index 23f5d5d388..7e45288db7 100644
+index 78051bc7bc..e24f442320 100644
--- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
@@ -24,9 +24,21 @@ int __cache_line_size attribute_hidden;
@@ -48,7 +48,7 @@
break;
diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
-index ad036c1e4b..afee56a3da 100644
+index f2ad0c355d..3e6773795e 100644
--- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c
+++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
@@ -73,11 +73,25 @@ __libc_start_main (int argc, char **argv,
@@ -79,5 +79,5 @@
break;
#ifndef SHARED
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch
index f835d87..09f7670 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch
@@ -1,7 +1,7 @@
-From 108b3a1df96a85522c52a0dec032fc2c106f5f2d Mon Sep 17 00:00:00 2001
+From 577085016bb926a687abec145557fe8cb8f5af0e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:55:53 +0000
-Subject: [PATCH 20/25] eglibc: Resolve __fpscr_values on SH4
+Subject: [PATCH 20/27] eglibc: Resolve __fpscr_values on SH4
2010-09-29 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Andrew Stubbs <ams@codesourcery.com>
@@ -33,7 +33,7 @@
# a*
alphasort64;
diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S
-index 5f11bc737b..2fd217b00b 100644
+index c4e28ffb98..648bae03d5 100644
--- a/sysdeps/unix/sysv/linux/sh/sysdep.S
+++ b/sysdeps/unix/sysv/linux/sh/sysdep.S
@@ -30,3 +30,14 @@ ENTRY (__syscall_error)
@@ -52,5 +52,5 @@
+weak_alias (___fpscr_values, __fpscr_values)
+
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch
index 6ee397b..530f4e1 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch
@@ -1,7 +1,7 @@
-From 3392ee83b0132c089dffb1e9892b4b252ce1ec0e Mon Sep 17 00:00:00 2001
+From c1beab8a11985f96f5eb644e7103d343b705afc6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:57:01 +0000
-Subject: [PATCH 21/25] eglibc: Install PIC archives
+Subject: [PATCH 21/27] eglibc: Install PIC archives
Forward port from eglibc
@@ -29,10 +29,10 @@
1 file changed, 40 insertions(+), 2 deletions(-)
diff --git a/Makerules b/Makerules
-index 9bb707c168..74cbefb9ba 100644
+index ef6abeac6d..eeaa667f49 100644
--- a/Makerules
+++ b/Makerules
-@@ -775,6 +775,9 @@ ifeq ($(build-shared),yes)
+@@ -778,6 +778,9 @@ ifeq ($(build-shared),yes)
$(common-objpfx)libc.so: $(common-objpfx)libc.map
endif
common-generated += libc.so libc_pic.os
@@ -42,7 +42,7 @@
ifdef libc.so-version
$(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
$(make-link)
-@@ -1026,6 +1029,7 @@ endif
+@@ -1029,6 +1032,7 @@ endif
install: check-install-supported
@@ -50,7 +50,7 @@
install: $(installed-libcs)
$(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
$(make-target-directory)
-@@ -1054,6 +1058,22 @@ versioned := $(strip $(foreach so,$(install-lib.so),\
+@@ -1057,6 +1061,22 @@ versioned := $(strip $(foreach so,$(install-lib.so),\
install-lib.so-versioned := $(filter $(versioned), $(install-lib.so))
install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so))
@@ -73,7 +73,7 @@
# For versioned libraries, we install three files:
# $(inst_libdir)/libfoo.so -- for linking, symlink or ld script
# $(inst_slibdir)/libfoo.so.NN -- for loading by SONAME, symlink
-@@ -1298,9 +1318,22 @@ $(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \
+@@ -1311,9 +1331,22 @@ $(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \
endif # headers-nonh
endif # headers
@@ -97,7 +97,7 @@
install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin))
install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script))
install-rootsbin-nosubdir: \
-@@ -1313,6 +1346,10 @@ install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data))
+@@ -1326,6 +1359,10 @@ install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data))
install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers))
install-others-nosubdir: $(install-others)
install-others-programs-nosubdir: $(install-others-programs)
@@ -108,7 +108,7 @@
# We need all the `-nosubdir' targets so that `install' in the parent
# doesn't depend on several things which each iterate over the subdirs.
-@@ -1322,7 +1359,8 @@ install-%:: install-%-nosubdir ;
+@@ -1335,7 +1372,8 @@ install-%:: install-%-nosubdir ;
.PHONY: install install-no-libc.a-nosubdir
install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir \
@@ -119,5 +119,5 @@
install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \
install-rootsbin-nosubdir install-sbin-nosubdir \
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
index 2a8a20a..a629ce1 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
@@ -1,7 +1,7 @@
-From d97533dc201cfd863765b1a67a27fde3e2622da7 Mon Sep 17 00:00:00 2001
+From e019fe6a2b410db6043e21803f497b5cbdd90a83 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:33:49 +0000
-Subject: [PATCH 22/25] eglibc: Forward port cross locale generation support
+Subject: [PATCH 22/27] eglibc: Forward port cross locale generation support
Upstream-Status: Pending
@@ -23,7 +23,7 @@
create mode 100644 locale/catnames.c
diff --git a/locale/Makefile b/locale/Makefile
-index 98ee76272d..bc3afb2248 100644
+index fd9972279b..176b3946de 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -26,7 +26,8 @@ headers = langinfo.h locale.h bits/locale.h \
@@ -91,7 +91,7 @@
+ [LC_ALL] = sizeof ("LC_ALL") - 1
+ };
diff --git a/locale/localeinfo.h b/locale/localeinfo.h
-index 4e1c8c568a..f7ed946f1c 100644
+index 68822a6319..fa36123776 100644
--- a/locale/localeinfo.h
+++ b/locale/localeinfo.h
@@ -224,7 +224,7 @@ __libc_tsd_define (extern, locale_t, LOCALE)
@@ -104,11 +104,11 @@
# define NL_CURRENT_INDIRECT 1
#endif
diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c
-index e55ab86e28..0f87e6dd28 100644
+index 34a8d32c92..cbb9436cd1 100644
--- a/locale/programs/charmap-dir.c
+++ b/locale/programs/charmap-dir.c
-@@ -19,7 +19,9 @@
- #include <error.h>
+@@ -18,7 +18,9 @@
+ #include <errno.h>
#include <fcntl.h>
#include <libintl.h>
+#ifndef NO_UNCOMPRESS
@@ -117,7 +117,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-@@ -156,6 +158,7 @@ charmap_closedir (CHARMAP_DIR *cdir)
+@@ -154,6 +156,7 @@ charmap_closedir (CHARMAP_DIR *cdir)
return closedir (dir);
}
@@ -125,7 +125,7 @@
/* Creates a subprocess decompressing the given pathname, and returns
a stream reading its output (the decompressed data). */
static
-@@ -204,6 +207,7 @@ fopen_uncompressed (const char *pathname, const char *compressor)
+@@ -202,6 +205,7 @@ fopen_uncompressed (const char *pathname, const char *compressor)
}
return NULL;
}
@@ -133,7 +133,7 @@
/* Opens a charmap for reading, given its name (not an alias name). */
FILE *
-@@ -226,6 +230,7 @@ charmap_open (const char *directory, const char *name)
+@@ -224,6 +228,7 @@ charmap_open (const char *directory, const char *name)
if (stream != NULL)
return stream;
@@ -141,7 +141,7 @@
memcpy (p, ".gz", 4);
stream = fopen_uncompressed (pathname, "gzip");
if (stream != NULL)
-@@ -235,6 +240,7 @@ charmap_open (const char *directory, const char *name)
+@@ -233,6 +238,7 @@ charmap_open (const char *directory, const char *name)
stream = fopen_uncompressed (pathname, "bzip2");
if (stream != NULL)
return stream;
@@ -150,10 +150,10 @@
return NULL;
}
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
-index cec848cb7c..fcd768eb7d 100644
+index d2eebcfdbb..c3718d6589 100644
--- a/locale/programs/ld-collate.c
+++ b/locale/programs/ld-collate.c
-@@ -350,7 +350,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen,
+@@ -349,7 +349,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen,
}
if (wcs != NULL)
{
@@ -162,7 +162,7 @@
uint32_t zero = 0;
/* Handle <U0000> as a single character. */
if (nwcs == 0)
-@@ -1776,8 +1776,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
+@@ -1772,8 +1772,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
if ((*eptr)->nwcs == runp->nwcs)
{
@@ -172,7 +172,7 @@
if (c == 0)
{
-@@ -2010,9 +2009,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
+@@ -2000,9 +1999,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
one consecutive entry. */
if (runp->wcnext != NULL
&& runp->nwcs == runp->wcnext->nwcs
@@ -185,7 +185,7 @@
&& (runp->wcs[runp->nwcs - 1]
== runp->wcnext->wcs[runp->nwcs - 1] + 1))
{
-@@ -2036,9 +2035,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
+@@ -2026,9 +2025,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
runp = runp->wcnext;
while (runp->wcnext != NULL
&& runp->nwcs == runp->wcnext->nwcs
@@ -199,10 +199,10 @@
== runp->wcnext->wcs[runp->nwcs - 1] + 1));
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
-index df266c20d6..05c0152ec9 100644
+index f791e6b7e9..d809d6db7f 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
-@@ -926,7 +926,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap,
+@@ -915,7 +915,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap,
allocate_arrays (ctype, charmap, ctype->repertoire);
default_missing_len = (ctype->default_missing
@@ -211,7 +211,7 @@
: 0);
init_locale_data (&file, nelems);
-@@ -1937,7 +1937,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype,
+@@ -1926,7 +1926,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype,
ignore = 1;
else
/* This value is usable. */
@@ -220,7 +220,7 @@
first = 0;
}
-@@ -2471,8 +2471,8 @@ with character code range values one must use the absolute ellipsis `...'"));
+@@ -2460,8 +2460,8 @@ with character code range values one must use the absolute ellipsis `...'"));
}
handle_tok_digit:
@@ -231,7 +231,7 @@
handle_digits = 1;
goto read_charclass;
-@@ -3929,8 +3929,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+@@ -3901,8 +3901,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
while (idx < number)
{
@@ -241,7 +241,7 @@
if (res == 0)
{
replace = 1;
-@@ -3967,11 +3966,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+@@ -3939,11 +3938,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
for (size_t cnt = 0; cnt < number; ++cnt)
{
struct translit_to_t *srunp;
@@ -255,7 +255,7 @@
srunp = srunp->next;
}
/* Plus one for the extra NUL character marking the end of
-@@ -3995,18 +3994,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+@@ -3967,18 +3966,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
ctype->translit_from_idx[cnt] = from_len;
ctype->translit_to_idx[cnt] = to_len;
@@ -281,10 +281,10 @@
srunp = srunp->next;
}
diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
-index 32e9c41e35..6a61fcedeb 100644
+index a755792363..e8b2f85522 100644
--- a/locale/programs/ld-time.c
+++ b/locale/programs/ld-time.c
-@@ -215,8 +215,10 @@ No definition for %s category found"), "LC_TIME"));
+@@ -220,8 +220,10 @@ No definition for %s category found"), "LC_TIME");
}
else
{
@@ -296,7 +296,7 @@
}
}
-@@ -226,7 +228,7 @@ No definition for %s category found"), "LC_TIME"));
+@@ -231,7 +233,7 @@ No definition for %s category found"), "LC_TIME");
const int days_per_month[12] = { 31, 29, 31, 30, 31, 30,
31, 31, 30, 31 ,30, 31 };
size_t idx;
@@ -305,7 +305,7 @@
time->era_entries =
(struct era_data *) xmalloc (time->num_era
-@@ -464,18 +466,18 @@ No definition for %s category found"), "LC_TIME"));
+@@ -457,18 +459,18 @@ No definition for %s category found"), "LC_TIME");
}
/* Now generate the wide character name and format. */
@@ -331,7 +331,7 @@
}
else
time->era_entries[idx].wname =
-@@ -534,7 +536,16 @@ No definition for %s category found"), "LC_TIME"));
+@@ -527,7 +529,16 @@ No definition for %s category found"), "LC_TIME");
if (time->date_fmt == NULL)
time->date_fmt = "%a %b %e %H:%M:%S %Z %Y";
if (time->wdate_fmt == NULL)
@@ -350,7 +350,7 @@
diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c
-index 52b340963a..1a8bce17b4 100644
+index 3525c8a43d..f8a7fd9c24 100644
--- a/locale/programs/linereader.c
+++ b/locale/programs/linereader.c
@@ -595,7 +595,7 @@ get_string (struct linereader *lr, const struct charmap_t *charmap,
@@ -363,18 +363,18 @@
size_t bufmax = 56;
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
-index 6acc1342c7..df87740f8b 100644
+index d718d2e9f4..e0a3ad5a83 100644
--- a/locale/programs/localedef.c
+++ b/locale/programs/localedef.c
-@@ -108,6 +108,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
- #define OPT_LIST_ARCHIVE 309
- #define OPT_LITTLE_ENDIAN 400
+@@ -105,6 +105,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
#define OPT_BIG_ENDIAN 401
-+#define OPT_UINT32_ALIGN 402
+ #define OPT_NO_WARN 402
+ #define OPT_WARN 403
++#define OPT_UINT32_ALIGN 404
/* Definitions of arguments for argp functions. */
static const struct argp_option options[] =
-@@ -143,6 +144,8 @@ static const struct argp_option options[] =
+@@ -147,6 +148,8 @@ static const struct argp_option options[] =
N_("Generate little-endian output") },
{ "big-endian", OPT_BIG_ENDIAN, NULL, 0,
N_("Generate big-endian output") },
@@ -383,7 +383,7 @@
{ NULL, 0, NULL, 0, NULL }
};
-@@ -232,12 +235,14 @@ main (int argc, char *argv[])
+@@ -236,12 +239,14 @@ main (int argc, char *argv[])
ctype locale. (P1003.2 4.35.5.2) */
setlocale (LC_CTYPE, "POSIX");
@@ -392,15 +392,15 @@
defines error code 3 for this situation so I think it must be
a fatal error (see P1003.2 4.35.8). */
if (sysconf (_SC_2_LOCALEDEF) < 0)
- WITH_CUR_LOCALE (error (3, 0, _("\
- FATAL: system does not define `_POSIX2_LOCALEDEF'")));
+ record_error (3, 0, _("\
+ FATAL: system does not define `_POSIX2_LOCALEDEF'"));
+#endif
/* Process charmap file. */
charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1);
-@@ -328,6 +333,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
- case OPT_BIG_ENDIAN:
- set_big_endian (true);
+@@ -389,6 +394,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
+ /* Enable the warnings. */
+ set_warnings (arg, true);
break;
+ case OPT_UINT32_ALIGN:
+ uint32_align_mask = strtol (arg, NULL, 0) - 1;
@@ -409,7 +409,7 @@
force_output = 1;
break;
diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
-index 0990ef11be..683422c908 100644
+index 32e5f761f2..b41e77bd8d 100644
--- a/locale/programs/locfile.c
+++ b/locale/programs/locfile.c
@@ -544,6 +544,9 @@ compare_files (const char *filename1, const char *filename2, size_t size,
@@ -432,7 +432,7 @@
/* Record that FILE's next element is the 32-bit integer VALUE. */
diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h
-index 3407e13c13..0bb556caf8 100644
+index 89b347c72d..a636fc2960 100644
--- a/locale/programs/locfile.h
+++ b/locale/programs/locfile.h
@@ -71,6 +71,8 @@ extern void write_all_categories (struct localedef_t *definitions,
@@ -521,7 +521,7 @@
+
#endif /* locfile.h */
diff --git a/locale/setlocale.c b/locale/setlocale.c
-index 19acc4b2c7..c89d3b87ad 100644
+index e4de907e1f..b5d8f5c17d 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -64,36 +64,6 @@ static char *const _nl_current_used[] =
@@ -562,5 +562,5 @@
# define WEAK_POSTLOAD(postload) weak_extern (postload)
#else
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch
index 9e580d4..ae708ef 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch
@@ -1,7 +1,7 @@
-From cb4d00eac7f84092314de593626eea40f9529038 Mon Sep 17 00:00:00 2001
+From 9d71526be21abe68dd8ca3a5a219445851bbc2f4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 20 Apr 2016 21:11:00 -0700
-Subject: [PATCH 23/25] Define DUMMY_LOCALE_T if not defined
+Subject: [PATCH 23/27] Define DUMMY_LOCALE_T if not defined
This is a hack to fix building the locale bits on an older
CentOs 5.X machine
@@ -14,7 +14,7 @@
1 file changed, 3 insertions(+)
diff --git a/locale/programs/config.h b/locale/programs/config.h
-index 5b416be0d8..79e66eed5e 100644
+index 9956cd8446..04342f3644 100644
--- a/locale/programs/config.h
+++ b/locale/programs/config.h
@@ -19,6 +19,9 @@
@@ -28,5 +28,5 @@
#define PACKAGE _libc_intl_domainname
#ifndef VERSION
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
index 0b59352..42ff667 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
@@ -1,7 +1,7 @@
-From a784742739c90eea0d4ccbbd073a067d55ca95e8 Mon Sep 17 00:00:00 2001
+From 03873af286f1dab1062f598d6deb774ce513421d Mon Sep 17 00:00:00 2001
From: Mark Hatle <mark.hatle@windriver.com>
Date: Thu, 18 Aug 2016 14:07:58 -0500
-Subject: [PATCH 24/25] elf/dl-deps.c: Make _dl_build_local_scope breadth first
+Subject: [PATCH 24/27] elf/dl-deps.c: Make _dl_build_local_scope breadth first
According to the ELF specification:
@@ -24,10 +24,10 @@
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
-index 1b8bac6593..c616808f31 100644
+index c975fcffd7..6ee58c74e0 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
-@@ -73,13 +73,19 @@ _dl_build_local_scope (struct link_map **list, struct link_map *map)
+@@ -72,13 +72,19 @@ _dl_build_local_scope (struct link_map **list, struct link_map *map)
{
struct link_map **p = list;
struct link_map **q;
@@ -52,5 +52,5 @@
}
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch
index 09ad04a..7f5d142 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch
@@ -1,7 +1,7 @@
-From f3a670496c8fe6d4acf045f5b167a19cf41b044e Mon Sep 17 00:00:00 2001
+From 56dab024751941c07eb479f47ef6682e2168c86a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rosen?= <jeremy.rosen@smile.fr>
Date: Mon, 22 Aug 2016 16:09:25 +0200
-Subject: [PATCH 25/25] locale: fix hard-coded reference to gcc -E
+Subject: [PATCH 25/27] locale: fix hard-coded reference to gcc -E
When new version of compilers are published, they may not be compatible with
older versions of software. This is particularly common when software is built
@@ -34,5 +34,5 @@
sub cstrlen {
--
-2.13.2
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-assert-Suppress-pedantic-warning-caused-by-statement.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-assert-Suppress-pedantic-warning-caused-by-statement.patch
deleted file mode 100644
index b2bb96b..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-assert-Suppress-pedantic-warning-caused-by-statement.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 037283cbc74739b72f36dfec827d120faa243406 Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer at redhat dot com>
-Date: Thu, 6 Jul 2017 11:50:55 +0200
-Subject: [PATCH 26/26] assert: Suppress pedantic warning caused by statement
- expression [BZ# 21242]
-
-On 07/05/2017 10:15 PM, Zack Weinberg wrote:
-> On Wed, Jul 5, 2017 at 11:51 AM, Florian Weimer <fweimer@redhat.com> wrote:
->> On 07/05/2017 05:46 PM, Zack Weinberg wrote:
->>> A problem occurs to me: expressions involving VLAs _are_ evaluated
->>> inside sizeof.
->>
->> The type of the sizeof argument would still be int (due to the
->> comparison against 0), so this doesn't actually occur.
->
-> I rechecked what C99 says about sizeof and VLAs, and you're right -
-> the operand of sizeof is only evaluated when sizeof is _directly_
-> applied to a VLA. So this is indeed safe, but I think this wrinkle
-> should be mentioned in the comment. Perhaps
->
-> /* The first occurrence of EXPR is not evaluated due to the sizeof,
-> but will trigger any pedantic warnings masked by the __extension__
-> for the second occurrence. The explicit comparison against zero
-> ensures that sizeof is not directly applied to a function pointer or
-> bit-field (which would be ill-formed) or VLA (which would be evaluated). */
->
-> zw
-
-What about the attached patch?
-
-Siddhesh, is this okay during the freeze? I'd like to backport it to
-2.25 as well.
-
-Thanks,
-Florian
-
-assert: Suppress pedantic warning caused by statement expression
-
-2017-07-06 Florian Weimer <fweimer@redhat.com>
-
- [BZ #21242]
- * assert/assert.h [__GNUC__ && !__STRICT_ANSI__] (assert):
- Suppress pedantic warning resulting from statement expression.
- (__ASSERT_FUNCTION): Add missing __extendsion__.
----
-
-Upstream-Status: Submitted
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- assert/assert.h | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/assert/assert.h b/assert/assert.h
-index 22f019537c..6801cfeb10 100644
---- a/assert/assert.h
-+++ b/assert/assert.h
-@@ -91,13 +91,19 @@ __END_DECLS
- ? __ASSERT_VOID_CAST (0) \
- : __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
- # else
-+/* The first occurrence of EXPR is not evaluated due to the sizeof,
-+ but will trigger any pedantic warnings masked by the __extension__
-+ for the second occurrence. The explicit comparison against zero is
-+ required to support function pointers and bit fields in this
-+ context, and to suppress the evaluation of variable length
-+ arrays. */
- # define assert(expr) \
-- ({ \
-+ ((void) sizeof ((expr) == 0), __extension__ ({ \
- if (expr) \
- ; /* empty */ \
- else \
- __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION); \
-- })
-+ }))
- # endif
-
- # ifdef __USE_GNU
-@@ -113,7 +119,7 @@ __END_DECLS
- C9x has a similar variable called __func__, but prefer the GCC one since
- it demangles C++ function names. */
- # if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4)
--# define __ASSERT_FUNCTION __PRETTY_FUNCTION__
-+# define __ASSERT_FUNCTION __extension__ __PRETTY_FUNCTION__
- # else
- # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
- # define __ASSERT_FUNCTION __func__
---
-2.13.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-reset-dl_load_write_lock-after-forking.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-reset-dl_load_write_lock-after-forking.patch
new file mode 100644
index 0000000..eca1193
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-reset-dl_load_write_lock-after-forking.patch
@@ -0,0 +1,40 @@
+From 847d37d5a34e4bf294de4ba98de3668950e28bc7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Jan 2018 10:05:07 -0800
+Subject: [PATCH 26/27] reset dl_load_write_lock after forking
+
+The patch in this Bugzilla entry was requested by a customer:
+
+ https://www.sourceware.org/bugzilla/show_bug.cgi?id=19282
+
+The __libc_fork() code reset dl_load_lock, but it also needed to reset
+dl_load_write_lock. The patch has not yet been integrated upstream.
+
+Upstream-Status: Pending [ No Author See bugzilla]
+
+Signed-off-by: Damodar Sonone <damodar.sonone@kpit.com>
+Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/nptl/fork.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
+index 846fa49ef2..f87506f398 100644
+--- a/sysdeps/nptl/fork.c
++++ b/sysdeps/nptl/fork.c
+@@ -194,9 +194,9 @@ __libc_fork (void)
+ _IO_list_resetlock ();
+ }
+
+- /* Reset the lock the dynamic loader uses to protect its data. */
++ /* Reset the locks the dynamic loader uses to protect its data. */
+ __rtld_lock_initialize (GL(dl_load_lock));
+-
++ __rtld_lock_initialize (GL(dl_load_write_lock));
+ /* Run the handlers registered for the child. */
+ while (allp != NULL)
+ {
+--
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch
new file mode 100644
index 0000000..9ec234b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch
@@ -0,0 +1,70 @@
+From 94225ab4bcc1613531558a632270b5edce779bc9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Jan 2018 10:08:04 -0800
+Subject: [PATCH 27/27] Acquire ld.so lock before switching to malloc_atfork
+
+The patch is from
+ https://sourceware.org/bugzilla/show_bug.cgi?id=4578
+
+If a thread happens to hold dl_load_lock and have r_state set to RT_ADD or
+RT_DELETE at the time another thread calls fork(), then the child exit code
+from fork (in nptl/sysdeps/unix/sysv/linux/fork.c in our case) re-initializes
+dl_load_lock but does not restore r_state to RT_CONSISTENT. If the child
+subsequently requires ld.so functionality before calling exec(), then the
+assertion will fire.
+
+The patch acquires dl_load_lock on entry to fork() and releases it on exit
+from the parent path. The child path is initialized as currently done.
+This is essentially pthreads_atfork, but forced to be first because the
+acquisition of dl_load_lock must happen before malloc_atfork is active
+to avoid a deadlock.
+
+The patch has not yet been integrated upstream.
+
+Upstream-Status: Pending [ Not Author See bugzilla]
+
+Signed-off-by: Raghunath Lolur <Raghunath.Lolur@kpit.com>
+Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
+Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/nptl/fork.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
+index f87506f398..225e7b51f8 100644
+--- a/sysdeps/nptl/fork.c
++++ b/sysdeps/nptl/fork.c
+@@ -25,6 +25,7 @@
+ #include <tls.h>
+ #include <hp-timing.h>
+ #include <ldsodefs.h>
++#include <libc-lock.h>
+ #include <stdio-lock.h>
+ #include <atomic.h>
+ #include <nptl/pthreadP.h>
+@@ -60,6 +61,10 @@ __libc_fork (void)
+ but our current fork implementation is not. */
+ bool multiple_threads = THREAD_GETMEM (THREAD_SELF, header.multiple_threads);
+
++ /* grab ld.so lock BEFORE switching to malloc_atfork */
++ __rtld_lock_lock_recursive (GL(dl_load_lock));
++ __rtld_lock_lock_recursive (GL(dl_load_write_lock));
++
+ /* Run all the registered preparation handlers. In reverse order.
+ While doing this we build up a list of all the entries. */
+ struct fork_handler *runp;
+@@ -246,6 +251,10 @@ __libc_fork (void)
+
+ allp = allp->next;
+ }
++
++ /* unlock ld.so last, because we locked it first */
++ __rtld_lock_unlock_recursive (GL(dl_load_write_lock));
++ __rtld_lock_unlock_recursive (GL(dl_load_lock));
+ }
+
+ return pid;
+--
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-glibc-reset-dl-load-write-lock-after-forking.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-glibc-reset-dl-load-write-lock-after-forking.patch
deleted file mode 100644
index 777b253..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-glibc-reset-dl-load-write-lock-after-forking.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From a6bb73d1cfd20a73fbbe6076008376fb87879d1b Mon Sep 17 00:00:00 2001
-From: Yuanjie Huang <yuanjie.huang@windriver.com>
-Date: Thu, 18 Aug 2016 17:59:13 +0800
-Subject: [PATCH] reset dl_load_write_lock after forking
-
-The patch in this Bugzilla entry was requested by a customer:
-
- https://www.sourceware.org/bugzilla/show_bug.cgi?id=19282
-
-The __libc_fork() code reset dl_load_lock, but it also needed to reset
-dl_load_write_lock. The patch has not yet been integrated upstream.
-
-Upstream-Status: Pending [ Not Author See bugzilla]
-
-Signed-off-by: Damodar Sonone <damodar.sonone@kpit.com>
-Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
----
- sysdeps/nptl/fork.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
-index 2b9ae4b..3d0b8da 100644
---- a/sysdeps/nptl/fork.c
-+++ b/sysdeps/nptl/fork.c
-@@ -174,8 +174,9 @@ __libc_fork (void)
- /* Reset locks in the I/O code. */
- _IO_list_resetlock ();
-
-- /* Reset the lock the dynamic loader uses to protect its data. */
-+ /* Reset the locks the dynamic loader uses to protect its data. */
- __rtld_lock_initialize (GL(dl_load_lock));
-+ __rtld_lock_initialize (GL(dl_load_write_lock));
-
- /* Run the handlers registered for the child. */
- while (allp != NULL)
---
-1.9.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-Bug-4578-add-ld.so-lock-while-fork.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-Bug-4578-add-ld.so-lock-while-fork.patch
deleted file mode 100644
index f76237a..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-Bug-4578-add-ld.so-lock-while-fork.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-The patch in this Bugzilla entry was requested by a customer:
- https://sourceware.org/bugzilla/show_bug.cgi?id=4578
-
-If a thread happens to hold dl_load_lock and have r_state set to RT_ADD or
-RT_DELETE at the time another thread calls fork(), then the child exit code
-from fork (in nptl/sysdeps/unix/sysv/linux/fork.c in our case) re-initializes
-dl_load_lock but does not restore r_state to RT_CONSISTENT. If the child
-subsequently requires ld.so functionality before calling exec(), then the
-assertion will fire.
-
-The patch acquires dl_load_lock on entry to fork() and releases it on exit
-from the parent path. The child path is initialized as currently done.
-This is essentially pthreads_atfork, but forced to be first because the
-acquisition of dl_load_lock must happen before malloc_atfork is active
-to avoid a deadlock.
-The patch has not yet been integrated upstream.
-
-Upstream-Status: Pending [ Not Author See bugzilla]
-
-Signed-off-by: Raghunath Lolur <Raghunath.Lolur@kpit.com>
-Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
-Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
-
-Index: git/sysdeps/nptl/fork.c
-===================================================================
---- git.orig/sysdeps/nptl/fork.c 2017-08-03 16:02:15.674704080 +0800
-+++ git/sysdeps/nptl/fork.c 2017-08-04 18:15:02.463362015 +0800
-@@ -25,6 +25,7 @@
- #include <tls.h>
- #include <hp-timing.h>
- #include <ldsodefs.h>
-+#include <libc-lock.h>
- #include <stdio-lock.h>
- #include <atomic.h>
- #include <nptl/pthreadP.h>
-@@ -60,6 +61,10 @@
- but our current fork implementation is not. */
- bool multiple_threads = THREAD_GETMEM (THREAD_SELF, header.multiple_threads);
-
-+ /* grab ld.so lock BEFORE switching to malloc_atfork */
-+ __rtld_lock_lock_recursive (GL(dl_load_lock));
-+ __rtld_lock_lock_recursive (GL(dl_load_write_lock));
-+
- /* Run all the registered preparation handlers. In reverse order.
- While doing this we build up a list of all the entries. */
- struct fork_handler *runp;
-@@ -247,6 +252,10 @@
-
- allp = allp->next;
- }
-+
-+ /* unlock ld.so last, because we locked it first */
-+ __rtld_lock_unlock_recursive (GL(dl_load_write_lock));
-+ __rtld_lock_unlock_recursive (GL(dl_load_lock));
- }
-
- return pid;
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
rename to import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch
new file mode 100644
index 0000000..fa29f41
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch
@@ -0,0 +1,40 @@
+From 113e0516fbd3ce18253f0423762416d4c4b38fb0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 22 Mar 2018 17:57:37 -0700
+Subject: [PATCH 29/29] Replace strncpy with memccpy to fix
+ -Wstringop-truncation.
+
+ * nis/nss_nisplus/nisplus-parser.c: Replace strncpy with memcpy to
+ avoid -Wstringop-truncation.
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Submitted [https://sourceware.org/ml/libc-alpha/2018-03/msg00531.html]
+
+ nis/nss_nisplus/nisplus-parser.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/nis/nss_nisplus/nisplus-parser.c b/nis/nss_nisplus/nisplus-parser.c
+index 8dc021e73d..b53284f889 100644
+--- a/nis/nss_nisplus/nisplus-parser.c
++++ b/nis/nss_nisplus/nisplus-parser.c
+@@ -87,7 +87,7 @@ _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw,
+ if (len >= room_left)
+ goto no_more_room;
+
+- strncpy (first_unused, numstr, len);
++ memcpy (first_unused, numstr, len);
+ first_unused[len] = '\0';
+ numstr = first_unused;
+ }
+@@ -103,7 +103,7 @@ _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw,
+ if (len >= room_left)
+ goto no_more_room;
+
+- strncpy (first_unused, numstr, len);
++ memcpy (first_unused, numstr, len);
+ first_unused[len] = '\0';
+ numstr = first_unused;
+ }
+--
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-assert-Support-types-without-operator-int-BZ-21972.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-assert-Support-types-without-operator-int-BZ-21972.patch
deleted file mode 100644
index 3c7050f..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-assert-Support-types-without-operator-int-BZ-21972.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-Upstream-Status: Backport
-
-* fixes "lambda-expression in unevaluated context" compile failures such as
- https://github.com/nlohmann/json/issues/705
-
-* fixes "no match for 'operator==" compile failures such as
- https://bugzilla.redhat.com/show_bug.cgi?id=1482990
-
-* Changelog edit was removed from upstream commit because it caused conflict
-
-Signed-off-by: S. Lockwood-Childs <sjl@vctlabs.com>
-
-From b5889d25e9bf944a89fdd7bcabf3b6c6f6bb6f7c Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer@redhat.com>
-Date: Mon, 21 Aug 2017 13:03:29 +0200
-Subject: [PATCH] assert: Support types without operator== (int) [BZ #21972]
-
----
- assert/Makefile | 11 ++++++-
- assert/assert.h | 16 ++++++----
- assert/tst-assert-c++.cc | 78 ++++++++++++++++++++++++++++++++++++++++++++++++
- assert/tst-assert-g++.cc | 19 ++++++++++++
- 4 files changed, 128 insertions(+), 7 deletions(-)
- create mode 100644 assert/tst-assert-c++.cc
- create mode 100644 assert/tst-assert-g++.cc
-
-diff --git a/assert/Makefile b/assert/Makefile
-index 1c3be9b..9ec1be8 100644
---- a/assert/Makefile
-+++ b/assert/Makefile
-@@ -25,6 +25,15 @@ include ../Makeconfig
- headers := assert.h
-
- routines := assert assert-perr __assert
--tests := test-assert test-assert-perr
-+tests := test-assert test-assert-perr tst-assert-c++ tst-assert-g++
-
- include ../Rules
-+
-+ifeq ($(have-cxx-thread_local),yes)
-+CFLAGS-tst-assert-c++.o = -std=c++11
-+LDLIBS-tst-assert-c++ = -lstdc++
-+CFLAGS-tst-assert-g++.o = -std=gnu++11
-+LDLIBS-tst-assert-g++ = -lstdc++
-+else
-+tests-unsupported += tst-assert-c++ tst-assert-g++
-+endif
-diff --git a/assert/assert.h b/assert/assert.h
-index 6801cfe..640c95c 100644
---- a/assert/assert.h
-+++ b/assert/assert.h
-@@ -85,7 +85,12 @@ __END_DECLS
- /* When possible, define assert so that it does not add extra
- parentheses around EXPR. Otherwise, those added parentheses would
- suppress warnings we'd expect to be detected by gcc's -Wparentheses. */
--# if !defined __GNUC__ || defined __STRICT_ANSI__
-+# if defined __cplusplus
-+# define assert(expr) \
-+ (static_cast <bool> (expr) \
-+ ? void (0) \
-+ : __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
-+# elif !defined __GNUC__ || defined __STRICT_ANSI__
- # define assert(expr) \
- ((expr) \
- ? __ASSERT_VOID_CAST (0) \
-@@ -93,12 +98,11 @@ __END_DECLS
- # else
- /* The first occurrence of EXPR is not evaluated due to the sizeof,
- but will trigger any pedantic warnings masked by the __extension__
-- for the second occurrence. The explicit comparison against zero is
-- required to support function pointers and bit fields in this
-- context, and to suppress the evaluation of variable length
-- arrays. */
-+ for the second occurrence. The ternary operator is required to
-+ support function pointers and bit fields in this context, and to
-+ suppress the evaluation of variable length arrays. */
- # define assert(expr) \
-- ((void) sizeof ((expr) == 0), __extension__ ({ \
-+ ((void) sizeof ((expr) ? 1 : 0), __extension__ ({ \
- if (expr) \
- ; /* empty */ \
- else \
-diff --git a/assert/tst-assert-c++.cc b/assert/tst-assert-c++.cc
-new file mode 100644
-index 0000000..12a5e69
---- /dev/null
-+++ b/assert/tst-assert-c++.cc
-@@ -0,0 +1,78 @@
-+/* Tests for interactions between C++ and assert.
-+ Copyright (C) 2017 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <assert.h>
-+
-+/* The C++ standard requires that if the assert argument is a constant
-+ subexpression, then the assert itself is one, too. */
-+constexpr int
-+check_constexpr ()
-+{
-+ return (assert (true), 1);
-+}
-+
-+/* Objects of this class can be contextually converted to bool, but
-+ cannot be compared to int. */
-+struct no_int
-+{
-+ no_int () = default;
-+ no_int (const no_int &) = delete;
-+
-+ explicit operator bool () const
-+ {
-+ return true;
-+ }
-+
-+ bool operator! () const; /* No definition. */
-+ template <class T> bool operator== (T) const; /* No definition. */
-+ template <class T> bool operator!= (T) const; /* No definition. */
-+};
-+
-+/* This class tests that operator== is not used by assert. */
-+struct bool_and_int
-+{
-+ bool_and_int () = default;
-+ bool_and_int (const no_int &) = delete;
-+
-+ explicit operator bool () const
-+ {
-+ return true;
-+ }
-+
-+ bool operator! () const; /* No definition. */
-+ template <class T> bool operator== (T) const; /* No definition. */
-+ template <class T> bool operator!= (T) const; /* No definition. */
-+};
-+
-+static int
-+do_test ()
-+{
-+ {
-+ no_int value;
-+ assert (value);
-+ }
-+
-+ {
-+ bool_and_int value;
-+ assert (value);
-+ }
-+
-+ return 0;
-+}
-+
-+#include <support/test-driver.c>
-diff --git a/assert/tst-assert-g++.cc b/assert/tst-assert-g++.cc
-new file mode 100644
-index 0000000..8c06402
---- /dev/null
-+++ b/assert/tst-assert-g++.cc
-@@ -0,0 +1,19 @@
-+/* Tests for interactions between C++ and assert. GNU C++11 version.
-+ Copyright (C) 2017 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#include <tst-assert-c++.cc>
---
-1.9.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0030-plural_c_no_preprocessor_lines.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0030-plural_c_no_preprocessor_lines.patch
new file mode 100644
index 0000000..6f03e1c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0030-plural_c_no_preprocessor_lines.patch
@@ -0,0 +1,21 @@
+Improve reproducibility:
+Do not put any #line preprocessor commands in bison generated files.
+These lines contain absolute paths containing file locations on
+the host build machine.
+
+Upstream-Status: Pending
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+
+diff --git a/intl/Makefile b/intl/Makefile
+index 2219717..a203780 100644
+--- a/intl/Makefile
++++ b/intl/Makefile
+@@ -151,7 +151,7 @@ $(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out
+
+ CPPFLAGS += -D'LOCALEDIR="$(localedir)"' \
+ -D'LOCALE_ALIAS_PATH="$(localedir)"'
+-BISONFLAGS = --yacc --name-prefix=__gettext --output
++BISONFLAGS = --yacc --no-lines --name-prefix=__gettext --output
+
+ $(inst_localedir)/locale.alias: locale.alias $(+force)
+ $(do-install)
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch
new file mode 100644
index 0000000..a9132ed
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch
@@ -0,0 +1,419 @@
+Background information:
+
+https://sourceware.org/ml/libc-alpha/2017-08/msg01257.html
+https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt
+
+Upstream-Status: Submitted [libc-alpha@sourceware.org]
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+From: Zack Weinberg <zackw@panix.com>
+Subject: [PATCH] Deprecate libcrypt and don't build it by default
+
+Back in June, Björn Esser proposed to add OpenBSD-compatible bcrypt
+support to our implementation of crypt(3), and Zack Weinberg replied
+that it might actually make more sense to _remove_ libcrypt from
+glibc, freeing up libcrypt.so.1 and crypt.h to be provided by a
+separate project that could move faster. (For instance, libxcrypt:
+https://github.com/besser82/libxcrypt)
+
+This patch disables build and installation of libcrypt by default. It
+can be re-enabled with --enable-obsolete-crypt to configure. Unlike
+libnsl, we do *not* install a runtime shared library; that's left to
+the replacement. (Unlike the SunRPC situation, I think we can
+probably drop this code altogether in a release or two.)
+
+The function prototypes for crypt and encrypt are removed from
+unistd.h, and the function prototype for setkey is removed from
+stdlib.h; they do *not* come back with --enable-obsolete-crypt. This
+means glibc no longer provides the POSIX CRYPT option, and the macro
+_XOPEN_CRYPT is also removed from unistd.h to indicate that.
+(_SC_XOPEN_CRYPT is still defined, but sysconf(_SC_XOPEN_CRYPT) will
+return -1 at runtime.) These functions are also unconditionally
+removed from conform/data/{stdlib,unistd}.h-data.
+
+ * posix/unistd.h (_XOPEN_CRYPT, crypt, encrypt): Don't declare.
+ * stdlib/stdlib.h (setkey): Don't declare.
+
+ * configure.ac (--enable-obsolete-crypt): New configure option.
+ * configure: Regenerate.
+ * config.make.in (build-obsolete-crypt): New makefile variable.
+ * crypt/Banner: Delete file.
+ * crypt/Makefile: Don't build anything unless
+ $(build-obsolete-crypt) is 'yes'.
+ * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile: Only add things
+ to libcrypt-sysdep_routines when $(build-obsolete-crypt) is 'yes'.
+ * sysdeps/sparc/sparc64/multiarch/Makefile: Likewise.
+ * sysdeps/unix/sysv/linux/arm/Makefile: Likewise.
+
+ * conform/Makefile: Only include libcrypt.a in linknamespace tests
+ when $(build-obsolete-crypt) is 'yes'.
+ * conform/data/stdlib.h-data (setkey): Don't expect.
+ * conform/data/unistd.h-data (crypt, encrypt): Don't expect.
+ * elf/Makefile: Only perform various tests of libcrypt.so/libcrypt.a
+ when $(build-obsolete-crypt) is 'yes'.
+ * elf/tst-linkall-static.c: Don't include crypt.h when USE_CRYPT
+ is false.
+---
+ NEWS | 18 ++++++++++++++++++
+ config.make.in | 1 +
+ configure | 13 +++++++++++++
+ configure.ac | 8 ++++++++
+ conform/Makefile | 14 ++++++++++----
+ conform/data/stdlib.h-data | 3 ---
+ conform/data/unistd.h-data | 6 ------
+ crypt/Makefile | 5 +++++
+ elf/Makefile | 16 ++++++++++++----
+ elf/tst-linkall-static.c | 2 ++
+ posix/unistd.h | 16 ----------------
+ stdlib/stdlib.h | 6 ------
+ sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile | 2 ++
+ sysdeps/sparc/sparc64/multiarch/Makefile | 2 ++
+ sysdeps/unix/sysv/linux/arm/Makefile | 2 ++
+ 15 files changed, 75 insertions(+), 39 deletions(-)
+
+diff --git a/config.make.in b/config.make.in
+index 9e5e24b2c6..8fe610d04d 100644
+--- a/config.make.in
++++ b/config.make.in
+@@ -82,6 +82,7 @@ mach-interface-list = @mach_interface_list@
+
+ experimental-malloc = @experimental_malloc@
+
++build-obsolete-crypt = @build_obsolete_crypt@
+ nss-crypt = @libc_cv_nss_crypt@
+ static-nss-crypt = @libc_cv_static_nss_crypt@
+
+diff --git a/configure b/configure
+index 7a8bd3f817..46f6bd7f86 100755
+--- a/configure
++++ b/configure
+@@ -672,6 +672,7 @@ base_machine
+ have_tunables
+ build_pt_chown
+ build_nscd
++build_obsolete_crypt
+ build_obsolete_nsl
+ link_obsolete_rpc
+ libc_cv_static_nss_crypt
+@@ -782,6 +783,7 @@ enable_experimental_malloc
+ enable_nss_crypt
+ enable_obsolete_rpc
+ enable_obsolete_nsl
++enable_obsolete_crypt
+ enable_systemtap
+ enable_build_nscd
+ enable_nscd
+@@ -1453,6 +1455,7 @@ Optional Features:
+ link-time usage
+ --enable-obsolete-nsl build and install the obsolete libnsl library and
+ depending NSS modules
++ --enable-obsolete-crypt build and install the obsolete libcrypt library
+ --enable-systemtap enable systemtap static probe points [default=no]
+ --disable-build-nscd disable building and installing the nscd daemon
+ --disable-nscd library functions will not contact the nscd daemon
+@@ -3632,6 +3635,16 @@ if test "$build_obsolete_nsl" = yes; then
+
+ fi
+
++# Check whether --enable-obsolete-crypt was given.
++if test "${enable_obsolete_crypt+set}" = set; then :
++ enableval=$enable_obsolete_crypt; build_obsolete_crypt=$enableval
++else
++ build_obsolete_crypt=no
++fi
++
++
++
++
+ # Check whether --enable-systemtap was given.
+ if test "${enable_systemtap+set}" = set; then :
+ enableval=$enable_systemtap; systemtap=$enableval
+diff --git a/configure.ac b/configure.ac
+index ca1282a6b3..0142353740 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -378,6 +378,14 @@ if test "$build_obsolete_nsl" = yes; then
+ AC_DEFINE(LINK_OBSOLETE_NSL)
+ fi
+
++AC_ARG_ENABLE([obsolete-crypt],
++ AC_HELP_STRING([--enable-obsolete-crypt],
++ [build and install the obsolete libcrypt library]),
++ [build_obsolete_crypt=$enableval],
++ [build_obsolete_crypt=no])
++AC_SUBST(build_obsolete_crypt)
++
++
+ AC_ARG_ENABLE([systemtap],
+ [AS_HELP_STRING([--enable-systemtap],
+ [enable systemtap static probe points @<:@default=no@:>@])],
+diff --git a/conform/Makefile b/conform/Makefile
+index 864fdeca21..5ef474fb24 100644
+--- a/conform/Makefile
++++ b/conform/Makefile
+@@ -193,22 +193,28 @@ linknamespace-libs-thr = $(linknamespace-libs-isoc) \
+ $(common-objpfx)rt/librt.a $(static-thread-library)
+ linknamespace-libs-posix = $(linknamespace-libs-thr) \
+ $(common-objpfx)dlfcn/libdl.a
+-linknamespace-libs-xsi = $(linknamespace-libs-posix) \
+- $(common-objpfx)crypt/libcrypt.a
++linknamespace-libs-xsi = $(linknamespace-libs-posix)
+ linknamespace-libs-ISO = $(linknamespace-libs-isoc)
+ linknamespace-libs-ISO99 = $(linknamespace-libs-isoc)
+ linknamespace-libs-ISO11 = $(linknamespace-libs-isoc)
+-linknamespace-libs-XPG4 = $(linknamespace-libs-isoc) \
+- $(common-objpfx)crypt/libcrypt.a
++linknamespace-libs-XPG4 = $(linknamespace-libs-isoc)
+ linknamespace-libs-XPG42 = $(linknamespace-libs-XPG4)
+ linknamespace-libs-POSIX = $(linknamespace-libs-thr)
+ linknamespace-libs-UNIX98 = $(linknamespace-libs-xsi)
+ linknamespace-libs-XOPEN2K = $(linknamespace-libs-xsi)
+ linknamespace-libs-POSIX2008 = $(linknamespace-libs-posix)
+ linknamespace-libs-XOPEN2K8 = $(linknamespace-libs-xsi)
++
++ifeq ($(build-obsolete-crypt),yes)
++linknamespace-libs-xsi += $(common-objpfx)crypt/libcrypt.a
++linknamespace-libs-XPG4 += $(common-objpfx)crypt/libcrypt.a
++endif
++
+ linknamespace-libs = $(foreach std,$(conformtest-standards),\
+ $(linknamespace-libs-$(std)))
+
++
++
+ $(linknamespace-symlist-stdlibs-tests): $(objpfx)symlist-stdlibs-%: \
+ $(linknamespace-libs)
+ LC_ALL=C $(READELF) -W -s $(linknamespace-libs-$*) > $@; \
+diff --git a/conform/data/stdlib.h-data b/conform/data/stdlib.h-data
+index d8fcccc2fb..6913828196 100644
+--- a/conform/data/stdlib.h-data
++++ b/conform/data/stdlib.h-data
+@@ -149,9 +149,6 @@ function {unsigned short int*} seed48 (unsigned short int[3])
+ #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
+ function int setenv (const char*, const char*, int)
+ #endif
+-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
+-function void setkey (const char*)
+-#endif
+ #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008
+ function {char*} setstate (char*)
+ #endif
+diff --git a/conform/data/unistd.h-data b/conform/data/unistd.h-data
+index ddf4f25132..aa070528e8 100644
+--- a/conform/data/unistd.h-data
++++ b/conform/data/unistd.h-data
+@@ -437,9 +437,6 @@ function int chroot (const char*)
+ function int chown (const char*, uid_t, gid_t)
+ function int close (int)
+ function size_t confstr (int, char*, size_t)
+-#if !defined POSIX && !defined POSIX2008
+-function {char*} crypt (const char*, const char*)
+-#endif
+ #if defined XPG4 || defined XPG42 || defined UNIX98
+ function {char*} ctermid (char*)
+ function {char*} cuserid (char*)
+@@ -449,9 +446,6 @@ allow cuserid
+ #endif
+ function int dup (int)
+ function int dup2 (int, int)
+-#if !defined POSIX && !defined POSIX2008
+-function void encrypt (char[64], int)
+-#endif
+ function int execl (const char*, const char*, ...)
+ function int execle (const char*, const char*, ...)
+ function int execlp (const char*, const char*, ...)
+diff --git a/crypt/Makefile b/crypt/Makefile
+index 303800df73..024ec2c6ab 100644
+--- a/crypt/Makefile
++++ b/crypt/Makefile
+@@ -22,6 +22,8 @@ subdir := crypt
+
+ include ../Makeconfig
+
++ifeq ($(build-obsolete-crypt),yes)
++
+ headers := crypt.h
+
+ extra-libs := libcrypt
+@@ -52,9 +54,11 @@ tests += md5test sha256test sha512test
+ # machine over a minute.
+ xtests = md5test-giant
+ endif
++endif
+
+ include ../Rules
+
++ifeq ($(build-obsolete-crypt),yes)
+ ifneq ($(nss-crypt),yes)
+ md5-routines := md5 $(filter md5%,$(libcrypt-sysdep_routines))
+ sha256-routines := sha256 $(filter sha256%,$(libcrypt-sysdep_routines))
+@@ -71,3 +75,4 @@ $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so
+ else
+ $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a
+ endif
++endif
+diff --git a/elf/Makefile b/elf/Makefile
+index 2a432d8bee..366f7b80ec 100644
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -385,15 +385,19 @@ $(objpfx)tst-_dl_addr_inside_object: $(objpfx)dl-addr-obj.os
+ CFLAGS-tst-_dl_addr_inside_object.c += $(PIE-ccflag)
+ endif
+
+-# By default tst-linkall-static should try to use crypt routines to test
+-# static libcrypt use.
+-CFLAGS-tst-linkall-static.c += -DUSE_CRYPT=1
++ifeq ($(build-obsolete-crypt),yes)
++# If the libcrypt library is being built, tst-linkall-static should
++# try to use crypt routines to test static libcrypt use.
++CFLAGS-tst-linkall-static.c = -DUSE_CRYPT=1
+ # However, if we are using NSS crypto and we don't have a static
+ # library, then we exclude the use of crypt functions in the test.
+ # We similarly exclude libcrypt.a from the static link (see below).
+ ifeq (yesno,$(nss-crypt)$(static-nss-crypt))
+ CFLAGS-tst-linkall-static.c += -UUSE_CRYPT -DUSE_CRYPT=0
+ endif
++else
++CFLAGS-tst-linkall-static.c = -DUSE_CRYPT=0
++endif
+
+ include ../Rules
+
+@@ -1113,8 +1117,10 @@ localplt-built-dso := $(addprefix $(common-objpfx),\
+ rt/librt.so \
+ dlfcn/libdl.so \
+ resolv/libresolv.so \
+- crypt/libcrypt.so \
+ )
++ifeq ($(build-obsolete-crypt),yes)
++localplt-built-dso += $(addprefix $(common-objpfx), crypt/libcrypt.so)
++endif
+ ifeq ($(build-mathvec),yes)
+ localplt-built-dso += $(addprefix $(common-objpfx), mathvec/libmvec.so)
+ endif
+@@ -1395,6 +1401,7 @@ $(objpfx)tst-linkall-static: \
+ $(common-objpfx)resolv/libanl.a \
+ $(static-thread-library)
+
++ifeq ($(build-obsolete-crypt),yes)
+ # If we are using NSS crypto and we have the ability to link statically
+ # then we include libcrypt.a, otherwise we leave out libcrypt.a and
+ # link as much as we can into the tst-linkall-static test. This assumes
+@@ -1410,6 +1417,7 @@ ifeq (no,$(nss-crypt))
+ $(objpfx)tst-linkall-static: \
+ $(common-objpfx)crypt/libcrypt.a
+ endif
++endif
+
+ # The application depends on the DSO, and the DSO loads the plugin.
+ # The plugin also depends on the DSO. This creates the circular
+diff --git a/elf/tst-linkall-static.c b/elf/tst-linkall-static.c
+index e8df38f74e..0ffae7c723 100644
+--- a/elf/tst-linkall-static.c
++++ b/elf/tst-linkall-static.c
+@@ -18,7 +18,9 @@
+
+ #include <math.h>
+ #include <pthread.h>
++#if USE_CRYPT
+ #include <crypt.h>
++#endif
+ #include <resolv.h>
+ #include <dlfcn.h>
+ #include <utmp.h>
+diff --git a/posix/unistd.h b/posix/unistd.h
+index 4d149f9945..e75ce4d4ec 100644
+--- a/posix/unistd.h
++++ b/posix/unistd.h
+@@ -107,9 +107,6 @@ __BEGIN_DECLS
+ /* The X/Open Unix extensions are available. */
+ #define _XOPEN_UNIX 1
+
+-/* Encryption is present. */
+-#define _XOPEN_CRYPT 1
+-
+ /* The enhanced internationalization capabilities according to XPG4.2
+ are present. */
+ #define _XOPEN_ENH_I18N 1
+@@ -1118,20 +1115,7 @@ ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
+ extern int fdatasync (int __fildes);
+ #endif /* Use POSIX199309 */
+
+-
+-/* XPG4.2 specifies that prototypes for the encryption functions must
+- be defined here. */
+ #ifdef __USE_XOPEN
+-/* Encrypt at most 8 characters from KEY using salt to perturb DES. */
+-extern char *crypt (const char *__key, const char *__salt)
+- __THROW __nonnull ((1, 2));
+-
+-/* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt
+- block in place. */
+-extern void encrypt (char *__glibc_block, int __edflag)
+- __THROW __nonnull ((1));
+-
+-
+ /* Swab pairs bytes in the first N bytes of the area pointed to by
+ FROM and copy the result to TO. The value of TO must not be in the
+ range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM
+diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
+index 6b1ead31e0..8e23e93557 100644
+--- a/stdlib/stdlib.h
++++ b/stdlib/stdlib.h
+@@ -958,12 +958,6 @@ extern int getsubopt (char **__restrict __optionp,
+ #endif
+
+
+-#ifdef __USE_XOPEN
+-/* Setup DES tables according KEY. */
+-extern void setkey (const char *__key) __THROW __nonnull ((1));
+-#endif
+-
+-
+ /* X/Open pseudo terminal handling. */
+
+ #ifdef __USE_XOPEN2KXSI
+diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
+index a6d08f3a00..d8b8297fb0 100644
+--- a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
++++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
+@@ -1,6 +1,8 @@
+ ifeq ($(subdir),crypt)
++ifeq ($(build-obsolete-crypt),yes)
+ libcrypt-sysdep_routines += md5-crop sha256-crop sha512-crop
+ endif
++endif
+
+ ifeq ($(subdir),locale)
+ localedef-aux += md5-crop
+diff --git a/sysdeps/sparc/sparc64/multiarch/Makefile b/sysdeps/sparc/sparc64/multiarch/Makefile
+index eaf758e7aa..0198f9886f 100644
+--- a/sysdeps/sparc/sparc64/multiarch/Makefile
++++ b/sysdeps/sparc/sparc64/multiarch/Makefile
+@@ -1,6 +1,8 @@
+ ifeq ($(subdir),crypt)
++ifeq ($(build-obsolete-crypt),yes)
+ libcrypt-sysdep_routines += md5-crop sha256-crop sha512-crop
+ endif
++endif
+
+ ifeq ($(subdir),locale)
+ localedef-aux += md5-crop
+diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
+index 4adc35de04..6cab4f3a31 100644
+--- a/sysdeps/unix/sysv/linux/arm/Makefile
++++ b/sysdeps/unix/sysv/linux/arm/Makefile
+@@ -19,8 +19,10 @@ endif
+ # Add a syscall function to each library that needs one.
+
+ ifeq ($(subdir),crypt)
++ifeq ($(build-obsolete-crypt),yes)
+ libcrypt-sysdep_routines += libc-do-syscall
+ endif
++endif
+
+ ifeq ($(subdir),rt)
+ librt-sysdep_routines += libc-do-syscall
+--
+2.16.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-15670.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-15670.patch
deleted file mode 100644
index ae050a5..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-15670.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From a76376df7c07e577a9515c3faa5dbd50bda5da07 Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Fri, 20 Oct 2017 18:41:14 +0200
-Subject: [PATCH] CVE-2017-15670: glob: Fix one-byte overflow [BZ #22320]
-
-(cherry picked from commit c369d66e5426a30e4725b100d5cd28e372754f90)
-
-Upstream-Status: Backport
-CVE: CVE-2017-15670
-Affects: glibc < 2.27
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- ChangeLog | 6 ++++++
- NEWS | 5 +++++
- posix/glob.c | 2 +-
- 3 files changed, 12 insertions(+), 1 deletion(-)
-
-Index: git/NEWS
-===================================================================
---- git.orig/NEWS
-+++ git/NEWS
-@@ -206,6 +206,11 @@ Security related changes:
- * A use-after-free vulnerability in clntudp_call in the Sun RPC system has been
- fixed (CVE-2017-12133).
-
-+ CVE-2017-15670: The glob function, when invoked with GLOB_TILDE,
-+ suffered from a one-byte overflow during ~ operator processing (either
-+ on the stack or the heap, depending on the length of the user name).
-+ Reported by Tim Rühsen.
-+
- The following bugs are resolved with this release:
-
- [984] network: Respond to changed resolv.conf in gethostbyname
-Index: git/posix/glob.c
-===================================================================
---- git.orig/posix/glob.c
-+++ git/posix/glob.c
-@@ -843,7 +843,7 @@ glob (const char *pattern, int flags, in
- *p = '\0';
- }
- else
-- *((char *) mempcpy (newp, dirname + 1, end_name - dirname))
-+ *((char *) mempcpy (newp, dirname + 1, end_name - dirname - 1))
- = '\0';
- user_name = newp;
- }
-Index: git/ChangeLog
-===================================================================
---- git.orig/ChangeLog
-+++ git/ChangeLog
-@@ -1,3 +1,9 @@
-+2017-10-20 Paul Eggert <eggert@cs.ucla.edu>
-+
-+ [BZ #22320]
-+ CVE-2017-15670
-+ * posix/glob.c (__glob): Fix one-byte overflow.
-+
- 2017-08-02 Siddhesh Poyarekar <siddhesh@sourceware.org>
-
- * version.h (RELEASE): Set to "stable"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.26.bb
deleted file mode 100644
index 9d1e636..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.26.bb
+++ /dev/null
@@ -1,144 +0,0 @@
-require glibc.inc
-
-LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
- file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
- file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
-
-DEPENDS += "gperf-native bison-native"
-
-SRCREV ?= "d300041c533a3d837c9f37a099bcc95466860e98"
-
-SRCBRANCH ?= "release/${PV}/master"
-
-GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
-
-SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
- file://etc/ld.so.conf \
- file://generate-supported.mk \
- \
- ${NATIVESDKFIXES} \
- file://0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \
- file://0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
- file://0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
- file://0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
- file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
- file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
- file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
- file://0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
- file://0013-Add-unused-attribute.patch \
- file://0014-yes-within-the-path-sets-wrong-config-variables.patch \
- file://0015-timezone-re-written-tzselect-as-posix-sh.patch \
- file://0016-Remove-bash-dependency-for-nscd-init-script.patch \
- file://0017-eglibc-Cross-building-and-testing-instructions.patch \
- file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \
- file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \
- file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \
- file://0021-eglibc-Install-PIC-archives.patch \
- file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
- file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
- file://0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
- file://0025-locale-fix-hard-coded-reference-to-gcc-E.patch \
- file://0027-glibc-reset-dl-load-write-lock-after-forking.patch \
- file://0028-Bug-4578-add-ld.so-lock-while-fork.patch \
- file://0029-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \
-"
-
-NATIVESDKFIXES ?= ""
-NATIVESDKFIXES_class-nativesdk = "\
- file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \
- file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \
- file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
- file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \
- file://relocate-locales.patch \
-"
-
-S = "${WORKDIR}/git"
-B = "${WORKDIR}/build-${TARGET_SYS}"
-
-PACKAGES_DYNAMIC = ""
-
-# the -isystem in bitbake.conf screws up glibc do_stage
-BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
-TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
-
-GLIBC_BROKEN_LOCALES = ""
-#
-# We will skip parsing glibc when target system C library selection is not glibc
-# this helps in easing out parsing for non-glibc system libraries
-#
-COMPATIBLE_HOST_libc-musl_class-target = "null"
-
-EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
- --without-cvs --disable-profile \
- --disable-debug --without-gd \
- --enable-clocale=gnu \
- --enable-add-ons=libidn \
- --with-headers=${STAGING_INCDIR} \
- --without-selinux \
- --enable-obsolete-rpc \
- --enable-obsolete-nsl \
- --enable-tunables \
- --enable-bind-now \
- --enable-stack-protector=strong \
- --enable-stackguard-randomization \
- ${GLIBC_EXTRA_OECONF}"
-
-EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', '--enable-nscd', '--disable-nscd', d)}"
-
-
-do_patch_append() {
- bb.build.exec_func('do_fix_readlib_c', d)
-}
-
-do_fix_readlib_c () {
- sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
-}
-
-do_configure () {
-# override this function to avoid the autoconf/automake/aclocal/autoheader
-# calls for now
-# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
-# version check and doesn't really help with anything
- (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
- find ${S} -name "configure" | xargs touch
- # "plural.c" may or may not get regenerated from "plural.y" so we
- # touch "plural.y" to make sure it does. (This should not be needed
- # for glibc version 2.26+)
- find ${S}/intl -name "plural.y" | xargs touch
- CPPFLAGS="" oe_runconf
-}
-
-rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
- yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
- rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
-
-do_compile () {
- # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
- unset LDFLAGS
- base_do_compile
- (
- cd ${S}/sunrpc/rpcsvc
- for r in ${rpcsvc}; do
- h=`echo $r|sed -e's,\.x$,.h,'`
- rm -f $h
- ${B}/sunrpc/cross-rpcgen -h $r -o $h || bbwarn "${PN}: unable to generate header for $r"
- done
- )
- echo "Adjust ldd script"
- if [ -n "${RTLDLIST}" ]
- then
- prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
- if [ "${prevrtld}" != "${RTLDLIST}" ]
- then
- sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
- fi
- fi
-
-}
-
-require glibc-package.inc
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.27.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.27.bb
new file mode 100644
index 0000000..c814798
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.27.bb
@@ -0,0 +1,146 @@
+require glibc.inc
+
+LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
+ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
+ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS += "gperf-native bison-native"
+
+SRCREV ?= "df3ff4e49d4ee3cbbdaeb0b1cb5dc2344c08be98"
+
+SRCBRANCH ?= "release/${PV}/master"
+
+GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.(?!90)\d+)*)"
+
+SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
+ file://etc/ld.so.conf \
+ file://generate-supported.mk \
+ \
+ ${NATIVESDKFIXES} \
+ file://0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \
+ file://0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
+ file://0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
+ file://0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
+ file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
+ file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
+ file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
+ file://0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
+ file://0013-Add-unused-attribute.patch \
+ file://0014-yes-within-the-path-sets-wrong-config-variables.patch \
+ file://0015-timezone-re-written-tzselect-as-posix-sh.patch \
+ file://0016-Remove-bash-dependency-for-nscd-init-script.patch \
+ file://0017-eglibc-Cross-building-and-testing-instructions.patch \
+ file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \
+ file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \
+ file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+ file://0021-eglibc-Install-PIC-archives.patch \
+ file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
+ file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
+ file://0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
+ file://0025-locale-fix-hard-coded-reference-to-gcc-E.patch \
+ file://0026-reset-dl_load_write_lock-after-forking.patch \
+ file://0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch \
+ file://0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \
+ file://0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch \
+ file://0030-plural_c_no_preprocessor_lines.patch \
+"
+
+NATIVESDKFIXES ?= ""
+NATIVESDKFIXES_class-nativesdk = "\
+ file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \
+ file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \
+ file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
+ file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \
+ file://relocate-locales.patch \
+ file://0031-nativesdk-deprecate-libcrypt.patch \
+"
+
+S = "${WORKDIR}/git"
+B = "${WORKDIR}/build-${TARGET_SYS}"
+
+PACKAGES_DYNAMIC = ""
+
+# the -isystem in bitbake.conf screws up glibc do_stage
+BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
+TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
+
+GLIBC_BROKEN_LOCALES = ""
+#
+# We will skip parsing glibc when target system C library selection is not glibc
+# this helps in easing out parsing for non-glibc system libraries
+#
+COMPATIBLE_HOST_libc-musl_class-target = "null"
+
+GLIBCPIE ??= ""
+
+EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
+ --without-cvs --disable-profile \
+ --disable-debug --without-gd \
+ --enable-clocale=gnu \
+ --enable-add-ons=libidn \
+ --with-headers=${STAGING_INCDIR} \
+ --without-selinux \
+ --enable-obsolete-rpc \
+ --enable-obsolete-nsl \
+ --enable-tunables \
+ --enable-bind-now \
+ --enable-stack-protector=strong \
+ --enable-stackguard-randomization \
+ ${GLIBCPIE} \
+ ${GLIBC_EXTRA_OECONF}"
+
+EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', '--enable-nscd', '--disable-nscd', d)}"
+
+
+do_patch_append() {
+ bb.build.exec_func('do_fix_readlib_c', d)
+}
+
+do_fix_readlib_c () {
+ sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
+}
+
+do_configure () {
+# override this function to avoid the autoconf/automake/aclocal/autoheader
+# calls for now
+# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
+# version check and doesn't really help with anything
+ (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
+ find ${S} -name "configure" | xargs touch
+ CPPFLAGS="" oe_runconf
+}
+
+rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
+ yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
+ rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
+
+do_compile () {
+ # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
+ unset LDFLAGS
+ base_do_compile
+ (
+ cd ${S}/sunrpc/rpcsvc
+ for r in ${rpcsvc}; do
+ h=`echo $r|sed -e's,\.x$,.h,'`
+ rm -f $h
+ ${B}/sunrpc/cross-rpcgen -h $r -o $h || bbwarn "${PN}: unable to generate header for $r"
+ done
+ )
+ echo "Adjust ldd script"
+ if [ -n "${RTLDLIST}" ]
+ then
+ prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
+ if [ "${prevrtld}" != "${RTLDLIST}" ]
+ then
+ sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
+ fi
+ fi
+
+}
+
+require glibc-package.inc
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/site_config/headers b/import-layers/yocto-poky/meta/recipes-core/glibc/site_config/headers
index 609ab53..69fedea 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/site_config/headers
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/site_config/headers
@@ -9,7 +9,6 @@
asm/types.h
assert.h
byteswap.h
-crypt.h
ctype.h
dirent.h
dlfcn.h
diff --git a/import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb b/import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb
index 5654528..e9f3a2a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb
@@ -6,7 +6,7 @@
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-SRC_URI = "git://anonscm.debian.org/git/collab-maint/ifupdown.git \
+SRC_URI = "git://salsa.debian.org/debian/ifupdown.git;protocol=https \
file://defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch \
file://inet-6-.defn-fix-inverted-checks-for-loopback.patch \
file://99_network \
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb
index bd441ae..db2f58d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb
@@ -22,8 +22,8 @@
inherit core-image module-base setuptools3
-SRCREV ?= "a9588646fcec17e53199e1ea7e7b8dccf140817e"
-SRC_URI = "git://git.yoctoproject.org/poky;branch=rocko \
+SRCREV ?= "14d62d5c14e3552f2aeabdbd80d1504bb2c6ed64"
+SRC_URI = "git://git.yoctoproject.org/poky;branch=sumo \
file://Yocto_Build_Appliance.vmx \
file://Yocto_Build_Appliance.vmxf \
file://README_VirtualBox_Guest_Additions.txt \
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb b/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb
index c446e87..6de860e 100644
--- a/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb
@@ -3,7 +3,15 @@
the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
first 'init' program more efficiently."
-PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install initramfs-live-install-efi ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
+INITRAMFS_SCRIPTS ?= "\
+ initramfs-framework-base \
+ initramfs-module-setup-live \
+ initramfs-module-udev \
+ initramfs-module-install \
+ initramfs-module-install-efi \
+ "
+
+PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
# Do not pollute the initrd image with rootfs features
IMAGE_FEATURES = ""
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/core-image-tiny-initramfs.bb b/import-layers/yocto-poky/meta/recipes-core/images/core-image-tiny-initramfs.bb
index 16995e6..51d08a0 100644
--- a/import-layers/yocto-poky/meta/recipes-core/images/core-image-tiny-initramfs.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/images/core-image-tiny-initramfs.bb
@@ -5,7 +5,7 @@
actually generate an image but rather generates boot and rootfs artifacts \
that can subsequently be picked up by external image generation tools such as wic."
-PACKAGE_INSTALL = "initramfs-live-boot packagegroup-core-boot dropbear ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
+PACKAGE_INSTALL = "initramfs-live-boot-tiny packagegroup-core-boot dropbear ${VIRTUAL-RUNTIME_base-utils} ${VIRTUAL-RUNTIME_dev_manager} base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
# Do not pollute the initrd image with rootfs features
IMAGE_FEATURES = ""
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 706418f..82b0aa8 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -8,8 +8,19 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
-# We need 20 Mb for the boot partition
-boot_size=20
+# figure out how big of a boot partition we need
+boot_size=$(du -ms /run/media/$1/ | awk '{print $1}')
+# remove rootfs.img ($2) from the size if it exists, as its not installed to /boot
+if [ -e /run/media/$1/$2 ]; then
+ boot_size=$(( boot_size - $( du -ms /run/media/$1/$2 | awk '{print $1}') ))
+fi
+# remove initrd from size since its not currently installed
+if [ -e /run/media/$1/initrd ]; then
+ boot_size=$(( boot_size - $( du -ms /run/media/$1/initrd | awk '{print $1}') ))
+fi
+# add 10M to provide some extra space for users and account
+# for rounding in the above subtractions
+boot_size=$(( boot_size + 10 ))
# 5% for swap
swap_ratio=5
@@ -179,7 +190,7 @@
parted ${device} set 1 boot on
echo "Creating rootfs partition on $rootfs"
-parted ${device} mkpart root ext3 $rootfs_start $rootfs_end
+parted ${device} mkpart root ext4 $rootfs_start $rootfs_end
echo "Creating swap partition on $swap"
parted ${device} mkpart swap linux-swap $swap_start 100%
@@ -196,8 +207,8 @@
echo "Formatting $bootfs to vfat..."
mkfs.vfat $bootfs
-echo "Formatting $rootfs to ext3..."
-mkfs.ext3 $rootfs
+echo "Formatting $rootfs to ext4..."
+mkfs.ext4 $rootfs
echo "Formatting swap partition...($swap)"
mkswap $swap
@@ -244,10 +255,9 @@
sed -i "/initrd /d" $GRUBCFG
# Delete any LABEL= strings
sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG
- # Delete any root= strings
- sed -i "s/ root=[^ ]*/ /g" $GRUBCFG
- # Add the root= and other standard boot options
- sed -i "s@linux /vmlinuz *@linux /vmlinuz root=PARTUUID=$root_part_uuid rw $rootwait quiet @" $GRUBCFG
+ # Replace root= and add additional standard boot options
+ # We use root as a sentinel value, as vmlinuz is no longer guaranteed
+ sed -i "s/ root=[^ ]*/ root=PARTUUID=$root_part_uuid rw $rootwait quiet /g" $GRUBCFG
fi
if [ -d /run/media/$1/loader ]; then
@@ -269,7 +279,13 @@
umount /tgt_root
-cp /run/media/$1/vmlinuz /boot
+# Copy kernel artifacts. To add more artifacts just add to types
+# For now just support kernel types already being used by something in OE-core
+for types in bzImage zImage vmlinux vmlinuz fitImage; do
+ for kernel in `find /run/media/$1/ -name $types*`; do
+ cp $kernel /boot
+ done
+done
umount /boot
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh
index dade059..28e8f09 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -7,8 +7,19 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
-# We need 20 Mb for the boot partition
-boot_size=20
+# figure out how big of a boot partition we need
+boot_size=$(du -ms /run/media/$1/ | awk '{print $1}')
+# remove rootfs.img ($2) from the size if it exists, as its not installed to /boot
+if [ -e /run/media/$1/$2 ]; then
+ boot_size=$(( boot_size - $( du -ms /run/media/$1/$2 | awk '{print $1}') ))
+fi
+# remove initrd from size since its not currently installed
+if [ -e /run/media/$1/initrd ]; then
+ boot_size=$(( boot_size - $( du -ms /run/media/$1/initrd | awk '{print $1}') ))
+fi
+# add 10M to provide some extra space for users and account
+# for rounding in the above subtractions
+boot_size=$(( boot_size + 10 ))
# 5% for the swap
swap_ratio=5
@@ -203,7 +214,7 @@
echo "Creating rootfs partition on $rootfs"
[ $grub_version -eq 0 ] && pname='primary' || pname='root'
-parted ${device} mkpart $pname ext3 $rootfs_start $rootfs_end
+parted ${device} mkpart $pname ext4 $rootfs_start $rootfs_end
echo "Creating swap partition on $swap"
[ $grub_version -eq 0 ] && pname='primary' || pname='swap'
@@ -221,8 +232,8 @@
echo "Formatting $bootfs to ext3..."
mkfs.ext3 $bootfs
-echo "Formatting $rootfs to ext3..."
-mkfs.ext3 $rootfs
+echo "Formatting $rootfs to ext4..."
+mkfs.ext4 $rootfs
echo "Formatting swap partition...($swap)"
mkswap $swap
@@ -256,9 +267,34 @@
umount /tgt_root
umount /src_root
+echo "Looking for kernels to use as boot target.."
+# Find kernel to boot to
+# Give user options if multiple are found
+kernels="$(find /run/media/$1/ -type f \
+ -name bzImage* -o -name zImage* \
+ -o -name vmlinux* -o -name vmlinuz* \
+ -o -name fitImage* \
+ | sed s:.*/::)"
+if [ -n "$(echo $kernels)" ]; then
+ # only one kernel entry if no space
+ if [ -z "$(echo $kernels | grep " ")" ]; then
+ kernel=$kernels
+ echo "$kernel will be used as the boot target"
+ else
+ echo "Which kernel do we want to boot by default? The following kernels were found:"
+ echo $kernels
+ read answer
+ kernel=$answer
+ fi
+else
+ echo "No kernels found, exiting..."
+ exit 1
+fi
+
# Handling of the target boot partition
mount $bootfs /boot
echo "Preparing boot partition..."
+
if [ -f /etc/grub.d/00_header -a $grub_version -ne 0 ] ; then
echo "Preparing custom grub2 menu..."
root_part_uuid=$(blkid -o value -s PARTUUID ${rootfs})
@@ -268,7 +304,7 @@
cat >$GRUBCFG <<_EOF
menuentry "Linux" {
search --no-floppy --fs-uuid $boot_uuid --set root
- linux /vmlinuz root=PARTUUID=$root_part_uuid $rootwait rw $5 $3 $4 quiet
+ linux /$kernel root=PARTUUID=$root_part_uuid $rootwait rw $5 $3 $4 quiet
}
_EOF
chmod 0444 $GRUBCFG
@@ -282,10 +318,16 @@
echo "timeout 30" >> /boot/grub/menu.lst
echo "title Live Boot/Install-Image" >> /boot/grub/menu.lst
echo "root (hd0,0)" >> /boot/grub/menu.lst
- echo "kernel /vmlinuz root=$rootfs rw $3 $4 quiet" >> /boot/grub/menu.lst
+ echo "kernel /$kernel root=$rootfs rw $3 $4 quiet" >> /boot/grub/menu.lst
fi
-cp /run/media/$1/vmlinuz /boot/
+# Copy kernel artifacts. To add more artifacts just add to types
+# For now just support kernel types already being used by something in OE-core
+for types in bzImage zImage vmlinux vmlinuz fitImage; do
+ for kernel in `find /run/media/$1/ -name $types*`; do
+ cp $kernel /boot
+ done
+done
umount /boot
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/exec b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/exec
new file mode 100644
index 0000000..a8e2432
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/exec
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Copyright (C) 2017 O.S. Systems Software LTDA.
+# Licensed on MIT
+
+EXEC_DIR=/exec.d # place to look for modules
+
+exec_enabled() {
+ return 0
+}
+
+exec_run() {
+ if [ ! -d $EXEC_DIR ]; then
+ msg "No contents to exec in $EXEC_DIR. Starting shell ..."
+ sh
+ fi
+
+ # Load and run modules
+ for m in $EXEC_DIR/*; do
+ # Skip backup files
+ if [ "`echo $m | sed -e 's/\~$//'`" != "$m" ]; then
+ continue
+ fi
+
+ debug "Starting $m"
+
+ # process module
+ ./$m
+ done
+}
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
index 14768f1..76fa84d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
@@ -31,6 +31,11 @@
bootparam_root="/dev/disk/by-partuuid/$root_uuid"
fi
+ if [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then
+ root_label=`echo $bootparam_root | cut -c7-`
+ bootparam_root="/dev/disk/by-label/$root_label"
+ fi
+
if [ -e "$bootparam_root" ]; then
flags=""
if [ -n "$bootparam_ro" ] && ! echo "$bootparam_rootflags" | grep -w -q "ro"; then
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
index 2afc37e..75d965f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
@@ -8,6 +8,7 @@
inherit allarch
SRC_URI = "file://init \
+ file://exec \
file://rootfs \
file://finish \
file://mdev \
@@ -26,6 +27,9 @@
install -m 0755 ${WORKDIR}/rootfs ${D}/init.d/90-rootfs
install -m 0755 ${WORKDIR}/finish ${D}/init.d/99-finish
+ # exec
+ install -m 0755 ${WORKDIR}/exec ${D}/init.d/89-exec
+
# mdev
install -m 0755 ${WORKDIR}/mdev ${D}/init.d/01-mdev
@@ -45,6 +49,7 @@
}
PACKAGES = "${PN}-base \
+ initramfs-module-exec \
initramfs-module-mdev \
initramfs-module-udev \
initramfs-module-e2fs \
@@ -62,6 +67,10 @@
# and mounts the rootfs. Then 90-rootfs will proceed immediately.
RRECOMMENDS_${PN}-base += "initramfs-module-rootfs"
+SUMMARY_initramfs-module-exec = "initramfs support for easy execution of applications"
+RDEPENDS_initramfs-module-exec = "${PN}-base"
+FILES_initramfs-module-exec = "/init.d/89-exec"
+
SUMMARY_initramfs-module-mdev = "initramfs support for mdev"
RDEPENDS_initramfs-module-mdev = "${PN}-base busybox-mdev"
FILES_initramfs-module-mdev = "/init.d/01-mdev"
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb
new file mode 100644
index 0000000..7a9a8ec
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Live image init script"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+DEPENDS = "virtual/kernel"
+RDEPENDS_${PN} = "busybox-mdev"
+SRC_URI = "file://init-live.sh"
+
+PR = "r12"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -m 0755 ${WORKDIR}/init-live.sh ${D}/init
+ install -d ${D}/dev
+ mknod -m 622 ${D}/dev/console c 5 1
+}
+
+FILES_${PN} += " /init /dev "
+
+# Due to kernel dependency
+PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
index 2a7f84d..f588a10 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
@@ -5,7 +5,7 @@
PR = "r1"
-RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools util-linux-blkid"
+RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
S = "${WORKDIR}"
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
index a553a0d..9222d57 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
@@ -7,7 +7,7 @@
S = "${WORKDIR}"
-RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs util-linux-blkid"
+RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
do_install() {
install -m 0755 ${WORKDIR}/init-install.sh ${D}/install.sh
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb
index 1e7f76f..78a61cd 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb
@@ -1,7 +1,7 @@
SUMMARY = "initramfs-framework module for EFI installation option"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-RDEPENDS_${PN} = "initramfs-framework-base parted e2fsprogs-mke2fs dosfstools util-linux-blkid"
+RDEPENDS_${PN} = "initramfs-framework-base parted e2fsprogs-mke2fs dosfstools util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
PR = "r4"
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb
index 02b69f3..04e90cd 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb
@@ -1,7 +1,7 @@
SUMMARY = "initramfs-framework module for installation option"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-RDEPENDS_${PN} = "initramfs-framework-base grub parted e2fsprogs-mke2fs util-linux-blkid"
+RDEPENDS_${PN} = "initramfs-framework-base grub parted e2fsprogs-mke2fs util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
# The same restriction as grub
COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
diff --git a/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
index 27d6f42..a9a3ab8 100644
--- a/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
@@ -13,10 +13,10 @@
Signed-off-by: Kai Kang <kai.kang@windriver.com>
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 1976333..b36aef3 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
+Index: kbd-2.0.4/tests/Makefile.am
+===================================================================
+--- kbd-2.0.4.orig/tests/Makefile.am
++++ kbd-2.0.4/tests/Makefile.am
@@ -1,7 +1,7 @@
AM_CPPFLAGS = \
-I$(srcdir)/../src/libkeymap \
@@ -25,11 +25,11 @@
+ -DDATADIR=\".\" -DBUILDDIR=\"$(builddir)\"
AM_CFLAGS = $(CHECK_CFLAGS)
- LDADD = $(top_builddir)/src/libkeymap/libkeymap.la $(CHECK_LIBS)
-diff --git a/tests/alt-is-meta.in b/tests/alt-is-meta.in
-index ddd5ed8..772fb51 100755
---- a/tests/alt-is-meta.in
-+++ b/tests/alt-is-meta.in
+ LDADD = $(top_builddir)/src/libkeymap/libkeymap.la $(CHECK_LIBS) @INTLLIBS@
+Index: kbd-2.0.4/tests/alt-is-meta.in
+===================================================================
+--- kbd-2.0.4.orig/tests/alt-is-meta.in
++++ kbd-2.0.4/tests/alt-is-meta.in
@@ -7,8 +7,8 @@ cd "$cwd"
rc=0
temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")"
@@ -41,10 +41,10 @@
if [ "$rc" != 0 ]; then
printf 'failed\n'
-diff --git a/tests/dumpkeys-fulltable.in b/tests/dumpkeys-fulltable.in
-index 7c856e5..14d92c1 100755
---- a/tests/dumpkeys-fulltable.in
-+++ b/tests/dumpkeys-fulltable.in
+Index: kbd-2.0.4/tests/dumpkeys-fulltable.in
+===================================================================
+--- kbd-2.0.4.orig/tests/dumpkeys-fulltable.in
++++ kbd-2.0.4/tests/dumpkeys-fulltable.in
@@ -5,7 +5,7 @@ cwd="$(readlink -ev "${0%/*}")"
cd "$cwd"
diff --git a/import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.4.bb b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.4.bb
index 423b47a..4af3256 100644
--- a/import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.4.bb
@@ -3,7 +3,6 @@
# everything minus console-fonts is GPLv2+
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=a5fcc36121d93e1f69d96a313078c8b5"
-DEPENDS = "libcheck"
inherit autotools gettext ptest pkgconfig
@@ -19,8 +18,12 @@
SRC_URI[md5sum] = "c1635a5a83b63aca7f97a3eab39ebaa6"
SRC_URI[sha256sum] = "5fd90af6beb225a9bb9b9fb414c090fba53c9a55793e172f508cd43652e59a88"
-PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
+ ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests','', d)} \
+ "
+
PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam,"
+PACKAGECONFIG[tests] = "--enable-tests, --disable-tests, libcheck"
do_compile_ptest() {
oe_runmake -C ${B}/tests dumpkeys-fulltable alt-is-meta
@@ -29,6 +32,13 @@
do_install_ptest() {
install -D ${B}/tests/Makefile ${D}${PTEST_PATH}/tests/Makefile
sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \
+ -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
+ -e 's:${DEBUG_PREFIX_MAP}::g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ -e 's:${S}/config/missing::g' \
+ -e 's:${WORKDIR}::g' \
-e '/libkeymap_.*_SOURCES =/d' -e '/$(EXEEXT):/,/^$/d' ${D}${PTEST_PATH}/tests/Makefile
find ${B}/tests -executable -exec install {} ${D}${PTEST_PATH}/tests \;
@@ -48,7 +58,7 @@
inherit update-alternatives
-ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt"
+ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt showkey"
ALTERNATIVE_PRIORITY = "100"
BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb b/import-layers/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb
index e4b1782..7ddc81e 100644
--- a/import-layers/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb
@@ -9,7 +9,7 @@
inherit autotools pkgconfig
-DEPENDS = "bison-native flex-native ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+DEPENDS = "bison-native flex-native"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/libcg/${BPN}/v0.41/${BPN}-${PV}.tar.bz2"
SRC_URI_append_libc-musl = " file://musl-decls-compat.patch"
@@ -20,9 +20,10 @@
UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libcg/files/libcgroup/"
DEPENDS_append_libc-musl = " fts "
-EXTRA_OEMAKE_append_libc-musl = "LIBS=-lfts"
+EXTRA_OEMAKE_append_libc-musl = " LIBS=-lfts"
-EXTRA_OECONF = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam-module-dir=${base_libdir}/security --enable-pam=yes', '--enable-pam=no', d)}"
+PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
+PACKAGECONFIG[pam] = "--enable-pam-module-dir=${base_libdir}/security --enable-pam=yes,--enable-pam=no,libpam"
PACKAGES =+ "cgroups-pam-plugin"
FILES_cgroups-pam-plugin = "${base_libdir}/security/pam_cgroup.so*"
@@ -33,8 +34,8 @@
if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
mkdir -p ${D}/${base_libdir}/
mv -f ${D}${libdir}/libcgroup.so.* ${D}${base_libdir}/
- rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
- ln -sf ${rel_lib_prefix}${base_libdir}/libcgroup.so.1 ${D}${libdir}/libcgroup.so
+ rm -f ${D}${libdir}/libcgroup.so
+ lnr ${D}${base_libdir}/libcgroup.so.1 ${D}${libdir}/libcgroup.so
fi
# pam modules in ${base_libdir}/security/ should be binary .so files, not symlinks.
if [ -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0 ]; then
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxcrypt/libxcrypt_4.0.1.bb b/import-layers/yocto-poky/meta/recipes-core/libxcrypt/libxcrypt_4.0.1.bb
new file mode 100644
index 0000000..6ed67a6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/libxcrypt/libxcrypt_4.0.1.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Extended cryptographic library (from glibc)"
+DESCRIPTION = "Forked code from glibc libary to extract only crypto part."
+HOMEPAGE = "https://github.com/besser82/libxcrypt"
+SECTION = "libs"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM ?= "file://LICENSING;md5=d1cc18f512ded3bd6000f3729f31be08 \
+ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
+"
+
+inherit autotools
+
+SRCREV ?= "089479bb24acd168613757a6f12d63caa95416b4"
+SRCBRANCH ?= "master"
+
+SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH} \
+ "
+
+PROVIDES = "virtual/crypt"
+
+FILES_${PN} = "${libdir}/libcrypt*.so.* ${libdir}/libcrypt-*.so ${libdir}/libowcrypt*.so.* ${libdir}/libowcrypt-*.so"
+
+S = "${WORKDIR}/git"
+
+BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE} -std=gnu99"
+TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
+
+python () {
+ if not bb.data.inherits_class('nativesdk', d):
+ raise bb.parse.SkipRecipe("Recipe only applies in nativesdk case for now")
+}
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
index d1ad551..2b92dbc 100644
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
@@ -15,12 +15,12 @@
python/tests/tstLastError.py | 2 +-
4 files changed, 21 insertions(+), 4 deletions(-)
-diff --git a/Makefile.am b/Makefile.am
-index e181ee0..7960e7d 100644
---- a/Makefile.am
-+++ b/Makefile.am
+Index: libxml2-2.9.7/Makefile.am
+===================================================================
+--- libxml2-2.9.7.orig/Makefile.am
++++ libxml2-2.9.7/Makefile.am
@@ -207,9 +207,9 @@ install-ptest:
- install $(noinst_PROGRAMS) $(DESTDIR))
+ install $(check_PROGRAMS) $(DESTDIR))
cp -r $(srcdir)/test $(DESTDIR)
cp -r $(srcdir)/result $(DESTDIR)
- cp -r $(srcdir)/python $(DESTDIR)
@@ -28,13 +28,13 @@
sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
+ $(MAKE) -C python install-ptest
- runtests:
- [ -d test ] || $(LN_S) $(srcdir)/test .
-diff --git a/python/Makefile.am b/python/Makefile.am
-index 34aed96..ba3ec6a 100644
---- a/python/Makefile.am
-+++ b/python/Makefile.am
-@@ -48,7 +48,16 @@ GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES)
+ runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
+ testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
+Index: libxml2-2.9.7/python/Makefile.am
+===================================================================
+--- libxml2-2.9.7.orig/python/Makefile.am
++++ libxml2-2.9.7/python/Makefile.am
+@@ -48,7 +48,16 @@ GENERATED = libxml2class.py libxml2class
$(GENERATED): $(srcdir)/generator.py $(API_DESC)
$(PYTHON) $(srcdir)/generator.py $(srcdir)
@@ -51,10 +51,10 @@
+.PHONY: tests test
tests test: all
cd tests && $(MAKE) tests
-diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
-index 95ebead..418e21e 100644
---- a/python/tests/Makefile.am
-+++ b/python/tests/Makefile.am
+Index: libxml2-2.9.7/python/tests/Makefile.am
+===================================================================
+--- libxml2-2.9.7.orig/python/tests/Makefile.am
++++ libxml2-2.9.7/python/tests/Makefile.am
@@ -59,6 +59,11 @@ XMLS= \
CLEANFILES = core tmp.xml *.pyc
@@ -81,10 +81,10 @@
+
tests:
endif
-diff --git a/python/tests/tstLastError.py b/python/tests/tstLastError.py
-index d5f9be7..3e5bef8 100755
---- a/python/tests/tstLastError.py
-+++ b/python/tests/tstLastError.py
+Index: libxml2-2.9.7/python/tests/tstLastError.py
+===================================================================
+--- libxml2-2.9.7.orig/python/tests/tstLastError.py
++++ libxml2-2.9.7/python/tests/tstLastError.py
@@ -25,7 +25,7 @@ class TestCase(unittest.TestCase):
when the exception is raised, check the libxml2.lastError for
expected values."""
@@ -94,6 +94,3 @@
try:
f(*args)
except exc:
---
-2.12.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch
new file mode 100644
index 0000000..51a9e19
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch
@@ -0,0 +1,21 @@
+Make sure that Makefile doesn't try to compile these tests again
+on the target where the source dependencies won't be available.
+
+Upstream-Status: Inappropriate [cross-compile specific]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+
+Index: libxml2-2.9.7/Makefile.am
+===================================================================
+--- libxml2-2.9.7.orig/Makefile.am
++++ libxml2-2.9.7/Makefile.am
+@@ -211,8 +211,7 @@ install-ptest:
+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
+ $(MAKE) -C python install-ptest
+
+-runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
+- testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
++runtests:
+ [ -d test ] || $(LN_S) $(srcdir)/test .
+ [ -d result ] || $(LN_S) $(srcdir)/result .
+ $(CHECKER) ./runtest$(EXEEXT) && \
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
index 3277165..d9ed151 100644
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
@@ -183,7 +183,7 @@
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
-- echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
+- echo "*** exact error that occurred. This usually means LIBXML was incorrectly installed"
- echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
- echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
- CPPFLAGS="$ac_save_CPPFLAGS"
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-4658.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-4658.patch
deleted file mode 100644
index bb55eed..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-4658.patch
+++ /dev/null
@@ -1,269 +0,0 @@
-libxml2-2.9.4: Fix CVE-2016-4658
-
-[No upstream tracking] -- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2016-4658
-
-xpointer: Disallow namespace nodes in XPointer points and ranges
-
-Namespace nodes must be copied to avoid use-after-free errors.
-But they don't necessarily have a physical representation in a
-document, so simply disallow them in XPointer ranges.
-
-Upstream-Status: Backport
- - [https://git.gnome.org/browse/libxml2/commit/?id=c1d1f7121194036608bf555f08d3062a36fd344b]
- - [https://git.gnome.org/browse/libxml2/commit/?id=3f8a91036d338e51c059d54397a42d645f019c65]
-CVE: CVE-2016-4658
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
-
-diff --git a/xpointer.c b/xpointer.c
-index 676c510..911680d 100644
---- a/xpointer.c
-+++ b/xpointer.c
-@@ -320,6 +320,45 @@ xmlXPtrRangesEqual(xmlXPathObjectPtr range1, xmlXPathObjectPtr range2) {
- }
-
- /**
-+ * xmlXPtrNewRangeInternal:
-+ * @start: the starting node
-+ * @startindex: the start index
-+ * @end: the ending point
-+ * @endindex: the ending index
-+ *
-+ * Internal function to create a new xmlXPathObjectPtr of type range
-+ *
-+ * Returns the newly created object.
-+ */
-+static xmlXPathObjectPtr
-+xmlXPtrNewRangeInternal(xmlNodePtr start, int startindex,
-+ xmlNodePtr end, int endindex) {
-+ xmlXPathObjectPtr ret;
-+
-+ /*
-+ * Namespace nodes must be copied (see xmlXPathNodeSetDupNs).
-+ * Disallow them for now.
-+ */
-+ if ((start != NULL) && (start->type == XML_NAMESPACE_DECL))
-+ return(NULL);
-+ if ((end != NULL) && (end->type == XML_NAMESPACE_DECL))
-+ return(NULL);
-+
-+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
-+ if (ret == NULL) {
-+ xmlXPtrErrMemory("allocating range");
-+ return(NULL);
-+ }
-+ memset(ret, 0, sizeof(xmlXPathObject));
-+ ret->type = XPATH_RANGE;
-+ ret->user = start;
-+ ret->index = startindex;
-+ ret->user2 = end;
-+ ret->index2 = endindex;
-+ return(ret);
-+}
-+
-+/**
- * xmlXPtrNewRange:
- * @start: the starting node
- * @startindex: the start index
-@@ -344,17 +383,7 @@ xmlXPtrNewRange(xmlNodePtr start, int startindex,
- if (endindex < 0)
- return(NULL);
-
-- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
-- if (ret == NULL) {
-- xmlXPtrErrMemory("allocating range");
-- return(NULL);
-- }
-- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
-- ret->type = XPATH_RANGE;
-- ret->user = start;
-- ret->index = startindex;
-- ret->user2 = end;
-- ret->index2 = endindex;
-+ ret = xmlXPtrNewRangeInternal(start, startindex, end, endindex);
- xmlXPtrRangeCheckOrder(ret);
- return(ret);
- }
-@@ -381,17 +410,8 @@ xmlXPtrNewRangePoints(xmlXPathObjectPtr start, xmlXPathObjectPtr end) {
- if (end->type != XPATH_POINT)
- return(NULL);
-
-- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
-- if (ret == NULL) {
-- xmlXPtrErrMemory("allocating range");
-- return(NULL);
-- }
-- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
-- ret->type = XPATH_RANGE;
-- ret->user = start->user;
-- ret->index = start->index;
-- ret->user2 = end->user;
-- ret->index2 = end->index;
-+ ret = xmlXPtrNewRangeInternal(start->user, start->index, end->user,
-+ end->index);
- xmlXPtrRangeCheckOrder(ret);
- return(ret);
- }
-@@ -416,17 +436,7 @@ xmlXPtrNewRangePointNode(xmlXPathObjectPtr start, xmlNodePtr end) {
- if (start->type != XPATH_POINT)
- return(NULL);
-
-- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
-- if (ret == NULL) {
-- xmlXPtrErrMemory("allocating range");
-- return(NULL);
-- }
-- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
-- ret->type = XPATH_RANGE;
-- ret->user = start->user;
-- ret->index = start->index;
-- ret->user2 = end;
-- ret->index2 = -1;
-+ ret = xmlXPtrNewRangeInternal(start->user, start->index, end, -1);
- xmlXPtrRangeCheckOrder(ret);
- return(ret);
- }
-@@ -453,17 +463,7 @@ xmlXPtrNewRangeNodePoint(xmlNodePtr start, xmlXPathObjectPtr end) {
- if (end->type != XPATH_POINT)
- return(NULL);
-
-- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
-- if (ret == NULL) {
-- xmlXPtrErrMemory("allocating range");
-- return(NULL);
-- }
-- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
-- ret->type = XPATH_RANGE;
-- ret->user = start;
-- ret->index = -1;
-- ret->user2 = end->user;
-- ret->index2 = end->index;
-+ ret = xmlXPtrNewRangeInternal(start, -1, end->user, end->index);
- xmlXPtrRangeCheckOrder(ret);
- return(ret);
- }
-@@ -486,17 +486,7 @@ xmlXPtrNewRangeNodes(xmlNodePtr start, xmlNodePtr end) {
- if (end == NULL)
- return(NULL);
-
-- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
-- if (ret == NULL) {
-- xmlXPtrErrMemory("allocating range");
-- return(NULL);
-- }
-- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
-- ret->type = XPATH_RANGE;
-- ret->user = start;
-- ret->index = -1;
-- ret->user2 = end;
-- ret->index2 = -1;
-+ ret = xmlXPtrNewRangeInternal(start, -1, end, -1);
- xmlXPtrRangeCheckOrder(ret);
- return(ret);
- }
-@@ -516,17 +506,7 @@ xmlXPtrNewCollapsedRange(xmlNodePtr start) {
- if (start == NULL)
- return(NULL);
-
-- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
-- if (ret == NULL) {
-- xmlXPtrErrMemory("allocating range");
-- return(NULL);
-- }
-- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
-- ret->type = XPATH_RANGE;
-- ret->user = start;
-- ret->index = -1;
-- ret->user2 = NULL;
-- ret->index2 = -1;
-+ ret = xmlXPtrNewRangeInternal(start, -1, NULL, -1);
- return(ret);
- }
-
-@@ -541,6 +521,8 @@ xmlXPtrNewCollapsedRange(xmlNodePtr start) {
- */
- xmlXPathObjectPtr
- xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
-+ xmlNodePtr endNode;
-+ int endIndex;
- xmlXPathObjectPtr ret;
-
- if (start == NULL)
-@@ -549,7 +531,12 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
- return(NULL);
- switch (end->type) {
- case XPATH_POINT:
-+ endNode = end->user;
-+ endIndex = end->index;
-+ break;
- case XPATH_RANGE:
-+ endNode = end->user2;
-+ endIndex = end->index2;
- break;
- case XPATH_NODESET:
- /*
-@@ -557,39 +544,15 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
- */
- if (end->nodesetval->nodeNr <= 0)
- return(NULL);
-+ endNode = end->nodesetval->nodeTab[end->nodesetval->nodeNr - 1];
-+ endIndex = -1;
- break;
- default:
- /* TODO */
- return(NULL);
- }
-
-- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
-- if (ret == NULL) {
-- xmlXPtrErrMemory("allocating range");
-- return(NULL);
-- }
-- memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
-- ret->type = XPATH_RANGE;
-- ret->user = start;
-- ret->index = -1;
-- switch (end->type) {
-- case XPATH_POINT:
-- ret->user2 = end->user;
-- ret->index2 = end->index;
-- break;
-- case XPATH_RANGE:
-- ret->user2 = end->user2;
-- ret->index2 = end->index2;
-- break;
-- case XPATH_NODESET: {
-- ret->user2 = end->nodesetval->nodeTab[end->nodesetval->nodeNr - 1];
-- ret->index2 = -1;
-- break;
-- }
-- default:
-- STRANGE
-- return(NULL);
-- }
-+ ret = xmlXPtrNewRangeInternal(start, -1, endNode, endIndex);
- xmlXPtrRangeCheckOrder(ret);
- return(ret);
- }
-@@ -1835,8 +1798,8 @@ xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
- case XPATH_RANGE: {
- xmlNodePtr node = tmp->user;
- if (node != NULL) {
-- if (node->type == XML_ATTRIBUTE_NODE) {
-- /* TODO: Namespace Nodes ??? */
-+ if ((node->type == XML_ATTRIBUTE_NODE) ||
-+ (node->type == XML_NAMESPACE_DECL)) {
- xmlXPathFreeObject(obj);
- xmlXPtrFreeLocationSet(newset);
- XP_ERROR(XPTR_SYNTAX_ERROR);
-@@ -1931,8 +1894,8 @@ xmlXPtrEndPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
- case XPATH_RANGE: {
- xmlNodePtr node = tmp->user2;
- if (node != NULL) {
-- if (node->type == XML_ATTRIBUTE_NODE) {
-- /* TODO: Namespace Nodes ??? */
-+ if ((node->type == XML_ATTRIBUTE_NODE) ||
-+ (node->type == XML_NAMESPACE_DECL)) {
- xmlXPathFreeObject(obj);
- xmlXPtrFreeLocationSet(newset);
- XP_ERROR(XPTR_SYNTAX_ERROR);
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-5131.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-5131.patch
deleted file mode 100644
index 9d47d02..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-5131.patch
+++ /dev/null
@@ -1,180 +0,0 @@
-From 9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Tue, 28 Jun 2016 14:22:23 +0200
-Subject: [PATCH] Fix XPointer paths beginning with range-to
-
-The old code would invoke the broken xmlXPtrRangeToFunction. range-to
-isn't really a function but a special kind of location step. Remove
-this function and always handle range-to in the XPath code.
-
-The old xmlXPtrRangeToFunction could also be abused to trigger a
-use-after-free error with the potential for remote code execution.
-
-Found with afl-fuzz.
-
-Fixes CVE-2016-5131.
-
-CVE: CVE-2016-5131
-Upstream-Status: Backport
-https://git.gnome.org/browse/libxml2/commit/?id=9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e
-
-Signed-off-by: Yi Zhao <yi.zhao@windirver.com>
----
- result/XPath/xptr/vidbase | 13 ++++++++
- test/XPath/xptr/vidbase | 1 +
- xpath.c | 7 ++++-
- xpointer.c | 76 ++++-------------------------------------------
- 4 files changed, 26 insertions(+), 71 deletions(-)
-
-diff --git a/result/XPath/xptr/vidbase b/result/XPath/xptr/vidbase
-index 8b9e92d..f19193e 100644
---- a/result/XPath/xptr/vidbase
-+++ b/result/XPath/xptr/vidbase
-@@ -17,3 +17,16 @@ Object is a Location Set:
- To node
- ELEMENT p
-
-+
-+========================
-+Expression: xpointer(range-to(id('chapter2')))
-+Object is a Location Set:
-+1 : Object is a range :
-+ From node
-+ /
-+ To node
-+ ELEMENT chapter
-+ ATTRIBUTE id
-+ TEXT
-+ content=chapter2
-+
-diff --git a/test/XPath/xptr/vidbase b/test/XPath/xptr/vidbase
-index b146383..884b106 100644
---- a/test/XPath/xptr/vidbase
-+++ b/test/XPath/xptr/vidbase
-@@ -1,2 +1,3 @@
- xpointer(id('chapter1')/p)
- xpointer(id('chapter1')/p[1]/range-to(following-sibling::p[2]))
-+xpointer(range-to(id('chapter2')))
-diff --git a/xpath.c b/xpath.c
-index d992841..5a01b1b 100644
---- a/xpath.c
-+++ b/xpath.c
-@@ -10691,13 +10691,18 @@ xmlXPathCompPathExpr(xmlXPathParserContextPtr ctxt) {
- lc = 1;
- break;
- } else if ((NXT(len) == '(')) {
-- /* Note Type or Function */
-+ /* Node Type or Function */
- if (xmlXPathIsNodeType(name)) {
- #ifdef DEBUG_STEP
- xmlGenericError(xmlGenericErrorContext,
- "PathExpr: Type search\n");
- #endif
- lc = 1;
-+#ifdef LIBXML_XPTR_ENABLED
-+ } else if (ctxt->xptr &&
-+ xmlStrEqual(name, BAD_CAST "range-to")) {
-+ lc = 1;
-+#endif
- } else {
- #ifdef DEBUG_STEP
- xmlGenericError(xmlGenericErrorContext,
-diff --git a/xpointer.c b/xpointer.c
-index 676c510..d74174a 100644
---- a/xpointer.c
-+++ b/xpointer.c
-@@ -1332,8 +1332,6 @@ xmlXPtrNewContext(xmlDocPtr doc, xmlNodePtr here, xmlNodePtr origin) {
- ret->here = here;
- ret->origin = origin;
-
-- xmlXPathRegisterFunc(ret, (xmlChar *)"range-to",
-- xmlXPtrRangeToFunction);
- xmlXPathRegisterFunc(ret, (xmlChar *)"range",
- xmlXPtrRangeFunction);
- xmlXPathRegisterFunc(ret, (xmlChar *)"range-inside",
-@@ -2243,76 +2241,14 @@ xmlXPtrRangeInsideFunction(xmlXPathParserContextPtr ctxt, int nargs) {
- * @nargs: the number of args
- *
- * Implement the range-to() XPointer function
-+ *
-+ * Obsolete. range-to is not a real function but a special type of location
-+ * step which is handled in xpath.c.
- */
- void
--xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs) {
-- xmlXPathObjectPtr range;
-- const xmlChar *cur;
-- xmlXPathObjectPtr res, obj;
-- xmlXPathObjectPtr tmp;
-- xmlLocationSetPtr newset = NULL;
-- xmlNodeSetPtr oldset;
-- int i;
--
-- if (ctxt == NULL) return;
-- CHECK_ARITY(1);
-- /*
-- * Save the expression pointer since we will have to evaluate
-- * it multiple times. Initialize the new set.
-- */
-- CHECK_TYPE(XPATH_NODESET);
-- obj = valuePop(ctxt);
-- oldset = obj->nodesetval;
-- ctxt->context->node = NULL;
--
-- cur = ctxt->cur;
-- newset = xmlXPtrLocationSetCreate(NULL);
--
-- for (i = 0; i < oldset->nodeNr; i++) {
-- ctxt->cur = cur;
--
-- /*
-- * Run the evaluation with a node list made of a single item
-- * in the nodeset.
-- */
-- ctxt->context->node = oldset->nodeTab[i];
-- tmp = xmlXPathNewNodeSet(ctxt->context->node);
-- valuePush(ctxt, tmp);
--
-- xmlXPathEvalExpr(ctxt);
-- CHECK_ERROR;
--
-- /*
-- * The result of the evaluation need to be tested to
-- * decided whether the filter succeeded or not
-- */
-- res = valuePop(ctxt);
-- range = xmlXPtrNewRangeNodeObject(oldset->nodeTab[i], res);
-- if (range != NULL) {
-- xmlXPtrLocationSetAdd(newset, range);
-- }
--
-- /*
-- * Cleanup
-- */
-- if (res != NULL)
-- xmlXPathFreeObject(res);
-- if (ctxt->value == tmp) {
-- res = valuePop(ctxt);
-- xmlXPathFreeObject(res);
-- }
--
-- ctxt->context->node = NULL;
-- }
--
-- /*
-- * The result is used as the new evaluation set.
-- */
-- xmlXPathFreeObject(obj);
-- ctxt->context->node = NULL;
-- ctxt->context->contextSize = -1;
-- ctxt->context->proximityPosition = -1;
-- valuePush(ctxt, xmlXPtrWrapLocationSet(newset));
-+xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt,
-+ int nargs ATTRIBUTE_UNUSED) {
-+ XP_ERROR(XPATH_EXPR_ERROR);
- }
-
- /**
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-0663.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-0663.patch
deleted file mode 100644
index 0108265..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-0663.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-libxml2: Fix CVE-2017-0663
-
-[No upstream tracking] -- https://bugzilla.gnome.org/show_bug.cgi?id=780228
-
-valid: Fix type confusion in xmlValidateOneNamespace
-
-Comment out code that casts xmlNsPtr to xmlAttrPtr. ID types
-on namespace declarations make no practical sense anyway.
-
-Fixes bug 780228
-
-Upstream-Status: Backport [https://git.gnome.org/browse/libxml2/commit/?id=92b9e8c8b3787068565a1820ba575d042f9eec66]
-CVE: CVE-2017-0663
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-
-diff --git a/valid.c b/valid.c
-index 19f84b8..e03d35e 100644
---- a/valid.c
-+++ b/valid.c
-@@ -4621,6 +4621,12 @@ xmlNodePtr elem, const xmlChar *prefix, xmlNsPtr ns, const xmlChar *value) {
- }
- }
-
-+ /*
-+ * Casting ns to xmlAttrPtr is wrong. We'd need separate functions
-+ * xmlAddID and xmlAddRef for namespace declarations, but it makes
-+ * no practical sense to use ID types anyway.
-+ */
-+#if 0
- /* Validity Constraint: ID uniqueness */
- if (attrDecl->atype == XML_ATTRIBUTE_ID) {
- if (xmlAddID(ctxt, doc, value, (xmlAttrPtr) ns) == NULL)
-@@ -4632,6 +4638,7 @@ xmlNodePtr elem, const xmlChar *prefix, xmlNsPtr ns, const xmlChar *value) {
- if (xmlAddRef(ctxt, doc, value, (xmlAttrPtr) ns) == NULL)
- ret = 0;
- }
-+#endif
-
- /* Validity Constraint: Notation Attributes */
- if (attrDecl->atype == XML_ATTRIBUTE_NOTATION) {
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-5969.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-5969.patch
deleted file mode 100644
index 571b05c..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-5969.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-libxml2-2.9.4: Fix CVE-2017-5969
-
-[No upstream tracking] -- https://bugzilla.gnome.org/show_bug.cgi?id=758422
-
-valid: Fix NULL pointer deref in xmlDumpElementContent
-
-Can only be triggered in recovery mode.
-
-Fixes bug 758422
-
-Upstream-Status: Backport - [https://git.gnome.org/browse/libxml2/commit/?id=94691dc884d1a8ada39f073408b4bb92fe7fe882]
-CVE: CVE-2017-5969
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-
-diff --git a/valid.c b/valid.c
-index 19f84b8..0a8e58a 100644
---- a/valid.c
-+++ b/valid.c
-@@ -1172,29 +1172,33 @@ xmlDumpElementContent(xmlBufferPtr buf, xmlElementContentPtr content, int glob)
- xmlBufferWriteCHAR(buf, content->name);
- break;
- case XML_ELEMENT_CONTENT_SEQ:
-- if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
-- (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
-+ if ((content->c1 != NULL) &&
-+ ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
-+ (content->c1->type == XML_ELEMENT_CONTENT_SEQ)))
- xmlDumpElementContent(buf, content->c1, 1);
- else
- xmlDumpElementContent(buf, content->c1, 0);
- xmlBufferWriteChar(buf, " , ");
-- if ((content->c2->type == XML_ELEMENT_CONTENT_OR) ||
-- ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) &&
-- (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE)))
-+ if ((content->c2 != NULL) &&
-+ ((content->c2->type == XML_ELEMENT_CONTENT_OR) ||
-+ ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) &&
-+ (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE))))
- xmlDumpElementContent(buf, content->c2, 1);
- else
- xmlDumpElementContent(buf, content->c2, 0);
- break;
- case XML_ELEMENT_CONTENT_OR:
-- if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
-- (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
-+ if ((content->c1 != NULL) &&
-+ ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
-+ (content->c1->type == XML_ELEMENT_CONTENT_SEQ)))
- xmlDumpElementContent(buf, content->c1, 1);
- else
- xmlDumpElementContent(buf, content->c1, 0);
- xmlBufferWriteChar(buf, " | ");
-- if ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) ||
-- ((content->c2->type == XML_ELEMENT_CONTENT_OR) &&
-- (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE)))
-+ if ((content->c2 != NULL) &&
-+ ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) ||
-+ ((content->c2->type == XML_ELEMENT_CONTENT_OR) &&
-+ (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE))))
- xmlDumpElementContent(buf, content->c2, 1);
- else
- xmlDumpElementContent(buf, content->c2, 0);
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-8872.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-8872.patch
deleted file mode 100644
index 26779aa..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-8872.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From d2f873a541c72b0f67e15562819bf98b884b30b7 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 23 Aug 2017 16:04:49 +0800
-Subject: [PATCH] fix CVE-2017-8872
-
-this makes xmlHaltParser "empty" the buffer, as it resets cur and ava
-il too here.
-
-this seems to cure this specific issue, and also passes the testsuite
-
-Signed-off-by: Marcus Meissner <meissner@suse.de>
-
-https://bugzilla.gnome.org/show_bug.cgi?id=775200
-Upstream-Status: Backport [https://bugzilla.gnome.org/attachment.cgi?id=355527&action=diff]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- parser.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/parser.c b/parser.c
-index 9506ead..6c07ffd 100644
---- a/parser.c
-+++ b/parser.c
-@@ -12664,6 +12664,10 @@ xmlHaltParser(xmlParserCtxtPtr ctxt) {
- }
- ctxt->input->cur = BAD_CAST"";
- ctxt->input->base = ctxt->input->cur;
-+ if (ctxt->input->buf) {
-+ xmlBufEmpty (ctxt->input->buf->buffer);
-+ } else
-+ ctxt->input->length = 0;
- }
- }
-
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9047_CVE-2017-9048.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9047_CVE-2017-9048.patch
deleted file mode 100644
index 8b03456..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9047_CVE-2017-9048.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-libxml2-2.9.4: Fix CVE-2017-9047 and CVE-2017-9048
-
-[No upstream tracking] -- https://bugzilla.gnome.org/show_bug.cgi?id=781333
- -- https://bugzilla.gnome.org/show_bug.cgi?id=781701
-
-valid: Fix buffer size checks in xmlSnprintfElementContent
-
-xmlSnprintfElementContent failed to correctly check the available
-buffer space in two locations.
-
-Fixes bug 781333 and bug 781701
-
-Upstream-Status: Backport [https://git.gnome.org/browse/libxml2/commit/?id=932cc9896ab41475d4aa429c27d9afd175959d74]
-CVE: CVE-2017-9047 CVE-2017-9048
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-
-diff --git a/result/valid/781333.xml b/result/valid/781333.xml
-new file mode 100644
-index 0000000..01baf11
---- /dev/null
-+++ b/result/valid/781333.xml
-@@ -0,0 +1,5 @@
-+<?xml version="1.0"?>
-+<!DOCTYPE a [
-+<!ELEMENT a (pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp:llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll)>
-+]>
-+<a/>
-diff --git a/result/valid/781333.xml.err b/result/valid/781333.xml.err
-new file mode 100644
-index 0000000..2176200
---- /dev/null
-+++ b/result/valid/781333.xml.err
-@@ -0,0 +1,3 @@
-+./test/valid/781333.xml:4: element a: validity error : Element a content does not follow the DTD, expecting ( ..., got
-+<a/>
-+ ^
-diff --git a/result/valid/781333.xml.err.rdr b/result/valid/781333.xml.err.rdr
-new file mode 100644
-index 0000000..1195a04
---- /dev/null
-+++ b/result/valid/781333.xml.err.rdr
-@@ -0,0 +1,6 @@
-+./test/valid/781333.xml:4: element a: validity error : Element a content does not follow the DTD, expecting ( ..., got
-+<a/>
-+ ^
-+./test/valid/781333.xml:5: element a: validity error : Element a content does not follow the DTD, Expecting more child
-+
-+^
-diff --git a/test/valid/781333.xml b/test/valid/781333.xml
-new file mode 100644
-index 0000000..bceac9c
---- /dev/null
-+++ b/test/valid/781333.xml
-@@ -0,0 +1,4 @@
-+<!DOCTYPE a [
-+ <!ELEMENT a (pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp:llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll)>
-+]>
-+<a/>
-diff --git a/valid.c b/valid.c
-index 19f84b8..aaa30f6 100644
---- a/valid.c
-+++ b/valid.c
-@@ -1262,22 +1262,23 @@ xmlSnprintfElementContent(char *buf, int size, xmlElementContentPtr content, int
- case XML_ELEMENT_CONTENT_PCDATA:
- strcat(buf, "#PCDATA");
- break;
-- case XML_ELEMENT_CONTENT_ELEMENT:
-+ case XML_ELEMENT_CONTENT_ELEMENT: {
-+ int qnameLen = xmlStrlen(content->name);
-+
-+ if (content->prefix != NULL)
-+ qnameLen += xmlStrlen(content->prefix) + 1;
-+ if (size - len < qnameLen + 10) {
-+ strcat(buf, " ...");
-+ return;
-+ }
- if (content->prefix != NULL) {
-- if (size - len < xmlStrlen(content->prefix) + 10) {
-- strcat(buf, " ...");
-- return;
-- }
- strcat(buf, (char *) content->prefix);
- strcat(buf, ":");
- }
-- if (size - len < xmlStrlen(content->name) + 10) {
-- strcat(buf, " ...");
-- return;
-- }
- if (content->name != NULL)
- strcat(buf, (char *) content->name);
- break;
-+ }
- case XML_ELEMENT_CONTENT_SEQ:
- if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
- (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
-@@ -1319,6 +1320,7 @@ xmlSnprintfElementContent(char *buf, int size, xmlElementContentPtr content, int
- xmlSnprintfElementContent(buf, size, content->c2, 0);
- break;
- }
-+ if (size - strlen(buf) <= 2) return;
- if (englob)
- strcat(buf, ")");
- switch (content->ocur) {
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9049_CVE-2017-9050.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9049_CVE-2017-9050.patch
deleted file mode 100644
index 591075d..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9049_CVE-2017-9050.patch
+++ /dev/null
@@ -1,291 +0,0 @@
-libxml2-2.9.4: Fix CVE-2017-9049 and CVE-2017-9050
-
-[No upstream tracking] -- https://bugzilla.gnome.org/show_bug.cgi?id=781205
- -- https://bugzilla.gnome.org/show_bug.cgi?id=781361
-
-parser: Fix handling of parameter-entity references
-
-There were two bugs where parameter-entity references could lead to an
-unexpected change of the input buffer in xmlParseNameComplex and
-xmlDictLookup being called with an invalid pointer.
-
-Percent sign in DTD Names
-=========================
-
-The NEXTL macro used to call xmlParserHandlePEReference. When parsing
-"complex" names inside the DTD, this could result in entity expansion
-which created a new input buffer. The fix is to simply remove the call
-to xmlParserHandlePEReference from the NEXTL macro. This is safe because
-no users of the macro require expansion of parameter entities.
-
-- xmlParseNameComplex
-- xmlParseNCNameComplex
-- xmlParseNmtoken
-
-The percent sign is not allowed in names, which are grammatical tokens.
-
-- xmlParseEntityValue
-
-Parameter-entity references in entity values are expanded but this
-happens in a separate step in this function.
-
-- xmlParseSystemLiteral
-
-Parameter-entity references are ignored in the system literal.
-
-- xmlParseAttValueComplex
-- xmlParseCharDataComplex
-- xmlParseCommentComplex
-- xmlParsePI
-- xmlParseCDSect
-
-Parameter-entity references are ignored outside the DTD.
-
-- xmlLoadEntityContent
-
-This function is only called from xmlStringLenDecodeEntities and
-entities are replaced in a separate step immediately after the function
-call.
-
-This bug could also be triggered with an internal subset and double
-entity expansion.
-
-This fixes bug 766956 initially reported by Wei Lei and independently by
-Chromium's ClusterFuzz, Hanno Böck, and Marco Grassi. Thanks to everyone
-involved.
-
-xmlParseNameComplex with XML_PARSE_OLD10
-========================================
-
-When parsing Names inside an expanded parameter entity with the
-XML_PARSE_OLD10 option, xmlParseNameComplex would call xmlGROW via the
-GROW macro if the input buffer was exhausted. At the end of the
-parameter entity's replacement text, this function would then call
-xmlPopInput which invalidated the input buffer.
-
-There should be no need to invoke GROW in this situation because the
-buffer is grown periodically every XML_PARSER_CHUNK_SIZE characters and,
-at least for UTF-8, in xmlCurrentChar. This also matches the code path
-executed when XML_PARSE_OLD10 is not set.
-
-This fixes bugs 781205 (CVE-2017-9049) and 781361 (CVE-2017-9050).
-Thanks to Marcel Böhme and Thuan Pham for the report.
-
-Additional hardening
-====================
-
-A separate check was added in xmlParseNameComplex to validate the
-buffer size.
-
-Fixes bug 781205 and bug 781361
-
-Upstream-Status: Backport [https://git.gnome.org/browse/libxml2/commit/?id=932cc9896ab41475d4aa429c27d9afd175959d74]
-CVE: CVE-2017-9049 CVE-2017-9050
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-
-diff --git a/Makefile.am b/Makefile.am
-index 9f988b0..dab15a4 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -422,6 +422,24 @@ Errtests : xmllint$(EXEEXT)
- if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
- rm result.$$name error.$$name ; \
- fi ; fi ; done)
-+ @echo "## Error cases regression tests (old 1.0)"
-+ -@(for i in $(srcdir)/test/errors10/*.xml ; do \
-+ name=`basename $$i`; \
-+ if [ ! -d $$i ] ; then \
-+ if [ ! -f $(srcdir)/result/errors10/$$name ] ; then \
-+ echo New test file $$name ; \
-+ $(CHECKER) $(top_builddir)/xmllint --oldxml10 $$i \
-+ 2> $(srcdir)/result/errors10/$$name.err \
-+ > $(srcdir)/result/errors10/$$name ; \
-+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
-+ else \
-+ log=`$(CHECKER) $(top_builddir)/xmllint --oldxml10 $$i 2> error.$$name > result.$$name ; \
-+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
-+ diff $(srcdir)/result/errors10/$$name result.$$name ; \
-+ diff $(srcdir)/result/errors10/$$name.err error.$$name` ; \
-+ if [ -n "$$log" ] ; then echo $$name result ; echo "$$log" ; fi ; \
-+ rm result.$$name error.$$name ; \
-+ fi ; fi ; done)
- @echo "## Error cases stream regression tests"
- -@(for i in $(srcdir)/test/errors/*.xml ; do \
- name=`basename $$i`; \
-diff --git a/parser.c b/parser.c
-index 609a270..8e11c12 100644
---- a/parser.c
-+++ b/parser.c
-@@ -2115,7 +2115,6 @@ static void xmlGROW (xmlParserCtxtPtr ctxt) {
- ctxt->input->line++; ctxt->input->col = 1; \
- } else ctxt->input->col++; \
- ctxt->input->cur += l; \
-- if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt); \
- } while (0)
-
- #define CUR_CHAR(l) xmlCurrentChar(ctxt, &l)
-@@ -3406,13 +3405,6 @@ xmlParseNameComplex(xmlParserCtxtPtr ctxt) {
- len += l;
- NEXTL(l);
- c = CUR_CHAR(l);
-- if (c == 0) {
-- count = 0;
-- GROW;
-- if (ctxt->instate == XML_PARSER_EOF)
-- return(NULL);
-- c = CUR_CHAR(l);
-- }
- }
- }
- if ((len > XML_MAX_NAME_LENGTH) &&
-@@ -3420,6 +3412,16 @@ xmlParseNameComplex(xmlParserCtxtPtr ctxt) {
- xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "Name");
- return(NULL);
- }
-+ if (ctxt->input->cur - ctxt->input->base < len) {
-+ /*
-+ * There were a couple of bugs where PERefs lead to to a change
-+ * of the buffer. Check the buffer size to avoid passing an invalid
-+ * pointer to xmlDictLookup.
-+ */
-+ xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
-+ "unexpected change of input buffer");
-+ return (NULL);
-+ }
- if ((*ctxt->input->cur == '\n') && (ctxt->input->cur[-1] == '\r'))
- return(xmlDictLookup(ctxt->dict, ctxt->input->cur - (len + 1), len));
- return(xmlDictLookup(ctxt->dict, ctxt->input->cur - len, len));
-diff --git a/result/errors10/781205.xml b/result/errors10/781205.xml
-new file mode 100644
-index 0000000..e69de29
-diff --git a/result/errors10/781205.xml.err b/result/errors10/781205.xml.err
-new file mode 100644
-index 0000000..da15c3f
---- /dev/null
-+++ b/result/errors10/781205.xml.err
-@@ -0,0 +1,21 @@
-+Entity: line 1: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
-+
-+ %a;
-+ ^
-+Entity: line 1:
-+<:0000
-+^
-+Entity: line 1: parser error : DOCTYPE improperly terminated
-+ %a;
-+ ^
-+Entity: line 1:
-+<:0000
-+^
-+namespace error : Failed to parse QName ':0000'
-+ %a;
-+ ^
-+<:0000
-+ ^
-+./test/errors10/781205.xml:4: parser error : Couldn't find end of Start Tag :0000 line 1
-+
-+^
-diff --git a/result/errors10/781361.xml b/result/errors10/781361.xml
-new file mode 100644
-index 0000000..e69de29
-diff --git a/result/errors10/781361.xml.err b/result/errors10/781361.xml.err
-new file mode 100644
-index 0000000..655f41a
---- /dev/null
-+++ b/result/errors10/781361.xml.err
-@@ -0,0 +1,13 @@
-+./test/errors10/781361.xml:4: parser error : xmlParseElementDecl: 'EMPTY', 'ANY' or '(' expected
-+
-+^
-+./test/errors10/781361.xml:4: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
-+
-+
-+^
-+./test/errors10/781361.xml:4: parser error : DOCTYPE improperly terminated
-+
-+^
-+./test/errors10/781361.xml:4: parser error : Start tag expected, '<' not found
-+
-+^
-diff --git a/result/valid/766956.xml b/result/valid/766956.xml
-new file mode 100644
-index 0000000..e69de29
-diff --git a/result/valid/766956.xml.err b/result/valid/766956.xml.err
-new file mode 100644
-index 0000000..34b1dae
---- /dev/null
-+++ b/result/valid/766956.xml.err
-@@ -0,0 +1,9 @@
-+test/valid/dtds/766956.dtd:2: parser error : PEReference: expecting ';'
-+%ä%ent;
-+ ^
-+Entity: line 1: parser error : Content error in the external subset
-+ %ent;
-+ ^
-+Entity: line 1:
-+value
-+^
-diff --git a/result/valid/766956.xml.err.rdr b/result/valid/766956.xml.err.rdr
-new file mode 100644
-index 0000000..7760346
---- /dev/null
-+++ b/result/valid/766956.xml.err.rdr
-@@ -0,0 +1,10 @@
-+test/valid/dtds/766956.dtd:2: parser error : PEReference: expecting ';'
-+%ä%ent;
-+ ^
-+Entity: line 1: parser error : Content error in the external subset
-+ %ent;
-+ ^
-+Entity: line 1:
-+value
-+^
-+./test/valid/766956.xml : failed to parse
-diff --git a/runtest.c b/runtest.c
-index bb74d2a..63e8c20 100644
---- a/runtest.c
-+++ b/runtest.c
-@@ -4202,6 +4202,9 @@ testDesc testDescriptions[] = {
- { "Error cases regression tests",
- errParseTest, "./test/errors/*.xml", "result/errors/", "", ".err",
- 0 },
-+ { "Error cases regression tests (old 1.0)",
-+ errParseTest, "./test/errors10/*.xml", "result/errors10/", "", ".err",
-+ XML_PARSE_OLD10 },
- #ifdef LIBXML_READER_ENABLED
- { "Error cases stream regression tests",
- streamParseTest, "./test/errors/*.xml", "result/errors/", NULL, ".str",
-diff --git a/test/errors10/781205.xml b/test/errors10/781205.xml
-new file mode 100644
-index 0000000..d9e9e83
---- /dev/null
-+++ b/test/errors10/781205.xml
-@@ -0,0 +1,3 @@
-+<!DOCTYPE D [
-+ <!ENTITY % a "<:0000">
-+ %a;
-diff --git a/test/errors10/781361.xml b/test/errors10/781361.xml
-new file mode 100644
-index 0000000..67476bc
---- /dev/null
-+++ b/test/errors10/781361.xml
-@@ -0,0 +1,3 @@
-+<!DOCTYPE doc [
-+ <!ENTITY % elem "<!ELEMENT e0000000000">
-+ %elem;
-diff --git a/test/valid/766956.xml b/test/valid/766956.xml
-new file mode 100644
-index 0000000..19a95a0
---- /dev/null
-+++ b/test/valid/766956.xml
-@@ -0,0 +1,2 @@
-+<!DOCTYPE test SYSTEM "dtds/766956.dtd">
-+<test/>
-diff --git a/test/valid/dtds/766956.dtd b/test/valid/dtds/766956.dtd
-new file mode 100644
-index 0000000..dddde68
---- /dev/null
-+++ b/test/valid/dtds/766956.dtd
-@@ -0,0 +1,2 @@
-+<!ENTITY % ent "value">
-+%ä%ent;
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch
deleted file mode 100644
index c60e32f..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-libxml2-2.9.4: Fix more NULL pointer derefs
-
-xpointer: Fix more NULL pointer derefs
-
-Upstream-Status: Backport [https://git.gnome.org/browse/libxml2/commit/?id=e905f08123e4a6e7731549e6f09dadff4cab65bd]
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
-
-diff --git a/xpointer.c b/xpointer.c
-index 676c510..074db24 100644
---- a/xpointer.c
-+++ b/xpointer.c
-@@ -555,7 +555,7 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
- /*
- * Empty set ...
- */
-- if (end->nodesetval->nodeNr <= 0)
-+ if ((end->nodesetval == NULL) || (end->nodesetval->nodeNr <= 0))
- return(NULL);
- break;
- default:
-@@ -1400,7 +1400,7 @@ xmlXPtrEval(const xmlChar *str, xmlXPathContextPtr ctx) {
- */
- xmlNodeSetPtr set;
- set = tmp->nodesetval;
-- if ((set->nodeNr != 1) ||
-+ if ((set == NULL) || (set->nodeNr != 1) ||
- (set->nodeTab[0] != (xmlNodePtr) ctx->doc))
- stack++;
- } else
-@@ -2073,9 +2073,11 @@ xmlXPtrRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
- xmlXPathFreeObject(set);
- XP_ERROR(XPATH_MEMORY_ERROR);
- }
-- for (i = 0;i < oldset->locNr;i++) {
-- xmlXPtrLocationSetAdd(newset,
-- xmlXPtrCoveringRange(ctxt, oldset->locTab[i]));
-+ if (oldset != NULL) {
-+ for (i = 0;i < oldset->locNr;i++) {
-+ xmlXPtrLocationSetAdd(newset,
-+ xmlXPtrCoveringRange(ctxt, oldset->locTab[i]));
-+ }
- }
-
- /*
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_and_simplify_xmlParseStartTag2.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_and_simplify_xmlParseStartTag2.patch
deleted file mode 100644
index faa5770..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_and_simplify_xmlParseStartTag2.patch
+++ /dev/null
@@ -1,590 +0,0 @@
-libxml2-2.9.4: Avoid reparsing and simplify control flow in xmlParseStartTag2
-
-[No upstream tracking]
-
-parser: Avoid reparsing in xmlParseStartTag2
-
-The code in xmlParseStartTag2 must handle the case that the input
-buffer was grown and reallocated which can invalidate pointers to
-attribute values. Before, this was handled by detecting changes of
-the input buffer "base" pointer and, in case of a change, jumping
-back to the beginning of the function and reparsing the start tag.
-
-The major problem of this approach is that whether an input buffer is
-reallocated is nondeterministic, resulting in seemingly random test
-failures. See the mailing list thread "runtest mystery bug: name2.xml
-error case regression test" from 2012, for example.
-
-If a reallocation was detected, the code also made no attempts to
-continue parsing in case of errors which makes a difference in
-the lax "recover" mode.
-
-Now we store the current input buffer "base" pointer for each (not
-separately allocated) attribute in the namespace URI field, which isn't
-used until later. After the whole start tag was parsed, the pointers to
-the attribute values are reconstructed using the offset between the
-new and the old input buffer. This relies on arithmetic on dangling
-pointers which is technically undefined behavior. But it seems like
-the easiest and most efficient fix and a similar approach is used in
-xmlParserInputGrow.
-
-This changes the error output of several tests, typically making it
-more verbose because we try harder to continue parsing in case of errors.
-
-(Another possible solution is to check not only the "base" pointer
-but the size of the input buffer as well. But this would result in
-even more reparsing.)
-
-Remove some goto labels and deduplicate a bit of code after handling
-namespaces.
-
-There were two bugs where parameter-entity references could lead to an
-unexpected change of the input buffer in xmlParseNameComplex and
-xmlDictLookup being called with an invalid pointer.
-
-
-Upstream-Status: Backport
- - [https://git.gnome.org/browse/libxml2/commit/?id=07b7428b69c368611d215a140fe630b2d1e61349]
- - [https://git.gnome.org/browse/libxml2/commit/?id=855c19efb7cd30d927d673b3658563c4959ca6f0]
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-
-diff --git a/parser.c b/parser.c
-index 609a270..74016e3 100644
---- a/parser.c
-+++ b/parser.c
-@@ -43,6 +43,7 @@
- #include <limits.h>
- #include <string.h>
- #include <stdarg.h>
-+#include <stddef.h>
- #include <libxml/xmlmemory.h>
- #include <libxml/threads.h>
- #include <libxml/globals.h>
-@@ -9377,8 +9378,7 @@ xmlParseStartTag2(xmlParserCtxtPtr ctxt, const xmlChar **pref,
- const xmlChar **atts = ctxt->atts;
- int maxatts = ctxt->maxatts;
- int nratts, nbatts, nbdef;
-- int i, j, nbNs, attval, oldline, oldcol, inputNr;
-- const xmlChar *base;
-+ int i, j, nbNs, attval;
- unsigned long cur;
- int nsNr = ctxt->nsNr;
-
-@@ -9392,13 +9392,8 @@ xmlParseStartTag2(xmlParserCtxtPtr ctxt, const xmlChar **pref,
- * The Shrinking is only possible once the full set of attribute
- * callbacks have been done.
- */
--reparse:
- SHRINK;
-- base = ctxt->input->base;
- cur = ctxt->input->cur - ctxt->input->base;
-- inputNr = ctxt->inputNr;
-- oldline = ctxt->input->line;
-- oldcol = ctxt->input->col;
- nbatts = 0;
- nratts = 0;
- nbdef = 0;
-@@ -9422,8 +9417,6 @@ reparse:
- */
- SKIP_BLANKS;
- GROW;
-- if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
-- goto base_changed;
-
- while (((RAW != '>') &&
- ((RAW != '/') || (NXT(1) != '>')) &&
-@@ -9434,203 +9427,174 @@ reparse:
-
- attname = xmlParseAttribute2(ctxt, prefix, localname,
- &aprefix, &attvalue, &len, &alloc);
-- if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr)) {
-- if ((attvalue != NULL) && (alloc != 0))
-- xmlFree(attvalue);
-- attvalue = NULL;
-- goto base_changed;
-- }
-- if ((attname != NULL) && (attvalue != NULL)) {
-- if (len < 0) len = xmlStrlen(attvalue);
-- if ((attname == ctxt->str_xmlns) && (aprefix == NULL)) {
-- const xmlChar *URL = xmlDictLookup(ctxt->dict, attvalue, len);
-- xmlURIPtr uri;
--
-- if (URL == NULL) {
-- xmlErrMemory(ctxt, "dictionary allocation failure");
-- if ((attvalue != NULL) && (alloc != 0))
-- xmlFree(attvalue);
-- return(NULL);
-- }
-- if (*URL != 0) {
-- uri = xmlParseURI((const char *) URL);
-- if (uri == NULL) {
-- xmlNsErr(ctxt, XML_WAR_NS_URI,
-- "xmlns: '%s' is not a valid URI\n",
-- URL, NULL, NULL);
-- } else {
-- if (uri->scheme == NULL) {
-- xmlNsWarn(ctxt, XML_WAR_NS_URI_RELATIVE,
-- "xmlns: URI %s is not absolute\n",
-- URL, NULL, NULL);
-- }
-- xmlFreeURI(uri);
-- }
-- if (URL == ctxt->str_xml_ns) {
-- if (attname != ctxt->str_xml) {
-- xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-- "xml namespace URI cannot be the default namespace\n",
-- NULL, NULL, NULL);
-- }
-- goto skip_default_ns;
-- }
-- if ((len == 29) &&
-- (xmlStrEqual(URL,
-- BAD_CAST "http://www.w3.org/2000/xmlns/"))) {
-- xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-- "reuse of the xmlns namespace name is forbidden\n",
-- NULL, NULL, NULL);
-- goto skip_default_ns;
-- }
-- }
-- /*
-- * check that it's not a defined namespace
-- */
-- for (j = 1;j <= nbNs;j++)
-- if (ctxt->nsTab[ctxt->nsNr - 2 * j] == NULL)
-- break;
-- if (j <= nbNs)
-- xmlErrAttributeDup(ctxt, NULL, attname);
-- else
-- if (nsPush(ctxt, NULL, URL) > 0) nbNs++;
--skip_default_ns:
-- if ((attvalue != NULL) && (alloc != 0)) {
-- xmlFree(attvalue);
-- attvalue = NULL;
-- }
-- if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
-- break;
-- if (!IS_BLANK_CH(RAW)) {
-- xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
-- "attributes construct error\n");
-- break;
-- }
-- SKIP_BLANKS;
-- if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
-- goto base_changed;
-- continue;
-- }
-- if (aprefix == ctxt->str_xmlns) {
-- const xmlChar *URL = xmlDictLookup(ctxt->dict, attvalue, len);
-- xmlURIPtr uri;
--
-- if (attname == ctxt->str_xml) {
-- if (URL != ctxt->str_xml_ns) {
-- xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-- "xml namespace prefix mapped to wrong URI\n",
-- NULL, NULL, NULL);
-- }
-- /*
-- * Do not keep a namespace definition node
-- */
-- goto skip_ns;
-- }
-+ if ((attname == NULL) || (attvalue == NULL))
-+ goto next_attr;
-+ if (len < 0) len = xmlStrlen(attvalue);
-+
-+ if ((attname == ctxt->str_xmlns) && (aprefix == NULL)) {
-+ const xmlChar *URL = xmlDictLookup(ctxt->dict, attvalue, len);
-+ xmlURIPtr uri;
-+
-+ if (URL == NULL) {
-+ xmlErrMemory(ctxt, "dictionary allocation failure");
-+ if ((attvalue != NULL) && (alloc != 0))
-+ xmlFree(attvalue);
-+ return(NULL);
-+ }
-+ if (*URL != 0) {
-+ uri = xmlParseURI((const char *) URL);
-+ if (uri == NULL) {
-+ xmlNsErr(ctxt, XML_WAR_NS_URI,
-+ "xmlns: '%s' is not a valid URI\n",
-+ URL, NULL, NULL);
-+ } else {
-+ if (uri->scheme == NULL) {
-+ xmlNsWarn(ctxt, XML_WAR_NS_URI_RELATIVE,
-+ "xmlns: URI %s is not absolute\n",
-+ URL, NULL, NULL);
-+ }
-+ xmlFreeURI(uri);
-+ }
- if (URL == ctxt->str_xml_ns) {
-- if (attname != ctxt->str_xml) {
-- xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-- "xml namespace URI mapped to wrong prefix\n",
-- NULL, NULL, NULL);
-- }
-- goto skip_ns;
-- }
-- if (attname == ctxt->str_xmlns) {
-- xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-- "redefinition of the xmlns prefix is forbidden\n",
-- NULL, NULL, NULL);
-- goto skip_ns;
-- }
-- if ((len == 29) &&
-- (xmlStrEqual(URL,
-- BAD_CAST "http://www.w3.org/2000/xmlns/"))) {
-- xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-- "reuse of the xmlns namespace name is forbidden\n",
-- NULL, NULL, NULL);
-- goto skip_ns;
-- }
-- if ((URL == NULL) || (URL[0] == 0)) {
-- xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-- "xmlns:%s: Empty XML namespace is not allowed\n",
-- attname, NULL, NULL);
-- goto skip_ns;
-- } else {
-- uri = xmlParseURI((const char *) URL);
-- if (uri == NULL) {
-- xmlNsErr(ctxt, XML_WAR_NS_URI,
-- "xmlns:%s: '%s' is not a valid URI\n",
-- attname, URL, NULL);
-- } else {
-- if ((ctxt->pedantic) && (uri->scheme == NULL)) {
-- xmlNsWarn(ctxt, XML_WAR_NS_URI_RELATIVE,
-- "xmlns:%s: URI %s is not absolute\n",
-- attname, URL, NULL);
-- }
-- xmlFreeURI(uri);
-- }
-- }
--
-- /*
-- * check that it's not a defined namespace
-- */
-- for (j = 1;j <= nbNs;j++)
-- if (ctxt->nsTab[ctxt->nsNr - 2 * j] == attname)
-- break;
-- if (j <= nbNs)
-- xmlErrAttributeDup(ctxt, aprefix, attname);
-- else
-- if (nsPush(ctxt, attname, URL) > 0) nbNs++;
--skip_ns:
-- if ((attvalue != NULL) && (alloc != 0)) {
-- xmlFree(attvalue);
-- attvalue = NULL;
-- }
-- if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
-- break;
-- if (!IS_BLANK_CH(RAW)) {
-- xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
-- "attributes construct error\n");
-- break;
-- }
-- SKIP_BLANKS;
-- if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
-- goto base_changed;
-- continue;
-- }
-+ if (attname != ctxt->str_xml) {
-+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+ "xml namespace URI cannot be the default namespace\n",
-+ NULL, NULL, NULL);
-+ }
-+ goto next_attr;
-+ }
-+ if ((len == 29) &&
-+ (xmlStrEqual(URL,
-+ BAD_CAST "http://www.w3.org/2000/xmlns/"))) {
-+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+ "reuse of the xmlns namespace name is forbidden\n",
-+ NULL, NULL, NULL);
-+ goto next_attr;
-+ }
-+ }
-+ /*
-+ * check that it's not a defined namespace
-+ */
-+ for (j = 1;j <= nbNs;j++)
-+ if (ctxt->nsTab[ctxt->nsNr - 2 * j] == NULL)
-+ break;
-+ if (j <= nbNs)
-+ xmlErrAttributeDup(ctxt, NULL, attname);
-+ else
-+ if (nsPush(ctxt, NULL, URL) > 0) nbNs++;
-+
-+ } else if (aprefix == ctxt->str_xmlns) {
-+ const xmlChar *URL = xmlDictLookup(ctxt->dict, attvalue, len);
-+ xmlURIPtr uri;
-+
-+ if (attname == ctxt->str_xml) {
-+ if (URL != ctxt->str_xml_ns) {
-+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+ "xml namespace prefix mapped to wrong URI\n",
-+ NULL, NULL, NULL);
-+ }
-+ /*
-+ * Do not keep a namespace definition node
-+ */
-+ goto next_attr;
-+ }
-+ if (URL == ctxt->str_xml_ns) {
-+ if (attname != ctxt->str_xml) {
-+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+ "xml namespace URI mapped to wrong prefix\n",
-+ NULL, NULL, NULL);
-+ }
-+ goto next_attr;
-+ }
-+ if (attname == ctxt->str_xmlns) {
-+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+ "redefinition of the xmlns prefix is forbidden\n",
-+ NULL, NULL, NULL);
-+ goto next_attr;
-+ }
-+ if ((len == 29) &&
-+ (xmlStrEqual(URL,
-+ BAD_CAST "http://www.w3.org/2000/xmlns/"))) {
-+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+ "reuse of the xmlns namespace name is forbidden\n",
-+ NULL, NULL, NULL);
-+ goto next_attr;
-+ }
-+ if ((URL == NULL) || (URL[0] == 0)) {
-+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+ "xmlns:%s: Empty XML namespace is not allowed\n",
-+ attname, NULL, NULL);
-+ goto next_attr;
-+ } else {
-+ uri = xmlParseURI((const char *) URL);
-+ if (uri == NULL) {
-+ xmlNsErr(ctxt, XML_WAR_NS_URI,
-+ "xmlns:%s: '%s' is not a valid URI\n",
-+ attname, URL, NULL);
-+ } else {
-+ if ((ctxt->pedantic) && (uri->scheme == NULL)) {
-+ xmlNsWarn(ctxt, XML_WAR_NS_URI_RELATIVE,
-+ "xmlns:%s: URI %s is not absolute\n",
-+ attname, URL, NULL);
-+ }
-+ xmlFreeURI(uri);
-+ }
-+ }
-
-- /*
-- * Add the pair to atts
-- */
-- if ((atts == NULL) || (nbatts + 5 > maxatts)) {
-- if (xmlCtxtGrowAttrs(ctxt, nbatts + 5) < 0) {
-- if (attvalue[len] == 0)
-- xmlFree(attvalue);
-- goto failed;
-- }
-- maxatts = ctxt->maxatts;
-- atts = ctxt->atts;
-- }
-- ctxt->attallocs[nratts++] = alloc;
-- atts[nbatts++] = attname;
-- atts[nbatts++] = aprefix;
-- atts[nbatts++] = NULL; /* the URI will be fetched later */
-- atts[nbatts++] = attvalue;
-- attvalue += len;
-- atts[nbatts++] = attvalue;
-- /*
-- * tag if some deallocation is needed
-- */
-- if (alloc != 0) attval = 1;
-- } else {
-- if ((attvalue != NULL) && (attvalue[len] == 0))
-- xmlFree(attvalue);
-- }
-+ /*
-+ * check that it's not a defined namespace
-+ */
-+ for (j = 1;j <= nbNs;j++)
-+ if (ctxt->nsTab[ctxt->nsNr - 2 * j] == attname)
-+ break;
-+ if (j <= nbNs)
-+ xmlErrAttributeDup(ctxt, aprefix, attname);
-+ else
-+ if (nsPush(ctxt, attname, URL) > 0) nbNs++;
-+
-+ } else {
-+ /*
-+ * Add the pair to atts
-+ */
-+ if ((atts == NULL) || (nbatts + 5 > maxatts)) {
-+ if (xmlCtxtGrowAttrs(ctxt, nbatts + 5) < 0) {
-+ goto next_attr;
-+ }
-+ maxatts = ctxt->maxatts;
-+ atts = ctxt->atts;
-+ }
-+ ctxt->attallocs[nratts++] = alloc;
-+ atts[nbatts++] = attname;
-+ atts[nbatts++] = aprefix;
-+ /*
-+ * The namespace URI field is used temporarily to point at the
-+ * base of the current input buffer for non-alloced attributes.
-+ * When the input buffer is reallocated, all the pointers become
-+ * invalid, but they can be reconstructed later.
-+ */
-+ if (alloc)
-+ atts[nbatts++] = NULL;
-+ else
-+ atts[nbatts++] = ctxt->input->base;
-+ atts[nbatts++] = attvalue;
-+ attvalue += len;
-+ atts[nbatts++] = attvalue;
-+ /*
-+ * tag if some deallocation is needed
-+ */
-+ if (alloc != 0) attval = 1;
-+ attvalue = NULL; /* moved into atts */
-+ }
-
--failed:
-+next_attr:
-+ if ((attvalue != NULL) && (alloc != 0)) {
-+ xmlFree(attvalue);
-+ attvalue = NULL;
-+ }
-
- GROW
- if (ctxt->instate == XML_PARSER_EOF)
- break;
-- if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
-- goto base_changed;
- if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
- break;
- if (!IS_BLANK_CH(RAW)) {
-@@ -9646,8 +9610,20 @@ failed:
- break;
- }
- GROW;
-- if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
-- goto base_changed;
-+ }
-+
-+ /* Reconstruct attribute value pointers. */
-+ for (i = 0, j = 0; j < nratts; i += 5, j++) {
-+ if (atts[i+2] != NULL) {
-+ /*
-+ * Arithmetic on dangling pointers is technically undefined
-+ * behavior, but well...
-+ */
-+ ptrdiff_t offset = ctxt->input->base - atts[i+2];
-+ atts[i+2] = NULL; /* Reset repurposed namespace URI */
-+ atts[i+3] += offset; /* value */
-+ atts[i+4] += offset; /* valuend */
-+ }
- }
-
- /*
-@@ -9804,34 +9780,6 @@ failed:
- }
-
- return(localname);
--
--base_changed:
-- /*
-- * the attribute strings are valid iif the base didn't changed
-- */
-- if (attval != 0) {
-- for (i = 3,j = 0; j < nratts;i += 5,j++)
-- if ((ctxt->attallocs[j] != 0) && (atts[i] != NULL))
-- xmlFree((xmlChar *) atts[i]);
-- }
--
-- /*
-- * We can't switch from one entity to another in the middle
-- * of a start tag
-- */
-- if (inputNr != ctxt->inputNr) {
-- xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY,
-- "Start tag doesn't start and stop in the same entity\n");
-- return(NULL);
-- }
--
-- ctxt->input->cur = ctxt->input->base + cur;
-- ctxt->input->line = oldline;
-- ctxt->input->col = oldcol;
-- if (ctxt->wellFormed == 1) {
-- goto reparse;
-- }
-- return(NULL);
- }
-
- /**
-diff --git a/result/errors/759398.xml.err b/result/errors/759398.xml.err
-index e08d9bf..f6036a3 100644
---- a/result/errors/759398.xml.err
-+++ b/result/errors/759398.xml.err
-@@ -1,9 +1,12 @@
- ./test/errors/759398.xml:210: parser error : StartTag: invalid element name
- need to worry about parsers whi<! don't expand PErefs finding
- ^
--./test/errors/759398.xml:309: parser error : Opening and ending tag mismatch: spec line 50 and termdef
-+./test/errors/759398.xml:309: parser error : Opening and ending tag mismatch: №№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№m line 308 and termdef
- and provide access to their content and structure.</termdef> <termdef
- ^
--./test/errors/759398.xml:309: parser error : Extra content at the end of the document
--and provide access to their content and structure.</termdef> <termdef
-- ^
-+./test/errors/759398.xml:314: parser error : Opening and ending tag mismatch: spec line 50 and p
-+data and the information it must provide to the application.</p>
-+ ^
-+./test/errors/759398.xml:316: parser error : Extra content at the end of the document
-+<div2 id='sec-origin-goals'>
-+^
-diff --git a/result/errors/attr1.xml.err b/result/errors/attr1.xml.err
-index 4f08538..c4c4fc8 100644
---- a/result/errors/attr1.xml.err
-+++ b/result/errors/attr1.xml.err
-@@ -1,6 +1,9 @@
- ./test/errors/attr1.xml:2: parser error : AttValue: ' expected
-
- ^
--./test/errors/attr1.xml:1: parser error : Extra content at the end of the document
--<foo foo="oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
-- ^
-+./test/errors/attr1.xml:2: parser error : attributes construct error
-+
-+^
-+./test/errors/attr1.xml:2: parser error : Couldn't find end of Start Tag foo line 1
-+
-+^
-diff --git a/result/errors/attr2.xml.err b/result/errors/attr2.xml.err
-index c8a9c7d..77e342e 100644
---- a/result/errors/attr2.xml.err
-+++ b/result/errors/attr2.xml.err
-@@ -1,6 +1,9 @@
- ./test/errors/attr2.xml:2: parser error : AttValue: ' expected
-
- ^
--./test/errors/attr2.xml:1: parser error : Extra content at the end of the document
--<foo foo=">ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
-- ^
-+./test/errors/attr2.xml:2: parser error : attributes construct error
-+
-+^
-+./test/errors/attr2.xml:2: parser error : Couldn't find end of Start Tag foo line 1
-+
-+^
-diff --git a/result/errors/name2.xml.err b/result/errors/name2.xml.err
-index a6649a1..8a6acee 100644
---- a/result/errors/name2.xml.err
-+++ b/result/errors/name2.xml.err
-@@ -1,6 +1,9 @@
- ./test/errors/name2.xml:2: parser error : Specification mandate value for attribute foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
-
- ^
--./test/errors/name2.xml:1: parser error : Extra content at the end of the document
--<foo foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
-- ^
-+./test/errors/name2.xml:2: parser error : attributes construct error
-+
-+^
-+./test/errors/name2.xml:2: parser error : Couldn't find end of Start Tag foo line 1
-+
-+^
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_node_comparison.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_node_comparison.patch
deleted file mode 100644
index 65f6bef..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_node_comparison.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-libxml2-2.9.4: Fix comparison with root node in xmlXPathCmpNodes and NULL pointer deref in XPointer
-
-xpath:
- - Check for errors after evaluating first operand.
- - Add sanity check for empty stack.
- - Include comparation in changes from xmlXPathCmpNodesExt to xmlXPathCmpNodes
-
-Upstream-Status: Backport
- - [https://git.gnome.org/browse/libxml2/commit/?id=c1d1f7121194036608bf555f08d3062a36fd344b]
- - [https://git.gnome.org/browse/libxml2/commit/?id=a005199330b86dada19d162cae15ef9bdcb6baa8]
-CVE: CVE-2016-5131
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
-
-diff --git a/result/XPath/xptr/viderror b/result/XPath/xptr/viderror
-new file mode 100644
-index 0000000..d589882
---- /dev/null
-+++ b/result/XPath/xptr/viderror
-@@ -0,0 +1,4 @@
-+
-+========================
-+Expression: xpointer(non-existing-fn()/range-to(id('chapter2')))
-+Object is empty (NULL)
-diff --git a/test/XPath/xptr/viderror b/test/XPath/xptr/viderror
-new file mode 100644
-index 0000000..da8c53b
---- /dev/null
-+++ b/test/XPath/xptr/viderror
-@@ -0,0 +1 @@
-+xpointer(non-existing-fn()/range-to(id('chapter2')))
-diff --git a/xpath.c b/xpath.c
-index 113bce6..d992841 100644
---- a/xpath.c
-+++ b/xpath.c
-@@ -3342,13 +3342,13 @@ xmlXPathCmpNodes(xmlNodePtr node1, xmlNodePtr node2) {
- * compute depth to root
- */
- for (depth2 = 0, cur = node2;cur->parent != NULL;cur = cur->parent) {
-- if (cur == node1)
-+ if (cur->parent == node1)
- return(1);
- depth2++;
- }
- root = cur;
- for (depth1 = 0, cur = node1;cur->parent != NULL;cur = cur->parent) {
-- if (cur == node2)
-+ if (cur->parent == node2)
- return(-1);
- depth1++;
- }
-@@ -14005,9 +14005,14 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
- xmlNodeSetPtr oldset;
- int i, j;
-
-- if (op->ch1 != -1)
-+ if (op->ch1 != -1) {
- total +=
- xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
-+ CHECK_ERROR0;
-+ }
-+ if (ctxt->value == NULL) {
-+ XP_ERROR0(XPATH_INVALID_OPERAND);
-+ }
- if (op->ch2 == -1)
- return (total);
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/runtest.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/runtest.patch
index 6e56857..cb171d5 100644
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/runtest.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/runtest.patch
@@ -2,47 +2,29 @@
Print a standard result line for each test.
Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com>
-Signed-off-by: Andrej Valek <andrej.valek@enea.com>
+Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Upstream-Status: Backport
diff -uNr a/Makefile.am b/Makefile.am
---- a/Makefile.am 2016-05-22 03:49:02.000000000 +0200
-+++ b/Makefile.am 2017-06-14 10:38:43.381305385 +0200
-@@ -202,10 +202,24 @@
+--- a/Makefile.am 2017-08-28 15:01:14.000000000 +0200
++++ b/Makefile.am 2017-09-05 08:06:05.752287323 +0200
+@@ -202,6 +202,15 @@
#testOOM_DEPENDENCIES = $(DEPS)
#testOOM_LDADD= $(LDADDS)
+install-ptest:
+ @(if [ -d .libs ] ; then cd .libs; fi; \
-+ install $(noinst_PROGRAMS) $(DESTDIR))
++ install $(check_PROGRAMS) $(DESTDIR))
+ cp -r $(srcdir)/test $(DESTDIR)
+ cp -r $(srcdir)/result $(DESTDIR)
+ cp -r $(srcdir)/python $(DESTDIR)
+ cp Makefile $(DESTDIR)
+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
+
- runtests:
+ runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
+ testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
[ -d test ] || $(LN_S) $(srcdir)/test .
- [ -d result ] || $(LN_S) $(srcdir)/result .
-- $(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT)
-+ $(CHECKER) ./runtest$(EXEEXT) && \
-+ $(CHECKER) ./testrecurse$(EXEEXT) && \
-+ ASAN_OPTIONS="$$ASAN_OPTIONS:detect_leaks=0" $(CHECKER) ./testapi$(EXEEXT) && \
-+ $(CHECKER) ./testchar$(EXEEXT) && \
-+ $(CHECKER) ./testdict$(EXEEXT) && \
-+ $(CHECKER) ./runxmlconf$(EXEEXT)
- @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \
- $(MAKE) tests ; fi)
-
-@@ -229,7 +243,7 @@
-
- APItests: testapi$(EXEEXT)
- @echo "## Running the API regression tests this may take a little while"
-- -@($(CHECKER) $(top_builddir)/testapi -q)
-+ -@(ASAN_OPTIONS="$$ASAN_OPTIONS:detect_leaks=0" $(CHECKER) $(top_builddir)/testapi -q)
-
- HTMLtests : testHTML$(EXEEXT)
- @(echo > .memdump)
+
diff -uNr a/runsuite.c b/runsuite.c
--- a/runsuite.c 2013-04-12 16:17:11.462823238 +0200
+++ b/runsuite.c 2013-04-17 14:07:24.352693211 +0200
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.4.bb b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.4.bb
deleted file mode 100644
index 9adb29c..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.4.bb
+++ /dev/null
@@ -1,110 +0,0 @@
-SUMMARY = "XML C Parser Library and Toolkit"
-DESCRIPTION = "The XML Parser Library allows for manipulation of XML files. Libxml2 exports Push and Pull type parser interfaces for both XML and HTML. It can do DTD validation at parse time, on a parsed document instance or with an arbitrary DTD. Libxml2 includes complete XPath, XPointer and Xinclude implementations. It also has a SAX like interface, which is designed to be compatible with Expat."
-HOMEPAGE = "http://www.xmlsoft.org/"
-BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2"
-SECTION = "libs"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \
- file://hash.c;beginline=6;endline=15;md5=96f7296605eae807670fb08947829969 \
- file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \
- file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e"
-
-DEPENDS = "zlib virtual/libiconv"
-
-SRC_URI = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \
- http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar \
- file://libxml-64bit.patch \
- file://ansidecl.patch \
- file://runtest.patch \
- file://run-ptest \
- file://python-sitepackages-dir.patch \
- file://libxml-m4-use-pkgconfig.patch \
- file://libxml2-fix_node_comparison.patch \
- file://libxml2-CVE-2016-5131.patch \
- file://libxml2-CVE-2016-4658.patch \
- file://libxml2-fix_NULL_pointer_derefs.patch \
- file://libxml2-fix_and_simplify_xmlParseStartTag2.patch \
- file://libxml2-CVE-2017-9047_CVE-2017-9048.patch \
- file://libxml2-CVE-2017-9049_CVE-2017-9050.patch \
- file://libxml2-CVE-2017-5969.patch \
- file://libxml2-CVE-2017-0663.patch \
- file://libxml2-CVE-2017-8872.patch \
- file://0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch \
- "
-
-SRC_URI[libtar.md5sum] = "ae249165c173b1ff386ee8ad676815f5"
-SRC_URI[libtar.sha256sum] = "ffb911191e509b966deb55de705387f14156e1a56b21824357cdf0053233633c"
-SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a"
-SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
-
-BINCONFIG = "${bindir}/xml2-config"
-
-PACKAGECONFIG ??= "python \
- ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
-"
-PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-inherit autotools pkgconfig binconfig-disabled ptest
-
-inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)}
-
-RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-argparse python3-logging python3-shell python3-signal python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}"
-
-RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}"
-
-RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us glibc-gconv-ibm1141 glibc-gconv-iso8859-5"
-
-export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
-
-# WARNING: zlib is required for RPM use
-EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
-EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
-EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
-EXTRA_OECONF_linuxstdbase = "--with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib"
-
-python populate_packages_prepend () {
- # autonamer would call this libxml2-2, but we don't want that
- if d.getVar('DEBIAN_NAMES'):
- d.setVar('PKG_libxml2', '${MLPREFIX}libxml2')
-}
-
-PACKAGES += "${PN}-utils ${PN}-python"
-
-FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
-FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*"
-FILES_${PN}-utils += "${bindir}/*"
-FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
-
-do_configure_prepend () {
- # executables take longer to package: these should not be executable
- find ${WORKDIR}/xmlconf/ -type f -exec chmod -x {} \+
-}
-
-do_install_ptest () {
- cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH}
- if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then
- sed -i -e 's|^\(PYTHON = \).*|\1${USRBINPATH}/${PYTHON_PN}|' \
- ${D}${PTEST_PATH}/python/tests/Makefile
- grep -lrZ '#!/usr/bin/python' ${D}${PTEST_PATH}/python |
- xargs -0 sed -i -e 's|/usr/bin/python|${USRBINPATH}/${PYTHON_PN}|'
- fi
- #Remove build host references from various Makefiles
- find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
- sed -i \
- -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
- -e 's|${DEBUG_PREFIX_MAP}||g' \
- -e 's:${HOSTTOOLS_DIR}/::g' \
- -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
- -e 's:${RECIPE_SYSROOT}::g' \
- -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
- -e '/^RELDATE/d' \
- {} +
-}
-
-do_install_append_class-native () {
- # Docs are not needed in the native case
- rm ${D}${datadir}/gtk-doc -rf
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.7.bb b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.7.bb
new file mode 100644
index 0000000..2fb90a6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.7.bb
@@ -0,0 +1,105 @@
+SUMMARY = "XML C Parser Library and Toolkit"
+DESCRIPTION = "The XML Parser Library allows for manipulation of XML files. Libxml2 exports Push and Pull type parser interfaces for both XML and HTML. It can do DTD validation at parse time, on a parsed document instance or with an arbitrary DTD. Libxml2 includes complete XPath, XPointer and Xinclude implementations. It also has a SAX like interface, which is designed to be compatible with Expat."
+HOMEPAGE = "http://www.xmlsoft.org/"
+BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \
+ file://hash.c;beginline=6;endline=15;md5=96f7296605eae807670fb08947829969 \
+ file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \
+ file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e"
+
+DEPENDS = "zlib virtual/libiconv"
+
+SRC_URI = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \
+ http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar \
+ file://libxml-64bit.patch \
+ file://ansidecl.patch \
+ file://runtest.patch \
+ file://run-ptest \
+ file://python-sitepackages-dir.patch \
+ file://libxml-m4-use-pkgconfig.patch \
+ file://0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch \
+ file://fix-execution-of-ptests.patch \
+ "
+
+SRC_URI[libtar.md5sum] = "896608641a08b465098a40ddf51cefba"
+SRC_URI[libtar.sha256sum] = "f63c5e7d30362ed28b38bfa1ac6313f9a80230720b7fb6c80575eeab3ff5900c"
+SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a"
+SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
+
+BINCONFIG = "${bindir}/xml2-config"
+
+PACKAGECONFIG ??= "python \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+"
+PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+inherit autotools pkgconfig binconfig-disabled ptest
+
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)}
+
+RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-logging python3-shell python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}"
+
+RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}"
+
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us glibc-gconv-ibm1141 glibc-gconv-iso8859-5"
+
+export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
+
+# WARNING: zlib is required for RPM use
+EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
+EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF_linuxstdbase = "--with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib"
+
+python populate_packages_prepend () {
+ # autonamer would call this libxml2-2, but we don't want that
+ if d.getVar('DEBIAN_NAMES'):
+ d.setVar('PKG_libxml2', '${MLPREFIX}libxml2')
+}
+
+PACKAGES += "${PN}-utils ${PN}-python"
+
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
+FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*"
+FILES_${PN}-utils += "${bindir}/*"
+FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
+
+do_configure_prepend () {
+ # executables take longer to package: these should not be executable
+ find ${WORKDIR}/xmlconf/ -type f -exec chmod -x {} \+
+}
+
+do_compile_ptest() {
+ oe_runmake check-am
+}
+
+do_install_ptest () {
+ cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH}
+ if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then
+ sed -i -e 's|^\(PYTHON = \).*|\1${USRBINPATH}/${PYTHON_PN}|' \
+ ${D}${PTEST_PATH}/python/tests/Makefile
+ grep -lrZ '#!/usr/bin/python' ${D}${PTEST_PATH}/python |
+ xargs -0 sed -i -e 's|/usr/bin/python|${USRBINPATH}/${PYTHON_PN}|'
+ fi
+ #Remove build host references from various Makefiles
+ find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
+ sed -i \
+ -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ -e '/^RELDATE/d' \
+ {} +
+}
+
+do_install_append_class-native () {
+ # Docs are not needed in the native case
+ rm ${D}${datadir}/gtk-doc -rf
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/dummy-sdk-package.inc b/import-layers/yocto-poky/meta/recipes-core/meta/dummy-sdk-package.inc
new file mode 100644
index 0000000..ed83dd7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/dummy-sdk-package.inc
@@ -0,0 +1,24 @@
+SUMMARY = "Dummy packages which handle excluding packages from the sdk, e.g. ensuring perl is excluded from buildtools"
+LICENSE = "MIT"
+
+inherit allarch
+
+python() {
+ # Put the package somewhere separate to ensure it's never used except
+ # when we want it
+ # (note that we have to do this in anonymous python here to avoid
+ # allarch.bbclass disabling itself)
+ d.setVar('PACKAGE_ARCH', '${DUMMYARCH}')
+}
+
+ALLOW_EMPTY_${PN} = "1"
+
+PR[vardeps] += "DUMMYPROVIDES"
+
+python populate_packages_prepend() {
+ p = d.getVar("PN")
+ d.appendVar("RPROVIDES_%s" % p, "${DUMMYPROVIDES}")
+ #d.appendVar("RCONFLICTS_%s" % p, "${DUMMYPROVIDES}")
+ #d.appendVar("RREPLACES_%s" % p, "${DUMMYPROVIDES}")
+}
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb b/import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb
index 29da121..09f757a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb
@@ -55,6 +55,8 @@
# Add version information
toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS}
+
+ toolchain_create_post_relocate_script ${SDK_OUTPUT}/${SDKPATH}/post-relocate-setup.sh
}
do_install() {
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb b/import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb
index 02abd8a..b299861 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb
@@ -3,6 +3,8 @@
INHIBIT_DEFAULT_DEPS = "1"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
addtask do_allpackagedata before do_build
do_allpackagedata() {
:
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb b/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
index 0b58a02..f5bcb82 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
@@ -1,26 +1,11 @@
-SUMMARY = "Dummy package which ensures perl is excluded from buildtools"
-LICENSE = "MIT"
+DUMMYARCH = "buildtools-dummy-${SDKPKGSUFFIX}"
-inherit allarch
+DUMMYPROVIDES = "\
+ nativesdk-perl \
+ nativesdk-perl-module-file-path"
PR = "r2"
-python() {
- # Put the package somewhere separate to ensure it's never used except
- # when we want it
- # (note that we have to do this in anonymous python here to avoid
- # allarch.bbclass disabling itself)
- d.setVar('PACKAGE_ARCH', 'buildtools-dummy-${SDKPKGSUFFIX}')
-}
+require dummy-sdk-package.inc
-PERLPACKAGES = "nativesdk-perl \
- nativesdk-perl-module-file-path"
-
-ALLOW_EMPTY_${PN} = "1"
-
-python populate_packages_prepend() {
- d.appendVar(d.expand('RPROVIDES_${PN}'), '${PERLPACKAGES}')
- d.appendVar(d.expand('RCONFLICTS_${PN}'), '${PERLPACKAGES}')
- d.appendVar(d.expand('RREPLACES_${PN}'), '${PERLPACKAGES}')
-}
-
+inherit nativesdk
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb b/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
new file mode 100644
index 0000000..11a727d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
@@ -0,0 +1,15 @@
+DUMMYARCH = "sdk-provides-dummy-${SDKPKGSUFFIX}"
+
+# Add /bin/sh?
+DUMMYPROVIDES = "\
+ /bin/bash \
+ /usr/bin/env \
+ /usr/bin/perl \
+ pkgconfig \
+ libGL.so()(64bit) \
+ libGL.so \
+"
+
+require dummy-sdk-package.inc
+
+inherit nativesdk
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb b/import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb
index 2c1cc38..1e1c7e3 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb
@@ -41,6 +41,7 @@
}
do_get_public_keys[cleandirs] = "${B}"
addtask get_public_keys before do_install
+do_get_public_keys[depends] += "gnupg-native:do_populate_sysroot"
do_install () {
if [ -f "${B}/rpm-key" ]; then
@@ -68,7 +69,8 @@
do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_RPM}"
# cleandirs should possibly be in deploy.bbclass but we need it
do_deploy[cleandirs] = "${DEPLOYDIR}"
-# clear stamp-extra-info since MACHINE is normally put there by deploy.bbclass
+# clear stamp-extra-info since MACHINE_ARCH is normally put there by
+# deploy.bbclass
do_deploy[stamp-extra-info] = ""
addtask deploy after do_get_public_keys
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb b/import-layers/yocto-poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb
new file mode 100644
index 0000000..714d15d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb
@@ -0,0 +1,11 @@
+DUMMYARCH = "sdk-provides-dummy-target"
+
+DUMMYPROVIDES = "\
+ /bin/sh \
+ /bin/bash \
+ /usr/bin/env \
+ /usr/bin/perl \
+ pkgconfig \
+"
+
+require dummy-sdk-package.inc
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/testexport-tarball.bb b/import-layers/yocto-poky/meta/recipes-core/meta/testexport-tarball.bb
index 72f5531..c38ac90 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/testexport-tarball.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/testexport-tarball.bb
@@ -10,7 +10,13 @@
TOOLCHAIN_HOST_TASK ?= "${TEST_EXPORT_SDK_PACKAGES}"
-SDK_PACKAGE_ARCHS += "tesexport-tools-${SDKPKGSUFFIX}"
+MULTIMACH_TARGET_SYS = "${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
+PACKAGE_ARCH = "${SDK_ARCH}_${SDK_OS}"
+PACKAGE_ARCHS = ""
+TARGET_ARCH = "none"
+TARGET_OS = "none"
+
+SDK_PACKAGE_ARCHS += "testexport-tools-${SDKPKGSUFFIX}"
TOOLCHAIN_OUTPUTNAME ?= "${TEST_EXPORT_SDK_NAME}"
@@ -22,7 +28,15 @@
inherit meta
inherit populate_sdk
-inherit toolchain-scripts
+inherit toolchain-scripts-base
+inherit nopackages
+
+deltask install
+deltask populate_sysroot
+
+do_populate_sdk[stamp-extra-info] = "${PACKAGE_ARCH}"
+
+REAL_MULTIMACH_TARGET_SYS = "none"
create_sdk_files_append () {
rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config-*
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb b/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
index 5fabf7f..38c3a31 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
@@ -13,6 +13,7 @@
nativesdk-glibc-gconv-utf-16 \
nativesdk-glibc-gconv-cp1252 \
nativesdk-patchelf \
+ nativesdk-libxcrypt \
"
INHIBIT_DEFAULT_DEPS = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers.bb b/import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers.bb
rename to import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h b/import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-cdefs.h
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h
rename to import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-cdefs.h
diff --git a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-queue.h b/import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-queue.h
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-queue.h
rename to import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-queue.h
diff --git a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-tree.h b/import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-tree.h
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-tree.h
rename to import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-tree.h
diff --git a/import-layers/yocto-poky/meta/recipes-core/musl/musl-utils.bb b/import-layers/yocto-poky/meta/recipes-core/musl/musl-utils.bb
new file mode 100644
index 0000000..74b846d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/musl/musl-utils.bb
@@ -0,0 +1,25 @@
+# Copyright (C) 2018 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "getconf, getent and iconv implementations for musl"
+HOMEPAGE = "https://git.alpinelinux.org/cgit/aports/tree/main/musl"
+LICENSE = "BSD-2-Clause & GPL-2.0+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=9d08215e611db87b357e8674b4b42564"
+SECTION = "utils"
+
+# Date of the commit in SRCREV
+PV = "20170421"
+
+SRCREV = "fb5630138ccabbbc14a19d372096a04e42573c7d"
+SRC_URI = "git://github.com/boltlinux/musl-utils"
+
+inherit autotools
+
+S = "${WORKDIR}/git"
+
+PACKAGES =+ "${PN}-iconv"
+
+FILES_${PN}-iconv = "${bindir}/iconv"
+
+COMPATIBLE_HOST = ".*-musl.*"
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc b/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc
index 9af1172..ba9b1a0 100644
--- a/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc
@@ -9,7 +9,7 @@
HOMEPAGE = "http://www.musl-libc.org/"
LICENSE = "MIT"
SECTION = "libs"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=7928b7ad32ceda04932478e330e52f7f"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=2b9032093c4765e49ae85ddeba29afff"
PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
diff --git a/import-layers/yocto-poky/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch b/import-layers/yocto-poky/meta/recipes-core/musl/musl/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
rename to import-layers/yocto-poky/meta/recipes-core/musl/musl/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
diff --git a/import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb b/import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb
index db26b4f..9f8c512 100644
--- a/import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb
@@ -3,9 +3,9 @@
require musl.inc
-SRCREV = "eb03bde2f24582874cb72b56c7811bf51da0c817"
+SRCREV = "55df09bfccbfe21fc9dd7d8f94550c0ff25ace04"
-PV = "1.1.18+git${SRCPV}"
+PV = "1.1.19+git${SRCPV}"
# mirror is at git://github.com/kraj/musl.git
@@ -15,7 +15,7 @@
S = "${WORKDIR}/git"
-PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc virtual/libiconv virtual/libintl"
+PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc virtual/libiconv virtual/libintl virtual/crypt"
DEPENDS = "virtual/${TARGET_PREFIX}binutils \
virtual/${TARGET_PREFIX}gcc-initial \
diff --git a/import-layers/yocto-poky/meta/recipes-core/ncurses/files/CVE-2017-13732-CVE-2017-13734-CVE-2017-13730-CVE-2017-13729-CVE-2017-13728-CVE-2017-13731.patch b/import-layers/yocto-poky/meta/recipes-core/ncurses/files/CVE-2017-13732-CVE-2017-13734-CVE-2017-13730-CVE-2017-13729-CVE-2017-13728-CVE-2017-13731.patch
deleted file mode 100644
index a19332c..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/ncurses/files/CVE-2017-13732-CVE-2017-13734-CVE-2017-13730-CVE-2017-13729-CVE-2017-13728-CVE-2017-13731.patch
+++ /dev/null
@@ -1,541 +0,0 @@
-From 4bf72cb8f1d3aa5f33c31eb817a5f0338f4aaf6f Mon Sep 17 00:00:00 2001
-From: Ovidiu Panait <ovidiu.panait@windriver.com>
-Date: Wed, 20 Sep 2017 05:02:00 +0000
-Subject: [PATCH] Import upstream patch 20170826
-
-20170826
- + fixes for "iterm2" (report by Leonardo Brondani Schenkel) -TD
- + corrected a warning from tic about keys which are the same, to skip
- over missing/cancelled values.
- + add check in tic for unnecessary use of "2" to denote a shifted
- special key.
- + improve checks in trim_sgr0, comp_parse.c and parse_entry.c, for
- cancelled string capabilities.
- + add check in _nc_parse_entry() for invalid entry name, setting the
- name to "invalid" to avoid problems storing entries.
- + add/improve checks in tic's parser to address invalid input
- + add a check in comp_scan.c to handle the special case where a
- nontext file ending with a NUL rather than newline is given to tic
- as input (Redhat #1484274).
- + allow for cancelled capabilities in _nc_save_str (Redhat #1484276).
- + add validity checks for "use=" target in _nc_parse_entry (Redhat
- #1484284).
- + check for invalid strings in postprocess_termcap (Redhat #1484285)
- + reset secondary pointers on EOF in next_char() (Redhat #1484287).
- + guard _nc_safe_strcpy() and _nc_safe_strcat() against calls using
- cancelled strings (Redhat #1484291).
- + correct typo in curs_memleaks.3x (Sven Joachim).
- + improve test/configure checks for some curses variants not based on
- X/Open Curses.
- + add options for test/configure to disable checks for form, menu and
- panel libraries.
-
-Upstream-Status: Backport
-CVE: CVE-2017-13732, CVE-2017-13734, CVE-2017-13730, CVE-2017-13729, CVE-2017-13728, CVE-2017-13731
-
-
-Author: Sven Joachim <svenjoac@gmx.de>
-Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
----
- dist.mk | 4 +-
- include/ncurses_defs | 4 +-
- ncurses/tinfo/alloc_entry.c | 4 +-
- ncurses/tinfo/comp_parse.c | 10 ++---
- ncurses/tinfo/comp_scan.c | 6 ++-
- ncurses/tinfo/parse_entry.c | 91 ++++++++++++++++++++++++++++++---------------
- ncurses/tinfo/strings.c | 9 +++--
- ncurses/tinfo/trim_sgr0.c | 4 +-
- progs/tic.c | 75 ++++++++++++++++++++++++++++++++++++-
- 9 files changed, 157 insertions(+), 50 deletions(-)
-
-diff --git a/dist.mk b/dist.mk
-index 9af2699..2c70472 100644
---- a/dist.mk
-+++ b/dist.mk
-@@ -25,7 +25,7 @@
- # use or other dealings in this Software without prior written #
- # authorization. #
- ##############################################################################
--# $Id: dist.mk,v 1.1172 2017/07/13 00:15:27 tom Exp $
-+# $Id: dist.mk,v 1.1179 2017/08/20 15:33:41 tom Exp $
- # Makefile for creating ncurses distributions.
- #
- # This only needs to be used directly as a makefile by developers, but
-@@ -37,7 +37,7 @@ SHELL = /bin/sh
- # These define the major/minor/patch versions of ncurses.
- NCURSES_MAJOR = 6
- NCURSES_MINOR = 0
--NCURSES_PATCH = 20170715
-+NCURSES_PATCH = 20170826
-
- # We don't append the patch to the version, since this only applies to releases
- VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
-diff --git a/include/ncurses_defs b/include/ncurses_defs
-index e6611b7..d237db1 100644
---- a/include/ncurses_defs
-+++ b/include/ncurses_defs
-@@ -1,4 +1,4 @@
--# $Id: ncurses_defs,v 1.73 2017/06/24 14:20:57 tom Exp $
-+# $Id: ncurses_defs,v 1.75 2017/08/20 16:50:04 tom Exp $
- ##############################################################################
- # Copyright (c) 2000-2016,2017 Free Software Foundation, Inc. #
- # #
-@@ -50,7 +50,9 @@ HAVE_BSD_STRING_H
- HAVE_BTOWC
- HAVE_BUILTIN_H
- HAVE_CHGAT 1
-+HAVE_COLOR_CONTENT 1
- HAVE_COLOR_SET 1
-+HAVE_CURSCR 1
- HAVE_DIRENT_H
- HAVE_ERRNO
- HAVE_FCNTL_H
-diff --git a/ncurses/tinfo/alloc_entry.c b/ncurses/tinfo/alloc_entry.c
-index 5de09f1..09374d6 100644
---- a/ncurses/tinfo/alloc_entry.c
-+++ b/ncurses/tinfo/alloc_entry.c
-@@ -47,7 +47,7 @@
-
- #include <tic.h>
-
--MODULE_ID("$Id: alloc_entry.c,v 1.60 2017/06/27 23:48:55 tom Exp $")
-+MODULE_ID("$Id: alloc_entry.c,v 1.61 2017/08/25 09:09:08 tom Exp $")
-
- #define ABSENT_OFFSET -1
- #define CANCELLED_OFFSET -2
-@@ -98,7 +98,7 @@ _nc_save_str(const char *const string)
- size_t old_next_free = next_free;
- size_t len;
-
-- if (string == 0)
-+ if (!VALID_STRING(string))
- return _nc_save_str("");
- len = strlen(string) + 1;
-
-diff --git a/ncurses/tinfo/comp_parse.c b/ncurses/tinfo/comp_parse.c
-index 34e6216..580d4df 100644
---- a/ncurses/tinfo/comp_parse.c
-+++ b/ncurses/tinfo/comp_parse.c
-@@ -47,7 +47,7 @@
-
- #include <tic.h>
-
--MODULE_ID("$Id: comp_parse.c,v 1.96 2017/04/15 15:36:58 tom Exp $")
-+MODULE_ID("$Id: comp_parse.c,v 1.99 2017/08/26 16:15:50 tom Exp $")
-
- static void sanity_check2(TERMTYPE2 *, bool);
- NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2;
-@@ -510,9 +510,9 @@ static void
- fixup_acsc(TERMTYPE2 *tp, int literal)
- {
- if (!literal) {
-- if (acs_chars == 0
-- && enter_alt_charset_mode != 0
-- && exit_alt_charset_mode != 0)
-+ if (acs_chars == ABSENT_STRING
-+ && PRESENT(enter_alt_charset_mode)
-+ && PRESENT(exit_alt_charset_mode))
- acs_chars = strdup(VT_ACSC);
- }
- }
-@@ -568,9 +568,7 @@ sanity_check2(TERMTYPE2 *tp, bool literal)
- PAIRED(enter_xon_mode, exit_xon_mode);
- PAIRED(enter_am_mode, exit_am_mode);
- ANDMISSING(label_off, label_on);
--#ifdef remove_clock
- PAIRED(display_clock, remove_clock);
--#endif
- ANDMISSING(set_color_pair, initialize_pair);
- }
-
-diff --git a/ncurses/tinfo/comp_scan.c b/ncurses/tinfo/comp_scan.c
-index 40d7f6a..b207257 100644
---- a/ncurses/tinfo/comp_scan.c
-+++ b/ncurses/tinfo/comp_scan.c
-@@ -50,7 +50,7 @@
- #include <ctype.h>
- #include <tic.h>
-
--MODULE_ID("$Id: comp_scan.c,v 1.106 2017/04/22 11:41:12 tom Exp $")
-+MODULE_ID("$Id: comp_scan.c,v 1.108 2017/08/25 22:57:21 tom Exp $")
-
- /*
- * Maximum length of string capability we'll accept before raising an error.
-@@ -168,6 +168,8 @@ next_char(void)
- if (result != 0) {
- FreeAndNull(result);
- FreeAndNull(pushname);
-+ bufptr = 0;
-+ bufstart = 0;
- allocated = 0;
- }
- /*
-@@ -222,6 +224,8 @@ next_char(void)
- }
- if ((bufptr = bufstart) != 0) {
- used = strlen(bufptr);
-+ if (used == 0)
-+ return (EOF);
- while (iswhite(*bufptr)) {
- if (*bufptr == '\t') {
- _nc_curr_col = (_nc_curr_col | 7) + 1;
-diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c
-index 3fa2f25..bbbfcb2 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.86 2017/06/28 00:53:12 tom Exp $")
-+MODULE_ID("$Id: parse_entry.c,v 1.91 2017/08/26 16:13:34 tom Exp $")
-
- #ifdef LINT
- static short const parametrized[] =
-@@ -180,6 +180,20 @@ _nc_extend_names(ENTRY * entryp, char *name, int token_type)
- }
- #endif /* NCURSES_XNAMES */
-
-+static bool
-+valid_entryname(const char *name)
-+{
-+ bool result = TRUE;
-+ int ch;
-+ while ((ch = UChar(*name++)) != '\0') {
-+ if (ch <= ' ' || ch > '~' || ch == '/') {
-+ result = FALSE;
-+ break;
-+ }
-+ }
-+ return result;
-+}
-+
- /*
- * int
- * _nc_parse_entry(entry, literal, silent)
-@@ -211,6 +225,7 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
- int token_type;
- struct name_table_entry const *entry_ptr;
- char *ptr, *base;
-+ const char *name;
- bool bad_tc_usage = FALSE;
-
- token_type = _nc_get_token(silent);
-@@ -261,7 +276,12 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
- * results in the terminal type getting prematurely set to correspond
- * to that of the next entry.
- */
-- _nc_set_type(_nc_first_name(entryp->tterm.term_names));
-+ name = _nc_first_name(entryp->tterm.term_names);
-+ if (!valid_entryname(name)) {
-+ _nc_warning("invalid entry name \"%s\"", name);
-+ name = "invalid";
-+ }
-+ _nc_set_type(name);
-
- /* check for overly-long names and aliases */
- for (base = entryp->tterm.term_names; (ptr = strchr(base, '|')) != 0;
-@@ -283,13 +303,24 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
- bool is_use = (strcmp(_nc_curr_token.tk_name, "use") == 0);
- bool is_tc = !is_use && (strcmp(_nc_curr_token.tk_name, "tc") == 0);
- if (is_use || is_tc) {
-+ if (!VALID_STRING(_nc_curr_token.tk_valstring)
-+ || _nc_curr_token.tk_valstring[0] == '\0') {
-+ _nc_warning("missing name for use-clause");
-+ continue;
-+ } else if (!valid_entryname(_nc_curr_token.tk_valstring)) {
-+ _nc_warning("invalid name for use-clause \"%s\"",
-+ _nc_curr_token.tk_valstring);
-+ continue;
-+ } else if (entryp->nuses >= MAX_USES) {
-+ _nc_warning("too many use-clauses, ignored \"%s\"",
-+ _nc_curr_token.tk_valstring);
-+ continue;
-+ }
- entryp->uses[entryp->nuses].name = _nc_save_str(_nc_curr_token.tk_valstring);
- entryp->uses[entryp->nuses].line = _nc_curr_line;
-- if (VALID_STRING(entryp->uses[entryp->nuses].name)) {
-- entryp->nuses++;
-- if (entryp->nuses > 1 && is_tc) {
-- BAD_TC_USAGE
-- }
-+ entryp->nuses++;
-+ if (entryp->nuses > 1 && is_tc) {
-+ BAD_TC_USAGE
- }
- } else {
- /* normal token lookup */
-@@ -641,13 +672,6 @@ static const char C_BS[] = "\b";
- static const char C_HT[] = "\t";
-
- /*
-- * Note that WANTED and PRESENT are not simple inverses! If a capability
-- * has been explicitly cancelled, it's not considered WANTED.
-- */
--#define WANTED(s) ((s) == ABSENT_STRING)
--#define PRESENT(s) (((s) != ABSENT_STRING) && ((s) != CANCELLED_STRING))
--
--/*
- * This bit of legerdemain turns all the terminfo variable names into
- * references to locations in the arrays Booleans, Numbers, and Strings ---
- * precisely what's needed.
-@@ -672,10 +696,10 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
-
- /* if there was a tc entry, assume we picked up defaults via that */
- if (!has_base) {
-- if (WANTED(init_3string) && termcap_init2)
-+ if (WANTED(init_3string) && PRESENT(termcap_init2))
- init_3string = _nc_save_str(termcap_init2);
-
-- if (WANTED(reset_2string) && termcap_reset)
-+ if (WANTED(reset_2string) && PRESENT(termcap_reset))
- reset_2string = _nc_save_str(termcap_reset);
-
- if (WANTED(carriage_return)) {
-@@ -790,7 +814,7 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
- if (init_tabs != 8 && init_tabs != ABSENT_NUMERIC)
- _nc_warning("hardware tabs with a width other than 8: %d", init_tabs);
- else {
-- if (tab && _nc_capcmp(tab, C_HT))
-+ if (PRESENT(tab) && _nc_capcmp(tab, C_HT))
- _nc_warning("hardware tabs with a non-^I tab string %s",
- _nc_visbuf(tab));
- else {
-@@ -867,17 +891,22 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
- * The magic moment -- copy the mapped key string over,
- * stripping out padding.
- */
-- for (dp = buf2, bp = tp->Strings[from_ptr->nte_index]; *bp; bp++) {
-- if (bp[0] == '$' && bp[1] == '<') {
-- while (*bp && *bp != '>') {
-- ++bp;
-- }
-- } else
-- *dp++ = *bp;
-- }
-- *dp = '\0';
-+ bp = tp->Strings[from_ptr->nte_index];
-+ if (VALID_STRING(bp)) {
-+ for (dp = buf2; *bp; bp++) {
-+ if (bp[0] == '$' && bp[1] == '<') {
-+ while (*bp && *bp != '>') {
-+ ++bp;
-+ }
-+ } else
-+ *dp++ = *bp;
-+ }
-+ *dp = '\0';
-
-- tp->Strings[to_ptr->nte_index] = _nc_save_str(buf2);
-+ tp->Strings[to_ptr->nte_index] = _nc_save_str(buf2);
-+ } else {
-+ tp->Strings[to_ptr->nte_index] = bp;
-+ }
- }
-
- /*
-@@ -886,7 +915,7 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
- * got mapped to kich1 and im to kIC to avoid a collision.
- * If the description has im but not ic, hack kIC back to kich1.
- */
-- if (foundim && WANTED(key_ic) && key_sic) {
-+ if (foundim && WANTED(key_ic) && PRESENT(key_sic)) {
- key_ic = key_sic;
- key_sic = ABSENT_STRING;
- }
-@@ -938,9 +967,9 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
- acs_chars = _nc_save_str(buf2);
- _nc_warning("acsc string synthesized from XENIX capabilities");
- }
-- } else if (acs_chars == 0
-- && enter_alt_charset_mode != 0
-- && exit_alt_charset_mode != 0) {
-+ } else if (acs_chars == ABSENT_STRING
-+ && PRESENT(enter_alt_charset_mode)
-+ && PRESENT(exit_alt_charset_mode)) {
- acs_chars = _nc_save_str(VT_ACSC);
- }
- }
-diff --git a/ncurses/tinfo/strings.c b/ncurses/tinfo/strings.c
-index 393d8e7..10ec6c8 100644
---- a/ncurses/tinfo/strings.c
-+++ b/ncurses/tinfo/strings.c
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2000-2007,2012 Free Software Foundation, Inc. *
-+ * Copyright (c) 2000-2012,2017 Free Software Foundation, Inc. *
- * *
- * Permission is hereby granted, free of charge, to any person obtaining a *
- * copy of this software and associated documentation files (the *
-@@ -35,8 +35,9 @@
- **/
-
- #include <curses.priv.h>
-+#include <tic.h>
-
--MODULE_ID("$Id: strings.c,v 1.8 2012/02/22 22:34:31 tom Exp $")
-+MODULE_ID("$Id: strings.c,v 1.9 2017/08/26 13:16:11 tom Exp $")
-
- /****************************************************************************
- * Useful string functions (especially for mvcur)
-@@ -105,7 +106,7 @@ _nc_str_copy(string_desc * dst, string_desc * src)
- NCURSES_EXPORT(bool)
- _nc_safe_strcat(string_desc * dst, const char *src)
- {
-- if (src != 0) {
-+ if (PRESENT(src)) {
- size_t len = strlen(src);
-
- if (len < dst->s_size) {
-@@ -126,7 +127,7 @@ _nc_safe_strcat(string_desc * dst, const char *src)
- NCURSES_EXPORT(bool)
- _nc_safe_strcpy(string_desc * dst, const char *src)
- {
-- if (src != 0) {
-+ if (PRESENT(src)) {
- size_t len = strlen(src);
-
- if (len < dst->s_size) {
-diff --git a/ncurses/tinfo/trim_sgr0.c b/ncurses/tinfo/trim_sgr0.c
-index 4cbcb65..4d92d15 100644
---- a/ncurses/tinfo/trim_sgr0.c
-+++ b/ncurses/tinfo/trim_sgr0.c
-@@ -36,7 +36,7 @@
-
- #include <tic.h>
-
--MODULE_ID("$Id: trim_sgr0.c,v 1.16 2017/04/05 22:33:07 tom Exp $")
-+MODULE_ID("$Id: trim_sgr0.c,v 1.17 2017/08/26 14:54:16 tom Exp $")
-
- #undef CUR
- #define CUR tp->
-@@ -263,7 +263,7 @@ _nc_trim_sgr0(TERMTYPE2 *tp)
- /*
- * If rmacs is a substring of sgr(0), remove that chunk.
- */
-- if (exit_alt_charset_mode != 0) {
-+ if (PRESENT(exit_alt_charset_mode)) {
- TR(TRACE_DATABASE, ("scan for rmacs %s", _nc_visbuf(exit_alt_charset_mode)));
- j = strlen(off);
- k = strlen(exit_alt_charset_mode);
-diff --git a/progs/tic.c b/progs/tic.c
-index c5d78e5..6dd4678 100644
---- a/progs/tic.c
-+++ b/progs/tic.c
-@@ -48,7 +48,7 @@
- #include <parametrized.h>
- #include <transform.h>
-
--MODULE_ID("$Id: tic.c,v 1.233 2017/07/15 17:40:19 tom Exp $")
-+MODULE_ID("$Id: tic.c,v 1.243 2017/08/26 20:56:55 tom Exp $")
-
- #define STDIN_NAME "<stdin>"
-
-@@ -62,6 +62,10 @@ static bool showsummary = FALSE;
- static char **namelst = 0;
- static const char *to_remove;
-
-+#if NCURSES_XNAMES
-+static bool using_extensions = FALSE;
-+#endif
-+
- static void (*save_check_termtype) (TERMTYPE2 *, bool);
- static void check_termtype(TERMTYPE2 *tt, bool);
-
-@@ -850,6 +854,7 @@ main(int argc, char *argv[])
- /* FALLTHRU */
- case 'x':
- use_extended_names(TRUE);
-+ using_extensions = TRUE;
- break;
- #endif
- default:
-@@ -2405,10 +2410,17 @@ check_conflict(TERMTYPE2 *tp)
- const char *a = given[j].value;
- bool first = TRUE;
-
-+ if (!VALID_STRING(a))
-+ continue;
-+
- for (k = j + 1; given[k].keycode; k++) {
- const char *b = given[k].value;
-+
-+ if (!VALID_STRING(b))
-+ continue;
- if (check[k])
- continue;
-+
- if (!_nc_capcmp(a, b)) {
- check[j] = 1;
- check[k] = 1;
-@@ -2431,6 +2443,67 @@ check_conflict(TERMTYPE2 *tp)
- if (!first)
- fprintf(stderr, "\n");
- }
-+#if NCURSES_XNAMES
-+ if (using_extensions) {
-+ /* *INDENT-OFF* */
-+ static struct {
-+ const char *xcurses;
-+ const char *shifted;
-+ } table[] = {
-+ { "kDC", NULL },
-+ { "kDN", "kind" },
-+ { "kEND", NULL },
-+ { "kHOM", NULL },
-+ { "kLFT", NULL },
-+ { "kNXT", NULL },
-+ { "kPRV", NULL },
-+ { "kRIT", NULL },
-+ { "kUP", "kri" },
-+ { NULL, NULL },
-+ };
-+ /* *INDENT-ON* */
-+
-+ /*
-+ * SVr4 curses defines the "xcurses" names listed above except for
-+ * the special cases in the "shifted" column. When using these
-+ * names for xterm's extensions, that was confusing, and resulted
-+ * in adding extended capabilities with "2" (shift) suffix. This
-+ * check warns about unnecessary use of extensions for this quirk.
-+ */
-+ for (j = 0; given[j].keycode; ++j) {
-+ const char *find = given[j].name;
-+ int value;
-+ char ch;
-+
-+ if (!VALID_STRING(given[j].value))
-+ continue;
-+
-+ for (k = 0; table[k].xcurses; ++k) {
-+ const char *test = table[k].xcurses;
-+ size_t size = strlen(test);
-+
-+ if (!strncmp(find, test, size) && strcmp(find, test)) {
-+ switch (sscanf(find + size, "%d%c", &value, &ch)) {
-+ case 1:
-+ if (value == 2) {
-+ _nc_warning("expected '%s' rather than '%s'",
-+ (table[k].shifted
-+ ? table[k].shifted
-+ : test), find);
-+ } else if (value < 2 || value > 15) {
-+ _nc_warning("expected numeric 2..15 '%s'", find);
-+ }
-+ break;
-+ default:
-+ _nc_warning("expected numeric suffix for '%s'", find);
-+ break;
-+ }
-+ break;
-+ }
-+ }
-+ }
-+ }
-+#endif
- free(given);
- free(check);
- }
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses.inc b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses.inc
index 1f21cd4..01e41d5 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses.inc
@@ -13,7 +13,7 @@
inherit autotools binconfig-disabled multilib_header pkgconfig
# Upstream has useful patches at times at ftp://invisible-island.net/ncurses/
-SRC_URI = "git://anonscm.debian.org/collab-maint/ncurses.git"
+SRC_URI = "git://salsa.debian.org/debian/ncurses.git;protocol=https"
EXTRA_AUTORECONF = "-I m4"
CONFIG_SITE =+ "${WORKDIR}/config.cache"
@@ -59,6 +59,7 @@
EX_TERMINFO = ""
EX_TERMINFO_class-native = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo"
EX_TERMINFO_class-nativesdk = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo"
+EX_TERMLIB ?= "tinfo"
# Helper function for do_configure to allow multiple configurations
# $1 the directory to run configure in
@@ -80,7 +81,7 @@
--disable-big-core \
--program-prefix= \
--with-ticlib \
- --with-termlib=tinfo \
+ --with-termlib=${EX_TERMLIB} \
--enable-sigwinch \
--enable-pc-files \
--disable-rpath-hack \
@@ -201,7 +202,10 @@
ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm
fi
- rm -f ${D}${libdir}/terminfo
+ # When changing ${libdir} to e.g. /usr/lib/myawesomelib/ ncurses
+ # still installs '/usr/lib/terminfo', so try to rm both
+ # the proper path and a slightly hardcoded one
+ rm -f ${D}${libdir}/terminfo ${D}${prefix}/lib/terminfo
# create linker scripts for libcurses.so and libncurses to
# link against -ltinfo when needed. Some builds might break
@@ -227,7 +231,7 @@
if [ ! -d "${D}${base_libdir}" ]; then
# Setting base_libdir to libdir as is done in the -native
# case will skip this code
- mkdir ${D}${base_libdir}
+ mkdir -p ${D}${base_libdir}
mv ${D}${libdir}/libncurses.so.* ${D}${base_libdir}
! ${ENABLE_WIDEC} || \
mv ${D}${libdir}/libncursesw.so.* ${D}${base_libdir}
diff --git a/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20170715.bb b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20170715.bb
deleted file mode 100644
index d1da5d1..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20170715.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require ncurses.inc
-
-SRC_URI += "file://0001-tic-hang.patch \
- file://0002-configure-reproducible.patch \
- file://config.cache \
- file://CVE-2017-13732-CVE-2017-13734-CVE-2017-13730-CVE-2017-13729-CVE-2017-13728-CVE-2017-13731.patch \
-"
-# commit id corresponds to the revision in package version
-SRCREV = "52681a6a1a18b4d6eb1a716512d0dd827bd71c87"
-S = "${WORKDIR}/git"
-EXTRA_OECONF += "--with-abi-version=5"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+(\+\d+)*)"
diff --git a/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20171125.bb b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20171125.bb
new file mode 100644
index 0000000..6c4b96f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20171125.bb
@@ -0,0 +1,11 @@
+require ncurses.inc
+
+SRC_URI += "file://0001-tic-hang.patch \
+ file://0002-configure-reproducible.patch \
+ file://config.cache \
+"
+# commit id corresponds to the revision in package version
+SRCREV = "5d849e836052459901cfe0b85a0b2939ff8d2b2a"
+S = "${WORKDIR}/git"
+EXTRA_OECONF += "--with-abi-version=5"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+(\+\d+)*)"
diff --git a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch
index 959b1c6..25e5b58 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch
@@ -17,4 +17,4 @@
+DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -fno-stack-protector -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -fno-PIE -no-pie
DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables
- DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20
+ DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20 -no-pie
diff --git a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf_git.bb b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf_git.bb
index fa0d662..8750b3c 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf_git.bb
@@ -151,7 +151,7 @@
do_compile_class-target() {
export LFLAGS="${LDFLAGS}"
- PARALLEL_JOBS="${@ '${PARALLEL_MAKE}'.replace('-j', '-n ')}"
+ PARALLEL_JOBS="${@oe.utils.parallel_make_argument(d, '-n %d')}"
OVMF_ARCH="X64"
if [ "${TARGET_ARCH}" != "x86_64" ] ; then
OVMF_ARCH="IA32"
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
index aee4a03..e2f6169 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
@@ -23,8 +23,8 @@
nativesdk-makedevs \
nativesdk-dnf \
nativesdk-cmake \
- nativesdk-postinst-intercept \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'nativesdk-wayland', '', d)} \
+ nativesdk-sdk-provides-dummy \
"
RDEPENDS_${PN}_darwin = "\
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb
index f9e6e2e..bb192ae 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb
@@ -54,7 +54,6 @@
packagegroup-distro-base \
packagegroup-machine-base \
\
- sysfsutils \
module-init-tools \
${@bb.utils.contains('MACHINE_FEATURES', 'apm', 'packagegroup-base-apm', '',d)} \
${@bb.utils.contains('MACHINE_FEATURES', 'acpi', 'packagegroup-base-acpi', '',d)} \
@@ -152,8 +151,7 @@
SUMMARY_packagegroup-base-acpi = "ACPI support"
RDEPENDS_packagegroup-base-acpi = "\
- acpid \
- libacpi "
+ acpid"
SUMMARY_packagegroup-base-apm = "APM support"
RDEPENDS_packagegroup-base-apm = "\
@@ -292,8 +290,6 @@
SUMMARY_packagegroup-base-wifi = "WiFi support"
RDEPENDS_packagegroup-base-wifi = "\
${VIRTUAL-RUNTIME_wireless-tools} \
- ${@bb.utils.contains('COMBINED_FEATURES', 'pcmcia', 'hostap-utils', '',d)} \
- ${@bb.utils.contains('COMBINED_FEATURES', 'pci', 'hostap-utils', '',d)} \
wpa-supplicant"
RRECOMMENDS_packagegroup-base-wifi = "\
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
index 04bc0f2..76cd7fc 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
@@ -23,6 +23,8 @@
VIRTUAL-RUNTIME_initscripts ?= "initscripts"
VIRTUAL-RUNTIME_keymaps ?= "keymaps"
+EFI_PROVIDER ??= "grub-efi"
+
SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc', '${VIRTUAL-RUNTIME_base-utils-hwclock}', '', d)} \
modutils-initscripts \
init-ifupdown \
@@ -35,6 +37,7 @@
${VIRTUAL-RUNTIME_base-utils} \
${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${SYSVINIT_SCRIPTS}", "", d)} \
${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \
+ ${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER} kernel", "", d)} \
netbase \
${VIRTUAL-RUNTIME_login_manager} \
${VIRTUAL-RUNTIME_init_manager} \
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
index af0ce20..45e8c13 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
@@ -27,11 +27,10 @@
tcl"
SANITIZERS = "libasan-dev libubsan-dev"
-SANITIZERS_aarch64 = ""
+SANITIZERS_microblaze = ""
SANITIZERS_mipsarch = ""
SANITIZERS_nios2 = ""
-SANITIZERS_powerpc64 = ""
-SANITIZERS_sparc = ""
+SANITIZERS_riscv64 = ""
SANITIZERS_libc-musl = ""
RRECOMMENDS_packagegroup-core-sdk = "\
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
index a8e47da..fa0e363 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
@@ -26,7 +26,6 @@
PROFILETOOLS = "\
powertop \
- latencytop \
"
PERF = "perf"
PERF_libc-musl = ""
@@ -34,16 +33,16 @@
# systemtap needs elfutils which is not fully buildable on some arches/libcs
SYSTEMTAP = "systemtap"
SYSTEMTAP_libc-musl = ""
-SYSTEMTAP_mipsarch = ""
SYSTEMTAP_nios2 = ""
-SYSTEMTAP_aarch64 = ""
# lttng-ust uses sched_getcpu() which is not there on for some platforms.
LTTNGUST = "lttng-ust"
LTTNGUST_libc-musl = ""
+LTTNGUST_riscv64 = ""
LTTNGTOOLS = "lttng-tools"
LTTNGTOOLS_libc-musl = ""
+LTTNGTOOLS_riscv64 = ""
LTTNGMODULES = "lttng-modules"
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
index 3170978..b8e5070 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
@@ -10,9 +10,10 @@
inherit packagegroup
-# kexec-tools doesn't work on e5500-64b and nios2 yet
+# kexec-tools doesn't work on e5500-64b, microblaze and nios2 yet
KEXECTOOLS ?= "kexec"
KEXECTOOLS_e5500-64b ?= ""
+KEXECTOOLS_microblaze ?= ""
KEXECTOOLS_nios2 ?= ""
X11GLTOOLS = "\
@@ -25,7 +26,7 @@
X11TOOLS = "\
fstests \
- gst-player \
+ gst-examples \
x11perf \
xrestop \
xwininfo \
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb
index 3e19077..7d2ccbd 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb
@@ -5,4 +5,5 @@
RDEPENDS_${PN} = " \
go-runtime \
go-runtime-dev \
+ go-runtime-staticdev \
"
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
index ff42866..adb0c56 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
@@ -136,7 +136,6 @@
mtools \
ncurses \
ncurses-terminfo-base \
- neon \
nfs-utils \
nfs-utils-client \
openssl \
diff --git a/import-layers/yocto-poky/meta/recipes-core/psplash/psplash_git.bb b/import-layers/yocto-poky/meta/recipes-core/psplash/psplash_git.bb
index 3b7f818..aab2c03 100644
--- a/import-layers/yocto-poky/meta/recipes-core/psplash/psplash_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/psplash/psplash_git.bb
@@ -12,7 +12,7 @@
SRC_URI = "git://git.yoctoproject.org/${BPN} \
file://psplash-init \
${SPLASH_IMAGES}"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_234.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_234.bb
deleted file mode 100644
index 7b18b25..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_234.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-require systemd.inc
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
-
-DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
-
-SRC_URI += "file://0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch"
-
-inherit autotools pkgconfig gettext
-inherit deploy
-
-EFI_CC ?= "${CC}"
-# Man pages are packaged through the main systemd recipe
-EXTRA_OECONF = " --enable-gnuefi \
- --with-efi-includedir=${STAGING_INCDIR} \
- --with-efi-ldsdir=${STAGING_LIBDIR} \
- --with-efi-libdir=${STAGING_LIBDIR} \
- --disable-manpages \
- EFI_CC='${EFI_CC}' \
- "
-
-# Imported from the old gummiboot recipe
-TUNE_CCARGS_remove = "-mfpmath=sse"
-COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
-COMPATIBLE_HOST_linux-gnux32 = "null"
-
-do_compile() {
- SYSTEMD_BOOT_EFI_ARCH="ia32"
- if [ "${TARGET_ARCH}" = "x86_64" ]; then
- SYSTEMD_BOOT_EFI_ARCH="x64"
- fi
-
- oe_runmake systemd-boot${SYSTEMD_BOOT_EFI_ARCH}.efi
-}
-
-do_install() {
- # Bypass systemd installation with a NOP
- :
-}
-
-do_deploy () {
- install ${B}/systemd-boot*.efi ${DEPLOYDIR}
-}
-addtask deploy before do_build after do_compile
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_237.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_237.bb
new file mode 100644
index 0000000..afd3848
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_237.bb
@@ -0,0 +1,70 @@
+require systemd.inc
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
+
+DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
+
+SRC_URI += "file://0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
+ file://0027-remove-nobody-user-group-checking.patch \
+ file://0001-Also-check-i386-i586-and-i686-for-ia32.patch \
+ file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \
+ "
+
+inherit meson pkgconfig gettext
+inherit deploy
+
+EFI_CC ?= "${CC}"
+EXTRA_OEMESON += "-Defi=true \
+ -Dgnu-efi=true \
+ -Defi-includedir=${STAGING_INCDIR}/efi \
+ -Defi-ldsdir=${STAGING_LIBDIR} \
+ -Defi-libdir=${STAGING_LIBDIR} \
+ -Dman=false \
+ -Defi-cc='${EFI_CC}' \
+ -Defi-ld='${LD}' \
+ "
+
+# install to the image as boot*.efi if its the EFI_PROVIDER,
+# otherwise install as the full name.
+# This allows multiple bootloaders to coexist in a single image.
+python __anonymous () {
+ import re
+ target = d.getVar('TARGET_ARCH')
+ prefix = "" if d.getVar('EFI_PROVIDER', True) == "systemd-boot" else "systemd-"
+ if target == "x86_64":
+ systemdimage = prefix + "bootx64.efi"
+ else:
+ systemdimage = prefix + "bootia32.efi"
+ d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage)
+ prefix = "systemd-" if prefix == "" else ""
+ d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix)
+}
+
+FILES_${PN} = "/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE}"
+
+RDEPENDS_${PN} += "virtual/systemd-bootconf"
+
+# Imported from the old gummiboot recipe
+TUNE_CCARGS_remove = "-mfpmath=sse"
+COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
+COMPATIBLE_HOST_x86-x32 = "null"
+
+do_compile() {
+ SYSTEMD_BOOT_EFI_ARCH="ia32"
+ if [ "${TARGET_ARCH}" = "x86_64" ]; then
+ SYSTEMD_BOOT_EFI_ARCH="x64"
+ fi
+
+ ninja src/boot/efi/${SYSTEMD_BOOT_IMAGE_PREFIX}${SYSTEMD_BOOT_IMAGE}
+}
+
+do_install() {
+ install -d ${D}/boot
+ install -d ${D}/boot/EFI
+ install -d ${D}/boot/EFI/BOOT
+ install ${B}/src/boot/efi/systemd-boot*.efi ${D}/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE}
+}
+
+do_deploy () {
+ install ${B}/src/boot/efi/systemd-boot*.efi ${DEPLOYDIR}
+}
+addtask deploy before do_build after do_compile
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-bootconf_1.00.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-bootconf_1.00.bb
new file mode 100644
index 0000000..e9c2466
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-bootconf_1.00.bb
@@ -0,0 +1,31 @@
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+SUMMARY = "Basic systemd-boot configuration files"
+
+RPROVIDES_${PN} += "virtual/systemd-bootconf"
+
+inherit systemd-boot-cfg
+
+S = "${WORKDIR}"
+
+LABELS = "boot"
+
+ROOT ?= "root=/dev/sda2"
+APPEND_append = " ${ROOT}"
+
+python do_configure() {
+ bb.build.exec_func('build_efi_cfg', d)
+}
+
+do_configure[vardeps] += "APPEND"
+
+do_install() {
+ install -d ${D}/boot
+ install -d ${D}/boot/loader
+ install -d ${D}/boot/loader/entries
+ install loader.conf ${D}/boot/loader/
+ rm loader.conf
+ install *.conf ${D}/boot/loader/entries/
+}
+
+FILES_${PN} = "/boot/loader/* /boot/loader/entries/*"
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty.bb
index d934716..d67a3c9 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty.bb
@@ -11,6 +11,10 @@
S = "${WORKDIR}"
+# As this package is tied to systemd, only build it when we're also building systemd.
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "systemd"
+
do_install() {
if [ ! -z "${SERIAL_CONSOLES}" ] ; then
default_baudrate=`echo "${SERIAL_CONSOLES}" | sed 's/\;.*//'`
@@ -43,10 +47,4 @@
FILES_${PN} = "${systemd_unitdir}/system/*.service ${sysconfdir}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
-# As this package is tied to systemd, only build it when we're also building systemd.
-python () {
- if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
- raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
-}
-
ALLOW_EMPTY_${PN} = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc
index d99d150..5fa48e7 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc
@@ -14,7 +14,7 @@
LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
-SRCREV = "c1edab7ad1e7ccc9be693bedfd464cd1cbffb395"
+SRCREV = "46659f7deb962f55c728e70597e37c2a3ab6326d"
SRC_URI = "git://github.com/systemd/systemd.git;protocol=git"
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch
new file mode 100644
index 0000000..877bb1c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch
@@ -0,0 +1,28 @@
+From 3e8c19bb1bbc4493c591f75c00c1fefe3b1c8a69 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 27 Feb 2018 20:42:41 -0800
+Subject: [PATCH] Also check i386, i586 and i686 for ia32
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 28cb8b60e..489531a43 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1217,7 +1217,7 @@ conf.set10('SYSTEMD_SLOW_TESTS_DEFAULT', slow_tests)
+ if get_option('efi')
+ efi_arch = host_machine.cpu_family()
+
+- if efi_arch == 'x86'
++ if efi_arch == 'x86' or efi_arch == 'i386' or efi_arch == 'i586' or efi_arch == 'i686'
+ EFI_MACHINE_TYPE_NAME = 'ia32'
+ gnu_efi_arch = 'ia32'
+ elif efi_arch == 'x86_64'
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch
deleted file mode 100644
index 35599d4..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 3ca5326485cb19e775af6de615c17be66e44e472 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 24 Oct 2017 23:08:24 -0700
-Subject: [PATCH] Define _PATH_WTMPX and _PATH_UTMPX if not defined
-
-Musl needs these defines
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/shared/utmp-wtmp.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/src/shared/utmp-wtmp.c b/src/shared/utmp-wtmp.c
-index 9750dcd81..bd55d74a1 100644
---- a/src/shared/utmp-wtmp.c
-+++ b/src/shared/utmp-wtmp.c
-@@ -27,6 +27,7 @@
- #include <sys/time.h>
- #include <sys/utsname.h>
- #include <unistd.h>
-+#include <utmp.h>
- #include <utmpx.h>
-
- #include "alloc-util.h"
-@@ -41,6 +42,13 @@
- #include "util.h"
- #include "utmp-wtmp.h"
-
-+#if defined _PATH_UTMP && !defined _PATH_UTMPX
-+# define _PATH_UTMPX _PATH_UTMP
-+#endif
-+#if defined _PATH_WTMP && !defined _PATH_WTMPX
-+# define _PATH_WTMPX _PATH_WTMP
-+#endif
-+
- int utmp_get_runlevel(int *runlevel, int *previous) {
- struct utmpx *found, lookup = { .ut_type = RUN_LVL };
- int r;
---
-2.14.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
new file mode 100644
index 0000000..e2e19ba
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
@@ -0,0 +1,62 @@
+From 527413ec243564a89ffaad6368d446de44415970 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 27 Feb 2018 21:42:23 -0800
+Subject: [PATCH] Fix to run efi_cc and efi_ld correctly when cross-compiling
+
+When cross-compiling, efi_cc and efi_ld may take the form of
+'xxx-gcc --sysroot=xxx', and this would cause run_command and
+the alike fail.
+
+Fix to split them to make commands run correctly.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/boot/efi/meson.build | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
+index 992a3ba4c..9f9ec4911 100644
+--- a/src/boot/efi/meson.build
++++ b/src/boot/efi/meson.build
+@@ -157,7 +157,7 @@ if have_gnu_efi
+ o_file = custom_target(file + '.o',
+ input : file,
+ output : file + '.o',
+- command : [efi_cc, '-c', '@INPUT@', '-o', '@OUTPUT@']
++ command : efi_cc.split() + ['-c', '@INPUT@', '-o', '@OUTPUT@']
+ + compile_args,
+ depend_files : efi_headers)
+ if (common_sources + systemd_boot_sources).contains(file)
+@@ -168,7 +168,17 @@ if have_gnu_efi
+ endif
+ endforeach
+
+- libgcc_file_name = run_command(efi_cc, '-print-libgcc-file-name').stdout().strip()
++ find_libgcc_cmd_all = efi_cc + ' -print-libgcc-file-name'
++ find_libgcc_cmd = find_libgcc_cmd_all.split()[0]
++ find_libgcc_args = []
++ cmd_args_all = find_libgcc_cmd_all.split()
++ foreach arg : cmd_args_all
++ if arg != find_libgcc_cmd
++ find_libgcc_args += arg
++ endif
++ endforeach
++
++ libgcc_file_name = run_command(find_libgcc_cmd, find_libgcc_args).stdout().strip()
+ systemd_boot_efi_name = 'systemd-boot@0@.efi'.format(EFI_MACHINE_TYPE_NAME)
+ stub_efi_name = 'linux@0@.efi.stub'.format(EFI_MACHINE_TYPE_NAME)
+ no_undefined_symbols = find_program('no-undefined-symbols.sh')
+@@ -179,7 +189,7 @@ if have_gnu_efi
+ tuple[0],
+ input : tuple[2],
+ output : tuple[0],
+- command : [efi_ld, '-o', '@OUTPUT@'] +
++ command : efi_ld.split() + ['-o', '@OUTPUT@'] +
+ efi_ldflags + tuple[2] +
+ ['-lefi', '-lgnuefi', libgcc_file_name])
+
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
new file mode 100644
index 0000000..2cffc42
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
@@ -0,0 +1,34 @@
+From 687a5af8dc5d38f918a6ce08fed5297234bf8346 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 2 Mar 2018 18:00:17 -0800
+Subject: [PATCH] Hide __start_BUS_ERROR_MAP and __stop_BUS_ERROR_MAP
+
+for currently unknown reasons they get exported to the shared libries
+even without being listed in the sym file
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+
+Upstream-Status: Pending [ Conditional on master needing this, 234 does need it ]
+
+ src/libsystemd/sd-bus/bus-error.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
+index 378f7a377..49d797abd 100644
+--- a/src/libsystemd/sd-bus/bus-error.c
++++ b/src/libsystemd/sd-bus/bus-error.c
+@@ -71,8 +71,8 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = {
+ };
+
+ /* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section */
+-extern const sd_bus_error_map __start_BUS_ERROR_MAP[];
+-extern const sd_bus_error_map __stop_BUS_ERROR_MAP[];
++extern const sd_bus_error_map __start_BUS_ERROR_MAP[] _hidden_;
++extern const sd_bus_error_map __stop_BUS_ERROR_MAP[] _hidden_;
+
+ /* Additional maps registered with sd_bus_error_add_map() are in this
+ * NULL terminated array */
+--
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
new file mode 100644
index 0000000..e913e3f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
@@ -0,0 +1,33 @@
+From e361f6b4aefae57efff7e457df8db4d1067bec23 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:50:23 -0800
+Subject: [PATCH] Remove fstack-protector flags to workaround musl build
+
+Remove fstack-protector and fstack-protector-strong flags to fix
+the following build failure for qemux86 and qemuppc with musl.
+
+ undefined reference to `__stack_chk_fail_local'
+
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 7610ab12b..591b9cbab 100644
+--- a/meson.build
++++ b/meson.build
+@@ -329,8 +329,6 @@ foreach arg : ['-Wextra',
+ '-fdiagnostics-show-option',
+ '-fno-strict-aliasing',
+ '-fvisibility=hidden',
+- '-fstack-protector',
+- '-fstack-protector-strong',
+ '--param=ssp-buffer-size=4',
+ ]
+ if cc.has_argument(arg)
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-getenv-when-secure-versions-are-not-available.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-getenv-when-secure-versions-are-not-available.patch
new file mode 100644
index 0000000..f4c15e1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-getenv-when-secure-versions-are-not-available.patch
@@ -0,0 +1,33 @@
+From b1192a6e171413291d9d64fafc04773c6bbc9cab Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Fri, 23 Feb 2018 10:04:48 +0800
+Subject: [PATCH 01/31] Use getenv when secure versions are not available
+
+musl doesnt implement secure version, so we default
+to it if configure does not detect a secure implementation
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Denied
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/missing.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 1280e6c41..39c1fb700 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -605,7 +605,7 @@ struct btrfs_ioctl_quota_ctl_args {
+ # if HAVE___SECURE_GETENV
+ # define secure_getenv __secure_getenv
+ # else
+-# error "neither secure_getenv nor __secure_getenv are available"
++# define secure_getenv getenv
+ # endif
+ #endif
+
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-uintmax_t-for-handling-rlim_t.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-uintmax_t-for-handling-rlim_t.patch
deleted file mode 100644
index 779dc78..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-uintmax_t-for-handling-rlim_t.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From b2d4171c6e521cf1e70331fb769234d63a4a6d44 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 27 Oct 2017 13:00:41 -0700
-Subject: [PATCH] Use uintmax_t for handling rlim_t
-
-PRIu{32,64} is not right format to represent rlim_t type
-therefore use %ju and typecast the rlim_t variables to
-uintmax_t.
-
-Fixes portablility errors like
-
-execute.c:3446:36: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'rlim_t {aka long long unsigned int}' [-Werror=format=]
-| fprintf(f, "%s%s: " RLIM_FMT "\n",
-| ^~~~~~~~
-| prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max);
-| ~~~~~~~~~~~~~~~~~~~~~~
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/7199]
-
- src/basic/format-util.h | 8 --------
- src/basic/rlimit-util.c | 8 ++++----
- src/core/execute.c | 8 ++++----
- 3 files changed, 8 insertions(+), 16 deletions(-)
-
-diff --git a/src/basic/format-util.h b/src/basic/format-util.h
-index ae42a8f89..144249cd6 100644
---- a/src/basic/format-util.h
-+++ b/src/basic/format-util.h
-@@ -60,14 +60,6 @@
- # define PRI_TIMEX "li"
- #endif
-
--#if SIZEOF_RLIM_T == 8
--# define RLIM_FMT "%" PRIu64
--#elif SIZEOF_RLIM_T == 4
--# define RLIM_FMT "%" PRIu32
--#else
--# error Unknown rlim_t size
--#endif
--
- #if SIZEOF_DEV_T == 8
- # define DEV_FMT "%" PRIu64
- #elif SIZEOF_DEV_T == 4
-diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c
-index ca834df62..41fcebb74 100644
---- a/src/basic/rlimit-util.c
-+++ b/src/basic/rlimit-util.c
-@@ -284,13 +284,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) {
- if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY)
- s = strdup("infinity");
- else if (rl->rlim_cur >= RLIM_INFINITY)
-- (void) asprintf(&s, "infinity:" RLIM_FMT, rl->rlim_max);
-+ (void) asprintf(&s, "infinity:%ju", (uintmax_t)rl->rlim_max);
- else if (rl->rlim_max >= RLIM_INFINITY)
-- (void) asprintf(&s, RLIM_FMT ":infinity", rl->rlim_cur);
-+ (void) asprintf(&s, "%ju:infinity", (uintmax_t)rl->rlim_cur);
- else if (rl->rlim_cur == rl->rlim_max)
-- (void) asprintf(&s, RLIM_FMT, rl->rlim_cur);
-+ (void) asprintf(&s, "%ju", (uintmax_t)rl->rlim_cur);
- else
-- (void) asprintf(&s, RLIM_FMT ":" RLIM_FMT, rl->rlim_cur, rl->rlim_max);
-+ (void) asprintf(&s, "%ju:%ju", (uintmax_t)rl->rlim_cur, (uintmax_t)rl->rlim_max);
-
- if (!s)
- return -ENOMEM;
-diff --git a/src/core/execute.c b/src/core/execute.c
-index d72e5bf08..d38946002 100644
---- a/src/core/execute.c
-+++ b/src/core/execute.c
-@@ -3443,10 +3443,10 @@ void exec_context_dump(ExecContext *c, FILE* f, const char *prefix) {
-
- for (i = 0; i < RLIM_NLIMITS; i++)
- if (c->rlimit[i]) {
-- fprintf(f, "%s%s: " RLIM_FMT "\n",
-- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max);
-- fprintf(f, "%s%sSoft: " RLIM_FMT "\n",
-- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_cur);
-+ fprintf(f, "%s%s: %ju\n",
-+ prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_max);
-+ fprintf(f, "%s%sSoft: %ju\n",
-+ prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_cur);
- }
-
- if (c->ioprio_set) {
---
-2.14.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-add-fallback-parse_printf_format-implementation.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-add-fallback-parse_printf_format-implementation.patch
deleted file mode 100644
index e2f7458..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-add-fallback-parse_printf_format-implementation.patch
+++ /dev/null
@@ -1,433 +0,0 @@
-From 0933ca6251808f856b92b0ce8da8696d5febc333 Mon Sep 17 00:00:00 2001
-From: Emil Renner Berthing <systemd@esmil.dk>
-Date: Mon, 23 Oct 2017 10:41:39 -0700
-Subject: [PATCH 01/12] add fallback parse_printf_format implementation
-
-Signed-off-by: Emil Renner Berthing <systemd@esmil.dk>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- Makefile.am | 4 +
- configure.ac | 2 +
- src/basic/parse-printf-format.c | 273 ++++++++++++++++++++++++++++++++++++++++
- src/basic/parse-printf-format.h | 57 +++++++++
- src/basic/stdio-util.h | 2 +-
- src/journal/journal-send.c | 2 +-
- 6 files changed, 338 insertions(+), 2 deletions(-)
- create mode 100644 src/basic/parse-printf-format.c
- create mode 100644 src/basic/parse-printf-format.h
-
-diff --git a/Makefile.am b/Makefile.am
-index 692d7bb95..3cc8f3451 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -997,6 +997,10 @@ libbasic_la_SOURCES = \
- src/basic/journal-importer.h \
- src/basic/journal-importer.c
-
-+if !HAVE_PRINTF_H
-+libbasic_la_SOURCES += src/basic/parse-printf-format.c
-+endif
-+
- nodist_libbasic_la_SOURCES = \
- src/basic/errno-from-name.h \
- src/basic/errno-to-name.h \
-diff --git a/configure.ac b/configure.ac
-index 60e7df5ee..efcdc6c16 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -308,8 +308,10 @@ AC_CHECK_HEADERS([uchar.h], [], [])
- AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
- AC_CHECK_HEADERS([linux/btrfs.h], [], [])
- AC_CHECK_HEADERS([linux/memfd.h], [], [])
-+AC_CHECK_HEADERS([printf.h], [], [])
- AC_CHECK_HEADERS([linux/vm_sockets.h], [], [], [#include <sys/socket.h>])
-
-+AM_CONDITIONAL(HAVE_PRINTF_H, [test "x$ac_cv_header_printf_h" = xyes])
- # unconditionally pull-in librt with old glibc versions
- AC_SEARCH_LIBS([clock_gettime], [rt], [], [])
-
-diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c
-new file mode 100644
-index 000000000..49437e544
---- /dev/null
-+++ b/src/basic/parse-printf-format.c
-@@ -0,0 +1,273 @@
-+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-+
-+/***
-+ This file is part of systemd.
-+
-+ Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
-+
-+ With parts from the musl C library
-+ Copyright 2005-2014 Rich Felker, et al.
-+
-+ systemd is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Lesser General Public License as published by
-+ the Free Software Foundation; either version 2.1 of the License, or
-+ (at your option) any later version.
-+
-+ systemd is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public License
-+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
-+***/
-+
-+#include <stddef.h>
-+#include <string.h>
-+
-+#include "parse-printf-format.h"
-+
-+static const char *consume_nonarg(const char *fmt)
-+{
-+ do {
-+ if (*fmt == '\0')
-+ return fmt;
-+ } while (*fmt++ != '%');
-+ return fmt;
-+}
-+
-+static const char *consume_num(const char *fmt)
-+{
-+ for (;*fmt >= '0' && *fmt <= '9'; fmt++)
-+ /* do nothing */;
-+ return fmt;
-+}
-+
-+static const char *consume_argn(const char *fmt, size_t *arg)
-+{
-+ const char *p = fmt;
-+ size_t val = 0;
-+
-+ if (*p < '1' || *p > '9')
-+ return fmt;
-+ do {
-+ val = 10*val + (*p++ - '0');
-+ } while (*p >= '0' && *p <= '9');
-+
-+ if (*p != '$')
-+ return fmt;
-+ *arg = val;
-+ return p+1;
-+}
-+
-+static const char *consume_flags(const char *fmt)
-+{
-+ while (1) {
-+ switch (*fmt) {
-+ case '#':
-+ case '0':
-+ case '-':
-+ case ' ':
-+ case '+':
-+ case '\'':
-+ case 'I':
-+ fmt++;
-+ continue;
-+ }
-+ return fmt;
-+ }
-+}
-+
-+enum state {
-+ BARE,
-+ LPRE,
-+ LLPRE,
-+ HPRE,
-+ HHPRE,
-+ BIGLPRE,
-+ ZTPRE,
-+ JPRE,
-+ STOP
-+};
-+
-+enum type {
-+ NONE,
-+ PTR,
-+ INT,
-+ UINT,
-+ ULLONG,
-+ LONG,
-+ ULONG,
-+ SHORT,
-+ USHORT,
-+ CHAR,
-+ UCHAR,
-+ LLONG,
-+ SIZET,
-+ IMAX,
-+ UMAX,
-+ PDIFF,
-+ UIPTR,
-+ DBL,
-+ LDBL,
-+ MAXTYPE
-+};
-+
-+static const short pa_types[MAXTYPE] = {
-+ [NONE] = PA_INT,
-+ [PTR] = PA_POINTER,
-+ [INT] = PA_INT,
-+ [UINT] = PA_INT,
-+ [ULLONG] = PA_INT | PA_FLAG_LONG_LONG,
-+ [LONG] = PA_INT | PA_FLAG_LONG,
-+ [ULONG] = PA_INT | PA_FLAG_LONG,
-+ [SHORT] = PA_INT | PA_FLAG_SHORT,
-+ [USHORT] = PA_INT | PA_FLAG_SHORT,
-+ [CHAR] = PA_CHAR,
-+ [UCHAR] = PA_CHAR,
-+ [LLONG] = PA_INT | PA_FLAG_LONG_LONG,
-+ [SIZET] = PA_INT | PA_FLAG_LONG,
-+ [IMAX] = PA_INT | PA_FLAG_LONG_LONG,
-+ [UMAX] = PA_INT | PA_FLAG_LONG_LONG,
-+ [PDIFF] = PA_INT | PA_FLAG_LONG_LONG,
-+ [UIPTR] = PA_INT | PA_FLAG_LONG,
-+ [DBL] = PA_DOUBLE,
-+ [LDBL] = PA_DOUBLE | PA_FLAG_LONG_DOUBLE
-+};
-+
-+#define S(x) [(x)-'A']
-+#define E(x) (STOP + (x))
-+
-+static const unsigned char states[]['z'-'A'+1] = {
-+ { /* 0: bare types */
-+ S('d') = E(INT), S('i') = E(INT),
-+ S('o') = E(UINT),S('u') = E(UINT),S('x') = E(UINT), S('X') = E(UINT),
-+ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL),
-+ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL),
-+ S('c') = E(CHAR),S('C') = E(INT),
-+ S('s') = E(PTR), S('S') = E(PTR), S('p') = E(UIPTR),S('n') = E(PTR),
-+ S('m') = E(NONE),
-+ S('l') = LPRE, S('h') = HPRE, S('L') = BIGLPRE,
-+ S('z') = ZTPRE, S('j') = JPRE, S('t') = ZTPRE
-+ }, { /* 1: l-prefixed */
-+ S('d') = E(LONG), S('i') = E(LONG),
-+ S('o') = E(ULONG),S('u') = E(ULONG),S('x') = E(ULONG),S('X') = E(ULONG),
-+ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL),
-+ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL),
-+ S('c') = E(INT), S('s') = E(PTR), S('n') = E(PTR),
-+ S('l') = LLPRE
-+ }, { /* 2: ll-prefixed */
-+ S('d') = E(LLONG), S('i') = E(LLONG),
-+ S('o') = E(ULLONG),S('u') = E(ULLONG),
-+ S('x') = E(ULLONG),S('X') = E(ULLONG),
-+ S('n') = E(PTR)
-+ }, { /* 3: h-prefixed */
-+ S('d') = E(SHORT), S('i') = E(SHORT),
-+ S('o') = E(USHORT),S('u') = E(USHORT),
-+ S('x') = E(USHORT),S('X') = E(USHORT),
-+ S('n') = E(PTR),
-+ S('h') = HHPRE
-+ }, { /* 4: hh-prefixed */
-+ S('d') = E(CHAR), S('i') = E(CHAR),
-+ S('o') = E(UCHAR),S('u') = E(UCHAR),
-+ S('x') = E(UCHAR),S('X') = E(UCHAR),
-+ S('n') = E(PTR)
-+ }, { /* 5: L-prefixed */
-+ S('e') = E(LDBL),S('f') = E(LDBL),S('g') = E(LDBL), S('a') = E(LDBL),
-+ S('E') = E(LDBL),S('F') = E(LDBL),S('G') = E(LDBL), S('A') = E(LDBL),
-+ S('n') = E(PTR)
-+ }, { /* 6: z- or t-prefixed (assumed to be same size) */
-+ S('d') = E(PDIFF),S('i') = E(PDIFF),
-+ S('o') = E(SIZET),S('u') = E(SIZET),
-+ S('x') = E(SIZET),S('X') = E(SIZET),
-+ S('n') = E(PTR)
-+ }, { /* 7: j-prefixed */
-+ S('d') = E(IMAX), S('i') = E(IMAX),
-+ S('o') = E(UMAX), S('u') = E(UMAX),
-+ S('x') = E(UMAX), S('X') = E(UMAX),
-+ S('n') = E(PTR)
-+ }
-+};
-+
-+size_t parse_printf_format(const char *fmt, size_t n, int *types)
-+{
-+ size_t i = 0;
-+ size_t last = 0;
-+
-+ memset(types, 0, n);
-+
-+ while (1) {
-+ size_t arg;
-+ unsigned int state;
-+
-+ fmt = consume_nonarg(fmt);
-+ if (*fmt == '\0')
-+ break;
-+ if (*fmt == '%') {
-+ fmt++;
-+ continue;
-+ }
-+ arg = 0;
-+ fmt = consume_argn(fmt, &arg);
-+ /* flags */
-+ fmt = consume_flags(fmt);
-+ /* width */
-+ if (*fmt == '*') {
-+ size_t warg = 0;
-+ fmt = consume_argn(fmt+1, &warg);
-+ if (warg == 0)
-+ warg = ++i;
-+ if (warg > last)
-+ last = warg;
-+ if (warg <= n && types[warg-1] == NONE)
-+ types[warg-1] = INT;
-+ } else
-+ fmt = consume_num(fmt);
-+ /* precision */
-+ if (*fmt == '.') {
-+ fmt++;
-+ if (*fmt == '*') {
-+ size_t parg = 0;
-+ fmt = consume_argn(fmt+1, &parg);
-+ if (parg == 0)
-+ parg = ++i;
-+ if (parg > last)
-+ last = parg;
-+ if (parg <= n && types[parg-1] == NONE)
-+ types[parg-1] = INT;
-+ } else {
-+ if (*fmt == '-')
-+ fmt++;
-+ fmt = consume_num(fmt);
-+ }
-+ }
-+ /* length modifier and conversion specifier */
-+ state = BARE;
-+ do {
-+ unsigned char c = *fmt++;
-+
-+ if (c < 'A' || c > 'z')
-+ continue;
-+ state = states[state]S(c);
-+ if (state == 0)
-+ continue;
-+ } while (state < STOP);
-+
-+ if (state == E(NONE))
-+ continue;
-+
-+ if (arg == 0)
-+ arg = ++i;
-+ if (arg > last)
-+ last = arg;
-+ if (arg <= n)
-+ types[arg-1] = state - STOP;
-+ }
-+
-+ if (last > n)
-+ last = n;
-+ for (i = 0; i < last; i++)
-+ types[i] = pa_types[types[i]];
-+
-+ return last;
-+}
-diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h
-new file mode 100644
-index 000000000..4371177b0
---- /dev/null
-+++ b/src/basic/parse-printf-format.h
-@@ -0,0 +1,57 @@
-+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-+
-+/***
-+ This file is part of systemd.
-+
-+ Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
-+
-+ With parts from the GNU C Library
-+ Copyright 1991-2014 Free Software Foundation, Inc.
-+
-+ systemd is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Lesser General Public License as published by
-+ the Free Software Foundation; either version 2.1 of the License, or
-+ (at your option) any later version.
-+
-+ systemd is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public License
-+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
-+***/
-+
-+#pragma once
-+
-+#include "config.h"
-+
-+#ifdef HAVE_PRINTF_H
-+#include <printf.h>
-+#else
-+
-+#include <stddef.h>
-+
-+enum { /* C type: */
-+ PA_INT, /* int */
-+ PA_CHAR, /* int, cast to char */
-+ PA_WCHAR, /* wide char */
-+ PA_STRING, /* const char *, a '\0'-terminated string */
-+ PA_WSTRING, /* const wchar_t *, wide character string */
-+ PA_POINTER, /* void * */
-+ PA_FLOAT, /* float */
-+ PA_DOUBLE, /* double */
-+ PA_LAST
-+};
-+
-+/* Flag bits that can be set in a type returned by `parse_printf_format'. */
-+#define PA_FLAG_MASK 0xff00
-+#define PA_FLAG_LONG_LONG (1 << 8)
-+#define PA_FLAG_LONG_DOUBLE PA_FLAG_LONG_LONG
-+#define PA_FLAG_LONG (1 << 9)
-+#define PA_FLAG_SHORT (1 << 10)
-+#define PA_FLAG_PTR (1 << 11)
-+
-+size_t parse_printf_format(const char *fmt, size_t n, int *types);
-+
-+#endif /* HAVE_PRINTF_H */
-diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h
-index bd1144b4c..c9c95eb54 100644
---- a/src/basic/stdio-util.h
-+++ b/src/basic/stdio-util.h
-@@ -19,12 +19,12 @@
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
-
--#include <printf.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <sys/types.h>
-
- #include "macro.h"
-+#include "parse-printf-format.h"
-
- #define xsprintf(buf, fmt, ...) \
- assert_message_se((size_t) snprintf(buf, ELEMENTSOF(buf), fmt, __VA_ARGS__) < ELEMENTSOF(buf), "xsprintf: " #buf "[] must be big enough")
-diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
-index 440fba67c..0236c43c4 100644
---- a/src/journal/journal-send.c
-+++ b/src/journal/journal-send.c
-@@ -19,7 +19,6 @@
-
- #include <errno.h>
- #include <fcntl.h>
--#include <printf.h>
- #include <stddef.h>
- #include <sys/socket.h>
- #include <sys/un.h>
-@@ -38,6 +37,7 @@
- #include "stdio-util.h"
- #include "string-util.h"
- #include "util.h"
-+#include "parse-printf-format.h"
-
- #define SNDBUF_SIZE (8*1024*1024)
-
---
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
index 7f1bc44..98c8362 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
@@ -1,8 +1,7 @@
-From f1b5a6f717bda6f80a6b5e3e4d50b450f6cc7b09 Mon Sep 17 00:00:00 2001
+From 7844e070745611a52e355b73e7890f360dd540d0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 14 Dec 2015 04:09:19 +0000
-Subject: [PATCH 14/14] core/device.c: Change the default device timeout to 240
- sec.
+Subject: [PATCH] core/device.c: Change the default device timeout to 240 sec.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -17,10 +16,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/device.c b/src/core/device.c
-index 77601c552..98bf49ba2 100644
+index a43664d3b..4b16a8aec 100644
--- a/src/core/device.c
+++ b/src/core/device.c
-@@ -112,7 +112,7 @@ static void device_init(Unit *u) {
+@@ -113,7 +113,7 @@ static void device_init(Unit *u) {
* indefinitely for plugged in devices, something which cannot
* happen for the other units since their operations time out
* anyway. */
@@ -29,6 +28,3 @@
u->ignore_on_isolate = true;
}
---
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-evaluate-presets-after-generators-have-run-6526.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-evaluate-presets-after-generators-have-run-6526.patch
deleted file mode 100644
index df100e5..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-evaluate-presets-after-generators-have-run-6526.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 28dd66ecfce743b1ea9046c7bb501e0fcaeff724 Mon Sep 17 00:00:00 2001
-From: Luca Bruno <luca.bruno@coreos.com>
-Date: Sun, 6 Aug 2017 13:24:24 +0000
-Subject: [PATCH] core: evaluate presets after generators have run (#6526)
-
-This commit moves the first-boot system preset-settings evaluation out
-of main and into the manager startup logic itself. Notably, it reverses
-the order between generators and presets evaluation, so that any changes
-performed by first-boot generators are taken into the account by presets
-logic.
-
-After this change, units created by a generator can be enabled as part
-of a preset.
-
-Upstream-Status: Backport
-
-Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
----
- src/core/main.c | 12 ++----------
- src/core/manager.c | 8 ++++++++
- 2 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/src/core/main.c b/src/core/main.c
-index dfedc3d..11ac9cf 100644
---- a/src/core/main.c
-+++ b/src/core/main.c
-@@ -1809,18 +1809,10 @@ int main(int argc, char *argv[]) {
- if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0)
- log_warning_errno(errno, "Failed to make us a subreaper: %m");
-
-- if (arg_system) {
-+ if (arg_system)
-+ /* Bump up RLIMIT_NOFILE for systemd itself */
- (void) bump_rlimit_nofile(&saved_rlimit_nofile);
-
-- if (empty_etc) {
-- r = unit_file_preset_all(UNIT_FILE_SYSTEM, 0, NULL, UNIT_FILE_PRESET_ENABLE_ONLY, NULL, 0);
-- if (r < 0)
-- log_full_errno(r == -EEXIST ? LOG_NOTICE : LOG_WARNING, r, "Failed to populate /etc with preset unit settings, ignoring: %m");
-- else
-- log_info("Populated /etc with preset unit settings.");
-- }
-- }
--
- r = manager_new(arg_system ? UNIT_FILE_SYSTEM : UNIT_FILE_USER, arg_action == ACTION_TEST, &m);
- if (r < 0) {
- log_emergency_errno(r, "Failed to allocate manager object: %m");
-diff --git a/src/core/manager.c b/src/core/manager.c
-index 1aadb70..fb5e2b5 100644
---- a/src/core/manager.c
-+++ b/src/core/manager.c
-@@ -1328,6 +1328,14 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
- if (r < 0)
- return r;
-
-+ if (m->first_boot && m->unit_file_scope == UNIT_FILE_SYSTEM) {
-+ q = unit_file_preset_all(UNIT_FILE_SYSTEM, 0, NULL, UNIT_FILE_PRESET_ENABLE_ONLY, NULL, 0);
-+ if (q < 0)
-+ log_full_errno(q == -EEXIST ? LOG_NOTICE : LOG_WARNING, q, "Failed to populate /etc with preset unit settings, ignoring: %m");
-+ else
-+ log_info("Populated /etc with preset unit settings.");
-+ }
-+
- lookup_paths_reduce(&m->lookup_paths);
- manager_build_unit_path_cache(m);
-
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-main-skip-many-initialization-steps-when-running-in-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-main-skip-many-initialization-steps-when-running-in-.patch
deleted file mode 100644
index a033b04..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-main-skip-many-initialization-steps-when-running-in-.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-From dea374e898a749a0474b72b2015cca9009b1432b Mon Sep 17 00:00:00 2001
-From: Lennart Poettering <lennart@poettering.net>
-Date: Wed, 13 Sep 2017 10:31:40 +0200
-Subject: [PATCH] main: skip many initialization steps when running in --test
- mode
-
-Most importantly, don't collect open socket activation fds when in
---test mode. This specifically created a problem because we invoke
-pager_open() beforehand (which these days makes copies of the original
-stdout/stderr in order to be able to restore them when the pager goes
-away) and we might mistakenly the fd copies it creates as socket
-activation fds.
-
-Fixes: #6383
-
-Upstream-Status: Backport
-
-Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
----
- src/core/main.c | 108 +++++++++++++++++++++++++++++---------------------------
- 1 file changed, 56 insertions(+), 52 deletions(-)
-
-diff --git a/src/core/main.c b/src/core/main.c
-index 11ac9cf..d1a53a5 100644
---- a/src/core/main.c
-+++ b/src/core/main.c
-@@ -1679,20 +1679,22 @@ int main(int argc, char *argv[]) {
- log_close();
-
- /* Remember open file descriptors for later deserialization */
-- r = fdset_new_fill(&fds);
-- if (r < 0) {
-- log_emergency_errno(r, "Failed to allocate fd set: %m");
-- error_message = "Failed to allocate fd set";
-- goto finish;
-- } else
-- fdset_cloexec(fds, true);
-+ if (arg_action == ACTION_RUN) {
-+ r = fdset_new_fill(&fds);
-+ if (r < 0) {
-+ log_emergency_errno(r, "Failed to allocate fd set: %m");
-+ error_message = "Failed to allocate fd set";
-+ goto finish;
-+ } else
-+ fdset_cloexec(fds, true);
-
-- if (arg_serialization)
-- assert_se(fdset_remove(fds, fileno(arg_serialization)) >= 0);
-+ if (arg_serialization)
-+ assert_se(fdset_remove(fds, fileno(arg_serialization)) >= 0);
-
-- if (arg_system)
-- /* Become a session leader if we aren't one yet. */
-- setsid();
-+ if (arg_system)
-+ /* Become a session leader if we aren't one yet. */
-+ setsid();
-+ }
-
- /* Move out of the way, so that we won't block unmounts */
- assert_se(chdir("/") == 0);
-@@ -1762,56 +1764,58 @@ int main(int argc, char *argv[]) {
- arg_action == ACTION_TEST ? " test" : "", getuid(), t);
- }
-
-- if (arg_system && !skip_setup) {
-- if (arg_show_status > 0)
-- status_welcome();
-+ if (arg_action == ACTION_RUN) {
-+ if (arg_system && !skip_setup) {
-+ if (arg_show_status > 0)
-+ status_welcome();
-
-- hostname_setup();
-- machine_id_setup(NULL, arg_machine_id, NULL);
-- loopback_setup();
-- bump_unix_max_dgram_qlen();
-+ hostname_setup();
-+ machine_id_setup(NULL, arg_machine_id, NULL);
-+ loopback_setup();
-+ bump_unix_max_dgram_qlen();
-
-- test_usr();
-- }
-+ test_usr();
-+ }
-
-- if (arg_system && arg_runtime_watchdog > 0 && arg_runtime_watchdog != USEC_INFINITY)
-- watchdog_set_timeout(&arg_runtime_watchdog);
-+ if (arg_system && arg_runtime_watchdog > 0 && arg_runtime_watchdog != USEC_INFINITY)
-+ watchdog_set_timeout(&arg_runtime_watchdog);
-
-- if (arg_timer_slack_nsec != NSEC_INFINITY)
-- if (prctl(PR_SET_TIMERSLACK, arg_timer_slack_nsec) < 0)
-- log_error_errno(errno, "Failed to adjust timer slack: %m");
-+ if (arg_timer_slack_nsec != NSEC_INFINITY)
-+ if (prctl(PR_SET_TIMERSLACK, arg_timer_slack_nsec) < 0)
-+ log_error_errno(errno, "Failed to adjust timer slack: %m");
-
-- if (arg_system && !cap_test_all(arg_capability_bounding_set)) {
-- r = capability_bounding_set_drop_usermode(arg_capability_bounding_set);
-- if (r < 0) {
-- log_emergency_errno(r, "Failed to drop capability bounding set of usermode helpers: %m");
-- error_message = "Failed to drop capability bounding set of usermode helpers";
-- goto finish;
-- }
-- r = capability_bounding_set_drop(arg_capability_bounding_set, true);
-- if (r < 0) {
-- log_emergency_errno(r, "Failed to drop capability bounding set: %m");
-- error_message = "Failed to drop capability bounding set";
-- goto finish;
-+ if (arg_system && !cap_test_all(arg_capability_bounding_set)) {
-+ r = capability_bounding_set_drop_usermode(arg_capability_bounding_set);
-+ if (r < 0) {
-+ log_emergency_errno(r, "Failed to drop capability bounding set of usermode helpers: %m");
-+ error_message = "Failed to drop capability bounding set of usermode helpers";
-+ goto finish;
-+ }
-+ r = capability_bounding_set_drop(arg_capability_bounding_set, true);
-+ if (r < 0) {
-+ log_emergency_errno(r, "Failed to drop capability bounding set: %m");
-+ error_message = "Failed to drop capability bounding set";
-+ goto finish;
-+ }
- }
-- }
-
-- if (arg_syscall_archs) {
-- r = enforce_syscall_archs(arg_syscall_archs);
-- if (r < 0) {
-- error_message = "Failed to set syscall architectures";
-- goto finish;
-+ if (arg_syscall_archs) {
-+ r = enforce_syscall_archs(arg_syscall_archs);
-+ if (r < 0) {
-+ error_message = "Failed to set syscall architectures";
-+ goto finish;
-+ }
- }
-- }
-
-- if (!arg_system)
-- /* Become reaper of our children */
-- if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0)
-- log_warning_errno(errno, "Failed to make us a subreaper: %m");
-+ if (!arg_system)
-+ /* Become reaper of our children */
-+ if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0)
-+ log_warning_errno(errno, "Failed to make us a subreaper: %m");
-
-- if (arg_system)
-- /* Bump up RLIMIT_NOFILE for systemd itself */
-- (void) bump_rlimit_nofile(&saved_rlimit_nofile);
-+ if (arg_system)
-+ /* Bump up RLIMIT_NOFILE for systemd itself */
-+ (void) bump_rlimit_nofile(&saved_rlimit_nofile);
-+ }
-
- r = manager_new(arg_system ? UNIT_FILE_SYSTEM : UNIT_FILE_USER, arg_action == ACTION_TEST, &m);
- if (r < 0) {
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
new file mode 100644
index 0000000..c3f4b39
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
@@ -0,0 +1,81 @@
+From c93eb6cdec03f5e243e59e95dc49273fcb90e7c1 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Fri, 23 Feb 2018 10:23:40 +0800
+Subject: [PATCH 02/31] binfmt: Don't install dependency links at install time
+ for the binfmt services
+
+use [Install] blocks so that they get created when the service is enabled
+like a traditional service.
+
+The [Install] blocks were rejected upstream as they don't have a way to
+"enable" it on install without static symlinks which can't be disabled,
+only masked. We however can do that in a postinst.
+
+Upstream-Status: Denied
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ units/meson.build | 6 ++----
+ units/proc-sys-fs-binfmt_misc.automount | 3 +++
+ units/systemd-binfmt.service.in | 4 ++++
+ 3 files changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/units/meson.build b/units/meson.build
+index 814ee7885..49ace0d0f 100644
+--- a/units/meson.build
++++ b/units/meson.build
+@@ -60,8 +60,7 @@ units = [
+ ['poweroff.target', '',
+ 'runlevel0.target'],
+ ['printer.target', ''],
+- ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT',
+- 'sysinit.target.wants/'],
++ ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT'],
+ ['proc-sys-fs-binfmt_misc.mount', 'ENABLE_BINFMT'],
+ ['reboot.target', '',
+ 'runlevel6.target ctrl-alt-del.target'],
+@@ -144,8 +143,7 @@ in_units = [
+ ['systemd-ask-password-console.service', ''],
+ ['systemd-ask-password-wall.service', ''],
+ ['systemd-backlight@.service', 'ENABLE_BACKLIGHT'],
+- ['systemd-binfmt.service', 'ENABLE_BINFMT',
+- 'sysinit.target.wants/'],
++ ['systemd-binfmt.service', 'ENABLE_BINFMT'],
+ ['systemd-coredump@.service', 'ENABLE_COREDUMP'],
+ ['systemd-exit.service', ''],
+ ['systemd-firstboot.service', 'ENABLE_FIRSTBOOT',
+diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
+index 30a6bc991..4231f3b70 100644
+--- a/units/proc-sys-fs-binfmt_misc.automount
++++ b/units/proc-sys-fs-binfmt_misc.automount
+@@ -18,3 +18,6 @@ ConditionPathIsReadWrite=/proc/sys/
+
+ [Automount]
+ Where=/proc/sys/fs/binfmt_misc
++
++[Install]
++WantedBy=sysinit.target
+diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
+index df9396d89..0687f4648 100644
+--- a/units/systemd-binfmt.service.in
++++ b/units/systemd-binfmt.service.in
+@@ -13,6 +13,7 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
+ Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
+ DefaultDependencies=no
+ Conflicts=shutdown.target
++Wants=proc-sys-fs-binfmt_misc.automount
+ After=proc-sys-fs-binfmt_misc.automount
+ Before=sysinit.target shutdown.target
+ ConditionPathIsReadWrite=/proc/sys/
+@@ -27,3 +28,6 @@ Type=oneshot
+ RemainAfterExit=yes
+ ExecStart=@rootlibexecdir@/systemd-binfmt
+ TimeoutSec=90s
++
++[Install]
++WantedBy=sysinit.target
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-src-basic-missing.h-check-for-missing-strndupa.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-src-basic-missing.h-check-for-missing-strndupa.patch
deleted file mode 100644
index 94c136b..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-src-basic-missing.h-check-for-missing-strndupa.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From 585abd891a56409915314304101cac26b42c076b Mon Sep 17 00:00:00 2001
-From: Emil Renner Berthing <systemd@esmil.dk>
-Date: Mon, 23 Oct 2017 10:45:46 -0700
-Subject: [PATCH 02/12] src/basic/missing.h: check for missing strndupa
-
-include missing.h for definition of strndupa
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- configure.ac | 1 +
- src/basic/missing.h | 11 +++++++++++
- src/basic/mkdir.c | 1 +
- src/basic/parse-util.c | 1 +
- src/shared/pager.c | 1 +
- src/shared/uid-range.c | 1 +
- 6 files changed, 16 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index efcdc6c16..cd035a971 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -329,6 +329,7 @@ AC_CHECK_DECLS([
- pivot_root,
- name_to_handle_at,
- setns,
-+ strndupa,
- renameat2,
- kcmp,
- keyctl,
-diff --git a/src/basic/missing.h b/src/basic/missing.h
-index 04912bf52..8009888ad 100644
---- a/src/basic/missing.h
-+++ b/src/basic/missing.h
-@@ -1104,6 +1104,17 @@ typedef int32_t key_serial_t;
- #define KEYCTL_DESCRIBE 6
- #endif
-
-+#if !HAVE_DECL_STRNDUPA
-+#define strndupa(s, n) \
-+ ({ \
-+ const char *__old = (s); \
-+ size_t __len = strnlen(__old, (n)); \
-+ char *__new = (char *)alloca(__len + 1); \
-+ __new[__len] = '\0'; \
-+ (char *)memcpy(__new, __old, __len); \
-+ })
-+#endif
-+
- #ifndef KEYCTL_READ
- #define KEYCTL_READ 11
- #endif
-diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
-index 6b1a98402..d1388df48 100644
---- a/src/basic/mkdir.c
-+++ b/src/basic/mkdir.c
-@@ -28,6 +28,7 @@
- #include "path-util.h"
- #include "stat-util.h"
- #include "user-util.h"
-+#include "missing.h"
-
- int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, mkdir_func_t _mkdir) {
- struct stat st;
-diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
-index 4532f222c..7a30a0e06 100644
---- a/src/basic/parse-util.c
-+++ b/src/basic/parse-util.c
-@@ -30,6 +30,7 @@
- #include "parse-util.h"
- #include "process-util.h"
- #include "string-util.h"
-+#include "missing.h"
-
- int parse_boolean(const char *v) {
- assert(v);
-diff --git a/src/shared/pager.c b/src/shared/pager.c
-index 4d7b02c63..854efc0c9 100644
---- a/src/shared/pager.c
-+++ b/src/shared/pager.c
-@@ -38,6 +38,7 @@
- #include "string-util.h"
- #include "strv.h"
- #include "terminal-util.h"
-+#include "missing.h"
-
- static pid_t pager_pid = 0;
-
-diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c
-index b6ec47439..91ce9fb7f 100644
---- a/src/shared/uid-range.c
-+++ b/src/shared/uid-range.c
-@@ -24,6 +24,7 @@
- #include "macro.h"
- #include "uid-range.h"
- #include "user-util.h"
-+#include "missing.h"
-
- static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
- assert(range);
---
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
deleted file mode 100644
index 9a2d2c8..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From 5bbbc2a08a3b4283ec04af0e77e25fb205aa8b82 Mon Sep 17 00:00:00 2001
-From: Emil Renner Berthing <systemd@esmil.dk>
-Date: Mon, 23 Oct 2017 10:50:14 -0700
-Subject: [PATCH 03/12] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not
- defined
-
-If the standard library doesn't provide brace
-expansion users just won't get it.
-
-Dont use GNU GLOB extentions on non-glibc systems
-
-Conditionalize use of GLOB_ALTDIRFUNC
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/basic/glob-util.c | 20 +++++++++++++++++---
- src/test/test-glob-util.c | 17 +++++++++++++++--
- src/tmpfiles/tmpfiles.c | 8 ++++++++
- 3 files changed, 40 insertions(+), 5 deletions(-)
-
-diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c
-index f611c42e4..ad6e2be8d 100644
---- a/src/basic/glob-util.c
-+++ b/src/basic/glob-util.c
-@@ -27,13 +27,18 @@
- #include "macro.h"
- #include "path-util.h"
- #include "strv.h"
-+/* Don't fail if the standard library
-+ * doesn't provide brace expansion */
-+#ifndef GLOB_BRACE
-+#define GLOB_BRACE 0
-+#endif
-
- int safe_glob(const char *path, int flags, glob_t *pglob) {
- int k;
-
-+#ifdef GLOB_ALTDIRFUNC
- /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */
- assert(!(flags & GLOB_ALTDIRFUNC));
--
- if (!pglob->gl_closedir)
- pglob->gl_closedir = (void (*)(void *)) closedir;
- if (!pglob->gl_readdir)
-@@ -44,10 +49,13 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
- pglob->gl_lstat = lstat;
- if (!pglob->gl_stat)
- pglob->gl_stat = stat;
--
-+#endif
- errno = 0;
-+#ifdef GLOB_ALTDIRFUNC
- k = glob(path, flags | GLOB_ALTDIRFUNC, NULL, pglob);
--
-+#else
-+ k = glob(path, flags, NULL, pglob);
-+#endif
- if (k == GLOB_NOMATCH)
- return -ENOENT;
- if (k == GLOB_NOSPACE)
-@@ -60,6 +68,12 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
- return 0;
- }
-
-+/* Don't fail if the standard library
-+ * doesn't provide brace expansion */
-+#ifndef GLOB_BRACE
-+#define GLOB_BRACE 0
-+#endif
-+
- int glob_exists(const char *path) {
- _cleanup_globfree_ glob_t g = {};
- int k;
-diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c
-index af866e004..3afa09ada 100644
---- a/src/test/test-glob-util.c
-+++ b/src/test/test-glob-util.c
-@@ -29,6 +29,11 @@
- #include "glob-util.h"
- #include "macro.h"
- #include "rm-rf.h"
-+/* Don't fail if the standard library
-+ * doesn't provide brace expansion */
-+#ifndef GLOB_BRACE
-+#define GLOB_BRACE 0
-+#endif
-
- static void test_glob_exists(void) {
- char name[] = "/tmp/test-glob_exists.XXXXXX";
-@@ -51,25 +56,33 @@ static void test_glob_exists(void) {
- static void test_glob_no_dot(void) {
- char template[] = "/tmp/test-glob-util.XXXXXXX";
- const char *fn;
--
- _cleanup_globfree_ glob_t g = {
-+#ifdef GLOB_ALTDIRFUNC
- .gl_closedir = (void (*)(void *)) closedir,
- .gl_readdir = (struct dirent *(*)(void *)) readdir_no_dot,
- .gl_opendir = (void *(*)(const char *)) opendir,
- .gl_lstat = lstat,
- .gl_stat = stat,
-+#endif
- };
--
- int r;
-
- assert_se(mkdtemp(template));
-
- fn = strjoina(template, "/*");
-+#ifdef GLOB_ALTDIRFUNC
- r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g);
-+#else
-+ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
-+#endif
- assert_se(r == GLOB_NOMATCH);
-
- fn = strjoina(template, "/.*");
-+#ifdef GLOB_ALTDIRFUNC
- r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g);
-+#else
-+ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
-+#endif
- assert_se(r == GLOB_NOMATCH);
-
- (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL);
-diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
-index 9419c99e2..07027a765 100644
---- a/src/tmpfiles/tmpfiles.c
-+++ b/src/tmpfiles/tmpfiles.c
-@@ -71,6 +71,12 @@
- #include "umask-util.h"
- #include "user-util.h"
- #include "util.h"
-+/* Don't fail if the standard library
-+ * doesn't provide brace expansion */
-+#ifndef GLOB_BRACE
-+#define GLOB_BRACE 0
-+#endif
-+
-
- /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
- * them in the file system. This is intended to be used to create
-@@ -1092,7 +1098,9 @@ static int item_do_children(Item *i, const char *path, action_t action) {
-
- static int glob_item(Item *i, action_t action, bool recursive) {
- _cleanup_globfree_ glob_t g = {
-+#ifdef GLOB_ALTDIRFUNC
- .gl_opendir = (void *(*)(const char *)) opendir_nomod,
-+#endif
- };
- int r = 0, k;
- char **fn;
---
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
new file mode 100644
index 0000000..28f1b21
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
@@ -0,0 +1,64 @@
+From 8b9d194e956848e0d1fb35ef2fba714b2691ebe6 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 20:47:49 -0800
+Subject: [PATCH 03/31] use lnr wrapper instead of looking for --relative
+ option for ln
+
+Remove file manually to avoid the 'File Exists' error when creating
+symlink. This is because the original 'ln' command uses '-f' option.
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 4 ----
+ tools/meson-make-symlink.sh | 3 ++-
+ units/meson-add-wants.sh | 7 ++++++-
+ 3 files changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 36a62d280..7347ea880 100644
+--- a/meson.build
++++ b/meson.build
+@@ -570,10 +570,6 @@ endforeach
+
+ conf.set_quoted('TELINIT', get_option('telinit-path'))
+
+-if run_command('ln', '--relative', '--help').returncode() != 0
+- error('ln does not support --relative')
+-endif
+-
+ ############################################################
+
+ gperf = find_program('gperf')
+diff --git a/tools/meson-make-symlink.sh b/tools/meson-make-symlink.sh
+index 501cd43d4..f4e4ac9ac 100755
+--- a/tools/meson-make-symlink.sh
++++ b/tools/meson-make-symlink.sh
+@@ -8,5 +8,6 @@ mkdir -vp "$(dirname "${DESTDIR:-}$2")"
+ if [ "$(dirname $1)" = . ]; then
+ ln -vfs -T "$1" "${DESTDIR:-}$2"
+ else
+- ln -vfs -T --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2"
++ rm -f "${DESTDIR:-}$2"
++ lnr "${DESTDIR:-}$1" "${DESTDIR:-}$2"
+ fi
+diff --git a/units/meson-add-wants.sh b/units/meson-add-wants.sh
+index 70f7172ae..a42666aac 100755
+--- a/units/meson-add-wants.sh
++++ b/units/meson-add-wants.sh
+@@ -25,4 +25,9 @@ case "$target" in
+ ;;
+ esac
+
+-ln -vfs --relative "$unitpath" "$dir"
++if [ -d "$dir" ]; then
++ rm -f "$dir/$unit"
++ lnr "$unitpath" "$dir/$unit"
++else
++ lnr "$unitpath" "$dir"
++fi
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch
deleted file mode 100644
index ab2cbe0..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 5765cda4f7243e240b1e8723dc536fb20503d544 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 19:28:32 -0800
-Subject: [PATCH 04/19] Use getenv when secure versions are not available
-
-musl doesnt implement secure version, so we default
-to it if configure does not detect a secure imeplementation
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Denied
----
- src/basic/missing.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/basic/missing.h b/src/basic/missing.h
-index 4a3fd9c..4936873 100644
---- a/src/basic/missing.h
-+++ b/src/basic/missing.h
-@@ -529,7 +529,7 @@ struct btrfs_ioctl_quota_ctl_args {
- # ifdef HAVE___SECURE_GETENV
- # define secure_getenv __secure_getenv
- # else
--# error "neither secure_getenv nor __secure_getenv are available"
-+# define secure_getenv getenv
- # endif
- #endif
-
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-implment-systemd-sysv-install-for-OE.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-implment-systemd-sysv-install-for-OE.patch
new file mode 100644
index 0000000..83fdb53
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-implment-systemd-sysv-install-for-OE.patch
@@ -0,0 +1,43 @@
+From 70d456fb21de2a80697fa364f08475339d6396c1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 5 Sep 2015 06:31:47 +0000
+Subject: [PATCH 04/31] implment systemd-sysv-install for OE
+
+Use update-rc.d for enabling/disabling and status command
+to check the status of the sysv service
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/systemctl/systemd-sysv-install.SKELETON | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/systemctl/systemd-sysv-install.SKELETON b/src/systemctl/systemd-sysv-install.SKELETON
+index a53a3e622..5d877b06e 100755
+--- a/src/systemctl/systemd-sysv-install.SKELETON
++++ b/src/systemctl/systemd-sysv-install.SKELETON
+@@ -30,17 +30,17 @@ case "$1" in
+ enable)
+ # call the command to enable SysV init script $NAME here
+ # (consider optional $ROOT)
+- echo "IMPLEMENT ME: enabling SysV init.d script $NAME"
++ update-rc.d -f $NAME defaults
+ ;;
+ disable)
+ # call the command to disable SysV init script $NAME here
+ # (consider optional $ROOT)
+- echo "IMPLEMENT ME: disabling SysV init.d script $NAME"
++ update-rc.d -f $NAME remove
+ ;;
+ is-enabled)
+ # exit with 0 if $NAME is enabled, non-zero if it is disabled
+ # (consider optional $ROOT)
+- echo "IMPLEMENT ME: checking SysV init.d script $NAME"
++ /etc/init.d/$NAME status
+ ;;
+ *)
+ usage ;;
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch
deleted file mode 100644
index cb5ae99..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From c850b654e71677e0d6292f1345207b9b5acffc33 Mon Sep 17 00:00:00 2001
-From: Emil Renner Berthing <systemd@esmil.dk>
-Date: Mon, 23 Oct 2017 11:31:03 -0700
-Subject: [PATCH 04/12] src/basic/missing.h: check for missing __compar_fn_t
- typedef
-
-include missing.h for missing __compar_fn_t
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/basic/missing.h | 5 +++++
- src/basic/strbuf.c | 1 +
- 2 files changed, 6 insertions(+)
-
-diff --git a/src/basic/missing.h b/src/basic/missing.h
-index 8009888ad..671f341c6 100644
---- a/src/basic/missing.h
-+++ b/src/basic/missing.h
-@@ -1063,6 +1063,11 @@ struct input_mask {
- #define RENAME_NOREPLACE (1 << 0)
- #endif
-
-+#ifndef __COMPAR_FN_T
-+#define __COMPAR_FN_T
-+typedef int (*__compar_fn_t)(const void *, const void *);
-+#endif
-+
- #ifndef KCMP_FILE
- #define KCMP_FILE 0
- #endif
-diff --git a/src/basic/strbuf.c b/src/basic/strbuf.c
-index 00aaf9e62..9dc4a584a 100644
---- a/src/basic/strbuf.c
-+++ b/src/basic/strbuf.c
-@@ -23,6 +23,7 @@
-
- #include "alloc-util.h"
- #include "strbuf.h"
-+#include "missing.h"
-
- /*
- * Strbuf stores given strings in a single continuous allocated memory
---
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch
deleted file mode 100644
index 7016e98..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 74450f0dbad2f8478c26eeaa46d4e4a987858f45 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:03:44 +0000
-Subject: [PATCH 05/19] binfmt: Don't install dependency links at install time
- for the binfmt services
-
-use [Install] blocks so that they get created when the service is enabled
-like a traditional service.
-
-The [Install] blocks were rejected upstream as they don't have a way to
-"enable"
-it on install without static symlinks which can't be disabled, only
-masked. We
-however can do that in a postinst.
-
-Upstream-Status: Denied
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.am | 4 ----
- units/proc-sys-fs-binfmt_misc.automount | 3 +++
- units/systemd-binfmt.service.in | 5 +++++
- 3 files changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 50da458..29ed1dd 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -4635,10 +4635,6 @@ INSTALL_DIRS += \
- $(prefix)/lib/binfmt.d \
- $(sysconfdir)/binfmt.d
-
--SYSINIT_TARGET_WANTS += \
-- systemd-binfmt.service \
-- proc-sys-fs-binfmt_misc.automount
--
- endif
-
- EXTRA_DIST += \
-diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
-index 6be3893..709adef 100644
---- a/units/proc-sys-fs-binfmt_misc.automount
-+++ b/units/proc-sys-fs-binfmt_misc.automount
-@@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/
-
- [Automount]
- Where=/proc/sys/fs/binfmt_misc
-+
-+[Install]
-+WantedBy=sysinit.target
-diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
-index d53073e..8c57ee0 100644
---- a/units/systemd-binfmt.service.in
-+++ b/units/systemd-binfmt.service.in
-@@ -11,6 +11,8 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
- Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
- DefaultDependencies=no
- Conflicts=shutdown.target
-+Wants=proc-sys-fs-binfmt_misc.automount
-+
- After=proc-sys-fs-binfmt_misc.automount
- Before=sysinit.target shutdown.target
- ConditionPathIsReadWrite=/proc/sys/
-@@ -25,3 +27,6 @@ Type=oneshot
- RemainAfterExit=yes
- ExecStart=@rootlibexecdir@/systemd-binfmt
- TimeoutSec=90s
-+
-+[Install]
-+WantedBy=sysinit.target
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0005-rules-whitelist-hd-devices.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0005-rules-whitelist-hd-devices.patch
new file mode 100644
index 0000000..e4421c8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0005-rules-whitelist-hd-devices.patch
@@ -0,0 +1,33 @@
+From 7b5b34993002b4418ba8a3c2ae661a7337fd8ed0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 9 Nov 2016 19:41:13 -0800
+Subject: [PATCH 05/31] rules: whitelist hd* devices
+
+qemu by default emulates IDE and the linux-yocto kernel(s) use
+CONFIG_IDE instead of the more modern libsata, so disks appear as
+/dev/hd*. Patch rejected upstream because CONFIG_IDE is deprecated.
+
+Upstream-Status: Denied [https://github.com/systemd/systemd/pull/1276]
+
+Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ rules/60-persistent-storage.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
+index 0de8cf3a1..d3f58f153 100644
+--- a/rules/60-persistent-storage.rules
++++ b/rules/60-persistent-storage.rules
+@@ -7,7 +7,7 @@ ACTION=="remove", GOTO="persistent_storage_end"
+ ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_end"
+
+ SUBSYSTEM!="block", GOTO="persistent_storage_end"
+-KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*|pmem*|nbd*", GOTO="persistent_storage_end"
++KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*|pmem*|nbd*|hd*", GOTO="persistent_storage_end"
+
+ # ignore partitions that span the entire disk
+ TEST=="whole_disk", GOTO="persistent_storage_end"
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
deleted file mode 100644
index 55887ee..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 21080b6a40d0a4ddd2db8f0fa37686f6fa885d1c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 23 Oct 2017 11:38:33 -0700
-Subject: [PATCH 06/12] Include netinet/if_ether.h
-
-Fixes
-/mnt/a/oe/build/tmp/work/mips32r2-bec-linux-musl/systemd/1_234-r0/recipe-sysroot/usr/include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr'
- struct ethhdr {
- ^~~~~~
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/libsystemd/sd-netlink/netlink-types.c | 1 +
- src/network/netdev/tuntap.c | 1 +
- src/network/networkd-brvlan.c | 1 +
- src/udev/net/ethtool-util.c | 2 +-
- src/udev/udev-builtin-net_setup_link.c | 2 +-
- 5 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c
-index 923f7dd10..b95b1e4b2 100644
---- a/src/libsystemd/sd-netlink/netlink-types.c
-+++ b/src/libsystemd/sd-netlink/netlink-types.c
-@@ -19,6 +19,7 @@
-
- #include <stdint.h>
- #include <sys/socket.h>
-+#include <netinet/if_ether.h>
- #include <linux/netlink.h>
- #include <linux/rtnetlink.h>
- #include <linux/can/netlink.h>
-diff --git a/src/network/netdev/tuntap.c b/src/network/netdev/tuntap.c
-index 3d6280884..40e58c38f 100644
---- a/src/network/netdev/tuntap.c
-+++ b/src/network/netdev/tuntap.c
-@@ -18,6 +18,7 @@
- ***/
-
- #include <fcntl.h>
-+#include <netinet/if_ether.h>
- #include <linux/if_tun.h>
- #include <net/if.h>
- #include <netinet/if_ether.h>
-diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c
-index fa5d3ee7f..e0828962a 100644
---- a/src/network/networkd-brvlan.c
-+++ b/src/network/networkd-brvlan.c
-@@ -18,6 +18,7 @@
- ***/
-
- #include <netinet/in.h>
-+#include <netinet/if_ether.h>
- #include <linux/if_bridge.h>
- #include <stdbool.h>
-
-diff --git a/src/udev/net/ethtool-util.c b/src/udev/net/ethtool-util.c
-index 201fc2343..5f7cc2a0a 100644
---- a/src/udev/net/ethtool-util.c
-+++ b/src/udev/net/ethtool-util.c
-@@ -16,7 +16,7 @@
- You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
--
-+#include <netinet/if_ether.h>
- #include <net/if.h>
- #include <sys/ioctl.h>
- #include <linux/ethtool.h>
-diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c
-index 8e4777513..d01fff2a4 100644
---- a/src/udev/udev-builtin-net_setup_link.c
-+++ b/src/udev/udev-builtin-net_setup_link.c
-@@ -16,7 +16,7 @@
- You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
--
-+#include <netinet/if_ether.h>
- #include "alloc-util.h"
- #include "link-config.h"
- #include "log.h"
---
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Make-root-s-home-directory-configurable.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Make-root-s-home-directory-configurable.patch
new file mode 100644
index 0000000..5ba9661
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Make-root-s-home-directory-configurable.patch
@@ -0,0 +1,78 @@
+From 9d63227420f0c4f093c1c2066eafe2b6152070cf Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Fri, 23 Feb 2018 13:47:37 +0800
+Subject: [PATCH 06/31] Make root's home directory configurable
+
+OpenEmbedded has a configurable home directory for root. Allow
+systemd to be built using its idea of what root's home directory
+should be.
+
+Upstream-Status: Denied
+Upstream wants to have a unified hierarchy where everyone is
+using the same root folder.
+https://github.com/systemd/systemd/issues/541
+
+Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 8 ++++++++
+ meson_options.txt | 2 ++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 7347ea880..918101d6b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -94,6 +94,11 @@ if rootlibdir == ''
+ rootlibdir = join_paths(rootprefixdir, libdir.split('/')[-1])
+ endif
+
++roothomedir = get_option('roothomedir')
++if roothomedir == ''
++ roothomedir = '/root'
++endif
++
+ # Dirs of external packages
+ pkgconfigdatadir = join_paths(datadir, 'pkgconfig')
+ pkgconfiglibdir = join_paths(libdir, 'pkgconfig')
+@@ -205,6 +210,7 @@ conf.set_quoted('UDEVLIBEXECDIR', udevlibexecdir)
+ conf.set_quoted('POLKIT_AGENT_BINARY_PATH', join_paths(bindir, 'pkttyagent'))
+ conf.set_quoted('LIBDIR', libdir)
+ conf.set_quoted('ROOTLIBDIR', rootlibdir)
++conf.set_quoted('ROOTHOMEDIR', roothomedir)
+ conf.set_quoted('ROOTLIBEXECDIR', rootlibexecdir)
+ conf.set_quoted('BOOTLIBDIR', bootlibdir)
+ conf.set_quoted('SYSTEMD_PULL_PATH', join_paths(rootlibexecdir, 'systemd-pull'))
+@@ -221,6 +227,7 @@ substs.set('prefix', prefixdir)
+ substs.set('exec_prefix', prefixdir)
+ substs.set('libdir', libdir)
+ substs.set('rootlibdir', rootlibdir)
++substs.set('roothomedir', roothomedir)
+ substs.set('includedir', includedir)
+ substs.set('pkgsysconfdir', pkgsysconfdir)
+ substs.set('bindir', bindir)
+@@ -2705,6 +2712,7 @@ status = [
+ 'include directory: @0@'.format(includedir),
+ 'lib directory: @0@'.format(libdir),
+ 'rootlib directory: @0@'.format(rootlibdir),
++ 'roothome directory: @0@'.format(roothomedir),
+ 'SysV init scripts: @0@'.format(sysvinit_path),
+ 'SysV rc?.d directories: @0@'.format(sysvrcnd_path),
+ 'PAM modules directory: @0@'.format(pamlibdir),
+diff --git a/meson_options.txt b/meson_options.txt
+index 39822d6cd..0b24f0e0f 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -22,6 +22,8 @@ option('rootlibdir', type : 'string',
+ description : '''[/usr]/lib/x86_64-linux-gnu or such''')
+ option('rootprefix', type : 'string',
+ description : '''override the root prefix''')
++option('roothomedir', type : 'string',
++ description : '''override the root home directory''')
+ option('link-udev-shared', type : 'boolean',
+ description : 'link systemd-udev and its helpers to libsystemd-shared.so')
+
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-Revert-rules-remove-firmware-loading-rules.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-Revert-rules-remove-firmware-loading-rules.patch
new file mode 100644
index 0000000..bb12d30
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-Revert-rules-remove-firmware-loading-rules.patch
@@ -0,0 +1,28 @@
+From 35d6d384e83ac38077603611bb791969ef95fe68 Mon Sep 17 00:00:00 2001
+From: Jonathan Liu <net147@gmail.com>
+Date: Thu, 19 Mar 2015 15:01:29 +1100
+Subject: [PATCH 07/31] Revert "rules: remove firmware loading rules"
+
+This reverts commit 70e7d754ddb356fb1a2942b262f8cee9650e2a19.
+Userspace firmware loading support is needed for Linux < 3.7.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+---
+ rules/50-firmware.rules | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 rules/50-firmware.rules
+
+diff --git a/rules/50-firmware.rules b/rules/50-firmware.rules
+new file mode 100644
+index 000000000..f0ae68451
+--- /dev/null
++++ b/rules/50-firmware.rules
+@@ -0,0 +1,3 @@
++# do not edit this file, it will be overwritten on update
++
++SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware"
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch
deleted file mode 100644
index 5234c59..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 05dffe67919ffc72be5c017bc6cf82f164b2e8f9 Mon Sep 17 00:00:00 2001
-From: Emil Renner Berthing <systemd@esmil.dk>
-Date: Mon, 23 Oct 2017 11:42:03 -0700
-Subject: [PATCH 07/12] check for missing canonicalize_file_name
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- configure.ac | 2 ++
- src/basic/missing.h | 1 +
- src/basic/missing_syscall.h | 6 ++++++
- 3 files changed, 9 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index cd035a971..3674190fb 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -333,6 +333,7 @@ AC_CHECK_DECLS([
- renameat2,
- kcmp,
- keyctl,
-+ canonicalize_file_name,
- LO_FLAGS_PARTSCAN,
- copy_file_range,
- explicit_bzero],
-@@ -343,6 +344,7 @@ AC_CHECK_DECLS([
- #include <fcntl.h>
- #include <sched.h>
- #include <string.h>
-+#include <stdlib.h>
- #include <linux/loop.h>
- ]])
-
-diff --git a/src/basic/missing.h b/src/basic/missing.h
-index 671f341c6..8ae4964e1 100644
---- a/src/basic/missing.h
-+++ b/src/basic/missing.h
-@@ -1246,3 +1246,4 @@ struct ethtool_link_settings {
- #endif
-
- #include "missing_syscall.h"
-+
-diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
-index 898116c7b..4d44ee4fa 100644
---- a/src/basic/missing_syscall.h
-+++ b/src/basic/missing_syscall.h
-@@ -28,6 +28,12 @@ static inline int pivot_root(const char *new_root, const char *put_old) {
- }
- #endif
-
-+#if !HAVE_DECL_CANONICALIZE_FILE_NAME
-+static inline char *canonicalize_file_name(const char *path) {
-+ return realpath(path, NULL);
-+}
-+#endif
-+
- /* ======================================================================= */
-
- #if !HAVE_DECL_MEMFD_CREATE
---
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
deleted file mode 100644
index bc92db7..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From a3482c91642cf568b3ac27fa6c0cb3c6b30669b7 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 19:32:14 -0800
-Subject: [PATCH 07/19] use lnr wrapper instead of looking for --relative
- option for ln
-
-Upstream-Status: Inappropriate [OE-Specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.am | 2 +-
- configure.ac | 2 --
- 2 files changed, 1 insertion(+), 3 deletions(-)
-
-Index: git/Makefile.am
-===================================================================
---- git.orig/Makefile.am
-+++ git/Makefile.am
-@@ -320,7 +320,7 @@ define install-relative-aliases
- while [ -n "$$1" ]; do \
- $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
- rm -f $(DESTDIR)$$dir/$$2 && \
-- $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
-+ lnr $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
- shift 2 || exit $$?; \
- done
- endef
-Index: git/configure.ac
-===================================================================
---- git.orig/configure.ac
-+++ git/configure.ac
-@@ -110,8 +110,6 @@ AC_PATH_PROG([SULOGIN], [sulogin], [/usr
- AC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
- AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
-
--AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
--
- M4_DEFINES=
-
- AC_CHECK_TOOL(OBJCOPY, objcopy)
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Do-not-enable-nss-tests.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Do-not-enable-nss-tests.patch
deleted file mode 100644
index 67a4f8e..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Do-not-enable-nss-tests.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 48e7c0f5b2f5d777a16ac5584dc4f50f1dfa832c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 23 Oct 2017 12:27:53 -0700
-Subject: [PATCH 08/12] Do not enable nss tests
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 3cc8f3451..df20a9a11 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -5290,6 +5290,7 @@ EXTRA_DIST += \
- src/timesync/timesyncd.conf.in
-
- # ------------------------------------------------------------------------------
-+if ENABLE_NSS_SYSTEMD
- test_nss_SOURCES = \
- src/test/test-nss.c
-
-@@ -5302,7 +5303,6 @@ manual_tests += \
- test-nss
-
- # ------------------------------------------------------------------------------
--if ENABLE_NSS_SYSTEMD
- libnss_systemd_la_SOURCES = \
- src/nss-systemd/nss-systemd.sym \
- src/nss-systemd/nss-systemd.c
---
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Revert-udev-remove-userspace-firmware-loading-suppor.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Revert-udev-remove-userspace-firmware-loading-suppor.patch
new file mode 100644
index 0000000..15d7e02
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Revert-udev-remove-userspace-firmware-loading-suppor.patch
@@ -0,0 +1,377 @@
+From 5cce7626f33e92f624ac06b613125813fb47d445 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:05:39 -0800
+Subject: [PATCH 08/31] Revert "udev: remove userspace firmware loading
+ support"
+
+This reverts commit be2ea723b1d023b3d385d3b791ee4607cbfb20ca.
+Userspace firmware loading support is needed for Linux < 3.7.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ README | 4 +-
+ TODO | 1 +
+ meson.build | 9 +++
+ meson_options.txt | 2 +
+ rules/meson.build | 4 +
+ src/udev/meson.build | 4 +
+ src/udev/udev-builtin-firmware.c | 154 +++++++++++++++++++++++++++++++++++++++
+ src/udev/udev-builtin.c | 3 +
+ src/udev/udev.h | 6 ++
+ src/udev/udevd.c | 12 +++
+ 10 files changed, 197 insertions(+), 2 deletions(-)
+ create mode 100644 src/udev/udev-builtin-firmware.c
+
+diff --git a/README b/README
+index 8807e5cfe..bfd7a35de 100644
+--- a/README
++++ b/README
+@@ -58,8 +58,8 @@ REQUIREMENTS:
+ Legacy hotplug slows down the system and confuses udev:
+ CONFIG_UEVENT_HELPER_PATH=""
+
+- Userspace firmware loading is not supported and should
+- be disabled in the kernel:
++ Userspace firmware loading is deprecated, will go away, and
++ sometimes causes problems:
+ CONFIG_FW_LOADER_USER_HELPER=n
+
+ Some udev rules and virtualization detection relies on it:
+diff --git a/TODO b/TODO
+index a77028c7b..39e72d7ec 100644
+--- a/TODO
++++ b/TODO
+@@ -783,6 +783,7 @@ Features:
+ * initialize the hostname from the fs label of /, if /etc/hostname does not exist?
+
+ * udev:
++ - remove src/udev/udev-builtin-firmware.c (CONFIG_FW_LOADER_USER_HELPER=n)
+ - move to LGPL
+ - kill scsi_id
+ - add trigger --subsystem-match=usb/usb_device device
+diff --git a/meson.build b/meson.build
+index 918101d6b..9c25022a4 100644
+--- a/meson.build
++++ b/meson.build
+@@ -72,6 +72,12 @@ conf.set10('HAVE_SYSV_COMPAT', have,
+ description : 'SysV init scripts and rcN.d links are supported')
+ m4_defines += have ? ['-DHAVE_SYSV_COMPAT'] : []
+
++firmware_path = get_option('firmware-path')
++have = firmware_path != ''
++conf.set10('HAVE_FIRMWARE', have,
++ description : 'Userspace firmware loading is supported')
++m4_defines += have ? ['-DHAVE_FIRMWARE'] : []
++
+ # join_paths ignore the preceding arguments if an absolute component is
+ # encountered, so this should canonicalize various paths when they are
+ # absolute or relative.
+@@ -178,6 +184,7 @@ conf.set_quoted('SYSTEM_CONFIG_UNIT_PATH', join_paths(pkgsysc
+ conf.set_quoted('SYSTEM_DATA_UNIT_PATH', systemunitdir)
+ conf.set_quoted('SYSTEM_SYSVINIT_PATH', sysvinit_path)
+ conf.set_quoted('SYSTEM_SYSVRCND_PATH', sysvrcnd_path)
++conf.set_quoted('FIRMWARE_PATH', firmware_path)
+ conf.set_quoted('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local'))
+ conf.set_quoted('RC_LOCAL_SCRIPT_PATH_STOP', get_option('halt-local'))
+ conf.set_quoted('USER_CONFIG_UNIT_PATH', join_paths(pkgsysconfdir, 'user'))
+@@ -258,6 +265,7 @@ substs.set('SYSTEMCTL', join_paths(rootbin
+ substs.set('RANDOM_SEED', join_paths(randomseeddir, 'random-seed'))
+ substs.set('SYSTEM_SYSVINIT_PATH', sysvinit_path)
+ substs.set('SYSTEM_SYSVRCND_PATH', sysvrcnd_path)
++substs.set('FIRMWARE_PATH', firmware_path)
+ substs.set('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local'))
+ substs.set('RC_LOCAL_SCRIPT_PATH_STOP', get_option('halt-local'))
+
+@@ -2715,6 +2723,7 @@ status = [
+ 'roothome directory: @0@'.format(roothomedir),
+ 'SysV init scripts: @0@'.format(sysvinit_path),
+ 'SysV rc?.d directories: @0@'.format(sysvrcnd_path),
++ 'firmware path: @0@'.format(firmware_path),
+ 'PAM modules directory: @0@'.format(pamlibdir),
+ 'PAM configuration directory: @0@'.format(pamconfdir),
+ 'RPM macros directory: @0@'.format(rpmmacrosdir),
+diff --git a/meson_options.txt b/meson_options.txt
+index 0b24f0e0f..92d25fa35 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -108,6 +108,8 @@ option('tmpfiles', type : 'boolean',
+ description : 'support for tmpfiles.d')
+ option('importd', type : 'combo', choices : ['auto', 'true', 'false'],
+ description : 'install the systemd-importd daemon')
++option('firmware-path', type : 'string', value : '',
++ description : 'Firmware search path')
+ option('hwdb', type : 'boolean',
+ description : 'support for the hardware database')
+ option('rfkill', type : 'boolean',
+diff --git a/rules/meson.build b/rules/meson.build
+index e253b9f59..5eee5fbca 100644
+--- a/rules/meson.build
++++ b/rules/meson.build
+@@ -41,6 +41,10 @@ rules = files('''
+ install_data(rules,
+ install_dir : udevrulesdir)
+
++if conf.get('HAVE_FIRMWARE') == 1
++ install_data('50-firmware.rules', install_dir : udevrulesdir)
++endif
++
+ all_rules = rules
+
+ rules_in = '''
+diff --git a/src/udev/meson.build b/src/udev/meson.build
+index de2fd2d9c..b6b0ca006 100644
+--- a/src/udev/meson.build
++++ b/src/udev/meson.build
+@@ -67,6 +67,10 @@ if conf.get('HAVE_ACL') == 1
+ sd_login_c]
+ endif
+
++if conf.get('HAVE_FIRMWARE') == 1
++ libudev_core_sources += ['udev-builtin-firmware.c']
++endif
++
+ ############################################################
+
+ generate_keyboard_keys_list = find_program('generate-keyboard-keys-list.sh')
+diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c
+new file mode 100644
+index 000000000..bd8c2fb96
+--- /dev/null
++++ b/src/udev/udev-builtin-firmware.c
+@@ -0,0 +1,154 @@
++/*
++ * firmware - Kernel firmware loader
++ *
++ * Copyright (C) 2009 Piter Punk <piterpunk@slackware.com>
++ * Copyright (C) 2009-2011 Kay Sievers <kay@vrfy.org>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of the
++ * License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * General Public License for more details:*
++ */
++
++#include <unistd.h>
++#include <stdlib.h>
++#include <string.h>
++#include <stdio.h>
++#include <getopt.h>
++#include <errno.h>
++#include <stdbool.h>
++#include <sys/utsname.h>
++#include <sys/stat.h>
++
++#include "udev.h"
++
++static bool set_loading(struct udev *udev, char *loadpath, const char *state) {
++ FILE *ldfile;
++
++ ldfile = fopen(loadpath, "we");
++ if (ldfile == NULL) {
++ log_error("error: can not open '%s'", loadpath);
++ return false;
++ };
++ fprintf(ldfile, "%s\n", state);
++ fclose(ldfile);
++ return true;
++}
++
++static bool copy_firmware(struct udev *udev, const char *source, const char *target, size_t size) {
++ char *buf;
++ FILE *fsource = NULL, *ftarget = NULL;
++ bool ret = false;
++
++ buf = malloc(size);
++ if (buf == NULL) {
++ log_error("No memory available to load firmware file");
++ return false;
++ }
++
++ log_debug("writing '%s' (%zi) to '%s'", source, size, target);
++
++ fsource = fopen(source, "re");
++ if (fsource == NULL)
++ goto exit;
++ ftarget = fopen(target, "we");
++ if (ftarget == NULL)
++ goto exit;
++ if (fread(buf, size, 1, fsource) != 1)
++ goto exit;
++ if (fwrite(buf, size, 1, ftarget) == 1)
++ ret = true;
++exit:
++ if (ftarget != NULL)
++ fclose(ftarget);
++ if (fsource != NULL)
++ fclose(fsource);
++ free(buf);
++ return ret;
++}
++
++static int builtin_firmware(struct udev_device *dev, int argc, char *argv[], bool test) {
++ struct udev *udev = udev_device_get_udev(dev);
++ static const char *searchpath[] = { FIRMWARE_PATH };
++ char loadpath[UTIL_PATH_SIZE];
++ char datapath[UTIL_PATH_SIZE];
++ char fwpath[UTIL_PATH_SIZE];
++ const char *firmware;
++ FILE *fwfile = NULL;
++ struct utsname kernel;
++ struct stat statbuf;
++ unsigned int i;
++ int rc = EXIT_SUCCESS;
++
++ firmware = udev_device_get_property_value(dev, "FIRMWARE");
++ if (firmware == NULL) {
++ log_error("firmware parameter missing");
++ rc = EXIT_FAILURE;
++ goto exit;
++ }
++
++ /* lookup firmware file */
++ uname(&kernel);
++ for (i = 0; i < ELEMENTSOF(searchpath); i++) {
++ strscpyl(fwpath, sizeof(fwpath), searchpath[i], kernel.release, "/", firmware, NULL);
++ fwfile = fopen(fwpath, "re");
++ if (fwfile != NULL)
++ break;
++
++ strscpyl(fwpath, sizeof(fwpath), searchpath[i], firmware, NULL);
++ fwfile = fopen(fwpath, "re");
++ if (fwfile != NULL)
++ break;
++ }
++
++ strscpyl(loadpath, sizeof(loadpath), udev_device_get_syspath(dev), "/loading", NULL);
++
++ if (fwfile == NULL) {
++ log_debug("did not find firmware file '%s'", firmware);
++ rc = EXIT_FAILURE;
++ /*
++ * Do not cancel the request in the initrd, the real root might have
++ * the firmware file and the 'coldplug' run in the real root will find
++ * this pending request and fulfill or cancel it.
++ * */
++ if (!in_initrd())
++ set_loading(udev, loadpath, "-1");
++ goto exit;
++ }
++
++ if (stat(fwpath, &statbuf) < 0 || statbuf.st_size == 0) {
++ if (!in_initrd())
++ set_loading(udev, loadpath, "-1");
++ rc = EXIT_FAILURE;
++ goto exit;
++ }
++
++ if (!set_loading(udev, loadpath, "1"))
++ goto exit;
++
++ strscpyl(datapath, sizeof(datapath), udev_device_get_syspath(dev), "/data", NULL);
++ if (!copy_firmware(udev, fwpath, datapath, statbuf.st_size)) {
++ log_error("error sending firmware '%s' to device", firmware);
++ set_loading(udev, loadpath, "-1");
++ rc = EXIT_FAILURE;
++ goto exit;
++ };
++
++ set_loading(udev, loadpath, "0");
++exit:
++ if (fwfile)
++ fclose(fwfile);
++ return rc;
++}
++
++const struct udev_builtin udev_builtin_firmware = {
++ .name = "firmware",
++ .cmd = builtin_firmware,
++ .help = "kernel firmware loader",
++ .run_once = true,
++};
+diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
+index db2b6874f..ccd88638c 100644
+--- a/src/udev/udev-builtin.c
++++ b/src/udev/udev-builtin.c
+@@ -32,6 +32,9 @@ static const struct udev_builtin *builtins[] = {
+ [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
+ #endif
+ [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
++#if HAVE_FIRMWARE
++ [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
++#endif
+ [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
+ [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id,
+ [UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard,
+diff --git a/src/udev/udev.h b/src/udev/udev.h
+index ea11c2d29..c47dd3d88 100644
+--- a/src/udev/udev.h
++++ b/src/udev/udev.h
+@@ -151,6 +151,9 @@ enum udev_builtin_cmd {
+ UDEV_BUILTIN_BLKID,
+ #endif
+ UDEV_BUILTIN_BTRFS,
++#if HAVE_FIRMWARE
++ UDEV_BUILTIN_FIRMWARE,
++#endif
+ UDEV_BUILTIN_HWDB,
+ UDEV_BUILTIN_INPUT_ID,
+ UDEV_BUILTIN_KEYBOARD,
+@@ -179,6 +182,9 @@ struct udev_builtin {
+ extern const struct udev_builtin udev_builtin_blkid;
+ #endif
+ extern const struct udev_builtin udev_builtin_btrfs;
++#if HAVE_FIRMWARE
++extern const struct udev_builtin udev_builtin_firmware;
++#endif
+ extern const struct udev_builtin udev_builtin_hwdb;
+ extern const struct udev_builtin udev_builtin_input_id;
+ extern const struct udev_builtin udev_builtin_keyboard;
+diff --git a/src/udev/udevd.c b/src/udev/udevd.c
+index 5c757d513..2f3313007 100644
+--- a/src/udev/udevd.c
++++ b/src/udev/udevd.c
+@@ -127,6 +127,9 @@ struct event {
+ bool is_block;
+ sd_event_source *timeout_warning;
+ sd_event_source *timeout;
++#if HAVE_FIRMWARE
++ bool nodelay;
++#endif
+ };
+
+ static void event_queue_cleanup(Manager *manager, enum event_state type);
+@@ -609,6 +612,10 @@ static int event_queue_insert(Manager *manager, struct udev_device *dev) {
+ event->devnum = udev_device_get_devnum(dev);
+ event->is_block = streq("block", udev_device_get_subsystem(dev));
+ event->ifindex = udev_device_get_ifindex(dev);
++#if HAVE_FIRMWARE
++ if (streq(udev_device_get_subsystem(dev), "firmware"))
++ event->nodelay = true;
++#endif
+
+ log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev),
+ udev_device_get_action(dev), udev_device_get_subsystem(dev));
+@@ -692,6 +699,11 @@ static bool is_devpath_busy(Manager *manager, struct event *event) {
+ return true;
+ }
+
++#if HAVE_FIRMWARE
++ /* allow to bypass the dependency tracking */
++ if (event->nodelay)
++ continue;
++#endif
+ /* parent device event found */
+ if (event->devpath[common] == '/') {
+ event->delaying_seqnum = loop_event->seqnum;
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-remove-duplicate-include-uchar.h.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-remove-duplicate-include-uchar.h.patch
new file mode 100644
index 0000000..1b14369
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-remove-duplicate-include-uchar.h.patch
@@ -0,0 +1,41 @@
+From ffdf9cb6ba0d932b81933d824f23a878c313a8d4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 22 Feb 2016 05:59:01 +0000
+Subject: [PATCH 09/31] remove duplicate include uchar.h
+
+missing.h already includes it
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+---
+ src/basic/escape.h | 1 -
+ src/basic/utf8.h | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/src/basic/escape.h b/src/basic/escape.h
+index de89f43a8..9921ccbbd 100644
+--- a/src/basic/escape.h
++++ b/src/basic/escape.h
+@@ -24,7 +24,6 @@
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <sys/types.h>
+-#include <uchar.h>
+
+ #include "string-util.h"
+ #include "missing.h"
+diff --git a/src/basic/utf8.h b/src/basic/utf8.h
+index b0a7485ae..fa06d2906 100644
+--- a/src/basic/utf8.h
++++ b/src/basic/utf8.h
+@@ -23,7 +23,6 @@
+ #include <stdbool.h>
+ #include <stddef.h>
+ #include <stdint.h>
+-#include <uchar.h>
+
+ #include "macro.h"
+ #include "missing.h"
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-test-hexdecoct.c-Include-missing.h-form-strndupa.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-test-hexdecoct.c-Include-missing.h-form-strndupa.patch
deleted file mode 100644
index d3694dc..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-test-hexdecoct.c-Include-missing.h-form-strndupa.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 75f4e7f167de533a160ee1af2a03fba4c5a5ffc6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 23 Oct 2017 12:33:22 -0700
-Subject: [PATCH 09/12] test-hexdecoct.c: Include missing.h form strndupa
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/test/test-hexdecoct.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
-index fcae427e7..5eb5e2ed7 100644
---- a/src/test/test-hexdecoct.c
-+++ b/src/test/test-hexdecoct.c
-@@ -21,6 +21,7 @@
- #include "hexdecoct.h"
- #include "macro.h"
- #include "string-util.h"
-+#include "missing.h"
-
- static void test_hexchar(void) {
- assert_se(hexchar(0xa) == 'a');
---
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-check-for-uchar.h-in-meson.build.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-check-for-uchar.h-in-meson.build.patch
new file mode 100644
index 0000000..9a44b54
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-check-for-uchar.h-in-meson.build.patch
@@ -0,0 +1,45 @@
+From ea4caaa1c6a6dc682bb04548ab05c5c73d0b45d6 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 26 Feb 2018 15:34:52 +0800
+Subject: [PATCH 10/31] check for uchar.h in meson.build
+
+Use #if HAVE_UCHAR_H to include uchar.h conditionally.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 1 +
+ src/basic/missing.h | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 9c25022a4..94a16712b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -623,6 +623,7 @@ foreach header : ['crypt.h',
+ 'sys/auxv.h',
+ 'valgrind/memcheck.h',
+ 'valgrind/valgrind.h',
++ 'uchar.h',
+ ]
+
+ conf.set10('HAVE_' + header.underscorify().to_upper(),
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 39c1fb700..84d6d9167 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -38,7 +38,9 @@
+ #include <sys/resource.h>
+ #include <sys/socket.h>
+ #include <sys/syscall.h>
++#if HAVE_UCHAR_H
+ #include <uchar.h>
++#endif
+ #include <unistd.h>
+
+ #if HAVE_AUDIT
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch
deleted file mode 100644
index 8828d6e..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 52726be92e2b841f744a96c378cc872ae0033a2b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 5 Sep 2015 06:31:47 +0000
-Subject: [PATCH 10/19] implment systemd-sysv-install for OE
-
-Use update-rc.d for enabling/disabling and status command
-to check the status of the sysv service
-
-Upstream-Status: Inappropriate [OE-Specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/systemctl/systemd-sysv-install.SKELETON | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/systemctl/systemd-sysv-install.SKELETON b/src/systemctl/systemd-sysv-install.SKELETON
-index a53a3e6..5d877b0 100755
---- a/src/systemctl/systemd-sysv-install.SKELETON
-+++ b/src/systemctl/systemd-sysv-install.SKELETON
-@@ -30,17 +30,17 @@ case "$1" in
- enable)
- # call the command to enable SysV init script $NAME here
- # (consider optional $ROOT)
-- echo "IMPLEMENT ME: enabling SysV init.d script $NAME"
-+ update-rc.d -f $NAME defaults
- ;;
- disable)
- # call the command to disable SysV init script $NAME here
- # (consider optional $ROOT)
-- echo "IMPLEMENT ME: disabling SysV init.d script $NAME"
-+ update-rc.d -f $NAME remove
- ;;
- is-enabled)
- # exit with 0 if $NAME is enabled, non-zero if it is disabled
- # (consider optional $ROOT)
-- echo "IMPLEMENT ME: checking SysV init.d script $NAME"
-+ /etc/init.d/$NAME status
- ;;
- *)
- usage ;;
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
deleted file mode 100644
index 808c83a..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 6e9d2bcaa6f886b2384c1c35a04e4ebc148aea68 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 23 Oct 2017 12:40:25 -0700
-Subject: [PATCH 10/12] test-sizeof.c: Disable tests for missing typedefs in
- musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/test/test-sizeof.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
-index 269adfd18..ba7855dff 100644
---- a/src/test/test-sizeof.c
-+++ b/src/test/test-sizeof.c
-@@ -18,7 +18,6 @@
- ***/
-
- #include <stdio.h>
--
- #include "time-util.h"
-
- /* Print information about various types. Useful when diagnosing
-@@ -48,8 +47,10 @@ int main(void) {
- info(unsigned);
- info(long unsigned);
- info(long long unsigned);
-+#ifdef __GLIBC__
- info(__syscall_ulong_t);
- info(__syscall_slong_t);
-+#endif
-
- info(float);
- info(double);
-@@ -59,7 +60,9 @@ int main(void) {
- info(ssize_t);
- info(time_t);
- info(usec_t);
-+#ifdef __GLIBC__
- info(__time_t);
-+#endif
-
- info(enum Enum);
- info(enum BigEnum);
---
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-don-t-use-glibc-specific-qsort_r.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-don-t-use-glibc-specific-qsort_r.patch
deleted file mode 100644
index 7cfe829..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-don-t-use-glibc-specific-qsort_r.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From 2eb45f5a0a8bfb8bdca084587ad28e5001f3cc4b Mon Sep 17 00:00:00 2001
-From: Emil Renner Berthing <systemd@esmil.dk>
-Date: Thu, 18 Sep 2014 15:24:56 +0200
-Subject: [PATCH 11/12] don't use glibc-specific qsort_r
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/hwdb/hwdb.c | 18 +++++++++++-------
- src/udev/udevadm-hwdb.c | 16 ++++++++++------
- 2 files changed, 21 insertions(+), 13 deletions(-)
-
-diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c
-index 793398ca6..669b00818 100644
---- a/src/hwdb/hwdb.c
-+++ b/src/hwdb/hwdb.c
-@@ -151,13 +151,12 @@ static void trie_free(struct trie *trie) {
-
- DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
-
--static int trie_values_cmp(const void *v1, const void *v2, void *arg) {
-+static struct trie *trie_node_add_value_trie;
-+static int trie_values_cmp(const void *v1, const void *v2) {
- const struct trie_value_entry *val1 = v1;
- const struct trie_value_entry *val2 = v2;
-- struct trie *trie = arg;
--
-- return strcmp(trie->strings->buf + val1->key_off,
-- trie->strings->buf + val2->key_off);
-+ return strcmp(trie_node_add_value_trie->strings->buf + val1->key_off,
-+ trie_node_add_value_trie->strings->buf + val2->key_off);
- }
-
- static int trie_node_add_value(struct trie *trie, struct trie_node *node,
-@@ -182,7 +181,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
- .value_off = v,
- };
-
-- val = xbsearch_r(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
-+ trie_node_add_value_trie = trie;
-+ val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
-+ trie_node_add_value_trie = NULL;
-+
- if (val) {
- /* At this point we have 2 identical properties on the same match-string.
- * Since we process files in order, we just replace the previous value.
-@@ -207,7 +209,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
- node->values[node->values_count].file_priority = file_priority;
- node->values[node->values_count].line_number = line_number;
- node->values_count++;
-- qsort_r(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
-+ trie_node_add_value_trie = trie;
-+ qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
-+ trie_node_add_value_trie = NULL;
- return 0;
- }
-
-diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c
-index 69b0b9025..fbd213300 100644
---- a/src/udev/udevadm-hwdb.c
-+++ b/src/udev/udevadm-hwdb.c
-@@ -128,13 +128,13 @@ static void trie_node_cleanup(struct trie_node *node) {
- free(node);
- }
-
--static int trie_values_cmp(const void *v1, const void *v2, void *arg) {
-+static struct trie *trie_node_add_value_trie;
-+static int trie_values_cmp(const void *v1, const void *v2) {
- const struct trie_value_entry *val1 = v1;
- const struct trie_value_entry *val2 = v2;
-- struct trie *trie = arg;
-
-- return strcmp(trie->strings->buf + val1->key_off,
-- trie->strings->buf + val2->key_off);
-+ return strcmp(trie_node_add_value_trie->strings->buf + val1->key_off,
-+ trie_node_add_value_trie->strings->buf + val2->key_off);
- }
-
- static int trie_node_add_value(struct trie *trie, struct trie_node *node,
-@@ -155,7 +155,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
- .value_off = v,
- };
-
-- val = xbsearch_r(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
-+ trie_node_add_value_trie = trie;
-+ val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
-+ trie_node_add_value_trie = NULL;
- if (val) {
- /* replace existing earlier key with new value */
- val->value_off = v;
-@@ -172,7 +174,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
- node->values[node->values_count].key_off = k;
- node->values[node->values_count].value_off = v;
- node->values_count++;
-- qsort_r(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
-+ trie_node_add_value_trie = trie;
-+ qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
-+ trie_node_add_value_trie = NULL;
- return 0;
- }
-
---
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch
deleted file mode 100644
index b01ae97..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 3f6f45578b828e414f50c6822375073e7174236a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 14 Dec 2015 00:50:01 +0000
-Subject: [PATCH 11/19] nss-mymachines: Build conditionally when
- HAVE_MYHOSTNAME is set
-
-Fixes build failures when building with --disable-myhostname
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.am | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/Makefile.am b/Makefile.am
-index 02f4017..420e0e0 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -5146,6 +5146,7 @@ SYSTEM_UNIT_ALIASES += \
- BUSNAMES_TARGET_WANTS += \
- org.freedesktop.machine1.busname
-
-+if HAVE_MYHOSTNAME
- libnss_mymachines_la_SOURCES = \
- src/nss-mymachines/nss-mymachines.sym \
- src/nss-mymachines/nss-mymachines.c
-@@ -5167,6 +5168,7 @@ rootlib_LTLIBRARIES += \
- libnss_mymachines.la
-
- endif
-+endif
-
- polkitpolicy_in_files += \
- src/machine/org.freedesktop.machine1.policy.in
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
new file mode 100644
index 0000000..b0923d1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
@@ -0,0 +1,39 @@
+From 60dd411e9756fc2b14c0e061ad803782b4aee874 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 26 Feb 2018 15:46:05 +0800
+Subject: [PATCH 11/31] socket-util: don't fail if libc doesn't support IDN
+
+Upstream-Status: Pending
+
+Signed-off-by: Emil Renner Berthing <systemd@esmil.dk>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/socket-util.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
+index 2c70cade1..67aedadd4 100644
+--- a/src/basic/socket-util.c
++++ b/src/basic/socket-util.c
+@@ -50,6 +50,16 @@
+ #include "utf8.h"
+ #include "util.h"
+
++/* Don't fail if the standard library
++ * doesn't support IDN */
++#ifndef NI_IDN
++#define NI_IDN 0
++#endif
++
++#ifndef NI_IDN_USE_STD3_ASCII_RULES
++#define NI_IDN_USE_STD3_ASCII_RULES 0
++#endif
++
+ #if ENABLE_IDN
+ # define IDN_FLAGS (NI_IDN|NI_IDN_USE_STD3_ASCII_RULES)
+ #else
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
deleted file mode 100644
index 1a6db65..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From 9621618c701a2d5eb3e26f40c68354d4dfb8f872 Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Tue, 10 Oct 2017 14:33:30 -0700
-Subject: [PATCH 12/12] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat()
-
-Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right
-thing to do and it's not portable (not supported by musl). See:
-
- http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html
- http://www.openwall.com/lists/musl/2015/02/05/2
-
-Note that laccess() is never passing AT_EACCESS so a lot of the
-discussion in the links above doesn't apply. Note also that
-(currently) all systemd callers of laccess() pass mode as F_OK, so
-only check for existence of a file, not access permissions.
-Therefore, in this case, the only distiction between faccessat()
-with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the behaviour
-for broken symlinks; laccess() on a broken symlink will succeed with
-(flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0).
-
-The laccess() macros was added to systemd some time ago and it's not
-clear if or why it needs to return success for broken symlinks. Maybe
-just historical and not actually necessary or desired behaviour?
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
-Upstream-Status: Pending
-
- src/basic/fs-util.h | 22 +++++++++++++++++++++-
- src/shared/base-filesystem.c | 6 +++---
- 2 files changed, 24 insertions(+), 4 deletions(-)
-
-diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
-index 094acf179..cdbc0ae72 100644
---- a/src/basic/fs-util.h
-+++ b/src/basic/fs-util.h
-@@ -48,7 +48,27 @@ int fchmod_umask(int fd, mode_t mode);
-
- int fd_warn_permissions(const char *path, int fd);
-
--#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)
-+/*
-+ Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to
-+ do and it's not portable (not supported by musl). See:
-+
-+ http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html
-+ http://www.openwall.com/lists/musl/2015/02/05/2
-+
-+ Note that laccess() is never passing AT_EACCESS so a lot of the discussion in
-+ the links above doesn't apply. Note also that (currently) all systemd callers
-+ of laccess() pass mode as F_OK, so only check for existence of a file, not
-+ access permissions. Therefore, in this case, the only distiction between
-+ faccessat() with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the
-+ behaviour for broken symlinks; laccess() on a broken symlink will succeed
-+ with (flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0).
-+
-+ The laccess() macros was added to systemd some time ago and it's not clear if
-+ or why it needs to return success for broken symlinks. Maybe just historical
-+ and not actually necessary or desired behaviour?
-+*/
-+
-+#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), 0)
-
- int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
- int touch(const char *path);
-diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
-index 903a18786..2f6052ee7 100644
---- a/src/shared/base-filesystem.c
-+++ b/src/shared/base-filesystem.c
-@@ -70,7 +70,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
- return log_error_errno(errno, "Failed to open root file system: %m");
-
- for (i = 0; i < ELEMENTSOF(table); i ++) {
-- if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
-+ if (faccessat(fd, table[i].dir, F_OK, 0) >= 0)
- continue;
-
- if (table[i].target) {
-@@ -78,7 +78,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
-
- /* check if one of the targets exists */
- NULSTR_FOREACH(s, table[i].target) {
-- if (faccessat(fd, s, F_OK, AT_SYMLINK_NOFOLLOW) < 0)
-+ if (faccessat(fd, s, F_OK, 0) < 0)
- continue;
-
- /* check if a specific file exists at the target path */
-@@ -89,7 +89,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
- if (!p)
- return log_oom();
-
-- if (faccessat(fd, p, F_OK, AT_SYMLINK_NOFOLLOW) < 0)
-+ if (faccessat(fd, p, F_OK, 0) < 0)
- continue;
- }
-
---
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-watch-metadata-changes-in-ide-devices.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-watch-metadata-changes-in-ide-devices.patch
new file mode 100644
index 0000000..7207863
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-watch-metadata-changes-in-ide-devices.patch
@@ -0,0 +1,43 @@
+From 406a4c8692316e8c7e14c78f9a802689be304a95 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 17 Nov 2017 09:46:00 +0800
+Subject: [PATCH 12/31] rules: watch metadata changes in ide devices
+
+Formatting IDE storage does not trigger "change" uevents. As a result
+clients using udev API don't get any updates afterwards and get outdated
+information about the device.
+...
+root@qemux86-64:~# mkfs.ext4 -F /dev/hda1
+Creating filesystem with 262144 4k blocks and 65536 inodes
+Filesystem UUID: 98791eb2-2bf3-47ad-b4d8-4cf7e914eee2
+
+root@qemux86-64:~# ls /dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2
+ls: cannot access '/dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2': No such file or directory
+...
+Include hd* in a match for watch option assignment.
+
+Upstream-Status: Denied
+
+qemu by default emulates IDE and the linux-yocto kernel(s) use
+CONFIG_IDE instead of the more modern libsata, so disks appear as
+/dev/hd*. A similar patch rejected by upstream because CONFIG_IDE
+is deprecated.
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ rules/60-block.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rules/60-block.rules b/rules/60-block.rules
+index 343fc06f8..b5237dac4 100644
+--- a/rules/60-block.rules
++++ b/rules/60-block.rules
+@@ -8,4 +8,4 @@ ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_
+ ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"
+
+ # watch metadata changes, caused by tools closing the device node which was opened for writing
+-ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*", OPTIONS+="watch"
++ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*|hd*", OPTIONS+="watch"
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch
deleted file mode 100644
index eb380ce..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From ab5a27040133f7cdf062ac8cfeb94e081d3567b3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 19:41:13 -0800
-Subject: [PATCH 07/14] rules: whitelist hd* devices
-
-qemu by default emulates IDE and the linux-yocto kernel(s) use
-CONFIG_IDE instead of the more modern libsata, so disks appear as
-/dev/hd*. Patch rejected upstream because CONFIG_IDE is deprecated.
-
-Upstream-Status: Denied [https://github.com/systemd/systemd/pull/1276]
-
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- rules/60-persistent-storage.rules | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
-index d2745f65f..63f472be8 100644
---- a/rules/60-persistent-storage.rules
-+++ b/rules/60-persistent-storage.rules
-@@ -7,7 +7,7 @@ ACTION=="remove", GOTO="persistent_storage_end"
- ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_end"
-
- SUBSYSTEM!="block", GOTO="persistent_storage_end"
--KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*|pmem*|nbd*", GOTO="persistent_storage_end"
-+KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*|pmem*|nbd*|hd*", GOTO="persistent_storage_end"
-
- # ignore partitions that span the entire disk
- TEST=="whole_disk", GOTO="persistent_storage_end"
---
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch
deleted file mode 100644
index aeebbfb..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-From 479e1f4aa2b9f1c911a4d0dd18e222d241a978ea Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 20:35:30 -0800
-Subject: [PATCH 42/48] Make root's home directory configurable
-
-OpenEmbedded has a configurable home directory for root. Allow
-systemd to be built using its idea of what root's home directory
-should be.
-
-Upstream-Status: Denied
-Upstream wants to have a unified hierarchy where everyone is
-using the same root folder.
-https://github.com/systemd/systemd/issues/541
-
-Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- Makefile.am | 2 ++
- configure.ac | 7 +++++++
- src/basic/user-util.c | 4 ++--
- src/nspawn/nspawn.c | 4 ++--
- units/emergency.service.in | 4 ++--
- units/rescue.service.in | 4 ++--
- 6 files changed, 17 insertions(+), 8 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 1bcd932c2..c2b4a99d2 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -226,6 +226,7 @@ AM_CPPFLAGS = \
- -DLIBDIR=\"$(libdir)\" \
- -DROOTLIBDIR=\"$(rootlibdir)\" \
- -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
-+ -DROOTHOMEDIR=\"$(roothomedir)\" \
- -I $(top_srcdir)/src \
- -I $(top_builddir)/src/basic \
- -I $(top_srcdir)/src/basic \
-@@ -6356,6 +6357,7 @@ substitutions = \
- '|rootlibdir=$(rootlibdir)|' \
- '|rootlibexecdir=$(rootlibexecdir)|' \
- '|rootbindir=$(rootbindir)|' \
-+ '|roothomedir=$(roothomedir)|' \
- '|bindir=$(bindir)|' \
- '|SYSTEMCTL=$(rootbindir)/systemctl|' \
- '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
-diff --git a/configure.ac b/configure.ac
-index 0354ffe6a..b53ca1f1a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1641,6 +1641,11 @@ AC_ARG_WITH([rootlibdir],
- [with_rootlibdir=${libdir}])
- AX_NORMALIZE_PATH([with_rootlibdir])
-
-+AC_ARG_WITH([roothomedir],
-+ AS_HELP_STRING([--with-roothomedir=DIR], [Home directory for the root user]),
-+ [],
-+ [with_roothomedir=/root])
-+
- AC_ARG_WITH([pamlibdir],
- AS_HELP_STRING([--with-pamlibdir=DIR], [directory for PAM modules]),
- [],
-@@ -1733,6 +1738,7 @@ AC_SUBST([pamconfdir], [$with_pamconfdir])
- AC_SUBST([rpmmacrosdir], [$with_rpmmacrosdir])
- AC_SUBST([rootprefix], [$with_rootprefix])
- AC_SUBST([rootlibdir], [$with_rootlibdir])
-+AC_SUBST([roothomedir], [$with_roothomedir])
-
- AC_CONFIG_FILES([
- Makefile
-@@ -1829,6 +1835,7 @@ AC_MSG_RESULT([
- includedir: ${includedir}
- lib dir: ${libdir}
- rootlib dir: ${with_rootlibdir}
-+ root home dir: ${with_roothomedir}
- SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
- SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
- build Python: ${PYTHON}
-diff --git a/src/basic/user-util.c b/src/basic/user-util.c
-index c619dad52..662682adf 100644
---- a/src/basic/user-util.c
-+++ b/src/basic/user-util.c
-@@ -129,7 +129,7 @@ int get_user_creds(
- *gid = 0;
-
- if (home)
-- *home = "/root";
-+ *home = ROOTHOMEDIR;
-
- if (shell)
- *shell = "/bin/sh";
-@@ -389,7 +389,7 @@ int get_home_dir(char **_h) {
- /* Hardcode home directory for root to avoid NSS */
- u = getuid();
- if (u == 0) {
-- h = strdup("/root");
-+ h = strdup(ROOTHOMEDIR);
- if (!h)
- return -ENOMEM;
-
-diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index 8a5fedd4b..7b01ec078 100644
---- a/src/nspawn/nspawn.c
-+++ b/src/nspawn/nspawn.c
-@@ -2291,7 +2291,7 @@ static int inner_child(
- if (envp[n_env])
- n_env++;
-
-- if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) ||
-+ if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: ROOTHOMEDIR) < 0) ||
- (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) ||
- (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0))
- return log_oom();
-@@ -2373,7 +2373,7 @@ static int inner_child(
- } else {
- if (!arg_chdir)
- /* If we cannot change the directory, we'll end up in /, that is expected. */
-- (void) chdir(home ?: "/root");
-+ (void) chdir(home ?: ROOTHOMEDIR);
-
- execle("/bin/bash", "-bash", NULL, env_use);
- execle("/bin/sh", "-sh", NULL, env_use);
-diff --git a/units/emergency.service.in b/units/emergency.service.in
-index e9eb238b9..32588e48a 100644
---- a/units/emergency.service.in
-+++ b/units/emergency.service.in
-@@ -15,8 +15,8 @@ Conflicts=syslog.socket
- Before=shutdown.target
-
- [Service]
--Environment=HOME=/root
--WorkingDirectory=-/root
-+Environment=HOME=@roothomedir@
-+WorkingDirectory=-@roothomedir@
- ExecStart=-@rootlibexecdir@/systemd-sulogin-shell emergency
- Type=idle
- StandardInput=tty-force
-diff --git a/units/rescue.service.in b/units/rescue.service.in
-index 4ab66f485..bd9898f2c 100644
---- a/units/rescue.service.in
-+++ b/units/rescue.service.in
-@@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.service
- Before=shutdown.target
-
- [Service]
--Environment=HOME=/root
--WorkingDirectory=-/root
-+Environment=HOME=@roothomedir@
-+WorkingDirectory=-@roothomedir@
- ExecStart=-@rootlibexecdir@/systemd-sulogin-shell rescue
- Type=idle
- StandardInput=tty-force
---
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-add-fallback-parse_printf_format-implementation.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-add-fallback-parse_printf_format-implementation.patch
new file mode 100644
index 0000000..9c9278d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-add-fallback-parse_printf_format-implementation.patch
@@ -0,0 +1,431 @@
+From 580d23cf0b32e36a8fb96710336ffef432b3c7ce Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:10:58 -0800
+Subject: [PATCH] add fallback parse_printf_format implementation
+
+Upstream-Status: Pending
+
+Signed-off-by: Emil Renner Berthing <systemd@esmil.dk>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 1 +
+ src/basic/meson.build | 4 +
+ src/basic/parse-printf-format.c | 273 ++++++++++++++++++++++++++++++++++++++++
+ src/basic/parse-printf-format.h | 57 +++++++++
+ src/basic/stdio-util.h | 2 +-
+ src/journal/journal-send.c | 2 +-
+ 6 files changed, 337 insertions(+), 2 deletions(-)
+ create mode 100644 src/basic/parse-printf-format.c
+ create mode 100644 src/basic/parse-printf-format.h
+
+diff --git a/meson.build b/meson.build
+index 94a16712b..4eabaafe8 100644
+--- a/meson.build
++++ b/meson.build
+@@ -620,6 +620,7 @@ foreach header : ['crypt.h',
+ 'linux/btrfs.h',
+ 'linux/memfd.h',
+ 'linux/vm_sockets.h',
++ 'printf.h',
+ 'sys/auxv.h',
+ 'valgrind/memcheck.h',
+ 'valgrind/valgrind.h',
+diff --git a/src/basic/meson.build b/src/basic/meson.build
+index 44cd31ecb..435c6ee02 100644
+--- a/src/basic/meson.build
++++ b/src/basic/meson.build
+@@ -310,6 +310,10 @@ endforeach
+
+ basic_sources += [missing_h] + generated_gperf_headers
+
++if conf.get('HAVE_PRINTF_H') != 1
++ basic_sources += [files('parse-printf-format.c')]
++endif
++
+ libbasic = static_library(
+ 'basic',
+ basic_sources,
+diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c
+new file mode 100644
+index 000000000..49437e544
+--- /dev/null
++++ b/src/basic/parse-printf-format.c
+@@ -0,0 +1,273 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++/***
++ This file is part of systemd.
++
++ Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
++
++ With parts from the musl C library
++ Copyright 2005-2014 Rich Felker, et al.
++
++ systemd is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ systemd is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with systemd; If not, see <http://www.gnu.org/licenses/>.
++***/
++
++#include <stddef.h>
++#include <string.h>
++
++#include "parse-printf-format.h"
++
++static const char *consume_nonarg(const char *fmt)
++{
++ do {
++ if (*fmt == '\0')
++ return fmt;
++ } while (*fmt++ != '%');
++ return fmt;
++}
++
++static const char *consume_num(const char *fmt)
++{
++ for (;*fmt >= '0' && *fmt <= '9'; fmt++)
++ /* do nothing */;
++ return fmt;
++}
++
++static const char *consume_argn(const char *fmt, size_t *arg)
++{
++ const char *p = fmt;
++ size_t val = 0;
++
++ if (*p < '1' || *p > '9')
++ return fmt;
++ do {
++ val = 10*val + (*p++ - '0');
++ } while (*p >= '0' && *p <= '9');
++
++ if (*p != '$')
++ return fmt;
++ *arg = val;
++ return p+1;
++}
++
++static const char *consume_flags(const char *fmt)
++{
++ while (1) {
++ switch (*fmt) {
++ case '#':
++ case '0':
++ case '-':
++ case ' ':
++ case '+':
++ case '\'':
++ case 'I':
++ fmt++;
++ continue;
++ }
++ return fmt;
++ }
++}
++
++enum state {
++ BARE,
++ LPRE,
++ LLPRE,
++ HPRE,
++ HHPRE,
++ BIGLPRE,
++ ZTPRE,
++ JPRE,
++ STOP
++};
++
++enum type {
++ NONE,
++ PTR,
++ INT,
++ UINT,
++ ULLONG,
++ LONG,
++ ULONG,
++ SHORT,
++ USHORT,
++ CHAR,
++ UCHAR,
++ LLONG,
++ SIZET,
++ IMAX,
++ UMAX,
++ PDIFF,
++ UIPTR,
++ DBL,
++ LDBL,
++ MAXTYPE
++};
++
++static const short pa_types[MAXTYPE] = {
++ [NONE] = PA_INT,
++ [PTR] = PA_POINTER,
++ [INT] = PA_INT,
++ [UINT] = PA_INT,
++ [ULLONG] = PA_INT | PA_FLAG_LONG_LONG,
++ [LONG] = PA_INT | PA_FLAG_LONG,
++ [ULONG] = PA_INT | PA_FLAG_LONG,
++ [SHORT] = PA_INT | PA_FLAG_SHORT,
++ [USHORT] = PA_INT | PA_FLAG_SHORT,
++ [CHAR] = PA_CHAR,
++ [UCHAR] = PA_CHAR,
++ [LLONG] = PA_INT | PA_FLAG_LONG_LONG,
++ [SIZET] = PA_INT | PA_FLAG_LONG,
++ [IMAX] = PA_INT | PA_FLAG_LONG_LONG,
++ [UMAX] = PA_INT | PA_FLAG_LONG_LONG,
++ [PDIFF] = PA_INT | PA_FLAG_LONG_LONG,
++ [UIPTR] = PA_INT | PA_FLAG_LONG,
++ [DBL] = PA_DOUBLE,
++ [LDBL] = PA_DOUBLE | PA_FLAG_LONG_DOUBLE
++};
++
++#define S(x) [(x)-'A']
++#define E(x) (STOP + (x))
++
++static const unsigned char states[]['z'-'A'+1] = {
++ { /* 0: bare types */
++ S('d') = E(INT), S('i') = E(INT),
++ S('o') = E(UINT),S('u') = E(UINT),S('x') = E(UINT), S('X') = E(UINT),
++ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL),
++ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL),
++ S('c') = E(CHAR),S('C') = E(INT),
++ S('s') = E(PTR), S('S') = E(PTR), S('p') = E(UIPTR),S('n') = E(PTR),
++ S('m') = E(NONE),
++ S('l') = LPRE, S('h') = HPRE, S('L') = BIGLPRE,
++ S('z') = ZTPRE, S('j') = JPRE, S('t') = ZTPRE
++ }, { /* 1: l-prefixed */
++ S('d') = E(LONG), S('i') = E(LONG),
++ S('o') = E(ULONG),S('u') = E(ULONG),S('x') = E(ULONG),S('X') = E(ULONG),
++ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL),
++ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL),
++ S('c') = E(INT), S('s') = E(PTR), S('n') = E(PTR),
++ S('l') = LLPRE
++ }, { /* 2: ll-prefixed */
++ S('d') = E(LLONG), S('i') = E(LLONG),
++ S('o') = E(ULLONG),S('u') = E(ULLONG),
++ S('x') = E(ULLONG),S('X') = E(ULLONG),
++ S('n') = E(PTR)
++ }, { /* 3: h-prefixed */
++ S('d') = E(SHORT), S('i') = E(SHORT),
++ S('o') = E(USHORT),S('u') = E(USHORT),
++ S('x') = E(USHORT),S('X') = E(USHORT),
++ S('n') = E(PTR),
++ S('h') = HHPRE
++ }, { /* 4: hh-prefixed */
++ S('d') = E(CHAR), S('i') = E(CHAR),
++ S('o') = E(UCHAR),S('u') = E(UCHAR),
++ S('x') = E(UCHAR),S('X') = E(UCHAR),
++ S('n') = E(PTR)
++ }, { /* 5: L-prefixed */
++ S('e') = E(LDBL),S('f') = E(LDBL),S('g') = E(LDBL), S('a') = E(LDBL),
++ S('E') = E(LDBL),S('F') = E(LDBL),S('G') = E(LDBL), S('A') = E(LDBL),
++ S('n') = E(PTR)
++ }, { /* 6: z- or t-prefixed (assumed to be same size) */
++ S('d') = E(PDIFF),S('i') = E(PDIFF),
++ S('o') = E(SIZET),S('u') = E(SIZET),
++ S('x') = E(SIZET),S('X') = E(SIZET),
++ S('n') = E(PTR)
++ }, { /* 7: j-prefixed */
++ S('d') = E(IMAX), S('i') = E(IMAX),
++ S('o') = E(UMAX), S('u') = E(UMAX),
++ S('x') = E(UMAX), S('X') = E(UMAX),
++ S('n') = E(PTR)
++ }
++};
++
++size_t parse_printf_format(const char *fmt, size_t n, int *types)
++{
++ size_t i = 0;
++ size_t last = 0;
++
++ memset(types, 0, n);
++
++ while (1) {
++ size_t arg;
++ unsigned int state;
++
++ fmt = consume_nonarg(fmt);
++ if (*fmt == '\0')
++ break;
++ if (*fmt == '%') {
++ fmt++;
++ continue;
++ }
++ arg = 0;
++ fmt = consume_argn(fmt, &arg);
++ /* flags */
++ fmt = consume_flags(fmt);
++ /* width */
++ if (*fmt == '*') {
++ size_t warg = 0;
++ fmt = consume_argn(fmt+1, &warg);
++ if (warg == 0)
++ warg = ++i;
++ if (warg > last)
++ last = warg;
++ if (warg <= n && types[warg-1] == NONE)
++ types[warg-1] = INT;
++ } else
++ fmt = consume_num(fmt);
++ /* precision */
++ if (*fmt == '.') {
++ fmt++;
++ if (*fmt == '*') {
++ size_t parg = 0;
++ fmt = consume_argn(fmt+1, &parg);
++ if (parg == 0)
++ parg = ++i;
++ if (parg > last)
++ last = parg;
++ if (parg <= n && types[parg-1] == NONE)
++ types[parg-1] = INT;
++ } else {
++ if (*fmt == '-')
++ fmt++;
++ fmt = consume_num(fmt);
++ }
++ }
++ /* length modifier and conversion specifier */
++ state = BARE;
++ do {
++ unsigned char c = *fmt++;
++
++ if (c < 'A' || c > 'z')
++ continue;
++ state = states[state]S(c);
++ if (state == 0)
++ continue;
++ } while (state < STOP);
++
++ if (state == E(NONE))
++ continue;
++
++ if (arg == 0)
++ arg = ++i;
++ if (arg > last)
++ last = arg;
++ if (arg <= n)
++ types[arg-1] = state - STOP;
++ }
++
++ if (last > n)
++ last = n;
++ for (i = 0; i < last; i++)
++ types[i] = pa_types[types[i]];
++
++ return last;
++}
+diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h
+new file mode 100644
+index 000000000..47be7522d
+--- /dev/null
++++ b/src/basic/parse-printf-format.h
+@@ -0,0 +1,57 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++/***
++ This file is part of systemd.
++
++ Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
++
++ With parts from the GNU C Library
++ Copyright 1991-2014 Free Software Foundation, Inc.
++
++ systemd is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ systemd is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with systemd; If not, see <http://www.gnu.org/licenses/>.
++***/
++
++#pragma once
++
++#include "config.h"
++
++#if HAVE_PRINTF_H
++#include <printf.h>
++#else
++
++#include <stddef.h>
++
++enum { /* C type: */
++ PA_INT, /* int */
++ PA_CHAR, /* int, cast to char */
++ PA_WCHAR, /* wide char */
++ PA_STRING, /* const char *, a '\0'-terminated string */
++ PA_WSTRING, /* const wchar_t *, wide character string */
++ PA_POINTER, /* void * */
++ PA_FLOAT, /* float */
++ PA_DOUBLE, /* double */
++ PA_LAST
++};
++
++/* Flag bits that can be set in a type returned by `parse_printf_format'. */
++#define PA_FLAG_MASK 0xff00
++#define PA_FLAG_LONG_LONG (1 << 8)
++#define PA_FLAG_LONG_DOUBLE PA_FLAG_LONG_LONG
++#define PA_FLAG_LONG (1 << 9)
++#define PA_FLAG_SHORT (1 << 10)
++#define PA_FLAG_PTR (1 << 11)
++
++size_t parse_printf_format(const char *fmt, size_t n, int *types);
++
++#endif /* HAVE_PRINTF_H */
+diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h
+index dbfafba26..8038380d6 100644
+--- a/src/basic/stdio-util.h
++++ b/src/basic/stdio-util.h
+@@ -20,12 +20,12 @@
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+
+-#include <printf.h>
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+
+ #include "macro.h"
++#include "parse-printf-format.h"
+
+ #define xsprintf(buf, fmt, ...) \
+ assert_message_se((size_t) snprintf(buf, ELEMENTSOF(buf), fmt, __VA_ARGS__) < ELEMENTSOF(buf), "xsprintf: " #buf "[] must be big enough")
+diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
+index 73329ba02..70bb9e0e8 100644
+--- a/src/journal/journal-send.c
++++ b/src/journal/journal-send.c
+@@ -20,7 +20,6 @@
+
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <printf.h>
+ #include <stddef.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
+@@ -39,6 +38,7 @@
+ #include "stdio-util.h"
+ #include "string-util.h"
+ #include "util.h"
++#include "parse-printf-format.h"
+
+ #define SNDBUF_SIZE (8*1024*1024)
+
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
deleted file mode 100644
index e219981..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 4b6733544beb662a0f77310302fae1fb7b76d167 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 12 Sep 2015 18:53:31 +0000
-Subject: [PATCH 13/13] comparison_fn_t is glibc specific, use raw signature in
- function pointer
-
-make it work with musl where comparison_fn_t is not provided
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/basic/util.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/basic/util.h b/src/basic/util.h
-index c7da6c39b..87f62b891 100644
---- a/src/basic/util.h
-+++ b/src/basic/util.h
-@@ -98,7 +98,7 @@ void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
- * Normal qsort requires base to be nonnull. Here were require
- * that only if nmemb > 0.
- */
--static inline void qsort_safe(void *base, size_t nmemb, size_t size, comparison_fn_t compar) {
-+static inline void qsort_safe(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) {
- if (nmemb <= 1)
- return;
-
---
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch
deleted file mode 100644
index ed7c68f..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 0f47cfcb16e8e40a90a9221f9995f8cd8a915c22 Mon Sep 17 00:00:00 2001
-From: Jonathan Liu <net147@gmail.com>
-Date: Thu, 19 Mar 2015 15:01:29 +1100
-Subject: [PATCH 14/19] Revert "rules: remove firmware loading rules"
-
-This reverts commit 70e7d754ddb356fb1a2942b262f8cee9650e2a19.
-Userspace firmware loading support is needed for Linux < 3.7.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Jonathan Liu <net147@gmail.com>
----
- rules/50-firmware.rules | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 rules/50-firmware.rules
-
-diff --git a/rules/50-firmware.rules b/rules/50-firmware.rules
-new file mode 100644
-index 0000000..f0ae684
---- /dev/null
-+++ b/rules/50-firmware.rules
-@@ -0,0 +1,3 @@
-+# do not edit this file, it will be overwritten on update
-+
-+SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware"
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-src-basic-missing.h-check-for-missing-strndupa.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-src-basic-missing.h-check-for-missing-strndupa.patch
new file mode 100644
index 0000000..9f62cbb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-src-basic-missing.h-check-for-missing-strndupa.patch
@@ -0,0 +1,118 @@
+From 33be9052315cc4ec8e929fa238e1f0cc0161ad07 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:15:28 -0800
+Subject: [PATCH] src/basic/missing.h: check for missing strndupa
+
+include missing.h for definition of strndupa
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 1 +
+ src/basic/missing.h | 11 +++++++++++
+ src/basic/mkdir.c | 1 +
+ src/basic/parse-util.c | 1 +
+ src/basic/procfs-util.c | 1 +
+ src/shared/pager.c | 1 +
+ src/shared/uid-range.c | 1 +
+ 7 files changed, 17 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 4eabaafe8..12811b3f3 100644
+--- a/meson.build
++++ b/meson.build
+@@ -525,6 +525,7 @@ foreach ident : [
+ ['bpf', '''#include <sys/syscall.h>
+ #include <unistd.h>'''],
+ ['explicit_bzero' , '''#include <string.h>'''],
++ ['strndupa' , '''#include <string.h>'''],
+ ]
+
+ have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 84d6d9167..07a8c8364 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -1187,6 +1187,17 @@ struct input_mask {
+ typedef int32_t key_serial_t;
+ #endif
+
++#if ! HAVE_STRNDUPA
++#define strndupa(s, n) \
++ ({ \
++ const char *__old = (s); \
++ size_t __len = strnlen(__old, (n)); \
++ char *__new = (char *)alloca(__len + 1); \
++ __new[__len] = '\0'; \
++ (char *)memcpy(__new, __old, __len); \
++ })
++#endif
++
+ #ifndef KEYCTL_JOIN_SESSION_KEYRING
+ #define KEYCTL_JOIN_SESSION_KEYRING 1
+ #endif
+diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
+index de4746c86..d51518a5a 100644
+--- a/src/basic/mkdir.c
++++ b/src/basic/mkdir.c
+@@ -30,6 +30,7 @@
+ #include "path-util.h"
+ #include "stat-util.h"
+ #include "user-util.h"
++#include "missing.h"
+
+ int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, bool follow_symlink, mkdir_func_t _mkdir) {
+ struct stat st;
+diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
+index 2c22753de..97533721d 100644
+--- a/src/basic/parse-util.c
++++ b/src/basic/parse-util.c
+@@ -33,6 +33,7 @@
+ #include "parse-util.h"
+ #include "process-util.h"
+ #include "string-util.h"
++#include "missing.h"
+
+ int parse_boolean(const char *v) {
+ assert(v);
+diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
+index 9bb42cc7b..23bbd9e67 100644
+--- a/src/basic/procfs-util.c
++++ b/src/basic/procfs-util.c
+@@ -9,6 +9,7 @@
+ #include "procfs-util.h"
+ #include "stdio-util.h"
+ #include "string-util.h"
++#include "missing.h"
+
+ int procfs_tasks_get_limit(uint64_t *ret) {
+ _cleanup_free_ char *value = NULL;
+diff --git a/src/shared/pager.c b/src/shared/pager.c
+index 75db3c985..84f06bf7d 100644
+--- a/src/shared/pager.c
++++ b/src/shared/pager.c
+@@ -39,6 +39,7 @@
+ #include "string-util.h"
+ #include "strv.h"
+ #include "terminal-util.h"
++#include "missing.h"
+
+ static pid_t pager_pid = 0;
+
+diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c
+index c38b7cc98..8ec6bf08d 100644
+--- a/src/shared/uid-range.c
++++ b/src/shared/uid-range.c
+@@ -25,6 +25,7 @@
+ #include "macro.h"
+ #include "uid-range.h"
+ #include "user-util.h"
++#include "missing.h"
+
+ static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
+ assert(range);
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch
deleted file mode 100644
index 95871bb..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch
+++ /dev/null
@@ -1,351 +0,0 @@
-From 7883985a3a78677e9a1d5d61fe7fa8badf39f565 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 20:45:23 -0800
-Subject: [PATCH 10/14] Revert "udev: remove userspace firmware loading
- support"
-
-This reverts commit be2ea723b1d023b3d385d3b791ee4607cbfb20ca.
-Userspace firmware loading support is needed for Linux < 3.7.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- Makefile.am | 12 +++
- README | 4 +-
- TODO | 1 +
- configure.ac | 18 +++++
- src/udev/udev-builtin-firmware.c | 154 +++++++++++++++++++++++++++++++++++++++
- src/udev/udev-builtin.c | 3 +
- src/udev/udev.h | 6 ++
- src/udev/udevd.c | 13 ++++
- 8 files changed, 209 insertions(+), 2 deletions(-)
- create mode 100644 src/udev/udev-builtin-firmware.c
-
-diff --git a/Makefile.am b/Makefile.am
-index c2b4a99d2..692d7bb95 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -3985,6 +3985,18 @@ libudev_core_la_LIBADD = \
- $(BLKID_LIBS) \
- $(KMOD_LIBS)
-
-+libudev_core_la_CPPFLAGS = \
-+ $(AM_CPPFLAGS) \
-+ -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
-+
-+if ENABLE_FIRMWARE
-+libudev_core_la_SOURCES += \
-+ src/udev/udev-builtin-firmware.c
-+
-+dist_udevrules_DATA += \
-+ rules/50-firmware.rules
-+endif
-+
- if HAVE_KMOD
- libudev_core_la_SOURCES += \
- src/udev/udev-builtin-kmod.c
-diff --git a/README b/README
-index 60388eebe..e21976393 100644
---- a/README
-+++ b/README
-@@ -61,8 +61,8 @@ REQUIREMENTS:
- Legacy hotplug slows down the system and confuses udev:
- CONFIG_UEVENT_HELPER_PATH=""
-
-- Userspace firmware loading is not supported and should
-- be disabled in the kernel:
-+ Userspace firmware loading is deprecated, will go away, and
-+ sometimes causes problems:
- CONFIG_FW_LOADER_USER_HELPER=n
-
- Some udev rules and virtualization detection relies on it:
-diff --git a/TODO b/TODO
-index 61efa5e9f..67ccac224 100644
---- a/TODO
-+++ b/TODO
-@@ -740,6 +740,7 @@ Features:
- * initialize the hostname from the fs label of /, if /etc/hostname does not exist?
-
- * udev:
-+ - remove src/udev/udev-builtin-firmware.c (CONFIG_FW_LOADER_USER_HELPER=n)
- - move to LGPL
- - kill scsi_id
- - add trigger --subsystem-match=usb/usb_device device
-diff --git a/configure.ac b/configure.ac
-index b53ca1f1a..1150ca50e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1522,6 +1522,23 @@ AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
- AC_ARG_ENABLE(hwdb, [AS_HELP_STRING([--disable-hwdb], [disable hardware database support])],
- enable_hwdb=$enableval, enable_hwdb=yes)
- AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
-+AC_ARG_WITH(firmware-path,
-+ AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
-+ [Firmware search path (default="")]),
-+ [], [with_firmware_path=""])
-+OLD_IFS=$IFS
-+IFS=:
-+for i in $with_firmware_path; do
-+ if test "x${FIRMWARE_PATH}" = "x"; then
-+ FIRMWARE_PATH="\\\"${i}/\\\""
-+ else
-+ FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
-+ fi
-+done
-+IFS=$OLD_IFS
-+AC_SUBST(FIRMWARE_PATH)
-+AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
-+AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
-
- # ------------------------------------------------------------------------------
- have_manpages=no
-@@ -1839,6 +1856,7 @@ AC_MSG_RESULT([
- SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
- SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
- build Python: ${PYTHON}
-+ firmware path: ${FIRMWARE_PATH}
- PAM modules dir: ${with_pamlibdir}
- PAM configuration dir: ${with_pamconfdir}
- RPM macros dir: ${with_rpmmacrosdir}
-diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c
-new file mode 100644
-index 000000000..bd8c2fb96
---- /dev/null
-+++ b/src/udev/udev-builtin-firmware.c
-@@ -0,0 +1,154 @@
-+/*
-+ * firmware - Kernel firmware loader
-+ *
-+ * Copyright (C) 2009 Piter Punk <piterpunk@slackware.com>
-+ * Copyright (C) 2009-2011 Kay Sievers <kay@vrfy.org>
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License as
-+ * published by the Free Software Foundation; either version 2 of the
-+ * License, or (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful, but
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * General Public License for more details:*
-+ */
-+
-+#include <unistd.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <stdio.h>
-+#include <getopt.h>
-+#include <errno.h>
-+#include <stdbool.h>
-+#include <sys/utsname.h>
-+#include <sys/stat.h>
-+
-+#include "udev.h"
-+
-+static bool set_loading(struct udev *udev, char *loadpath, const char *state) {
-+ FILE *ldfile;
-+
-+ ldfile = fopen(loadpath, "we");
-+ if (ldfile == NULL) {
-+ log_error("error: can not open '%s'", loadpath);
-+ return false;
-+ };
-+ fprintf(ldfile, "%s\n", state);
-+ fclose(ldfile);
-+ return true;
-+}
-+
-+static bool copy_firmware(struct udev *udev, const char *source, const char *target, size_t size) {
-+ char *buf;
-+ FILE *fsource = NULL, *ftarget = NULL;
-+ bool ret = false;
-+
-+ buf = malloc(size);
-+ if (buf == NULL) {
-+ log_error("No memory available to load firmware file");
-+ return false;
-+ }
-+
-+ log_debug("writing '%s' (%zi) to '%s'", source, size, target);
-+
-+ fsource = fopen(source, "re");
-+ if (fsource == NULL)
-+ goto exit;
-+ ftarget = fopen(target, "we");
-+ if (ftarget == NULL)
-+ goto exit;
-+ if (fread(buf, size, 1, fsource) != 1)
-+ goto exit;
-+ if (fwrite(buf, size, 1, ftarget) == 1)
-+ ret = true;
-+exit:
-+ if (ftarget != NULL)
-+ fclose(ftarget);
-+ if (fsource != NULL)
-+ fclose(fsource);
-+ free(buf);
-+ return ret;
-+}
-+
-+static int builtin_firmware(struct udev_device *dev, int argc, char *argv[], bool test) {
-+ struct udev *udev = udev_device_get_udev(dev);
-+ static const char *searchpath[] = { FIRMWARE_PATH };
-+ char loadpath[UTIL_PATH_SIZE];
-+ char datapath[UTIL_PATH_SIZE];
-+ char fwpath[UTIL_PATH_SIZE];
-+ const char *firmware;
-+ FILE *fwfile = NULL;
-+ struct utsname kernel;
-+ struct stat statbuf;
-+ unsigned int i;
-+ int rc = EXIT_SUCCESS;
-+
-+ firmware = udev_device_get_property_value(dev, "FIRMWARE");
-+ if (firmware == NULL) {
-+ log_error("firmware parameter missing");
-+ rc = EXIT_FAILURE;
-+ goto exit;
-+ }
-+
-+ /* lookup firmware file */
-+ uname(&kernel);
-+ for (i = 0; i < ELEMENTSOF(searchpath); i++) {
-+ strscpyl(fwpath, sizeof(fwpath), searchpath[i], kernel.release, "/", firmware, NULL);
-+ fwfile = fopen(fwpath, "re");
-+ if (fwfile != NULL)
-+ break;
-+
-+ strscpyl(fwpath, sizeof(fwpath), searchpath[i], firmware, NULL);
-+ fwfile = fopen(fwpath, "re");
-+ if (fwfile != NULL)
-+ break;
-+ }
-+
-+ strscpyl(loadpath, sizeof(loadpath), udev_device_get_syspath(dev), "/loading", NULL);
-+
-+ if (fwfile == NULL) {
-+ log_debug("did not find firmware file '%s'", firmware);
-+ rc = EXIT_FAILURE;
-+ /*
-+ * Do not cancel the request in the initrd, the real root might have
-+ * the firmware file and the 'coldplug' run in the real root will find
-+ * this pending request and fulfill or cancel it.
-+ * */
-+ if (!in_initrd())
-+ set_loading(udev, loadpath, "-1");
-+ goto exit;
-+ }
-+
-+ if (stat(fwpath, &statbuf) < 0 || statbuf.st_size == 0) {
-+ if (!in_initrd())
-+ set_loading(udev, loadpath, "-1");
-+ rc = EXIT_FAILURE;
-+ goto exit;
-+ }
-+
-+ if (!set_loading(udev, loadpath, "1"))
-+ goto exit;
-+
-+ strscpyl(datapath, sizeof(datapath), udev_device_get_syspath(dev), "/data", NULL);
-+ if (!copy_firmware(udev, fwpath, datapath, statbuf.st_size)) {
-+ log_error("error sending firmware '%s' to device", firmware);
-+ set_loading(udev, loadpath, "-1");
-+ rc = EXIT_FAILURE;
-+ goto exit;
-+ };
-+
-+ set_loading(udev, loadpath, "0");
-+exit:
-+ if (fwfile)
-+ fclose(fwfile);
-+ return rc;
-+}
-+
-+const struct udev_builtin udev_builtin_firmware = {
-+ .name = "firmware",
-+ .cmd = builtin_firmware,
-+ .help = "kernel firmware loader",
-+ .run_once = true,
-+};
-diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
-index e6b36f124..cd9947e2a 100644
---- a/src/udev/udev-builtin.c
-+++ b/src/udev/udev-builtin.c
-@@ -31,6 +31,9 @@ static const struct udev_builtin *builtins[] = {
- [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
- #endif
- [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
-+#ifdef HAVE_FIRMWARE
-+ [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
-+#endif
- [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
- [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id,
- [UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard,
-diff --git a/src/udev/udev.h b/src/udev/udev.h
-index c0cb7eae8..9f0f1cf13 100644
---- a/src/udev/udev.h
-+++ b/src/udev/udev.h
-@@ -150,6 +150,9 @@ enum udev_builtin_cmd {
- UDEV_BUILTIN_BLKID,
- #endif
- UDEV_BUILTIN_BTRFS,
-+#ifdef HAVE_FIRMWARE
-+ UDEV_BUILTIN_FIRMWARE,
-+#endif
- UDEV_BUILTIN_HWDB,
- UDEV_BUILTIN_INPUT_ID,
- UDEV_BUILTIN_KEYBOARD,
-@@ -178,6 +181,9 @@ struct udev_builtin {
- extern const struct udev_builtin udev_builtin_blkid;
- #endif
- extern const struct udev_builtin udev_builtin_btrfs;
-+#ifdef HAVE_FIRMWARE
-+extern const struct udev_builtin udev_builtin_firmware;
-+#endif
- extern const struct udev_builtin udev_builtin_hwdb;
- extern const struct udev_builtin udev_builtin_input_id;
- extern const struct udev_builtin udev_builtin_keyboard;
-diff --git a/src/udev/udevd.c b/src/udev/udevd.c
-index acbddd418..20347b402 100644
---- a/src/udev/udevd.c
-+++ b/src/udev/udevd.c
-@@ -125,6 +125,9 @@ struct event {
- bool is_block;
- sd_event_source *timeout_warning;
- sd_event_source *timeout;
-+#ifdef HAVE_FIRMWARE
-+ bool nodelay;
-+#endif
- };
-
- static inline struct event *node_to_event(struct udev_list_node *node) {
-@@ -613,6 +616,10 @@ static int event_queue_insert(Manager *manager, struct udev_device *dev) {
- event->devnum = udev_device_get_devnum(dev);
- event->is_block = streq("block", udev_device_get_subsystem(dev));
- event->ifindex = udev_device_get_ifindex(dev);
-+#ifdef HAVE_FIRMWARE
-+ if (streq(udev_device_get_subsystem(dev), "firmware"))
-+ event->nodelay = true;
-+#endif
-
- log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev),
- udev_device_get_action(dev), udev_device_get_subsystem(dev));
-@@ -698,6 +705,12 @@ static bool is_devpath_busy(Manager *manager, struct event *event) {
- return true;
- }
-
-+#ifdef HAVE_FIRMWARE
-+ /* allow to bypass the dependency tracking */
-+ if (event->nodelay)
-+ continue;
-+#endif
-+
- /* parent device event found */
- if (event->devpath[common] == '/') {
- event->delaying_seqnum = loop_event->seqnum;
---
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
new file mode 100644
index 0000000..4509476
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
@@ -0,0 +1,157 @@
+From b45cf4923c7e1f1165925e9b4d7db2108faf2eae Mon Sep 17 00:00:00 2001
+From: Emil Renner Berthing <systemd@esmil.dk>
+Date: Mon, 23 Oct 2017 10:50:14 -0700
+Subject: [PATCH 15/31] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not
+ defined
+
+If the standard library doesn't provide brace
+expansion users just won't get it.
+
+Dont use GNU GLOB extentions on non-glibc systems
+
+Conditionalize use of GLOB_ALTDIRFUNC
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/basic/glob-util.c | 20 +++++++++++++++++---
+ src/test/test-glob-util.c | 17 +++++++++++++++--
+ src/tmpfiles/tmpfiles.c | 8 ++++++++
+ 3 files changed, 40 insertions(+), 5 deletions(-)
+
+diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c
+index 6e80a1e23..312bb3fd1 100644
+--- a/src/basic/glob-util.c
++++ b/src/basic/glob-util.c
+@@ -28,13 +28,18 @@
+ #include "macro.h"
+ #include "path-util.h"
+ #include "strv.h"
++/* Don't fail if the standard library
++ * doesn't provide brace expansion */
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
+
+ int safe_glob(const char *path, int flags, glob_t *pglob) {
+ int k;
+
++#ifdef GLOB_ALTDIRFUNC
+ /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */
+ assert(!(flags & GLOB_ALTDIRFUNC));
+-
+ if (!pglob->gl_closedir)
+ pglob->gl_closedir = (void (*)(void *)) closedir;
+ if (!pglob->gl_readdir)
+@@ -45,10 +50,13 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
+ pglob->gl_lstat = lstat;
+ if (!pglob->gl_stat)
+ pglob->gl_stat = stat;
+-
++#endif
+ errno = 0;
++#ifdef GLOB_ALTDIRFUNC
+ k = glob(path, flags | GLOB_ALTDIRFUNC, NULL, pglob);
+-
++#else
++ k = glob(path, flags, NULL, pglob);
++#endif
+ if (k == GLOB_NOMATCH)
+ return -ENOENT;
+ if (k == GLOB_NOSPACE)
+@@ -61,6 +69,12 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
+ return 0;
+ }
+
++/* Don't fail if the standard library
++ * doesn't provide brace expansion */
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
++
+ int glob_exists(const char *path) {
+ _cleanup_globfree_ glob_t g = {};
+ int k;
+diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c
+index bd2f8fcfd..a10c77427 100644
+--- a/src/test/test-glob-util.c
++++ b/src/test/test-glob-util.c
+@@ -30,6 +30,11 @@
+ #include "glob-util.h"
+ #include "macro.h"
+ #include "rm-rf.h"
++/* Don't fail if the standard library
++ * doesn't provide brace expansion */
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
+
+ static void test_glob_exists(void) {
+ char name[] = "/tmp/test-glob_exists.XXXXXX";
+@@ -52,25 +57,33 @@ static void test_glob_exists(void) {
+ static void test_glob_no_dot(void) {
+ char template[] = "/tmp/test-glob-util.XXXXXXX";
+ const char *fn;
+-
+ _cleanup_globfree_ glob_t g = {
++#ifdef GLOB_ALTDIRFUNC
+ .gl_closedir = (void (*)(void *)) closedir,
+ .gl_readdir = (struct dirent *(*)(void *)) readdir_no_dot,
+ .gl_opendir = (void *(*)(const char *)) opendir,
+ .gl_lstat = lstat,
+ .gl_stat = stat,
++#endif
+ };
+-
+ int r;
+
+ assert_se(mkdtemp(template));
+
+ fn = strjoina(template, "/*");
++#ifdef GLOB_ALTDIRFUNC
+ r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g);
++#else
++ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
++#endif
+ assert_se(r == GLOB_NOMATCH);
+
+ fn = strjoina(template, "/.*");
++#ifdef GLOB_ALTDIRFUNC
+ r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g);
++#else
++ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
++#endif
+ assert_se(r == GLOB_NOMATCH);
+
+ (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL);
+diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
+index 38cbb739c..88cc543f0 100644
+--- a/src/tmpfiles/tmpfiles.c
++++ b/src/tmpfiles/tmpfiles.c
+@@ -76,6 +76,12 @@
+ #include "umask-util.h"
+ #include "user-util.h"
+ #include "util.h"
++/* Don't fail if the standard library
++ * doesn't provide brace expansion */
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
++
+
+ /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
+ * them in the file system. This is intended to be used to create
+@@ -1288,7 +1294,9 @@ static int item_do_children(Item *i, const char *path, action_t action) {
+
+ static int glob_item(Item *i, action_t action, bool recursive) {
+ _cleanup_globfree_ glob_t g = {
++#ifdef GLOB_ALTDIRFUNC
+ .gl_opendir = (void *(*)(const char *)) opendir_nomod,
++#endif
+ };
+ int r = 0, k;
+ char **fn;
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0016-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0016-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch
new file mode 100644
index 0000000..53037ea
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0016-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch
@@ -0,0 +1,47 @@
+From efc57856f961c1f3bf016c511c53d990db8abdff Mon Sep 17 00:00:00 2001
+From: Emil Renner Berthing <systemd@esmil.dk>
+Date: Mon, 23 Oct 2017 11:31:03 -0700
+Subject: [PATCH 16/31] src/basic/missing.h: check for missing __compar_fn_t
+ typedef
+
+include missing.h for missing __compar_fn_t
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/basic/missing.h | 5 +++++
+ src/basic/strbuf.c | 1 +
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 07a8c8364..1aee3346a 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -1162,6 +1162,11 @@ struct input_mask {
+ #define RENAME_NOREPLACE (1 << 0)
+ #endif
+
++#ifndef __COMPAR_FN_T
++#define __COMPAR_FN_T
++typedef int (*__compar_fn_t)(const void *, const void *);
++#endif
++
+ #ifndef KCMP_FILE
+ #define KCMP_FILE 0
+ #endif
+diff --git a/src/basic/strbuf.c b/src/basic/strbuf.c
+index 8befffa66..bcb860f95 100644
+--- a/src/basic/strbuf.c
++++ b/src/basic/strbuf.c
+@@ -24,6 +24,7 @@
+
+ #include "alloc-util.h"
+ #include "strbuf.h"
++#include "missing.h"
+
+ /*
+ * Strbuf stores given strings in a single continuous allocated memory
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-Include-netinet-if_ether.h.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-Include-netinet-if_ether.h.patch
new file mode 100644
index 0000000..a09cfdd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-Include-netinet-if_ether.h.patch
@@ -0,0 +1,85 @@
+From f2b0173cd9807864db1ef3b102abaa76ef37e506 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:19:12 -0800
+Subject: [PATCH 17/31] Include netinet/if_ether.h
+
+Fixes
+/path/to/systemd/recipe-sysroot/usr/include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr'
+ struct ethhdr {
+ ^~~~~~
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/libsystemd/sd-netlink/netlink-types.c | 1 +
+ src/network/netdev/tuntap.c | 1 +
+ src/network/networkd-brvlan.c | 1 +
+ src/udev/net/ethtool-util.c | 1 +
+ src/udev/udev-builtin-net_setup_link.c | 1 +
+ 5 files changed, 5 insertions(+)
+
+diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c
+index 0ee7d6f0d..ef75893a6 100644
+--- a/src/libsystemd/sd-netlink/netlink-types.c
++++ b/src/libsystemd/sd-netlink/netlink-types.c
+@@ -21,6 +21,7 @@
+ #include <netinet/in.h>
+ #include <stdint.h>
+ #include <sys/socket.h>
++#include <netinet/if_ether.h>
+ #include <linux/netlink.h>
+ #include <linux/rtnetlink.h>
+ #include <linux/genetlink.h>
+diff --git a/src/network/netdev/tuntap.c b/src/network/netdev/tuntap.c
+index 4fc9b610a..628c61c57 100644
+--- a/src/network/netdev/tuntap.c
++++ b/src/network/netdev/tuntap.c
+@@ -20,6 +20,7 @@
+
+ #include <errno.h>
+ #include <fcntl.h>
++#include <netinet/if_ether.h>
+ #include <linux/if_tun.h>
+ #include <net/if.h>
+ #include <netinet/if_ether.h>
+diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c
+index 99dd41629..90407c9d8 100644
+--- a/src/network/networkd-brvlan.c
++++ b/src/network/networkd-brvlan.c
+@@ -19,6 +19,7 @@
+ ***/
+
+ #include <netinet/in.h>
++#include <netinet/if_ether.h>
+ #include <linux/if_bridge.h>
+ #include <stdbool.h>
+
+diff --git a/src/udev/net/ethtool-util.c b/src/udev/net/ethtool-util.c
+index 9bdaef8d9..948f89cf8 100644
+--- a/src/udev/net/ethtool-util.c
++++ b/src/udev/net/ethtool-util.c
+@@ -18,6 +18,7 @@
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+
++#include <netinet/if_ether.h>
+ #include <net/if.h>
+ #include <sys/ioctl.h>
+ #include <linux/ethtool.h>
+diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c
+index 40158e0af..b24b3fce8 100644
+--- a/src/udev/udev-builtin-net_setup_link.c
++++ b/src/udev/udev-builtin-net_setup_link.c
+@@ -18,6 +18,7 @@
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+
++#include <netinet/if_ether.h>
+ #include "alloc-util.h"
+ #include "link-config.h"
+ #include "log.h"
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-remove-duplicate-include-uchar.h.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-remove-duplicate-include-uchar.h.patch
deleted file mode 100644
index d200635..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-remove-duplicate-include-uchar.h.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From e78af874fc9f3d3af49498b8207109993d93a596 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 22 Feb 2016 05:59:01 +0000
-Subject: [PATCH 17/19] remove duplicate include uchar.h
-
-missing.h already includes it
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
----
- src/basic/escape.h | 1 -
- src/basic/utf8.h | 1 -
- 2 files changed, 2 deletions(-)
-
-diff --git a/src/basic/escape.h b/src/basic/escape.h
-index deaa4de..36d437c 100644
---- a/src/basic/escape.h
-+++ b/src/basic/escape.h
-@@ -23,7 +23,6 @@
- #include <stddef.h>
- #include <stdint.h>
- #include <sys/types.h>
--#include <uchar.h>
-
- #include "string-util.h"
- #include "missing.h"
-diff --git a/src/basic/utf8.h b/src/basic/utf8.h
-index f9b9c94..6ac9a3c 100644
---- a/src/basic/utf8.h
-+++ b/src/basic/utf8.h
-@@ -22,7 +22,6 @@
- #include <stdbool.h>
- #include <stddef.h>
- #include <stdint.h>
--#include <uchar.h>
-
- #include "macro.h"
- #include "missing.h"
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-missing-canonicalize_file_name.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-missing-canonicalize_file_name.patch
new file mode 100644
index 0000000..ab7edf5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-missing-canonicalize_file_name.patch
@@ -0,0 +1,47 @@
+From 690eeef9590c7ef1d9d2c31d8c1d5d8071da8c4c Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 26 Feb 2018 17:21:11 +0800
+Subject: [PATCH 18/31] check for missing canonicalize_file_name
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 2 ++
+ src/basic/missing_syscall.h | 6 ++++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 12811b3f3..f6515e97c 100644
+--- a/meson.build
++++ b/meson.build
+@@ -520,6 +520,8 @@ foreach ident : [
+ ['kcmp', '''#include <linux/kcmp.h>'''],
+ ['keyctl', '''#include <sys/types.h>
+ #include <keyutils.h>'''],
++ ['canonicalize_file_name', '''#define _GNU_SOURCE
++ #include <stdlib.h>'''],
+ ['copy_file_range', '''#include <sys/syscall.h>
+ #include <unistd.h>'''],
+ ['bpf', '''#include <sys/syscall.h>
+diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
+index c938d0d97..308b9472b 100644
+--- a/src/basic/missing_syscall.h
++++ b/src/basic/missing_syscall.h
+@@ -31,6 +31,12 @@ static inline int pivot_root(const char *new_root, const char *put_old) {
+ }
+ #endif
+
++#if !HAVE_CANONICALIZE_FILE_NAME
++static inline char *canonicalize_file_name(const char *path) {
++ return realpath(path, NULL);
++}
++#endif
++
+ /* ======================================================================= */
+
+ #if !HAVE_MEMFD_CREATE
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-uchar.h-in-configure.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-uchar.h-in-configure.patch
deleted file mode 100644
index 067b73f..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-uchar.h-in-configure.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 1355457092b02a15c646fc1c72e68b694a86dd99 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 22 Feb 2016 06:02:38 +0000
-Subject: [PATCH 12/14] check for uchar.h in configure
-
-Use ifdef to include uchar.h
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
----
- configure.ac | 1 +
- src/basic/missing.h | 2 ++
- 2 files changed, 3 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index 1150ca50e..60e7df5ee 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -304,6 +304,7 @@ AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
-
- # ------------------------------------------------------------------------------
-
-+AC_CHECK_HEADERS([uchar.h], [], [])
- AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
- AC_CHECK_HEADERS([linux/btrfs.h], [], [])
- AC_CHECK_HEADERS([linux/memfd.h], [], [])
-diff --git a/src/basic/missing.h b/src/basic/missing.h
-index 25a11f351..d631b7e3e 100644
---- a/src/basic/missing.h
-+++ b/src/basic/missing.h
-@@ -37,7 +37,9 @@
- #include <sys/resource.h>
- #include <sys/socket.h>
- #include <sys/syscall.h>
-+#ifdef HAVE_UCHAR_H
- #include <uchar.h>
-+#endif
- #include <unistd.h>
-
- #ifdef HAVE_AUDIT
---
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch
new file mode 100644
index 0000000..16b21a0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch
@@ -0,0 +1,29 @@
+From f5f313915d78bc43eb96e2aafb8ce3cda304c277 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 26 Feb 2018 17:27:56 +0800
+Subject: [PATCH 19/31] Do not enable nss tests if nss-systemd is not enabled
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/test/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/test/meson.build b/src/test/meson.build
+index 1db8aa107..df3a1f5c5 100644
+--- a/src/test/meson.build
++++ b/src/test/meson.build
+@@ -646,7 +646,7 @@ tests += [
+ [['src/test/test-nss.c'],
+ [],
+ [libdl],
+- '', 'manual'],
++ 'ENABLE_NSS_SYSTEMD', 'manual'],
+ ]
+
+ ############################################################
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
deleted file mode 100644
index b609276..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From b7c6bfe2ec5ae426e586e1d6ecadb52a97128a3f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 20:49:53 -0800
-Subject: [PATCH 13/14] socket-util: don't fail if libc doesn't support IDN
-
-Upstream-Status: Pending
-
-Signed-off-by: Emil Renner Berthing <systemd@esmil.dk>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- src/basic/socket-util.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
-index 016e64aa0..d4658826e 100644
---- a/src/basic/socket-util.c
-+++ b/src/basic/socket-util.c
-@@ -47,6 +47,15 @@
- #include "user-util.h"
- #include "utf8.h"
- #include "util.h"
-+/* Don't fail if the standard library
-+ * doesn't support IDN */
-+#ifndef NI_IDN
-+#define NI_IDN 0
-+#endif
-+
-+#ifndef NI_IDN_USE_STD3_ASCII_RULES
-+#define NI_IDN_USE_STD3_ASCII_RULES 0
-+#endif
-
- #ifdef ENABLE_IDN
- # define IDN_FLAGS (NI_IDN|NI_IDN_USE_STD3_ASCII_RULES)
---
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0020-test-hexdecoct.c-Include-missing.h-for-strndupa.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0020-test-hexdecoct.c-Include-missing.h-for-strndupa.patch
new file mode 100644
index 0000000..ad49cfe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0020-test-hexdecoct.c-Include-missing.h-for-strndupa.patch
@@ -0,0 +1,28 @@
+From d63d2fedcd80e58ee53655aeaf2836d4b0a14652 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 23 Oct 2017 12:33:22 -0700
+Subject: [PATCH 20/31] test-hexdecoct.c: Include missing.h for strndupa
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/test/test-hexdecoct.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
+index 3e25a0bac..ab3e508f1 100644
+--- a/src/test/test-hexdecoct.c
++++ b/src/test/test-hexdecoct.c
+@@ -24,6 +24,7 @@
+ #include "hexdecoct.h"
+ #include "macro.h"
+ #include "string-util.h"
++#include "missing.h"
+
+ static void test_hexchar(void) {
+ assert_se(hexchar(0xa) == 'a');
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0021-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0021-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
new file mode 100644
index 0000000..9c8aeca
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0021-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
@@ -0,0 +1,42 @@
+From dfea4b98844795a0cd14fdaf40c67df389dbd27e Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:25:22 -0800
+Subject: [PATCH 21/31] test-sizeof.c: Disable tests for missing typedefs in
+ musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/test/test-sizeof.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
+index aed6db842..0de6fa63c 100644
+--- a/src/test/test-sizeof.c
++++ b/src/test/test-sizeof.c
+@@ -50,8 +50,10 @@ int main(void) {
+ info(unsigned);
+ info(long unsigned);
+ info(long long unsigned);
++#ifdef __GLIBC__
+ info(__syscall_ulong_t);
+ info(__syscall_slong_t);
++#endif
+
+ info(float);
+ info(double);
+@@ -61,7 +63,9 @@ int main(void) {
+ info(ssize_t);
+ info(time_t);
+ info(usec_t);
++#ifdef __GLIBC__
+ info(__time_t);
++#endif
+ info(pid_t);
+ info(uid_t);
+ info(gid_t);
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0022-don-t-use-glibc-specific-qsort_r.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0022-don-t-use-glibc-specific-qsort_r.patch
new file mode 100644
index 0000000..a5f7442
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0022-don-t-use-glibc-specific-qsort_r.patch
@@ -0,0 +1,105 @@
+From d343757d629402c70ca8e5eaa551deaf175c96f3 Mon Sep 17 00:00:00 2001
+From: Emil Renner Berthing <systemd@esmil.dk>
+Date: Thu, 18 Sep 2014 15:24:56 +0200
+Subject: [PATCH 22/31] don't use glibc-specific qsort_r
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/hwdb/hwdb.c | 18 +++++++++++-------
+ src/udev/udevadm-hwdb.c | 16 ++++++++++------
+ 2 files changed, 21 insertions(+), 13 deletions(-)
+
+diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c
+index 4540260f9..81aca7a9b 100644
+--- a/src/hwdb/hwdb.c
++++ b/src/hwdb/hwdb.c
+@@ -152,13 +152,12 @@ static void trie_free(struct trie *trie) {
+
+ DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
+
+-static int trie_values_cmp(const void *v1, const void *v2, void *arg) {
++static struct trie *trie_node_add_value_trie;
++static int trie_values_cmp(const void *v1, const void *v2) {
+ const struct trie_value_entry *val1 = v1;
+ const struct trie_value_entry *val2 = v2;
+- struct trie *trie = arg;
+-
+- return strcmp(trie->strings->buf + val1->key_off,
+- trie->strings->buf + val2->key_off);
++ return strcmp(trie_node_add_value_trie->strings->buf + val1->key_off,
++ trie_node_add_value_trie->strings->buf + val2->key_off);
+ }
+
+ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+@@ -183,7 +182,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+ .value_off = v,
+ };
+
+- val = xbsearch_r(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
++ trie_node_add_value_trie = trie;
++ val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
++ trie_node_add_value_trie = NULL;
++
+ if (val) {
+ /* At this point we have 2 identical properties on the same match-string.
+ * Since we process files in order, we just replace the previous value.
+@@ -208,7 +210,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+ node->values[node->values_count].file_priority = file_priority;
+ node->values[node->values_count].line_number = line_number;
+ node->values_count++;
+- qsort_r(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
++ trie_node_add_value_trie = trie;
++ qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
++ trie_node_add_value_trie = NULL;
+ return 0;
+ }
+
+diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c
+index ab5dc7ab6..c777e30ab 100644
+--- a/src/udev/udevadm-hwdb.c
++++ b/src/udev/udevadm-hwdb.c
+@@ -130,13 +130,13 @@ static void trie_node_cleanup(struct trie_node *node) {
+ free(node);
+ }
+
+-static int trie_values_cmp(const void *v1, const void *v2, void *arg) {
++static struct trie *trie_node_add_value_trie;
++static int trie_values_cmp(const void *v1, const void *v2) {
+ const struct trie_value_entry *val1 = v1;
+ const struct trie_value_entry *val2 = v2;
+- struct trie *trie = arg;
+
+- return strcmp(trie->strings->buf + val1->key_off,
+- trie->strings->buf + val2->key_off);
++ return strcmp(trie_node_add_value_trie->strings->buf + val1->key_off,
++ trie_node_add_value_trie->strings->buf + val2->key_off);
+ }
+
+ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+@@ -157,7 +157,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+ .value_off = v,
+ };
+
+- val = xbsearch_r(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
++ trie_node_add_value_trie = trie;
++ val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
++ trie_node_add_value_trie = NULL;
+ if (val) {
+ /* replace existing earlier key with new value */
+ val->value_off = v;
+@@ -174,7 +176,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+ node->values[node->values_count].key_off = k;
+ node->values[node->values_count].value_off = v;
+ node->values_count++;
+- qsort_r(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
++ trie_node_add_value_trie = trie;
++ qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
++ trie_node_add_value_trie = NULL;
+ return 0;
+ }
+
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0023-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0023-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
new file mode 100644
index 0000000..09c2b5c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0023-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
@@ -0,0 +1,99 @@
+From 7b802ada1207ed00ed3867b9804dd0f316641b9b Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 10 Oct 2017 14:33:30 -0700
+Subject: [PATCH 23/31] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat()
+
+Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right
+thing to do and it's not portable (not supported by musl). See:
+
+ http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html
+ http://www.openwall.com/lists/musl/2015/02/05/2
+
+Note that laccess() is never passing AT_EACCESS so a lot of the
+discussion in the links above doesn't apply. Note also that
+(currently) all systemd callers of laccess() pass mode as F_OK, so
+only check for existence of a file, not access permissions.
+Therefore, in this case, the only distiction between faccessat()
+with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the behaviour
+for broken symlinks; laccess() on a broken symlink will succeed with
+(flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0).
+
+The laccess() macros was added to systemd some time ago and it's not
+clear if or why it needs to return success for broken symlinks. Maybe
+just historical and not actually necessary or desired behaviour?
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ src/basic/fs-util.h | 22 +++++++++++++++++++++-
+ src/shared/base-filesystem.c | 6 +++---
+ 2 files changed, 24 insertions(+), 4 deletions(-)
+
+diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
+index 4dba1ea56..9c4b02ecc 100644
+--- a/src/basic/fs-util.h
++++ b/src/basic/fs-util.h
+@@ -50,7 +50,27 @@ int fchmod_umask(int fd, mode_t mode);
+
+ int fd_warn_permissions(const char *path, int fd);
+
+-#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)
++/*
++ Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to
++ do and it's not portable (not supported by musl). See:
++
++ http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html
++ http://www.openwall.com/lists/musl/2015/02/05/2
++
++ Note that laccess() is never passing AT_EACCESS so a lot of the discussion in
++ the links above doesn't apply. Note also that (currently) all systemd callers
++ of laccess() pass mode as F_OK, so only check for existence of a file, not
++ access permissions. Therefore, in this case, the only distiction between
++ faccessat() with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the
++ behaviour for broken symlinks; laccess() on a broken symlink will succeed
++ with (flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0).
++
++ The laccess() macros was added to systemd some time ago and it's not clear if
++ or why it needs to return success for broken symlinks. Maybe just historical
++ and not actually necessary or desired behaviour?
++*/
++
++#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), 0)
+
+ int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
+ int touch(const char *path);
+diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
+index 3c25aa534..574ca71c7 100644
+--- a/src/shared/base-filesystem.c
++++ b/src/shared/base-filesystem.c
+@@ -71,7 +71,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
+ return log_error_errno(errno, "Failed to open root file system: %m");
+
+ for (i = 0; i < ELEMENTSOF(table); i ++) {
+- if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
++ if (faccessat(fd, table[i].dir, F_OK, 0) >= 0)
+ continue;
+
+ if (table[i].target) {
+@@ -79,7 +79,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
+
+ /* check if one of the targets exists */
+ NULSTR_FOREACH(s, table[i].target) {
+- if (faccessat(fd, s, F_OK, AT_SYMLINK_NOFOLLOW) < 0)
++ if (faccessat(fd, s, F_OK, 0) < 0)
+ continue;
+
+ /* check if a specific file exists at the target path */
+@@ -90,7 +90,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
+ if (!p)
+ return log_oom();
+
+- if (faccessat(fd, p, F_OK, AT_SYMLINK_NOFOLLOW) < 0)
++ if (faccessat(fd, p, F_OK, 0) < 0)
+ continue;
+ }
+
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0024-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0024-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
new file mode 100644
index 0000000..fe7e623
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0024-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
@@ -0,0 +1,31 @@
+From 76c71aa889155f29be1d5d2b74a2c4faa5909c8c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 12 Sep 2015 18:53:31 +0000
+Subject: [PATCH 24/31] comparison_fn_t is glibc specific, use raw signature in
+ function pointer
+
+make it work with musl where comparison_fn_t is not provided
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/basic/util.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/basic/util.h b/src/basic/util.h
+index 9d1b10756..12db53a93 100644
+--- a/src/basic/util.h
++++ b/src/basic/util.h
+@@ -95,7 +95,7 @@ void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
+ * Normal qsort requires base to be nonnull. Here were require
+ * that only if nmemb > 0.
+ */
+-static inline void qsort_safe(void *base, size_t nmemb, size_t size, comparison_fn_t compar) {
++static inline void qsort_safe(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) {
+ if (nmemb <= 1)
+ return;
+
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0025-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0025-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch
new file mode 100644
index 0000000..9376a8f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0025-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch
@@ -0,0 +1,43 @@
+From a0b1496322f4d7ce83f4fbfd2a90b91d0721f643 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 24 Oct 2017 23:08:24 -0700
+Subject: [PATCH 25/31] Define _PATH_WTMPX and _PATH_UTMPX if not defined
+
+Musl needs these defines
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/shared/utmp-wtmp.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/shared/utmp-wtmp.c b/src/shared/utmp-wtmp.c
+index cab1cd6a2..f5eedac18 100644
+--- a/src/shared/utmp-wtmp.c
++++ b/src/shared/utmp-wtmp.c
+@@ -28,6 +28,7 @@
+ #include <sys/time.h>
+ #include <sys/utsname.h>
+ #include <unistd.h>
++#include <utmp.h>
+ #include <utmpx.h>
+
+ #include "alloc-util.h"
+@@ -42,6 +43,13 @@
+ #include "util.h"
+ #include "utmp-wtmp.h"
+
++#if defined _PATH_UTMP && !defined _PATH_UTMPX
++# define _PATH_UTMPX _PATH_UTMP
++#endif
++#if defined _PATH_WTMP && !defined _PATH_WTMPX
++# define _PATH_WTMPX _PATH_WTMP
++#endif
++
+ int utmp_get_runlevel(int *runlevel, int *previous) {
+ struct utmpx *found, lookup = { .ut_type = RUN_LVL };
+ int r;
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0026-Use-uintmax_t-for-handling-rlim_t.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0026-Use-uintmax_t-for-handling-rlim_t.patch
new file mode 100644
index 0000000..46d75ad
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0026-Use-uintmax_t-for-handling-rlim_t.patch
@@ -0,0 +1,89 @@
+From 88c48ea84db6fda19dfaeb64545fccf8fa0525ec Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 27 Oct 2017 13:00:41 -0700
+Subject: [PATCH 26/31] Use uintmax_t for handling rlim_t
+
+PRIu{32,64} is not right format to represent rlim_t type
+therefore use %ju and typecast the rlim_t variables to
+uintmax_t.
+
+Fixes portablility errors like
+
+execute.c:3446:36: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'rlim_t {aka long long unsigned int}' [-Werror=format=]
+| fprintf(f, "%s%s: " RLIM_FMT "\n",
+| ^~~~~~~~
+| prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max);
+| ~~~~~~~~~~~~~~~~~~~~~~
+
+Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/7199]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/basic/format-util.h | 8 --------
+ src/basic/rlimit-util.c | 8 ++++----
+ src/core/execute.c | 8 ++++----
+ 3 files changed, 8 insertions(+), 16 deletions(-)
+
+diff --git a/src/basic/format-util.h b/src/basic/format-util.h
+index d9a78f781..9a1bc21d7 100644
+--- a/src/basic/format-util.h
++++ b/src/basic/format-util.h
+@@ -61,14 +61,6 @@
+ # define PRI_TIMEX "li"
+ #endif
+
+-#if SIZEOF_RLIM_T == 8
+-# define RLIM_FMT "%" PRIu64
+-#elif SIZEOF_RLIM_T == 4
+-# define RLIM_FMT "%" PRIu32
+-#else
+-# error Unknown rlim_t size
+-#endif
+-
+ #if SIZEOF_DEV_T == 8
+ # define DEV_FMT "%" PRIu64
+ #elif SIZEOF_DEV_T == 4
+diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c
+index 00648211d..df3d9ecc1 100644
+--- a/src/basic/rlimit-util.c
++++ b/src/basic/rlimit-util.c
+@@ -286,13 +286,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) {
+ if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY)
+ s = strdup("infinity");
+ else if (rl->rlim_cur >= RLIM_INFINITY)
+- (void) asprintf(&s, "infinity:" RLIM_FMT, rl->rlim_max);
++ (void) asprintf(&s, "infinity:%ju", (uintmax_t)rl->rlim_max);
+ else if (rl->rlim_max >= RLIM_INFINITY)
+- (void) asprintf(&s, RLIM_FMT ":infinity", rl->rlim_cur);
++ (void) asprintf(&s, "%ju:infinity", (uintmax_t)rl->rlim_cur);
+ else if (rl->rlim_cur == rl->rlim_max)
+- (void) asprintf(&s, RLIM_FMT, rl->rlim_cur);
++ (void) asprintf(&s, "%ju", (uintmax_t)rl->rlim_cur);
+ else
+- (void) asprintf(&s, RLIM_FMT ":" RLIM_FMT, rl->rlim_cur, rl->rlim_max);
++ (void) asprintf(&s, "%ju:%ju", (uintmax_t)rl->rlim_cur, (uintmax_t)rl->rlim_max);
+
+ if (!s)
+ return -ENOMEM;
+diff --git a/src/core/execute.c b/src/core/execute.c
+index 0df3971df..aabdddb68 100644
+--- a/src/core/execute.c
++++ b/src/core/execute.c
+@@ -3991,10 +3991,10 @@ void exec_context_dump(ExecContext *c, FILE* f, const char *prefix) {
+
+ for (i = 0; i < RLIM_NLIMITS; i++)
+ if (c->rlimit[i]) {
+- fprintf(f, "%s%s: " RLIM_FMT "\n",
+- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max);
+- fprintf(f, "%s%sSoft: " RLIM_FMT "\n",
+- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_cur);
++ fprintf(f, "%s%s: %ju\n",
++ prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_max);
++ fprintf(f, "%s%sSoft: %ju\n",
++ prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_cur);
+ }
+
+ if (c->ioprio_set) {
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0027-remove-nobody-user-group-checking.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0027-remove-nobody-user-group-checking.patch
new file mode 100644
index 0000000..42f59b0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0027-remove-nobody-user-group-checking.patch
@@ -0,0 +1,63 @@
+From 5354eb767d1eba2ec41eb273f6b657f4a630ca8a Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 9 Jan 2018 14:45:46 +0800
+Subject: [PATCH 27/31] remove nobody user/group checking
+
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 37 -------------------------------------
+ 1 file changed, 37 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index f6515e97c..1b947adac 100644
+--- a/meson.build
++++ b/meson.build
+@@ -700,43 +700,6 @@ substs.set('containeruidbasemax', container_uid_base_max)
+ nobody_user = get_option('nobody-user')
+ nobody_group = get_option('nobody-group')
+
+-getent_result = run_command('getent', 'passwd', '65534')
+-if getent_result.returncode() == 0
+- name = getent_result.stdout().split(':')[0]
+- if name != nobody_user
+- message('WARNING:\n' +
+- ' The local user with the UID 65534 does not match the configured user name "@0@" of the nobody user (its name is @1@).\n'.format(nobody_user, name) +
+- ' Your build will result in an user table setup that is incompatible with the local system.')
+- endif
+-endif
+-id_result = run_command('id', '-u', nobody_user)
+-if id_result.returncode() == 0
+- id = id_result.stdout().to_int()
+- if id != 65534
+- message('WARNING:\n' +
+- ' The local user with the configured user name "@0@" of the nobody user does not have UID 65534 (it has @1@).\n'.format(nobody_user, id) +
+- ' Your build will result in an user table setup that is incompatible with the local system.')
+- endif
+-endif
+-
+-getent_result = run_command('getent', 'group', '65534')
+-if getent_result.returncode() == 0
+- name = getent_result.stdout().split(':')[0]
+- if name != nobody_group
+- message('WARNING:\n' +
+- ' The local group with the GID 65534 does not match the configured group name "@0@" of the nobody group (its name is @1@).\n'.format(nobody_group, name) +
+- ' Your build will result in an group table setup that is incompatible with the local system.')
+- endif
+-endif
+-id_result = run_command('id', '-g', nobody_group)
+-if id_result.returncode() == 0
+- id = id_result.stdout().to_int()
+- if id != 65534
+- message('WARNING:\n' +
+- ' The local group with the configured group name "@0@" of the nobody group does not have UID 65534 (it has @1@).\n'.format(nobody_group, id) +
+- ' Your build will result in an group table setup that is incompatible with the local system.')
+- endif
+-endif
+ if nobody_user != nobody_group and not (nobody_user == 'nobody' and nobody_group == 'nogroup')
+ message('WARNING:\n' +
+ ' The configured user name "@0@" and group name "@0@" of the nobody user/group are not equivalent.\n'.format(nobody_user, nobody_group) +
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0028-add-missing-FTW_-macros-for-musl.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0028-add-missing-FTW_-macros-for-musl.patch
new file mode 100644
index 0000000..9ec3137
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0028-add-missing-FTW_-macros-for-musl.patch
@@ -0,0 +1,50 @@
+From 03cdd33be62db4c72a7fcf21b61d0d056c23c6a9 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:36:32 -0800
+Subject: [PATCH 28/31] add missing FTW_ macros for musl
+
+This is to avoid build failures like below for musl.
+
+ locale-util.c:296:24: error: 'FTW_STOP' undeclared
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/missing.h | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 1aee3346a..5b9fde692 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -207,6 +207,26 @@ struct sockaddr_vm {
+ #define BTRFS_QGROUP_LEVEL_SHIFT 48
+ #endif
+
++#ifndef FTW_ACTIONRETVAL
++#define FTW_ACTIONRETVAL 16
++#endif
++
++#ifndef FTW_CONTINUE
++#define FTW_CONTINUE 0
++#endif
++
++#ifndef FTW_STOP
++#define FTW_STOP 1
++#endif
++
++#ifndef FTW_SKIP_SUBTREE
++#define FTW_SKIP_SUBTREE 2
++#endif
++
++#ifndef FTW_SKIP_SIBLINGS
++#define FTW_SKIP_SIBLINGS 3
++#endif
++
+ #if ! HAVE_LINUX_BTRFS_H
+ #define BTRFS_IOC_QGROUP_ASSIGN _IOW(BTRFS_IOCTL_MAGIC, 41, \
+ struct btrfs_ioctl_qgroup_assign_args)
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0029-nss-mymachines-Build-conditionally-when-ENABLE_MYHOS.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0029-nss-mymachines-Build-conditionally-when-ENABLE_MYHOS.patch
new file mode 100644
index 0000000..517249f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0029-nss-mymachines-Build-conditionally-when-ENABLE_MYHOS.patch
@@ -0,0 +1,43 @@
+From 5845c82d1016a3e3f2696180d5ac91b46950540a Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 27 Feb 2018 12:56:21 +0800
+Subject: [PATCH 29/31] nss-mymachines: Build conditionally when
+ ENABLE_MYHOSTNAME is set
+
+Fixes build failures when building with --disable-myhostname
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 1b947adac..1ed4dde72 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1351,12 +1351,15 @@ test_dlopen = executable(
+ link_with : [libbasic],
+ dependencies : [libdl])
+
+-foreach tuple : [['myhostname', 'ENABLE_MYHOSTNAME'],
+- ['systemd', 'ENABLE_NSS_SYSTEMD'],
+- ['mymachines', 'ENABLE_MACHINED'],
+- ['resolve', 'ENABLE_RESOLVE']]
++foreach tuple : [['myhostname', 'ENABLE_MYHOSTNAME', ''],
++ ['systemd', 'ENABLE_NSS_SYSTEMD', ''],
++ ['mymachines', 'ENABLE_MACHINED', 'ENABLE_MYHOSTNAME'],
++ ['resolve', 'ENABLE_RESOLVE', '']]
+
+ condition = tuple[1] == '' or conf.get(tuple[1]) == 1
++ if tuple[2] != '' and condition
++ condition = conf.get(tuple[2]) == 1
++ endif
+ if condition
+ module = tuple[0]
+
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch
new file mode 100644
index 0000000..7f0b4bf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch
@@ -0,0 +1,45 @@
+From b7eacdf0388f930fc5271bdecfa46612c71dd65c Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 27 Feb 2018 13:27:47 +0800
+Subject: [PATCH 30/31] fix missing of __register_atfork for non-glibc builds
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/process-util.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/basic/process-util.c b/src/basic/process-util.c
+index dc7c9ef9e..85ce8a0cc 100644
+--- a/src/basic/process-util.c
++++ b/src/basic/process-util.c
+@@ -39,6 +39,9 @@
+ #if HAVE_VALGRIND_VALGRIND_H
+ #include <valgrind/valgrind.h>
+ #endif
++#ifndef __GLIBC__
++#include <pthread.h>
++#endif
+
+ #include "alloc-util.h"
+ #include "architecture.h"
+@@ -1112,11 +1115,15 @@ void reset_cached_pid(void) {
+ cached_pid = CACHED_PID_UNSET;
+ }
+
++#ifdef __GLIBC__
+ /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc
+ * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against
+ * libpthread, as it is part of glibc anyway. */
+ extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void * __dso_handle);
+ extern void* __dso_handle __attribute__ ((__weak__));
++#else
++#define __register_atfork(prepare,parent,child,dso) pthread_atfork(prepare,parent,child)
++#endif
+
+ pid_t getpid_cached(void) {
+ pid_t current_value;
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch
new file mode 100644
index 0000000..319c4b6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch
@@ -0,0 +1,30 @@
+From adcd7e426fcd80e754274a730221d1a1f49dbc21 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 27 Feb 2018 14:01:30 +0800
+Subject: [PATCH 31/31] fix missing ULONG_LONG_MAX definition in case of musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/missing.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 5b9fde692..a922f1346 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -72,6 +72,10 @@ struct sockaddr_vm {
+ };
+ #endif /* !HAVE_LINUX_VM_SOCKETS_H */
+
++#ifndef ULONG_LONG_MAX
++#define ULONG_LONG_MAX ULLONG_MAX
++#endif
++
+ #ifndef RLIMIT_RTTIME
+ #define RLIMIT_RTTIME 15
+ #endif
+--
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0032-memfd.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0032-memfd.patch
new file mode 100644
index 0000000..f7cfd60
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0032-memfd.patch
@@ -0,0 +1,272 @@
+missing_syscall: when adding syscall replacements, use different names (
+
+#8229)
+
+In meson.build we check that functions are available using:
+ meson.get_compiler('c').has_function('foo')
+which checks the following:
+- if __stub_foo or __stub___foo are defined, return false
+- if foo is declared (a pointer to the function can be taken), return true
+- otherwise check for __builtin_memfd_create
+
+_stub is documented by glibc as
+ It defines a symbol '__stub_FUNCTION' for each function
+ in the C library which is a stub, meaning it will fail
+ every time called, usually setting errno to ENOSYS.
+
+So if __stub is defined, we know we don't want to use the glibc version, but
+this doesn't tell us if the name itself is defined or not. If it _is_ defined,
+and we define our replacement as an inline static function, we get an error:
+
+In file included from ../src/basic/missing.h:1358:0,
+ from ../src/basic/util.h:47,
+ from ../src/basic/calendarspec.h:29,
+ from ../src/basic/calendarspec.c:34:
+../src/basic/missing_syscall.h:65:19: error: static declaration of 'memfd_create' follows non-static declaration
+ static inline int memfd_create(const char *name, unsigned int flags) {
+ ^~~~~~~~~~~~
+.../usr/include/bits/mman-shared.h:46:5: note: previous declaration of 'memfd_create' was here
+ int memfd_create (const char *__name, unsigned int __flags) __THROW;
+ ^~~~~~~~~~~~
+
+To avoid this problem, call our inline functions different than glibc,
+and use a #define to map the official name to our replacement.
+
+Fixes #8099.
+
+v2:
+- use "missing_" as the prefix instead of "_"
+
+v3:
+- rebase and update for statx()
+
+ Unfortunately "statx" is also present in "struct statx", so the define
+ causes issues. Work around this by using a typedef.
+
+I checked that systemd compiles with current glibc
+(glibc-devel-2.26-24.fc27.x86_64) if HAVE_MEMFD_CREATE, HAVE_GETTID,
+HAVE_PIVOT_ROOT, HAVE_SETNS, HAVE_RENAMEAT2, HAVE_KCMP, HAVE_KEYCTL,
+HAVE_COPY_FILE_RANGE, HAVE_BPF, HAVE_STATX are forced to 0.
+
+Setting HAVE_NAME_TO_HANDLE_AT to 0 causes an issue, but it's not because of
+the define, but because of struct file_handle.
+
+
+backport https://github.com/systemd/systemd/commit/5187dd2c403caf92d09f3491e41f1ceb3f10491f
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport [https://github.com/systemd/systemd/issues/8099]
+Index: git/src/basic/missing_syscall.h
+===================================================================
+--- git.orig/src/basic/missing_syscall.h
++++ git/src/basic/missing_syscall.h
+@@ -26,9 +26,11 @@
+ #include <sys/types.h>
+
+ #if !HAVE_PIVOT_ROOT
+-static inline int pivot_root(const char *new_root, const char *put_old) {
++static inline int missing_pivot_root(const char *new_root, const char *put_old) {
+ return syscall(SYS_pivot_root, new_root, put_old);
+ }
++
++# define pivot_root missing_pivot_root
+ #endif
+
+ #if !HAVE_CANONICALIZE_FILE_NAME
+@@ -68,7 +70,7 @@ static inline char *canonicalize_file_na
+ # endif
+ # endif
+
+-static inline int memfd_create(const char *name, unsigned int flags) {
++static inline int missing_memfd_create(const char *name, unsigned int flags) {
+ # ifdef __NR_memfd_create
+ return syscall(__NR_memfd_create, name, flags);
+ # else
+@@ -76,6 +78,8 @@ static inline int memfd_create(const cha
+ return -1;
+ # endif
+ }
++
++# define memfd_create missing_memfd_create
+ #endif
+
+ /* ======================================================================= */
+@@ -115,7 +119,7 @@ static inline int memfd_create(const cha
+ # endif
+ # endif
+
+-static inline int getrandom(void *buffer, size_t count, unsigned flags) {
++static inline int missing_getrandom(void *buffer, size_t count, unsigned flags) {
+ # ifdef __NR_getrandom
+ return syscall(__NR_getrandom, buffer, count, flags);
+ # else
+@@ -123,14 +127,18 @@ static inline int getrandom(void *buffer
+ return -1;
+ # endif
+ }
++
++# define getrandom missing_getrandom
+ #endif
+
+ /* ======================================================================= */
+
+ #if !HAVE_GETTID
+-static inline pid_t gettid(void) {
++static inline pid_t missing_gettid(void) {
+ return (pid_t) syscall(SYS_gettid);
+ }
++
++# define gettid missing_gettid
+ #endif
+
+ /* ======================================================================= */
+@@ -158,7 +166,7 @@ struct file_handle {
+ unsigned char f_handle[0];
+ };
+
+-static inline int name_to_handle_at(int fd, const char *name, struct file_handle *handle, int *mnt_id, int flags) {
++static inline int missing_name_to_handle_at(int fd, const char *name, struct file_handle *handle, int *mnt_id, int flags) {
+ # ifdef __NR_name_to_handle_at
+ return syscall(__NR_name_to_handle_at, fd, name, handle, mnt_id, flags);
+ # else
+@@ -166,6 +174,8 @@ static inline int name_to_handle_at(int
+ return -1;
+ # endif
+ }
++
++# define name_to_handle_at missing_name_to_handle_at
+ #endif
+
+ /* ======================================================================= */
+@@ -183,7 +193,7 @@ static inline int name_to_handle_at(int
+ # endif
+ # endif
+
+-static inline int setns(int fd, int nstype) {
++static inline int missing_setns(int fd, int nstype) {
+ # ifdef __NR_setns
+ return syscall(__NR_setns, fd, nstype);
+ # else
+@@ -191,6 +201,8 @@ static inline int setns(int fd, int nsty
+ return -1;
+ # endif
+ }
++
++# define setns missing_setns
+ #endif
+
+ /* ======================================================================= */
+@@ -236,7 +248,7 @@ static inline pid_t raw_getpid(void) {
+ # endif
+ # endif
+
+-static inline int renameat2(int oldfd, const char *oldname, int newfd, const char *newname, unsigned flags) {
++static inline int missing_renameat2(int oldfd, const char *oldname, int newfd, const char *newname, unsigned flags) {
+ # ifdef __NR_renameat2
+ return syscall(__NR_renameat2, oldfd, oldname, newfd, newname, flags);
+ # else
+@@ -244,12 +256,14 @@ static inline int renameat2(int oldfd, c
+ return -1;
+ # endif
+ }
++
++# define renameat2 missing_renameat2
+ #endif
+
+ /* ======================================================================= */
+
+ #if !HAVE_KCMP
+-static inline int kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2) {
++static inline int missing_kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2) {
+ # ifdef __NR_kcmp
+ return syscall(__NR_kcmp, pid1, pid2, type, idx1, idx2);
+ # else
+@@ -257,36 +271,44 @@ static inline int kcmp(pid_t pid1, pid_t
+ return -1;
+ # endif
+ }
++
++# define kcmp missing_kcmp
+ #endif
+
+ /* ======================================================================= */
+
+ #if !HAVE_KEYCTL
+-static inline long keyctl(int cmd, unsigned long arg2, unsigned long arg3, unsigned long arg4,unsigned long arg5) {
++static inline long missing_keyctl(int cmd, unsigned long arg2, unsigned long arg3, unsigned long arg4,unsigned long arg5) {
+ # ifdef __NR_keyctl
+ return syscall(__NR_keyctl, cmd, arg2, arg3, arg4, arg5);
+ # else
+ errno = ENOSYS;
+ return -1;
+ # endif
++
++# define keyctl missing_keyctl
+ }
+
+-static inline key_serial_t add_key(const char *type, const char *description, const void *payload, size_t plen, key_serial_t ringid) {
++static inline key_serial_t missing_add_key(const char *type, const char *description, const void *payload, size_t plen, key_serial_t ringid) {
+ # ifdef __NR_add_key
+ return syscall(__NR_add_key, type, description, payload, plen, ringid);
+ # else
+ errno = ENOSYS;
+ return -1;
+ # endif
++
++# define add_key missing_add_key
+ }
+
+-static inline key_serial_t request_key(const char *type, const char *description, const char * callout_info, key_serial_t destringid) {
++static inline key_serial_t missing_request_key(const char *type, const char *description, const char * callout_info, key_serial_t destringid) {
+ # ifdef __NR_request_key
+ return syscall(__NR_request_key, type, description, callout_info, destringid);
+ # else
+ errno = ENOSYS;
+ return -1;
+ # endif
++
++# define request_key missing_request_key
+ }
+ #endif
+
+@@ -313,10 +335,10 @@ static inline key_serial_t request_key(c
+ # endif
+ # endif
+
+-static inline ssize_t copy_file_range(int fd_in, loff_t *off_in,
+- int fd_out, loff_t *off_out,
+- size_t len,
+- unsigned int flags) {
++static inline ssize_t missing_copy_file_range(int fd_in, loff_t *off_in,
++ int fd_out, loff_t *off_out,
++ size_t len,
++ unsigned int flags) {
+ # ifdef __NR_copy_file_range
+ return syscall(__NR_copy_file_range, fd_in, off_in, fd_out, off_out, len, flags);
+ # else
+@@ -324,6 +346,8 @@ static inline ssize_t copy_file_range(in
+ return -1;
+ # endif
+ }
++
++# define copy_file_range missing_copy_file_range
+ #endif
+
+ /* ======================================================================= */
+@@ -351,7 +375,7 @@ static inline ssize_t copy_file_range(in
+
+ union bpf_attr;
+
+-static inline int bpf(int cmd, union bpf_attr *attr, size_t size) {
++static inline int missing_bpf(int cmd, union bpf_attr *attr, size_t size) {
+ #ifdef __NR_bpf
+ return (int) syscall(__NR_bpf, cmd, attr, size);
+ #else
+@@ -360,6 +384,7 @@ static inline int bpf(int cmd, union bpf
+ #endif
+ }
+
++# define bpf missing_bpf
+ #endif
+
+ /* ======================================================================= */
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch
new file mode 100644
index 0000000..59647b2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch
@@ -0,0 +1,203 @@
+From 848e863acc51ecfb0f3955c498874588201d9130 Mon Sep 17 00:00:00 2001
+From: Franck Bui <fbui@suse.com>
+Date: Thu, 15 Mar 2018 06:23:46 +0100
+Subject: [PATCH] basic/macros: rename noreturn into _noreturn_ (#8456)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+"noreturn" is reserved and can be used in other header files we include:
+
+ [ 16s] In file included from /usr/include/gcrypt.h:30:0,
+ [ 16s] from ../src/journal/journal-file.h:26,
+ [ 16s] from ../src/journal/journal-vacuum.c:31:
+ [ 16s] /usr/include/gpg-error.h:1544:46: error: expected ‘,’ or ‘;’ before ‘)’ token
+ [ 16s] void gpgrt_log_bug (const char *fmt, ...) GPGRT_ATTR_NR_PRINTF(1,2);
+
+Here we include grcrypt.h (which in turns include gpg-error.h) *after* we
+"noreturn" was defined in macro.h.
+---
+ src/basic/log.c | 4 ++--
+ src/basic/log.h | 4 ++--
+ src/basic/macro.h | 19 +++++++++----------
+ src/basic/process-util.c | 2 +-
+ src/basic/process-util.h | 2 +-
+ src/core/main.c | 4 ++--
+ src/journal/test-journal-interleaving.c | 2 +-
+ src/shared/pager.c | 2 +-
+ src/udev/collect/collect.c | 2 +-
+ 9 files changed, 20 insertions(+), 21 deletions(-)
+
+Upstream-Status: Backport [https://github.com/systemd/systemd/pull/8456]
+
+diff --git a/src/basic/log.c b/src/basic/log.c
+index 7a7f2cbec..16a2431c5 100644
+--- a/src/basic/log.c
++++ b/src/basic/log.c
+@@ -814,7 +814,7 @@ static void log_assert(
+ log_dispatch_internal(level, 0, file, line, func, NULL, NULL, NULL, NULL, buffer);
+ }
+
+-noreturn void log_assert_failed_realm(
++_noreturn_ void log_assert_failed_realm(
+ LogRealm realm,
+ const char *text,
+ const char *file,
+@@ -826,7 +826,7 @@ noreturn void log_assert_failed_realm(
+ abort();
+ }
+
+-noreturn void log_assert_failed_unreachable_realm(
++_noreturn_ void log_assert_failed_unreachable_realm(
+ LogRealm realm,
+ const char *text,
+ const char *file,
+diff --git a/src/basic/log.h b/src/basic/log.h
+index efcf0f1bf..314be128a 100644
+--- a/src/basic/log.h
++++ b/src/basic/log.h
+@@ -186,7 +186,7 @@ int log_dump_internal(
+ char *buffer);
+
+ /* Logging for various assertions */
+-noreturn void log_assert_failed_realm(
++_noreturn_ void log_assert_failed_realm(
+ LogRealm realm,
+ const char *text,
+ const char *file,
+@@ -195,7 +195,7 @@ noreturn void log_assert_failed_realm(
+ #define log_assert_failed(text, ...) \
+ log_assert_failed_realm(LOG_REALM, (text), __VA_ARGS__)
+
+-noreturn void log_assert_failed_unreachable_realm(
++_noreturn_ void log_assert_failed_unreachable_realm(
+ LogRealm realm,
+ const char *text,
+ const char *file,
+diff --git a/src/basic/macro.h b/src/basic/macro.h
+index 95be63a20..8911edfc4 100644
+--- a/src/basic/macro.h
++++ b/src/basic/macro.h
+@@ -53,6 +53,15 @@
+ #else
+ #define _fallthrough_
+ #endif
++/* Define C11 noreturn without <stdnoreturn.h> and even on older gcc
++ * compiler versions */
++#ifndef _noreturn_
++#if __STDC_VERSION__ >= 201112L
++#define _noreturn_ _Noreturn
++#else
++#define _noreturn_ __attribute__((noreturn))
++#endif
++#endif
+
+ /* Temporarily disable some warnings */
+ #define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT \
+@@ -414,16 +423,6 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
+ #endif
+ #endif
+
+-/* Define C11 noreturn without <stdnoreturn.h> and even on older gcc
+- * compiler versions */
+-#ifndef noreturn
+-#if __STDC_VERSION__ >= 201112L
+-#define noreturn _Noreturn
+-#else
+-#define noreturn __attribute__((noreturn))
+-#endif
+-#endif
+-
+ #define DEFINE_TRIVIAL_CLEANUP_FUNC(type, func) \
+ static inline void func##p(type *p) { \
+ if (*p) \
+diff --git a/src/basic/process-util.c b/src/basic/process-util.c
+index aa9846db5..e6120af5b 100644
+--- a/src/basic/process-util.c
++++ b/src/basic/process-util.c
+@@ -987,7 +987,7 @@ bool is_main_thread(void) {
+ return cached > 0;
+ }
+
+-noreturn void freeze(void) {
++_noreturn_ void freeze(void) {
+
+ log_close();
+
+diff --git a/src/basic/process-util.h b/src/basic/process-util.h
+index 93029e36e..5170adec7 100644
+--- a/src/basic/process-util.h
++++ b/src/basic/process-util.h
+@@ -91,7 +91,7 @@ int pid_from_same_root_fs(pid_t pid);
+
+ bool is_main_thread(void);
+
+-noreturn void freeze(void);
++_noreturn_ void freeze(void);
+
+ bool oom_score_adjust_is_valid(int oa);
+
+diff --git a/src/core/main.c b/src/core/main.c
+index 076846a41..4b2d14923 100644
+--- a/src/core/main.c
++++ b/src/core/main.c
+@@ -141,7 +141,7 @@ static uint64_t arg_default_tasks_max = UINT64_MAX;
+ static sd_id128_t arg_machine_id = {};
+ static EmergencyAction arg_cad_burst_action = EMERGENCY_ACTION_REBOOT_FORCE;
+
+-noreturn static void freeze_or_reboot(void) {
++_noreturn_ static void freeze_or_reboot(void) {
+
+ if (arg_crash_reboot) {
+ log_notice("Rebooting in 10s...");
+@@ -156,7 +156,7 @@ noreturn static void freeze_or_reboot(void) {
+ freeze();
+ }
+
+-noreturn static void crash(int sig) {
++_noreturn_ static void crash(int sig) {
+ struct sigaction sa;
+ pid_t pid;
+
+diff --git a/src/journal/test-journal-interleaving.c b/src/journal/test-journal-interleaving.c
+index 5a88b2774..d87bdbdd3 100644
+--- a/src/journal/test-journal-interleaving.c
++++ b/src/journal/test-journal-interleaving.c
+@@ -37,7 +37,7 @@
+
+ static bool arg_keep = false;
+
+-noreturn static void log_assert_errno(const char *text, int error, const char *file, int line, const char *func) {
++_noreturn_ static void log_assert_errno(const char *text, int error, const char *file, int line, const char *func) {
+ log_internal(LOG_CRIT, error, file, line, func,
+ "'%s' failed at %s:%u (%s): %m", text, file, line, func);
+ abort();
+diff --git a/src/shared/pager.c b/src/shared/pager.c
+index 75db3c985..681af9c40 100644
+--- a/src/shared/pager.c
++++ b/src/shared/pager.c
+@@ -47,7 +47,7 @@ static int stored_stderr = -1;
+ static bool stdout_redirected = false;
+ static bool stderr_redirected = false;
+
+-noreturn static void pager_fallback(void) {
++_noreturn_ static void pager_fallback(void) {
+ int r;
+
+ r = copy_bytes(STDIN_FILENO, STDOUT_FILENO, (uint64_t) -1, 0);
+diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c
+index 2821640e9..c8fa47b3d 100644
+--- a/src/udev/collect/collect.c
++++ b/src/udev/collect/collect.c
+@@ -58,7 +58,7 @@ static inline struct _mate *node_to_mate(struct udev_list_node *node)
+ return container_of(node, struct _mate, node);
+ }
+
+-noreturn static void sig_alrm(int signo)
++_noreturn_ static void sig_alrm(int signo)
+ {
+ exit(4);
+ }
+--
+2.17.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0034-Fix-format-truncation-compile-failure-by-typecasting.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0034-Fix-format-truncation-compile-failure-by-typecasting.patch
new file mode 100644
index 0000000..e56061f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0034-Fix-format-truncation-compile-failure-by-typecasting.patch
@@ -0,0 +1,173 @@
+From c2b3ebe112ebfd9f9e82fb1531ee225c3152ca83 Mon Sep 17 00:00:00 2001
+From: Patrick Uiterwijk <patrick@puiterwijk.org>
+Date: Thu, 22 Feb 2018 19:41:30 +0100
+Subject: [PATCH] Fix format-truncation compile failure by typecasting USB IDs
+ (#8250)
+
+This patch adds safe_atoux16 for parsing an unsigned hexadecimal 16bit int, and
+uses that for parsing USB device and vendor IDs.
+
+This fixes a compile error with gcc-8 because while we know that USB IDs are 2 bytes,
+the compiler does not know that.
+
+../src/udev/udev-builtin-hwdb.c:80:38: error: '%04X' directive output may be
+truncated writing between 4 and 8 bytes into a region of size between 2 and 6
+[-Werror=format-truncation=]
+
+Upstream-Status: Backport [https://github.com/systemd/systemd/commit/5547c12503a683290eaed47954ffcfb2d1bc03cd]
+
+Signed-off-by: Adam Williamson <awilliam@redhat.com>
+Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
+---
+ src/basic/parse-util.c | 24 ++++++++++++++++++++++
+ src/basic/parse-util.h | 2 ++
+ src/test/test-parse-util.c | 39 ++++++++++++++++++++++++++++++++++++
+ src/udev/udev-builtin-hwdb.c | 13 ++++++------
+ 4 files changed, 71 insertions(+), 7 deletions(-)
+
+diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
+index 97533721d..ff3fc298a 100644
+--- a/src/basic/parse-util.c
++++ b/src/basic/parse-util.c
+@@ -532,6 +532,30 @@ int safe_atoi16(const char *s, int16_t *ret) {
+ return 0;
+ }
+
++int safe_atoux16(const char *s, uint16_t *ret) {
++ char *x = NULL;
++ unsigned long l;
++
++ assert(s);
++ assert(ret);
++
++ s += strspn(s, WHITESPACE);
++
++ errno = 0;
++ l = strtoul(s, &x, 16);
++ if (errno > 0)
++ return -errno;
++ if (!x || x == s || *x != 0)
++ return -EINVAL;
++ if (s[0] == '-')
++ return -ERANGE;
++ if ((unsigned long) (uint16_t) l != l)
++ return -ERANGE;
++
++ *ret = (uint16_t) l;
++ return 0;
++}
++
+ int safe_atod(const char *s, double *ret_d) {
+ _cleanup_(freelocalep) locale_t loc = (locale_t) 0;
+ char *x = NULL;
+diff --git a/src/basic/parse-util.h b/src/basic/parse-util.h
+index 1eda1d7f9..727422056 100644
+--- a/src/basic/parse-util.h
++++ b/src/basic/parse-util.h
+@@ -54,6 +54,8 @@ int safe_atou8(const char *s, uint8_t *ret);
+ int safe_atou16(const char *s, uint16_t *ret);
+ int safe_atoi16(const char *s, int16_t *ret);
+
++int safe_atoux16(const char *s, uint16_t *ret);
++
+ static inline int safe_atou32(const char *s, uint32_t *ret_u) {
+ assert_cc(sizeof(uint32_t) == sizeof(unsigned));
+ return safe_atou(s, (unsigned*) ret_u);
+diff --git a/src/test/test-parse-util.c b/src/test/test-parse-util.c
+index 937500213..a99cea5a1 100644
+--- a/src/test/test-parse-util.c
++++ b/src/test/test-parse-util.c
+@@ -468,6 +468,44 @@ static void test_safe_atoi16(void) {
+ assert_se(r == -EINVAL);
+ }
+
++static void test_safe_atoux16(void) {
++ int r;
++ uint16_t l;
++
++ r = safe_atoux16("1234", &l);
++ assert_se(r == 0);
++ assert_se(l == 0x1234);
++
++ r = safe_atoux16("abcd", &l);
++ assert_se(r == 0);
++ assert_se(l == 0xabcd);
++
++ r = safe_atoux16(" 1234", &l);
++ assert_se(r == 0);
++ assert_se(l == 0x1234);
++
++ r = safe_atoux16("12345", &l);
++ assert_se(r == -ERANGE);
++
++ r = safe_atoux16("-1", &l);
++ assert_se(r == -ERANGE);
++
++ r = safe_atoux16(" -1", &l);
++ assert_se(r == -ERANGE);
++
++ r = safe_atoux16("junk", &l);
++ assert_se(r == -EINVAL);
++
++ r = safe_atoux16("123x", &l);
++ assert_se(r == -EINVAL);
++
++ r = safe_atoux16("12.3", &l);
++ assert_se(r == -EINVAL);
++
++ r = safe_atoux16("", &l);
++ assert_se(r == -EINVAL);
++}
++
+ static void test_safe_atou64(void) {
+ int r;
+ uint64_t l;
+@@ -745,6 +783,7 @@ int main(int argc, char *argv[]) {
+ test_safe_atolli();
+ test_safe_atou16();
+ test_safe_atoi16();
++ test_safe_atoux16();
+ test_safe_atou64();
+ test_safe_atoi64();
+ test_safe_atod();
+diff --git a/src/udev/udev-builtin-hwdb.c b/src/udev/udev-builtin-hwdb.c
+index ca7f7c230..dbfe02429 100644
+--- a/src/udev/udev-builtin-hwdb.c
++++ b/src/udev/udev-builtin-hwdb.c
+@@ -27,6 +27,7 @@
+
+ #include "alloc-util.h"
+ #include "hwdb-util.h"
++#include "parse-util.h"
+ #include "string-util.h"
+ #include "udev-util.h"
+ #include "udev.h"
+@@ -63,7 +64,7 @@ int udev_builtin_hwdb_lookup(struct udev_device *dev,
+
+ static const char *modalias_usb(struct udev_device *dev, char *s, size_t size) {
+ const char *v, *p;
+- int vn, pn;
++ uint16_t vn, pn;
+
+ v = udev_device_get_sysattr_value(dev, "idVendor");
+ if (!v)
+@@ -71,12 +72,10 @@ static const char *modalias_usb(struct udev_device *dev, char *s, size_t size) {
+ p = udev_device_get_sysattr_value(dev, "idProduct");
+ if (!p)
+ return NULL;
+- vn = strtol(v, NULL, 16);
+- if (vn <= 0)
+- return NULL;
+- pn = strtol(p, NULL, 16);
+- if (pn <= 0)
+- return NULL;
++ if (safe_atoux16(v, &vn) < 0)
++ return NULL;
++ if (safe_atoux16(p, &pn) < 0)
++ return NULL;
+ snprintf(s, size, "usb:v%04Xp%04X*", vn, pn);
+ return s;
+ }
+--
+2.17.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch
new file mode 100644
index 0000000..736d525
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch
@@ -0,0 +1,33 @@
+From 5f1f064c81ea30acf93cfa0fb466b38f094f488c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 27 May 2018 08:36:44 -0700
+Subject: [PATCH] Define glibc compatible basename() for non-glibc systems
+
+Fixes builds with musl, even though systemd is adamant about
+using non-posix basename implementation, we have a way out
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/machine/machine-dbus.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
+index 2d7806491b..9a3bdb1d76 100644
+--- a/src/machine/machine-dbus.c
++++ b/src/machine/machine-dbus.c
+@@ -29,6 +29,10 @@
+ #include <libgen.h>
+ #undef basename
+
++#if !defined(__GLIBC__)
++#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src)
++#endif
++
+ #include "alloc-util.h"
+ #include "bus-common-errors.h"
+ #include "bus-internal.h"
+--
+2.17.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/libmount.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/libmount.patch
new file mode 100644
index 0000000..b59d5b7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/libmount.patch
@@ -0,0 +1,75 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 227b8a762fea1458547be2cdf0e6e4aac0079730 Mon Sep 17 00:00:00 2001
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Mon, 26 Mar 2018 17:34:53 +0200
+Subject: [PATCH] core: don't include libmount.h in a header file (#8580)
+
+linux/fs.h sys/mount.h, libmount.h and missing.h all include MS_*
+definitions.
+
+To avoid problems, only one of linux/fs.h, sys/mount.h and libmount.h
+should be included. And missing.h must be included last.
+
+Without this, building systemd may fail with:
+
+In file included from [...]/libmount/libmount.h:31:0,
+ from ../systemd-238/src/core/manager.h:23,
+ from ../systemd-238/src/core/emergency-action.h:37,
+ from ../systemd-238/src/core/unit.h:34,
+ from ../systemd-238/src/core/dbus-timer.h:25,
+ from ../systemd-238/src/core/timer.c:26:
+[...]/sys/mount.h:57:2: error: expected identifier before numeric constant
+---
+ src/core/dbus-execute.c | 1 +
+ src/core/manager.h | 3 ++-
+ src/core/mount.c | 2 ++
+ 3 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
+index 7344623ebf6..c342093bca4 100644
+--- a/src/core/dbus-execute.c
++++ b/src/core/dbus-execute.c
+@@ -18,6 +18,7 @@
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+
++#include <sys/mount.h>
+ #include <sys/prctl.h>
+ #include <stdio_ext.h>
+
+diff --git a/src/core/manager.h b/src/core/manager.h
+index 28c5da225b1..e09e0cdf5e9 100644
+--- a/src/core/manager.h
++++ b/src/core/manager.h
+@@ -20,7 +20,6 @@
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+
+-#include <libmount.h>
+ #include <stdbool.h>
+ #include <stdio.h>
+
+@@ -34,6 +33,8 @@
+ #include "list.h"
+ #include "ratelimit.h"
+
++struct libmnt_monitor;
++
+ /* Enforce upper limit how many names we allow */
+ #define MANAGER_MAX_NAMES 131072 /* 128K */
+
+diff --git a/src/core/mount.c b/src/core/mount.c
+index 0e755da5c02..0154ebda5d6 100644
+--- a/src/core/mount.c
++++ b/src/core/mount.c
+@@ -23,6 +23,8 @@
+ #include <stdio.h>
+ #include <sys/epoll.h>
+
++#include <libmount.h>
++
+ #include "sd-messages.h"
+
+ #include "alloc-util.h"
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest
deleted file mode 100644
index 2ae76ff..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-cd tests
-tar -C test -xJf test/sys.tar.xz
-make check-TESTS
-cd ..
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_234.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_234.bb
deleted file mode 100644
index 9ce27bf..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_234.bb
+++ /dev/null
@@ -1,641 +0,0 @@
-require systemd.inc
-
-PROVIDES = "udev"
-
-PE = "1"
-
-DEPENDS = "kmod intltool-native gperf-native acl readline libcap libcgroup util-linux"
-
-SECTION = "base/shell"
-
-inherit useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext bash-completion manpages
-
-SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \
- file://touchscreen.rules \
- file://00-create-volatile.conf \
- file://init \
- file://run-ptest \
- file://0004-Use-getenv-when-secure-versions-are-not-available.patch \
- file://0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
- file://0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
- file://0010-implment-systemd-sysv-install-for-OE.patch \
- file://0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch \
- file://0012-rules-whitelist-hd-devices.patch \
- file://0013-Make-root-s-home-directory-configurable.patch \
- file://0014-Revert-rules-remove-firmware-loading-rules.patch \
- file://0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch \
- file://0017-remove-duplicate-include-uchar.h.patch \
- file://0018-check-for-uchar.h-in-configure.patch \
- file://0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
- file://0001-add-fallback-parse_printf_format-implementation.patch \
- file://0002-src-basic-missing.h-check-for-missing-strndupa.patch \
- file://0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \
- file://0004-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch \
- file://0006-Include-netinet-if_ether.h.patch \
- file://0007-check-for-missing-canonicalize_file_name.patch \
- file://0008-Do-not-enable-nss-tests.patch \
- file://0009-test-hexdecoct.c-Include-missing.h-form-strndupa.patch \
- file://0010-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \
- file://0011-don-t-use-glibc-specific-qsort_r.patch \
- file://0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \
- file://0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch \
- file://0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch \
- file://0001-Use-uintmax_t-for-handling-rlim_t.patch \
- file://0001-core-evaluate-presets-after-generators-have-run-6526.patch \
- file://0001-main-skip-many-initialization-steps-when-running-in-.patch \
- "
-SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
-
-PAM_PLUGINS = " \
- pam-plugin-unix \
- pam-plugin-loginuid \
- pam-plugin-keyinit \
-"
-
-PACKAGECONFIG ??= " \
- ${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux usrmerge', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
- backlight \
- binfmt \
- firstboot \
- hibernate \
- hostnamed \
- ima \
- localed \
- logind \
- machined \
- myhostname \
- networkd \
- nss \
- polkit \
- quotacheck \
- randomseed \
- resolved \
- smack \
- sysusers \
- timedated \
- timesyncd \
- utmp \
- vconsole \
- xz \
-"
-
-PACKAGECONFIG_remove_libc-musl = " \
- localed \
- myhostname \
- nss \
- resolved \
- selinux \
- smack \
- sysusers \
- utmp \
-"
-
-# Use the upstream systemd serial-getty@.service and rely on
-# systemd-getty-generator instead of using the OE-core specific
-# systemd-serialgetty.bb - not enabled by default.
-PACKAGECONFIG[serial-getty-generator] = ""
-
-PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit"
-PACKAGECONFIG[backlight] = "--enable-backlight,--disable-backlight"
-PACKAGECONFIG[binfmt] = "--enable-binfmt,--disable-binfmt"
-PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
-PACKAGECONFIG[coredump] = "--enable-coredump,--disable-coredump"
-PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"
-PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
-PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
-PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
-PACKAGECONFIG[firstboot] = "--enable-firstboot,--disable-firstboot"
-# Sign the journal for anti-tampering
-PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
-PACKAGECONFIG[hibernate] = "--enable-hibernate,--disable-hibernate"
-PACKAGECONFIG[hostnamed] = "--enable-hostnamed,--disable-hostnamed"
-PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
-# importd requires curl/xz/zlib/bzip2/gcrypt
-PACKAGECONFIG[importd] = "--enable-importd,--disable-importd"
-# Update NAT firewall rules
-PACKAGECONFIG[iptc] = "--enable-libiptc,--disable-libiptc,iptables"
-PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
-PACKAGECONFIG[ldconfig] = "--enable-ldconfig,--disable-ldconfig"
-PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
-PACKAGECONFIG[localed] = "--enable-localed,--disable-localed"
-PACKAGECONFIG[logind] = "--enable-logind,--disable-logind"
-PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
-PACKAGECONFIG[machined] = "--enable-machined,--disable-machined"
-PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
-PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd"
-PACKAGECONFIG[myhostname] = "--enable-myhostname,--disable-myhostname"
-PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
-PACKAGECONFIG[nss] = "--enable-nss-systemd,--disable-nss-systemd"
-PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam,${PAM_PLUGINS}"
-PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit"
-PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,qrencode"
-PACKAGECONFIG[quotacheck] = "--enable-quotacheck,--disable-quotacheck"
-PACKAGECONFIG[randomseed] = "--enable-randomseed,--disable-randomseed"
-PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
-PACKAGECONFIG[rfkill] = "--enable-rfkill,--disable-rfkill"
-# libseccomp is found in meta-security
-PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
-PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,initscripts-sushell"
-PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
-PACKAGECONFIG[sysusers] = "--enable-sysusers,--disable-sysusers"
-PACKAGECONFIG[timedated] = "--enable-timedated,--disable-timedated"
-PACKAGECONFIG[timesyncd] = "--enable-timesyncd,--disable-timesyncd"
-PACKAGECONFIG[usrmerge] = "--disable-split-usr,--enable-split-usr"
-PACKAGECONFIG[utmp] = "--enable-utmp,--disable-utmp"
-PACKAGECONFIG[valgrind] = "ac_cv_header_valgrind_memcheck_h=yes ac_cv_header_valgrind_valgrind_h=yes,ac_cv_header_valgrind_memcheck_h=no ac_cv_header_valgrind_valgrind_h=no,valgrind"
-PACKAGECONFIG[vconsole] = "--enable-vconsole,--disable-vconsole,,${PN}-vconsole-setup"
-# Verify keymaps on locale change
-PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon"
-PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
-PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
-
-# Hardcode target binary paths to avoid AC_PROG_PATH in the systemd
-# configure script detecting and setting paths from sysroot or host.
-CACHED_CONFIGUREVARS_class-target = " \
- ac_cv_path_KEXEC=${sbindir}/kexec \
- ac_cv_path_KILL=${base_bindir}/kill \
- ac_cv_path_KMOD=${base_bindir}/kmod \
- ac_cv_path_MOUNT_PATH=${base_bindir}/mount \
- ac_cv_path_QUOTACHECK=${sbindir}/quotacheck \
- ac_cv_path_QUOTAON=${sbindir}/quotaon \
- ac_cv_path_SULOGIN=${base_sbindir}/sulogin \
- ac_cv_path_UMOUNT_PATH=${base_bindir}/umount \
-"
-
-# Helper variables to clarify locations. This mirrors the logic in systemd's
-# build system.
-rootprefix ?= "${root_prefix}"
-rootlibdir ?= "${base_libdir}"
-rootlibexecdir = "${rootprefix}/lib"
-
-EXTRA_OECONF = " \
- --without-python \
- --with-roothomedir=${ROOT_HOME} \
- --with-rootlibdir=${rootlibdir} \
- --with-rootprefix=${rootprefix} \
- --with-sysvrcnd-path=${sysconfdir} \
- --with-firmware-path=${nonarch_base_libdir}/firmware \
-"
-
-# per the systemd README, define VALGRIND=1 to run under valgrind
-CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', ' -DVALGRIND=1', '', d)}"
-
-# disable problematic GCC 5.2 optimizations [YOCTO #8291]
-FULL_OPTIMIZATION_append_arm = " -fno-schedule-insns -fno-schedule-insns2"
-
-COMPILER_NM ?= "${HOST_PREFIX}gcc-nm"
-COMPILER_AR ?= "${HOST_PREFIX}gcc-ar"
-COMPILER_RANLIB ?= "${HOST_PREFIX}gcc-ranlib"
-
-do_configure_prepend() {
- export NM="${COMPILER_NM}"
- export AR="${COMPILER_AR}"
- export RANLIB="${COMPILER_RANLIB}"
- export KMOD="${base_bindir}/kmod"
- if [ -d ${S}/units.pre_sed ] ; then
- cp -r ${S}/units.pre_sed ${S}/units
- else
- cp -r ${S}/units ${S}/units.pre_sed
- fi
- sed -i -e 's:-DTEST_DIR=\\\".*\\\":-DTEST_DIR=\\\"${PTEST_PATH}/tests/test\\\":' ${S}/Makefile.am
- sed -i -e 's:-DCATALOG_DIR=\\\".*\\\":-DCATALOG_DIR=\\\"${PTEST_PATH}/tests/catalog\\\":' ${S}/Makefile.am
-}
-
-do_install() {
- autotools_do_install
- install -d ${D}/${base_sbindir}
- if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
- # Provided by a separate recipe
- rm ${D}${systemd_unitdir}/system/serial-getty* -f
- fi
-
- # Provide support for initramfs
- [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
- [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
-
- # Create machine-id
- # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
- touch ${D}${sysconfdir}/machine-id
-
- install -d ${D}${sysconfdir}/udev/rules.d/
- install -d ${D}${sysconfdir}/tmpfiles.d
- install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
- install -d ${D}${libdir}/pkgconfig
- install -m 0644 ${B}/src/udev/udev.pc ${D}${libdir}/pkgconfig/
-
- install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
-
- if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
- sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
- fi
-
- chown root:systemd-journal ${D}/${localstatedir}/log/journal
-
- # Delete journal README, as log can be symlinked inside volatile.
- rm -f ${D}/${localstatedir}/log/README
-
- install -d ${D}${systemd_unitdir}/system/graphical.target.wants
- install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
- install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
- install -d ${D}${systemd_unitdir}/system/reboot.target.wants
- install -d ${D}${systemd_unitdir}/system/rescue.target.wants
-
- # Create symlinks for systemd-update-utmp-runlevel.service
- if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
- fi
-
- # Enable journal to forward message to syslog daemon
- sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
- # Set the maximium size of runtime journal to 64M as default
- sed -i -e 's/.*RuntimeMaxUse.*/RuntimeMaxUse=64M/' ${D}${sysconfdir}/systemd/journald.conf
-
- # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
- # for existence else it fails
- if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
- ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)}
- fi
- if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
- echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
- echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
- echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
- ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
- else
- sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
- ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
- fi
- install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
-
- # If polkit is setup fixup permissions and ownership
- if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
- if [ -d ${D}${datadir}/polkit-1/rules.d ]; then
- chmod 700 ${D}${datadir}/polkit-1/rules.d
- chown polkitd:root ${D}${datadir}/polkit-1/rules.d
- fi
- fi
-}
-
-do_install_ptest () {
- # install data files needed for tests
- install -d ${D}${PTEST_PATH}/tests/test
- cp -rfL ${S}/test/* ${D}${PTEST_PATH}/tests/test
- # python is disabled for systemd, thus removing these python testing scripts
- rm ${D}${PTEST_PATH}/tests/test/*.py
- sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/tests/test/udev-test.pl
-
- install -d ${D}${PTEST_PATH}/tests/catalog
- install ${S}/catalog/* ${D}${PTEST_PATH}/tests/catalog/
-
- install -D ${S}/build-aux/test-driver ${D}${PTEST_PATH}/tests/build-aux/test-driver
-
- install -d ${D}${PTEST_PATH}/tests/rules
- install ${B}/rules/* ${D}${PTEST_PATH}/tests/rules/
-
- # This directory needs to be there for udev-test.pl to work.
- install -d ${D}${libdir}/udev/rules.d
-
- # install actual test binaries
- install -m 0755 ${B}/test-* ${D}${PTEST_PATH}/tests/
- install -m 0755 ${B}/.libs/test-* ${D}${PTEST_PATH}/tests/
-
- install ${B}/Makefile ${D}${PTEST_PATH}/tests/
-}
-
-python populate_packages_prepend (){
- systemdlibdir = d.getVar("rootlibdir")
- do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
-}
-PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*"
-
-PACKAGES =+ "\
- ${PN}-gui \
- ${PN}-vconsole-setup \
- ${PN}-initramfs \
- ${PN}-analyze \
- ${PN}-kernel-install \
- ${PN}-rpm-macros \
- ${PN}-binfmt \
- ${PN}-zsh-completion \
- ${PN}-xorg-xinitrc \
- ${PN}-container \
- ${PN}-extra-utils \
-"
-
-SUMMARY_${PN}-container = "Tools for containers and VMs"
-DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines."
-
-SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)}"
-SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
-
-USERADD_PACKAGES = "${PN} ${PN}-extra-utils"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-remote;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '--system -d / -M --shell /bin/nologin systemd-journal-upload;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}"
-GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
-USERADD_PARAM_${PN}-extra-utils += "--system -d / -M --shell /bin/nologin systemd-bus-proxy;"
-
-FILES_${PN}-analyze = "${bindir}/systemd-analyze"
-
-FILES_${PN}-initramfs = "/init"
-RDEPENDS_${PN}-initramfs = "${PN}"
-
-RDEPENDS_${PN}-ptest += "gawk make perl bash xz \
- tzdata tzdata-americas tzdata-asia \
- tzdata-europe tzdata-africa tzdata-antarctica \
- tzdata-arctic tzdata-atlantic tzdata-australia \
- tzdata-pacific tzdata-posix"
-
-FILES_${PN}-ptest += "${libdir}/udev/rules.d"
-
-FILES_${PN}-gui = "${bindir}/systemadm"
-
-FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
- ${systemd_unitdir}/system/systemd-vconsole-setup.service \
- ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
-
-RDEPENDS_${PN}-kernel-install += "bash"
-FILES_${PN}-kernel-install = "${bindir}/kernel-install \
- ${sysconfdir}/kernel/ \
- ${exec_prefix}/lib/kernel \
- "
-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/ \
- ${exec_prefix}/lib/binfmt.d \
- ${rootlibexecdir}/systemd/systemd-binfmt \
- ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
- ${systemd_unitdir}/system/systemd-binfmt.service"
-RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
-
-RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
-
-FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
- ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
- ${base_bindir}/machinectl \
- ${bindir}/systemd-nspawn \
- ${nonarch_libdir}/systemd/import-pubring.gpg \
- ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \
- ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \
- ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \
- ${systemd_system_unitdir}/machine.slice \
- ${systemd_system_unitdir}/machines.target \
- ${systemd_system_unitdir}/org.freedesktop.import1.busname \
- ${systemd_system_unitdir}/org.freedesktop.machine1.busname \
- ${systemd_system_unitdir}/systemd-importd.service \
- ${systemd_system_unitdir}/systemd-machined.service \
- ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \
- ${systemd_system_unitdir}/var-lib-machines.mount \
- ${rootlibexecdir}/systemd/systemd-import \
- ${rootlibexecdir}/systemd/systemd-importd \
- ${rootlibexecdir}/systemd/systemd-journal-gatewayd \
- ${rootlibexecdir}/systemd/systemd-journal-remote \
- ${rootlibexecdir}/systemd/systemd-journal-upload \
- ${rootlibexecdir}/systemd/systemd-machined \
- ${rootlibexecdir}/systemd/systemd-pull \
- ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
- ${systemd_system_unitdir}/systemd-nspawn@.service \
- ${libdir}/libnss_mymachines.so.2 \
- ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
- ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
- ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \
- ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
- ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
- "
-
-FILES_${PN}-extra-utils = "\
- ${base_bindir}/systemd-escape \
- ${base_bindir}/systemd-inhibit \
- ${bindir}/systemd-detect-virt \
- ${bindir}/systemd-path \
- ${bindir}/systemd-run \
- ${bindir}/systemd-cat \
- ${bindir}/systemd-delta \
- ${bindir}/systemd-cgls \
- ${bindir}/systemd-cgtop \
- ${bindir}/systemd-stdio-bridge \
- ${base_bindir}/systemd-ask-password \
- ${base_bindir}/systemd-tty-ask-password-agent \
- ${systemd_unitdir}/system/systemd-ask-password-console.path \
- ${systemd_unitdir}/system/systemd-ask-password-console.service \
- ${systemd_unitdir}/system/systemd-ask-password-wall.path \
- ${systemd_unitdir}/system/systemd-ask-password-wall.service \
- ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
- ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \
- ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
- ${rootlibexecdir}/systemd/systemd-resolve-host \
- ${rootlibexecdir}/systemd/systemd-ac-power \
- ${rootlibexecdir}/systemd/systemd-activate \
- ${rootlibexecdir}/systemd/systemd-bus-proxyd \
- ${systemd_unitdir}/system/systemd-bus-proxyd.service \
- ${systemd_unitdir}/system/systemd-bus-proxyd.socket \
- ${rootlibexecdir}/systemd/systemd-socket-proxyd \
- ${rootlibexecdir}/systemd/systemd-reply-password \
- ${rootlibexecdir}/systemd/systemd-sleep \
- ${rootlibexecdir}/systemd/system-sleep \
- ${systemd_unitdir}/system/systemd-hibernate.service \
- ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
- ${systemd_unitdir}/system/systemd-suspend.service \
- ${systemd_unitdir}/system/sleep.target \
- ${rootlibexecdir}/systemd/systemd-initctl \
- ${systemd_unitdir}/system/systemd-initctl.service \
- ${systemd_unitdir}/system/systemd-initctl.socket \
- ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
- ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
- ${rootlibexecdir}/systemd/systemd-cgroups-agent \
-"
-
-CONFFILES_${PN} = "${sysconfdir}/machine-id \
- ${sysconfdir}/systemd/coredump.conf \
- ${sysconfdir}/systemd/journald.conf \
- ${sysconfdir}/systemd/logind.conf \
- ${sysconfdir}/systemd/system.conf \
- ${sysconfdir}/systemd/user.conf"
-
-FILES_${PN} = " ${base_bindir}/* \
- ${datadir}/dbus-1/services \
- ${datadir}/dbus-1/system-services \
- ${datadir}/polkit-1 \
- ${datadir}/${BPN} \
- ${datadir}/factory \
- ${sysconfdir}/dbus-1/ \
- ${sysconfdir}/machine-id \
- ${sysconfdir}/modules-load.d/ \
- ${sysconfdir}/pam.d/ \
- ${sysconfdir}/sysctl.d/ \
- ${sysconfdir}/systemd/ \
- ${sysconfdir}/tmpfiles.d/ \
- ${sysconfdir}/xdg/ \
- ${sysconfdir}/init.d/README \
- ${sysconfdir}/resolv-conf.systemd \
- ${rootlibexecdir}/systemd/* \
- ${systemd_unitdir}/* \
- ${base_libdir}/security/*.so \
- /cgroup \
- ${bindir}/systemd* \
- ${bindir}/busctl \
- ${bindir}/coredumpctl \
- ${bindir}/localectl \
- ${bindir}/hostnamectl \
- ${bindir}/timedatectl \
- ${bindir}/bootctl \
- ${bindir}/kernel-install \
- ${exec_prefix}/lib/tmpfiles.d/*.conf \
- ${exec_prefix}/lib/systemd \
- ${exec_prefix}/lib/modules-load.d \
- ${exec_prefix}/lib/sysctl.d \
- ${exec_prefix}/lib/sysusers.d \
- ${exec_prefix}/lib/environment.d \
- ${localstatedir} \
- ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \
- ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \
- ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \
- ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \
- ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
- ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \
- ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \
- ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
- ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
- ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
- ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \
- "
-
-FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
-
-RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV}) util-linux-agetty"
-RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
-RDEPENDS_${PN} += "volatile-binds update-rc.d"
-
-RRECOMMENDS_${PN} += "systemd-extra-utils \
- systemd-compat-units udev-hwdb \
- util-linux-fsck e2fsprogs-e2fsck \
- kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
- os-release \
-"
-
-INSANE_SKIP_${PN} += "dev-so libdir"
-INSANE_SKIP_${PN}-dbg += "libdir"
-INSANE_SKIP_${PN}-doc += " libdir"
-
-PACKAGES =+ "udev udev-hwdb"
-
-RPROVIDES_udev = "hotplug"
-
-RDEPENDS_udev-hwdb += "udev"
-
-FILES_udev += "${base_sbindir}/udevd \
- ${rootlibexecdir}/systemd/systemd-udevd \
- ${rootlibexecdir}/udev/accelerometer \
- ${rootlibexecdir}/udev/ata_id \
- ${rootlibexecdir}/udev/cdrom_id \
- ${rootlibexecdir}/udev/collect \
- ${rootlibexecdir}/udev/findkeyboards \
- ${rootlibexecdir}/udev/keyboard-force-release.sh \
- ${rootlibexecdir}/udev/keymap \
- ${rootlibexecdir}/udev/mtd_probe \
- ${rootlibexecdir}/udev/scsi_id \
- ${rootlibexecdir}/udev/v4l_id \
- ${rootlibexecdir}/udev/keymaps \
- ${rootlibexecdir}/udev/rules.d/*.rules \
- ${sysconfdir}/udev \
- ${sysconfdir}/init.d/systemd-udevd \
- ${systemd_unitdir}/system/*udev* \
- ${systemd_unitdir}/system/*.wants/*udev* \
- ${base_bindir}/udevadm \
- ${datadir}/bash-completion/completions/udevadm \
- "
-
-FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
-
-INITSCRIPT_PACKAGES = "udev"
-INITSCRIPT_NAME_udev = "systemd-udevd"
-INITSCRIPT_PARAMS_udev = "start 03 S ."
-
-python __anonymous() {
- if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
- d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
-}
-
-# TODO:
-# u-a for runlevel and telinit
-
-ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel resolv-conf"
-
-ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
-ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
-ALTERNATIVE_PRIORITY[init] ?= "300"
-
-ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
-ALTERNATIVE_PRIORITY[halt] ?= "300"
-
-ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
-ALTERNATIVE_PRIORITY[reboot] ?= "300"
-
-ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
-ALTERNATIVE_PRIORITY[shutdown] ?= "300"
-
-ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
-ALTERNATIVE_PRIORITY[poweroff] ?= "300"
-
-ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
-ALTERNATIVE_PRIORITY[runlevel] ?= "300"
-
-ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
-ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
-ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"
-
-pkg_postinst_${PN} () {
- sed -e '/^hosts:/s/\s*\<myhostname\>//' \
- -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
- -i $D${sysconfdir}/nsswitch.conf
-}
-
-pkg_prerm_${PN} () {
- sed -e '/^hosts:/s/\s*\<myhostname\>//' \
- -e '/^hosts:/s/\s*myhostname//' \
- -i $D${sysconfdir}/nsswitch.conf
-}
-
-PACKAGE_WRITE_DEPS += "qemu-native"
-pkg_postinst_udev-hwdb () {
- if test -n "$D"; then
- ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
- --root $D
- chown root:root $D${sysconfdir}/udev/hwdb.bin
- else
- udevadm hwdb --update
- fi
-}
-
-pkg_prerm_udev-hwdb () {
- rm -f $D${sysconfdir}/udev/hwdb.bin
-}
-
-# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
-# that we don't build both udev and systemd in world builds.
-python () {
- if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
- raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
-}
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_237.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_237.bb
new file mode 100644
index 0000000..2e6558d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_237.bb
@@ -0,0 +1,595 @@
+require systemd.inc
+
+PROVIDES = "udev"
+
+PE = "1"
+
+DEPENDS = "kmod intltool-native gperf-native acl readline libcap libcgroup util-linux"
+
+SECTION = "base/shell"
+
+inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages distro_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.
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+SRC_URI += "file://touchscreen.rules \
+ file://00-create-volatile.conf \
+ file://init \
+ file://0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \
+ file://0001-Use-getenv-when-secure-versions-are-not-available.patch \
+ file://0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
+ file://0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
+ file://0004-implment-systemd-sysv-install-for-OE.patch \
+ file://0005-rules-whitelist-hd-devices.patch \
+ file://0006-Make-root-s-home-directory-configurable.patch \
+ file://0007-Revert-rules-remove-firmware-loading-rules.patch \
+ file://0008-Revert-udev-remove-userspace-firmware-loading-suppor.patch \
+ file://0009-remove-duplicate-include-uchar.h.patch \
+ file://0010-check-for-uchar.h-in-meson.build.patch \
+ file://0011-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
+ file://0012-rules-watch-metadata-changes-in-ide-devices.patch \
+ file://0013-add-fallback-parse_printf_format-implementation.patch \
+ file://0014-src-basic-missing.h-check-for-missing-strndupa.patch \
+ file://0015-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \
+ file://0016-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch \
+ file://0017-Include-netinet-if_ether.h.patch \
+ file://0018-check-for-missing-canonicalize_file_name.patch \
+ file://0019-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch \
+ file://0020-test-hexdecoct.c-Include-missing.h-for-strndupa.patch \
+ file://0021-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \
+ file://0022-don-t-use-glibc-specific-qsort_r.patch \
+ file://0023-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \
+ file://0024-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch \
+ file://0025-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch \
+ file://0026-Use-uintmax_t-for-handling-rlim_t.patch \
+ file://0027-remove-nobody-user-group-checking.patch \
+ file://0028-add-missing-FTW_-macros-for-musl.patch \
+ file://0029-nss-mymachines-Build-conditionally-when-ENABLE_MYHOS.patch \
+ file://0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch \
+ file://0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch \
+ file://0032-memfd.patch \
+ file://0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch \
+ file://libmount.patch \
+ file://0034-Fix-format-truncation-compile-failure-by-typecasting.patch \
+ file://0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
+ "
+SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
+
+# Workaround undefined reference to `__stack_chk_fail_local' on qemux86 and qemuppc for musl
+SRC_URI_append_libc-musl_qemux86 = " file://0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch"
+SRC_URI_append_libc-musl_qemuppc = " file://0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch"
+
+PAM_PLUGINS = " \
+ pam-plugin-unix \
+ pam-plugin-loginuid \
+ pam-plugin-keyinit \
+"
+
+PACKAGECONFIG ??= " \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux usrmerge', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
+ backlight \
+ binfmt \
+ firstboot \
+ hibernate \
+ hostnamed \
+ ima \
+ localed \
+ logind \
+ machined \
+ myhostname \
+ networkd \
+ nss \
+ polkit \
+ quotacheck \
+ randomseed \
+ resolved \
+ smack \
+ sysusers \
+ timedated \
+ timesyncd \
+ utmp \
+ vconsole \
+ xz \
+"
+
+PACKAGECONFIG_remove_libc-musl = " \
+ localed \
+ myhostname \
+ nss \
+ resolved \
+ selinux \
+ smack \
+ sysusers \
+ utmp \
+"
+
+# Use the upstream systemd serial-getty@.service and rely on
+# systemd-getty-generator instead of using the OE-core specific
+# systemd-serialgetty.bb - not enabled by default.
+PACKAGECONFIG[serial-getty-generator] = ""
+
+PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit"
+PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false"
+PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false"
+PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2"
+PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false"
+PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup"
+PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus"
+PACKAGECONFIG[efi] = "-Defi=true,-Defi=false"
+PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils"
+PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
+# Sign the journal for anti-tampering
+PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt"
+PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false"
+PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false"
+PACKAGECONFIG[ima] = "-Dima=true,-Dima=false"
+# importd requires curl/xz/zlib/bzip2/gcrypt
+PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false"
+# Update NAT firewall rules
+PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables"
+PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl"
+PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false"
+PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn"
+PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false"
+PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false"
+PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4"
+PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false"
+PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
+PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd"
+PACKAGECONFIG[myhostname] = "-Dmyhostname=true,-Dmyhostname=false"
+PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false"
+PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false"
+PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}"
+PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false"
+PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode"
+PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false"
+PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false"
+PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false"
+PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false"
+# libseccomp is found in meta-security
+PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp"
+PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell"
+PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false"
+PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false"
+PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false"
+PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false"
+PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true"
+PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false"
+PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind"
+PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup"
+# Verify keymaps on locale change
+PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon"
+PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz"
+PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib"
+
+# Helper variables to clarify locations. This mirrors the logic in systemd's
+# build system.
+rootprefix ?= "${root_prefix}"
+rootlibdir ?= "${base_libdir}"
+rootlibexecdir = "${rootprefix}/lib"
+
+# This links udev statically with systemd helper library.
+# Otherwise udev package would depend on systemd package (which has the needed shared library),
+# and always pull it into images.
+EXTRA_OEMESON += "-Dlink-udev-shared=false"
+
+EXTRA_OEMESON += "-Dnobody-user=nobody \
+ -Dnobody-group=nobody \
+ -Droothomedir=${ROOTHOME} \
+ -Drootlibdir=${rootlibdir} \
+ -Drootprefix=${rootprefix} \
+ -Dsysvrcnd-path=${sysconfdir} \
+ -Dfirmware-path=${nonarch_base_libdir}/firmware \
+ "
+
+# Hardcode target binary paths to avoid using paths from sysroot
+EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \
+ -Dkill-path=${base_bindir}/kill \
+ -Dkmod-path=${base_bindir}/kmod \
+ -Dmount-path=${base_bindir}/mount \
+ -Dquotacheck-path=${sbindir}/quotacheck \
+ -Dquotaon-path=${sbindir}/quotaon \
+ -Dsulogin-path=${base_sbindir}/sulogin \
+ -Dumount-path=${base_bindir}/umount"
+
+do_install() {
+ meson_do_install
+ install -d ${D}/${base_sbindir}
+ if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
+ # Provided by a separate recipe
+ rm ${D}${systemd_unitdir}/system/serial-getty* -f
+ fi
+
+ # Provide support for initramfs
+ [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
+ [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
+
+ # Create machine-id
+ # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
+ touch ${D}${sysconfdir}/machine-id
+
+ install -d ${D}${sysconfdir}/udev/rules.d/
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
+ install -d ${D}${libdir}/pkgconfig
+ install -m 0644 ${B}/src/udev/udev.pc ${D}${libdir}/pkgconfig/
+
+ install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
+ sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
+ fi
+
+ chown root:systemd-journal ${D}/${localstatedir}/log/journal
+
+ # Delete journal README, as log can be symlinked inside volatile.
+ rm -f ${D}/${localstatedir}/log/README
+
+ install -d ${D}${systemd_unitdir}/system/graphical.target.wants
+ install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
+ install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
+ install -d ${D}${systemd_unitdir}/system/reboot.target.wants
+ install -d ${D}${systemd_unitdir}/system/rescue.target.wants
+
+ # Create symlinks for systemd-update-utmp-runlevel.service
+ if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
+ fi
+
+ # Enable journal to forward message to syslog daemon
+ sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
+ # Set the maximium size of runtime journal to 64M as default
+ sed -i -e 's/.*RuntimeMaxUse.*/RuntimeMaxUse=64M/' ${D}${sysconfdir}/systemd/journald.conf
+
+ # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
+ # for existence else it fails
+ if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
+ ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)}
+ fi
+ if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
+ echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
+ echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
+ echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
+ ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
+ else
+ sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
+ ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
+ fi
+ install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
+
+ # If polkit is setup fixup permissions and ownership
+ if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
+ if [ -d ${D}${datadir}/polkit-1/rules.d ]; then
+ chmod 700 ${D}${datadir}/polkit-1/rules.d
+ chown polkitd:root ${D}${datadir}/polkit-1/rules.d
+ fi
+ fi
+}
+
+
+python populate_packages_prepend (){
+ systemdlibdir = d.getVar("rootlibdir")
+ do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
+}
+PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*"
+
+PACKAGES =+ "\
+ ${PN}-gui \
+ ${PN}-vconsole-setup \
+ ${PN}-initramfs \
+ ${PN}-analyze \
+ ${PN}-kernel-install \
+ ${PN}-rpm-macros \
+ ${PN}-binfmt \
+ ${PN}-zsh-completion \
+ ${PN}-xorg-xinitrc \
+ ${PN}-container \
+ ${PN}-extra-utils \
+"
+
+SUMMARY_${PN}-container = "Tools for containers and VMs"
+DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines."
+
+SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)}"
+SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
+
+USERADD_PACKAGES = "${PN} ${PN}-extra-utils"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-remote;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '--system -d / -M --shell /bin/nologin systemd-journal-upload;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}"
+GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
+USERADD_PARAM_${PN}-extra-utils += "--system -d / -M --shell /bin/nologin systemd-bus-proxy;"
+
+FILES_${PN}-analyze = "${bindir}/systemd-analyze"
+
+FILES_${PN}-initramfs = "/init"
+RDEPENDS_${PN}-initramfs = "${PN}"
+
+FILES_${PN}-gui = "${bindir}/systemadm"
+
+FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
+ ${systemd_unitdir}/system/systemd-vconsole-setup.service \
+ ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
+
+RDEPENDS_${PN}-kernel-install += "bash"
+FILES_${PN}-kernel-install = "${bindir}/kernel-install \
+ ${sysconfdir}/kernel/ \
+ ${exec_prefix}/lib/kernel \
+ "
+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/ \
+ ${exec_prefix}/lib/binfmt.d \
+ ${rootlibexecdir}/systemd/systemd-binfmt \
+ ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
+ ${systemd_unitdir}/system/systemd-binfmt.service"
+RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
+
+RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
+
+FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
+ ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
+ ${base_bindir}/machinectl \
+ ${bindir}/systemd-nspawn \
+ ${nonarch_libdir}/systemd/import-pubring.gpg \
+ ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \
+ ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \
+ ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \
+ ${systemd_system_unitdir}/machine.slice \
+ ${systemd_system_unitdir}/machines.target \
+ ${systemd_system_unitdir}/org.freedesktop.import1.busname \
+ ${systemd_system_unitdir}/org.freedesktop.machine1.busname \
+ ${systemd_system_unitdir}/systemd-importd.service \
+ ${systemd_system_unitdir}/systemd-machined.service \
+ ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \
+ ${systemd_system_unitdir}/var-lib-machines.mount \
+ ${rootlibexecdir}/systemd/systemd-import \
+ ${rootlibexecdir}/systemd/systemd-importd \
+ ${rootlibexecdir}/systemd/systemd-journal-gatewayd \
+ ${rootlibexecdir}/systemd/systemd-journal-remote \
+ ${rootlibexecdir}/systemd/systemd-journal-upload \
+ ${rootlibexecdir}/systemd/systemd-machined \
+ ${rootlibexecdir}/systemd/systemd-pull \
+ ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
+ ${systemd_system_unitdir}/systemd-nspawn@.service \
+ ${libdir}/libnss_mymachines.so.2 \
+ ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
+ ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
+ ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \
+ ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
+ ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
+ "
+
+FILES_${PN}-extra-utils = "\
+ ${base_bindir}/systemd-escape \
+ ${base_bindir}/systemd-inhibit \
+ ${bindir}/systemd-detect-virt \
+ ${bindir}/systemd-path \
+ ${bindir}/systemd-run \
+ ${bindir}/systemd-cat \
+ ${bindir}/systemd-delta \
+ ${bindir}/systemd-cgls \
+ ${bindir}/systemd-cgtop \
+ ${bindir}/systemd-stdio-bridge \
+ ${base_bindir}/systemd-ask-password \
+ ${base_bindir}/systemd-tty-ask-password-agent \
+ ${systemd_unitdir}/system/systemd-ask-password-console.path \
+ ${systemd_unitdir}/system/systemd-ask-password-console.service \
+ ${systemd_unitdir}/system/systemd-ask-password-wall.path \
+ ${systemd_unitdir}/system/systemd-ask-password-wall.service \
+ ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
+ ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \
+ ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
+ ${rootlibexecdir}/systemd/systemd-resolve-host \
+ ${rootlibexecdir}/systemd/systemd-ac-power \
+ ${rootlibexecdir}/systemd/systemd-activate \
+ ${rootlibexecdir}/systemd/systemd-bus-proxyd \
+ ${systemd_unitdir}/system/systemd-bus-proxyd.service \
+ ${systemd_unitdir}/system/systemd-bus-proxyd.socket \
+ ${rootlibexecdir}/systemd/systemd-socket-proxyd \
+ ${rootlibexecdir}/systemd/systemd-reply-password \
+ ${rootlibexecdir}/systemd/systemd-sleep \
+ ${rootlibexecdir}/systemd/system-sleep \
+ ${systemd_unitdir}/system/systemd-hibernate.service \
+ ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
+ ${systemd_unitdir}/system/systemd-suspend.service \
+ ${systemd_unitdir}/system/sleep.target \
+ ${rootlibexecdir}/systemd/systemd-initctl \
+ ${systemd_unitdir}/system/systemd-initctl.service \
+ ${systemd_unitdir}/system/systemd-initctl.socket \
+ ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
+ ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
+ ${rootlibexecdir}/systemd/systemd-cgroups-agent \
+"
+
+CONFFILES_${PN} = "${sysconfdir}/machine-id \
+ ${sysconfdir}/systemd/coredump.conf \
+ ${sysconfdir}/systemd/journald.conf \
+ ${sysconfdir}/systemd/logind.conf \
+ ${sysconfdir}/systemd/system.conf \
+ ${sysconfdir}/systemd/user.conf"
+
+FILES_${PN} = " ${base_bindir}/* \
+ ${datadir}/dbus-1/services \
+ ${datadir}/dbus-1/system-services \
+ ${datadir}/polkit-1 \
+ ${datadir}/${BPN} \
+ ${datadir}/factory \
+ ${sysconfdir}/dbus-1/ \
+ ${sysconfdir}/machine-id \
+ ${sysconfdir}/modules-load.d/ \
+ ${sysconfdir}/pam.d/ \
+ ${sysconfdir}/sysctl.d/ \
+ ${sysconfdir}/systemd/ \
+ ${sysconfdir}/tmpfiles.d/ \
+ ${sysconfdir}/xdg/ \
+ ${sysconfdir}/init.d/README \
+ ${sysconfdir}/resolv-conf.systemd \
+ ${rootlibexecdir}/systemd/* \
+ ${systemd_unitdir}/* \
+ ${base_libdir}/security/*.so \
+ /cgroup \
+ ${bindir}/systemd* \
+ ${bindir}/busctl \
+ ${bindir}/coredumpctl \
+ ${bindir}/localectl \
+ ${bindir}/hostnamectl \
+ ${bindir}/timedatectl \
+ ${bindir}/bootctl \
+ ${bindir}/kernel-install \
+ ${exec_prefix}/lib/tmpfiles.d/*.conf \
+ ${exec_prefix}/lib/systemd \
+ ${exec_prefix}/lib/modules-load.d \
+ ${exec_prefix}/lib/sysctl.d \
+ ${exec_prefix}/lib/sysusers.d \
+ ${exec_prefix}/lib/environment.d \
+ ${localstatedir} \
+ ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \
+ ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \
+ ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \
+ ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \
+ ${nonarch_base_libdir}/modprobe.d/systemd.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
+ ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \
+ "
+
+FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
+
+RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV}) util-linux-agetty"
+RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
+RDEPENDS_${PN} += "volatile-binds update-rc.d"
+
+RRECOMMENDS_${PN} += "systemd-extra-utils \
+ systemd-compat-units udev-hwdb \
+ util-linux-fsck e2fsprogs-e2fsck \
+ kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
+ os-release \
+"
+
+INSANE_SKIP_${PN} += "dev-so libdir"
+INSANE_SKIP_${PN}-dbg += "libdir"
+INSANE_SKIP_${PN}-doc += " libdir"
+
+PACKAGES =+ "udev udev-hwdb"
+
+RPROVIDES_udev = "hotplug"
+
+RDEPENDS_udev-hwdb += "udev"
+
+FILES_udev += "${base_sbindir}/udevd \
+ ${rootlibexecdir}/systemd/systemd-udevd \
+ ${rootlibexecdir}/udev/accelerometer \
+ ${rootlibexecdir}/udev/ata_id \
+ ${rootlibexecdir}/udev/cdrom_id \
+ ${rootlibexecdir}/udev/collect \
+ ${rootlibexecdir}/udev/findkeyboards \
+ ${rootlibexecdir}/udev/keyboard-force-release.sh \
+ ${rootlibexecdir}/udev/keymap \
+ ${rootlibexecdir}/udev/mtd_probe \
+ ${rootlibexecdir}/udev/scsi_id \
+ ${rootlibexecdir}/udev/v4l_id \
+ ${rootlibexecdir}/udev/keymaps \
+ ${rootlibexecdir}/udev/rules.d/*.rules \
+ ${sysconfdir}/udev \
+ ${sysconfdir}/init.d/systemd-udevd \
+ ${systemd_unitdir}/system/*udev* \
+ ${systemd_unitdir}/system/*.wants/*udev* \
+ ${base_bindir}/udevadm \
+ ${datadir}/bash-completion/completions/udevadm \
+ "
+
+FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
+
+INITSCRIPT_PACKAGES = "udev"
+INITSCRIPT_NAME_udev = "systemd-udevd"
+INITSCRIPT_PARAMS_udev = "start 03 S ."
+
+python __anonymous() {
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
+# TODO:
+# u-a for runlevel and telinit
+
+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel resolv-conf"
+
+ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
+ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
+ALTERNATIVE_PRIORITY[init] ?= "300"
+
+ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
+ALTERNATIVE_PRIORITY[halt] ?= "300"
+
+ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
+ALTERNATIVE_PRIORITY[reboot] ?= "300"
+
+ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
+ALTERNATIVE_PRIORITY[shutdown] ?= "300"
+
+ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
+ALTERNATIVE_PRIORITY[poweroff] ?= "300"
+
+ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
+ALTERNATIVE_PRIORITY[runlevel] ?= "300"
+
+ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
+ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
+ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"
+
+pkg_postinst_${PN} () {
+ sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+ -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
+ -i $D${sysconfdir}/nsswitch.conf
+}
+
+pkg_prerm_${PN} () {
+ sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+ -e '/^hosts:/s/\s*myhostname//' \
+ -i $D${sysconfdir}/nsswitch.conf
+}
+
+PACKAGE_WRITE_DEPS += "qemu-native"
+pkg_postinst_udev-hwdb () {
+ if test -n "$D"; then
+ ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
+ --root $D
+ chown root:root $D${sysconfdir}/udev/hwdb.bin
+ else
+ udevadm hwdb --update
+ fi
+}
+
+pkg_prerm_udev-hwdb () {
+ rm -f $D${sysconfdir}/udev/hwdb.bin
+}
diff --git a/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index 5b9c422..8585a41 100644
--- a/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -53,8 +53,15 @@
}
pkg_postinst_${PN} () {
+# run this on host and on target
+if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then
+ exit 0
+fi
+}
+
+pkg_postinst_ontarget_${PN} () {
# run this on the target
-if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then
+if [ -e /proc/consoles ]; then
tmp="${SERIAL_CONSOLES_CHECK}"
for i in $tmp
do
@@ -68,11 +75,7 @@
done
kill -HUP 1
else
- if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then
- exit 0
- else
- exit 1
- fi
+ exit 1
fi
}
diff --git a/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
index 22a0ecf..ad65819 100644
--- a/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
@@ -28,9 +28,11 @@
S = "${WORKDIR}/sysvinit-${PV}"
B = "${S}/src"
-inherit update-alternatives
+inherit update-alternatives distro_features_check
DEPENDS_append = " update-rc.d-native base-passwd"
+REQUIRED_DISTRO_FEATURES = "sysvinit"
+
ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last lastb mesg utmpdump wall"
ALTERNATIVE_PRIORITY = "200"
@@ -105,8 +107,3 @@
chown root.shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
}
-
-python () {
- if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
- raise bb.parse.SkipPackage("'sysvinit' not in DISTRO_FEATURES")
-}
diff --git a/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.2.bb b/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.2.bb
deleted file mode 100644
index 02fb23a..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.2.bb
+++ /dev/null
@@ -1,96 +0,0 @@
-SUMMARY = "eudev is a fork of systemd's udev"
-HOMEPAGE = "https://wiki.gentoo.org/wiki/Eudev"
-LICENSE = "GPLv2.0+ & LGPL-2.1+"
-LICENSE_libudev = "LGPL-2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-DEPENDS = "glib-2.0 glib-2.0-native gperf-native kmod libxslt-native util-linux"
-
-PROVIDES = "udev"
-
-SRC_URI = "http://dev.gentoo.org/~blueness/${BPN}/${BP}.tar.gz \
- file://0014-Revert-rules-remove-firmware-loading-rules.patch \
- file://Revert-udev-remove-userspace-firmware-loading-suppor.patch \
- file://devfs-udev.rules \
- file://init \
- file://links.conf \
- file://local.rules \
- file://permissions.rules \
- file://run.rules \
- file://udev.rules \
-"
-UPSTREAM_CHECK_URI = "https://github.com/gentoo/eudev/releases"
-
-SRC_URI[md5sum] = "41e19b70462692fefd072a3f38818b6e"
-SRC_URI[sha256sum] = "3e4c56ec2fc1854afd0a31f3affa48f922c62d40ee12a0c1a4b4f152ef5b0f63"
-
-inherit autotools update-rc.d qemu pkgconfig
-
-EXTRA_OECONF = " \
- --sbindir=${base_sbindir} \
- --with-rootlibdir=${base_libdir} \
- --with-rootprefix= \
-"
-
-PACKAGECONFIG ??= "hwdb"
-PACKAGECONFIG[hwdb] = "--enable-hwdb,--disable-hwdb"
-
-do_install_append() {
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
- sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev
-
- install -d ${D}${sysconfdir}/udev/rules.d
- install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
-
- # Use classic network interface naming scheme
- touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules
-
- # hid2hci has moved to bluez4. removed in udev as of version 169
- rm -f ${D}${base_libdir}/udev/hid2hci
-}
-
-do_install_prepend_class-target () {
- # Remove references to buildmachine
- sed -i -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
- ${B}/src/udev/keyboard-keys-from-name.h
-}
-
-INITSCRIPT_NAME = "udev"
-INITSCRIPT_PARAMS = "start 04 S ."
-
-PACKAGES =+ "libudev"
-PACKAGES =+ "eudev-hwdb"
-
-
-FILES_${PN} += "${libexecdir} ${base_libdir}/udev ${bindir}/udevadm"
-FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
- ${includedir}/libudev.h ${libdir}/libudev.so \
- ${includedir}/udev.h ${libdir}/libudev.la \
- ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc"
-FILES_libudev = "${base_libdir}/libudev.so.*"
-FILES_eudev-hwdb = "${sysconfdir}/udev/hwdb.d"
-
-RDEPENDS_eudev-hwdb += "eudev"
-
-RPROVIDES_${PN} = "hotplug udev"
-RPROVIDES_eudev-hwdb += "udev-hwdb"
-
-python () {
- if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
- raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES")
-}
-
-PACKAGE_WRITE_DEPS += "qemu-native"
-pkg_postinst_eudev-hwdb () {
- if test -n "$D"; then
- ${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update --root $D
- chown root:root $D${sysconfdir}/udev/hwdb.bin
- else
- udevadm hwdb --update
- fi
-}
-
-pkg_prerm_eudev-hwdb () {
- rm -f $D${sysconfdir}/udev/hwdb.bin
-}
diff --git a/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.5.bb b/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.5.bb
new file mode 100644
index 0000000..88ad8f1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.5.bb
@@ -0,0 +1,92 @@
+SUMMARY = "eudev is a fork of systemd's udev"
+HOMEPAGE = "https://wiki.gentoo.org/wiki/Eudev"
+LICENSE = "GPLv2.0+ & LGPL-2.1+"
+LICENSE_libudev = "LGPL-2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+DEPENDS = "glib-2.0 glib-2.0-native gperf-native kmod libxslt-native util-linux"
+
+PROVIDES = "udev"
+
+SRC_URI = "http://dev.gentoo.org/~blueness/${BPN}/${BP}.tar.gz \
+ file://0014-Revert-rules-remove-firmware-loading-rules.patch \
+ file://Revert-udev-remove-userspace-firmware-loading-suppor.patch \
+ file://devfs-udev.rules \
+ file://init \
+ file://links.conf \
+ file://local.rules \
+ file://permissions.rules \
+ file://run.rules \
+ file://udev.rules \
+"
+
+SRC_URI[md5sum] = "6ca08c0e14380f87df8e8aceac123671"
+SRC_URI[sha256sum] = "49c2d04105cad2526302627e040fa24b1916a9a3e059539bc8bb919b973890af"
+
+inherit autotools update-rc.d qemu pkgconfig distro_features_check
+
+CONFLICT_DISTRO_FEATURES = "systemd"
+
+EXTRA_OECONF = " \
+ --sbindir=${base_sbindir} \
+ --with-rootlibdir=${base_libdir} \
+ --with-rootprefix= \
+"
+
+PACKAGECONFIG ??= "hwdb"
+PACKAGECONFIG[hwdb] = "--enable-hwdb,--disable-hwdb"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
+ sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev
+
+ install -d ${D}${sysconfdir}/udev/rules.d
+ install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
+
+ # Use classic network interface naming scheme
+ touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules
+
+ # hid2hci has moved to bluez4. removed in udev as of version 169
+ rm -f ${D}${base_libdir}/udev/hid2hci
+}
+
+do_install_prepend_class-target () {
+ # Remove references to buildmachine
+ sed -i -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ ${B}/src/udev/keyboard-keys-from-name.h
+}
+
+INITSCRIPT_NAME = "udev"
+INITSCRIPT_PARAMS = "start 04 S ."
+
+PACKAGES =+ "libudev"
+PACKAGES =+ "eudev-hwdb"
+
+
+FILES_${PN} += "${libexecdir} ${base_libdir}/udev ${bindir}/udevadm"
+FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
+ ${includedir}/libudev.h ${libdir}/libudev.so \
+ ${includedir}/udev.h ${libdir}/libudev.la \
+ ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc"
+FILES_libudev = "${base_libdir}/libudev.so.*"
+FILES_eudev-hwdb = "${sysconfdir}/udev/hwdb.d"
+
+RDEPENDS_eudev-hwdb += "eudev"
+
+RPROVIDES_${PN} = "hotplug udev"
+RPROVIDES_eudev-hwdb += "udev-hwdb"
+
+PACKAGE_WRITE_DEPS += "qemu-native"
+pkg_postinst_eudev-hwdb () {
+ if test -n "$D"; then
+ ${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update --root $D
+ chown root:root $D${sysconfdir}/udev/hwdb.bin
+ else
+ udevadm hwdb --update
+ fi
+}
+
+pkg_prerm_eudev-hwdb () {
+ rm -f $D${sysconfdir}/udev/hwdb.bin
+}
diff --git a/import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb b/import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
index 6fc6f6e..76d4312 100644
--- a/import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
@@ -16,7 +16,7 @@
file://check-if-symlinks-are-valid.patch \
file://fix-to-handle-priority-numbers-correctly.patch \
"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc
index f0ffd25..0b7db52 100644
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc
@@ -20,7 +20,7 @@
#gtk-doc is not enabled as it requires xmlto which requires util-linux
inherit autotools gettext pkgconfig systemd update-alternatives python3-dir bash-completion ptest
-DEPENDS = "zlib ncurses"
+DEPENDS = "zlib ncurses virtual/crypt"
DEPENDS_append_class-native = " lzo-native"
DEPENDS_append_class-nativesdk = " lzo-native"
@@ -31,7 +31,7 @@
util-linux-swaponoff util-linux-losetup util-linux-umount \
util-linux-mount util-linux-readprofile util-linux-uuidd \
util-linux-uuidgen util-linux-lscpu util-linux-fsck.cramfs util-linux-fsck \
- util-linux-blkid util-linux-mkfs util-linux-mcookie util-linux-reset \
+ util-linux-blkid util-linux-mkfs util-linux-mcookie util-linux-rfkill \
util-linux-lsblk util-linux-mkfs.cramfs util-linux-fstrim \
util-linux-partx util-linux-hwclock util-linux-mountpoint \
util-linux-findfs util-linux-getopt util-linux-sulogin util-linux-prlimit \
@@ -44,7 +44,7 @@
SHARED_EXTRA_OECONF = "--disable-use-tty-group \
--disable-makeinstall-chown \
--enable-kill --enable-last --enable-mesg --enable-partx \
- --enable-raw --enable-reset --disable-login \
+ --enable-raw --enable-rfkill --disable-login \
--disable-vipw --disable-newgrp --disable-chfn-chsh \
--enable-write --enable-mount \
--enable-libuuid --enable-libblkid --enable-fsck \
@@ -86,7 +86,7 @@
FILES_util-linux-readprofile = "${sbindir}/readprofile.${BPN}"
FILES_util-linux-uuidgen = "${bindir}/uuidgen"
FILES_util-linux-uuidd = "${sbindir}/uuidd"
-FILES_util-linux-reset = "${base_bindir}/reset*"
+FILES_util-linux-rfkill = "${sbindir}/rfkill*"
FILES_util-linux-partx = "${sbindir}/partx"
FILES_util-linux-hwclock = "${base_sbindir}/hwclock.${BPN}"
FILES_util-linux-findfs = "${sbindir}/findfs"
@@ -119,9 +119,6 @@
RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
-# reset calls 'tput'
-RDEPENDS_util-linux-reset += "ncurses"
-
RDEPENDS_util-linux-runuser += "libpam"
RDEPENDS_util-linux-su += "libpam"
@@ -160,7 +157,7 @@
sbinprogs="agetty ctrlaltdel cfdisk vipw vigr"
sbinprogs_a="pivot_root hwclock mkswap mkfs.minix fsck.minix losetup swapon swapoff fdisk fsck blkid blockdev fstrim sulogin switch_root nologin"
- binprogs_a="dmesg getopt kill more umount mount login reset su mountpoint"
+ binprogs_a="dmesg getopt kill more umount mount login su mountpoint"
if [ "${base_sbindir}" != "${sbindir}" ]; then
mkdir -p ${D}${base_sbindir}
@@ -198,17 +195,18 @@
fi
}
-# reset and nologin causes a conflict with ncurses-native and shadow-native
+# nologin causes a conflict with shadow-native
+# kill causes a conflict with coreutils-native (if ${bindir}==${base_bindir})
do_install_append_class-native () {
- rm -f ${D}${base_bindir}/reset
rm -f ${D}${base_sbindir}/nologin
+ rm -f ${D}${base_bindir}/kill
}
ALTERNATIVE_PRIORITY = "80"
ALTERNATIVE_${PN} = "dmesg kill more mkswap blockdev pivot_root switch_root"
ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall"
-ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject nologin"
+ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject nologin taskset"
ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
@@ -220,14 +218,14 @@
ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin"
-ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 nologin.8 sulogin.8 utmpdump.1 reset.1 kill.1 libblkid.3 blkid.8 findfs.8 fsck.8 uuid.3 eject.1 logger.1"
+ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 nologin.8 sulogin.8 utmpdump.1 rfkill.8 kill.1 libblkid.3 blkid.8 findfs.8 fsck.8 uuid.3 eject.1 logger.1"
ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1"
ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1"
ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1"
ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1"
ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8"
-ALTERNATIVE_LINK_NAME[reset.1] = "${mandir}/man1/reset.1"
+ALTERNATIVE_LINK_NAME[rfkill.8] = "${mandir}/man8/rfkill.8"
ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8"
ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
@@ -272,9 +270,8 @@
ALTERNATIVE_util-linux-blkid = "blkid"
ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid"
-ALTERNATIVE_util-linux-reset = "reset"
-ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset"
-ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
+ALTERNATIVE_util-linux-rfkill = "rfkill"
+ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill"
ALTERNATIVE_util-linux-getopt = "getopt"
ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt"
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
index 46d4d37..748b6ef 100644
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
@@ -5,15 +5,16 @@
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Upstream-Status: Inappropriate
-diff -ruN a/configure.ac b/configure.ac
---- a/configure.ac 2014-05-27 12:37:42.119772658 +0200
-+++ b/configure.ac 2014-05-27 12:41:46.225573272 +0200
-@@ -10,7 +10,7 @@
+Index: util-linux-2.32/configure.ac
+===================================================================
+--- util-linux-2.32.orig/configure.ac
++++ util-linux-2.32/configure.ac
+@@ -11,7 +11,7 @@ AC_CONFIG_MACRO_DIR([m4])
dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run
dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors.
AC_USE_SYSTEM_EXTENSIONS
--AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects])
-+AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects serial-tests])
-
+-AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax no-dist-gzip dist-xz subdir-objects])
++AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax no-dist-gzip dist-xz subdir-objects serial-tests])
+
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch
index a5b1ff1..e475289 100644
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch
@@ -5,11 +5,11 @@
Signed-off-by: Saul Wold <sgw@linux.intel.com
Upstream-Status: Inappropriate [configuration]
-Index: util-linux-2.22.1/configure.ac
+Index: util-linux-2.31/configure.ac
===================================================================
---- util-linux-2.22.1.orig/configure.ac
-+++ util-linux-2.22.1/configure.ac
-@@ -73,7 +73,10 @@ AC_SUBST([localstatedir])
+--- util-linux-2.31.orig/configure.ac
++++ util-linux-2.31/configure.ac
+@@ -89,7 +89,10 @@ AC_SUBST([runstatedir])
usrbin_execdir='${exec_prefix}/bin'
AC_SUBST([usrbin_execdir])
@@ -20,4 +20,4 @@
+fi
AC_SUBST([usrsbin_execdir])
- case $libdir in
+ AS_CASE([$libdir],
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/no_getrandom.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/no_getrandom.patch
deleted file mode 100644
index b9fa1ca..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/no_getrandom.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-getrandom() is only available in glibc 2.25+ and uninative may relocate
-binaries onto systems that don't have this function. For now, force the
-code to the older codepath until we can come up with a better solution
-for this kind of issue.
-
-Upstream-Status: Inappropriate
-RP
-2016/8/15
-
-Index: util-linux-2.30/configure.ac
-===================================================================
---- util-linux-2.30.orig/configure.ac
-+++ util-linux-2.30/configure.ac
-@@ -399,7 +399,6 @@ AC_CHECK_FUNCS([ \
- getdtablesize \
- getexecname \
- getmntinfo \
-- getrandom \
- getrlimit \
- getsgnam \
- inotify_init \
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.30.bb b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.30.bb
deleted file mode 100644
index 39449d9..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.30.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-MAJOR_VERSION = "2.30"
-require util-linux.inc
-
-# To support older hosts, we need to patch and/or revert
-# some upstream changes. Only do this for native packages.
-OLDHOST = ""
-OLDHOST_class-native = "file://util-linux-native-qsort.patch"
-
-SRC_URI += "file://configure-sbindir.patch \
- file://runuser.pamd \
- file://runuser-l.pamd \
- ${OLDHOST} \
- file://ptest.patch \
- file://run-ptest \
- file://display_testname_for_subtest.patch \
- file://avoid_parallel_tests.patch \
-"
-SRC_URI_append_class-native = " file://no_getrandom.patch"
-SRC_URI[md5sum] = "eaa3429150268027908a1b8ae6ee9a62"
-SRC_URI[sha256sum] = "c208a4ff6906cb7f57940aa5bc3a6eed146e50a7cc0a092f52ef2ab65057a08d"
-
-CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
-
-EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \
- --disable-fallocate \
- --disable-use-tty-group \
-"
-EXTRA_OECONF_class-nativesdk = "${SHARED_EXTRA_OECONF} \
- --disable-fallocate \
- --disable-use-tty-group \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.32.bb b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.32.bb
new file mode 100644
index 0000000..55cc98c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.32.bb
@@ -0,0 +1,30 @@
+MAJOR_VERSION = "2.32"
+require util-linux.inc
+
+# To support older hosts, we need to patch and/or revert
+# some upstream changes. Only do this for native packages.
+OLDHOST = ""
+OLDHOST_class-native = "file://util-linux-native-qsort.patch"
+
+SRC_URI += "file://configure-sbindir.patch \
+ file://runuser.pamd \
+ file://runuser-l.pamd \
+ ${OLDHOST} \
+ file://ptest.patch \
+ file://run-ptest \
+ file://display_testname_for_subtest.patch \
+ file://avoid_parallel_tests.patch \
+"
+SRC_URI[md5sum] = "e0d8a25853f88cd15ff557e5d8cb4ea7"
+SRC_URI[sha256sum] = "6c7397abc764e32e8159c2e96042874a190303e77adceb4ac5bd502a272a4734"
+
+CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
+
+EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \
+ --disable-fallocate \
+ --disable-use-tty-group \
+"
+EXTRA_OECONF_class-nativesdk = "${SHARED_EXTRA_OECONF} \
+ --disable-fallocate \
+ --disable-use-tty-group \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-core/volatile-binds/volatile-binds.bb b/import-layers/yocto-poky/meta/recipes-core/volatile-binds/volatile-binds.bb
index a6e3254..d861a71 100644
--- a/import-layers/yocto-poky/meta/recipes-core/volatile-binds/volatile-binds.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/volatile-binds/volatile-binds.bb
@@ -67,7 +67,7 @@
install -m 0755 mount-copybind ${D}${base_sbindir}/
install -d ${D}${systemd_unitdir}/system
- for service in ${SYSTEMD_SERVICE_volatile-binds}; do
+ for service in ${SYSTEMD_SERVICE_${PN}}; do
install -m 0644 $service ${D}${systemd_unitdir}/system/
done
diff --git a/import-layers/yocto-poky/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch b/import-layers/yocto-poky/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch
index 403b482..7ccbe1f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch
@@ -7,14 +7,15 @@
Upstream-Status: Inappropriate [disable feature]
-diff -uNr zlib-1.2.6.orig/Makefile.in zlib-1.2.6/Makefile.in
---- zlib-1.2.6.orig/Makefile.in 2012-01-28 23:48:50.000000000 +0100
-+++ zlib-1.2.6/Makefile.in 2012-02-13 15:38:20.577700723 +0100
-@@ -199,7 +199,6 @@
+Index: zlib-1.2.11/Makefile.in
+===================================================================
+--- zlib-1.2.11.orig/Makefile.in
++++ zlib-1.2.11/Makefile.in
+@@ -322,7 +322,6 @@ install-libs: $(LIBS)
rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB); \
ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
- ($(LDCONFIG) || true) >/dev/null 2>&1; \
fi
- cp zlib.3 $(DESTDIR)$(man3dir)
- chmod 644 $(DESTDIR)$(man3dir)/zlib.3
+ rm -f $(DESTDIR)$(man3dir)/zlib.3
+ cp $(SRCDIR)zlib.3 $(DESTDIR)$(man3dir)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native.inc b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native.inc
index 68f1b3c..ef232c1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native.inc
@@ -67,4 +67,10 @@
install -d ${D}${localstatedir}/cache/apt/archives/partial
install -d ${D}${localstatedir}/log/apt/
+
+ install -d ${D}${includedir}/apt-pkg
+ for h in `find ${S}/apt-pkg ${S}/apt-inst -name '*.h'`
+ do
+ install -m 0644 $h ${D}${includedir}/apt-pkg
+ done
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/disable-test.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/disable-test.patch
index 0532671..d16b5c7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/disable-test.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/disable-test.patch
@@ -17,10 +17,10 @@
configure.ac | 7 -------
2 files changed, 3 insertions(+), 13 deletions(-)
-diff --git a/Makefile b/Makefile
-index 7680f08..69527a5 100644
---- a/Makefile
-+++ b/Makefile
+Index: apt-1.2.24/Makefile
+===================================================================
+--- apt-1.2.24.orig/Makefile
++++ apt-1.2.24/Makefile
@@ -9,8 +9,8 @@ endif
.PHONY: default
default: startup all
@@ -32,9 +32,9 @@
$(MAKE) -C vendor $@
$(MAKE) -C apt-pkg $@
$(MAKE) -C apt-inst $@
-@@ -21,8 +21,6 @@ all headers library clean veryclean binary program doc manpages docbook test upd
+@@ -21,8 +21,6 @@ all headers library clean veryclean bina
$(MAKE) -C dselect $@
- $(MAKE) -C doc $@
+ # $(MAKE) -C doc $@
$(MAKE) -C po $@
- # FIXME: -C test has issue swith parallel builds, investigate!
- -$(MAKE) -C test $@
@@ -52,10 +52,10 @@
dirs: startup
-diff --git a/configure.ac b/configure.ac
-index 1f05da5..e47f459 100644
---- a/configure.ac
-+++ b/configure.ac
+Index: apt-1.2.24/configure.ac
+===================================================================
+--- apt-1.2.24.orig/configure.ac
++++ apt-1.2.24/configure.ac
@@ -90,13 +90,6 @@ AC_CHECK_LIB(curl, curl_easy_init,
AC_MSG_ERROR([failed: I need CURL due https support]),
)
@@ -70,6 +70,3 @@
AC_SUBST(BDBLIB)
HAVE_ZLIB=no
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch
index 801ae6d..899c6ef 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch
@@ -1,12 +1,14 @@
Upstream-Status: Pending
---- a/apt-pkg/contrib/weakptr.h
-+++ b/apt-pkg/contrib/weakptr.h
+Index: apt-1.2.24/apt-pkg/contrib/weakptr.h
+===================================================================
+--- apt-1.2.24.orig/apt-pkg/contrib/weakptr.h
++++ apt-1.2.24/apt-pkg/contrib/weakptr.h
@@ -21,6 +21,7 @@
#ifndef WEAK_POINTER_H
#define WEAK_POINTER_H
+#include <cstdlib>
#include <set>
- /**
- * Class for objects providing support for weak pointers.
+ #include <stddef.h>
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/makerace.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/makerace.patch
index 46e3161..0c686d6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/makerace.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/makerace.patch
@@ -8,16 +8,16 @@
Upstream-Status: Pending
-Index: apt-0.9.9.4/buildlib/library.mak
+Index: apt-1.2.24/buildlib/library.mak
===================================================================
---- apt-0.9.9.4.orig/buildlib/library.mak 2013-07-31 15:45:07.320440575 +0300
-+++ apt-0.9.9.4/buildlib/library.mak 2013-07-31 15:46:49.440440561 +0300
-@@ -61,7 +61,7 @@
+--- apt-1.2.24.orig/buildlib/library.mak
++++ apt-1.2.24/buildlib/library.mak
+@@ -65,7 +65,7 @@ $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR
# Compilation rules
vpath %.cc $(SUBDIRS)
-$(OBJ)/%.opic: %.cc $(LIBRARYDEPENDS)
+$(OBJ)/%.opic: %.cc $(LIBRARYDEPENDS) $($(LOCAL)-HEADERS)
echo Compiling $< to $@
- $(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXFLAGS) $(PICFLAGS) -o $@ $<
+ $(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXSTD) $(CXXFLAGS) $(PICFLAGS) -o $@ '$(abspath $<)'
$(DoDep)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch
index a0996d4..98b6c96 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch
@@ -1,8 +1,10 @@
Upstream-Status: Pending
---- a/apt-pkg/deb/dpkgpm.cc
-+++ b/apt-pkg/deb/dpkgpm.cc
-@@ -42,6 +42,12 @@
+Index: apt-1.2.24/apt-pkg/deb/dpkgpm.cc
+===================================================================
+--- apt-1.2.24.orig/apt-pkg/deb/dpkgpm.cc
++++ apt-1.2.24/apt-pkg/deb/dpkgpm.cc
+@@ -54,6 +54,12 @@
#include <apti18n.h>
/*}}}*/
@@ -14,8 +16,8 @@
+
using namespace std;
- namespace
-@@ -1279,7 +1285,7 @@ void pkgDPkgPM::WriteApportReport(const
+ APT_PURE static string
+@@ -1703,7 +1709,7 @@ void pkgDPkgPM::WriteApportReport(const
}
// check if its not a follow up error
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/nodoc.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/nodoc.patch
index 449e42d..78cf538 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/nodoc.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/nodoc.patch
@@ -3,16 +3,16 @@
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-Index: apt-0.9.7.7/Makefile
+Index: apt-1.2.24/Makefile
===================================================================
---- apt-0.9.7.7.orig/Makefile
-+++ apt-0.9.7.7/Makefile
-@@ -17,7 +17,7 @@ all headers library clean veryclean bina
+--- apt-1.2.24.orig/Makefile
++++ apt-1.2.24/Makefile
+@@ -19,7 +19,7 @@ all headers library clean veryclean bina
$(MAKE) -C cmdline $@
$(MAKE) -C ftparchive $@
$(MAKE) -C dselect $@
- $(MAKE) -C doc $@
+# $(MAKE) -C doc $@
$(MAKE) -C po $@
- $(MAKE) -C test $@
-
+ # FIXME: -C test has issue swith parallel builds, investigate!
+ -$(MAKE) -C test $@
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb b/import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb
index 104dc38..89d57ac 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb
@@ -9,6 +9,10 @@
SRC_URI[md5sum] = "bf19d4cddce260b3c3e1d51d42509071"
SRC_URI[sha256sum] = "e8f2efd235f842bad2f6938bf4a72240a5e5fcd248e8444335e63beb60fabd82"
-inherit autotools
+inherit autotools allarch
+
+PACKAGES = "${PN} ${PN}-doc"
+
+FILES_${PN} += "${datadir}/aclocal"
BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc b/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc
index ea62df8..df81bc6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc
@@ -41,6 +41,10 @@
CACHED_CONFIGUREVARS += "ac_cv_path_PERL='${PERL}'"
do_configure() {
+ # manually install a newer config.guess/.sub
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/build-aux
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/build-aux
+
oe_runconf
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch
index 64eb253..96b5a3d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch
@@ -22,10 +22,10 @@
t/wrap/automake.in | 3 ++-
4 files changed, 8 insertions(+), 4 deletions(-)
-diff --git a/bin/aclocal.in b/bin/aclocal.in
-index 349f24a..50cb8d3 100644
---- a/bin/aclocal.in
-+++ b/bin/aclocal.in
+Index: automake-1.15.1/bin/aclocal.in
+===================================================================
+--- automake-1.15.1.orig/bin/aclocal.in
++++ automake-1.15.1/bin/aclocal.in
@@ -1,4 +1,4 @@
-#!@PERL@ -w
+#!@PERL@
@@ -40,17 +40,17 @@
use Automake::Config;
use Automake::General;
-diff --git a/bin/automake.in b/bin/automake.in
-index eedc8bc..e0a01cf 100644
---- a/bin/automake.in
-+++ b/bin/automake.in
+Index: automake-1.15.1/bin/automake.in
+===================================================================
+--- automake-1.15.1.orig/bin/automake.in
++++ automake-1.15.1/bin/automake.in
@@ -1,4 +1,4 @@
-#!@PERL@ -w
+#!@PERL@
# -*- perl -*-
# @configure_input@
-@@ -28,6 +28,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
+@@ -28,6 +28,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";
package Automake;
use strict;
@@ -58,16 +58,16 @@
BEGIN
{
-diff --git a/t/wrap/aclocal.in b/t/wrap/aclocal.in
-index e64b546..9996899 100644
---- a/t/wrap/aclocal.in
-+++ b/t/wrap/aclocal.in
+Index: automake-1.15.1/t/wrap/aclocal.in
+===================================================================
+--- automake-1.15.1.orig/t/wrap/aclocal.in
++++ automake-1.15.1/t/wrap/aclocal.in
@@ -1,4 +1,4 @@
-#!@PERL@ -w
+#!@PERL@
# @configure_input@
- # Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ # Copyright (C) 2012-2017 Free Software Foundation, Inc.
@@ -19,6 +19,7 @@
BEGIN
{
@@ -76,16 +76,16 @@
@Aclocal::perl_libdirs = ('@abs_top_srcdir@/lib');
unshift @Aclocal::perl_libdirs, '@abs_top_builddir@/lib'
if '@srcdir@' ne '.';
-diff --git a/t/wrap/automake.in b/t/wrap/automake.in
-index 8b943b1..be61226 100644
---- a/t/wrap/automake.in
-+++ b/t/wrap/automake.in
+Index: automake-1.15.1/t/wrap/automake.in
+===================================================================
+--- automake-1.15.1.orig/t/wrap/automake.in
++++ automake-1.15.1/t/wrap/automake.in
@@ -1,4 +1,4 @@
-#!@PERL@ -w
+#!@PERL@
# @configure_input@
- # Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ # Copyright (C) 2012-2017 Free Software Foundation, Inc.
@@ -19,6 +19,7 @@
BEGIN
{
@@ -94,6 +94,3 @@
@Automake::perl_libdirs = ('@abs_top_srcdir@/lib');
unshift @Automake::perl_libdirs, '@abs_top_builddir@/lib'
if '@srcdir@' ne '.';
---
-2.3.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/buildtest.patch b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/buildtest.patch
index 1dd5337..c32cd1f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/buildtest.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/buildtest.patch
@@ -4,21 +4,23 @@
Signed-off-by: Björn Stenberg <bjst@enea.com>
Upstream-Status: Pending
---- a/lib/am/check.am 2012-11-14 13:46:16.335475995 +0100
-+++ b/lib/am/check.am 2012-08-13 18:40:12.000000000 +0200
-@@ -44,7 +44,7 @@
- am__tty_colors = $(am__tty_colors_dummy)
- endif !%?COLOR%
-
+Index: automake-1.15.1/lib/am/check.am
+===================================================================
+--- automake-1.15.1.orig/lib/am/check.am
++++ automake-1.15.1/lib/am/check.am
+@@ -41,7 +41,7 @@ am__tty_colors = { \
+ fi; \
+ }
+
-.PHONY: check-TESTS
+.PHONY: check-TESTS buildtest-TESTS runtest-TESTS
-
- if %?PARALLEL_TESTS%
-
-@@ -465,7 +465,14 @@
-
- else !%?PARALLEL_TESTS%
-
+
+ if !%?SERIAL_TESTS%
+
+@@ -466,7 +466,14 @@ else %?SERIAL_TESTS%
+
+ ## Obsolescent serial testsuite driver.
+
-check-TESTS: $(TESTS)
+AM_RECURSIVE_TARGETS += buildtest runtest
+
@@ -28,6 +30,6 @@
+ $(MAKE) $(AM_MAKEFLAGS) runtest-TESTS
+
+runtest-TESTS:
- @failed=0; all=0; xfail=0; xpass=0; skip=0; \
- srcdir=$(srcdir); export srcdir; \
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
## Make sure Solaris VPATH-expands all members of this list, even
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.29.1.inc b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.29.1.inc
deleted file mode 100644
index 07a72e2..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.29.1.inc
+++ /dev/null
@@ -1,43 +0,0 @@
-LIC_FILES_CHKSUM="\
- file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
- file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
- file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
- file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
- file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
- file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
- file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
- file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
- file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
- "
-
-def binutils_branch_version(d):
- pvsplit = d.getVar('PV').split('.')
- return pvsplit[0] + "_" + pvsplit[1]
-
-BINUPV = "${@binutils_branch_version(d)}"
-
-UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
-
-SRCREV ?= "90276f15379d380761fc499da2ba24cfb3c12a94"
-BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git"
-SRC_URI = "\
- ${BINUTILS_GIT_URI} \
- file://0003-configure-widen-the-regexp-for-SH-architectures.patch \
- file://0004-Point-scripts-location-to-libdir.patch \
- file://0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
- file://0006-Use-libtool-2.4.patch \
- file://0007-Add-the-armv5e-architecture-to-binutils.patch \
- file://0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
- file://0009-warn-for-uses-of-system-directories-when-cross-linki.patch \
- file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
- file://0011-Change-default-emulation-for-mips64-linux.patch \
- file://0012-Add-support-for-Netlogic-XLP.patch \
- file://0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
- file://0014-Detect-64-bit-MIPS-targets.patch \
- file://0015-sync-with-OE-libtool-changes.patch \
-"
-S = "${WORKDIR}/git"
-
-do_configure_prepend () {
- rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.30.inc b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.30.inc
new file mode 100644
index 0000000..9c883ac
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.30.inc
@@ -0,0 +1,43 @@
+LIC_FILES_CHKSUM="\
+ file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+ file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
+ file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+ file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
+ file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+ file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+ file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
+ file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ "
+
+def binutils_branch_version(d):
+ pvsplit = d.getVar('PV').split('.')
+ return pvsplit[0] + "_" + pvsplit[1]
+
+BINUPV = "${@binutils_branch_version(d)}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
+
+SRCREV ?= "caa839fba66600a6c36d3639906ed9110b79c307"
+BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git"
+SRC_URI = "\
+ ${BINUTILS_GIT_URI} \
+ file://0003-configure-widen-the-regexp-for-SH-architectures.patch \
+ file://0004-Point-scripts-location-to-libdir.patch \
+ file://0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
+ file://0006-Use-libtool-2.4.patch \
+ file://0007-Add-the-armv5e-architecture-to-binutils.patch \
+ file://0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
+ file://0009-warn-for-uses-of-system-directories-when-cross-linki.patch \
+ file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
+ file://0011-Change-default-emulation-for-mips64-linux.patch \
+ file://0012-Add-support-for-Netlogic-XLP.patch \
+ file://0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
+ file://0014-Detect-64-bit-MIPS-targets.patch \
+ file://0015-sync-with-OE-libtool-changes.patch \
+"
+S = "${WORKDIR}/git"
+
+do_configure_prepend () {
+ rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.29.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.30.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.29.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.30.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.29.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.30.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.29.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.30.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.29.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.30.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.29.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.30.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
index 0b515d8..2df8360 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
@@ -1,4 +1,4 @@
-From 58ac9f95a3d83c29efaf7a8906fb6aefea8c8e79 Mon Sep 17 00:00:00 2001
+From 2e1b5e24a6759de7f73aa6060a574848d9131b5a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:58:54 +0000
Subject: [PATCH 01/15] binutils-crosssdk: Generate relocatable SDKs
@@ -18,7 +18,7 @@
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
-index b6940d376d..a42c4d7a4b 100755
+index 8732422b3a..1f257e99ca 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -277,6 +277,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
@@ -37,16 +37,16 @@
( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */"
. ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
+unset PARTIAL_LINKING
- LD_FLAG=
DATA_ALIGNMENT=${DATA_ALIGNMENT_}
+ RELOCATING=" "
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
-index d9138bc059..e48faeca43 100644
+index 9787ab5dac..0c8a93c2c8 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
-@@ -138,8 +138,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
+@@ -139,8 +139,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
fi
fi
@@ -58,5 +58,5 @@
if test -z "$PLT"; then
IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
index 370333d..bac7fb2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
@@ -1,4 +1,4 @@
-From 8f929c616208351d0971d7dfd7574d48d3144603 Mon Sep 17 00:00:00 2001
+From 58ddf38fa53abb48b69dd76e398c73451ad1a5eb Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 6 Mar 2017 23:37:05 -0800
Subject: [PATCH 02/15] binutils-cross: Do not generate linker script
@@ -23,7 +23,7 @@
1 file changed, 23 deletions(-)
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
-index a42c4d7a4b..d727b4d07e 100755
+index 1f257e99ca..1583b73a2b 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -189,29 +189,6 @@ append_to_lib_path()
@@ -57,5 +57,5 @@
libs=${NATIVE_LIB_DIRS}
if [ "x${NATIVE}" = "xyes" ] ; then
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch
index b6c09cc..306afe7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch
@@ -1,4 +1,4 @@
-From e5a806aae02a10290c71deb72f6294c98068368d Mon Sep 17 00:00:00 2001
+From 5089be88f670bcadf7db0e778894f900b2c05d7b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:07:33 +0000
Subject: [PATCH 03/15] configure: widen the regexp for SH architectures
@@ -14,12 +14,12 @@
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
-index be9dd89d9b..d8af155ab5 100755
+index 2d615a9996..c4ad45c06c 100755
--- a/configure
+++ b/configure
-@@ -3844,7 +3844,7 @@ case "${target}" in
- or1k*-*-*)
- noconfigdirs="$noconfigdirs gdb"
+@@ -3835,7 +3835,7 @@ case "${target}" in
+ nvptx*-*-*)
+ noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
;;
- sh-*-*)
+ sh*-*-* | sh64-*-*)
@@ -27,7 +27,7 @@
sh*-*-elf)
;;
diff --git a/gprof/configure b/gprof/configure
-index e71fe8b9e4..679e0dce77 100755
+index 1e25102976..6b43bf2b18 100755
--- a/gprof/configure
+++ b/gprof/configure
@@ -5874,6 +5874,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
@@ -43,5 +43,5 @@
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch
index 38eee30..3e29c58 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch
@@ -1,4 +1,4 @@
-From 3634ec3547bc0f8a5d1b8ad15365e2f836cda642 Mon Sep 17 00:00:00 2001
+From a0e893ea094c48fa803046ffa89e31907aee0597 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:09:58 +0000
Subject: [PATCH 04/15] Point scripts location to libdir
@@ -12,7 +12,7 @@
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 625347ff62..d5334d2681 100644
+index 6243c12528..3c5d6c8202 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -57,7 +57,7 @@ endif
@@ -25,7 +25,7 @@
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
diff --git a/ld/Makefile.in b/ld/Makefile.in
-index ba251777b0..a2cf2282b5 100644
+index 760c037f9d..6dea692869 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -446,7 +446,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
@@ -38,5 +38,5 @@
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
index 59150a2..2f49969 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
@@ -1,4 +1,4 @@
-From 9d37c8f68c07da63186cb993f1221f6c11eca422 Mon Sep 17 00:00:00 2001
+From 518abb195d0eb47d8eef581d7fd0a5fd9fa73f7d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:27:17 +0000
Subject: [PATCH 05/15] Only generate an RPATH entry if LD_RUN_PATH is not
@@ -15,10 +15,10 @@
1 file changed, 4 insertions(+)
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
-index 9ac1840316..9dc4c149bc 100644
+index c0925fc9b9..7d7670a89f 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
-@@ -1463,6 +1463,8 @@ fragment <<EOF
+@@ -1470,6 +1470,8 @@ fragment <<EOF
&& command_line.rpath == NULL)
{
path = (const char *) getenv ("LD_RUN_PATH");
@@ -27,7 +27,7 @@
if (path
&& gld${EMULATION_NAME}_search_needed (path, &n, force))
break;
-@@ -1740,6 +1742,8 @@ gld${EMULATION_NAME}_before_allocation (void)
+@@ -1750,6 +1752,8 @@ gld${EMULATION_NAME}_before_allocation (void)
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
@@ -37,5 +37,5 @@
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
index e87efe6..333e2ee 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
@@ -1,4 +1,4 @@
-From 71c734bb3754319029dcfc898cedbade42274dcb Mon Sep 17 00:00:00 2001
+From fad053cc59baa6277182b0fc90415a214060ba99 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 14 Feb 2016 17:04:07 +0000
Subject: [PATCH 06/15] Use libtool 2.4
@@ -12,7 +12,6 @@
bfd/configure | 1318 +++++++++++++++++------
bfd/configure.ac | 2 +-
binutils/configure | 1316 +++++++++++++++++------
- configure | 2 +-
gas/configure | 1314 +++++++++++++++++------
gprof/configure | 1321 +++++++++++++++++------
ld/configure | 1691 +++++++++++++++++++++--------
@@ -24,10 +23,10 @@
opcodes/configure | 1318 +++++++++++++++++------
opcodes/configure.ac | 2 +-
zlib/configure | 1316 +++++++++++++++++------
- 15 files changed, 9927 insertions(+), 3694 deletions(-)
+ 14 files changed, 9926 insertions(+), 3693 deletions(-)
diff --git a/bfd/configure b/bfd/configure
-index 48276594ed..3ece8943f3 100755
+index 6c2b24ebe3..5fdd723b7f 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -672,6 +672,9 @@ OTOOL
@@ -1931,7 +1930,7 @@
chmod +x "$ofile"
diff --git a/bfd/configure.ac b/bfd/configure.ac
-index 8fd03a7ea8..8816c3286c 100644
+index 2342f3faea..a6451fccda 100644
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
@@ -254,7 +254,7 @@ changequote(,)dnl
@@ -1944,7 +1943,7 @@
# More hacks to build DLLs on Windows.
diff --git a/binutils/configure b/binutils/configure
-index 22e1b1736e..321b63535b 100755
+index 5d9c9105a7..a65b2b4518 100755
--- a/binutils/configure
+++ b/binutils/configure
@@ -659,8 +659,11 @@ OTOOL
@@ -3841,21 +3840,8 @@
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
-diff --git a/configure b/configure
-index d8af155ab5..005ed827ab 100755
---- a/configure
-+++ b/configure
-@@ -3844,7 +3844,7 @@ case "${target}" in
- or1k*-*-*)
- noconfigdirs="$noconfigdirs gdb"
- ;;
-- sh*-*-* | sh64-*-*)
-+ sh-*-* | sh64-*-*)
- case "${target}" in
- sh*-*-elf)
- ;;
diff --git a/gas/configure b/gas/configure
-index 93afb20c8f..81dd4cbd97 100755
+index fbac8f44d5..a40ac2144f 100755
--- a/gas/configure
+++ b/gas/configure
@@ -650,8 +650,11 @@ OTOOL
@@ -5156,7 +5142,7 @@
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -15436,13 +16089,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -15437,13 +16090,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -5177,7 +5163,7 @@
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -15457,14 +16117,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -15458,14 +16118,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -5196,7 +5182,7 @@
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -15497,12 +16160,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -15498,12 +16161,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -5210,7 +5196,7 @@
file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -15557,8 +16220,13 @@ reload_flag \
+@@ -15558,8 +16221,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -5224,7 +5210,7 @@
STRIP \
RANLIB \
CC \
-@@ -15568,12 +16236,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -15569,12 +16237,14 @@ lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -5240,7 +5226,7 @@
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -15589,7 +16259,6 @@ no_undefined_flag \
+@@ -15590,7 +16260,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -5248,7 +5234,7 @@
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -15625,6 +16294,7 @@ module_cmds \
+@@ -15626,6 +16295,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -5256,7 +5242,7 @@
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -16389,7 +17059,8 @@ $as_echo X"$file" |
+@@ -16390,7 +17060,8 @@ $as_echo X"$file" |
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -5266,7 +5252,7 @@
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -16492,19 +17163,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -16493,19 +17164,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -5310,7 +5296,7 @@
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -16534,6 +17228,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -16535,6 +17229,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
@@ -5323,7 +5309,7 @@
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -16543,6 +17243,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -16544,6 +17244,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -5333,7 +5319,7 @@
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -16657,12 +17360,12 @@ with_gcc=$GCC
+@@ -16658,12 +17361,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -5349,7 +5335,7 @@
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -16749,9 +17452,6 @@ inherit_rpath=$inherit_rpath
+@@ -16750,9 +17453,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -5359,7 +5345,7 @@
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -16767,6 +17467,9 @@ include_expsyms=$lt_include_expsyms
+@@ -16768,6 +17468,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -5369,7 +5355,7 @@
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -16799,210 +17502,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -16800,210 +17503,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
@@ -5744,7 +5730,7 @@
chmod +x "$ofile"
diff --git a/gprof/configure b/gprof/configure
-index 679e0dce77..ac4c016a63 100755
+index 6b43bf2b18..245ee48bc3 100755
--- a/gprof/configure
+++ b/gprof/configure
@@ -631,8 +631,11 @@ OTOOL
@@ -7654,7 +7640,7 @@
chmod +x "$ofile"
diff --git a/ld/configure b/ld/configure
-index d7f66f8cdc..4e71511bd1 100755
+index 0cc6e8a50f..db8b998722 100755
--- a/ld/configure
+++ b/ld/configure
@@ -655,8 +655,11 @@ OTOOL
@@ -17336,7 +17322,7 @@
# These exist entirely to fool aclocal when bootstrapping libtool.
#
diff --git a/opcodes/configure b/opcodes/configure
-index 17530f54b9..79b39611c2 100755
+index 4f29887098..2127d39288 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -650,6 +650,9 @@ OTOOL
@@ -19240,7 +19226,7 @@
chmod +x "$ofile"
diff --git a/opcodes/configure.ac b/opcodes/configure.ac
-index a9fbfd61f1..c43780f64d 100644
+index b07f3f3629..5a32d9b1fc 100644
--- a/opcodes/configure.ac
+++ b/opcodes/configure.ac
@@ -167,7 +167,7 @@ changequote(,)dnl
@@ -21153,5 +21139,5 @@
chmod +x "$ofile"
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch
index 8801960..4a51273 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch
@@ -1,4 +1,4 @@
-From 2b87aad1741bc481dd0982f100ad5ea7f937bb61 Mon Sep 17 00:00:00 2001
+From 697903256e09533778baa8af66402c44d70219d9 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:37:10 +0000
Subject: [PATCH 07/15] Add the armv5e architecture to binutils
@@ -19,10 +19,10 @@
1 file changed, 1 insertion(+)
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
-index a885efe4fc..735eaa7447 100644
+index ec50420518..a25d1721af 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
-@@ -25990,6 +25990,7 @@ static const struct arm_arch_option_table arm_archs[] =
+@@ -26195,6 +26195,7 @@ static const struct arm_arch_option_table arm_archs[] =
ARM_ARCH_OPT ("armv4t", ARM_ARCH_V4T, FPU_ARCH_FPA),
ARM_ARCH_OPT ("armv4txm", ARM_ARCH_V4TxM, FPU_ARCH_FPA),
ARM_ARCH_OPT ("armv5", ARM_ARCH_V5, FPU_ARCH_VFP),
@@ -31,5 +31,5 @@
ARM_ARCH_OPT ("armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv5te", ARM_ARCH_V5TE, FPU_ARCH_VFP),
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
index 30a22b5..939be67 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
@@ -1,4 +1,4 @@
-From 331443a87a31ec504e5652fc099d9129a9a4deb8 Mon Sep 17 00:00:00 2001
+From 622d66634eb2e509d4126f5bdcab26de367241a1 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:39:01 +0000
Subject: [PATCH 08/15] don't let the distro compiler point to the wrong
@@ -17,7 +17,7 @@
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
-index 25cfa29ad5..ce67a710e3 100644
+index ed1b334c36..d4ffd8b57b 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -364,7 +364,8 @@ install-strip: install
@@ -31,5 +31,5 @@
if test -n "${target_header_dir}"; then \
${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
index e0e2578..e751047 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
@@ -1,4 +1,4 @@
-From 0a4afdcf0700efd45963568e2d0049127cdf4434 Mon Sep 17 00:00:00 2001
+From 27e38ee92c24fca86b1c3f6ef156a1892dd06bfd Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 15 Jan 2016 06:31:09 +0000
Subject: [PATCH 09/15] warn for uses of system directories when cross linking
@@ -77,7 +77,7 @@
#undef EXTRA_SHLIB_EXTENSION
diff --git a/ld/configure b/ld/configure
-index 4e71511bd1..71c6ad1fd1 100755
+index db8b998722..489ead5c13 100755
--- a/ld/configure
+++ b/ld/configure
@@ -789,6 +789,7 @@ with_lib_path
@@ -118,7 +118,7 @@
if test "${enable_gold+set}" = set; then :
enableval=$enable_gold; case "${enableval}" in
diff --git a/ld/configure.ac b/ld/configure.ac
-index 00080f85fd..3aa98e37fb 100644
+index bada1b50b0..d074a3820b 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot)
@@ -139,10 +139,10 @@
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
diff --git a/ld/ld.h b/ld/ld.h
-index c6fa1247f0..01c373498f 100644
+index ba914b921e..9df17dab6c 100644
--- a/ld/ld.h
+++ b/ld/ld.h
-@@ -174,6 +174,14 @@ typedef struct
+@@ -180,6 +180,14 @@ typedef struct
in the linker script. */
bfd_boolean force_group_allocation;
@@ -158,10 +158,10 @@
enum endian_enum endian;
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
-index ebe7e7b7bd..33aa2c62fa 100644
+index c89915f1aa..df430837e2 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
-@@ -2480,6 +2480,18 @@ string identifying the original linked file does not change.
+@@ -2498,6 +2498,18 @@ string identifying the original linked file does not change.
Passing @code{none} for @var{style} disables the setting from any
@code{--build-id} options earlier on the command line.
@@ -181,7 +181,7 @@
@c man end
diff --git a/ld/ldfile.c b/ld/ldfile.c
-index 3b37a0a3e2..5c85b01849 100644
+index 6532a57d96..f943f0b2e5 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -116,6 +116,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
@@ -209,7 +209,7 @@
/* Try to open a BFD for a lang_input_statement. */
diff --git a/ld/ldlex.h b/ld/ldlex.h
-index 5aa7f6bc3e..cb655e0399 100644
+index 140ed1d9da..9965cbc04f 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -147,6 +147,8 @@ enum option_values
@@ -222,7 +222,7 @@
/* The initial parser states. */
diff --git a/ld/ldmain.c b/ld/ldmain.c
-index 2b09f20413..89e2a3a805 100644
+index c473ed24c3..adae0b4610 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -261,6 +261,8 @@ main (int argc, char **argv)
@@ -235,7 +235,7 @@
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
diff --git a/ld/lexsup.c b/ld/lexsup.c
-index effa277b16..e4929607e9 100644
+index f2191602d4..bccb3bdeef 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -538,6 +538,14 @@ static const struct ld_option ld_options[] =
@@ -269,5 +269,5 @@
}
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
index 496242e..33dfff9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
@@ -1,4 +1,4 @@
-From 88fac08f1c472c612f381cbb9408756f2f58b4ff Mon Sep 17 00:00:00 2001
+From e205ae05c41a8cc8d47708f0a3b6f740e2bf2526 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:42:38 +0000
Subject: [PATCH 10/15] Fix rpath in libtool when sysroot is enabled
@@ -48,5 +48,5 @@
if test -z "$hardcode_libdirs"; then
hardcode_libdirs="$libdir"
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
index ac87a2d..80fcbc1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
@@ -1,4 +1,4 @@
-From 497660bdbeb6788786553a5d733105f7f898dc62 Mon Sep 17 00:00:00 2001
+From 7978c1299021033c35c29c94e0997235f7ede248 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:44:14 +0000
Subject: [PATCH 11/15] Change default emulation for mips64*-*-linux
@@ -14,10 +14,10 @@
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/bfd/config.bfd b/bfd/config.bfd
-index dc24aabad5..4511024f22 100644
+index f04a993f06..8777f96bd2 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
-@@ -1186,12 +1186,12 @@ case "${targ}" in
+@@ -1189,12 +1189,12 @@ case "${targ}" in
targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
;;
mips64*el-*-linux*)
@@ -35,12 +35,12 @@
mips*el-*-linux*)
targ_defvec=mips_elf32_trad_le_vec
diff --git a/ld/configure.tgt b/ld/configure.tgt
-index 47c719cd05..fe7b9238b2 100644
+index 6183a85b3d..1d78465590 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
-@@ -530,11 +530,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
+@@ -535,11 +535,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
- targ_extra_emuls="elf32elmipvxworks" ;;
+ targ_extra_emuls="elf32elmipvxworks" ;;
mips*-*-windiss) targ_emul=elf32mipswindiss ;;
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
@@ -55,5 +55,5 @@
mips*el-*-linux-*) targ_emul=elf32ltsmip
targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
index dc5e580..1fefb68 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
@@ -1,4 +1,4 @@
-From 8c60a55d3678589d93739bd27fec216911d80968 Mon Sep 17 00:00:00 2001
+From 3b40bf584615f794b85fd50d4d0a5c0a1d2ee7bf Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 14 Feb 2016 17:06:19 +0000
Subject: [PATCH 12/15] Add support for Netlogic XLP
@@ -34,7 +34,7 @@
14 files changed, 61 insertions(+), 21 deletions(-)
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
-index 3d38fda14b..0aec49bbb3 100644
+index eec9c4ad2a..3bf0a71e63 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -814,6 +814,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
@@ -46,34 +46,34 @@
arch_flags = M_MIPS2;
break;
diff --git a/bfd/archures.c b/bfd/archures.c
-index 433b95fa08..063b7943a1 100644
+index e83c57a2f3..3016ea1bae 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -201,6 +201,7 @@ DESCRIPTION
- .#define bfd_mach_mips_octeon3 6503
- .#define bfd_mach_mips_xlr 887682 {* decimal 'XLR' *}
- .#define bfd_mach_mips_interaptiv_mr2 736550 {* decimal 'IA2' *}
-+.#define bfd_mach_mips_xlp 887680 {* decimal 'XLP' *}
- .#define bfd_mach_mipsisa32 32
- .#define bfd_mach_mipsisa32r2 33
- .#define bfd_mach_mipsisa32r3 34
+ .#define bfd_mach_mips_octeon3 6503
+ .#define bfd_mach_mips_xlr 887682 {* decimal 'XLR'. *}
+ .#define bfd_mach_mips_interaptiv_mr2 736550 {* decimal 'IA2'. *}
++.#define bfd_mach_mips_xlp 887680 {* decimal 'XLP'. *}
+ .#define bfd_mach_mipsisa32 32
+ .#define bfd_mach_mipsisa32r2 33
+ .#define bfd_mach_mipsisa32r3 34
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
-index d126aed086..2b753b3a93 100644
+index 42991e7848..27abc5d5a8 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
-@@ -2060,6 +2060,7 @@ enum bfd_architecture
+@@ -2062,6 +2062,7 @@ enum bfd_architecture
#define bfd_mach_mips_octeon3 6503
- #define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */
- #define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2' */
-+#define bfd_mach_mips_xlp 887680 /* decimal 'XLP' */
+ #define bfd_mach_mips_xlr 887682 /* decimal 'XLR'. */
+ #define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2'. */
++#define bfd_mach_mips_xlp 887680 /* decimal 'XLP'. */
#define bfd_mach_mipsisa32 32
#define bfd_mach_mipsisa32r2 33
#define bfd_mach_mipsisa32r3 34
diff --git a/bfd/config.bfd b/bfd/config.bfd
-index 4511024f22..f0f9072f10 100644
+index 8777f96bd2..7b80bda8c9 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
-@@ -1169,6 +1169,11 @@ case "${targ}" in
+@@ -1172,6 +1172,11 @@ case "${targ}" in
targ_defvec=mips_elf32_le_vec
targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
;;
@@ -86,7 +86,7 @@
targ_defvec=mips_elf32_be_vec
targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
-index 2493094bef..8375d1ae96 100644
+index cb50c64371..2b9d1d6ecf 100644
--- a/bfd/cpu-mips.c
+++ b/bfd/cpu-mips.c
@@ -105,7 +105,8 @@ enum
@@ -100,7 +100,7 @@
#define NN(index) (&arch_info_struct[(index) + 1])
@@ -158,7 +159,8 @@ static const bfd_arch_info_type arch_info_struct[] =
- N (64, 64, bfd_mach_mips_xlr, "mips:xlr", FALSE, NN(I_xlr)),
+ N (64, 64, bfd_mach_mips_xlr, "mips:xlr", FALSE, NN(I_xlr)),
N (32, 32, bfd_mach_mips_interaptiv_mr2, "mips:interaptiv-mr2", FALSE,
NN(I_interaptiv_mr2)),
- N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,0)
@@ -110,10 +110,10 @@
/* The default architecture is mips:3000, but with a machine number of
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
-index fddf68c816..354c85d00b 100644
+index 285401367d..14ebb5f175 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
-@@ -6796,6 +6796,9 @@ _bfd_elf_mips_mach (flagword flags)
+@@ -6806,6 +6806,9 @@ _bfd_elf_mips_mach (flagword flags)
case E_MIPS_MACH_IAMR2:
return bfd_mach_mips_interaptiv_mr2;
@@ -123,7 +123,7 @@
default:
switch (flags & EF_MIPS_ARCH)
{
-@@ -11956,6 +11959,10 @@ mips_set_isa_flags (bfd *abfd)
+@@ -11963,6 +11966,10 @@ mips_set_isa_flags (bfd *abfd)
val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2;
break;
@@ -134,7 +134,7 @@
case bfd_mach_mipsisa32:
val = E_MIPS_ARCH_32;
break;
-@@ -13989,6 +13996,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
+@@ -13936,6 +13943,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
{ bfd_mach_mips_octeonp, bfd_mach_mips_octeon },
{ bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 },
{ bfd_mach_mips_loongson_3a, bfd_mach_mipsisa64r2 },
@@ -143,10 +143,10 @@
/* MIPS64 extensions. */
{ bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
diff --git a/binutils/readelf.c b/binutils/readelf.c
-index 2b15f0f2cb..092744708e 100644
+index ae1cda9a7b..fed0387a94 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
-@@ -3335,6 +3335,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
+@@ -3370,6 +3370,7 @@ get_machine_flags (Filedata * filedata, unsigned e_flags, unsigned e_machine)
case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break;
case E_MIPS_MACH_XLR: strcat (buf, ", xlr"); break;
case E_MIPS_MACH_IAMR2: strcat (buf, ", interaptiv-mr2"); break;
@@ -155,7 +155,7 @@
/* We simply ignore the field in this case to avoid confusion:
MIPS ELF does not specify EF_MIPS_MACH, it is a GNU
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
-index 3804df2958..9576c986db 100644
+index c135131b59..d8fbda8e31 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -552,6 +552,7 @@ static int mips_32bitmode = 0;
@@ -174,7 +174,7 @@
)
/* Whether the processor uses hardware interlocks to protect reads
-@@ -19738,7 +19740,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
+@@ -19737,7 +19739,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
/* Broadcom XLP.
XLP is mostly like XLR, with the prominent exception that it is
MIPS64R2 rather than MIPS64. */
@@ -184,7 +184,7 @@
/* MIPS 64 Release 6 */
{ "i6400", 0, ASE_MSA, ISA_MIPS64R6, CPU_MIPS64R6},
diff --git a/gas/configure b/gas/configure
-index 81dd4cbd97..95bdf3b19b 100755
+index a40ac2144f..65a6995243 100755
--- a/gas/configure
+++ b/gas/configure
@@ -12989,6 +12989,9 @@ _ACEOF
@@ -198,7 +198,7 @@
mips_cpu=r3900
;;
diff --git a/include/elf/mips.h b/include/elf/mips.h
-index a4bea43ff8..73d904e25f 100644
+index 9de0b4e175..74fc4f7e55 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -290,6 +290,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
@@ -210,7 +210,7 @@
#define E_MIPS_MACH_OCTEON3 0x008e0000
#define E_MIPS_MACH_5400 0x00910000
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
-index ceae9ec50a..276ee3c6c1 100644
+index 5eea72f139..90f6d57e15 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
@@ -1259,6 +1259,8 @@ static const unsigned int mips_isa_table[] = {
@@ -241,10 +241,10 @@
return FALSE;
}
diff --git a/ld/configure.tgt b/ld/configure.tgt
-index fe7b9238b2..2adf108b17 100644
+index 1d78465590..307e787b64 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
-@@ -516,6 +516,8 @@ mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*)
+@@ -521,6 +521,8 @@ mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*)
mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
targ_emul=elf32btsmip
targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
@@ -254,7 +254,7 @@
targ_extra_emuls="elf32lr5900"
targ_extra_libpath=$targ_extra_emuls ;;
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
-index 45195007c1..4a80a05d19 100644
+index 984fcbb802..95b107d216 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
@@ -655,13 +655,11 @@ const struct mips_arch_choice mips_arch_choices[] =
@@ -277,7 +277,7 @@
/* This entry, mips16, is here only for ISA/processor selection; do
not print its name. */
diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
-index 19fca408c9..d02069c528 100644
+index 180d613c93..65b7b8cc23 100644
--- a/opcodes/mips-opc.c
+++ b/opcodes/mips-opc.c
@@ -328,6 +328,7 @@ decode_mips_operand (const char *p)
@@ -389,5 +389,5 @@
{"swc0", "E,A(b)", 0, (int) M_SWC0_AB, INSN_MACRO, 0, I1, 0, IOCT|IOCTP|IOCT2|I37 },
{"swc1", "T,o(b)", 0xe4000000, 0xfc000000, RD_1|RD_3|SM|FP_S, 0, I1, 0, 0 },
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
index 247376b..c3e1b13 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
@@ -1,4 +1,4 @@
-From e46202becab625c6c08caf91e08ccbbc1bf799c4 Mon Sep 17 00:00:00 2001
+From 27ec22ca3cd56cfdf060d2e1f414bedce269b322 Mon Sep 17 00:00:00 2001
From: Zhenhua Luo <zhenhua.luo@nxp.com>
Date: Sat, 11 Jun 2016 22:08:29 -0500
Subject: [PATCH 13/15] fix the incorrect assembling for ppc wait mnemonic
@@ -11,10 +11,10 @@
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
-index 426261ab21..0d35916cdd 100644
+index bb17f26c2e..dbdd762b4e 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
-@@ -4881,7 +4881,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
+@@ -5338,7 +5338,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{"ldepx", X(31,29), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}},
{"waitasec", X(31,30), XRTRARB_MASK, POWER8, POWER9, {0}},
@@ -22,7 +22,7 @@
{"lwepx", X(31,31), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}},
-@@ -4935,7 +4934,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
+@@ -5392,7 +5391,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{"waitrsv", X(31,62)|(1<<21), 0xffffffff, E500MC|PPCA2, 0, {0}},
{"waitimpl", X(31,62)|(2<<21), 0xffffffff, E500MC|PPCA2, 0, {0}},
@@ -32,5 +32,5 @@
{"dcbstep", XRT(31,63,0), XRT_MASK, E500MC|PPCA2, 0, {RA0, RB}},
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch
index 42b1065..cf3690f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch
@@ -1,4 +1,4 @@
-From bf20d5823662d1f2eb47de2cdfd173627a205b17 Mon Sep 17 00:00:00 2001
+From 7dfbd6889d868a09d695dd2736104848c1a9c9c3 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 31 Mar 2017 11:42:03 -0700
Subject: [PATCH 14/15] Detect 64-bit MIPS targets
@@ -14,7 +14,7 @@
1 file changed, 14 insertions(+)
diff --git a/gold/configure.tgt b/gold/configure.tgt
-index 3d63027297..c1f92a1360 100644
+index 8aef22a318..7030026ffa 100644
--- a/gold/configure.tgt
+++ b/gold/configure.tgt
@@ -153,6 +153,13 @@ aarch64*-*)
@@ -46,5 +46,5 @@
targ_obj=mips
targ_machine=EM_MIPS
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch
index 2c8900c..8c9fd23 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch
@@ -1,4 +1,4 @@
-From 9b456a0e4f284fd41ac36595144ed44dc82410ee Mon Sep 17 00:00:00 2001
+From 298804f430939d6cc94b09732ee93e64c5e6be18 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Mon, 6 Mar 2017 23:33:27 -0800
Subject: [PATCH 15/15] sync with OE libtool changes
@@ -85,5 +85,5 @@
elif test -n "$runpath_var"; then
case "$finalize_perm_rpath " in
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.29.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.30.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.29.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.30.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison/m4.patch b/import-layers/yocto-poky/meta/recipes-devtools/bison/bison/m4.patch
deleted file mode 100644
index d139da5..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison/m4.patch
+++ /dev/null
@@ -1,414 +0,0 @@
-Upstream-Status: Pending
-
-#
-# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
-#
-
-Index: bison-2.4.2/m4/lcmessage.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/lcmessage.m4
-@@ -0,0 +1,32 @@
-+# lcmessage.m4 serial 3 (gettext-0.11.3)
-+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+dnl
-+dnl This file can can be used in projects which are not available under
-+dnl the GNU General Public License or the GNU Library General Public
-+dnl License but which still want to provide support for the GNU gettext
-+dnl functionality.
-+dnl Please note that the actual code of the GNU gettext library is covered
-+dnl by the GNU Library General Public License, and the rest of the GNU
-+dnl gettext package package is covered by the GNU General Public License.
-+dnl They are *not* in the public domain.
-+
-+dnl Authors:
-+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
-+
-+# Check whether LC_MESSAGES is available in <locale.h>.
-+
-+AC_DEFUN([AM_LC_MESSAGES],
-+[
-+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
-+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
-+ if test $am_cv_val_LC_MESSAGES = yes; then
-+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
-+ [Define if your <locale.h> file defines LC_MESSAGES.])
-+ fi
-+])
-Index: bison-2.4.2/m4/uintmax_t.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/uintmax_t.m4
-@@ -0,0 +1,29 @@
-+# uintmax_t.m4 serial 6 (gettext-0.11)
-+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+AC_PREREQ(2.13)
-+
-+# Define uintmax_t to `unsigned long' or `unsigned long long'
-+# if <inttypes.h> does not exist.
-+
-+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
-+[
-+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
-+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
-+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
-+ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
-+ test $ac_cv_type_unsigned_long_long = yes \
-+ && ac_type='unsigned long long' \
-+ || ac_type='unsigned long'
-+ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
-+ [Define to unsigned long or unsigned long long
-+ if <inttypes.h> and <stdint.h> don't define.])
-+ fi
-+])
-Index: bison-2.4.2/m4/ulonglong.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/ulonglong.m4
-@@ -0,0 +1,23 @@
-+# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
-+dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
-+[
-+ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
-+ [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
-+ [unsigned long long ullmax = (unsigned long long) -1;
-+ return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
-+ ac_cv_type_unsigned_long_long=yes,
-+ ac_cv_type_unsigned_long_long=no)])
-+ if test $ac_cv_type_unsigned_long_long = yes; then
-+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
-+ [Define if you have the unsigned long long type.])
-+ fi
-+])
-Index: bison-2.4.2/m4/intdiv0.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/intdiv0.m4
-@@ -0,0 +1,72 @@
-+# intdiv0.m4 serial 1 (gettext-0.11.3)
-+dnl Copyright (C) 2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+
-+AC_DEFUN([gt_INTDIV0],
-+[
-+ AC_REQUIRE([AC_PROG_CC])dnl
-+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
-+
-+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
-+ gt_cv_int_divbyzero_sigfpe,
-+ [
-+ AC_TRY_RUN([
-+#include <stdlib.h>
-+#include <signal.h>
-+
-+static void
-+#ifdef __cplusplus
-+sigfpe_handler (int sig)
-+#else
-+sigfpe_handler (sig) int sig;
-+#endif
-+{
-+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
-+ exit (sig != SIGFPE);
-+}
-+
-+int x = 1;
-+int y = 0;
-+int z;
-+int nan;
-+
-+int main ()
-+{
-+ signal (SIGFPE, sigfpe_handler);
-+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
-+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
-+ signal (SIGTRAP, sigfpe_handler);
-+#endif
-+/* Linux/SPARC yields signal SIGILL. */
-+#if defined (__sparc__) && defined (__linux__)
-+ signal (SIGILL, sigfpe_handler);
-+#endif
-+
-+ z = x / y;
-+ nan = y / y;
-+ exit (1);
-+}
-+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
-+ [
-+ # Guess based on the CPU.
-+ case "$host_cpu" in
-+ alpha* | i[34567]86 | m68k | s390*)
-+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
-+ *)
-+ gt_cv_int_divbyzero_sigfpe="guessing no";;
-+ esac
-+ ])
-+ ])
-+ case "$gt_cv_int_divbyzero_sigfpe" in
-+ *yes) value=1;;
-+ *) value=0;;
-+ esac
-+ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
-+ [Define if integer division by zero raises signal SIGFPE.])
-+])
-Index: bison-2.4.2/m4/glib.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/glib.m4
-@@ -0,0 +1,196 @@
-+# Configure paths for GLIB
-+# Owen Taylor 97-11-3
-+
-+dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
-+dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
-+dnl gthread is specified in MODULES, pass to glib-config
-+dnl
-+AC_DEFUN(AM_PATH_GLIB,
-+[dnl
-+dnl Get the cflags and libraries from the glib-config script
-+dnl
-+AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
-+ glib_config_prefix="$withval", glib_config_prefix="")
-+AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
-+ glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
-+AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
-+ , enable_glibtest=yes)
-+
-+ if test x$glib_config_exec_prefix != x ; then
-+ glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
-+ if test x${GLIB_CONFIG+set} != xset ; then
-+ GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
-+ fi
-+ fi
-+ if test x$glib_config_prefix != x ; then
-+ glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
-+ if test x${GLIB_CONFIG+set} != xset ; then
-+ GLIB_CONFIG=$glib_config_prefix/bin/glib-config
-+ fi
-+ fi
-+
-+ for module in . $4
-+ do
-+ case "$module" in
-+ gmodule)
-+ glib_config_args="$glib_config_args gmodule"
-+ ;;
-+ gthread)
-+ glib_config_args="$glib_config_args gthread"
-+ ;;
-+ esac
-+ done
-+
-+ AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
-+ min_glib_version=ifelse([$1], ,0.99.7,$1)
-+ AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
-+ no_glib=""
-+ if test "$GLIB_CONFIG" = "no" ; then
-+ no_glib=yes
-+ else
-+ GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
-+ GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
-+ glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
-+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-+ glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
-+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-+ glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
-+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-+ if test "x$enable_glibtest" = "xyes" ; then
-+ ac_save_CFLAGS="$CFLAGS"
-+ ac_save_LIBS="$LIBS"
-+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
-+ LIBS="$GLIB_LIBS $LIBS"
-+dnl
-+dnl Now check if the installed GLIB is sufficiently new. (Also sanity
-+dnl checks the results of glib-config to some extent
-+dnl
-+ rm -f conf.glibtest
-+ AC_TRY_RUN([
-+#include <glib.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+
-+int
-+main ()
-+{
-+ int major, minor, micro;
-+ char *tmp_version;
-+
-+ system ("touch conf.glibtest");
-+
-+ /* HP/UX 9 (%@#!) writes to sscanf strings */
-+ tmp_version = g_strdup("$min_glib_version");
-+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
-+ printf("%s, bad version string\n", "$min_glib_version");
-+ exit(1);
-+ }
-+
-+ if ((glib_major_version != $glib_config_major_version) ||
-+ (glib_minor_version != $glib_config_minor_version) ||
-+ (glib_micro_version != $glib_config_micro_version))
-+ {
-+ printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
-+ $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
-+ glib_major_version, glib_minor_version, glib_micro_version);
-+ printf ("*** was found! If glib-config was correct, then it is best\n");
-+ printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
-+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
-+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
-+ printf("*** required on your system.\n");
-+ printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
-+ printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
-+ printf("*** before re-running configure\n");
-+ }
-+ else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
-+ (glib_minor_version != GLIB_MINOR_VERSION) ||
-+ (glib_micro_version != GLIB_MICRO_VERSION))
-+ {
-+ printf("*** GLIB header files (version %d.%d.%d) do not match\n",
-+ GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
-+ printf("*** library (version %d.%d.%d)\n",
-+ glib_major_version, glib_minor_version, glib_micro_version);
-+ }
-+ else
-+ {
-+ if ((glib_major_version > major) ||
-+ ((glib_major_version == major) && (glib_minor_version > minor)) ||
-+ ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
-+ {
-+ return 0;
-+ }
-+ else
-+ {
-+ printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
-+ glib_major_version, glib_minor_version, glib_micro_version);
-+ printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
-+ major, minor, micro);
-+ printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
-+ printf("***\n");
-+ printf("*** If you have already installed a sufficiently new version, this error\n");
-+ printf("*** probably means that the wrong copy of the glib-config shell script is\n");
-+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
-+ printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
-+ printf("*** correct copy of glib-config. (In this case, you will have to\n");
-+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
-+ printf("*** so that the correct libraries are found at run-time))\n");
-+ }
-+ }
-+ return 1;
-+}
-+],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
-+ CFLAGS="$ac_save_CFLAGS"
-+ LIBS="$ac_save_LIBS"
-+ fi
-+ fi
-+ if test "x$no_glib" = x ; then
-+ AC_MSG_RESULT(yes)
-+ ifelse([$2], , :, [$2])
-+ else
-+ AC_MSG_RESULT(no)
-+ if test "$GLIB_CONFIG" = "no" ; then
-+ echo "*** The glib-config script installed by GLIB could not be found"
-+ echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
-+ echo "*** your path, or set the GLIB_CONFIG environment variable to the"
-+ echo "*** full path to glib-config."
-+ else
-+ if test -f conf.glibtest ; then
-+ :
-+ else
-+ echo "*** Could not run GLIB test program, checking why..."
-+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
-+ LIBS="$LIBS $GLIB_LIBS"
-+ AC_TRY_LINK([
-+#include <glib.h>
-+#include <stdio.h>
-+], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
-+ [ echo "*** The test program compiled, but did not run. This usually means"
-+ echo "*** that the run-time linker is not finding GLIB or finding the wrong"
-+ echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
-+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
-+ echo "*** is required on your system"
-+ echo "***"
-+ echo "*** If you have an old version installed, it is best to remove it, although"
-+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
-+ echo "***"
-+ echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
-+ echo "*** came with the system with the command"
-+ echo "***"
-+ echo "*** rpm --erase --nodeps gtk gtk-devel" ],
-+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
-+ echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
-+ echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
-+ echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
-+ CFLAGS="$ac_save_CFLAGS"
-+ LIBS="$ac_save_LIBS"
-+ fi
-+ fi
-+ GLIB_CFLAGS=""
-+ GLIB_LIBS=""
-+ ifelse([$3], , :, [$3])
-+ fi
-+ AC_SUBST(GLIB_CFLAGS)
-+ AC_SUBST(GLIB_LIBS)
-+ rm -f conf.glibtest
-+])
-Index: bison-2.4.2/m4/isc-posix.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/isc-posix.m4
-@@ -0,0 +1,26 @@
-+# isc-posix.m4 serial 2 (gettext-0.11.2)
-+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
-+
-+# This test replaces the one in autoconf.
-+# Currently this macro should have the same name as the autoconf macro
-+# because gettext's gettext.m4 (distributed in the automake package)
-+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
-+# give these diagnostics:
-+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
-+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
-+
-+undefine([AC_ISC_POSIX])
-+
-+AC_DEFUN([AC_ISC_POSIX],
-+ [
-+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
-+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
-+ ]
-+)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb
index 7d066be..58728f5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb
@@ -10,7 +10,6 @@
DEPENDS = "bison-native flex-native"
SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.xz \
- file://m4.patch \
file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
file://dont-depend-on-help2man.patch.patch \
file://0001-src-local.mk-fix-parallel-issue.patch \
@@ -23,9 +22,9 @@
SRC_URI[md5sum] = "c342201de104cc9ce0a21e0ad10d4021"
SRC_URI[sha256sum] = "a72428c7917bdf9fa93cb8181c971b6e22834125848cf1d03ce10b1bb0716fe1"
-DEPENDS_class-native = "gettext-minimal-native"
-
inherit autotools gettext texinfo
+
+# The automatic m4 path detection gets confused, so force the right value
acpaths = "-I ${S}/m4"
do_compile_prepend() {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
index a310135..b3c889b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
@@ -90,7 +90,7 @@
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
-SRC_URI = "git://github.com/mmeeks/bootchart.git \
+SRC_URI = "git://github.com/xrmx/bootchart.git \
file://bootchartd_stop.sh \
file://0001-Fixed-Missing-default-value-for-BOOTLOG_DEST.patch \
file://0001-collector-Allocate-space-on-heap-for-chunks.patch \
@@ -139,7 +139,7 @@
PACKAGES =+ "pybootchartgui"
FILES_pybootchartgui += "${PYTHON_SITEPACKAGES_DIR}/pybootchartgui ${bindir}/pybootchartgui"
-RDEPENDS_pybootchartgui = "python3-pycairo python3-compression python3-image python3-textutils python3-shell python3-compression python3-codecs"
+RDEPENDS_pybootchartgui = "python3-pycairo python3-compression python3-image python3-shell python3-compression python3-codecs"
RDEPENDS_${PN}_class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}"
RDEPENDS_${PN}_class-target += "lsb"
DEPENDS_append_class-native = " python3-pycairo-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch
new file mode 100644
index 0000000..790676b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch
@@ -0,0 +1,26 @@
+From bc35c4caebb57cc8b96c30c25432b12ca8dc18d5 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 6 Oct 2017 15:03:49 +0300
+Subject: [PATCH] Fix build with musl (missing header include for dev_t).
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ convert/source-fs.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/convert/source-fs.h b/convert/source-fs.h
+index 23f3356..6fd770f 100644
+--- a/convert/source-fs.h
++++ b/convert/source-fs.h
+@@ -20,6 +20,7 @@
+ #include "kerncompat.h"
+ #include <linux/kdev_t.h>
+ #include <pthread.h>
++#include <sys/types.h>
+
+ #define CONV_IMAGE_SUBVOL_OBJECTID BTRFS_FIRST_FREE_OBJECTID
+
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch
index a81900e..467de32 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch
@@ -12,19 +12,16 @@
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/Makefile b/Makefile
-index b3e2b63..347aaf1 100644
---- a/Makefile
-+++ b/Makefile
-@@ -323,7 +323,7 @@ version.h: version.sh version.h.in configure.ac
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -343,7 +343,7 @@ version.h: version.sh version.h.in confi
mktables: kernel-lib/mktables.c
@echo " [CC] $@"
- $(Q)$(CC) $(CFLAGS) $< -o $@
+ $(Q)$(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
- kernel-lib/tables.c: mktables
- @echo " [TABLE] $@"
---
-2.13.2
-
+ # the target can be regenerated manually using mktables, but a local copy is
+ # kept so the build process is simpler
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb
deleted file mode 100644
index c3cc89c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Checksumming Copy on Write Filesystem utilities"
-DESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \
-implementing advanced features while focusing on fault tolerance, repair and \
-easy administration. \
-This package contains utilities (mkfs, fsck, btrfsctl) used to work with \
-btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3."
-
-HOMEPAGE = "https://btrfs.wiki.kernel.org"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
-SECTION = "base"
-DEPENDS = "util-linux attr e2fsprogs lzo acl"
-DEPENDS_append_class-target = " udev"
-RDEPENDS_${PN} = "libgcc"
-
-SRCREV = "0607132c3200bcead1426e6dc685432008de95de"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
- file://0001-Makefile-build-mktables-using-native-gcc.patch \
- "
-
-inherit autotools-brokensep pkgconfig manpages
-
-PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native"
-EXTRA_OECONF_append_libc-musl = " --disable-backtrace "
-
-do_configure_prepend() {
- # Upstream doesn't ship this and autoreconf won't install it as automake isn't used.
- mkdir -p ${S}/config
- cp -f $(automake --print-libdir)/install-sh ${S}/config/
-}
-
-S = "${WORKDIR}/git"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.13.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.13.3.bb
new file mode 100644
index 0000000..bc157e2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.13.3.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Checksumming Copy on Write Filesystem utilities"
+DESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \
+implementing advanced features while focusing on fault tolerance, repair and \
+easy administration. \
+This package contains utilities (mkfs, fsck, btrfsctl) used to work with \
+btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3."
+
+HOMEPAGE = "https://btrfs.wiki.kernel.org"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
+SECTION = "base"
+DEPENDS = "util-linux attr e2fsprogs lzo acl"
+DEPENDS_append_class-target = " udev"
+RDEPENDS_${PN} = "libgcc"
+
+SRCREV = "a7a1ea0f4f2a1d6eeeb3d106e062c7f1034f16d4"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
+ file://0001-Makefile-build-mktables-using-native-gcc.patch \
+ file://0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch \
+ "
+
+RECIPE_NO_UPDATE_REASON = "Waiting for resolution of https://github.com/kdave/btrfs-progs/issues/109"
+inherit autotools-brokensep pkgconfig manpages
+
+CLEANBROKEN = "1"
+
+PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native"
+EXTRA_OECONF_append_libc-musl = " --disable-backtrace "
+
+do_configure_prepend() {
+ # Upstream doesn't ship this and autoreconf won't install it as automake isn't used.
+ mkdir -p ${S}/config
+ cp -f $(automake --print-libdir)/install-sh ${S}/config/
+}
+
+S = "${WORKDIR}/git"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb
index 84d04cf..efcf6b6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb
@@ -22,7 +22,7 @@
SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a"
PE = "1"
PV = "2015.02.10+git${SRCPV}"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.4.bb
deleted file mode 100644
index 1e535b1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.4.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require ccache.inc
-
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7fe21f9470f2305e95e7d8a632255079"
-
-SRC_URI[md5sum] = "95ab3c56284129cc2a32460c23069516"
-SRC_URI[sha256sum] = "24f15bf389e38c41548c9c259532187774ec0cb9686c3497bbb75504c8dc404f"
-
-SRC_URI += " \
- file://0002-dev.mk.in-fix-file-name-too-long.patch \
- file://Revert-Create-man-page-in-the-make-install-from-git-.patch \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.5.bb
new file mode 100644
index 0000000..929f0f1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.5.bb
@@ -0,0 +1,12 @@
+require ccache.inc
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=dae379a85bb6e9d594773e0aa64876f6"
+
+SRC_URI[md5sum] = "eee58db7cce892febddb989308dc568f"
+SRC_URI[sha256sum] = "190576a6e938760ec8113523e6fd380141117303e90766cc4802e770422b30c6"
+
+SRC_URI += " \
+ file://0002-dev.mk.in-fix-file-name-too-long.patch \
+ file://Revert-Create-man-page-in-the-make-install-from-git-.patch \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch b/import-layers/yocto-poky/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch
index 837cfad..3f01c69 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch
@@ -14,10 +14,10 @@
dev.mk.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/dev.mk.in b/dev.mk.in
-index 1261ad3..ec55ac4 100644
---- a/dev.mk.in
-+++ b/dev.mk.in
+Index: ccache-3.3.4/dev.mk.in
+===================================================================
+--- ccache-3.3.4.orig/dev.mk.in
++++ ccache-3.3.4/dev.mk.in
@@ -1,7 +1,7 @@
# GNU make syntax reigns in this file.
@@ -26,7 +26,4 @@
+all_cppflags += -MD -MP -MF .deps/$(subst .._,,$(subst /,_,$(subst $(srcdir)/,,$<))).d
ASCIIDOC = asciidoc
- GPERF = gperf
---
-1.7.9.5
-
+ CPPCHECK = cppcheck
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb b/import-layers/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
index 0e0be62..78e1565 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
@@ -8,6 +8,7 @@
LIC_FILES_CHKSUM = "file://COPYING;md5=32f68170be424c2cd64804337726b312"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/cdrtools/cdrtools-${REALPV}.tar.bz2"
+UPSTREAM_VERSION_UNKNOWN = "1"
SRC_URI[md5sum] = "7d45c5b7e1f78d85d1583b361aee6e8b"
SRC_URI[sha256sum] = "ed282eb6276c4154ce6a0b5dee0bdb81940d0cbbfc7d03f769c4735ef5f5860f"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.8.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.10.3.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.8.2.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.10.3.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc
index 6aeb25f..394c9eb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc
@@ -6,41 +6,23 @@
BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php"
SECTION = "console/utils"
LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://Copyright.txt;md5=8d8c7bc32f8797d23f5cf605d9339d2d \
- file://Source/cmake.h;beginline=1;endline=3;md5=4494dee184212fc89c469c3acd555a14"
+LIC_FILES_CHKSUM = "file://Copyright.txt;md5=79b5b78197c74d5c5f9c7ccadeee4e8c \
+ file://Source/cmake.h;md5=4494dee184212fc89c469c3acd555a14;beginline=1;endline=3 \
+ "
CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
file://support-oe-qt4-tools-names.patch \
file://qt4-fail-silent.patch \
- file://0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch \
+ file://cmake-Prevent-the-detection-of-Qt5.patch \
+ file://0001-FindBoost-Boost-1.66.0-dependency-and-release-update.patch \
+ file://0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch \
+ file://0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch \
+ file://0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch \
"
-SRC_URI[md5sum] = "b5dff61f6a7f1305271ab3f6ae261419"
-SRC_URI[sha256sum] = "da3072794eb4c09f2d782fcee043847b99bb4cf8d4573978d9b2024214d6e92d"
+SRC_URI[md5sum] = "1c38c67295ca696aeafd8c059d748b38"
+SRC_URI[sha256sum] = "0c3a1dcf0be03e40cf4f341dda79c96ffb6c35ae35f2f911845b72dab3559cf8"
UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
-
-# Ugly hack to work around undefined OE_QMAKE_PATH_EXTERNAL_HOST_BINS variable
-# and possibly missing qmake binary (qtbase-native can be removed from sysroot
-# e.g. in order to upgrade it, even when there is target qtbase)
-
-# Fixes errors like this in cmake(-native).do_configure:
-#| -- Performing Test run_pic_test - Success
-#| CMake Error at tmp-eglibc/sysroots/qemuarm/usr/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:27 (message):
-#| The imported target "Qt5::Core" references the file
-#|
-#| "/qmake"
-#|
-#| but this file does not exist. Possible reasons include:
-
-do_configure_prepend() {
- sed -i 's/^find_package(Qt5Core QUIET)$/#find_package(Qt5Core QUIET)/g' ${S}/Tests/RunCMake/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Core REQUIRED)/# find_package(Qt5Core REQUIRED)/g' ${S}/Tests/Qt4And5Automoc/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Widgets QUIET NO_MODULE)/# find_package(Qt5Widgets QUIET NO_MODULE)/g' ${S}/Tests/CMakeLists.txt
- sed -i 's/^find_package(Qt5Widgets QUIET)/#find_package(Qt5Widgets QUIET)/g' ${S}/Source/QtDialog/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Widgets REQUIRED)/# find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutoUicInterface/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Widgets REQUIRED)/# find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutogen/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Core REQUIRED)/# find_package(Qt5Core REQUIRED)/g' ${S}/Tests/QtAutogen/autorcc_depends/CMakeLists.txt
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Boost-1.66.0-dependency-and-release-update.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Boost-1.66.0-dependency-and-release-update.patch
new file mode 100644
index 0000000..fda60e3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Boost-1.66.0-dependency-and-release-update.patch
@@ -0,0 +1,52 @@
+From 433a2d495a2481c63b82c11a30f7c642d6abe63f Mon Sep 17 00:00:00 2001
+From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com>
+Date: Fri, 29 Dec 2017 19:55:49 +1100
+Subject: [PATCH] FindBoost: Boost 1.66.0 dependency and release update
+
+Release notes: http://www.boost.org/users/history/version_1_66_0.html
+
+* All new libraries are header-only.
+* _Boost_COMPONENT_DEPENDENCIES is unchanged from 1.65.1
+* _Boost_FIBER_COMPILER_FEATURES is unchanged from 1.64.0
+
+Upstream-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -797,7 +797,7 @@ function(_Boost_COMPONENT_DEPENDENCIES c
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ endif()
+- if(NOT Boost_VERSION VERSION_LESS 106600)
++ if(NOT Boost_VERSION VERSION_LESS 106700)
+ message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
+ set(_Boost_IMPORTED_TARGETS FALSE)
+ endif()
+@@ -931,8 +931,8 @@ endfunction()
+ # `${Boost_ROOT}/libs/fiber/build/Jamfile.v2`.
+ #
+ function(_Boost_COMPILER_FEATURES component _ret)
+- # Boost >= 1.62 and < 1.65
+- if(NOT Boost_VERSION VERSION_LESS 106200 AND Boost_VERSION VERSION_LESS 106500)
++ # Boost >= 1.62 and < 1.67
++ if(NOT Boost_VERSION VERSION_LESS 106200 AND Boost_VERSION VERSION_LESS 106700)
+ set(_Boost_FIBER_COMPILER_FEATURES
+ cxx_alias_templates
+ cxx_auto_type
+@@ -1038,7 +1038,7 @@ else()
+ # _Boost_COMPONENT_HEADERS. See the instructions at the top of
+ # _Boost_COMPONENT_DEPENDENCIES.
+ set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
+- "1.65.1" "1.65.0" "1.65"
++ "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
+ "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
+ "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55"
+ "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch
new file mode 100644
index 0000000..a45eda5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch
@@ -0,0 +1,29 @@
+From b1e9f67137733bc109d355450fcd06edda4784c5 Mon Sep 17 00:00:00 2001
+From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com>
+Date: Fri, 29 Dec 2017 20:07:31 +1100
+Subject: [PATCH 1/6] FindBoost: Fix incorrect alphabetisation of headers list
+
+Affects cmake < 3.11.0
+
+Upsteam-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -831,8 +831,8 @@ function(_Boost_COMPONENT_HEADERS compon
+ set(_Boost_CONTAINER_HEADERS "boost/container/container_fwd.hpp")
+ set(_Boost_CONTEXT_HEADERS "boost/context/all.hpp")
+ set(_Boost_COROUTINE_HEADERS "boost/coroutine/all.hpp")
+- set(_Boost_EXCEPTION_HEADERS "boost/exception/exception.hpp")
+ set(_Boost_DATE_TIME_HEADERS "boost/date_time/date.hpp")
++ set(_Boost_EXCEPTION_HEADERS "boost/exception/exception.hpp")
+ set(_Boost_FIBER_HEADERS "boost/fiber/all.hpp")
+ set(_Boost_FILESYSTEM_HEADERS "boost/filesystem/path.hpp")
+ set(_Boost_GRAPH_HEADERS "boost/graph/adjacency_list.hpp")
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch
deleted file mode 100644
index 9b820db..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 46d25e782ebd9b6c50771b6f30433c58fae03a51 Mon Sep 17 00:00:00 2001
-From: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
-Date: Mon, 26 Jun 2017 11:30:07 -0400
-Subject: [PATCH] cmake: Use find_program if find_host_program is not
- available
-
-CMake does not define the `find_host_program` command we've been using
-in the cross-compiling code path. It was provided by a widely used
-Android toolchain file. For compatibility, continue to use
-`find_host_program` if available, but otherwise use just `find_program`.
-
-Upstream-Status: Accepted
-[https://gitlab.kitware.com/cmake/cmake/merge_requests/1009]
- - Will be in 3.10
-
-Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
----
- Modules/FindCUDA.cmake | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
-index a4dca54..77ca351 100644
---- a/Modules/FindCUDA.cmake
-+++ b/Modules/FindCUDA.cmake
-@@ -679,7 +679,11 @@ if(CMAKE_CROSSCOMPILING)
- # add known CUDA targetr root path to the set of directories we search for programs, libraries and headers
- set( CMAKE_FIND_ROOT_PATH "${CUDA_TOOLKIT_TARGET_DIR};${CMAKE_FIND_ROOT_PATH}")
- macro( cuda_find_host_program )
-- find_host_program( ${ARGN} )
-+ if (COMMAND find_host_program)
-+ find_host_program( ${ARGN} )
-+ else()
-+ find_program( ${ARGN} )
-+ endif()
- endmacro()
- else()
- # for non-cross-compile, find_host_program == find_program and CUDA_TOOLKIT_TARGET_DIR == CUDA_TOOLKIT_ROOT_DIR
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch
new file mode 100644
index 0000000..88301c6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch
@@ -0,0 +1,132 @@
+From b044f69a413123f15a05034c00a8e3763764a1e5 Mon Sep 17 00:00:00 2001
+From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com>
+Date: Fri, 29 Dec 2017 21:50:54 +1100
+Subject: [PATCH 2/6] FindBoost: Implement "Architecture and Address Model" tag
+
+This tag is new in Boost 1.66.0, and is present in the 'versioned'
+library file name layout.
+
+Affects cmake < 3.11.0
+
+Upsteam-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 52 +++++++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 42 insertions(+), 10 deletions(-)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -1385,8 +1385,11 @@ if(Boost_DEBUG)
+ endif()
+
+ #======================
+-# Systematically build up the Boost ABI tag
+-# http://boost.org/doc/libs/1_41_0/more/getting_started/windows.html#library-naming
++# Systematically build up the Boost ABI tag for the 'tagged' and 'versioned' layouts
++# http://boost.org/doc/libs/1_66_0/more/getting_started/windows.html#library-naming
++# http://boost.org/doc/libs/1_66_0/boost/config/auto_link.hpp
++# http://boost.org/doc/libs/1_66_0/tools/build/src/tools/common.jam
++# http://boost.org/doc/libs/1_66_0/boostcpp.jam
+ set( _boost_RELEASE_ABI_TAG "-")
+ set( _boost_DEBUG_ABI_TAG "-")
+ # Key Use this library when:
+@@ -1418,11 +1421,40 @@ if(Boost_USE_STLPORT)
+ string(APPEND _boost_DEBUG_ABI_TAG "p")
+ endif()
+ # n using the STLport deprecated "native iostreams" feature
++# removed from the documentation in 1.43.0 but still present in
++# boost/config/auto_link.hpp
+ if(Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS)
+ string(APPEND _boost_RELEASE_ABI_TAG "n")
+ string(APPEND _boost_DEBUG_ABI_TAG "n")
+ endif()
+
++# -x86 Architecture and address model tag
++# First character is the architecture, then word-size, either 32 or 64
++# Only used in 'versioned' layout, added in Boost 1.66.0
++set(_boost_ARCHITECTURE_TAG "")
++# {CMAKE_CXX_COMPILER_ARCHITECTURE_ID} is not currently set for all compilers
++if(NOT "x${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "x" AND NOT Boost_VERSION VERSION_LESS 106600)
++ string(APPEND _boost_ARCHITECTURE_TAG "-")
++ # This needs to be kept in-sync with the section of CMakePlatformId.h.in
++ # inside 'defined(_WIN32) && defined(_MSC_VER)'
++ if(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "IA64")
++ string(APPEND _boost_ARCHITECTURE_TAG "i")
++ elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "X86"
++ OR ${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "x64")
++ string(APPEND _boost_ARCHITECTURE_TAG "x")
++ elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} MATCHES "^ARM")
++ string(APPEND _boost_ARCHITECTURE_TAG "a")
++ elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "MIPS")
++ string(APPEND _boost_ARCHITECTURE_TAG "m")
++ endif()
++
++ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
++ string(APPEND _boost_ARCHITECTURE_TAG "64")
++ else()
++ string(APPEND _boost_ARCHITECTURE_TAG "32")
++ endif()
++endif()
++
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "_boost_RELEASE_ABI_TAG = ${_boost_RELEASE_ABI_TAG}")
+@@ -1616,22 +1648,22 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT
+ unset(_boost_RELEASE_NAMES)
+ foreach(compiler IN LISTS _boost_COMPILER)
+ list(APPEND _boost_RELEASE_NAMES
+- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} )
+ endforeach()
+ list(APPEND _boost_RELEASE_NAMES
+- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} )
+ if(_boost_STATIC_RUNTIME_WORKAROUND)
+ set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}")
+ foreach(compiler IN LISTS _boost_COMPILER)
+ list(APPEND _boost_RELEASE_NAMES
+- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+ endforeach()
+ list(APPEND _boost_RELEASE_NAMES
+- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+ endif()
+ if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
+@@ -1666,11 +1698,11 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT
+ unset(_boost_DEBUG_NAMES)
+ foreach(compiler IN LISTS _boost_COMPILER)
+ list(APPEND _boost_DEBUG_NAMES
+- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} )
+ endforeach()
+ list(APPEND _boost_DEBUG_NAMES
+- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} )
+@@ -1678,11 +1710,11 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT
+ set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}")
+ foreach(compiler IN LISTS _boost_COMPILER)
+ list(APPEND _boost_DEBUG_NAMES
+- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+ endforeach()
+ list(APPEND _boost_DEBUG_NAMES
+- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+ endif()
+ if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch
new file mode 100644
index 0000000..5178f5c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch
@@ -0,0 +1,31 @@
+From d56deff7d127b030739bd0034609d0046121d8cd Mon Sep 17 00:00:00 2001
+From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com>
+Date: Fri, 29 Dec 2017 22:38:36 +1100
+Subject: [PATCH 3/6] FindBoost: Search for upstream-packaged libs next to
+ includes
+
+Upstream packages Boost binaries for Windows with the 'boost' directory
+(the INCLUDE_DIR) next to the lib-... directory (the LIBRARY_DIR).
+
+Affects cmake < 3.11.0
+
+Upsteam-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -1502,6 +1502,7 @@ foreach(c DEBUG RELEASE)
+ ${Boost_INCLUDE_DIR}/stage/lib
+ )
+ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${Boost_INCLUDE_DIR}/..")
++ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${Boost_INCLUDE_DIR}")
+ if( Boost_NO_SYSTEM_PATHS )
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH)
+ else()
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/cmake-Prevent-the-detection-of-Qt5.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/cmake-Prevent-the-detection-of-Qt5.patch
new file mode 100644
index 0000000..88b7e94
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/cmake-Prevent-the-detection-of-Qt5.patch
@@ -0,0 +1,215 @@
+From 875c11dbf87d1258ad7d3697a40d605d503e5673 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Wed, 17 Jan 2018 10:02:14 -0200
+Subject: [PATCH] cmake: Prevent the detection of Qt5
+Organization: O.S. Systems Software LTDA.
+
+CMake doesn't have dependency on qt4/qt5, so these tests usually fail
+but still can cause undeterministic results or build failures (when
+OE_QMAKE_PATH_EXTERNAL_HOST_BINS is undefined or native qmake removed
+while running the test in cmake)
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ Source/QtDialog/CMakeLists.txt | 2 +-
+ Tests/CMakeLists.txt | 2 +-
+ Tests/Qt4And5Automoc/CMakeLists.txt | 4 ++--
+ Tests/QtAutoUicInterface/CMakeLists.txt | 2 +-
+ Tests/QtAutogen/CMakeLists.txt | 2 +-
+ Tests/QtAutogen/macosFW/CMakeLists.txt | 2 +-
+ Tests/QtAutogen/mocDepends/CMakeLists.txt | 2 +-
+ Tests/QtAutogenRerun/CMakeLists.txt | 4 ++--
+ Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt | 2 +-
+ Tests/QtAutogenRerun/mocRerun/CMakeLists.txt | 2 +-
+ Tests/QtAutogenRerun/rccDepends/CMakeLists.txt | 2 +-
+ Tests/RunCMake/CMakeLists.txt | 2 +-
+ Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake | 2 +-
+ 13 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
+index b38797bca..b5fbfc5fa 100644
+--- a/Source/QtDialog/CMakeLists.txt
++++ b/Source/QtDialog/CMakeLists.txt
+@@ -6,7 +6,7 @@ if(POLICY CMP0020)
+ cmake_policy(SET CMP0020 NEW) # Drop when CMake >= 2.8.11 required
+ endif()
+ CMake_OPTIONAL_COMPONENT(cmake-gui)
+-find_package(Qt5Widgets QUIET)
++#find_package(Qt5Widgets QUIET)
+ if (Qt5Widgets_FOUND)
+ include_directories(${Qt5Widgets_INCLUDE_DIRS})
+ add_definitions(${Qt5Widgets_DEFINITONS})
+diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
+index 533788a44..32ef03c55 100644
+--- a/Tests/CMakeLists.txt
++++ b/Tests/CMakeLists.txt
+@@ -1260,7 +1260,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
+ set(CMake_TEST_Qt5 1)
+ endif()
+ if(CMake_TEST_Qt5)
+- find_package(Qt5Widgets QUIET NO_MODULE)
++ #find_package(Qt5Widgets QUIET NO_MODULE)
+ endif()
+ if(CMake_TEST_Qt5 AND Qt5Widgets_FOUND)
+ add_test(NAME Qt5Autogen COMMAND ${CMAKE_CTEST_COMMAND}
+diff --git a/Tests/Qt4And5Automoc/CMakeLists.txt b/Tests/Qt4And5Automoc/CMakeLists.txt
+index ad74961d9..a9dd74b15 100644
+--- a/Tests/Qt4And5Automoc/CMakeLists.txt
++++ b/Tests/Qt4And5Automoc/CMakeLists.txt
+@@ -3,11 +3,11 @@ cmake_minimum_required(VERSION 2.8.12)
+ project(Qt4And5Automoc)
+
+ if (QT_REVERSE_FIND_ORDER)
+- find_package(Qt5Core REQUIRED)
++ #find_package(Qt5Core REQUIRED)
+ find_package(Qt4 REQUIRED)
+ else()
+ find_package(Qt4 REQUIRED)
+- find_package(Qt5Core REQUIRED)
++ #find_package(Qt5Core REQUIRED)
+ endif()
+
+ set(CMAKE_AUTOMOC ON)
+diff --git a/Tests/QtAutoUicInterface/CMakeLists.txt b/Tests/QtAutoUicInterface/CMakeLists.txt
+index a5c2d99b2..2d640e4a3 100644
+--- a/Tests/QtAutoUicInterface/CMakeLists.txt
++++ b/Tests/QtAutoUicInterface/CMakeLists.txt
+@@ -14,7 +14,7 @@ else()
+ if (NOT QT_TEST_VERSION STREQUAL 5)
+ message(SEND_ERROR "Invalid Qt version specified.")
+ endif()
+- find_package(Qt5Widgets REQUIRED)
++ #find_package(Qt5Widgets REQUIRED)
+
+ set(QT_CORE_TARGET Qt5::Core)
+ set(QT_GUI_TARGET Qt5::Widgets)
+diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt
+index dff9d0c66..c6e8fc3f5 100644
+--- a/Tests/QtAutogen/CMakeLists.txt
++++ b/Tests/QtAutogen/CMakeLists.txt
+@@ -23,7 +23,7 @@ else()
+ if (NOT QT_TEST_VERSION STREQUAL 5)
+ message(SEND_ERROR "Invalid Qt version specified.")
+ endif()
+- find_package(Qt5Widgets REQUIRED)
++ #find_package(Qt5Widgets REQUIRED)
+
+ set(QT_QTCORE_TARGET Qt5::Core)
+
+diff --git a/Tests/QtAutogen/macosFW/CMakeLists.txt b/Tests/QtAutogen/macosFW/CMakeLists.txt
+index 114d9bac0..157fe0aaa 100644
+--- a/Tests/QtAutogen/macosFW/CMakeLists.txt
++++ b/Tests/QtAutogen/macosFW/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 3.8)
+ project(macos-fw-test)
+
+-find_package(Qt5Test REQUIRED)
++#find_package(Qt5Test REQUIRED)
+
+ set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output/bin)
+diff --git a/Tests/QtAutogen/mocDepends/CMakeLists.txt b/Tests/QtAutogen/mocDepends/CMakeLists.txt
+index 8217b8dbf..86bb7bc7f 100644
+--- a/Tests/QtAutogen/mocDepends/CMakeLists.txt
++++ b/Tests/QtAutogen/mocDepends/CMakeLists.txt
+@@ -10,7 +10,7 @@ else()
+ message(SEND_ERROR "Invalid Qt version specified.")
+ endif()
+
+- find_package(Qt5Core REQUIRED)
++ #find_package(Qt5Core REQUIRED)
+ set(QT_CORE_TARGET Qt5::Core)
+ endif()
+
+diff --git a/Tests/QtAutogenRerun/CMakeLists.txt b/Tests/QtAutogenRerun/CMakeLists.txt
+index e72c1912e..d7e6884ce 100644
+--- a/Tests/QtAutogenRerun/CMakeLists.txt
++++ b/Tests/QtAutogenRerun/CMakeLists.txt
+@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.9)
+ cmake_policy(SET CMP0071 NEW)
+ project(QtAutogenRerun)
+
+-# Tell find_package(Qt5) where to find Qt.
++# Tell #find_package(Qt5) where to find Qt.
+ if(QT_QMAKE_EXECUTABLE)
+ get_filename_component(Qt_BIN_DIR "${QT_QMAKE_EXECUTABLE}" PATH)
+ get_filename_component(Qt_PREFIX_DIR "${Qt_BIN_DIR}" PATH)
+@@ -23,7 +23,7 @@ else()
+ if (NOT QT_TEST_VERSION STREQUAL 5)
+ message(SEND_ERROR "Invalid Qt version specified.")
+ endif()
+- find_package(Qt5Widgets REQUIRED)
++ #find_package(Qt5Widgets REQUIRED)
+
+ set(QT_QTCORE_TARGET Qt5::Core)
+
+diff --git a/Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt b/Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt
+index b7cc5e9ff..e1d109953 100644
+--- a/Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt
++++ b/Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt
+@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC_DEPEND_FILTERS
+ if (NOT QT_TEST_VERSION STREQUAL 5)
+ message(SEND_ERROR "Invalid Qt version specified.")
+ endif()
+-find_package(Qt5Widgets REQUIRED)
++#find_package(Qt5Widgets REQUIRED)
+
+ if(Qt5_POSITION_INDEPENDENT_CODE AND CMAKE_CXX_COMPILE_OPTIONS_PIC)
+ add_definitions(${CMAKE_CXX_COMPILE_OPTIONS_PIC})
+diff --git a/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt b/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt
+index bafd9cf48..43ec933d2 100644
+--- a/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt
++++ b/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt
+@@ -10,7 +10,7 @@ else()
+ message(SEND_ERROR "Invalid Qt version specified.")
+ endif()
+
+- find_package(Qt5Core REQUIRED)
++ #find_package(Qt5Core REQUIRED)
+ set(QT_CORE_TARGET Qt5::Core)
+ endif()
+
+diff --git a/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt b/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt
+index 291592e7d..40cd52868 100644
+--- a/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt
++++ b/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt
+@@ -9,7 +9,7 @@ else()
+ message(SEND_ERROR "Invalid Qt version specified.")
+ endif()
+
+- find_package(Qt5Core REQUIRED)
++ #find_package(Qt5Core REQUIRED)
+ set(QT_CORE_TARGET Qt5::Core)
+ endif()
+
+diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
+index 29325ff0a..d30d01e78 100644
+--- a/Tests/RunCMake/CMakeLists.txt
++++ b/Tests/RunCMake/CMakeLists.txt
+@@ -274,7 +274,7 @@ add_RunCMake_test(configure_file)
+ add_RunCMake_test(CTestTimeoutAfterMatch)
+
+ find_package(Qt4 QUIET)
+-find_package(Qt5Core QUIET)
++#find_package(Qt5Core QUIET)
+ if (QT4_FOUND AND Qt5Core_FOUND AND NOT Qt5Core_VERSION VERSION_LESS 5.1.0)
+ add_RunCMake_test(IncompatibleQt)
+ endif()
+diff --git a/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake b/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake
+index 4fccdc418..b76e1e531 100644
+--- a/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake
++++ b/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake
+@@ -1,6 +1,6 @@
+
+ find_package(Qt4 REQUIRED)
+-find_package(Qt5Core REQUIRED)
++#find_package(Qt5Core REQUIRED)
+
+ add_executable(mainexe main.cpp)
+ target_link_libraries(mainexe Qt4::QtCore Qt5::Core)
+--
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch
index 15cbca8..6841554 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch
@@ -1,4 +1,7 @@
-cmake: support OpenEmbedded Qt4 tool binary names
+From 10b8b523869124d2fc8cd98d9e028c0bcffd61b1 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Thu, 12 May 2011 15:36:03 +0000
+Subject: [PATCH 1/2] cmake: support OpenEmbedded Qt4 tool binary names
The FindQt4 module looks for Qt4 binaries to be able to gather the
paths used for compilation and also to be using during other processes
@@ -15,15 +18,16 @@
Instead of find_program, _find_qt4_program is now used.
Signed-off-by: Moritz Blume <moritz.blume@bmw-carit.de>
+
---
Modules/FindQt4.cmake | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
-index 11091b5..6704769 100644
+index c67d0be..0cf169b 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
-@@ -522,7 +522,7 @@ endfunction()
+@@ -516,7 +516,7 @@ endfunction()
set(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
@@ -32,7 +36,7 @@
_qt4_find_qmake("${_QT4_QMAKE_NAMES}" QT_QMAKE_EXECUTABLE QTVERSION)
if (QT_QMAKE_EXECUTABLE AND
-@@ -1148,12 +1148,12 @@ if (QT_QMAKE_EXECUTABLE AND
+@@ -1142,12 +1142,12 @@ if (QT_QMAKE_EXECUTABLE AND
_find_qt4_program(QT_MOC_EXECUTABLE Qt4::moc moc-qt4 moc4 moc)
_find_qt4_program(QT_UIC_EXECUTABLE Qt4::uic uic-qt4 uic4 uic)
_find_qt4_program(QT_UIC3_EXECUTABLE Qt4::uic3 uic3)
@@ -50,5 +54,5 @@
_find_qt4_program(QT_LINGUIST_EXECUTABLE Qt4::linguist linguist-qt4 linguist4 linguist)
--
-1.9.1
+2.7.4
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.8.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.10.3.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.8.2.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.10.3.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb
index 7b70daa..1c84fb1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb
@@ -41,6 +41,7 @@
[ -z "${cve_dir}" ] && cve_dir="${DL_DIR}/CVE_CHECK"
[ -z "${cve_file}" ] && cve_file="${TMPDIR}/cve_check"
+ unused="${@bb.utils.export_proxies(d)}"
bbdebug 2 "Updating cve-check-tool database located in $cve_dir"
# --cacert works around curl-native not finding the CA bundle
if cve-check-update --cacert ${sysconfdir}/ssl/certs/ca-certificates.crt -d "$cve_dir" ; then
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb
index e6f159c..6604648 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb
@@ -23,7 +23,6 @@
file://distcc.service"
SRCREV = "d8b18df3e9dcbe4f092bed565835d3975e99432c"
S = "${WORKDIR}/git"
-UPSTREAM_VERSION_UNKNOWN = "1"
inherit autotools pkgconfig update-rc.d useradd systemd
@@ -41,7 +40,9 @@
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "distcc.service"
-do_install_append() {
+do_install() {
+ # Improve reproducibility: compress w/o timestamps
+ oe_runmake 'DESTDIR=${D}' "GZIP_BIN=gzip -n" install
install -d ${D}${sysconfdir}/init.d/
install -d ${D}${sysconfdir}/default
install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch
deleted file mode 100644
index 05f3141..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 166833a88a928a574bf9143b9b65f544be482c77 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 18 Aug 2017 15:55:15 +0300
-Subject: [PATCH] Check conf.releasever instead of releasever
-
-The substitutions may actually set the conf.releasever correctly,
-and so the check should use that instead of the passed-in function
-parameter.
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/dnf/pull/901]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- dnf/cli/cli.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py
-index 2d63420c..167943b8 100644
---- a/dnf/cli/cli.py
-+++ b/dnf/cli/cli.py
-@@ -914,7 +914,7 @@ class Cli(object):
- conf.releasever = releasever
- subst = conf.substitutions
- subst.update_from_etc(conf.installroot)
-- if releasever is None:
-+ if conf.releasever is None:
- logger.warning(_("Unable to detect release version (use '--releasever' to specify "
- "release version)"))
-
---
-2.14.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
index c9df458..6692b41 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
@@ -1,10 +1,11 @@
-From 8ce181714640315d2dd37ee794acbb22063cd669 Mon Sep 17 00:00:00 2001
+From 05e059cd4e9910c00b32d377f4f98e3c8dde6bc6 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 26 Jan 2017 16:36:20 +0200
-Subject: [PATCH] Corretly install tmpfiles.d configuration
+Subject: [PATCH 4/5] Corretly install tmpfiles.d configuration
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
etc/tmpfiles.d/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -17,5 +18,5 @@
-INSTALL (FILES dnf.conf DESTINATION /usr/lib/tmpfiles.d/)
+INSTALL (FILES dnf.conf DESTINATION ${SYSCONFDIR}/tmpfiles.d/)
--
-2.11.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
index 0f261e5..15a7bfc 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
@@ -1,16 +1,17 @@
-From 4313ced1320594013795f11f6db00381e3f4cc45 Mon Sep 17 00:00:00 2001
+From a8ef81c115a45f05dad145c98e10f3c4940e4e29 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 26 Jan 2017 16:25:47 +0200
-Subject: [PATCH] Do not hardcode /etc and systemd unit directories
+Subject: [PATCH 3/5] Do not hardcode /etc and systemd unit directories
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 6a319935..db20ccd4 100644
+index 650b624a..10199618 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,8 +7,8 @@ if (NOT PYTHON_DESIRED)
@@ -25,5 +26,5 @@
if (${PYTHON_DESIRED} STREQUAL "2")
FIND_PACKAGE (PythonInterp REQUIRED)
--
-2.11.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch
deleted file mode 100644
index a90e77c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 31653d324cf8c7b1f2f9e49d22676bd2ac546331 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 11 Jan 2017 15:10:13 +0200
-Subject: [PATCH] Do not prepend installroot to logdir.
-
-This would otherwise write the logs into rootfs/var/log
-(whereas we want them in $T),
-and will break installation of base-files rpm.
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- dnf/cli/cli.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py
-index b764801a..893f4bda 100644
---- a/dnf/cli/cli.py
-+++ b/dnf/cli/cli.py
-@@ -881,7 +881,7 @@ class Cli(object):
- subst = conf.substitutions
- subst.update_from_etc(conf.installroot)
-
-- for opt in ('cachedir', 'logdir', 'persistdir'):
-+ for opt in ('cachedir', 'persistdir'):
- conf.prepend_installroot(opt)
-
- self.base._logging._setup_from_dnf_conf(conf)
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch
new file mode 100644
index 0000000..aa20009
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch
@@ -0,0 +1,31 @@
+From 6365389074a1b86962f3d8b22a2ead2202026a98 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 11 Jan 2017 15:10:13 +0200
+Subject: [PATCH 5/5] Do not prepend installroot to logdir.
+
+This would otherwise write the logs into rootfs/var/log
+(whereas we want them in $T),
+and will break installation of base-files rpm.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ dnf/cli/cli.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py
+index d2d9c082..82270ecf 100644
+--- a/dnf/cli/cli.py
++++ b/dnf/cli/cli.py
+@@ -920,7 +920,7 @@ class Cli(object):
+ logger.warning(_("Unable to detect release version (use '--releasever' to specify "
+ "release version)"))
+
+- for opt in ('cachedir', 'logdir', 'persistdir'):
++ for opt in ('cachedir', 'persistdir'):
+ conf.prepend_installroot(opt)
+
+ self.base._logging._setup_from_dnf_conf(conf)
+--
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
index 8c59f9f..6e01191 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
@@ -1,16 +1,17 @@
-From 3ddaa930cda57a62a2174faebcc87aebc59591d1 Mon Sep 17 00:00:00 2001
+From 7205033e44d8fba1d3b18b490e7eaab82da1ffa3 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 30 Dec 2016 18:29:07 +0200
-Subject: [PATCH 29/30] Do not set PYTHON_INSTALL_DIR by running python
+Subject: [PATCH 1/5] Do not set PYTHON_INSTALL_DIR by running python
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 6a319935..466ca1e6 100644
+index 23e5f889..650b624a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,7 @@ else()
@@ -23,5 +24,5 @@
MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
--
-2.11.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch
index 1abd880..eedbb57 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch
@@ -1,19 +1,20 @@
-From 9c8d545152b35d8943be72b9503414a53e1ebf7c Mon Sep 17 00:00:00 2001
+From 8d97b72a1d77149e2f9048d1ca6cef66da1a8aa5 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 30 Dec 2016 18:29:37 +0200
-Subject: [PATCH 30/30] Run python scripts using env
+Subject: [PATCH 2/5] Run python scripts using env
Otherwise the build tools hardcode the python path into them.
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
bin/dnf-automatic.in | 2 +-
bin/dnf.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/dnf-automatic.in b/bin/dnf-automatic.in
-index 5b06aa26..9f6f703e 100755
+index 5b06aa26..891b4c24 100755
--- a/bin/dnf-automatic.in
+++ b/bin/dnf-automatic.in
@@ -1,4 +1,4 @@
@@ -23,7 +24,7 @@
#
# Copyright (C) 2014-2016 Red Hat, Inc.
diff --git a/bin/dnf.in b/bin/dnf.in
-index 645d0f06..ab141abd 100755
+index 645d0f06..bdf7b3c4 100755
--- a/bin/dnf.in
+++ b/bin/dnf.in
@@ -1,4 +1,4 @@
@@ -33,5 +34,5 @@
#
# Copyright (C) 2012-2016 Red Hat, Inc.
--
-2.11.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb
deleted file mode 100644
index 3ed6a74..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Package manager forked from Yum, using libsolv as a dependency resolver"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://PACKAGE-LICENSING;md5=bfc29916e11321be06924c4fb096fdcc \
- "
-
-SRC_URI = "git://github.com/rpm-software-management/dnf.git \
- file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
- file://0030-Run-python-scripts-using-env.patch \
- file://0001-Do-not-prepend-installroot-to-logdir.patch \
- file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \
- file://0001-Corretly-install-tmpfiles.d-configuration.patch \
- file://0001-Check-conf.releasever-instead-of-releasever.patch \
- "
-
-SRCREV = "be2585183ec4485ee4d5e121f242d8669296f065"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
-
-S = "${WORKDIR}/git"
-
-inherit cmake gettext bash-completion distutils3-base systemd
-
-DEPENDS += "libdnf librepo libcomps python3-iniparse"
-
-# manpages generation requires http://www.sphinx-doc.org/
-EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3"
-
-BBCLASSEXTEND = "native nativesdk"
-RDEPENDS_${PN}_class-target += "python3-core python3-codecs python3-netclient python3-email python3-threading python3-distutils librepo python3-shell python3-subprocess libcomps libdnf python3-sqlite3 python3-compression python3-rpm python3-iniparse python3-json python3-importlib python3-curses python3-argparse python3-misc python3-gpg"
-# Recommend gnupg so that GPG signature check on repository metadata is possible
-RRECOMMENDS_${PN}_class-target += "gnupg"
-
-# Create a symlink called 'dnf' as 'make install' does not do it, but
-# .spec file in dnf source tree does (and then Fedora and dnf documentation
-# says that dnf binary is plain 'dnf').
-do_install_append() {
- lnr ${D}/${bindir}/dnf-3 ${D}/${bindir}/dnf
- lnr ${D}/${bindir}/dnf-automatic-3 ${D}/${bindir}/dnf-automatic
-}
-
-# Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in
-do_install_append_class-native() {
- create_wrapper ${D}/${bindir}/dnf \
- RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
- RPM_NO_CHROOT_FOR_SCRIPTS=1
-}
-
-SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
- dnf-automatic-download.service dnf-automatic-download.timer \
- dnf-automatic-install.service dnf-automatic-install.timer \
- dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.7.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.7.5.bb
new file mode 100644
index 0000000..b88ddb4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.7.5.bb
@@ -0,0 +1,74 @@
+SUMMARY = "Package manager forked from Yum, using libsolv as a dependency resolver"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://PACKAGE-LICENSING;md5=bfc29916e11321be06924c4fb096fdcc \
+ "
+
+SRC_URI = "git://github.com/rpm-software-management/dnf.git \
+ file://0001-Corretly-install-tmpfiles.d-configuration.patch \
+ file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \
+ file://0005-Do-not-prepend-installroot-to-logdir.patch \
+ file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
+ file://0030-Run-python-scripts-using-env.patch \
+ "
+
+SRCREV = "564c44667c7014843fa6f1732621093114ec59b2"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
+
+S = "${WORKDIR}/git"
+
+inherit cmake gettext bash-completion distutils3-base systemd
+
+DEPENDS += "libdnf librepo libcomps python3-iniparse"
+
+# manpages generation requires http://www.sphinx-doc.org/
+EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3"
+
+BBCLASSEXTEND = "native nativesdk"
+
+RDEPENDS_${PN}_class-target += " \
+ python3-core \
+ python3-codecs \
+ python3-netclient \
+ python3-email \
+ python3-threading \
+ python3-distutils \
+ python3-logging \
+ python3-fcntl \
+ librepo \
+ python3-shell \
+ libcomps \
+ libdnf \
+ python3-sqlite3 \
+ python3-compression \
+ python3-rpm \
+ python3-iniparse \
+ python3-json \
+ python3-curses \
+ python3-misc \
+ python3-gpg \
+ "
+
+RRECOMMENDS_${PN}_class-target += "gnupg"
+
+# Create a symlink called 'dnf' as 'make install' does not do it, but
+# .spec file in dnf source tree does (and then Fedora and dnf documentation
+# says that dnf binary is plain 'dnf').
+do_install_append() {
+ lnr ${D}/${bindir}/dnf-3 ${D}/${bindir}/dnf
+ lnr ${D}/${bindir}/dnf-automatic-3 ${D}/${bindir}/dnf-automatic
+}
+
+# Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in
+do_install_append_class-native() {
+ create_wrapper ${D}/${bindir}/dnf \
+ RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
+ RPM_NO_CHROOT_FOR_SCRIPTS=1
+}
+
+SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
+ dnf-automatic.service dnf-automatic.timer \
+ dnf-automatic-download.service dnf-automatic-download.timer \
+ dnf-automatic-install.service dnf-automatic-install.timer \
+ dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch
new file mode 100644
index 0000000..45c606e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch
@@ -0,0 +1,54 @@
+From 319f32d743f5b5e725012654d124e49226d5de91 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 16 Mar 2018 20:28:24 -0700
+Subject: [PATCH] arch: Add support for riscv64 CPU
+
+ * Architecture support:
+ - Add support for riscv64 CPU. Closes: #822914
+ Thanks to Manuel A. Fernandez Montecelo <mafm@debian.org>
+
+Upstream-Status: Backport [https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=dpkg%2Fdpkg.git;a=commitdiff_plain;h=ee0855cc66076691de4796be48f8a0d889fde001;hp=2f5816d8be40b449d2473b22f9e0c33b32f3bd78]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ data/cputable | 1 +
+ scripts/t/Dpkg_Arch.t | 4 ++--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/data/cputable b/data/cputable
+index a2bd7d6..9f2a8e0 100644
+--- a/data/cputable
++++ b/data/cputable
+@@ -41,6 +41,7 @@ powerpc powerpc (powerpc|ppc) 32 big
+ powerpcel powerpcle powerpcle 32 little
+ ppc64 powerpc64 (powerpc|ppc)64 64 big
+ ppc64el powerpc64le powerpc64le 64 little
++riscv64 riscv64 riscv64 64 little
+ s390 s390 s390 32 big
+ s390x s390x s390x 64 big
+ sh3 sh3 sh3 32 little
+diff --git a/scripts/t/Dpkg_Arch.t b/scripts/t/Dpkg_Arch.t
+index d478b49..ecd5d66 100644
+--- a/scripts/t/Dpkg_Arch.t
++++ b/scripts/t/Dpkg_Arch.t
+@@ -16,7 +16,7 @@
+ use strict;
+ use warnings;
+
+-use Test::More tests => 16367;
++use Test::More tests => 16832;
+
+ use_ok('Dpkg::Arch', qw(debarch_to_debtuple debarch_to_multiarch
+ debarch_eq debarch_is debarch_is_wildcard
+@@ -162,7 +162,7 @@ is(gnutriplet_to_debarch(undef), undef, 'undef gnutriplet');
+ is(gnutriplet_to_debarch('unknown-unknown-unknown'), undef, 'unknown gnutriplet');
+ is(gnutriplet_to_debarch('x86_64-linux-gnu'), 'amd64', 'known gnutriplet');
+
+-is(scalar get_valid_arches(), 524, 'expected amount of known architectures');
++is(scalar get_valid_arches(), 539, 'expected amount of known architectures');
+
+ {
+ local $ENV{CC} = 'false';
+--
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch
index d929466..8797ea5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch
@@ -5,6 +5,7 @@
helps compiling dpkg for musl/arm-softfloat
+Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
index d56b8a6..d483866 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
@@ -1,12 +1,17 @@
+From 9d260d408f9e17abd1d1dccd685bd7e80a3655a9 Mon Sep 17 00:00:00 2001
+From: Donn Seeley <donn.seeley@windriver.com>
+Date: Tue, 25 Feb 2014 17:44:04 +0800
+Subject: [PATCH] dpkg: fix a link problem for dpkg-native on CentOS 5.8
+
CentOS 5.8 kernels and headers support the sync_file_range() system call,
but glibc 2.5 doesn't provide the syscall stub. It appears that this
problem is known but will never be fixed:
https://bugzilla.redhat.com/show_bug.cgi?id=518581
- Bug 518581 - [RHEL5] glibc misses sync_file_range syscall interface
+ Bug 518581 - [RHEL5] glibc misses sync_file_range syscall interface
- Status: CLOSED CANTFIX
+ Status: CLOSED CANTFIX
Last Closed: 2009-11-22 22:19:55
Kirby Zhou 2009-08-20 23:37:55 EDT
@@ -60,13 +65,16 @@
Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
Signed-off-by: Lei Liu <lei.liu2@windriver.com>
+
---
- src/archives.c | 4 ++--
+ src/archives.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
+diff --git a/src/archives.c b/src/archives.c
+index 4b2fc92..a92b795 100644
--- a/src/archives.c
+++ b/src/archives.c
-@@ -75,7 +75,7 @@
+@@ -69,7 +69,7 @@ fd_writeback_init(int fd)
/* Ignore the return code as it should be considered equivalent to an
* asynchronous hint for the kernel, we are doing an fsync() later on
* anyway. */
@@ -75,7 +83,7 @@
sync_file_range(fd, 0, 0, SYNC_FILE_RANGE_WRITE);
#elif defined(HAVE_POSIX_FADVISE)
posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED);
-@@ -1179,7 +1179,7 @@
+@@ -1078,7 +1078,7 @@ tarobject(void *ctx, struct tar_entry *ti)
return 0;
}
@@ -84,3 +92,6 @@
static void
tar_writeback_barrier(struct fileinlist *files, struct pkginfo *pkg)
{
+--
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb
index c0c59f1..6d8ec34 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb
@@ -14,6 +14,7 @@
file://0006-add-musleabi-to-known-target-tripets.patch \
file://0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch \
file://0001-dpkg-Support-muslx32-build.patch \
+ file://0001-arch-Add-support-for-riscv64-CPU.patch \
"
SRC_URI_append_class-native = " file://glibc2.5-sync_file_range.patch "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb b/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb
new file mode 100644
index 0000000..c59a006
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb
@@ -0,0 +1,22 @@
+SUMMARY = "A small utility for printing debig source file locations embedded in binaries"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://../dwarfsrcfiles.c;md5=31483894e453a77acbb67847565f1b5c;beginline=1;endline=8"
+
+SRC_URI = "file://dwarfsrcfiles.c"
+BBCLASSEXTEND = "native"
+DEPENDS = "elfutils"
+DEPENDS_append_libc-musl = " argp-standalone"
+
+do_compile () {
+ ${CC} ${CFLAGS} ${LDFLAGS} -o dwarfsrcfiles ../dwarfsrcfiles.c -lelf -ldw
+}
+
+do_compile_libc-musl () {
+ ${CC} ${CFLAGS} ${LDFLAGS} -o dwarfsrcfiles ../dwarfsrcfiles.c -lelf -ldw -largp
+}
+
+do_install () {
+ install -d ${D}${bindir}
+ install -t ${D}${bindir} dwarfsrcfiles
+}
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/files/dwarfsrcfiles.c b/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/files/dwarfsrcfiles.c
new file mode 100644
index 0000000..af7af52
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/files/dwarfsrcfiles.c
@@ -0,0 +1,111 @@
+// dwarfsrcfiles.c - Get source files associated with the dwarf in a elf file.
+// gcc -Wall -g -O2 -lelf -ldw -o dwarfsrcfiles dwarfsrcfiles.c
+//
+// Copyright (C) 2011, Mark Wielaard <mjw@redhat.com>
+//
+// This file is free software. You can redistribute it and/or modify
+// it under the terms of the GNU General Public License (GPL); either
+// version 2, or (at your option) any later version.
+
+#include <argp.h>
+#include <stdio.h>
+
+#include <dwarf.h>
+#include <elfutils/libdw.h>
+#include <elfutils/libdwfl.h>
+
+static int
+process_cu (Dwarf_Die *cu_die)
+{
+ Dwarf_Attribute attr;
+ const char *name;
+ const char *dir = NULL;
+
+ Dwarf_Files *files;
+ size_t n;
+ int i;
+
+ if (dwarf_tag (cu_die) != DW_TAG_compile_unit)
+ {
+ fprintf (stderr, "DIE isn't a compile unit");
+ return -1;
+ }
+
+ if (dwarf_attr (cu_die, DW_AT_name, &attr) == NULL)
+ {
+ fprintf(stderr, "CU doesn't have a DW_AT_name");
+ return -1;
+ }
+
+ name = dwarf_formstring (&attr);
+ if (name == NULL)
+ {
+ fprintf(stderr, "Couldn't get DW_AT_name as string, %s",
+ dwarf_errmsg (-1));
+ return -1;
+ }
+
+ if (dwarf_attr (cu_die, DW_AT_comp_dir, &attr) != NULL)
+ {
+ dir = dwarf_formstring (&attr);
+ if (dir == NULL)
+ {
+ fprintf(stderr, "Couldn't get DW_AT_comp_die as string, %s",
+ dwarf_errmsg (-1));
+ return -1;
+ }
+ }
+
+ if (dir == NULL)
+ printf ("%s\n", name);
+ else
+ printf ("%s/%s\n", dir, name);
+
+ if (dwarf_getsrcfiles (cu_die, &files, &n) != 0)
+ {
+ fprintf(stderr, "Couldn't get CU file table, %s",
+ dwarf_errmsg (-1));
+ return -1;
+ }
+
+ for (i = 1; i < n; i++)
+ {
+ const char *file = dwarf_filesrc (files, i, NULL, NULL);
+ if (dir != NULL && file[0] != '/')
+ printf ("\t%s/%s\n", dir, file);
+ else
+ printf ("\t%s\n", file);
+ }
+
+ return 0;
+}
+
+int
+main (int argc, char **argv)
+{
+ char* args[3];
+ int res = 0;
+ Dwfl *dwfl;
+ Dwarf_Addr bias;
+
+ if (argc != 2)
+ fprintf(stderr, "Usage %s <file>", argv[0]);
+
+ // Pretend "dwarfsrcfiles -e <file>" was given, so we can use standard
+ // dwfl argp parser to open the file for us and get our Dwfl. Useful
+ // in case argument is an ET_REL file (like kernel modules). libdwfl
+ // will fix up relocations for us.
+ args[0] = argv[0];
+ args[1] = "-e";
+ args[2] = argv[1];
+
+ argp_parse (dwfl_standard_argp (), 3, args, 0, NULL, &dwfl);
+
+ Dwarf_Die *cu = NULL;
+ while ((cu = dwfl_nextcu (dwfl, cu, &bias)) != NULL)
+ res |= process_cu (cu);
+
+ dwfl_end (dwfl);
+
+ return res;
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-build-failure-in-swapfs.c-on-big-endia.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-build-failure-in-swapfs.c-on-big-endia.patch
new file mode 100644
index 0000000..ff1284e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-build-failure-in-swapfs.c-on-big-endia.patch
@@ -0,0 +1,40 @@
+From ae6603206176b771c9ed1f82569f68fc1257f014 Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Wed, 3 Jan 2018 01:32:02 -0500
+Subject: [PATCH] libext2fs: fix build failure in swapfs.c on big-endian
+ systems
+
+Addresses-Debian-Bug: #886119
+
+Reported-by: James Clarke <jrtc27@debian.org>
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+---
+Upstream-Status: Backport
+
+ lib/ext2fs/swapfs.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/ext2fs/swapfs.c b/lib/ext2fs/swapfs.c
+index 6e5cff97..b13dc422 100644
+--- a/lib/ext2fs/swapfs.c
++++ b/lib/ext2fs/swapfs.c
+@@ -19,6 +19,7 @@
+
+ #include "ext2_fs.h"
+ #include "ext2fs.h"
++#include "ext2fsP.h"
+ #include <ext2fs/ext2_ext_attr.h>
+
+ #ifdef WORDS_BIGENDIAN
+@@ -358,7 +359,7 @@ void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t,
+ if (inode_includes(inode_size, i_projid))
+ t->i_projid = ext2fs_swab16(f->i_projid);
+ /* catch new static fields added after i_projid */
+- EXT2FS_BUILD_BUG_ON(sizeof(ext2_inode_large) != 160);
++ EXT2FS_BUILD_BUG_ON(sizeof(struct ext2_inode_large) != 160);
+
+ i = sizeof(struct ext2_inode) + extra_isize + sizeof(__u32);
+ if (bufsize < (int) i)
+--
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-rename-copy_file_range-to-copy_file_chunk.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-rename-copy_file_range-to-copy_file_chunk.patch
deleted file mode 100644
index 308fe0e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-rename-copy_file_range-to-copy_file_chunk.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 647353f7c3fd29e1ffd468d7ff56d9643047ab35 Mon Sep 17 00:00:00 2001
-From: Palmer Dabbelt <palmer@dabbelt.com>
-Date: Fri, 29 Dec 2017 10:19:51 -0800
-Subject: [PATCH] misc: rename copy_file_range to copy_file_chunk
-
-As of 2.27, glibc will have a copy_file_range library call to wrap the
-new copy_file_range system call. This conflicts with the function in
-misc/create_inode.c, which this patch renames _copy_file_range.
-
-Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-
-Upstream-Status: Backport
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- misc/create_inode.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/misc/create_inode.c b/misc/create_inode.c
-index 8ce3fafa..cd89146f 100644
---- a/misc/create_inode.c
-+++ b/misc/create_inode.c
-@@ -396,7 +396,7 @@ static ssize_t my_pread(int fd, void *buf, size_t count, off_t offset)
- }
- #endif /* !defined HAVE_PREAD64 && !defined HAVE_PREAD */
-
--static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file,
-+static errcode_t copy_file_chunk(ext2_filsys fs, int fd, ext2_file_t e2_file,
- off_t start, off_t end, char *buf,
- char *zerobuf)
- {
-@@ -470,7 +470,7 @@ static errcode_t try_lseek_copy(ext2_filsys fs, int fd, struct stat *statbuf,
-
- data_blk = data & ~(fs->blocksize - 1);
- hole_blk = (hole + (fs->blocksize - 1)) & ~(fs->blocksize - 1);
-- err = copy_file_range(fs, fd, e2_file, data_blk, hole_blk, buf,
-+ err = copy_file_chunk(fs, fd, e2_file, data_blk, hole_blk, buf,
- zerobuf);
- if (err)
- return err;
-@@ -521,7 +521,7 @@ static errcode_t try_fiemap_copy(ext2_filsys fs, int fd, ext2_file_t e2_file,
- goto out;
- for (i = 0, ext = ext_buf; i < fiemap_buf->fm_mapped_extents;
- i++, ext++) {
-- err = copy_file_range(fs, fd, e2_file, ext->fe_logical,
-+ err = copy_file_chunk(fs, fd, e2_file, ext->fe_logical,
- ext->fe_logical + ext->fe_length,
- buf, zerobuf);
- if (err)
-@@ -574,7 +574,7 @@ static errcode_t copy_file(ext2_filsys fs, int fd, struct stat *statbuf,
- goto out;
- #endif
-
-- err = copy_file_range(fs, fd, e2_file, 0, statbuf->st_size, buf,
-+ err = copy_file_chunk(fs, fd, e2_file, 0, statbuf->st_size, buf,
- zerobuf);
- out:
- ext2fs_free_mem(&zerobuf);
---
-2.16.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
index 38fb07e..38e1bdb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
@@ -19,10 +19,10 @@
misc/mke2fs.conf.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
-diff --git a/misc/mke2fs.conf.in b/misc/mke2fs.conf.in
-index 812f7c7..0280398 100644
---- a/misc/mke2fs.conf.in
-+++ b/misc/mke2fs.conf.in
+Index: git/misc/mke2fs.conf.in
+===================================================================
+--- git.orig/misc/mke2fs.conf.in
++++ git/misc/mke2fs.conf.in
@@ -11,8 +11,9 @@
features = has_journal
}
@@ -32,5 +32,5 @@
inode_size = 256
+ auto_64-bit_support = 1
}
- ext4dev = {
- features = has_journal,extent,huge_file,flex_bg,uninit_bg,inline_data,64bit,dir_nlink,extra_isize
+ small = {
+ blocksize = 1024
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4 b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4
deleted file mode 100644
index c0bd7db..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4
+++ /dev/null
@@ -1,135 +0,0 @@
-# Extracted from the package's shipped aclocal.m4. Custom macros should be in
-# acinclude.m4 so running aclocal doesn't blow them away.
-#
-# Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-# from http://autoconf-archive.cryp.to/ax_tls.html
-#
-# This was licensed under the GPL with the following exception:
-#
-# As a special exception, the respective Autoconf Macro's copyright
-# owner gives unlimited permission to copy, distribute and modify the
-# configure scripts that are the output of Autoconf when processing
-# the Macro. You need not follow the terms of the GNU General Public
-# License when using or distributing such scripts, even though
-# portions of the text of the Macro appear in them. The GNU General
-# Public License (GPL) does govern all other use of the material that
-# constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the
-# Autoconf Macro released by the Autoconf Macro Archive. When you make
-# and distribute a modified version of the Autoconf Macro, you may
-# extend this special exception to the GPL to apply to your modified
-# version as well.
-#
-AC_DEFUN([AX_TLS], [
- AC_MSG_CHECKING(for thread local storage (TLS) class)
- AC_CACHE_VAL(ac_cv_tls, [
- ax_tls_keywords="__thread __declspec(thread) none"
- for ax_tls_keyword in $ax_tls_keywords; do
- case $ax_tls_keyword in
- none) ac_cv_tls=none ; break ;;
- *)
- AC_TRY_COMPILE(
- [#include <stdlib.h>
- static void
- foo(void) {
- static ] $ax_tls_keyword [ int bar;
- exit(1);
- }],
- [],
- [ac_cv_tls=$ax_tls_keyword ; break],
- ac_cv_tls=none
- )
- esac
- done
-])
-
- if test "$ac_cv_tls" != "none"; then
- dnl AC_DEFINE([TLS], [], [If the compiler supports a TLS storage class define it to that here])
- AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here])
- fi
- AC_MSG_RESULT($ac_cv_tls)
-])
-
-# ===========================================================================
-# http://www.nongnu.org/autoconf-archive/check_gnu_make.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# CHECK_GNU_MAKE()
-#
-# DESCRIPTION
-#
-# This macro searches for a GNU version of make. If a match is found, the
-# makefile variable `ifGNUmake' is set to the empty string, otherwise it
-# is set to "#". This is useful for including a special features in a
-# Makefile, which cannot be handled by other versions of make. The
-# variable _cv_gnu_make_command is set to the command to invoke GNU make
-# if it exists, the empty string otherwise.
-#
-# Here is an example of its use:
-#
-# Makefile.in might contain:
-#
-# # A failsafe way of putting a dependency rule into a makefile
-# $(DEPEND):
-# $(CC) -MM $(srcdir)/*.c > $(DEPEND)
-#
-# @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
-# @ifGNUmake@ include $(DEPEND)
-# @ifGNUmake@ endif
-#
-# Then configure.in would normally contain:
-#
-# CHECK_GNU_MAKE()
-# AC_OUTPUT(Makefile)
-#
-# Then perhaps to cause gnu make to override any other make, we could do
-# something like this (note that GNU make always looks for GNUmakefile
-# first):
-#
-# if ! test x$_cv_gnu_make_command = x ; then
-# mv Makefile GNUmakefile
-# echo .DEFAULT: > Makefile ;
-# echo \ $_cv_gnu_make_command \$@ >> Makefile;
-# fi
-#
-# Then, if any (well almost any) other make is called, and GNU make also
-# exists, then the other make wraps the GNU make.
-#
-# LICENSE
-#
-# Copyright (c) 2008 John Darrington <j.darrington@elvis.murdoch.edu.au>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved.
-#
-# Note: Modified by Ted Ts'o to add @ifNotGNUMake@
-
-AC_DEFUN(
- [CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
- _cv_gnu_make_command='' ;
-dnl Search all the common names for GNU make
- for a in "$MAKE" make gmake gnumake ; do
- if test -z "$a" ; then continue ; fi ;
- if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
- _cv_gnu_make_command=$a ;
- break;
- fi
- done ;
- ) ;
-dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
- if test "x$_cv_gnu_make_command" != "x" ; then
- ifGNUmake='' ;
- ifNotGNUmake='#' ;
- else
- ifGNUmake='#' ;
- ifNotGNUmake='' ;
- AC_MSG_RESULT("Not found");
- fi
- AC_SUBST(ifGNUmake)
- AC_SUBST(ifNotGNUmake)
-] )
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
index 33054c6..69c09bc 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
@@ -1,3 +1,6 @@
+From c7914309aeee6209ddb6995c084805a911d9cc82 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 10 Aug 2016 11:19:44 +0800
Subject: [PATCH] Fix missing check for permission denied.
If the path to "ROOT_SYSCONFDIR/mke2fs.conf" has a permission denied problem,
@@ -10,15 +13,16 @@
Written-by: Henrik Wallin <henrik.b.wallin@ericsson.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
---
lib/support/profile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/support/profile.c b/lib/support/profile.c
-index 51a3314..1c1039f 100644
+index 9e96673b..32d83002 100644
--- a/lib/support/profile.c
+++ b/lib/support/profile.c
-@@ -335,7 +335,7 @@ profile_init(const char **files, profile_t *ret_profile)
+@@ -335,7 +335,7 @@ profile_init(const char * const *files, profile_t *ret_profile)
*last = new_file;
last = &new_file->next;
}
@@ -28,5 +32,5 @@
goto errout;
--
-2.7.4
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch
deleted file mode 100644
index 2a3aeff..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mei Lei <lei.mei@intel.com>
-
-diff --git a/configure.ac b/configure.ac
-index c1fe224..f5ac628 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1374,7 +1374,8 @@ if test -n "$WITH_DIET_LIBC" ; then
- INCLUDES="$INCLUDES -D_REENTRANT"
- fi
- AC_SUBST(INCLUDES)
--AM_MKINSTALLDIRS
-+MKINSTALLDIRS="mkdir -p"
-+AC_SUBST(MKINSTALLDIRS)
- dnl
- dnl Build CFLAGS
- dnl
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
index 7df0967..7c4bb39 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
@@ -1,10 +1,10 @@
Upstream-Status: Inappropriate
-diff --git a/tests/Makefile.in b/tests/Makefile.in
-index c130f4a..d2ade03 100644
---- a/tests/Makefile.in
-+++ b/tests/Makefile.in
-@@ -18,7 +18,7 @@ test_one: $(srcdir)/test_one.in Makefile mke2fs.conf
+Index: git/tests/Makefile.in
+===================================================================
+--- git.orig/tests/Makefile.in
++++ git/tests/Makefile.in
+@@ -18,7 +18,7 @@ test_one: $(srcdir)/test_one.in Makefile
@echo "#!/bin/sh" > test_one
@echo "HTREE=y" >> test_one
@echo "QUOTA=y" >> test_one
@@ -12,8 +12,8 @@
+ @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one
@echo "DIFF_OPTS=@UNI_DIFF_OPTS@" >> test_one
@echo "SIZEOF_TIME_T=@SIZEOF_TIME_T@" >> test_one
- @cat $(srcdir)/test_one.in >> test_one
-@@ -27,7 +27,7 @@ test_one: $(srcdir)/test_one.in Makefile mke2fs.conf
+ @echo "DD=@DD@" >>test_one
+@@ -28,7 +28,7 @@ test_one: $(srcdir)/test_one.in Makefile
test_script: test_one test_script.in Makefile mke2fs.conf
@echo "Creating test_script..."
@echo "#!/bin/sh" > test_script
@@ -22,10 +22,10 @@
@cat $(srcdir)/test_script.in >> test_script
@chmod +x test_script
-diff --git a/tests/test_config b/tests/test_config
-index 547ef4c..e11e6f4 100644
---- a/tests/test_config
-+++ b/tests/test_config
+Index: git/tests/test_config
+===================================================================
+--- git.orig/tests/test_config
++++ git/tests/test_config
@@ -3,24 +3,24 @@
#
@@ -67,10 +67,10 @@
CLEAN_OUTPUT="sed -f $cmd_dir/filter.sed"
LD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss:${LD_LIBRARY_PATH}
DYLD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss:${DYLD_LIBRARY_PATH}
-diff --git a/tests/test_script.in b/tests/test_script.in
-index 9959e30..442999d 100644
---- a/tests/test_script.in
-+++ b/tests/test_script.in
+Index: git/tests/test_script.in
+===================================================================
+--- git.orig/tests/test_script.in
++++ git/tests/test_script.in
@@ -39,7 +39,7 @@ for i; do
done
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/reproducible-doc.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/reproducible-doc.patch
deleted file mode 100644
index 8e5d1d3..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/reproducible-doc.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-
-Suppport for binary reproducibility.
-When compressing, do not save the original file name and time stamp.
-
-Upstream-Status: Submitted [Theodore Ts'o tytso@mit.edu (maintainer)]
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
-diff --git a/doc/Makefile.in b/doc/Makefile.in
-index 9cb584c..0bee4e4 100644
---- a/doc/Makefile.in
-+++ b/doc/Makefile.in
-@@ -28,7 +28,7 @@ install-doc-libs: libext2fs.info libext2fs.dvi
- $(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i ; \
- done
- $(E) " GZIP $(infodir)/libext2fs.info*"
-- -$(Q) gzip -9 $(DESTDIR)$(infodir)/libext2fs.info*
-+ -$(Q) gzip -9 -n $(DESTDIR)$(infodir)/libext2fs.info*
-
- uninstall-doc-libs:
- $(RM) -rf $(DESTDIR)$(infodir)/libext2fs.info*
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb
deleted file mode 100644
index f1d7c08..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb
+++ /dev/null
@@ -1,118 +0,0 @@
-require e2fsprogs.inc
-
-SRC_URI += "file://acinclude.m4 \
- file://remove.ldconfig.call.patch \
- file://quiet-debugfs.patch \
- file://run-ptest \
- file://ptest.patch \
- file://mkdir.patch \
- file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \
- file://mkdir_p.patch \
- file://reproducible-doc.patch \
- file://0001-misc-create_inode.c-set-dir-s-mode-correctly.patch \
- file://0001-misc-rename-copy_file_range-to-copy_file_chunk.patch \
-"
-
-SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch"
-
-SRCREV = "2a13c84b513aa094d1cda727e92d35a89dd777da"
-UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
-
-EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \
- --enable-elf-shlibs --disable-libuuid --disable-uuidd \
- --disable-libblkid --enable-verbose-makecmds"
-
-EXTRA_OECONF_darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse'
-
-do_configure_prepend () {
- cp ${WORKDIR}/acinclude.m4 ${S}/
-}
-
-do_install () {
- oe_runmake 'DESTDIR=${D}' install
- oe_runmake 'DESTDIR=${D}' install-libs
- # We use blkid from util-linux now so remove from here
- rm -f ${D}${base_libdir}/libblkid*
- rm -rf ${D}${includedir}/blkid
- rm -f ${D}${base_libdir}/pkgconfig/blkid.pc
- rm -f ${D}${base_sbindir}/blkid
- rm -f ${D}${base_sbindir}/fsck
- rm -f ${D}${base_sbindir}/findfs
-
- # e2initrd_helper and the pkgconfig files belong in libdir
- if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
- install -d ${D}${libdir}
- mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir}
- mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
- fi
-
- oe_multilib_header ext2fs/ext2_types.h
- install -d ${D}${base_bindir}
- mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs
-
- install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/
-
- # Clean host path (build directory) in compile_et, mk_cmds
- sed -i -e "s,\(ET_DIR=.*\)${S}/lib/et\(.*\),\1${datadir}/et\2,g" ${D}${bindir}/compile_et
- sed -i -e "s,\(SS_DIR=.*\)${S}/lib/ss\(.*\),\1${datadir}/ss\2,g" ${D}${bindir}/mk_cmds
-}
-
-# Need to find the right mke2fs.conf file
-e2fsprogs_conf_fixup () {
- for i in mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4; do
- create_wrapper ${D}${base_sbindir}/$i MKE2FS_CONFIG=${sysconfdir}/mke2fs.conf
- done
-}
-
-do_install_append_class-native() {
- e2fsprogs_conf_fixup
-}
-
-do_install_append_class-nativesdk() {
- e2fsprogs_conf_fixup
-}
-
-RDEPENDS_e2fsprogs = "e2fsprogs-badblocks"
-RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck"
-
-PACKAGES =+ "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks e2fsprogs-resize2fs"
-PACKAGES =+ "libcomerr libss libe2p libext2fs"
-
-FILES_e2fsprogs-resize2fs = "${base_sbindir}/resize2fs*"
-FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*"
-FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf"
-FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label"
-FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks"
-FILES_libcomerr = "${base_libdir}/libcom_err.so.*"
-FILES_libss = "${base_libdir}/libss.so.*"
-FILES_libe2p = "${base_libdir}/libe2p.so.*"
-FILES_libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*"
-FILES_${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so ${bindir}/compile_et ${bindir}/mk_cmds"
-
-ALTERNATIVE_${PN} = "chattr"
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr"
-ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs"
-
-ALTERNATIVE_${PN}-doc = "fsck.8"
-ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8"
-
-RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash"
-
-do_compile_ptest() {
- oe_runmake -C ${B}/tests
-}
-
-do_install_ptest() {
- cp -R --no-dereference --preserve=mode,links -v ${B}/tests ${D}${PTEST_PATH}/test
- cp -R --no-dereference --preserve=mode,links -v ${S}/tests/* ${D}${PTEST_PATH}/test
- sed -e 's!../e2fsck/e2fsck!e2fsck!g' -i ${D}${PTEST_PATH}/test/*/expect*
-
- # Remove various files
- find "${D}${PTEST_PATH}" -type f \
- \( -name 'Makefile' -o -name 'Makefile.in' -o -name '*.o' -o -name '*.c' -o -name '*.h' \)\
- -exec rm -f {} +
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb
new file mode 100644
index 0000000..56abb3b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb
@@ -0,0 +1,120 @@
+require e2fsprogs.inc
+
+SRC_URI += "file://remove.ldconfig.call.patch \
+ file://run-ptest \
+ file://ptest.patch \
+ file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \
+ file://mkdir_p.patch \
+ file://0001-misc-create_inode.c-set-dir-s-mode-correctly.patch \
+ file://0001-libext2fs-fix-build-failure-in-swapfs.c-on-big-endia.patch \
+ "
+
+SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch \
+ file://quiet-debugfs.patch \
+"
+
+SRCREV = "af2eac481cf426c05ae12b946396980e16c8ab19"
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
+
+EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \
+ --enable-elf-shlibs --disable-libuuid --disable-uuidd \
+ --disable-libblkid --enable-verbose-makecmds"
+
+EXTRA_OECONF_darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse'
+
+# make locale rules sometimes fire, sometimes don't as git doesn't preserve
+# file mktime. Touch the files introducing non-determinism to the build
+do_compile_prepend (){
+ find ${S}/po -type f -name "*.po" -exec touch {} +
+}
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+ oe_runmake 'DESTDIR=${D}' install-libs
+ # We use blkid from util-linux now so remove from here
+ rm -f ${D}${base_libdir}/libblkid*
+ rm -rf ${D}${includedir}/blkid
+ rm -f ${D}${base_libdir}/pkgconfig/blkid.pc
+ rm -f ${D}${base_sbindir}/blkid
+ rm -f ${D}${base_sbindir}/fsck
+ rm -f ${D}${base_sbindir}/findfs
+
+ # e2initrd_helper and the pkgconfig files belong in libdir
+ if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+ install -d ${D}${libdir}
+ mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir}
+ mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
+ fi
+
+ oe_multilib_header ext2fs/ext2_types.h
+ install -d ${D}${base_bindir}
+ mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs
+
+ install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/
+
+ # Clean host path (build directory) in compile_et, mk_cmds
+ sed -i -e "s,\(ET_DIR=.*\)${S}/lib/et\(.*\),\1${datadir}/et\2,g" ${D}${bindir}/compile_et
+ sed -i -e "s,\(SS_DIR=.*\)${S}/lib/ss\(.*\),\1${datadir}/ss\2,g" ${D}${bindir}/mk_cmds
+}
+
+# Need to find the right mke2fs.conf file
+e2fsprogs_conf_fixup () {
+ for i in mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4; do
+ create_wrapper ${D}${base_sbindir}/$i MKE2FS_CONFIG=${sysconfdir}/mke2fs.conf
+ done
+}
+
+do_install_append_class-native() {
+ e2fsprogs_conf_fixup
+}
+
+do_install_append_class-nativesdk() {
+ e2fsprogs_conf_fixup
+}
+
+RDEPENDS_e2fsprogs = "e2fsprogs-badblocks"
+RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck"
+
+PACKAGES =+ "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks e2fsprogs-resize2fs"
+PACKAGES =+ "libcomerr libss libe2p libext2fs"
+
+FILES_e2fsprogs-resize2fs = "${base_sbindir}/resize2fs*"
+FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*"
+FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf"
+FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label"
+FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks"
+FILES_libcomerr = "${base_libdir}/libcom_err.so.*"
+FILES_libss = "${base_libdir}/libss.so.*"
+FILES_libe2p = "${base_libdir}/libe2p.so.*"
+FILES_libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*"
+FILES_${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so ${bindir}/compile_et ${bindir}/mk_cmds"
+
+ALTERNATIVE_${PN} = "chattr"
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr"
+ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs"
+
+ALTERNATIVE_${PN}-doc = "fsck.8"
+ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8"
+
+RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash"
+
+do_compile_ptest() {
+ oe_runmake -C ${B}/tests
+}
+
+do_install_ptest() {
+ cp -R --no-dereference --preserve=mode,links -v ${B}/tests ${D}${PTEST_PATH}/test
+ cp -R --no-dereference --preserve=mode,links -v ${S}/tests/* ${D}${PTEST_PATH}/test
+ sed -e 's!../e2fsck/e2fsck!e2fsck!g' \
+ -e 's!../misc/tune2fs!tune2fs!g' -i ${D}${PTEST_PATH}/test/*/expect*
+ sed -e 's!../e2fsck/e2fsck!${base_sbindir}/e2fsck!g' -i ${D}${PTEST_PATH}/test/*/script
+
+ # Remove various files
+ find "${D}${PTEST_PATH}" -type f \
+ \( -name 'Makefile' -o -name 'Makefile.in' -o -name '*.o' -o -name '*.c' -o -name '*.h' \)\
+ -exec rm -f {} +
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb
index 3b81e28..14ac22e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb
@@ -5,40 +5,31 @@
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
DEPENDS = "libtool bzip2 zlib virtual/libintl"
DEPENDS_append_libc-musl = " argp-standalone fts "
-SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2"
+# The Debian patches below are from:
+# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.168-0.2.debian.tar.xz
+SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
+ file://0001-dso-link-change.patch \
+ file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \
+ file://0003-fixheadercheck.patch \
+ file://0004-Disable-the-test-to-convert-euc-jp.patch \
+ file://0005-fix-a-stack-usage-warning.patch \
+ file://0006-Fix-build-on-aarch64-musl.patch \
+ file://0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch \
+ file://0001-libasm-may-link-with-libbz2-if-found.patch \
+ file://debian/hppa_backend.diff \
+ file://debian/arm_backend.diff \
+ file://debian/mips_backend.patch \
+ file://debian/mips_readelf_w.patch \
+ file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \
+ file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \
+ file://debian/0003-Add-mips-n64-relocation-format-hack.patch \
+ file://0001-Use-fallthrough-attribute.patch \
+ file://0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch \
+ "
+SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch"
SRC_URI[md5sum] = "03599aee98c9b726c7a732a2dd0245d5"
SRC_URI[sha256sum] = "1f844775576b79bdc9f9c717a50058d08620323c1e935458223a12f249c9e066"
-SRC_URI += "\
- file://0001-dso-link-change.patch \
- file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \
- file://0003-fixheadercheck.patch \
- file://0004-Disable-the-test-to-convert-euc-jp.patch \
- file://0005-fix-a-stack-usage-warning.patch \
- file://0006-Fix-build-on-aarch64-musl.patch \
- file://0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch \
- file://0001-libasm-may-link-with-libbz2-if-found.patch \
-"
-SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch"
-
-# Pick patches from debian
-# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.168-0.2.debian.tar.xz
-SRC_URI += "\
- file://debian/hppa_backend.diff \
- file://debian/arm_backend.diff \
- file://debian/mips_backend.patch \
- file://debian/mips_readelf_w.patch \
- file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \
- file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \
- file://debian/0003-Add-mips-n64-relocation-format-hack.patch \
-"
-# Fix the patches from Debian with GCC7
-SRC_URI += "file://debian/fallthrough.patch"
-
-# The buildsystem wants to generate 2 .h files from source using a binary it just built,
-# which can not pass the cross compiling, so let's work around it by adding 2 .h files
-# along with the do_configure_prepend()
-
inherit autotools gettext
EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch
new file mode 100644
index 0000000..cf4d1df
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch
@@ -0,0 +1,34 @@
+From 732913a8c35c7b25c0cbf6903cab1ad6b602b525 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 22 Mar 2018 22:44:03 -0700
+Subject: [PATCH] Ensure that packed structs follow the gcc memory layout
+
+Partial backport of
+https://sourceware.org/git/?p=elfutils.git;a=commit;h=17d7194d291bf91d130b78e06cbe27b290e0376d
+
+Helps fixing alignment errors e.g.
+linux-core-note.c:116:1: error: alignment 2 of 'struct m68k_prstatus
+' is less than 4 [-Werror=packed-not-aligned]
+ ;
+ ^
+
+Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=17d7194d291bf91d130b78e06cbe27b290e0376d]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ backends/linux-core-note.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c
+index 5f06c896..9faae4c3 100644
+--- a/backends/linux-core-note.c
++++ b/backends/linux-core-note.c
+@@ -111,7 +111,7 @@ struct EBLHOOK(prstatus)
+ FIELD (INT, pr_fpvalid);
+ }
+ #ifdef ALIGN_PRSTATUS
+- __attribute__ ((packed, aligned (ALIGN_PRSTATUS)))
++ attribute_packed __attribute__ ((aligned (ALIGN_PRSTATUS)))
+ #endif
+ ;
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Use-fallthrough-attribute.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Use-fallthrough-attribute.patch
new file mode 100644
index 0000000..5e2155b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Use-fallthrough-attribute.patch
@@ -0,0 +1,791 @@
+From 5cb883f67d00a63531ef195c242763d36b1905ca Mon Sep 17 00:00:00 2001
+From: Joshua Watt <Joshua.Watt@garmin.com>
+Date: Fri, 9 Feb 2018 12:46:38 -0600
+Subject: [PATCH] Use fallthrough attribute
+
+Use __attribute__ ((fallthrough)) to indicate switch case fall through
+instead of a comment. This ensure that the fallthrough warning is not
+triggered even if the file is pre-processed (hence stripping the
+comments) before it is compiled.
+
+The actual fallback implementation is hidden behind a FALLBACK macro in
+case the compiler doesn't support it.
+
+Finally, the -Wimplict-fallthrough warning was upgraded to only allow
+the attribute to satisfy it; a comment alone is no longer sufficient.
+
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+
+Upstream-Status: Submitted [1]
+
+[1] https://sourceware.org/ml/elfutils-devel/2018-q1/msg00027.html
+---
+ backends/aarch64_retval.c | 2 +-
+ backends/alpha_retval.c | 4 ++--
+ backends/arm_regs.c | 2 +-
+ backends/arm_retval.c | 2 +-
+ backends/i386_regs.c | 2 +-
+ backends/i386_retval.c | 4 ++--
+ backends/ia64_retval.c | 2 +-
+ backends/linux-core-note.c | 2 +-
+ backends/m68k_retval.c | 4 ++--
+ backends/mips_retval.c | 4 ++--
+ backends/parisc_retval.c | 5 +++--
+ backends/ppc64_retval.c | 6 +++---
+ backends/ppc_regs.c | 2 +-
+ backends/ppc_retval.c | 4 ++--
+ backends/s390_retval.c | 4 ++--
+ backends/sh_retval.c | 2 +-
+ backends/sparc_retval.c | 2 +-
+ backends/tilegx_retval.c | 4 ++--
+ backends/x86_64_regs.c | 2 +-
+ backends/x86_64_retval.c | 2 +-
+ config/eu.am | 4 +++-
+ configure.ac | 6 ++++++
+ lib/eu-config.h | 7 +++++++
+ libcpu/i386_disasm.c | 2 +-
+ libcpu/i386_parse.c | 4 ++--
+ libdw/cfi.c | 4 ++--
+ libdw/dwarf_frame_register.c | 2 +-
+ libdwfl/dwfl_report_elf.c | 2 +-
+ libdwfl/frame_unwind.c | 2 +-
+ libebl/eblobjnote.c | 2 +-
+ libelf/elf32_updatenull.c | 2 +-
+ libelf/elf_begin.c | 4 ++--
+ libelf/elf_cntl.c | 2 +-
+ src/addr2line.c | 2 +-
+ src/elfcompress.c | 2 +-
+ src/elflint.c | 8 ++++----
+ src/objdump.c | 2 +-
+ src/readelf.c | 8 ++++----
+ src/strings.c | 2 +-
+ tests/backtrace.c | 2 +-
+ tests/elfstrmerge.c | 3 ++-
+ 41 files changed, 75 insertions(+), 58 deletions(-)
+
+diff --git a/backends/aarch64_retval.c b/backends/aarch64_retval.c
+index 68de307..1308340 100644
+--- a/backends/aarch64_retval.c
++++ b/backends/aarch64_retval.c
+@@ -292,7 +292,7 @@ aarch64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ assert (count > 0);
+ if (count <= 4)
+ return pass_hfa (locp, base_size, count);
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case 1:
+ /* Not a HFA. */
+diff --git a/backends/alpha_retval.c b/backends/alpha_retval.c
+index 53dbfa4..d9bae3b 100644
+--- a/backends/alpha_retval.c
++++ b/backends/alpha_retval.c
+@@ -85,7 +85,7 @@ alpha_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -131,7 +131,7 @@ alpha_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ }
+ }
+
+- /* Else fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+diff --git a/backends/arm_regs.c b/backends/arm_regs.c
+index 4ee1039..418c931 100644
+--- a/backends/arm_regs.c
++++ b/backends/arm_regs.c
+@@ -81,7 +81,7 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
+ * but gcc maps FPA registers here
+ */
+ regno += 96 - 16;
+- /* Fall through. */
++ FALLTHROUGH;
+ case 96 + 0 ... 96 + 7:
+ *setname = "FPA";
+ *type = DW_ATE_float;
+diff --git a/backends/arm_retval.c b/backends/arm_retval.c
+index 8687eab..313e4eb 100644
+--- a/backends/arm_retval.c
++++ b/backends/arm_retval.c
+@@ -90,7 +90,7 @@ arm_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp,
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+diff --git a/backends/i386_regs.c b/backends/i386_regs.c
+index fd963a6..7ec93bb 100644
+--- a/backends/i386_regs.c
++++ b/backends/i386_regs.c
+@@ -92,7 +92,7 @@ i386_register_info (Ebl *ebl __attribute__ ((unused)),
+ case 5:
+ case 8:
+ *type = DW_ATE_address;
+- /* Fallthrough */
++ FALLTHROUGH;
+ case 0 ... 3:
+ case 6 ... 7:
+ name[0] = 'e';
+diff --git a/backends/i386_retval.c b/backends/i386_retval.c
+index 4aa646f..32fec72 100644
+--- a/backends/i386_retval.c
++++ b/backends/i386_retval.c
+@@ -85,7 +85,7 @@ i386_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -123,7 +123,7 @@ i386_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ if (size <= 8)
+ return nloc_intregpair;
+ }
+- /* Fallthrough */
++ FALLTHROUGH;
+
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+diff --git a/backends/ia64_retval.c b/backends/ia64_retval.c
+index dcd5f28..03ea4d8 100644
+--- a/backends/ia64_retval.c
++++ b/backends/ia64_retval.c
+@@ -260,7 +260,7 @@ ia64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c
+index 67638d7..5f06c89 100644
+--- a/backends/linux-core-note.c
++++ b/backends/linux-core-note.c
+@@ -226,7 +226,7 @@ EBLHOOK(core_note) (const GElf_Nhdr *nhdr, const char *name,
+ if (memcmp (name, "CORE", nhdr->n_namesz) == 0)
+ break;
+ /* Buggy old Linux kernels didn't terminate "LINUX". */
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case sizeof "LINUX":
+ if (memcmp (name, "LINUX", nhdr->n_namesz) == 0)
+diff --git a/backends/m68k_retval.c b/backends/m68k_retval.c
+index c68ed02..a653ba3 100644
+--- a/backends/m68k_retval.c
++++ b/backends/m68k_retval.c
+@@ -92,7 +92,7 @@ m68k_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -135,7 +135,7 @@ m68k_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ if (size <= 8)
+ return nloc_intregpair;
+ }
+- /* Fallthrough */
++ FALLTHROUGH;
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+ case DW_TAG_union_type:
+diff --git a/backends/mips_retval.c b/backends/mips_retval.c
+index 57487bb..c6e1ffe 100644
+--- a/backends/mips_retval.c
++++ b/backends/mips_retval.c
+@@ -306,7 +306,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = dwarf_tag (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -389,7 +389,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ }
+ }
+
+- /* Fallthrough to handle large types */
++ FALLTHROUGH; /* Fallthrough to handle large types */
+
+ case DW_TAG_array_type:
+ large:
+diff --git a/backends/parisc_retval.c b/backends/parisc_retval.c
+index df7ec3a..1f1e91a 100644
+--- a/backends/parisc_retval.c
++++ b/backends/parisc_retval.c
+@@ -116,7 +116,7 @@ parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, in
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = dwarf_tag (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -167,6 +167,7 @@ parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, in
+
+ /* Else fall through. */
+ }
++ FALLTHROUGH;
+
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+@@ -189,7 +190,7 @@ parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, in
+ *locp = loc_aggregate;
+ return nloc_aggregate;
+ #endif
+- /* fall through. */
++ FALLTHROUGH;
+ }
+ }
+
+diff --git a/backends/ppc64_retval.c b/backends/ppc64_retval.c
+index a251983..eb1c11e 100644
+--- a/backends/ppc64_retval.c
++++ b/backends/ppc64_retval.c
+@@ -96,7 +96,7 @@ ppc64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -141,7 +141,7 @@ ppc64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ return nloc_intreg;
+ }
+
+- /* Else fall through. */
++ FALLTHROUGH;
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+ case DW_TAG_union_type:
+@@ -161,7 +161,7 @@ ppc64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ return nloc_vmxreg;
+ }
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_string_type:
+ if (dwarf_aggregate_size (typedie, &size) == 0 && size <= 8)
+diff --git a/backends/ppc_regs.c b/backends/ppc_regs.c
+index c2d5011..43d2534 100644
+--- a/backends/ppc_regs.c
++++ b/backends/ppc_regs.c
+@@ -140,7 +140,7 @@ ppc_register_info (Ebl *ebl __attribute__ ((unused)),
+ case 100:
+ if (*bits == 32)
+ return stpcpy (name, "mq") + 1 - name;
+- /* Fallthrough */
++ FALLTHROUGH;
+ case 102 ... 107:
+ name[0] = 's';
+ name[1] = 'p';
+diff --git a/backends/ppc_retval.c b/backends/ppc_retval.c
+index b14a99f..39b42da 100644
+--- a/backends/ppc_retval.c
++++ b/backends/ppc_retval.c
+@@ -108,7 +108,7 @@ ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -172,7 +172,7 @@ ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ return nloc_intregquad;
+ }
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+diff --git a/backends/s390_retval.c b/backends/s390_retval.c
+index a927d46..2043f98 100644
+--- a/backends/s390_retval.c
++++ b/backends/s390_retval.c
+@@ -87,7 +87,7 @@ s390_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -127,7 +127,7 @@ s390_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ return size <= asize ? nloc_intreg : nloc_intregpair;
+ }
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+diff --git a/backends/sh_retval.c b/backends/sh_retval.c
+index d44f260..33d7d96 100644
+--- a/backends/sh_retval.c
++++ b/backends/sh_retval.c
+@@ -84,7 +84,7 @@ sh_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+diff --git a/backends/sparc_retval.c b/backends/sparc_retval.c
+index e1b1775..fb81cdc 100644
+--- a/backends/sparc_retval.c
++++ b/backends/sparc_retval.c
+@@ -91,7 +91,7 @@ sparc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+diff --git a/backends/tilegx_retval.c b/backends/tilegx_retval.c
+index db81a20..7f7d24b 100644
+--- a/backends/tilegx_retval.c
++++ b/backends/tilegx_retval.c
+@@ -79,7 +79,7 @@ tilegx_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -113,7 +113,7 @@ tilegx_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ return nloc_intreg;
+ }
+
+- /* Else fall through. */
++ FALLTHROUGH;
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+ case DW_TAG_union_type:
+diff --git a/backends/x86_64_regs.c b/backends/x86_64_regs.c
+index 8430440..ef987da 100644
+--- a/backends/x86_64_regs.c
++++ b/backends/x86_64_regs.c
+@@ -87,7 +87,7 @@ x86_64_register_info (Ebl *ebl __attribute__ ((unused)),
+
+ case 6 ... 7:
+ *type = DW_ATE_address;
+- /* Fallthrough */
++ FALLTHROUGH;
+ case 0 ... 5:
+ name[0] = 'r';
+ name[1] = baseregs[regno][0];
+diff --git a/backends/x86_64_retval.c b/backends/x86_64_retval.c
+index b3799ae..f9114cb 100644
+--- a/backends/x86_64_retval.c
++++ b/backends/x86_64_retval.c
+@@ -100,7 +100,7 @@ x86_64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+diff --git a/config/eu.am b/config/eu.am
+index 8fe1e25..b6ec581 100644
+--- a/config/eu.am
++++ b/config/eu.am
+@@ -62,7 +62,9 @@ NULL_DEREFERENCE_WARNING=
+ endif
+
+ if HAVE_IMPLICIT_FALLTHROUGH_WARNING
+-IMPLICIT_FALLTHROUGH_WARNING=-Wimplicit-fallthrough
++# Use strict fallthrough. Only __attribute__((fallthrough)) will prevent the
++# warning
++IMPLICIT_FALLTHROUGH_WARNING=-Wimplicit-fallthrough=5
+ else
+ IMPLICIT_FALLTHROUGH_WARNING=
+ endif
+diff --git a/configure.ac b/configure.ac
+index 1f1856d..698efbb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -360,6 +360,12 @@ CFLAGS="$old_CFLAGS"])
+ AM_CONDITIONAL(HAVE_IMPLICIT_FALLTHROUGH_WARNING,
+ [test "x$ac_cv_implicit_fallthrough" != "xno"])
+
++# Assume the fallthrough attribute is supported if -Wimplict-fallthrough is supported
++if test "$ac_cv_implicit_fallthrough" = "yes"; then
++ AC_DEFINE([HAVE_FALLTHROUGH], [1],
++ [Defined if __attribute__((fallthrough)) is supported])
++fi
++
+ dnl Check if we have argp available from our libc
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+diff --git a/lib/eu-config.h b/lib/eu-config.h
+index 400cdc6..e8d4ec2 100644
+--- a/lib/eu-config.h
++++ b/lib/eu-config.h
+@@ -186,5 +186,12 @@ asm (".section predict_data, \"aw\"; .previous\n"
+ # define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SYMBOL_VERSIONING"
+ #endif
+
++#ifndef FALLTHROUGH
++# ifdef HAVE_FALLTHROUGH
++# define FALLTHROUGH __attribute__ ((fallthrough))
++# else
++# define FALLTHROUGH ((void) 0)
++# endif
++#endif
+
+ #endif /* eu-config.h */
+diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
+index 60fd6d4..837a3a8 100644
+--- a/libcpu/i386_disasm.c
++++ b/libcpu/i386_disasm.c
+@@ -819,7 +819,7 @@ i386_disasm (Ebl *ebl __attribute__((unused)),
+ ++param_start;
+ break;
+ }
+- /* Fallthrough */
++ FALLTHROUGH;
+ default:
+ str = "";
+ assert (! "INVALID not handled");
+diff --git a/libcpu/i386_parse.c b/libcpu/i386_parse.c
+index ef1ac35..6fa7ce3 100644
+--- a/libcpu/i386_parse.c
++++ b/libcpu/i386_parse.c
+@@ -1047,7 +1047,7 @@ yytnamerr (char *yyres, const char *yystr)
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+- /* Fall through. */
++ FALLTHROUGH;
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+@@ -2042,7 +2042,7 @@ yyabortlab:
+ yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+- /* Fall through. */
++ FALLTHROUGH;
+ #endif
+
+ yyreturn:
+diff --git a/libdw/cfi.c b/libdw/cfi.c
+index daa845f..341e055 100644
+--- a/libdw/cfi.c
++++ b/libdw/cfi.c
+@@ -138,7 +138,7 @@ execute_cfi (Dwarf_CFI *cache,
+
+ case DW_CFA_advance_loc1:
+ operand = *program++;
+- /* Fallthrough */
++ FALLTHROUGH;
+ case DW_CFA_advance_loc + 0 ... DW_CFA_advance_loc + CFI_PRIMARY_MAX:
+ advance_loc:
+ loc += operand * cie->code_alignment_factor;
+@@ -301,7 +301,7 @@ execute_cfi (Dwarf_CFI *cache,
+
+ case DW_CFA_restore_extended:
+ get_uleb128 (operand, program, end);
+- /* Fallthrough */
++ FALLTHROUGH;
+ case DW_CFA_restore + 0 ... DW_CFA_restore + CFI_PRIMARY_MAX:
+
+ if (unlikely (abi_cfi) && likely (opcode == DW_CFA_restore))
+diff --git a/libdw/dwarf_frame_register.c b/libdw/dwarf_frame_register.c
+index 37e8e91..d0159fb 100644
+--- a/libdw/dwarf_frame_register.c
++++ b/libdw/dwarf_frame_register.c
+@@ -62,7 +62,7 @@ dwarf_frame_register (Dwarf_Frame *fs, int regno, Dwarf_Op *ops_mem,
+ /* Use the default rule for registers not yet mentioned in CFI. */
+ if (fs->cache->default_same_value)
+ goto same_value;
+- /*FALLTHROUGH*/
++ FALLTHROUGH;
+ case reg_undefined:
+ /* The value is known to be unavailable. */
+ break;
+diff --git a/libdwfl/dwfl_report_elf.c b/libdwfl/dwfl_report_elf.c
+index 6950a37..3fc9384 100644
+--- a/libdwfl/dwfl_report_elf.c
++++ b/libdwfl/dwfl_report_elf.c
+@@ -174,7 +174,7 @@ __libdwfl_elf_address_range (Elf *elf, GElf_Addr base, bool add_p_vaddr,
+ /* An assigned base address is meaningless for these. */
+ base = 0;
+ add_p_vaddr = true;
+- /* Fallthrough. */
++ FALLTHROUGH;
+ case ET_DYN:
+ default:;
+ size_t phnum;
+diff --git a/libdwfl/frame_unwind.c b/libdwfl/frame_unwind.c
+index 4dc9c43..eaea495 100644
+--- a/libdwfl/frame_unwind.c
++++ b/libdwfl/frame_unwind.c
+@@ -442,7 +442,7 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops,
+ }
+ if (val1 == 0)
+ break;
+- /* FALLTHRU */
++ FALLTHROUGH;
+ case DW_OP_skip:;
+ Dwarf_Word offset = op->offset + 1 + 2 + (int16_t) op->number;
+ const Dwarf_Op *found = bsearch ((void *) (uintptr_t) offset, ops, nops,
+diff --git a/libebl/eblobjnote.c b/libebl/eblobjnote.c
+index f80a1a5..ca4f155 100644
+--- a/libebl/eblobjnote.c
++++ b/libebl/eblobjnote.c
+@@ -223,7 +223,7 @@ ebl_object_note (Ebl *ebl, const char *name, uint32_t type,
+ free (buf);
+ break;
+ }
+- /* FALLTHROUGH */
++ FALLTHROUGH;
+
+ default:
+ /* Unknown type. */
+diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c
+index a51bf70..5351518 100644
+--- a/libelf/elf32_updatenull.c
++++ b/libelf/elf32_updatenull.c
+@@ -232,7 +232,7 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum)
+ __libelf_seterrno (ELF_E_GROUP_NOT_REL);
+ return -1;
+ }
+- /* FALLTHROUGH */
++ FALLTHROUGH;
+ case SHT_SYMTAB_SHNDX:
+ sh_entsize = elf_typesize (32, ELF_T_WORD, 1);
+ break;
+diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c
+index 6f85038..6de206a 100644
+--- a/libelf/elf_begin.c
++++ b/libelf/elf_begin.c
+@@ -582,7 +582,7 @@ read_unmmaped_file (int fildes, off_t offset, size_t maxsize, Elf_Cmd cmd,
+ ? sizeof (Elf32_Ehdr) : sizeof (Elf64_Ehdr)))
+ return file_read_elf (fildes, NULL, mem.header, offset, maxsize, cmd,
+ parent);
+- /* FALLTHROUGH */
++ FALLTHROUGH;
+
+ default:
+ break;
+@@ -1097,7 +1097,7 @@ elf_begin (int fildes, Elf_Cmd cmd, Elf *ref)
+ retval = NULL;
+ break;
+ }
+- /* FALLTHROUGH */
++ FALLTHROUGH;
+
+ case ELF_C_READ:
+ case ELF_C_READ_MMAP:
+diff --git a/libelf/elf_cntl.c b/libelf/elf_cntl.c
+index ab13ffb..fd68178 100644
+--- a/libelf/elf_cntl.c
++++ b/libelf/elf_cntl.c
+@@ -62,7 +62,7 @@ elf_cntl (Elf *elf, Elf_Cmd cmd)
+ result = -1;
+ break;
+ }
+- /* FALLTHROUGH */
++ FALLTHROUGH;
+
+ case ELF_C_FDDONE:
+ /* Mark the file descriptor as not usable. */
+diff --git a/src/addr2line.c b/src/addr2line.c
+index ba414a7..444ee52 100644
+--- a/src/addr2line.c
++++ b/src/addr2line.c
+@@ -618,7 +618,7 @@ handle_address (const char *string, Dwfl *dwfl)
+ case 1:
+ addr = 0;
+ j = i;
+- /* Fallthrough */
++ FALLTHROUGH;
+ case 2:
+ if (string[j] != '\0')
+ break;
+diff --git a/src/elfcompress.c b/src/elfcompress.c
+index 8e0d5c5..25378a4 100644
+--- a/src/elfcompress.c
++++ b/src/elfcompress.c
+@@ -149,7 +149,7 @@ parse_opt (int key, char *arg __attribute__ ((unused)),
+ N_("Only one input file allowed together with '-o'"));
+ /* We only use this for checking the number of arguments, we don't
+ actually want to consume them. */
+- /* Fallthrough */
++ FALLTHROUGH;
+ default:
+ return ARGP_ERR_UNKNOWN;
+ }
+diff --git a/src/elflint.c b/src/elflint.c
+index 51e53c2..df1b3a0 100644
+--- a/src/elflint.c
++++ b/src/elflint.c
+@@ -1764,7 +1764,7 @@ section [%2d] '%s': entry %zu: pointer does not match address of section [%2d] '
+ if (dyn->d_tag < DT_ADDRRNGLO || dyn->d_tag > DT_ADDRRNGHI)
+ /* Value is no pointer. */
+ break;
+- /* FALLTHROUGH */
++ FALLTHROUGH;
+
+ case DT_AUXILIARY:
+ case DT_FILTER:
+@@ -3993,7 +3993,7 @@ section [%2zu] '%s': merge flag set but entry size is zero\n"),
+ case SHT_NOBITS:
+ if (is_debuginfo)
+ break;
+- /* Fallthrough */
++ FALLTHROUGH;
+ default:
+ ERROR (gettext ("\
+ section [%2zu] '%s' has unexpected type %d for an executable section\n"),
+@@ -4137,7 +4137,7 @@ section [%2zu] '%s': ELF header says this is the section header string table but
+ ERROR (gettext ("\
+ section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n"),
+ cnt, section_name (ebl, cnt));
+- /* FALLTHROUGH */
++ FALLTHROUGH;
+ case SHT_SYMTAB:
+ check_symtab (ebl, ehdr, shdr, cnt);
+ break;
+@@ -4336,7 +4336,7 @@ section [%2d] '%s': unknown core file note type %" PRIu32
+ if (nhdr.n_namesz == sizeof "Linux"
+ && !memcmp (data->d_buf + name_offset, "Linux", sizeof "Linux"))
+ break;
+- /* Fallthrough */
++ FALLTHROUGH;
+ default:
+ if (shndx == 0)
+ ERROR (gettext ("\
+diff --git a/src/objdump.c b/src/objdump.c
+index 860cfac..0dd9a6a 100644
+--- a/src/objdump.c
++++ b/src/objdump.c
+@@ -223,7 +223,7 @@ parse_opt (int key, char *arg,
+ }
+ /* We only use this for checking the number of arguments, we don't
+ actually want to consume them. */
+- /* Fallthrough */
++ FALLTHROUGH;
+ default:
+ return ARGP_ERR_UNKNOWN;
+ }
+diff --git a/src/readelf.c b/src/readelf.c
+index 346eccd..6a27e7e 100644
+--- a/src/readelf.c
++++ b/src/readelf.c
+@@ -465,7 +465,7 @@ parse_opt (int key, char *arg,
+ print_string_sections = true;
+ break;
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+ case 'x':
+ add_dump_section (arg, false);
+ any_control_option = true;
+@@ -6029,7 +6029,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
+ dwarf_form_name (form), (uintmax_t) num);
+ return DWARF_CB_OK;
+ }
+- /* else fallthrough */
++ FALLTHROUGH;
+
+ /* These cases always take a loclistptr and no constant. */
+ case DW_AT_location:
+@@ -6195,7 +6195,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
+ print_block (block.length, block.data);
+ break;
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_AT_location:
+ case DW_AT_data_location:
+@@ -9227,7 +9227,7 @@ handle_auxv_note (Ebl *ebl, Elf *core, GElf_Word descsz, GElf_Off desc_pos)
+ printf (" %s\n", name);
+ break;
+ }
+- /* Fall through */
++ FALLTHROUGH;
+ case 'x': /* hex */
+ case 'p': /* address */
+ case 's': /* address of string */
+diff --git a/src/strings.c b/src/strings.c
+index d214356..03d0f13 100644
+--- a/src/strings.c
++++ b/src/strings.c
+@@ -246,7 +246,7 @@ parse_opt (int key, char *arg,
+ case 'b':
+ case 'B':
+ big_endian = true;
+- /* FALLTHROUGH */
++ FALLTHROUGH;
+
+ case 'l':
+ case 'L':
+diff --git a/tests/backtrace.c b/tests/backtrace.c
+index 21abe8a..f5dd761 100644
+--- a/tests/backtrace.c
++++ b/tests/backtrace.c
+@@ -127,7 +127,7 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
+ assert (symname2 == NULL || strcmp (symname2, "jmp") != 0);
+ break;
+ }
+- /* FALLTHRU */
++ FALLTHROUGH;
+ case 4:
+ /* Some simple frame unwinders get this wrong and think sigusr2
+ is calling itself again. Allow it and just pretend there is
+diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c
+index 8d5b53c..62c549d 100644
+--- a/tests/elfstrmerge.c
++++ b/tests/elfstrmerge.c
+@@ -578,7 +578,8 @@ main (int argc, char **argv)
+ break;
+
+ case SHT_DYNAMIC:
+- /* Fallthrough. There are string indexes in here, but
++ FALLTHROUGH;
++ /* There are string indexes in here, but
+ they (should) point to a allocated string table,
+ which we don't alter. */
+ default:
+--
+2.14.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
index 8864d44..a42ce7b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
@@ -1,4 +1,4 @@
-From 010b0c57e748440eb1ceb3d977875f2488d2b4ce Mon Sep 17 00:00:00 2001
+From ef0981744669149a00dd0439a54dac30de7b56a7 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 16 Aug 2017 10:06:26 +0800
Subject: [PATCH] build: Provide alternatives for glibc assumptions helps
@@ -10,6 +10,7 @@
Rebase to 0.170
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
---
Makefile.am | 2 +-
lib/color.c | 3 ++-
@@ -83,7 +84,7 @@
69 files changed, 95 insertions(+), 64 deletions(-)
diff --git a/Makefile.am b/Makefile.am
-index 2ff444e..41f77df 100644
+index 2ff444e7..41f77df8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,7 +28,7 @@ pkginclude_HEADERS = version.h
@@ -96,7 +97,7 @@
EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
COPYING COPYING-GPLV2 COPYING-LGPLV3
diff --git a/lib/color.c b/lib/color.c
-index f62389d..a2a84b4 100644
+index f62389d5..a2a84b46 100644
--- a/lib/color.c
+++ b/lib/color.c
@@ -32,13 +32,14 @@
@@ -116,7 +117,7 @@
/* Prototype for option handler. */
static error_t parse_opt (int key, char *arg, struct argp_state *state);
diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h
-index dac2a5f..43016fc 100644
+index dac2a5f5..43016fc3 100644
--- a/lib/fixedsizehash.h
+++ b/lib/fixedsizehash.h
@@ -30,7 +30,6 @@
@@ -128,7 +129,7 @@
#include <system.h>
diff --git a/lib/system.h b/lib/system.h
-index 9203335..1a60131 100644
+index 92033355..1a601319 100644
--- a/lib/system.h
+++ b/lib/system.h
@@ -50,6 +50,16 @@
@@ -149,7 +150,7 @@
#ifndef MAX
#define MAX(m, n) ((m) < (n) ? (n) : (m))
diff --git a/lib/xmalloc.c b/lib/xmalloc.c
-index 0cde384..217b054 100644
+index 0cde384f..217b0541 100644
--- a/lib/xmalloc.c
+++ b/lib/xmalloc.c
@@ -30,7 +30,7 @@
@@ -162,7 +163,7 @@
#include <stddef.h>
#include <stdlib.h>
diff --git a/libasm/asm_end.c b/libasm/asm_end.c
-index ced24f5..4ad918c 100644
+index ced24f50..4ad918c4 100644
--- a/libasm/asm_end.c
+++ b/libasm/asm_end.c
@@ -32,7 +32,7 @@
@@ -175,7 +176,7 @@
#include <stdio.h>
#include <stdlib.h>
diff --git a/libasm/asm_newscn.c b/libasm/asm_newscn.c
-index ddbb25d..74a598d 100644
+index ddbb25df..74a598d9 100644
--- a/libasm/asm_newscn.c
+++ b/libasm/asm_newscn.c
@@ -32,7 +32,7 @@
@@ -188,7 +189,7 @@
#include <stdlib.h>
#include <string.h>
diff --git a/libcpu/i386_gendis.c b/libcpu/i386_gendis.c
-index aae5eae..6d76016 100644
+index aae5eae6..6d760165 100644
--- a/libcpu/i386_gendis.c
+++ b/libcpu/i386_gendis.c
@@ -31,7 +31,7 @@
@@ -201,7 +202,7 @@
#include <stdio.h>
#include <stdlib.h>
diff --git a/libcpu/i386_lex.c b/libcpu/i386_lex.c
-index ba5f4aa..b1e4191 100644
+index ba5f4aa5..b1e41916 100644
--- a/libcpu/i386_lex.c
+++ b/libcpu/i386_lex.c
@@ -577,7 +577,7 @@ char *i386_text;
@@ -214,7 +215,7 @@
#include <libeu.h>
diff --git a/libcpu/i386_parse.c b/libcpu/i386_parse.c
-index ef1ac35..48f2e64 100644
+index 6fa7ce3d..bb270061 100644
--- a/libcpu/i386_parse.c
+++ b/libcpu/i386_parse.c
@@ -107,7 +107,7 @@
@@ -227,7 +228,7 @@
#include <libintl.h>
#include <math.h>
diff --git a/libdw/Makefile.am b/libdw/Makefile.am
-index ff8c291..89e792a 100644
+index ff8c291e..89e792aa 100644
--- a/libdw/Makefile.am
+++ b/libdw/Makefile.am
@@ -105,7 +105,8 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
@@ -241,7 +242,7 @@
libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
# The rpath is necessary for libebl because its $ORIGIN use will
diff --git a/libdw/libdw_alloc.c b/libdw/libdw_alloc.c
-index 28a8cf6..29aeb3f 100644
+index 28a8cf6e..29aeb3f7 100644
--- a/libdw/libdw_alloc.c
+++ b/libdw/libdw_alloc.c
@@ -31,7 +31,7 @@
@@ -254,7 +255,7 @@
#include <stdlib.h>
#include "libdwP.h"
diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c
-index ee0c164..b06ab59 100644
+index ee0c1646..b06ab596 100644
--- a/libdwfl/dwfl_build_id_find_elf.c
+++ b/libdwfl/dwfl_build_id_find_elf.c
@@ -31,6 +31,7 @@
@@ -275,7 +276,7 @@
{
*file_name = name;
diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c
-index 7bcf61c..c345797 100644
+index 7bcf61cc..c345797a 100644
--- a/libdwfl/dwfl_error.c
+++ b/libdwfl/dwfl_error.c
@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error)
@@ -297,7 +298,7 @@
return elf_errmsg (error & 0xffff);
case OTHER_ERROR (LIBDW):
diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c
-index 9775ace..511c4a6 100644
+index 9775aced..511c4a6a 100644
--- a/libdwfl/dwfl_module_getdwarf.c
+++ b/libdwfl/dwfl_module_getdwarf.c
@@ -35,6 +35,7 @@
@@ -309,7 +310,7 @@
#include "../libelf/libelfP.h"
#include "system.h"
diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c
-index 6d5a42a..9267788 100644
+index 6d5a42a6..9267788d 100644
--- a/libdwfl/find-debuginfo.c
+++ b/libdwfl/find-debuginfo.c
@@ -389,7 +389,7 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod,
@@ -322,7 +323,7 @@
fd = find_debuginfo_in_path (mod, canon,
debuglink_file, debuglink_crc,
diff --git a/libdwfl/libdwfl_crc32_file.c b/libdwfl/libdwfl_crc32_file.c
-index f849128..6f0aca1 100644
+index f849128d..6f0aca1b 100644
--- a/libdwfl/libdwfl_crc32_file.c
+++ b/libdwfl/libdwfl_crc32_file.c
@@ -29,6 +29,15 @@
@@ -342,7 +343,7 @@
#define crc32 __libdwfl_crc32
#include <libdwflP.h>
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
-index 9d0fef2..9fc09b8 100644
+index 9d0fef2c..9fc09b88 100644
--- a/libdwfl/linux-kernel-modules.c
+++ b/libdwfl/linux-kernel-modules.c
@@ -40,6 +40,7 @@
@@ -354,7 +355,7 @@
#include <errno.h>
#include <stdio.h>
diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
-index 5371396..2e66dfd 100644
+index 53713963..2e66dfdd 100644
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
@@ -32,7 +32,7 @@
@@ -367,7 +368,7 @@
#include <dwarf.h>
#include <stdlib.h>
diff --git a/libelf/elf.h b/libelf/elf.h
-index 5cf2b93..990b3af 100644
+index 5cf2b934..990b3afb 100644
--- a/libelf/elf.h
+++ b/libelf/elf.h
@@ -21,7 +21,9 @@
@@ -392,7 +393,7 @@
#endif /* elf.h */
diff --git a/libelf/libelf.h b/libelf/libelf.h
-index 547c0f5..dd78799 100644
+index 547c0f50..dd78799e 100644
--- a/libelf/libelf.h
+++ b/libelf/libelf.h
@@ -29,6 +29,7 @@
@@ -404,7 +405,7 @@
#include <sys/types.h>
diff --git a/libelf/libelfP.h b/libelf/libelfP.h
-index 7ee6625..5840899 100644
+index 7ee6625a..58408997 100644
--- a/libelf/libelfP.h
+++ b/libelf/libelfP.h
@@ -32,6 +32,7 @@
@@ -416,7 +417,7 @@
#include <errno.h>
#include <stdbool.h>
diff --git a/src/addr2line.c b/src/addr2line.c
-index ba414a7..04b7116 100644
+index 444ee52c..9596fa67 100644
--- a/src/addr2line.c
+++ b/src/addr2line.c
@@ -23,7 +23,7 @@
@@ -429,7 +430,7 @@
#include <inttypes.h>
#include <libdwfl.h>
diff --git a/src/ar.c b/src/ar.c
-index ec32cee..4efd729 100644
+index ec32cee5..4efd729c 100644
--- a/src/ar.c
+++ b/src/ar.c
@@ -22,7 +22,7 @@
@@ -442,7 +443,7 @@
#include <gelf.h>
#include <libintl.h>
diff --git a/src/arlib.c b/src/arlib.c
-index e0839aa..1143658 100644
+index e0839aab..1143658f 100644
--- a/src/arlib.c
+++ b/src/arlib.c
@@ -21,7 +21,7 @@
@@ -455,7 +456,7 @@
#include <inttypes.h>
#include <libintl.h>
diff --git a/src/arlib2.c b/src/arlib2.c
-index 553fc57..46443d0 100644
+index 553fc57b..46443d0e 100644
--- a/src/arlib2.c
+++ b/src/arlib2.c
@@ -20,7 +20,7 @@
@@ -468,7 +469,7 @@
#include <limits.h>
#include <string.h>
diff --git a/src/elfcmp.c b/src/elfcmp.c
-index 5046420..cff183f 100644
+index 50464207..cff183fa 100644
--- a/src/elfcmp.c
+++ b/src/elfcmp.c
@@ -23,7 +23,7 @@
@@ -481,7 +482,7 @@
#include <locale.h>
#include <libintl.h>
diff --git a/src/elflint.c b/src/elflint.c
-index 51e53c2..da0b0dc 100644
+index df1b3a03..67d8d134 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -24,7 +24,7 @@
@@ -494,7 +495,7 @@
#include <gelf.h>
#include <inttypes.h>
diff --git a/src/findtextrel.c b/src/findtextrel.c
-index 8f1e239..71463af 100644
+index 8f1e239a..71463af3 100644
--- a/src/findtextrel.c
+++ b/src/findtextrel.c
@@ -23,7 +23,7 @@
@@ -507,7 +508,7 @@
#include <gelf.h>
#include <libdw.h>
diff --git a/src/nm.c b/src/nm.c
-index 969c6d3..3113c04 100644
+index 969c6d35..3113c04c 100644
--- a/src/nm.c
+++ b/src/nm.c
@@ -26,7 +26,7 @@
@@ -520,7 +521,7 @@
#include <gelf.h>
#include <inttypes.h>
diff --git a/src/objdump.c b/src/objdump.c
-index 860cfac..61e67bf 100644
+index 0dd9a6aa..9c8bf149 100644
--- a/src/objdump.c
+++ b/src/objdump.c
@@ -21,7 +21,7 @@
@@ -533,7 +534,7 @@
#include <inttypes.h>
#include <libintl.h>
diff --git a/src/ranlib.c b/src/ranlib.c
-index cc0ee23..ae851e4 100644
+index cc0ee233..ae851e40 100644
--- a/src/ranlib.c
+++ b/src/ranlib.c
@@ -24,7 +24,7 @@
@@ -546,7 +547,7 @@
#include <gelf.h>
#include <libintl.h>
diff --git a/src/readelf.c b/src/readelf.c
-index 346eccd..c831aa8 100644
+index 6a27e7e0..4759a965 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -25,7 +25,7 @@
@@ -559,7 +560,7 @@
#include <gelf.h>
#include <inttypes.h>
diff --git a/src/size.c b/src/size.c
-index ad8dbcb..fd83be0 100644
+index ad8dbcbb..fd83be06 100644
--- a/src/size.c
+++ b/src/size.c
@@ -21,7 +21,7 @@
@@ -572,7 +573,7 @@
#include <gelf.h>
#include <inttypes.h>
diff --git a/src/stack.c b/src/stack.c
-index 6f2ff69..6da0243 100644
+index 6f2ff69f..6da0243d 100644
--- a/src/stack.c
+++ b/src/stack.c
@@ -18,7 +18,7 @@
@@ -585,7 +586,7 @@
#include <inttypes.h>
#include <stdio.h>
diff --git a/src/strings.c b/src/strings.c
-index d214356..76cb26b 100644
+index 03d0f133..5c311cbd 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -25,7 +25,7 @@
@@ -598,7 +599,7 @@
#include <gelf.h>
#include <inttypes.h>
diff --git a/src/strip.c b/src/strip.c
-index c7830ec..0d7f148 100644
+index c7830ec6..0d7f148d 100644
--- a/src/strip.c
+++ b/src/strip.c
@@ -24,7 +24,7 @@
@@ -611,7 +612,7 @@
#include <fnmatch.h>
#include <gelf.h>
diff --git a/src/unstrip.c b/src/unstrip.c
-index 5074909..3d4f952 100644
+index 50749093..3d4f9525 100644
--- a/src/unstrip.c
+++ b/src/unstrip.c
@@ -31,7 +31,7 @@
@@ -624,7 +625,7 @@
#include <fnmatch.h>
#include <libintl.h>
diff --git a/tests/addrscopes.c b/tests/addrscopes.c
-index 791569f..54f4311 100644
+index 791569f5..54f4311b 100644
--- a/tests/addrscopes.c
+++ b/tests/addrscopes.c
@@ -25,7 +25,7 @@
@@ -637,7 +638,7 @@
diff --git a/tests/allregs.c b/tests/allregs.c
-index 286f7e3..c9de089 100644
+index 286f7e3c..c9de0897 100644
--- a/tests/allregs.c
+++ b/tests/allregs.c
@@ -21,7 +21,7 @@
@@ -650,7 +651,7 @@
#include <argp.h>
#include <assert.h>
diff --git a/tests/backtrace-data.c b/tests/backtrace-data.c
-index a387d8f..955c27d 100644
+index a387d8ff..955c27d1 100644
--- a/tests/backtrace-data.c
+++ b/tests/backtrace-data.c
@@ -27,7 +27,7 @@
@@ -663,7 +664,7 @@
#include <dwarf.h>
#if defined(__x86_64__) && defined(__linux__)
diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c
-index 2dc8a9a..24ca7fb 100644
+index 2dc8a9a2..24ca7fb0 100644
--- a/tests/backtrace-dwarf.c
+++ b/tests/backtrace-dwarf.c
@@ -22,7 +22,7 @@
@@ -676,7 +677,7 @@
#include <sys/types.h>
#include <sys/wait.h>
diff --git a/tests/backtrace.c b/tests/backtrace.c
-index 21abe8a..d733248 100644
+index f5dd761f..a93a8f03 100644
--- a/tests/backtrace.c
+++ b/tests/backtrace.c
@@ -24,7 +24,7 @@
@@ -689,7 +690,7 @@
#include <dwarf.h>
#ifdef __linux__
diff --git a/tests/buildid.c b/tests/buildid.c
-index 87c1877..2953e6b 100644
+index 87c18773..2953e6bb 100644
--- a/tests/buildid.c
+++ b/tests/buildid.c
@@ -23,7 +23,7 @@
@@ -702,7 +703,7 @@
#include <stdlib.h>
#include <sys/types.h>
diff --git a/tests/debugaltlink.c b/tests/debugaltlink.c
-index 6d97d50..ee7e559 100644
+index 6d97d500..ee7e559e 100644
--- a/tests/debugaltlink.c
+++ b/tests/debugaltlink.c
@@ -23,7 +23,7 @@
@@ -715,7 +716,7 @@
#include <stdlib.h>
#include <sys/types.h>
diff --git a/tests/debuglink.c b/tests/debuglink.c
-index 935d102..741cb81 100644
+index 935d1029..741cb814 100644
--- a/tests/debuglink.c
+++ b/tests/debuglink.c
@@ -21,7 +21,7 @@
@@ -728,7 +729,7 @@
#include <stdlib.h>
#include <sys/types.h>
diff --git a/tests/deleted.c b/tests/deleted.c
-index 6be35bc..0190711 100644
+index 6be35bc2..01907113 100644
--- a/tests/deleted.c
+++ b/tests/deleted.c
@@ -21,7 +21,7 @@
@@ -741,7 +742,7 @@
#ifdef __linux__
#include <sys/prctl.h>
diff --git a/tests/dwfl-addr-sect.c b/tests/dwfl-addr-sect.c
-index 21e470a..1ea1e3b 100644
+index 21e470a3..1ea1e3b2 100644
--- a/tests/dwfl-addr-sect.c
+++ b/tests/dwfl-addr-sect.c
@@ -23,7 +23,7 @@
@@ -754,7 +755,7 @@
#include <argp.h>
#include ELFUTILS_HEADER(dwfl)
diff --git a/tests/dwfl-bug-addr-overflow.c b/tests/dwfl-bug-addr-overflow.c
-index aa8030e..02c8bef 100644
+index aa8030e1..02c8bef9 100644
--- a/tests/dwfl-bug-addr-overflow.c
+++ b/tests/dwfl-bug-addr-overflow.c
@@ -20,7 +20,7 @@
@@ -767,7 +768,7 @@
#include ELFUTILS_HEADER(dwfl)
diff --git a/tests/dwfl-bug-fd-leak.c b/tests/dwfl-bug-fd-leak.c
-index 689cdd7..5973da3 100644
+index 689cdd79..5973da39 100644
--- a/tests/dwfl-bug-fd-leak.c
+++ b/tests/dwfl-bug-fd-leak.c
@@ -24,7 +24,7 @@
@@ -780,7 +781,7 @@
#include <dwarf.h>
diff --git a/tests/dwfl-bug-getmodules.c b/tests/dwfl-bug-getmodules.c
-index 1ee989f..fd62e65 100644
+index 1ee989f8..fd62e653 100644
--- a/tests/dwfl-bug-getmodules.c
+++ b/tests/dwfl-bug-getmodules.c
@@ -18,7 +18,7 @@
@@ -793,7 +794,7 @@
static const Dwfl_Callbacks callbacks =
{
diff --git a/tests/dwfl-report-elf-align.c b/tests/dwfl-report-elf-align.c
-index a4e97d3..f471587 100644
+index a4e97d3c..f471587c 100644
--- a/tests/dwfl-report-elf-align.c
+++ b/tests/dwfl-report-elf-align.c
@@ -20,7 +20,7 @@
@@ -806,7 +807,7 @@
#include <string.h>
#include <stdlib.h>
diff --git a/tests/dwfllines.c b/tests/dwfllines.c
-index 90379dd..cbdf6c4 100644
+index 90379dd2..cbdf6c4c 100644
--- a/tests/dwfllines.c
+++ b/tests/dwfllines.c
@@ -27,7 +27,7 @@
@@ -819,7 +820,7 @@
int
main (int argc, char *argv[])
diff --git a/tests/dwflmodtest.c b/tests/dwflmodtest.c
-index 0027f96..e68d3bc 100644
+index 0027f96b..e68d3bca 100644
--- a/tests/dwflmodtest.c
+++ b/tests/dwflmodtest.c
@@ -23,7 +23,7 @@
@@ -832,7 +833,7 @@
#include <argp.h>
#include ELFUTILS_HEADER(dwfl)
diff --git a/tests/dwflsyms.c b/tests/dwflsyms.c
-index 49ac334..cf07830 100644
+index 49ac3346..cf078301 100644
--- a/tests/dwflsyms.c
+++ b/tests/dwflsyms.c
@@ -25,7 +25,7 @@
@@ -845,7 +846,7 @@
static const char *
diff --git a/tests/early-offscn.c b/tests/early-offscn.c
-index 924cb9e..6f60d5a 100644
+index 924cb9ef..6f60d5a3 100644
--- a/tests/early-offscn.c
+++ b/tests/early-offscn.c
@@ -19,7 +19,7 @@
@@ -858,7 +859,7 @@
#include <gelf.h>
#include <stdio.h>
diff --git a/tests/ecp.c b/tests/ecp.c
-index 38a6859..743cea5 100644
+index 38a6859e..743cea5d 100644
--- a/tests/ecp.c
+++ b/tests/ecp.c
@@ -20,7 +20,7 @@
@@ -871,7 +872,7 @@
#include <gelf.h>
#include <stdlib.h>
diff --git a/tests/find-prologues.c b/tests/find-prologues.c
-index ba8ae37..76f5f04 100644
+index ba8ae371..76f5f047 100644
--- a/tests/find-prologues.c
+++ b/tests/find-prologues.c
@@ -25,7 +25,7 @@
@@ -884,7 +885,7 @@
#include <fnmatch.h>
diff --git a/tests/funcretval.c b/tests/funcretval.c
-index 8d19d11..c8aaa93 100644
+index 8d19d117..c8aaa93d 100644
--- a/tests/funcretval.c
+++ b/tests/funcretval.c
@@ -25,7 +25,7 @@
@@ -897,7 +898,7 @@
#include <fnmatch.h>
diff --git a/tests/funcscopes.c b/tests/funcscopes.c
-index 9c90185..dbccb89 100644
+index 9c901858..dbccb89e 100644
--- a/tests/funcscopes.c
+++ b/tests/funcscopes.c
@@ -25,7 +25,7 @@
@@ -910,7 +911,7 @@
#include <fnmatch.h>
diff --git a/tests/getsrc_die.c b/tests/getsrc_die.c
-index 055aede..9c394dd 100644
+index 055aede0..9c394dd0 100644
--- a/tests/getsrc_die.c
+++ b/tests/getsrc_die.c
@@ -19,7 +19,7 @@
@@ -923,7 +924,7 @@
#include <inttypes.h>
#include <libelf.h>
diff --git a/tests/line2addr.c b/tests/line2addr.c
-index e0d65d3..9bf0023 100644
+index e0d65d3d..9bf0023b 100644
--- a/tests/line2addr.c
+++ b/tests/line2addr.c
@@ -26,7 +26,7 @@
@@ -936,7 +937,7 @@
static void
diff --git a/tests/low_high_pc.c b/tests/low_high_pc.c
-index d0f4302..8da4fbd 100644
+index d0f43023..8da4fbdf 100644
--- a/tests/low_high_pc.c
+++ b/tests/low_high_pc.c
@@ -25,7 +25,7 @@
@@ -949,7 +950,7 @@
#include <fnmatch.h>
diff --git a/tests/md5-sha1-test.c b/tests/md5-sha1-test.c
-index d50355e..3c41f40 100644
+index d50355e9..3c41f40b 100644
--- a/tests/md5-sha1-test.c
+++ b/tests/md5-sha1-test.c
@@ -19,7 +19,7 @@
@@ -962,7 +963,7 @@
#include "md5.h"
#include "sha1.h"
diff --git a/tests/rdwrmmap.c b/tests/rdwrmmap.c
-index 6f027df..1ce5e6e 100644
+index 6f027dfe..1ce5e6ed 100644
--- a/tests/rdwrmmap.c
+++ b/tests/rdwrmmap.c
@@ -19,7 +19,7 @@
@@ -975,7 +976,7 @@
#include <fcntl.h>
#include <unistd.h>
diff --git a/tests/saridx.c b/tests/saridx.c
-index 8a450d8..b387801 100644
+index 8a450d82..b3878013 100644
--- a/tests/saridx.c
+++ b/tests/saridx.c
@@ -17,7 +17,7 @@
@@ -988,7 +989,7 @@
#include <gelf.h>
#include <stdio.h>
diff --git a/tests/sectiondump.c b/tests/sectiondump.c
-index 3033fed..8e888db 100644
+index 3033fedc..8e888db3 100644
--- a/tests/sectiondump.c
+++ b/tests/sectiondump.c
@@ -18,7 +18,7 @@
@@ -1001,7 +1002,7 @@
#include <gelf.h>
#include <inttypes.h>
diff --git a/tests/varlocs.c b/tests/varlocs.c
-index c3fba89..e043ea2 100644
+index c3fba89e..e043ea2c 100644
--- a/tests/varlocs.c
+++ b/tests/varlocs.c
@@ -25,7 +25,7 @@
@@ -1014,7 +1015,7 @@
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/tests/vdsosyms.c b/tests/vdsosyms.c
-index b876c10..afb2823 100644
+index b876c10b..afb28232 100644
--- a/tests/vdsosyms.c
+++ b/tests/vdsosyms.c
@@ -18,7 +18,7 @@
@@ -1026,6 +1027,3 @@
#include <inttypes.h>
#include <stdio.h>
#include <string.h>
---
-1.8.3.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch
deleted file mode 100644
index b2623f9..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-GCC7 adds -Wimplicit-fallthrough to warn when a switch case falls through,
-however this causes warnings (which are promoted to errors) with the elfutils
-patches from Debian for mips and parisc, which use fallthrough's by design.
-
-Explicitly mark the intentional fallthrough switch cases with a comment to
-disable the warnings where the fallthrough behaviour is desired.
-
-Upstream-Status: Pending [debian]
-Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
-
-Index: elfutils-0.168/backends/parisc_retval.c
-===================================================================
---- elfutils-0.168.orig/backends/parisc_retval.c
-+++ elfutils-0.168/backends/parisc_retval.c
-@@ -166,7 +166,7 @@ parisc_return_value_location_ (Dwarf_Die
- return nloc_intregpair;
-
- /* Else fall through. */
-- }
-+ } // fallthrough
-
- case DW_TAG_structure_type:
- case DW_TAG_class_type:
-Index: elfutils-0.168/backends/mips_retval.c
-===================================================================
---- elfutils-0.168.orig/backends/mips_retval.c
-+++ elfutils-0.168/backends/mips_retval.c
-@@ -387,7 +387,7 @@ mips_return_value_location (Dwarf_Die *f
- else
- return nloc_intregpair;
- }
-- }
-+ } // fallthrough
-
- /* Fallthrough to handle large types */
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
index 44fda7f..56f852a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
@@ -1,10 +1,10 @@
Upstream-Status: Backport [from debian]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-Index: b/backends/parisc_init.c
+Index: elfutils-0.170/backends/parisc_init.c
===================================================================
--- /dev/null
-+++ b/backends/parisc_init.c
++++ elfutils-0.170/backends/parisc_init.c
@@ -0,0 +1,73 @@
+/* Initialization of PA-RISC specific backend library.
+ Copyright (C) 2002, 2005, 2006 Red Hat, Inc.
@@ -79,10 +79,10 @@
+
+ return MODVERSION;
+}
-Index: b/backends/parisc_regs.c
+Index: elfutils-0.170/backends/parisc_regs.c
===================================================================
--- /dev/null
-+++ b/backends/parisc_regs.c
++++ elfutils-0.170/backends/parisc_regs.c
@@ -0,0 +1,159 @@
+/* Register names and numbers for PA-RISC DWARF.
+ Copyright (C) 2005, 2006 Red Hat, Inc.
@@ -243,10 +243,10 @@
+ name[namelen++] = '\0';
+ return namelen;
+}
-Index: b/backends/parisc_reloc.def
+Index: elfutils-0.170/backends/parisc_reloc.def
===================================================================
--- /dev/null
-+++ b/backends/parisc_reloc.def
++++ elfutils-0.170/backends/parisc_reloc.def
@@ -0,0 +1,128 @@
+/* List the relocation types for PA-RISC. -*- C -*-
+ Copyright (C) 2005 Red Hat, Inc.
@@ -376,10 +376,10 @@
+RELOC_TYPE (TLS_DTPMOD64, DYN)
+
+#define NO_RELATIVE_RELOC 1
-Index: b/backends/parisc_retval.c
+Index: elfutils-0.170/backends/parisc_retval.c
===================================================================
--- /dev/null
-+++ b/backends/parisc_retval.c
++++ elfutils-0.170/backends/parisc_retval.c
@@ -0,0 +1,213 @@
+/* Function return value location for Linux/PA-RISC ABI.
+ Copyright (C) 2005 Red Hat, Inc.
@@ -594,10 +594,10 @@
+ return parisc_return_value_location_ (functypedie, locp, 1);
+}
+
-Index: b/backends/parisc_symbol.c
+Index: elfutils-0.170/backends/parisc_symbol.c
===================================================================
--- /dev/null
-+++ b/backends/parisc_symbol.c
++++ elfutils-0.170/backends/parisc_symbol.c
@@ -0,0 +1,112 @@
+/* PA-RISC specific symbolic name handling.
+ Copyright (C) 2002, 2005 Red Hat, Inc.
@@ -711,10 +711,10 @@
+ return ELF_T_NUM;
+ }
+}
-Index: b/backends/libebl_parisc.h
+Index: elfutils-0.170/backends/libebl_parisc.h
===================================================================
--- /dev/null
-+++ b/backends/libebl_parisc.h
++++ elfutils-0.170/backends/libebl_parisc.h
@@ -0,0 +1,9 @@
+#ifndef _LIBEBL_HPPA_H
+#define _LIBEBL_HPPA_H 1
@@ -725,10 +725,10 @@
+extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp);
+
+#endif
-Index: b/backends/Makefile.am
+Index: elfutils-0.170/backends/Makefile.am
===================================================================
---- a/backends/Makefile.am
-+++ b/backends/Makefile.am
+--- elfutils-0.170.orig/backends/Makefile.am
++++ elfutils-0.170/backends/Makefile.am
@@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I
@@ -744,7 +744,7 @@
noinst_LIBRARIES = $(libebl_pic)
noinst_DATA = $(libebl_pic:_pic.a=.so)
-@@ -128,6 +128,9 @@ endif
+@@ -124,6 +124,9 @@ cpu_bpf = ../libcpu/libcpu_bpf.a
libebl_bpf_pic_a_SOURCES = $(bpf_SRCS)
am_libebl_bpf_pic_a_OBJECTS = $(bpf_SRCS:.c=.os)
@@ -752,13 +752,13 @@
+libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
+am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
- libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
+ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu)
@rm -f $(@:.so=.map)
-Index: b/libelf/elf.h
+Index: elfutils-0.170/libelf/elf.h
===================================================================
---- a/libelf/elf.h
-+++ b/libelf/elf.h
-@@ -2055,16 +2055,24 @@ enum
+--- elfutils-0.170.orig/libelf/elf.h
++++ elfutils-0.170/libelf/elf.h
+@@ -2056,16 +2056,24 @@ enum
#define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */
#define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */
#define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */
@@ -783,7 +783,7 @@
#define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */
#define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */
#define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */
-@@ -2073,6 +2081,7 @@ enum
+@@ -2074,6 +2082,7 @@ enum
#define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */
#define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */
#define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */
@@ -791,7 +791,7 @@
#define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */
#define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */
#define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */
-@@ -2098,6 +2107,8 @@ enum
+@@ -2099,6 +2108,8 @@ enum
#define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */
#define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */
#define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/expect/expect/0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch b/import-layers/yocto-poky/meta/recipes-devtools/expect/expect/0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch
new file mode 100644
index 0000000..b1d322d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/expect/expect/0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch
@@ -0,0 +1,91 @@
+From f0049b4b2ea55b3b3c53bf6f0275654801c755d2 Mon Sep 17 00:00:00 2001
+From: Li Zhou <li.zhou@windriver.com>
+Date: Thu, 28 Sep 2017 15:54:55 +0800
+Subject: [PATCH] expect: Fix segfaults if Tcl is built with stubs and Expect
+ is used directly from C program
+
+Description: This dirty hack fixes segfaults if Tcl is built with stubs
+ and Expect is used directly from C program.
+Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588817
+Example:
+ #include <stdio.h>
+ #include <tcl8.5/expect.h>
+ int main()
+ {
+ FILE *pipe;
+ char *some_command = "uname";
+ char datum;
+ pipe = exp_popen(some_command);
+ if (pipe == NULL) return 1;
+ while ((datum = getc (pipe)) != EOF)
+ printf("%c",datum);
+ }
+Example:
+ #include <stdio.h>
+ #include "expect.h"
+ main()
+ {
+ int fd = 0;
+ fd = exp_spawnl("echo", "echo", "Hello User: Whats up?", (char*) 0);
+ switch (exp_expectl(fd, exp_regexp, "ser:", 1, exp_end)) {
+ case 1: {
+ printf("GOT ser:\n");
+ break;
+ }
+ default: {
+ printf("DEFAULT\n");
+ return 1;
+ }
+ }
+ printf("Normal Exit\n");
+ return 0;
+ }
+Author: Sergei Golovan <sgolovan@debian.org>
+
+Upstream-Status: Pending
+This patch is backported from fedora changes for expect:
+http://pkgs.fedoraproject.org/cgit/rpms/expect.git/commit/
+?h=master&id=b6737eed550be93182f2ed194e836a6cbbcf4fa3
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ exp_clib.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/exp_clib.c b/exp_clib.c
+index 172c05e..19341d5 100644
+--- a/exp_clib.c
++++ b/exp_clib.c
+@@ -114,7 +114,11 @@ extern unsigned long strtoul _ANSI_ARGS_((CONST char *string,
+ #include <stdlib.h> /* for malloc */
+ #endif
+
+-#include <tcl.h>
++#define ckalloc(x) Tcl_Alloc(x)
++#define ckfree(x) Tcl_Free(x)
++extern char *Tcl_ErrnoMsg(int err);
++extern char *Tcl_Alloc(unsigned int size);
++extern void Tcl_Free(char *ptr);
+ #include "expect.h"
+ #define TclRegError exp_TclRegError
+
+@@ -389,7 +393,7 @@ char *exp;
+ FAIL("regexp too big");
+
+ /* Allocate space. */
+- r = (regexp *)ckalloc(sizeof(regexp) + (unsigned)rcstate->regsize);
++ r = (regexp *)malloc(sizeof(regexp) + (unsigned)rcstate->regsize);
+ if (r == NULL)
+ FAIL("out of space");
+
+@@ -399,7 +403,7 @@ char *exp;
+ rcstate->regcode = r->program;
+ regc(MAGIC, rcstate);
+ if (reg(0, &flags, rcstate) == NULL) {
+- ckfree ((char*) r);
++ free((char*) r);
+ return(NULL);
+ }
+
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.4.bb
new file mode 100644
index 0000000..96eacd9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.4.bb
@@ -0,0 +1,76 @@
+SUMMARY = "tool for automating interactive applications according to a script"
+DESCRIPTION = "Expect is a tool for automating interactive applications according to a script. \
+Following the script, Expect knows what can be expected from a program and what \
+the correct response should be. Expect is also useful for testing these same \
+applications. And by adding Tk, you can also wrap interactive applications in \
+X11 GUIs. An interpreted language provides branching and high-level control \
+structures to direct the dialogue. In addition, the user can take control and \
+interact directly when desired, afterward returning control to the script. \
+"
+HOMEPAGE = "http://sourceforge.net/projects/expect/"
+LICENSE = "PD"
+SECTION = "devel"
+
+LIC_FILES_CHKSUM = "file://license.terms;md5=fbf2de7e9102505b1439db06fc36ce5c"
+
+DEPENDS += "tcl"
+RDEPENDS_${PN} = "tcl"
+
+inherit autotools update-alternatives
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
+ file://0001-configure.in.patch \
+ file://0002-tcl.m4.patch \
+ file://01-example-shebang.patch \
+ file://0001-expect-install-scripts-without-using-the-fixline1-tc.patch \
+ file://0001-Resolve-string-formatting-issues.patch \
+ file://0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch \
+ "
+SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2"
+SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/expect/files/Expect/"
+UPSTREAM_CHECK_REGEX = "/Expect/(?P<pver>(\d+[\.\-_]*)+)/"
+
+S = "${WORKDIR}/${BPN}${PV}"
+
+do_install_append() {
+ install -d ${D}${libdir}
+ install -m 0755 ${D}${libdir}/expect${PV}/libexpect*.so ${D}${libdir}/
+ install -m 0755 ${S}/fixline1 ${D}${libdir}/expect${PV}/
+ install -m 0755 ${S}/example/* ${D}${libdir}/expect${PV}/
+ rm ${D}${libdir}/expect${PV}/libexpect*.so
+ sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl
+}
+
+# Apparently the public Tcl headers are only in /usr/include/tcl8.6
+# when building for the target.
+TCL_INCLUDE_PATH = ""
+TCL_INCLUDE_PATH_class-target = "--with-tclinclude=${STAGING_INCDIR}/tcl8.6"
+
+EXTRA_OECONF += "--with-tcl=${STAGING_LIBDIR} \
+ --enable-shared \
+ --enable-threads \
+ --disable-rpath \
+ ${TCL_INCLUDE_PATH} \
+ "
+EXTRA_OEMAKE_install = " 'SCRIPTS=' "
+
+ALTERNATIVE_${PN} = "mkpasswd"
+ALTERNATIVE_LINK_NAME[mkpasswd] = "${bindir}/mkpasswd"
+# Use lower priority than busybox's mkpasswd (created when built with CONFIG_CRYPTPW)
+ALTERNATIVE_PRIORITY[mkpasswd] = "40"
+
+FILES_${PN}-dev = "${libdir_native}/expect${PV}/libexpect*.so \
+ ${includedir}/expect.h \
+ ${includedir}/expect_tcl.h \
+ ${includedir}/expect_comm.h \
+ ${includedir}/tcldbg.h \
+ ${includedir}/*.h \
+ "
+
+FILES_${PN} += "${libdir}/libexpect${PV}.so \
+ ${libdir}/expect${PV}/* \
+ "
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb b/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb
deleted file mode 100644
index e2d24e8..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb
+++ /dev/null
@@ -1,77 +0,0 @@
-SUMMARY = "tool for automating interactive applications according to a script"
-DESCRIPTION = "Expect is a tool for automating interactive applications according to a script. \
-Following the script, Expect knows what can be expected from a program and what \
-the correct response should be. Expect is also useful for testing these same \
-applications. And by adding Tk, you can also wrap interactive applications in \
-X11 GUIs. An interpreted language provides branching and high-level control \
-structures to direct the dialogue. In addition, the user can take control and \
-interact directly when desired, afterward returning control to the script. \
-"
-HOMEPAGE = "http://sourceforge.net/projects/expect/"
-LICENSE = "PD"
-SECTION = "devel"
-
-LIC_FILES_CHKSUM = "file://license.terms;md5=fbf2de7e9102505b1439db06fc36ce5c"
-
-DEPENDS += "tcl"
-RDEPENDS_${PN} = "tcl"
-
-inherit autotools update-alternatives
-
-PR = "r1"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
- file://0001-configure.in.patch \
- file://0002-tcl.m4.patch \
- file://01-example-shebang.patch \
- file://0001-expect-install-scripts-without-using-the-fixline1-tc.patch \
- file://0001-Resolve-string-formatting-issues.patch \
- "
-SRC_URI[md5sum] = "44e1a4f4c877e9ddc5a542dfa7ecc92b"
-SRC_URI[sha256sum] = "b28dca90428a3b30e650525cdc16255d76bb6ccd65d448be53e620d95d5cc040"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/expect/files/Expect/"
-UPSTREAM_CHECK_REGEX = "/Expect/(?P<pver>(\d+[\.\-_]*)+)/"
-
-S = "${WORKDIR}/${BPN}${PV}"
-
-do_install_append() {
- install -d ${D}${libdir}
- install -m 0755 ${D}${libdir}/expect${PV}/libexpect*.so ${D}${libdir}/
- install -m 0755 ${S}/fixline1 ${D}${libdir}/expect${PV}/
- install -m 0755 ${S}/example/* ${D}${libdir}/expect${PV}/
- rm ${D}${libdir}/expect${PV}/libexpect*.so
- sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl
-}
-
-# Apparently the public Tcl headers are only in /usr/include/tcl8.6
-# when building for the target.
-TCL_INCLUDE_PATH = ""
-TCL_INCLUDE_PATH_class-target = "--with-tclinclude=${STAGING_INCDIR}/tcl8.6"
-
-EXTRA_OECONF += "--with-tcl=${STAGING_LIBDIR} \
- --enable-shared \
- --enable-threads \
- --disable-rpath \
- ${TCL_INCLUDE_PATH} \
- "
-EXTRA_OEMAKE_install = " 'SCRIPTS=' "
-
-ALTERNATIVE_${PN} = "mkpasswd"
-ALTERNATIVE_LINK_NAME[mkpasswd] = "${bindir}/mkpasswd"
-# Use lower priority than busybox's mkpasswd (created when built with CONFIG_CRYPTPW)
-ALTERNATIVE_PRIORITY[mkpasswd] = "40"
-
-FILES_${PN}-dev = "${libdir_native}/expect${PV}/libexpect*.so \
- ${includedir}/expect.h \
- ${includedir}/expect_tcl.h \
- ${includedir}/expect_comm.h \
- ${includedir}/tcldbg.h \
- ${includedir}/*.h \
- "
-
-FILES_${PN} += "${libdir}/libexpect${PV}.so \
- ${libdir}/expect${PV}/* \
- "
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch b/import-layers/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch
index d31ac59..319f9db 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch
@@ -14,17 +14,14 @@
1 file changed, 1 insertion(+)
diff --git a/magic/Magdir/commands b/magic/Magdir/commands
-index 1a46efd..255c04b 100644
+index f6ad1c8..f79e7dd 100644
--- a/magic/Magdir/commands
+++ b/magic/Magdir/commands
@@ -57,6 +57,7 @@
0 string/wt #!\ /usr/bin/awk awk script text executable
!:mime text/x-awk
- 0 regex/4096 =^[A-Za-z0-9_]{0,100}BEGIN[A-Za-z0-9_]{0,100}[{] awk or perl script text
+ 0 regex/4096 =^[\040\t\f\r\n]{0,100}BEGIN[\040\t\f\r\n]{0,100}[{] awk or perl script text
+!:strength - 12
# AT&T Bell Labs' Plan 9 shell
0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.31.bb b/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.31.bb
deleted file mode 100644
index 1b1f502..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.31.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "File classification tool"
-DESCRIPTION = "File attempts to classify files depending \
-on their contents and prints a description if a match is found."
-HOMEPAGE = "http://www.darwinsys.com/file/"
-SECTION = "console/utils"
-
-# two clause BSD
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=6a7382872edb68d33e1a9398b6e03188"
-
-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 \
- file://debian-742262.patch \
- file://0001-Add-P-prompt-into-Usage-info.patch \
- "
-
-SRCREV = "70c5f15060c7ad81150177de83a3e64500a54c9f"
-S = "${WORKDIR}/git"
-
-inherit autotools
-
-EXTRA_OEMAKE_append_class-target = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
-EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
-
-CFLAGS_append = " -std=c99"
-
-FILES_${PN} += "${datadir}/misc/*.mgc"
-
-do_install_append_class-native() {
- create_cmdline_wrapper ${D}/${bindir}/file \
- --magic-file ${datadir}/misc/magic.mgc
-}
-
-do_install_append_class-nativesdk() {
- create_cmdline_wrapper ${D}/${bindir}/file \
- --magic-file ${datadir}/misc/magic.mgc
-}
-
-BBCLASSEXTEND = "native nativesdk"
-PROVIDES_append_class-native = " file-replacement-native"
-# Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who
-# depends on file-replacement-native.
-bindir_append_class-native = "/file-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.32.bb b/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.32.bb
new file mode 100644
index 0000000..5e15925
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.32.bb
@@ -0,0 +1,48 @@
+SUMMARY = "File classification tool"
+DESCRIPTION = "File attempts to classify files depending \
+on their contents and prints a description if a match is found."
+HOMEPAGE = "http://www.darwinsys.com/file/"
+SECTION = "console/utils"
+
+# two clause BSD
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=6a7382872edb68d33e1a9398b6e03188"
+
+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 \
+ file://debian-742262.patch \
+ file://0001-Add-P-prompt-into-Usage-info.patch \
+ "
+
+SRCREV = "d474e35513940dbca039b510b4de705b44f5bd9c"
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+EXTRA_OEMAKE_append_class-target = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
+EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
+
+CFLAGS_append = " -std=c99"
+
+FILES_${PN} += "${datadir}/misc/*.mgc"
+
+do_install_append_class-native() {
+ create_cmdline_wrapper ${D}/${bindir}/file \
+ --magic-file ${datadir}/misc/magic.mgc
+}
+
+do_install_append_class-nativesdk() {
+ create_cmdline_wrapper ${D}/${bindir}/file \
+ --magic-file ${datadir}/misc/magic.mgc
+}
+
+BBCLASSEXTEND = "native nativesdk"
+PROVIDES_append_class-native = " file-replacement-native"
+# Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who
+# depends on file-replacement-native.
+bindir_append_class-native = "/file-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
index 032833a..29792ef 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
@@ -2,11 +2,11 @@
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
-Index: flex-2.5.37/doc/Makefile.am
+Index: flex-2.6.0/doc/Makefile.am
===================================================================
---- flex-2.5.37.orig/doc/Makefile.am 2012-07-21 04:18:27.000000000 +0300
-+++ flex-2.5.37/doc/Makefile.am 2013-07-30 17:57:09.834834531 +0300
-@@ -2,7 +2,7 @@
+--- flex-2.6.0.orig/doc/Makefile.am
++++ flex-2.6.0/doc/Makefile.am
+@@ -2,7 +2,7 @@ help2man = @HELP2MAN@
info_TEXINFOS = flex.texi
dist_man_MANS = flex.1
@@ -14,4 +14,4 @@
+EXTRA_DIST= flex.pdf
CLEANFILES = \
- flex.hks \
+ flex.aux \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb
index a906fe8..b89b751 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb
@@ -43,6 +43,10 @@
create_wrapper ${D}/${bindir}/flex M4=${M4}
}
+PACKAGES =+ "${PN}-libfl"
+
+FILES_${PN}-libfl = "${libdir}/libfl.so.* ${libdir}/libfl_pic.so.*"
+
RDEPENDS_${PN} += "m4"
RDEPENDS_${PN}-ptest += "bash gawk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4.inc
deleted file mode 100644
index 42eabef..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4.inc
+++ /dev/null
@@ -1,145 +0,0 @@
-require gcc-common.inc
-
-# Third digit in PV should be incremented after a minor release
-
-PV = "6.4.0"
-
-# BINV should be incremented to a revision after a minor gcc release
-
-BINV = "6.4.0"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-6.4:${FILE_DIRNAME}/gcc-6.4/backport:"
-
-DEPENDS =+ "mpfr gmp libmpc zlib"
-NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"
-
-LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
-
-LIC_FILES_CHKSUM = "\
- file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
- file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
-"
-
-
-BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.xz"
-#SRCREV = "bd9a826d5448db11d29d2ec5884e7e679066f140"
-#BASEURI ?= "git://github.com/gcc-mirror/gcc;branch=gcc-6-branch;protocol=git"
-#BASEURI ?= "ftp://sourceware.org/pub/gcc/snapshots/6.2.0-RC-20160815/gcc-6.2.0-RC-20160815.tar.bz2"
-
-SRC_URI = "\
- ${BASEURI} \
- file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
- file://0008-missing-execinfo_h.patch \
- file://0009-c99-snprintf.patch \
- file://0010-gcc-poison-system-directories.patch \
- file://0011-gcc-poison-dir-extend.patch \
- file://0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
- file://0013-64-bit-multilib-hack.patch \
- file://0014-optional-libstdc.patch \
- file://0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
- file://0016-COLLECT_GCC_OPTIONS.patch \
- file://0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
- file://0018-fortran-cross-compile-hack.patch \
- file://0019-cpp-honor-sysroot.patch \
- file://0020-MIPS64-Default-to-N64-ABI.patch \
- file://0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
- file://0022-gcc-Fix-argument-list-too-long-error.patch \
- file://0023-Disable-sdt.patch \
- file://0024-libtool.patch \
- file://0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
- file://0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
- file://0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
- file://0028-export-CPP.patch \
- file://0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
- file://0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \
- file://0031-Ensure-target-gcc-headers-can-be-included.patch \
- file://0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \
- file://0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
- file://0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \
- file://0035-aarch64-Add-support-for-musl-ldso.patch \
- file://0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
- file://0037-handle-sysroot-support-for-nativesdk-gcc.patch \
- file://0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
- file://0039-Fix-various-_FOR_BUILD-and-related-variables.patch \
- file://0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch \
- file://0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \
- file://0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch \
- file://0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \
- file://0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch \
- file://0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \
- file://0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
- file://0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
- file://0048-sync-gcc-stddef.h-with-musl.patch \
- file://0054_all_nopie-all-flags.patch \
- file://0055-unwind_h-glibc26.patch \
- ${BACKPORTS} \
-"
-BACKPORTS = "\
- file://CVE-2016-6131.patch \
- file://0057-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch \
- file://0001-enable-FL_LPAE-flag-for-armv7ve-cores.patch \
- file://0001-i386-Move-struct-ix86_frame-to-machine_function.patch \
- file://0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch \
- file://0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch \
- file://0004-x86-Add-mindirect-branch.patch \
- file://0005-x86-Add-mfunction-return.patch \
- file://0006-x86-Add-mindirect-branch-register.patch \
- file://0007-x86-Add-V-register-operand-modifier.patch \
- file://0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch \
- file://0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch \
- file://0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch \
- file://0011-i386-Update-mfunction-return-for-return-with-pop.patch \
- file://0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch \
- file://0013-gcc-sanitizers.patch \
-"
-
-SRC_URI[md5sum] = "11ba51a0cfb8471927f387c8895fe232"
-SRC_URI[sha256sum] = "850bf21eafdfe5cd5f6827148184c08c4a0852a37ccf36ce69855334d2c914d4"
-
-S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
-#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git"
-B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
-
-# Language Overrides
-FORTRAN = ""
-JAVA = ""
-
-LTO = "--enable-lto"
-
-EXTRA_OECONF_BASE = "\
- ${LTO} \
- --enable-libssp \
- --enable-libitm \
- --disable-bootstrap \
- --disable-libmudflap \
- --with-system-zlib \
- --with-linker-hash-style=${LINKER_HASH_STYLE} \
- --enable-linker-build-id \
- --with-ppl=no \
- --with-cloog=no \
- --enable-checking=release \
- --enable-cheaders=c_global \
- --without-isl \
-"
-
-EXTRA_OECONF_INITIAL = "\
- --disable-libmudflap \
- --disable-libgomp \
- --disable-libitm \
- --disable-libquadmath \
- --with-system-zlib \
- --disable-lto \
- --disable-plugin \
- --enable-decimal-float=no \
- --without-isl \
- gcc_cv_libc_provides_ssp=yes \
-"
-
-EXTRA_OECONF_PATHS = "\
- --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
- --with-sysroot=/not/exist \
- --with-build-sysroot=${STAGING_DIR_TARGET} \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
deleted file mode 100644
index 415f091..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 92ed30da16b7487b334f739be177eb39885ab772 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:37:11 +0400
-Subject: [PATCH 01/46] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- configure | 2 +-
- configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 35f231e..bfadc33 100755
---- a/configure
-+++ b/configure
-@@ -7550,7 +7550,7 @@ fi
- # for target_alias and gcc doesn't manage it consistently.
- target_configargs="--cache-file=./config.cache ${target_configargs}"
-
--FLAGS_FOR_TARGET=
-+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
- case " $target_configdirs " in
- *" newlib "*)
- case " $target_configargs " in
-diff --git a/configure.ac b/configure.ac
-index 74bf58a..197d61b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -3149,7 +3149,7 @@ fi
- # for target_alias and gcc doesn't manage it consistently.
- target_configargs="--cache-file=./config.cache ${target_configargs}"
-
--FLAGS_FOR_TARGET=
-+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
- case " $target_configdirs " in
- *" newlib "*)
- case " $target_configargs " in
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0008-missing-execinfo_h.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0008-missing-execinfo_h.patch
deleted file mode 100644
index 01e7c95..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0008-missing-execinfo_h.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 6dde3da24ef4b9b357bca670d8551cab3fdda843 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:48:10 +0400
-Subject: [PATCH 08/46] missing-execinfo_h
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- boehm-gc/include/gc.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h
-index 6b38f2d..fca98ff 100644
---- a/boehm-gc/include/gc.h
-+++ b/boehm-gc/include/gc.h
-@@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
- #if defined(__linux__) || defined(__GLIBC__)
- # include <features.h>
- # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
-- && !defined(__ia64__)
-+ && !defined(__ia64__) && !defined(__UCLIBC__)
- # ifndef GC_HAVE_BUILTIN_BACKTRACE
- # define GC_HAVE_BUILTIN_BACKTRACE
- # endif
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0009-c99-snprintf.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0009-c99-snprintf.patch
deleted file mode 100644
index d62341a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0009-c99-snprintf.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From b794f1f1c1c7c06f3f0d78cf76c4fb90c2ab8dfb Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:49:03 +0400
-Subject: [PATCH 09/46] c99-snprintf
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/include/c_std/cstdio | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio
-index a4119ba..8396f43 100644
---- a/libstdc++-v3/include/c_std/cstdio
-+++ b/libstdc++-v3/include/c_std/cstdio
-@@ -144,7 +144,7 @@ namespace std
- using ::vsprintf;
- } // namespace std
-
--#if _GLIBCXX_USE_C99_STDIO
-+#if _GLIBCXX_USE_C99_STDIO || defined(__UCLIBC__)
-
- #undef snprintf
- #undef vfscanf
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0010-gcc-poison-system-directories.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0010-gcc-poison-system-directories.patch
deleted file mode 100644
index ac4cf44..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0010-gcc-poison-system-directories.patch
+++ /dev/null
@@ -1,192 +0,0 @@
-From d76250323dad69212c958e4857a98d99ab51a39e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:59:00 +0400
-Subject: [PATCH 10/46] gcc: poison-system-directories
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [distribution: codesourcery]
----
- gcc/common.opt | 4 ++++
- gcc/config.in | 6 ++++++
- gcc/configure | 16 ++++++++++++++++
- gcc/configure.ac | 10 ++++++++++
- gcc/doc/invoke.texi | 9 +++++++++
- gcc/gcc.c | 2 ++
- gcc/incpath.c | 19 +++++++++++++++++++
- 7 files changed, 66 insertions(+)
-
-diff --git a/gcc/common.opt b/gcc/common.opt
-index 67048db..733185c 100644
---- a/gcc/common.opt
-+++ b/gcc/common.opt
-@@ -659,6 +659,10 @@ Wreturn-local-addr
- Common Var(warn_return_local_addr) Init(1) Warning
- Warn about returning a pointer/reference to a local or temporary variable.
-
-+Wpoison-system-directories
-+Common Var(flag_poison_system_directories) Init(1) Warning
-+Warn for -I and -L options using system directories if cross compiling
-+
- Wshadow
- Common Var(warn_shadow) Warning
- Warn when one local variable shadows another.
-diff --git a/gcc/config.in b/gcc/config.in
-index 115cb61..105b30f 100644
---- a/gcc/config.in
-+++ b/gcc/config.in
-@@ -187,6 +187,12 @@
- #endif
-
-
-+/* Define to warn for use of native system header directories */
-+#ifndef USED_FOR_TARGET
-+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
-+#endif
-+
-+
- /* Define if you want all operations on RTL (the basic data structure of the
- optimizer and back end) to be checked for dynamic type safety at runtime.
- This is quite expensive. */
-diff --git a/gcc/configure b/gcc/configure
-index 1c6e340..8f83152 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -942,6 +942,7 @@ with_system_zlib
- enable_maintainer_mode
- enable_link_mutex
- enable_version_specific_runtime_libs
-+enable_poison_system_directories
- enable_plugin
- enable_host_shared
- enable_libquadmath_support
-@@ -1681,6 +1682,8 @@ Optional Features:
- --enable-version-specific-runtime-libs
- specify that runtime libraries should be installed
- in a compiler-specific directory
-+ --enable-poison-system-directories
-+ warn for use of native system header directories
- --enable-plugin enable plugin support
- --enable-host-shared build host code as shared libraries
- --disable-libquadmath-support
-@@ -28908,6 +28911,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
- fi
-
-
-+# Check whether --enable-poison-system-directories was given.
-+if test "${enable_poison_system_directories+set}" = set; then :
-+ enableval=$enable_poison_system_directories;
-+else
-+ enable_poison_system_directories=no
-+fi
-+
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+
-+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
-+
-+fi
-+
- # Substitute configuration variables
-
-
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 6c1dcd9..0fccaef 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5861,6 +5861,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
- [specify that runtime libraries should be
- installed in a compiler-specific directory])])
-
-+AC_ARG_ENABLE([poison-system-directories],
-+ AS_HELP_STRING([--enable-poison-system-directories],
-+ [warn for use of native system header directories]),,
-+ [enable_poison_system_directories=no])
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
-+ [1],
-+ [Define to warn for use of native system header directories])
-+fi
-+
- # Substitute configuration variables
- AC_SUBST(subdirs)
- AC_SUBST(srcdir)
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 821f8fd..8bb49e7 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -284,6 +284,7 @@ Objective-C and Objective-C++ Dialects}.
- -Wparentheses -Wno-pedantic-ms-format @gol
- -Wplacement-new -Wplacement-new=@var{n} @gol
- -Wpointer-arith -Wno-pointer-to-int-cast @gol
-+-Wno-poison-system-directories @gol
- -Wno-pragmas -Wredundant-decls -Wno-return-local-addr @gol
- -Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol
- -Wshift-overflow -Wshift-overflow=@var{n} @gol
-@@ -4723,6 +4724,14 @@ made up of data only and thus requires no special treatment. But, for
- most targets, it is made up of code and thus requires the stack to be
- made executable in order for the program to work properly.
-
-+@item -Wno-poison-system-directories
-+@opindex Wno-poison-system-directories
-+Do not warn for @option{-I} or @option{-L} options using system
-+directories such as @file{/usr/include} when cross compiling. This
-+option is intended for use in chroot environments when such
-+directories contain the correct headers and libraries for the target
-+system rather than the host.
-+
- @item -Wfloat-equal
- @opindex Wfloat-equal
- @opindex Wno-float-equal
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 1af5920..4cfef7f 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1017,6 +1017,8 @@ proper position among the other output files. */
- "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
- "%X %{o*} %{e*} %{N} %{n} %{r}\
- %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \
-+ %{Wno-poison-system-directories:--no-poison-system-directories} \
-+ %{Werror=poison-system-directories:--error-poison-system-directories} \
- %{static:} %{L*} %(mfwrap) %(link_libgcc) " \
- VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \
- %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
-diff --git a/gcc/incpath.c b/gcc/incpath.c
-index ea40f4a..856da41 100644
---- a/gcc/incpath.c
-+++ b/gcc/incpath.c
-@@ -26,6 +26,7 @@
- #include "intl.h"
- #include "incpath.h"
- #include "cppdefault.h"
-+#include "diagnostic-core.h"
-
- /* Microsoft Windows does not natively support inodes.
- VMS has non-numeric inodes. */
-@@ -381,6 +382,24 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
- }
- fprintf (stderr, _("End of search list.\n"));
- }
-+
-+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
-+ if (flag_poison_system_directories)
-+ {
-+ struct cpp_dir *p;
-+
-+ for (p = heads[QUOTE]; p; p = p->next)
-+ {
-+ if ((!strncmp (p->name, "/usr/include", 12))
-+ || (!strncmp (p->name, "/usr/local/include", 18))
-+ || (!strncmp (p->name, "/usr/X11R6/include", 18)))
-+ warning (OPT_Wpoison_system_directories,
-+ "include location \"%s\" is unsafe for "
-+ "cross-compilation",
-+ p->name);
-+ }
-+ }
-+#endif
- }
-
- /* Use given -I paths for #include "..." but not #include <...>, and
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0011-gcc-poison-dir-extend.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0011-gcc-poison-dir-extend.patch
deleted file mode 100644
index a1736ae..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0011-gcc-poison-dir-extend.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From a1c24b59def393e43cd50b6768604a212c788ed3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:00:34 +0400
-Subject: [PATCH 11/46] gcc-poison-dir-extend
-
-Add /sw/include and /opt/include based on the original
-zecke-no-host-includes.patch patch. The original patch checked for
-/usr/include, /sw/include and /opt/include and then triggered a failure and
-aborted.
-
-Instead, we add the two missing items to the current scan. If the user
-wants this to be a failure, they can add "-Werror=poison-system-directories".
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/incpath.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/incpath.c b/gcc/incpath.c
-index 856da41..d2fc82c 100644
---- a/gcc/incpath.c
-+++ b/gcc/incpath.c
-@@ -392,7 +392,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
- {
- if ((!strncmp (p->name, "/usr/include", 12))
- || (!strncmp (p->name, "/usr/local/include", 18))
-- || (!strncmp (p->name, "/usr/X11R6/include", 18)))
-+ || (!strncmp (p->name, "/usr/X11R6/include", 18))
-+ || (!strncmp (p->name, "/sw/include", 11))
-+ || (!strncmp (p->name, "/opt/include", 12)))
- warning (OPT_Wpoison_system_directories,
- "include location \"%s\" is unsafe for "
- "cross-compilation",
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
deleted file mode 100644
index 939b070..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 00ef5f0f2a8d3b33aeb1e55c0d23439f4dd495af Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:08:31 +0400
-Subject: [PATCH 12/46] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET
-
-Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
-
-This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET.
-
-Other changes I had to do include:
-
-- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though.
-
-- passing the right CFLAGS to configure scripts as exported environment variables
-
-I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do.
-
-Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?
-
-Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- configure | 32 ++++++++++++++++++++++++++++++++
- 1 file changed, 32 insertions(+)
-
-diff --git a/configure b/configure
-index bfadc33..755d382 100755
---- a/configure
-+++ b/configure
-@@ -6819,6 +6819,38 @@ fi
-
-
-
-+# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
-+# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
-+# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
-+# We want to ensure that TARGET libraries (which we know are built with
-+# gcc) are built with "-O2 -g", so include those options when setting
-+# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
-+if test "x$CFLAGS_FOR_TARGET" = x; then
-+ CFLAGS_FOR_TARGET=$CFLAGS
-+ case " $CFLAGS " in
-+ *" -O2 "*) ;;
-+ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
-+ esac
-+ case " $CFLAGS " in
-+ *" -g "* | *" -g3 "*) ;;
-+ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
-+ esac
-+fi
-+
-+
-+if test "x$CXXFLAGS_FOR_TARGET" = x; then
-+ CXXFLAGS_FOR_TARGET=$CXXFLAGS
-+ case " $CXXFLAGS " in
-+ *" -O2 "*) ;;
-+ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
-+ esac
-+ case " $CXXFLAGS " in
-+ *" -g "* | *" -g3 "*) ;;
-+ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
-+ esac
-+fi
-+
-+
- # Handle --with-headers=XXX. If the value is not "yes", the contents of
- # the named directory are copied to $(tooldir)/sys-include.
- if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0013-64-bit-multilib-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0013-64-bit-multilib-hack.patch
deleted file mode 100644
index e31cde4..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0013-64-bit-multilib-hack.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 7fc7a070ac53a55950a1eac76f02877d4106b4b3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:10:06 +0400
-Subject: [PATCH 13/46] 64-bit multilib hack.
-
-GCC has internal multilib handling code but it assumes a very specific rigid directory
-layout. The build system implementation of multilib layout is very generic and allows
-complete customisation of the library directories.
-
-This patch is a partial solution to allow any custom directories to be passed into gcc
-and handled correctly. It forces gcc to use the base_libdir (which is the current
-directory, "."). We need to do this for each multilib that is configured as we don't
-know which compiler options may be being passed into the compiler. Since we have a compiler
-per mulitlib at this point that isn't an issue.
-
-The one problem is the target compiler is only going to work for the default multlilib at
-this point. Ideally we'd figure out which multilibs were being enabled with which paths
-and be able to patch these entries with a complete set of correct paths but this we
-don't have such code at this point. This is something the target gcc recipe should do
-and override these platform defaults in its build config.
-
-RP 15/8/11
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/i386/t-linux64 | 6 ++----
- gcc/config/mips/t-linux64 | 10 +++-------
- gcc/config/rs6000/t-linux64 | 5 ++---
- 3 files changed, 7 insertions(+), 14 deletions(-)
-
-diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
-index c0cc8a3..365a5d6 100644
---- a/gcc/config/i386/t-linux64
-+++ b/gcc/config/i386/t-linux64
-@@ -32,7 +32,5 @@
- #
- comma=,
- MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
--MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
--MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
--MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
--MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
-+MULTILIB_DIRNAMES = . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
-index 16c8adf..b932ace 100644
---- a/gcc/config/mips/t-linux64
-+++ b/gcc/config/mips/t-linux64
-@@ -17,10 +17,6 @@
- # <http://www.gnu.org/licenses/>.
-
- MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
--MULTILIB_DIRNAMES = n32 32 64
--MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
--MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
--MULTILIB_OSDIRNAMES = \
-- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
-- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
-- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
-+MULTILIB_DIRNAMES = . . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-+
-diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
-index fa7550b..9b5d9ef 100644
---- a/gcc/config/rs6000/t-linux64
-+++ b/gcc/config/rs6000/t-linux64
-@@ -26,10 +26,9 @@
- # MULTILIB_OSDIRNAMES according to what is found on the target.
-
- MULTILIB_OPTIONS := m64/m32
--MULTILIB_DIRNAMES := 64 32
-+MULTILIB_DIRNAMES := . .
- MULTILIB_EXTRA_OPTS :=
--MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
--MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
-+MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-
- rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
- $(COMPILE) $<
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0014-optional-libstdc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0014-optional-libstdc.patch
deleted file mode 100644
index 44b0cc7..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0014-optional-libstdc.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From 36275f7981bdaf919bbc9b51a7c7fae1e192adb3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:12:56 +0400
-Subject: [PATCH 14/46] optional libstdc
-
-gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
-will not run correctly since by default the linker will try to link against libstdc++
-which shouldn't exist yet. We need an option to disable -lstdc++
-option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc
-driver. This patch adds such an option which only disables the -lstdc++.
-
-A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
-do this officially, the likely answer is don't build libstdc++ separately.
-
-RP 29/6/10
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- gcc/c-family/c.opt | 4 ++++
- gcc/cp/g++spec.c | 1 +
- gcc/doc/invoke.texi | 32 +++++++++++++++++++++++++++++++-
- gcc/gcc.c | 1 +
- 4 files changed, 37 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
-index 4f86876..660da6c 100644
---- a/gcc/c-family/c.opt
-+++ b/gcc/c-family/c.opt
-@@ -1647,6 +1647,10 @@ nostdinc++
- C++ ObjC++
- Do not search standard system include directories for C++.
-
-+nostdlib++
-+Driver
-+Do not link standard C++ runtime library
-+
- o
- C ObjC C++ ObjC++ Joined Separate
- ; Documented in common.opt
-diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
-index 03cbde0..3642540 100644
---- a/gcc/cp/g++spec.c
-+++ b/gcc/cp/g++spec.c
-@@ -137,6 +137,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
- switch (decoded_options[i].opt_index)
- {
- case OPT_nostdlib:
-+ case OPT_nostdlib__:
- case OPT_nodefaultlibs:
- library = -1;
- break;
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 8bb49e7..84d68aa 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -207,6 +207,9 @@ in the following sections.
- -fno-weak -nostdinc++ @gol
- -fvisibility-inlines-hidden @gol
- -fvisibility-ms-compat @gol
-+-fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol
-+-fvtv-counts -fvtv-debug @gol
-+-nostdlib++ @gol
- -fext-numeric-literals @gol
- -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol
- -Wdelete-non-virtual-dtor -Wliteral-suffix -Wmultiple-inheritance @gol
-@@ -470,7 +473,7 @@ Objective-C and Objective-C++ Dialects}.
- -s -static -static-libgcc -static-libstdc++ @gol
- -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol
- -static-libmpx -static-libmpxwrappers @gol
---shared -shared-libgcc -symbolic @gol
-+-shared -shared-libgcc -symbolic -nostdlib++ @gol
- -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol
- -u @var{symbol} -z @var{keyword}}
-
-@@ -10601,6 +10604,33 @@ library subroutines.
- constructors are called; @pxref{Collect2,,@code{collect2}, gccint,
- GNU Compiler Collection (GCC) Internals}.)
-
-+@item -nostdlib++
-+@opindex nostdlib++
-+Do not use the standard system C++ runtime libraries when linking.
-+Only the libraries you specify will be passed to the linker.
-+
-+@cindex @option{-lgcc}, use with @option{-nostdlib}
-+@cindex @option{-nostdlib} and unresolved references
-+@cindex unresolved references and @option{-nostdlib}
-+@cindex @option{-lgcc}, use with @option{-nodefaultlibs}
-+@cindex @option{-nodefaultlibs} and unresolved references
-+@cindex unresolved references and @option{-nodefaultlibs}
-+One of the standard libraries bypassed by @option{-nostdlib} and
-+@option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines
-+which GCC uses to overcome shortcomings of particular machines, or special
-+needs for some languages.
-+(@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler
-+Collection (GCC) Internals},
-+for more discussion of @file{libgcc.a}.)
-+In most cases, you need @file{libgcc.a} even when you want to avoid
-+other standard libraries. In other words, when you specify @option{-nostdlib}
-+or @option{-nodefaultlibs} you should usually specify @option{-lgcc} as well.
-+This ensures that you have no unresolved references to internal GCC
-+library subroutines.
-+(An example of such an internal subroutine is @code{__main}, used to ensure C++
-+constructors are called; @pxref{Collect2,,@code{collect2}, gccint,
-+GNU Compiler Collection (GCC) Internals}.)
-+
- @item -pie
- @opindex pie
- Produce a position independent executable on targets that support it.
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 4cfef7f..da0b482 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1028,6 +1028,7 @@ proper position among the other output files. */
- %(mflib) " STACK_SPLIT_SPEC "\
- %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
- %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
-+ %{!nostdlib++:}\
- %{!nostdlib:%{!nostartfiles:%E}} %{T*} \n%(post_link) }}}}}}"
- #endif
-
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
deleted file mode 100644
index 6fc7346..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 9346f6042d8f7f85a75ca2af15f3b8d234985165 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:14:20 +0400
-Subject: [PATCH 15/46] gcc: disable MASK_RELAX_PIC_CALLS bit
-
-The new feature added after 4.3.3
-"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html"
-will cause cc1plus eat up all the system memory when build webkit-gtk.
-The function mips_get_pic_call_symbol keeps on recursively calling itself.
-Disable this feature to walk aside the bug.
-
-Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- gcc/configure | 7 -------
- gcc/configure.ac | 7 -------
- 2 files changed, 14 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 8f83152..5e72f17 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -27018,13 +27018,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6;
- rm -f conftest.*
- fi
- fi
-- if test $gcc_cv_as_ld_jalr_reloc = yes; then
-- if test x$target_cpu_default = x; then
-- target_cpu_default=MASK_RELAX_PIC_CALLS
-- else
-- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
-- fi
-- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
- $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
-
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 0fccaef..dd8f6fa 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -4522,13 +4522,6 @@ x:
- rm -f conftest.*
- fi
- fi
-- if test $gcc_cv_as_ld_jalr_reloc = yes; then
-- if test x$target_cpu_default = x; then
-- target_cpu_default=MASK_RELAX_PIC_CALLS
-- else
-- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
-- fi
-- fi
- AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc)
-
- AC_CACHE_CHECK([linker for .eh_frame personality relaxation],
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0016-COLLECT_GCC_OPTIONS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0016-COLLECT_GCC_OPTIONS.patch
deleted file mode 100644
index c154864..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0016-COLLECT_GCC_OPTIONS.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 1033bc2d4efc5c301bb822b607a673f5b10cc69f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:16:28 +0400
-Subject: [PATCH 16/46] COLLECT_GCC_OPTIONS
-
-This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to
-invoke collect2.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/gcc.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index da0b482..7ca129f 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -4591,6 +4591,15 @@ set_collect_gcc_options (void)
- sizeof ("COLLECT_GCC_OPTIONS=") - 1);
-
- first_time = TRUE;
-+#ifdef HAVE_LD_SYSROOT
-+ if (target_system_root_changed && target_system_root)
-+ {
-+ obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1);
-+ obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root));
-+ obstack_grow (&collect_obstack, "'", 1);
-+ first_time = FALSE;
-+ }
-+#endif
- for (i = 0; (int) i < n_switches; i++)
- {
- const char *const *args;
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
deleted file mode 100644
index 0dbabd9..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 67123a306880af997a99ae514677c2da4973bd1a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:17:25 +0400
-Subject: [PATCH 17/46] Use the defaults.h in ${B} instead of ${S}, and t-oe in
- ${B}
-
-Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that
-the source can be shared between gcc-cross-initial,
-gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-
-While compiling gcc-crosssdk-initial-x86_64 on some host, there is
-occasionally failure that test the existance of default.h doesn't
-work, the reason is tm_include_list='** defaults.h' rather than
-tm_include_list='** ./defaults.h'
-
-So we add the test condition for this situation.
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/Makefile.in | 2 +-
- gcc/configure | 4 ++--
- gcc/configure.ac | 4 ++--
- gcc/mkconfig.sh | 4 ++--
- 4 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 6c5adc0..9a1d466 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -517,7 +517,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
- TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
-
- xmake_file=@xmake_file@
--tmake_file=@tmake_file@
-+tmake_file=@tmake_file@ ./t-oe
- TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
- TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
- TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
-diff --git a/gcc/configure b/gcc/configure
-index 5e72f17..389b6d5 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -12130,8 +12130,8 @@ for f in $tm_file; do
- tm_include_list="${tm_include_list} $f"
- ;;
- defaults.h )
-- tm_file_list="${tm_file_list} \$(srcdir)/$f"
-- tm_include_list="${tm_include_list} $f"
-+ tm_file_list="${tm_file_list} ./$f"
-+ tm_include_list="${tm_include_list} ./$f"
- ;;
- * )
- tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index dd8f6fa..91ac800 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1883,8 +1883,8 @@ for f in $tm_file; do
- tm_include_list="${tm_include_list} $f"
- ;;
- defaults.h )
-- tm_file_list="${tm_file_list} \$(srcdir)/$f"
-- tm_include_list="${tm_include_list} $f"
-+ tm_file_list="${tm_file_list} ./$f"
-+ tm_include_list="${tm_include_list} ./$f"
- ;;
- * )
- tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
-index 67dfac6..b73e08d 100644
---- a/gcc/mkconfig.sh
-+++ b/gcc/mkconfig.sh
-@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
- if [ $# -ge 1 ]; then
- echo '#ifdef IN_GCC' >> ${output}T
- for file in "$@"; do
-- if test x"$file" = x"defaults.h"; then
-+ if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then
- postpone_defaults_h="yes"
- else
- echo "# include \"$file\"" >> ${output}T
-@@ -109,7 +109,7 @@ esac
-
- # If we postponed including defaults.h, add the #include now.
- if test x"$postpone_defaults_h" = x"yes"; then
-- echo "# include \"defaults.h\"" >> ${output}T
-+ echo "# include \"./defaults.h\"" >> ${output}T
- fi
-
- # Add multiple inclusion protection guard, part two.
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0018-fortran-cross-compile-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0018-fortran-cross-compile-hack.patch
deleted file mode 100644
index b43d89e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0018-fortran-cross-compile-hack.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From e360dc3e0f1e0b9b001ef722fcf66f8120a03dbc Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:20:01 +0400
-Subject: [PATCH 18/46] fortran cross-compile hack.
-
-* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
-used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
-directory.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- libgfortran/configure | 2 +-
- libgfortran/configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libgfortran/configure b/libgfortran/configure
-index f746f6f..b4f3278 100755
---- a/libgfortran/configure
-+++ b/libgfortran/configure
-@@ -12734,7 +12734,7 @@ esac
-
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- ac_ext=${ac_fc_srcext-f}
- ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
- ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
-diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
-index 8f377bb..67710b5 100644
---- a/libgfortran/configure.ac
-+++ b/libgfortran/configure.ac
-@@ -240,7 +240,7 @@ AC_SUBST(enable_static)
-
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- AC_PROG_FC(gfortran)
-
- # extra LD Flags which are required for targets
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0019-cpp-honor-sysroot.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0019-cpp-honor-sysroot.patch
deleted file mode 100644
index 417a5ed..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0019-cpp-honor-sysroot.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 98d9c0c1b5552294b2130f7304bfb522da323442 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:22:00 +0400
-Subject: [PATCH 19/46] cpp: honor sysroot.
-
-Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile
-preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
-rather than the --sysroot option specified on the commandline. If access to that directory is
-permission denied (unreadable), gcc will error.
-
-This happens when ccache is in use due to the fact it uses preprocessed source files.
-
-The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix,
--isystem, -isysroot happen and the correct sysroot is used.
-
-[YOCTO #2074]
-
-RP 2012/04/13
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/cp/lang-specs.h | 2 +-
- gcc/gcc.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
-index 9707fac..fe487a2 100644
---- a/gcc/cp/lang-specs.h
-+++ b/gcc/cp/lang-specs.h
-@@ -64,5 +64,5 @@ along with GCC; see the file COPYING3. If not see
- {".ii", "@c++-cpp-output", 0, 0, 0},
- {"@c++-cpp-output",
- "%{!M:%{!MM:%{!E:\
-- cc1plus -fpreprocessed %i %(cc1_options) %2\
-+ cc1plus -fpreprocessed %i %I %(cc1_options) %2\
- %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 7ca129f..04fa81d 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1329,7 +1329,7 @@ static const struct compiler default_compilers[] =
- %W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0},
- {".i", "@cpp-output", 0, 0, 0},
- {"@cpp-output",
-- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
- {".s", "@assembler", 0, 0, 0},
- {"@assembler",
- "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0020-MIPS64-Default-to-N64-ABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0020-MIPS64-Default-to-N64-ABI.patch
deleted file mode 100644
index ba612f5..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0020-MIPS64-Default-to-N64-ABI.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 1f15447fbcf65142627af8a9694761534da8d0d1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:23:08 +0400
-Subject: [PATCH 20/46] MIPS64: Default to N64 ABI
-
-MIPS64 defaults to n32 ABI, this patch makes it
-so that it defaults to N64 ABI
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE config specific]
----
- gcc/config.gcc | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index f66e48c..9c6d156 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2065,29 +2065,29 @@ mips*-*-linux*) # Linux MIPS, either endian.
- default_mips_arch=mips32
- ;;
- mips64el-st-linux-gnu)
-- default_mips_abi=n32
-+ default_mips_abi=64
- tm_file="${tm_file} mips/st.h"
- tmake_file="${tmake_file} mips/t-st"
- enable_mips_multilibs="yes"
- ;;
- mips64octeon*-*-linux*)
-- default_mips_abi=n32
-+ default_mips_abi=64
- tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
- target_cpu_default=MASK_SOFT_FLOAT_ABI
- enable_mips_multilibs="yes"
- ;;
- mipsisa64r6*-*-linux*)
-- default_mips_abi=n32
-+ default_mips_abi=64
- default_mips_arch=mips64r6
- enable_mips_multilibs="yes"
- ;;
- mipsisa64r2*-*-linux*)
-- default_mips_abi=n32
-+ default_mips_abi=64
- default_mips_arch=mips64r2
- enable_mips_multilibs="yes"
- ;;
- mips64*-*-linux* | mipsisa64*-*-linux*)
-- default_mips_abi=n32
-+ default_mips_abi=64
- enable_mips_multilibs="yes"
- ;;
- esac
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
deleted file mode 100644
index 6675ce3..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ /dev/null
@@ -1,234 +0,0 @@
-From 9f73c8918b63e6a1c9b79384fac411d1056eec1c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:24:50 +0400
-Subject: [PATCH 21/46] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
- relative to SYSTEMLIBS_DIR
-
-This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
-relative to SYSTEMLIBS_DIR which can be set in generated headers
-This breaks the assumption of hardcoded multilib in gcc
-Change is only for the supported architectures in OE including
-SH, sparc, alpha for possible future support (if any)
-
-Removes the do_headerfix task in metadata
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE configuration]
----
- gcc/config/alpha/linux-elf.h | 4 ++--
- gcc/config/arm/linux-eabi.h | 4 ++--
- gcc/config/arm/linux-elf.h | 2 +-
- gcc/config/i386/linux.h | 2 +-
- gcc/config/i386/linux64.h | 6 +++---
- gcc/config/linux.h | 8 ++++----
- gcc/config/mips/linux.h | 12 ++++++------
- gcc/config/rs6000/linux64.h | 16 ++++++----------
- gcc/config/sh/linux.h | 2 +-
- gcc/config/sparc/linux.h | 2 +-
- gcc/config/sparc/linux64.h | 4 ++--
- 11 files changed, 29 insertions(+), 33 deletions(-)
-
-diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
-index a0764d3..02f7a7c 100644
---- a/gcc/config/alpha/linux-elf.h
-+++ b/gcc/config/alpha/linux-elf.h
-@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see
- #define EXTRA_SPECS \
- { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index ace8481..4010435 100644
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -68,8 +68,8 @@
- GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
-
- #undef GLIBC_DYNAMIC_LINKER
--#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
--#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
-+#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3"
-+#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3"
- #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
-
- #define GLIBC_DYNAMIC_LINKER \
-diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
-index a94bd2d..0220628 100644
---- a/gcc/config/arm/linux-elf.h
-+++ b/gcc/config/arm/linux-elf.h
-@@ -62,7 +62,7 @@
-
- #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #define LINUX_TARGET_LINK_SPEC "%{h*} \
- %{static:-Bstatic} \
-diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
-index d37a875..edde586 100644
---- a/gcc/config/i386/linux.h
-+++ b/gcc/config/i386/linux.h
-@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>. */
-
- #define GNU_USER_LINK_EMULATION "elf_i386"
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #undef MUSL_DYNAMIC_LINKER
- #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
-diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
-index 73d22e3..f4b5615 100644
---- a/gcc/config/i386/linux64.h
-+++ b/gcc/config/i386/linux64.h
-@@ -27,9 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define GNU_USER_LINK_EMULATION64 "elf_x86_64"
- #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
--#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
-+#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
-
- #undef MUSL_DYNAMIC_LINKER32
- #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
-diff --git a/gcc/config/linux.h b/gcc/config/linux.h
-index 9aeeb94..b055652 100644
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -81,10 +81,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
- GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
- supporting both 32-bit and 64-bit compilation. */
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0"
- #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
-diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
-index fa253b6..da02c8d 100644
---- a/gcc/config/mips/linux.h
-+++ b/gcc/config/mips/linux.h
-@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3. If not see
- #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
-
- #define GLIBC_DYNAMIC_LINKER32 \
-- "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- #define GLIBC_DYNAMIC_LINKER64 \
-- "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- #define GLIBC_DYNAMIC_LINKERN32 \
-- "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
-
- #undef UCLIBC_DYNAMIC_LINKER32
- #define UCLIBC_DYNAMIC_LINKER32 \
-- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
- #undef UCLIBC_DYNAMIC_LINKER64
- #define UCLIBC_DYNAMIC_LINKER64 \
-- "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}"
- #define UCLIBC_DYNAMIC_LINKERN32 \
-- "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
-
- #undef MUSL_DYNAMIC_LINKER32
- #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1"
-diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index fefa0c4..7173938 100644
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -412,16 +412,11 @@ extern int dot_symbols;
- #undef LINK_OS_DEFAULT_SPEC
- #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
-
--#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1"
--
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1"
- #ifdef LINUX64_DEFAULT_ABI_ELFv2
--#define GLIBC_DYNAMIC_LINKER64 \
--"%{mabi=elfv1:%(dynamic_linker_prefix)/lib64/ld64.so.1;" \
--":%(dynamic_linker_prefix)/lib64/ld64.so.2}"
-+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}"
- #else
--#define GLIBC_DYNAMIC_LINKER64 \
--"%{mabi=elfv2:%(dynamic_linker_prefix)/lib64/ld64.so.2;" \
--":%(dynamic_linker_prefix)/lib64/ld64.so.1}"
-+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}"
- #endif
-
- #define MUSL_DYNAMIC_LINKER32 \
-@@ -429,8 +424,9 @@ extern int dot_symbols;
- #define MUSL_DYNAMIC_LINKER64 \
- "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
-
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
-+
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U, M) \
- "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
-diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
-index 2a036ac..50fb735 100644
---- a/gcc/config/sh/linux.h
-+++ b/gcc/config/sh/linux.h
-@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3. If not see
- "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \
- "%{mfdpic:-fdpic}.so.1"
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #undef SUBTARGET_LINK_EMUL_SUFFIX
- #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}"
-diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
-index 9b32577..7bd66de 100644
---- a/gcc/config/sparc/linux.h
-+++ b/gcc/config/sparc/linux.h
-@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
- When the -shared link option is used a final link is not being
- done. */
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #undef LINK_SPEC
- #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
-diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
-index a1ef325..3bae3d5 100644
---- a/gcc/config/sparc/linux64.h
-+++ b/gcc/config/sparc/linux64.h
-@@ -84,8 +84,8 @@ along with GCC; see the file COPYING3. If not see
- When the -shared link option is used a final link is not being
- done. */
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #ifdef SPARC_BI_ARCH
-
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0022-gcc-Fix-argument-list-too-long-error.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0022-gcc-Fix-argument-list-too-long-error.patch
deleted file mode 100644
index fab6e4a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0022-gcc-Fix-argument-list-too-long-error.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From acce5157f6b3a1dc9a3676b7118ac887dc5693be Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:26:37 +0400
-Subject: [PATCH 22/46] gcc: Fix argument list too long error.
-
-There would be an "Argument list too long" error when the
-build directory is longer than 200, this is caused by:
-
-headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`
-
-The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle
-it, use the $(sort list) of GNU make which can handle the too long list
-would fix the problem, the header would be short enough after sorted.
-The "tr ' ' '\012'" was used for translating the space to "\n", the
-$(sort list) doesn't need this.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 9a1d466..450cb79 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -3349,7 +3349,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
- # We keep the directory structure for files in config or c-family and .def
- # files. All other files are flattened to a single directory.
- $(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
-- headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \
-+ headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def))"; \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
- for file in $$headers; do \
- if [ -f $$file ] ; then \
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0023-Disable-sdt.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0023-Disable-sdt.patch
deleted file mode 100644
index 0efd890..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0023-Disable-sdt.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 6573aec00ada35c48c1838c8491ce8f7798ae993 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:28:10 +0400
-Subject: [PATCH 23/46] Disable sdt.
-
-We don't list dtrace in DEPENDS so we shouldn't be depending on this header.
-It may or may not exist from preivous builds though. To be determinstic, disable
-sdt.h usage always. This avoids build failures if the header is removed after configure
-but before libgcc is compiled for example.
-
-RP 2012/8/7
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Disable sdt for libstdc++-v3.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
-Upstream-Status: Inappropriate [hack]
----
- gcc/configure | 12 ++++++------
- gcc/configure.ac | 18 +++++++++---------
- libstdc++-v3/configure | 6 +++---
- libstdc++-v3/configure.ac | 2 +-
- 4 files changed, 19 insertions(+), 19 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 389b6d5..73c264d 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -28528,12 +28528,12 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
- $as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
- have_sys_sdt_h=no
--if test -f $target_header_dir/sys/sdt.h; then
-- have_sys_sdt_h=yes
--
--$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
--
--fi
-+#if test -f $target_header_dir/sys/sdt.h; then
-+# have_sys_sdt_h=yes
-+#
-+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-+#
-+#fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
- $as_echo "$have_sys_sdt_h" >&6; }
-
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 91ac800..cecf121 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5514,15 +5514,15 @@ fi
- AC_SUBST([enable_default_ssp])
-
- # Test for <sys/sdt.h> on the target.
--GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
--AC_MSG_CHECKING(sys/sdt.h in the target C library)
--have_sys_sdt_h=no
--if test -f $target_header_dir/sys/sdt.h; then
-- have_sys_sdt_h=yes
-- AC_DEFINE(HAVE_SYS_SDT_H, 1,
-- [Define if your target C library provides sys/sdt.h])
--fi
--AC_MSG_RESULT($have_sys_sdt_h)
-+#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
-+#AC_MSG_CHECKING(sys/sdt.h in the target C library)
-+#have_sys_sdt_h=no
-+#if test -f $target_header_dir/sys/sdt.h; then
-+# have_sys_sdt_h=yes
-+# AC_DEFINE(HAVE_SYS_SDT_H, 1,
-+# [Define if your target C library provides sys/sdt.h])
-+#fi
-+#AC_MSG_RESULT($have_sys_sdt_h)
-
- # Check if TFmode long double should be used by default or not.
- # Some glibc targets used DFmode long double, but with glibc 2.4
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index 8a5481c..6a40e92 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -21735,11 +21735,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-- if test $glibcxx_cv_sys_sdt_h = yes; then
-+# if test $glibcxx_cv_sys_sdt_h = yes; then
-
--$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-
-- fi
-+# fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5
- $as_echo "$glibcxx_cv_sys_sdt_h" >&6; }
-
-diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
-index 9e19e99..0077ffd 100644
---- a/libstdc++-v3/configure.ac
-+++ b/libstdc++-v3/configure.ac
-@@ -230,7 +230,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN
- GLIBCXX_CHECK_SC_NPROC_ONLN
- GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP
- GLIBCXX_CHECK_SYSCTL_HW_NCPU
--GLIBCXX_CHECK_SDT_H
-+#GLIBCXX_CHECK_SDT_H
-
- # Check for available headers.
- AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0024-libtool.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0024-libtool.patch
deleted file mode 100644
index 1f73b5d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0024-libtool.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 6c0aa5c2538829248547197718037ff0b9788676 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:29:11 +0400
-Subject: [PATCH 24/46] libtool
-
-libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64
-when running on am x86_64 build host.
-
-This patch stops this speading to libdir in the libstdc++.la file within libtool.
-Arguably, it shouldn't be passing this into libtool in the first place but
-for now this resolves the nastiest problems this causes.
-
-func_normal_abspath would resolve an empty path to `pwd` so we need
-to filter the zero case.
-
-RP 2012/8/24
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- ltmain.sh | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 9503ec8..0121fba 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -6359,6 +6359,10 @@ func_mode_link ()
- func_warning "ignoring multiple \`-rpath's for a libtool library"
-
- install_libdir="$1"
-+ if test -n "$install_libdir"; then
-+ func_normal_abspath "$install_libdir"
-+ install_libdir=$func_normal_abspath_result
-+ fi
-
- oldlibs=
- if test -z "$rpath"; then
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
deleted file mode 100644
index 3b7ee49..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From b1263a48553ce75f8c3bed4fe12122af57845567 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:30:32 +0400
-Subject: [PATCH 25/46] gcc: armv4: pass fix-v4bx to linker to support EABI.
-
-The LINK_SPEC for linux gets overwritten by linux-eabi.h which
-means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result
-the option is not passed to linker when chosing march=armv4
-This patch redefines this in linux-eabi.h and reinserts it
-for eabi defaulting toolchains.
-
-We might want to send it upstream.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/arm/linux-eabi.h | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index 4010435..aaea1c9 100644
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -94,10 +94,14 @@
- #define MUSL_DYNAMIC_LINKER \
- "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
-
-+/* For armv4 we pass --fix-v4bx to linker to support EABI */
-+#undef TARGET_FIX_V4BX_SPEC
-+#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
-+
- /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
- use the GNU/Linux version, not the generic BPABI version. */
- #undef LINK_SPEC
--#define LINK_SPEC EABI_LINK_SPEC \
-+#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC \
- LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
- LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
-
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch
deleted file mode 100644
index be25be6..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From b5c305fc251299f2e328410b18cfb55c75b5f038 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:33:04 +0400
-Subject: [PATCH 26/46] Use the multilib config files from ${B} instead of
- using the ones from ${S}
-
-Use the multilib config files from ${B} instead of using the ones from ${S}
-so that the source can be shared between gcc-cross-initial,
-gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- gcc/configure | 22 ++++++++++++++++++----
- gcc/configure.ac | 22 ++++++++++++++++++----
- 2 files changed, 36 insertions(+), 8 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 73c264d..377253e 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -12110,10 +12110,20 @@ done
- tmake_file_=
- for f in ${tmake_file}
- do
-- if test -f ${srcdir}/config/$f
-- then
-- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-- fi
-+ case $f in
-+ */t-linux64 )
-+ if test -f ./config/$f
-+ then
-+ tmake_file_="${tmake_file_} ./config/$f"
-+ fi
-+ ;;
-+ * )
-+ if test -f ${srcdir}/config/$f
-+ then
-+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-+ fi
-+ ;;
-+ esac
- done
- tmake_file="${tmake_file_}"
-
-@@ -12124,6 +12134,10 @@ tm_file_list="options.h"
- tm_include_list="options.h insn-constants.h"
- for f in $tm_file; do
- case $f in
-+ */linux64.h )
-+ tm_file_list="${tm_file_list} ./config/$f"
-+ tm_include_list="${tm_include_list} ./config/$f"
-+ ;;
- ./* )
- f=`echo $f | sed 's/^..//'`
- tm_file_list="${tm_file_list} $f"
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index cecf121..54e7619 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1863,10 +1863,20 @@ done
- tmake_file_=
- for f in ${tmake_file}
- do
-- if test -f ${srcdir}/config/$f
-- then
-- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-- fi
-+ case $f in
-+ */t-linux64 )
-+ if test -f ./config/$f
-+ then
-+ tmake_file_="${tmake_file_} ./config/$f"
-+ fi
-+ ;;
-+ * )
-+ if test -f ${srcdir}/config/$f
-+ then
-+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-+ fi
-+ ;;
-+ esac
- done
- tmake_file="${tmake_file_}"
-
-@@ -1877,6 +1887,10 @@ tm_file_list="options.h"
- tm_include_list="options.h insn-constants.h"
- for f in $tm_file; do
- case $f in
-+ */linux64.h )
-+ tm_file_list="${tm_file_list} ./config/$f"
-+ tm_include_list="${tm_include_list} ./config/$f"
-+ ;;
- ./* )
- f=`echo $f | sed 's/^..//'`
- tm_file_list="${tm_file_list} $f"
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
deleted file mode 100644
index d1bbebc..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From eb6178b7fb466ae429c56380c6dbc564a16d900a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 09:39:38 +0000
-Subject: [PATCH 27/46] Avoid using libdir from .la which usually points to a
- host path
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ltmain.sh | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 0121fba..52bdbdb 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -5628,6 +5628,9 @@ func_mode_link ()
- absdir="$abs_ladir"
- libdir="$abs_ladir"
- else
-+ # Instead of using libdir from .la which usually points to a host path,
-+ # use the path the .la is contained in.
-+ libdir="$abs_ladir"
- dir="$libdir"
- absdir="$libdir"
- fi
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0028-export-CPP.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0028-export-CPP.patch
deleted file mode 100644
index c212539..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0028-export-CPP.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 617184f35e97934d9e6268e71378574e2b776c2b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 09:40:59 +0000
-Subject: [PATCH 28/46] export CPP
-
-The OE environment sets and exports CPP as being the target gcc. When
-building gcc-cross-canadian for a mingw targetted sdk, the following can be found
-in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log:
-
-configure:3641: checking for _FILE_OFFSET_BITS value needed for large files
-configure:3666: gcc -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe conftest.c >&5
-configure:3666: $? = 0
-configure:3698: result: no
-configure:3786: checking how to run the C preprocessor
-configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32
-configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c
-configure:3876: $? = 0
-
-Note this is a *build* target (in build-x86_64-linux) so it should be
-using the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32
-headers are very different, using the wrong cpp is a real problem. It is leaking
-into configure through the CPP variable. Ultimately this leads to build
-failures related to not being able to include a process.h file for pem-unix.c.
-
-The fix is to ensure we export a sane CPP value into the build
-environment when using build targets. We could define a CPP_FOR_BUILD value which may be
-the version which needs to be upstreamed but for now, this fix is good enough to
-avoid the problem.
-
-RP 22/08/2013
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.in | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Makefile.in b/Makefile.in
-index 1522e39..beb9b9a 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -149,6 +149,7 @@ BUILD_EXPORTS = \
- AR="$(AR_FOR_BUILD)"; export AR; \
- AS="$(AS_FOR_BUILD)"; export AS; \
- CC="$(CC_FOR_BUILD)"; export CC; \
-+ CPP="$(CC_FOR_BUILD) -E"; export CPP; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
deleted file mode 100644
index 47b9c0d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From e140700976e3b7eb4250b1ffde9bc16494456903 Mon Sep 17 00:00:00 2001
-From: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
-Date: Wed, 5 Feb 2014 16:52:31 +0200
-Subject: [PATCH 29/46] Enable SPE & AltiVec generation on powepc*linux target
-
-When is configured with --target=powerpc-linux, the resulting GCC will
-not be able to generate code for SPE targets (e500v1/v2).
-GCC configured with --target=powerpc-linuxspe will not be able to
-generate AltiVec instructions (for e6500).
-This patch modifies the configured file such that SPE or AltiVec code
-can be generated when gcc is configured with --target=powerpc-linux.
-The ABI and speciffic instructions can be selected through the
-"-mabi=spe or -mabi=altivec" and the "-mspe or -maltivec" parameters.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
----
- gcc/config.gcc | 9 ++++++++-
- gcc/config/rs6000/linuxspe.h | 3 ---
- 2 files changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index 9c6d156..18cff5a 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2392,7 +2392,14 @@ powerpc-*-rtems*)
- tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
- ;;
- powerpc*-*-linux*)
-- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
-+ case ${target} in
-+ powerpc*-*-linux*spe* | powerpc*-*-linux*altivec*)
-+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
-+ ;;
-+ *)
-+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h rs6000/linuxaltivec.h rs6000/linuxspe.h rs6000/e500.h"
-+ ;;
-+ esac
- extra_options="${extra_options} rs6000/sysv4.opt"
- tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
- extra_objs="$extra_objs rs6000-linux.o"
-diff --git a/gcc/config/rs6000/linuxspe.h b/gcc/config/rs6000/linuxspe.h
-index 35623cd..f74e00d 100644
---- a/gcc/config/rs6000/linuxspe.h
-+++ b/gcc/config/rs6000/linuxspe.h
-@@ -27,6 +27,3 @@
- #undef TARGET_DEFAULT
- #define TARGET_DEFAULT MASK_STRICT_ALIGN
- #endif
--
--#undef ASM_DEFAULT_SPEC
--#define ASM_DEFAULT_SPEC "-mppc -mspe -me500"
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
deleted file mode 100644
index c09d019..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 0ddcb95a86830766fd02122f19384fc929b377c5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 10:21:55 +0000
-Subject: [PATCH 30/46] Disable the MULTILIB_OSDIRNAMES and other multilib
- options.
-
-Hard coding the MULTILIB_OSDIRNAMES with ../lib64 is causing problems on
-systems where the libdir is NOT set to /lib64. This is allowed by the
-ABI, as
-long as the dynamic loader is present in /lib.
-
-We simply want to use the default rules in gcc to find and configure the
-normal libdir.
-
-Upstream-Status: Inappropriate[OE-Specific]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config/aarch64/t-aarch64-linux | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
-index 1cfe9f3..d688ac9 100644
---- a/gcc/config/aarch64/t-aarch64-linux
-+++ b/gcc/config/aarch64/t-aarch64-linux
-@@ -21,8 +21,8 @@
- LIB1ASMSRC = aarch64/lib1funcs.asm
- LIB1ASMFUNCS = _aarch64_sync_cache_range
-
--AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
--MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
--MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
-+#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
-+#MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
-+#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
-
--MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
-+#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0031-Ensure-target-gcc-headers-can-be-included.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0031-Ensure-target-gcc-headers-can-be-included.patch
deleted file mode 100644
index fb1cd0f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0031-Ensure-target-gcc-headers-can-be-included.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From fc6621435a64a9d69aa251b70361da94cf2db6be Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 10:25:11 +0000
-Subject: [PATCH 31/46] Ensure target gcc headers can be included
-
-There are a few headers installed as part of the OpenEmbedded
-gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe
-built for the target architecture, these are within the target
-sysroot and not cross/nativesdk; thus they weren't able to be
-found by gcc with the existing search paths. Add support for
-picking up these headers under the sysroot supplied on the gcc
-command line in order to resolve this.
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/Makefile.in | 2 ++
- gcc/cppdefault.c | 4 ++++
- gcc/defaults.h | 9 +++++++++
- gcc/gcc.c | 7 -------
- 4 files changed, 15 insertions(+), 7 deletions(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 450cb79..cc75536 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -593,6 +593,7 @@ libexecdir = @libexecdir@
-
- # Directory in which the compiler finds libraries etc.
- libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
-+libsubdir_target = gcc/$(target_noncanonical)/$(version)
- # Directory in which the compiler finds executables
- libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
- # Directory in which all plugin resources are installed
-@@ -2688,6 +2689,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
-
- PREPROCESSOR_DEFINES = \
- -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-+ -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \
- -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
- -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
- -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
-diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
-index 54aaf06..7b4dd51 100644
---- a/gcc/cppdefault.c
-+++ b/gcc/cppdefault.c
-@@ -59,6 +59,10 @@ const struct default_include cpp_include_defaults[]
- /* This is the dir for gcc's private headers. */
- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
- #endif
-+#ifdef GCC_INCLUDE_SUBDIR_TARGET
-+ /* This is the dir for gcc's private headers under the specified sysroot. */
-+ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
-+#endif
- #ifdef LOCAL_INCLUDE_DIR
- /* /usr/local/include comes before the fixincluded header files. */
- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
-diff --git a/gcc/defaults.h b/gcc/defaults.h
-index 3e18338..0f317f2 100644
---- a/gcc/defaults.h
-+++ b/gcc/defaults.h
-@@ -1492,4 +1492,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_GDB
- #endif
-
-+/* Default prefixes to attach to command names. */
-+
-+#ifndef STANDARD_STARTFILE_PREFIX_1
-+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
-+#endif
-+#ifndef STANDARD_STARTFILE_PREFIX_2
-+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
-+#endif
-+
- #endif /* ! GCC_DEFAULTS_H */
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 04fa81d..9750cc2 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1450,13 +1450,6 @@ static const char *gcc_libexec_prefix;
-
- /* Default prefixes to attach to command names. */
-
--#ifndef STANDARD_STARTFILE_PREFIX_1
--#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
--#endif
--#ifndef STANDARD_STARTFILE_PREFIX_2
--#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
--#endif
--
- #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
- #undef MD_EXEC_PREFIX
- #undef MD_STARTFILE_PREFIX
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
deleted file mode 100644
index c0b001d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From ff939c5063d8f8d444bdb25651a0a48e608efaa4 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 11:17:19 +0000
-Subject: [PATCH 32/46] gcc 4.8+ won't build with --disable-dependency-tracking
-
-since the *.Ppo files don't get created unless --enable-dependency-tracking is true.
-
-This patch ensures we only use those compiler options when its enabled.
-
-Upstream-Status: Submitted
-
-(Problem was already reported upstream, attached this patch there
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930)
-
-RP
-2012/09/22
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libatomic/Makefile.am | 3 ++-
- libatomic/Makefile.in | 3 ++-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
-index b351244..399ce18 100644
---- a/libatomic/Makefile.am
-+++ b/libatomic/Makefile.am
-@@ -101,7 +101,8 @@ PAT_S = $(word 3,$(PAT_SPLIT))
- IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
- IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
-
--M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_FALSE@M_DEPS =
- M_SIZE = -DN=$(PAT_N)
- M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
- M_FILE = $(PAT_BASE)_n.c
-diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
-index a083d87..a92cfce 100644
---- a/libatomic/Makefile.in
-+++ b/libatomic/Makefile.in
-@@ -330,7 +330,8 @@ PAT_N = $(word 2,$(PAT_SPLIT))
- PAT_S = $(word 3,$(PAT_SPLIT))
- IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
- IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
--M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_FALSE@M_DEPS =
- M_SIZE = -DN=$(PAT_N)
- M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
- M_FILE = $(PAT_BASE)_n.c
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch
deleted file mode 100644
index e425d71..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 5092f5389d02e78cd59690cf3fca24b56a97aff2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 3 Mar 2015 08:21:19 +0000
-Subject: [PATCH 33/46] Don't search host directory during "relink" if
- $inst_prefix is provided
-
-http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html
-
-Upstream-Status: Submitted
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ltmain.sh | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 52bdbdb..82bcec3 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -6004,12 +6004,13 @@ func_mode_link ()
- fi
- else
- # We cannot seem to hardcode it, guess we'll fake it.
-+ # Default if $libdir is not relative to the prefix:
- add_dir="-L$libdir"
-- # Try looking first in the location we're being installed to.
-+
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
-- add_dir="$add_dir -L$inst_prefix_dir$libdir"
-+ add_dir="-L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
deleted file mode 100644
index 922a855..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 1faa6f69f93bb95af2b2b2bd24e181b50fb5b37c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 28 Apr 2015 23:15:27 -0700
-Subject: [PATCH 34/46] Use SYSTEMLIBS_DIR replacement instead of hardcoding
- base_libdir
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Inappropriate [OE Configuration]
-
- gcc/config/aarch64/aarch64-linux.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index 5fcaa59..8588ac0 100644
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -21,7 +21,7 @@
- #ifndef GCC_AARCH64_LINUX_H
- #define GCC_AARCH64_LINUX_H
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-
- #undef MUSL_DYNAMIC_LINKER
- #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0035-aarch64-Add-support-for-musl-ldso.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0035-aarch64-Add-support-for-musl-ldso.patch
deleted file mode 100644
index 9dfc472..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0035-aarch64-Add-support-for-musl-ldso.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 3768468c1a6cc170fff88c03b808c975ac653811 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 28 Apr 2015 23:18:39 -0700
-Subject: [PATCH 35/46] aarch64: Add support for musl ldso
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Inappropriate [OE Configuration]
-
- gcc/config/aarch64/aarch64-linux.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index 8588ac0..946b3ca 100644
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -24,7 +24,7 @@
- #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-
- #undef MUSL_DYNAMIC_LINKER
--#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-
- #undef ASAN_CC1_SPEC
- #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch
deleted file mode 100644
index f89a886..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From f4d3c8e970d42a43cd3d2f751e13324efa936ff8 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Sun, 5 Jul 2015 20:25:18 -0700
-Subject: [PATCH 36/46] libcc1: fix libcc1's install path and rpath
-
-* Install libcc1.so and libcc1plugin.so into
- $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we
- had done to lto-plugin.
-* Fix bad RPATH iussue:
- gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file
- /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0
- [rpaths]
-
-Upstream-Status: Inappropriate [OE configuration]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- libcc1/Makefile.am | 4 ++--
- libcc1/Makefile.in | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
-index b40820b..32930c5 100644
---- a/libcc1/Makefile.am
-+++ b/libcc1/Makefile.am
-@@ -35,8 +35,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
- $(Wc)$(libiberty_normal)))
- libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
-
--plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
--cc1libdir = $(libdir)/$(libsuffix)
-+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
-+plugindir = $(cc1libdir)
-
- if ENABLE_PLUGIN
- plugin_LTLIBRARIES = libcc1plugin.la
-diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
-index 79d39d3..227ec22 100644
---- a/libcc1/Makefile.in
-+++ b/libcc1/Makefile.in
-@@ -291,8 +291,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
- $(Wc)$(libiberty_normal)))
-
- libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
--plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
--cc1libdir = $(libdir)/$(libsuffix)
-+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
-+plugindir = $(cc1libdir)
- @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la
- @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la
- BUILT_SOURCES = compiler-name.h
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0037-handle-sysroot-support-for-nativesdk-gcc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0037-handle-sysroot-support-for-nativesdk-gcc.patch
deleted file mode 100644
index 15efcb1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0037-handle-sysroot-support-for-nativesdk-gcc.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-From 1475b941d7a9c9874b0fb0558d01805945467331 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Dec 2015 23:39:54 +0000
-Subject: [PATCH 37/46] handle sysroot support for nativesdk-gcc
-
-Being able to build a nativesdk gcc is useful, particularly in cases
-where the host compiler may be of an incompatible version (or a 32
-bit compiler is needed).
-
-Sadly, building nativesdk-gcc is not straight forward. We install
-nativesdk-gcc into a relocatable location and this means that its
-library locations can change. "Normal" sysroot support doesn't help
-in this case since the values of paths like "libdir" change, not just
-base root directory of the system.
-
-In order to handle this we do two things:
-
-a) Add %r into spec file markup which can be used for injected paths
- such as SYSTEMLIBS_DIR (see gcc_multilib_setup()).
-b) Add other paths which need relocation into a .gccrelocprefix section
- which the relocation code will notice and adjust automatically.
-
-Upstream-Status: Inappropriate
-RP 2015/7/28
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/cppdefault.c | 50 +++++++++++++++++++++++++++++++++++++-------------
- gcc/cppdefault.h | 3 ++-
- gcc/gcc.c | 20 ++++++++++++++------
- 3 files changed, 53 insertions(+), 20 deletions(-)
-
-diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
-index 7b4dd51..9d1166c 100644
---- a/gcc/cppdefault.c
-+++ b/gcc/cppdefault.c
-@@ -35,6 +35,30 @@
- # undef CROSS_INCLUDE_DIR
- #endif
-
-+static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR;
-+static char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR;
-+static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR;
-+static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR;
-+static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET;
-+#ifdef LOCAL_INCLUDE_DIR
-+static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR;
-+#endif
-+#ifdef PREFIX_INCLUDE_DIR
-+static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR;
-+#endif
-+#ifdef FIXED_INCLUDE_DIR
-+static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR;
-+#endif
-+#ifdef CROSS_INCLUDE_DIR
-+static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR;
-+#endif
-+#ifdef TOOL_INCLUDE_DIR
-+static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR;
-+#endif
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR;
-+#endif
-+
- const struct default_include cpp_include_defaults[]
- #ifdef INCLUDE_DEFAULTS
- = INCLUDE_DEFAULTS;
-@@ -42,38 +66,38 @@ const struct default_include cpp_include_defaults[]
- = {
- #ifdef GPLUSPLUS_INCLUDE_DIR
- /* Pick up GNU C++ generic include files. */
-- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,
-+ { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1,
- GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
- #endif
- #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
- /* Pick up GNU C++ target-dependent include files. */
-- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,
-+ { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1,
- GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },
- #endif
- #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
- /* Pick up GNU C++ backward and deprecated include files. */
-- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,
-+ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1,
- GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
- #endif
- #ifdef GCC_INCLUDE_DIR
- /* This is the dir for gcc's private headers. */
-- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
-+ { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
- #endif
- #ifdef GCC_INCLUDE_SUBDIR_TARGET
- /* This is the dir for gcc's private headers under the specified sysroot. */
-- { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
-+ { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 },
- #endif
- #ifdef LOCAL_INCLUDE_DIR
- /* /usr/local/include comes before the fixincluded header files. */
-- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
-- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 },
-+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 },
- #endif
- #ifdef PREFIX_INCLUDE_DIR
-- { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 },
-+ { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 },
- #endif
- #ifdef FIXED_INCLUDE_DIR
- /* This is the dir for fixincludes. */
-- { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0,
-+ { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0,
- /* A multilib suffix needs adding if different multilibs use
- different headers. */
- #ifdef SYSROOT_HEADERS_SUFFIX_SPEC
-@@ -85,16 +109,16 @@ const struct default_include cpp_include_defaults[]
- #endif
- #ifdef CROSS_INCLUDE_DIR
- /* One place the target system's headers might be. */
-- { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
-+ { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
- #endif
- #ifdef TOOL_INCLUDE_DIR
- /* Another place the target system's headers might be. */
-- { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 },
-+ { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 },
- #endif
- #ifdef NATIVE_SYSTEM_HEADER_DIR
- /* /usr/include comes dead last. */
-- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
-- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
-+ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
-+ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
- #endif
- { 0, 0, 0, 0, 0, 0 }
- };
-diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h
-index 8a81b45..9759efd 100644
---- a/gcc/cppdefault.h
-+++ b/gcc/cppdefault.h
-@@ -33,7 +33,8 @@
-
- struct default_include
- {
-- const char *const fname; /* The name of the directory. */
-+ const char *fname; /* The name of the directory. */
-+
- const char *const component; /* The component containing the directory
- (see update_path in prefix.c) */
- const char cplusplus; /* Only look here if we're compiling C++. */
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 9750cc2..94c240e 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -247,6 +247,8 @@ FILE *report_times_to_file = NULL;
- #endif
- static const char *target_system_root = DEFAULT_TARGET_SYSTEM_ROOT;
-
-+static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR;
-+
- /* Nonzero means pass the updated target_system_root to the compiler. */
-
- static int target_system_root_changed;
-@@ -517,6 +519,7 @@ or with constant text in a single argument.
- %G process LIBGCC_SPEC as a spec.
- %R Output the concatenation of target_system_root and
- target_sysroot_suffix.
-+ %r Output the base path target_relocatable_prefix
- %S process STARTFILE_SPEC as a spec. A capital S is actually used here.
- %E process ENDFILE_SPEC as a spec. A capital E is actually used here.
- %C process CPP_SPEC as a spec.
-@@ -1473,10 +1476,10 @@ static const char *gcc_libexec_prefix;
- gcc_exec_prefix is set because, in that case, we know where the
- compiler has been installed, and use paths relative to that
- location instead. */
--static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
--static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX;
--static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX;
--static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
-+static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX;
-+static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX;
-+static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX;
-+static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
-
- /* For native compilers, these are well-known paths containing
- components that may be provided by the system. For cross
-@@ -1484,9 +1487,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
- static const char *md_exec_prefix = MD_EXEC_PREFIX;
- static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
- static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
--static const char *const standard_startfile_prefix_1
-+static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix")))
- = STANDARD_STARTFILE_PREFIX_1;
--static const char *const standard_startfile_prefix_2
-+static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix")))
- = STANDARD_STARTFILE_PREFIX_2;
-
- /* A relative path to be used in finding the location of tools
-@@ -5762,6 +5765,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
- }
- break;
-
-+ case 'r':
-+ obstack_grow (&obstack, target_relocatable_prefix,
-+ strlen (target_relocatable_prefix));
-+ break;
-+
- case 'S':
- value = do_spec_1 (startfile_spec, 0, NULL);
- if (value != 0)
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch
deleted file mode 100644
index 89ee79d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 42e4cdcaad590536246866b0846ec279e124fa16 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Dec 2015 23:41:45 +0000
-Subject: [PATCH 38/46] Search target sysroot gcc version specific dirs with
- multilib.
-
-We install the gcc libraries (such as crtbegin.p) into
-<sysroot><libdir>/<target-sys>/5.2.0/
-which is a default search path for GCC (aka multi_suffix in the
-code below). <target-sys> is 'machine' in gcc's terminology. We use
-these directories so that multiple gcc versions could in theory
-co-exist on target.
-
-We only want to build one gcc-cross-canadian per arch and have this work
-for all multilibs. <target-sys> can be handled by mapping the multilib
-<target-sys> to the one used by gcc-cross-canadian, e.g.
-mips64-polkmllib32-linux
-is symlinked to by mips64-poky-linux.
-
-The default gcc search path in the target sysroot for a "lib64" mutlilib
-is:
-
-<sysroot>/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/../lib64/
-<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/../lib64/
-<sysroot>/lib32/
-<sysroot>/usr/lib32/
-
-which means that the lib32 crtbegin.o will be found and the lib64 ones
-will not which leads to compiler failures.
-
-This patch injects a multilib version of that path first so the lib64
-binaries can be found first. With this change the search path becomes:
-
-<sysroot>/lib32/../lib64/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/../lib64/
-<sysroot>/usr/lib32/../lib64/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/../lib64/
-<sysroot>/lib32/
-<sysroot>/usr/lib32/
-
-Upstream-Status: Pending
-RP 2015/7/31
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/gcc.c | 29 ++++++++++++++++++++++++++++-
- 1 file changed, 28 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 94c240e..2812819 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -2507,7 +2507,7 @@ for_each_path (const struct path_prefix *paths,
- if (path == NULL)
- {
- len = paths->max_len + extra_space + 1;
-- len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len);
-+ len += MAX ((suffix_len + multi_os_dir_len), multiarch_len);
- path = XNEWVEC (char, len);
- }
-
-@@ -2519,6 +2519,33 @@ for_each_path (const struct path_prefix *paths,
- /* Look first in MACHINE/VERSION subdirectory. */
- if (!skip_multi_dir)
- {
-+ if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir))
-+ {
-+ const char *this_multi;
-+ size_t this_multi_len;
-+
-+ if (pl->os_multilib)
-+ {
-+ this_multi = multi_os_dir;
-+ this_multi_len = multi_os_dir_len;
-+ }
-+ else
-+ {
-+ this_multi = multi_dir;
-+ this_multi_len = multi_dir_len;
-+ }
-+
-+ /* Look in multilib MACHINE/VERSION subdirectory first */
-+ if (this_multi_len)
-+ {
-+ memcpy (path + len, this_multi, this_multi_len + 1);
-+ memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1);
-+ ret = callback (path, callback_info);
-+ if (ret)
-+ break;
-+ }
-+ }
-+
- memcpy (path + len, multi_suffix, suffix_len + 1);
- ret = callback (path, callback_info);
- if (ret)
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0039-Fix-various-_FOR_BUILD-and-related-variables.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0039-Fix-various-_FOR_BUILD-and-related-variables.patch
deleted file mode 100644
index 0ce7aec..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0039-Fix-various-_FOR_BUILD-and-related-variables.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-From 9ced49e459ccf1887feb58adf1e8836dcb4b1bdf Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Dec 2015 23:42:45 +0000
-Subject: [PATCH 39/46] Fix various _FOR_BUILD and related variables
-
-When doing a FOR_BUILD thing, you have to override CFLAGS with
-CFLAGS_FOR_BUILD. And if you use C++, you also have to override
-CXXFLAGS with CXXFLAGS_FOR_BUILD.
-Without this, when building for mingw, you end up trying to use
-the mingw headers for a host build.
-
-The same goes for other variables as well, such as CPPFLAGS,
-CPP, and GMPINC.
-
-Upstream-Status: Pending
-
-Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.in | 6 ++++++
- Makefile.tpl | 5 +++++
- gcc/Makefile.in | 2 +-
- gcc/configure | 2 +-
- gcc/configure.ac | 2 +-
- 5 files changed, 14 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index beb9b9a..3e1c6bc 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -152,6 +152,7 @@ BUILD_EXPORTS = \
- CPP="$(CC_FOR_BUILD) -E"; export CPP; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
-@@ -170,6 +171,9 @@ BUILD_EXPORTS = \
- # built for the build system to override those in BASE_FLAGS_TO_PASS.
- EXTRA_BUILD_FLAGS = \
- CFLAGS="$(CFLAGS_FOR_BUILD)" \
-+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
-+ CPP="$(CC_FOR_BUILD) -E" \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"
-
- # This is the list of directories to built for the host system.
-@@ -187,6 +191,7 @@ HOST_SUBDIR = @host_subdir@
- HOST_EXPORTS = \
- $(BASE_EXPORTS) \
- CC="$(CC)"; export CC; \
-+ CPP="$(CC) -E"; export CPP; \
- ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-@@ -713,6 +718,7 @@ BASE_FLAGS_TO_PASS = \
- "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
- "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
- "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
-+ "CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \
- "EXPECT=$(EXPECT)" \
- "FLEX=$(FLEX)" \
- "INSTALL=$(INSTALL)" \
-diff --git a/Makefile.tpl b/Makefile.tpl
-index 6b2eb6a..114e462 100644
---- a/Makefile.tpl
-+++ b/Makefile.tpl
-@@ -154,6 +154,7 @@ BUILD_EXPORTS = \
- CC="$(CC_FOR_BUILD)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
-@@ -172,6 +173,9 @@ BUILD_EXPORTS = \
- # built for the build system to override those in BASE_FLAGS_TO_PASS.
- EXTRA_BUILD_FLAGS = \
- CFLAGS="$(CFLAGS_FOR_BUILD)" \
-+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
-+ CPP="$(CC_FOR_BUILD) -E" \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"
-
- # This is the list of directories to built for the host system.
-@@ -189,6 +193,7 @@ HOST_SUBDIR = @host_subdir@
- HOST_EXPORTS = \
- $(BASE_EXPORTS) \
- CC="$(CC)"; export CC; \
-+ CPP="$(CC) -E"; export CPP; \
- ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index cc75536..0ad2dc8 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -780,7 +780,7 @@ BUILD_LDFLAGS=@BUILD_LDFLAGS@
- BUILD_NO_PIE_FLAG = @BUILD_NO_PIE_FLAG@
- BUILD_LDFLAGS += $(BUILD_NO_PIE_FLAG)
- BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
-- -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS)
-+ -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS_FOR_BUILD)
-
- # Actual name to use when installing a native compiler.
- GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
-diff --git a/gcc/configure b/gcc/configure
-index 377253e..78fc64a 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -11799,7 +11799,7 @@ else
- CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
- CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
- LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
-- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
-+ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
- ${realsrcdir}/configure \
- --enable-languages=${enable_languages-all} \
- --target=$target_alias --host=$build_alias --build=$build_alias
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 54e7619..a94666e 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1682,7 +1682,7 @@ else
- CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
- CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
- LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
-- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
-+ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
- ${realsrcdir}/configure \
- --enable-languages=${enable_languages-all} \
- --target=$target_alias --host=$build_alias --build=$build_alias
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch
deleted file mode 100644
index c9a6fd0..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From b0412c01c275aaeb6b458461cd2425120c8bcec8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 2 Feb 2016 10:26:10 -0800
-Subject: [PATCH 40/46] nios2: Define MUSL_DYNAMIC_LINKER
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- gcc/config/nios2/linux.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h
-index 4ef55b5..62bc1e7 100644
---- a/gcc/config/nios2/linux.h
-+++ b/gcc/config/nios2/linux.h
-@@ -30,6 +30,7 @@
- #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1"
-
- #undef LINK_SPEC
- #define LINK_SPEC LINK_SPEC_ENDIAN \
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
deleted file mode 100644
index 29b7ce7..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 210f6b3b82084cc756e02b8bc12f909a43b14ee8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 27 Jun 2017 18:10:54 -0700
-Subject: [PATCH 40/49] Add ssp_nonshared to link commandline for musl targets
-
-when -fstack-protector options are enabled we need to
-link with ssp_shared on musl since it does not provide
-the __stack_chk_fail_local() so essentially it provides
-libssp but not libssp_nonshared something like
-TARGET_LIBC_PROVIDES_SSP_BUT_NOT_SSP_NONSHARED
- where-as for glibc the needed symbols
-are already present in libc_nonshared library therefore
-we do not need any library helper on glibc based systems
-but musl needs the libssp_noshared from gcc
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config/linux.h | 7 +++++++
- gcc/config/rs6000/linux.h | 10 ++++++++++
- gcc/config/rs6000/linux64.h | 10 ++++++++++
- 3 files changed, 27 insertions(+)
-
-diff --git a/gcc/config/linux.h b/gcc/config/linux.h
-index 2e683d0c430..1b4df798671 100644
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -182,6 +182,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
- { 0, 0, 0, 0, 0, 0 } \
- }
-+#ifdef TARGET_LIBC_PROVIDES_SSP
-+#undef LINK_SSP_SPEC
-+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-+ "|fstack-protector-strong|fstack-protector-explicit" \
-+ ":-lssp_nonshared}"
-+#endif
-+
- #endif
-
- #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */
-diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
-index 684afd6c190..22cfa391b89 100644
---- a/gcc/config/rs6000/linux.h
-+++ b/gcc/config/rs6000/linux.h
-@@ -91,6 +91,16 @@
- " -m elf32ppclinux")
- #endif
-
-+/* link libssp_nonshared.a with musl */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#ifdef TARGET_LIBC_PROVIDES_SSP
-+#undef LINK_SSP_SPEC
-+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-+ "|fstack-protector-strong|fstack-protector-explicit" \
-+ ":-lssp_nonshared}"
-+#endif
-+#endif
-+
- #undef LINK_OS_LINUX_SPEC
- #define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \
- %{rdynamic:-export-dynamic} \
-diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index 3b00ec0fcf0..8371f8d7b6b 100644
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -465,6 +465,16 @@ extern int dot_symbols;
- " -m elf64ppc")
- #endif
-
-+/* link libssp_nonshared.a with musl */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#ifdef TARGET_LIBC_PROVIDES_SSP
-+#undef LINK_SSP_SPEC
-+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-+ "|fstack-protector-strong|fstack-protector-explicit" \
-+ ":-lssp_nonshared}"
-+#endif
-+#endif
-+
- #define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \
- %{rdynamic:-export-dynamic} \
- -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}} \
---
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch
deleted file mode 100644
index 861f0fd..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch
+++ /dev/null
@@ -1,292 +0,0 @@
-From ba738cc411c9a54e389e336bcaa0a2428dd4a9d2 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 16 Mar 2016 02:27:43 -0400
-Subject: [PATCH 42/46] gcc/libcpp: support -ffile-prefix-map=<old>=<new>
-
-Similar -fdebug-prefix-map, add option -ffile-prefix-map to map one
-directory name (old) to another (new) in __FILE__, __BASE_FILE__ and
-__builtin_FILE ().
-
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268
-
-Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/c-family/c-opts.c | 13 +++++++
- gcc/c-family/c.opt | 4 +++
- gcc/dwarf2out.c | 1 +
- gcc/gimplify.c | 3 ++
- libcpp/Makefile.in | 10 +++---
- libcpp/file-map.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++
- libcpp/include/file-map.h | 30 ++++++++++++++++
- libcpp/macro.c | 2 ++
- 8 files changed, 150 insertions(+), 5 deletions(-)
- create mode 100644 libcpp/file-map.c
- create mode 100644 libcpp/include/file-map.h
-
-diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
-index fec58bc..7a0af43 100644
---- a/gcc/c-family/c-opts.c
-+++ b/gcc/c-family/c-opts.c
-@@ -38,6 +38,14 @@ along with GCC; see the file COPYING3. If not see
- #include "opts.h"
- #include "plugin.h" /* For PLUGIN_INCLUDE_FILE event. */
- #include "mkdeps.h"
-+#include "file-map.h"
-+#include "c-target.h"
-+#include "tm.h" /* For BYTES_BIG_ENDIAN,
-+ DOLLARS_IN_IDENTIFIERS,
-+ STDC_0_IN_SYSTEM_HEADERS,
-+ TARGET_FLT_EVAL_METHOD_NON_DEFAULT and
-+ TARGET_OPTF. */
-+#include "tm_p.h" /* For C_COMMON_OVERRIDE_OPTIONS. */
- #include "dumpfile.h"
-
- #ifndef DOLLARS_IN_IDENTIFIERS
-@@ -503,6 +511,11 @@ c_common_handle_option (size_t scode, const char *arg, int value,
- cpp_opts->narrow_charset = arg;
- break;
-
-+ case OPT_ffile_prefix_map_:
-+ if (add_file_prefix_map (arg) < 0)
-+ error ("invalid argument %qs to -ffile-prefix-map", arg);
-+ break;
-+
- case OPT_fwide_exec_charset_:
- cpp_opts->wide_charset = arg;
- break;
-diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
-index 660da6c..31f7b34 100644
---- a/gcc/c-family/c.opt
-+++ b/gcc/c-family/c.opt
-@@ -1208,6 +1208,10 @@ fexec-charset=
- C ObjC C++ ObjC++ Joined RejectNegative
- -fexec-charset=<cset> Convert all strings and character constants to character set <cset>.
-
-+ffile-prefix-map=
-+C ObjC C++ ObjC++ Joined RejectNegative
-+-ffile-prefix-map=<old=new> Map one directory name to another in __FILE__, __BASE_FILE__ and __builtin_FILE ()
-+
- fextended-identifiers
- C ObjC C++ ObjC++
- Permit universal character names (\\u and \\U) in identifiers.
-diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
-index 80f2df5..a2bfcc0 100644
---- a/gcc/dwarf2out.c
-+++ b/gcc/dwarf2out.c
-@@ -21672,6 +21672,7 @@ gen_producer_string (void)
- case OPT_fltrans_output_list_:
- case OPT_fresolution_:
- case OPT_fdebug_prefix_map_:
-+ case OPT_ffile_prefix_map_:
- /* Ignore these. */
- continue;
- default:
-diff --git a/gcc/gimplify.c b/gcc/gimplify.c
-index e223e59..1433c25 100644
---- a/gcc/gimplify.c
-+++ b/gcc/gimplify.c
-@@ -57,6 +57,8 @@ along with GCC; see the file COPYING3. If not see
- #include "gomp-constants.h"
- #include "tree-dump.h"
- #include "gimple-walk.h"
-+#include "file-map.h"
-+
- #include "langhooks-def.h" /* FIXME: for lhd_set_decl_assembler_name */
- #include "builtins.h"
-
-@@ -2432,6 +2434,7 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
- case BUILT_IN_FILE:
- {
- const char *locfile = LOCATION_FILE (EXPR_LOCATION (*expr_p));
-+ locfile = remap_file_filename (locfile);
- *expr_p = build_string_literal (strlen (locfile) + 1, locfile);
- return GS_OK;
- }
-diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
-index a7d7828..3d29572 100644
---- a/libcpp/Makefile.in
-+++ b/libcpp/Makefile.in
-@@ -84,12 +84,12 @@ DEPMODE = $(CXXDEPMODE)
-
-
- libcpp_a_OBJS = charset.o directives.o directives-only.o errors.o \
-- expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \
-- mkdeps.o pch.o symtab.o traditional.o
-+ expr.o file-map.o files.o identifiers.o init.o lex.o line-map.o \
-+ macro.o mkdeps.o pch.o symtab.o traditional.o
-
- libcpp_a_SOURCES = charset.c directives.c directives-only.c errors.c \
-- expr.c files.c identifiers.c init.c lex.c line-map.c macro.c \
-- mkdeps.c pch.c symtab.c traditional.c
-+ expr.c file-map.c files.c identifiers.c init.c lex.c line-map.c \
-+ macro.c mkdeps.c pch.c symtab.c traditional.c
-
- all: libcpp.a $(USED_CATALOGS)
-
-@@ -263,7 +263,7 @@ po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
-
- TAGS_SOURCES = $(libcpp_a_SOURCES) internal.h ucnid.h \
- include/line-map.h include/symtab.h include/cpp-id-data.h \
-- include/cpplib.h include/mkdeps.h system.h
-+ include/cpplib.h include/mkdeps.h system.h include/file-map.h
-
- TAGS: $(TAGS_SOURCES)
- cd $(srcdir) && etags $(TAGS_SOURCES)
-diff --git a/libcpp/file-map.c b/libcpp/file-map.c
-new file mode 100644
-index 0000000..18035ef
---- /dev/null
-+++ b/libcpp/file-map.c
-@@ -0,0 +1,92 @@
-+/* Map one directory name to another in __FILE__, __BASE_FILE__
-+ and __builtin_FILE ().
-+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
-+
-+This program is free software; you can redistribute it and/or modify it
-+under the terms of the GNU General Public License as published by the
-+Free Software Foundation; either version 3, or (at your option) any
-+later version.
-+
-+This program is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with this program; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>.
-+
-+ In other words, you are welcome to use, share and improve this program.
-+ You are forbidden to forbid anyone else to use, share and improve
-+ what you give them. Help stamp out software-hoarding! */
-+
-+#include "config.h"
-+#include "system.h"
-+#include "file-map.h"
-+
-+/* Structure recording the mapping from source file and directory
-+ names at compile time to __FILE__ */
-+typedef struct file_prefix_map
-+{
-+ const char *old_prefix;
-+ const char *new_prefix;
-+ size_t old_len;
-+ size_t new_len;
-+ struct file_prefix_map *next;
-+} file_prefix_map;
-+
-+/* Linked list of such structures. */
-+static file_prefix_map *file_prefix_maps;
-+
-+/* Record prefix mapping of __FILE__. ARG is the argument to
-+ -ffile-prefix-map and must be of the form OLD=NEW. */
-+int
-+add_file_prefix_map (const char *arg)
-+{
-+ file_prefix_map *map;
-+ const char *p;
-+
-+ p = strchr (arg, '=');
-+ if (!p)
-+ {
-+ fprintf(stderr, "invalid argument %qs to -ffile-prefix-map", arg);
-+ return -1;
-+ }
-+ map = XNEW (file_prefix_map);
-+ map->old_prefix = xstrndup (arg, p - arg);
-+ map->old_len = p - arg;
-+ p++;
-+ map->new_prefix = xstrdup (p);
-+ map->new_len = strlen (p);
-+ map->next = file_prefix_maps;
-+ file_prefix_maps = map;
-+
-+ return 0;
-+}
-+
-+/* Perform user-specified mapping of __FILE__ prefixes. Return
-+ the new name corresponding to filename. */
-+
-+const char *
-+remap_file_filename (const char *filename)
-+{
-+ file_prefix_map *map;
-+ char *s;
-+ const char *name;
-+ size_t name_len;
-+
-+ for (map = file_prefix_maps; map; map = map->next)
-+ if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
-+ break;
-+ if (!map)
-+ return filename;
-+ name = filename + map->old_len;
-+ name_len = strlen (name) + 1;
-+ s = (char *) alloca (name_len + map->new_len);
-+ memcpy (s, map->new_prefix, map->new_len);
-+ memcpy (s + map->new_len, name, name_len);
-+
-+ return xstrdup (s);
-+}
-+
-+
-diff --git a/libcpp/include/file-map.h b/libcpp/include/file-map.h
-new file mode 100644
-index 0000000..8750315
---- /dev/null
-+++ b/libcpp/include/file-map.h
-@@ -0,0 +1,30 @@
-+/* Map one directory name to another in __FILE__, __BASE_FILE__
-+ and __builtin_FILE ().
-+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
-+
-+This program is free software; you can redistribute it and/or modify it
-+under the terms of the GNU General Public License as published by the
-+Free Software Foundation; either version 3, or (at your option) any
-+later version.
-+
-+This program is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with this program; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>.
-+
-+ In other words, you are welcome to use, share and improve this program.
-+ You are forbidden to forbid anyone else to use, share and improve
-+ what you give them. Help stamp out software-hoarding! */
-+
-+#ifndef LIBCPP_FILE_MAP_H
-+#define LIBCPP_FILE_MAP_H
-+
-+const char * remap_file_filename (const char *filename);
-+
-+int add_file_prefix_map (const char *arg);
-+
-+#endif /* !LIBCPP_FILE_MAP_H */
-diff --git a/libcpp/macro.c b/libcpp/macro.c
-index c251553..3ceec3d 100644
---- a/libcpp/macro.c
-+++ b/libcpp/macro.c
-@@ -26,6 +26,7 @@ along with this program; see the file COPYING3. If not see
- #include "system.h"
- #include "cpplib.h"
- #include "internal.h"
-+#include "file-map.h"
-
- typedef struct macro_arg macro_arg;
- /* This structure represents the tokens of a macro argument. These
-@@ -301,6 +302,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node,
- if (!name)
- abort ();
- }
-+ name = remap_file_filename (name);
- len = strlen (name);
- buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
- result = buf;
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
deleted file mode 100644
index 0077f80..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 25c87c6cc40ec5cc6965f8bfb215bec01abd6d82 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 16 Mar 2016 05:39:59 -0400
-Subject: [PATCH 43/46] Reuse -fdebug-prefix-map to replace -ffile-prefix-map
-
-The oe-core may use external toolchain to compile,
-which may not support -ffile-prefix-map.
-
-Since we use -fdebug-prefix-map to do the same thing,
-so we could reuse it to replace -ffile-prefix-map.
-
-Upstream-Status: Inappropriate[oe-core specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/opts-global.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/gcc/opts-global.c b/gcc/opts-global.c
-index b7e5232..121d7b9 100644
---- a/gcc/opts-global.c
-+++ b/gcc/opts-global.c
-@@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see
- #include "langhooks.h"
- #include "dbgcnt.h"
- #include "debug.h"
-+#include "file-map.h"
- #include "output.h"
- #include "plugin.h"
- #include "toplev.h"
-@@ -357,6 +358,9 @@ handle_common_deferred_options (void)
-
- case OPT_fdebug_prefix_map_:
- add_debug_prefix_map (opt->arg);
-+
-+ /* Reuse -fdebug-prefix-map to replace -ffile-prefix-map */
-+ add_file_prefix_map (opt->arg);
- break;
-
- case OPT_fdump_:
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch
deleted file mode 100644
index 5d41af4..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 6ab23e88aef22bbabee7b9600c459ff39547bb66 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 24 Mar 2016 11:23:14 -0400
-Subject: [PATCH 44/46] gcc/final.c: -fdebug-prefix-map support to remap
- sources with relative path
-
-PR other/70428
-* final.c (remap_debug_filename): Use lrealpath to translate
-relative path before remapping
-
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70428
-Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/final.c | 15 ++++++++++++---
- 1 file changed, 12 insertions(+), 3 deletions(-)
-
-diff --git a/gcc/final.c b/gcc/final.c
-index 55cf509..23293e5 100644
---- a/gcc/final.c
-+++ b/gcc/final.c
-@@ -1554,16 +1554,25 @@ remap_debug_filename (const char *filename)
- const char *name;
- size_t name_len;
-
-+ /* Support to remap filename with relative path */
-+ char *realpath = lrealpath (filename);
-+ if (realpath == NULL)
-+ return filename;
-+
- for (map = debug_prefix_maps; map; map = map->next)
-- if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
-+ if (filename_ncmp (realpath, map->old_prefix, map->old_len) == 0)
- break;
- if (!map)
-- return filename;
-- name = filename + map->old_len;
-+ {
-+ free (realpath);
-+ return filename;
-+ }
-+ name = realpath + map->old_len;
- name_len = strlen (name) + 1;
- s = (char *) alloca (name_len + map->new_len);
- memcpy (s, map->new_prefix, map->new_len);
- memcpy (s + map->new_len, name, name_len);
-+ free (realpath);
- return ggc_strdup (s);
- }
-
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
deleted file mode 100644
index c62b727..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From 5a47d404ea29e2547269e3ddf38754462d93f903 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Apr 2016 20:03:28 +0000
-Subject: [PATCH 45/46] libgcc: Add knob to use ldbl-128 on ppc
-
-musl does not support ldbl 128 so we can not assume
-that linux as a whole supports ldbl-128 bits, instead
-act upon configure option passed to gcc and assume no
-on musl and yes otherwise if no option is passed since
-default behaviour is to assume ldbl128 it does not
-change the defaults
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- libgcc/Makefile.in | 1 +
- libgcc/config/rs6000/t-linux | 5 ++++-
- libgcc/configure | 18 ++++++++++++++++++
- libgcc/configure.ac | 12 ++++++++++++
- 4 files changed, 35 insertions(+), 1 deletion(-)
- mode change 100644 => 100755 libgcc/configure
-
-diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
-index f09b39b..296cf0f 100644
---- a/libgcc/Makefile.in
-+++ b/libgcc/Makefile.in
-@@ -43,6 +43,7 @@ enable_vtable_verify = @enable_vtable_verify@
- enable_decimal_float = @enable_decimal_float@
- fixed_point = @fixed_point@
- with_aix_soname = @with_aix_soname@
-+with_ldbl128 = @with_ldbl128@
-
- host_noncanonical = @host_noncanonical@
- real_host_noncanonical = @real_host_noncanonical@
-diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux
-index 4f6d4c4..c50dd94 100644
---- a/libgcc/config/rs6000/t-linux
-+++ b/libgcc/config/rs6000/t-linux
-@@ -1,3 +1,6 @@
- SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver
-
--HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc
-+ifeq ($(with_ldbl128),yes)
-+HOST_LIBGCC2_CFLAGS += -mlong-double-128
-+endif
-+HOST_LIBGCC2_CFLAGS += -mno-minimal-toc
-diff --git a/libgcc/configure b/libgcc/configure
-old mode 100644
-new mode 100755
-index e7d6c75..e9a9019
---- a/libgcc/configure
-+++ b/libgcc/configure
-@@ -614,6 +614,7 @@ build_vendor
- build_cpu
- build
- with_aix_soname
-+with_ldbl128
- enable_vtable_verify
- enable_shared
- libgcc_topdir
-@@ -663,6 +664,7 @@ with_cross_host
- with_ld
- enable_shared
- enable_vtable_verify
-+with_long_double_128
- with_aix_soname
- enable_version_specific_runtime_libs
- with_slibdir
-@@ -1319,6 +1321,7 @@ Optional Packages:
- --with-target-subdir=SUBDIR Configuring in a subdirectory for target
- --with-cross-host=HOST Configuring with a cross compiler
- --with-ld arrange to use the specified ld (full pathname)
-+ --with-long-double-128 use 128-bit long double by default
- --with-aix-soname=aix|svr4|both
- shared library versioning (aka "SONAME") variant to
- provide on AIX
-@@ -2201,6 +2204,21 @@ fi
-
-
-
-+# Check whether --with-long-double-128 was given.
-+if test "${with_long_double_128+set}" = set; then :
-+ withval=$with_long_double_128; with_ldbl128="$with_long_double_128"
-+else
-+ case "${host}" in
-+ power*-*-musl*)
-+ with_ldbl128="no";;
-+ *) with_ldbl128="yes";;
-+ esac
-+
-+fi
-+
-+
-+
-+
- # Check whether --with-aix-soname was given.
- if test "${with_aix_soname+set}" = set; then :
- withval=$with_aix_soname; case "${host}:${enable_shared}" in
-diff --git a/libgcc/configure.ac b/libgcc/configure.ac
-index 269997f..81dc3ba 100644
---- a/libgcc/configure.ac
-+++ b/libgcc/configure.ac
-@@ -77,6 +77,18 @@ AC_ARG_ENABLE(vtable-verify,
- [enable_vtable_verify=no])
- AC_SUBST(enable_vtable_verify)
-
-+AC_ARG_WITH(long-double-128,
-+[AS_HELP_STRING([--with-long-double-128],
-+ [use 128-bit long double by default])],
-+ with_ldbl128="$with_long_double_128",
-+[case "${host}" in
-+ power*-*-musl*)
-+ with_ldbl128="no";;
-+ *) with_ldbl128="yes";;
-+ esac
-+])
-+AC_SUBST(with_ldbl128)
-+
- AC_ARG_WITH(aix-soname,
- [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
- [shared library versioning (aka "SONAME") variant to provide on AIX])],
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
deleted file mode 100644
index 390037f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 513bf3c33e2f551f08bd57605091d5ddeba3536b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 4 May 2016 21:11:34 -0700
-Subject: [PATCH 46/46] Link libgcc using LDFLAGS, not just SHLIB_LDFLAGS
-
-Upstream-Status: Pending
-
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libgcc/config/t-slibgcc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc
-index 8c5f890..29be909 100644
---- a/libgcc/config/t-slibgcc
-+++ b/libgcc/config/t-slibgcc
-@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
- $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
-
- SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-- $(SHLIB_LDFLAGS) \
-+ $(LDFLAGS) $(SHLIB_LDFLAGS) \
- -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
- $(SHLIB_OBJS) $(SHLIB_LC) && \
- rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
deleted file mode 100644
index 6b5da02..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 0a9ed0479203cb7e69c3745b0c259007410f39ba Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz@port70.net>
-Date: Sat, 24 Oct 2015 20:09:53 +0000
-Subject: [PATCH 47/47] libgcc_s: Use alias for __cpu_indicator_init instead of
- symver
-
-Adapter from
-
-https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00899.html
-
-This fix was debated but hasnt been applied gcc upstream since
-they expect musl to support '@' in symbol versioning which is
-a sun/gnu versioning extention. This patch however avoids the
-need for the '@' symbols at all
-
-libgcc/Changelog:
-
-2015-05-11 Szabolcs Nagy <szabolcs.nagy@arm.com>
-
- * config/i386/cpuinfo.c (__cpu_indicator_init_local): Add.
- (__cpu_indicator_init@GCC_4.8.0, __cpu_model@GCC_4.8.0): Remove.
-
- * config/i386/t-linux (HOST_LIBGCC2_CFLAGS): Remove -DUSE_ELF_SYMVER.
-
-gcc/Changelog:
-
-2015-05-11 Szabolcs Nagy <szabolcs.nagy@arm.com>
-
- * config/i386/i386.c (ix86_expand_builtin): Make __builtin_cpu_init
- call __cpu_indicator_init_local instead of __cpu_indicator_init.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Denied
-
- gcc/config/i386/i386.c | 4 ++--
- libgcc/config/i386/cpuinfo.c | 6 +++---
- libgcc/config/i386/t-linux | 2 +-
- 3 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 861a029..1c97d72 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -40323,10 +40323,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
- {
- case IX86_BUILTIN_CPU_INIT:
- {
-- /* Make it call __cpu_indicator_init in libgcc. */
-+ /* Make it call __cpu_indicator_init_local in libgcc.a. */
- tree call_expr, fndecl, type;
- type = build_function_type_list (integer_type_node, NULL_TREE);
-- fndecl = build_fn_decl ("__cpu_indicator_init", type);
-+ fndecl = build_fn_decl ("__cpu_indicator_init_local", type);
- call_expr = build_call_expr (fndecl, 0);
- return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
- }
-diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
-index 8c2248d..6c82f15 100644
---- a/libgcc/config/i386/cpuinfo.c
-+++ b/libgcc/config/i386/cpuinfo.c
-@@ -485,7 +485,7 @@ __cpu_indicator_init (void)
- return 0;
- }
-
--#if defined SHARED && defined USE_ELF_SYMVER
--__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
--__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
-+#ifndef SHARED
-+int __cpu_indicator_init_local (void)
-+ __attribute__ ((weak, alias ("__cpu_indicator_init")));
- #endif
-diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux
-index 11bb46e..4f47f7b 100644
---- a/libgcc/config/i386/t-linux
-+++ b/libgcc/config/i386/t-linux
-@@ -3,4 +3,4 @@
- # t-slibgcc-elf-ver and t-linux
- SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
-
--HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER
-+HOST_LIBGCC2_CFLAGS += -mlong-double-80
---
-2.9.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0048-sync-gcc-stddef.h-with-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0048-sync-gcc-stddef.h-with-musl.patch
deleted file mode 100644
index 30c158d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0048-sync-gcc-stddef.h-with-musl.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 10595c03c39b4e980d2a00e16fc84e9caf82292e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 3 Feb 2017 12:56:00 -0800
-Subject: [PATCH 48/48] sync gcc stddef.h with musl
-
-musl defines ptrdiff_t size_t and wchar_t
-so dont define them here if musl is definining them
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- gcc/ginclude/stddef.h | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
-index d711530d053..c315b7a97c1 100644
---- a/gcc/ginclude/stddef.h
-+++ b/gcc/ginclude/stddef.h
-@@ -134,6 +134,7 @@ _TYPE_wchar_t;
- #ifndef ___int_ptrdiff_t_h
- #ifndef _GCC_PTRDIFF_T
- #ifndef _PTRDIFF_T_DECLARED /* DragonFly */
-+#ifndef __DEFINED_ptrdiff_t /* musl */
- #define _PTRDIFF_T
- #define _T_PTRDIFF_
- #define _T_PTRDIFF
-@@ -143,10 +144,12 @@ _TYPE_wchar_t;
- #define ___int_ptrdiff_t_h
- #define _GCC_PTRDIFF_T
- #define _PTRDIFF_T_DECLARED
-+#define __DEFINED_ptrdiff_t /* musl */
- #ifndef __PTRDIFF_TYPE__
- #define __PTRDIFF_TYPE__ long int
- #endif
- typedef __PTRDIFF_TYPE__ ptrdiff_t;
-+#endif /* __DEFINED_ptrdiff_t */
- #endif /* _PTRDIFF_T_DECLARED */
- #endif /* _GCC_PTRDIFF_T */
- #endif /* ___int_ptrdiff_t_h */
-@@ -184,6 +187,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
- #ifndef _GCC_SIZE_T
- #ifndef _SIZET_
- #ifndef __size_t
-+#ifndef __DEFINED_size_t /* musl */
- #define __size_t__ /* BeOS */
- #define __SIZE_T__ /* Cray Unicos/Mk */
- #define _SIZE_T
-@@ -200,6 +204,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
- #define ___int_size_t_h
- #define _GCC_SIZE_T
- #define _SIZET_
-+#define __DEFINED_size_t /* musl */
- #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
- || defined(__DragonFly__) \
- || defined(__FreeBSD_kernel__)
-@@ -235,6 +240,7 @@ typedef long ssize_t;
- #endif /* _SIZE_T */
- #endif /* __SIZE_T__ */
- #endif /* __size_t__ */
-+#endif /* __DEFINED_size_t */
- #undef __need_size_t
- #endif /* _STDDEF_H or __need_size_t. */
-
-@@ -264,6 +270,7 @@ typedef long ssize_t;
- #ifndef ___int_wchar_t_h
- #ifndef __INT_WCHAR_T_H
- #ifndef _GCC_WCHAR_T
-+#ifndef __DEFINED_wchar_t /* musl */
- #define __wchar_t__ /* BeOS */
- #define __WCHAR_T__ /* Cray Unicos/Mk */
- #define _WCHAR_T
-@@ -279,6 +286,7 @@ typedef long ssize_t;
- #define __INT_WCHAR_T_H
- #define _GCC_WCHAR_T
- #define _WCHAR_T_DECLARED
-+#define __DEFINED_wchar_t /* musl */
-
- /* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
- instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other
-@@ -344,6 +352,7 @@ typedef __WCHAR_TYPE__ wchar_t;
- #endif
- #endif /* __WCHAR_T__ */
- #endif /* __wchar_t__ */
-+#endif /* __DEFINED_wchar_t musl */
- #undef __need_wchar_t
- #endif /* _STDDEF_H or __need_wchar_t. */
-
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0054_all_nopie-all-flags.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0054_all_nopie-all-flags.patch
deleted file mode 100644
index 73ab950..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0054_all_nopie-all-flags.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Need to pass NO_PIE_CFLAGS to ALL_* so gcc doesn't fail when
-we compile it with older gcc and pie.
-
-Upstream-Status: Inappropriate [configuration]
-
-Maintained by: Gentoo Toolchain Project <toolchain@gentoo.org>
-Signed-off-by: Stephen Arnold <stephen.arnold42@gmail.com>
-
---- a/gcc/Makefile.in 2015-06-25 19:18:12.000000000 +0200
-+++ b/gcc/Makefile.in 2016-04-22 00:12:54.029178860 +0200
-@@ -991,10 +991,10 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@)
- ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS)
-
- # This is the variable to use when using $(COMPILER).
--ALL_COMPILERFLAGS = $(ALL_CXXFLAGS)
-+ALL_COMPILERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
-
- # This is the variable to use when using $(LINKER).
--ALL_LINKERFLAGS = $(ALL_CXXFLAGS)
-+ALL_LINKERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
-
- # Build and host support libraries.
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0055-unwind_h-glibc26.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0055-unwind_h-glibc26.patch
deleted file mode 100644
index c266cfe..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0055-unwind_h-glibc26.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-Backport and edit of patches from:
-https://gcc.gnu.org/viewcvs/gcc?limit_changes=0&view=revision&revision=249957
-by jsm28 (Joseph Myers)
-
-Current glibc no longer gives the ucontext_t type the tag struct
-ucontext, to conform with POSIX namespace rules. This requires
-various linux-unwind.h files in libgcc, that were previously using
-struct ucontext, to be fixed to use ucontext_t instead. This is
-similar to the removal of the struct siginfo tag from siginfo_t some
-years ago.
-
-This patch changes those files to use ucontext_t instead. As the
-standard name that should be unconditionally safe, so this is not
-restricted to architectures supported by glibc, or conditioned on the
-glibc version.
-
-Upstream-Status: Backport
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
---- branches/gcc-6-branch/libgcc/config/aarch64/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/aarch64/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -52,7 +52,7 @@
- struct rt_sigframe
- {
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- };
-
- struct rt_sigframe *rt_;
---- branches/gcc-6-branch/libgcc/config/alpha/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/alpha/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -51,7 +51,7 @@
- {
- struct rt_sigframe {
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- } *rt_ = context->cfa;
- sc = &rt_->uc.uc_mcontext;
- }
---- branches/gcc-6-branch/libgcc/config/bfin/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/bfin/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -52,7 +52,7 @@
- void *puc;
- char retcode[8];
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- } *rt_ = context->cfa;
-
- /* The void * cast is necessary to avoid an aliasing warning.
---- branches/gcc-6-branch/libgcc/config/i386/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/i386/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -58,7 +58,7 @@
- if (*(unsigned char *)(pc+0) == 0x48
- && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
- {
-- struct ucontext *uc_ = context->cfa;
-+ ucontext_t *uc_ = context->cfa;
- /* The void * cast is necessary to avoid an aliasing warning.
- The aliasing warning is correct, but should not be a problem
- because it does not alias anything. */
-@@ -138,7 +138,7 @@
- siginfo_t *pinfo;
- void *puc;
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- } *rt_ = context->cfa;
- /* The void * cast is necessary to avoid an aliasing warning.
- The aliasing warning is correct, but should not be a problem
---- branches/gcc-6-branch/libgcc/config/m68k/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/m68k/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -33,7 +33,7 @@
- /* <sys/ucontext.h> is unfortunately broken right now. */
- struct uw_ucontext {
- unsigned long uc_flags;
-- struct ucontext *uc_link;
-+ ucontext_t *uc_link;
- stack_t uc_stack;
- mcontext_t uc_mcontext;
- unsigned long uc_filler[80];
---- branches/gcc-6-branch/libgcc/config/nios2/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/nios2/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -38,7 +38,7 @@
-
- struct nios2_ucontext {
- unsigned long uc_flags;
-- struct ucontext *uc_link;
-+ ucontext_t *uc_link;
- stack_t uc_stack;
- struct nios2_mcontext uc_mcontext;
- sigset_t uc_sigmask; /* mask last for extensibility */
---- branches/gcc-6-branch/libgcc/config/pa/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/pa/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -80,7 +80,7 @@
- struct sigcontext *sc;
- struct rt_sigframe {
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- } *frame;
-
- /* rt_sigreturn trampoline:
---- branches/gcc-6-branch/libgcc/config/sh/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/sh/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -180,7 +180,7 @@
- {
- struct rt_sigframe {
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- } *rt_ = context->cfa;
- /* The void * cast is necessary to avoid an aliasing warning.
- The aliasing warning is correct, but should not be a problem
---- branches/gcc-6-branch/libgcc/config/tilepro/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/tilepro/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -61,7 +61,7 @@
- struct rt_sigframe {
- unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- } *rt_;
-
- /* Return if this is not a signal handler. */
---- branches/gcc-6-branch/libgcc/config/xtensa/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/xtensa/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -67,7 +67,7 @@
-
- struct rt_sigframe {
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- } *rt_;
-
- /* movi a2, __NR_rt_sigreturn; syscall */
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0057-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0057-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch
deleted file mode 100644
index 0214ab8..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0057-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-From ad5bf450aef2ffee6d57ed193fabc5f72f8eaa65 Mon Sep 17 00:00:00 2001
-From: rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 19 Oct 2017 13:16:42 +0000
-Subject: [PATCH] [ARM] PR 82445 - suppress 32-bit aligned ldrd/strd peepholing
- with -mno-unaligned-access
-
-Peephole patterns exist in the arm backend to spot load/store
-operations to adjacent memory operations in order to convert them into
-ldrd/strd instructions. However, when we have strict alignment
-enforced, then we can only do this if the accesses are known to be
-64-bit aligned; this is unlikely to be the case for most loads. The
-patch adds some alignment checking to the code that validates the
-addresses for use in the peephole patterns. This should also fix
-incorrect generation of ldrd/strd with unaligned accesses that could
-previously have occurred on ARMv5e where all such operations must be
-64-bit aligned.
-
-I've added some new tests as well. In doing so I discovered that the
-ldrd/strd peephole tests could never fail since they would match the
-source file name in the scanned assembly as well as any instructions
-of the intended type. I've fixed those by tightening the scan results
-slightly.
-
-gcc:
-
-* config/arm/arm.c (align_ok_ldrd_strd): New function.
-(mem_ok_for_ldrd_strd): New parameter align. Extract the alignment of the
-mem into it.
-(gen_operands_ldrd_strd): Validate the alignment of the accesses.
-
-testsuite:
-
-* gcc.target/arm/peep-ldrd-1.c: Tighten test scan pattern.
-* gcc.target/arm/peep-strd-1.c: Likewise.
-* gcc.target/arm/peep-ldrd-2.c: New test.
-* gcc.target/arm/peep-strd-2.c: New test.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@253892 138bc75d-0d04-0410-961f-82ee72b054a4
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- gcc/ChangeLog | 8 +++++++
- gcc/config/arm/arm.c | 27 ++++++++++++++++++----
- gcc/testsuite/ChangeLog | 8 +++++++
- gcc/testsuite/gcc.target/arm/peep-ldrd-1.c | 2 +-
- .../arm/{peep-ldrd-1.c => peep-ldrd-2.c} | 4 ++--
- gcc/testsuite/gcc.target/arm/peep-strd-1.c | 2 +-
- .../arm/{peep-strd-1.c => peep-strd-2.c} | 4 ++--
- 7 files changed, 44 insertions(+), 11 deletions(-)
- copy gcc/testsuite/gcc.target/arm/{peep-ldrd-1.c => peep-ldrd-2.c} (63%)
- copy gcc/testsuite/gcc.target/arm/{peep-strd-1.c => peep-strd-2.c} (58%)
-
-diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
-index 9c0813d598d..e3da9f77fb6 100644
---- a/gcc/config/arm/arm.c
-+++ b/gcc/config/arm/arm.c
-@@ -15926,12 +15926,23 @@ operands_ok_ldrd_strd (rtx rt, rtx rt2, rtx rn, HOST_WIDE_INT offset,
- return true;
- }
-
-+/* Return true if a 64-bit access with alignment ALIGN and with a
-+ constant offset OFFSET from the base pointer is permitted on this
-+ architecture. */
-+static bool
-+align_ok_ldrd_strd (HOST_WIDE_INT align, HOST_WIDE_INT offset)
-+{
-+ return (unaligned_access
-+ ? (align >= BITS_PER_WORD && (offset & 3) == 0)
-+ : (align >= 2 * BITS_PER_WORD && (offset & 7) == 0));
-+}
-+
- /* Helper for gen_operands_ldrd_strd. Returns true iff the memory
- operand MEM's address contains an immediate offset from the base
-- register and has no side effects, in which case it sets BASE and
-- OFFSET accordingly. */
-+ register and has no side effects, in which case it sets BASE,
-+ OFFSET and ALIGN accordingly. */
- static bool
--mem_ok_for_ldrd_strd (rtx mem, rtx *base, rtx *offset)
-+mem_ok_for_ldrd_strd (rtx mem, rtx *base, rtx *offset, HOST_WIDE_INT *align)
- {
- rtx addr;
-
-@@ -15950,6 +15961,7 @@ mem_ok_for_ldrd_strd (rtx mem, rtx *base, rtx *offset)
- gcc_assert (MEM_P (mem));
-
- *offset = const0_rtx;
-+ *align = MEM_ALIGN (mem);
-
- addr = XEXP (mem, 0);
-
-@@ -15990,7 +16002,7 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
- bool const_store, bool commute)
- {
- int nops = 2;
-- HOST_WIDE_INT offsets[2], offset;
-+ HOST_WIDE_INT offsets[2], offset, align[2];
- rtx base = NULL_RTX;
- rtx cur_base, cur_offset, tmp;
- int i, gap;
-@@ -16002,7 +16014,8 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
- registers, and the corresponding memory offsets. */
- for (i = 0; i < nops; i++)
- {
-- if (!mem_ok_for_ldrd_strd (operands[nops+i], &cur_base, &cur_offset))
-+ if (!mem_ok_for_ldrd_strd (operands[nops+i], &cur_base, &cur_offset,
-+ &align[i]))
- return false;
-
- if (i == 0)
-@@ -16114,6 +16127,7 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
- /* Swap the instructions such that lower memory is accessed first. */
- std::swap (operands[0], operands[1]);
- std::swap (operands[2], operands[3]);
-+ std::swap (align[0], align[1]);
- if (const_store)
- std::swap (operands[4], operands[5]);
- }
-@@ -16127,6 +16141,9 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
- if (gap != 4)
- return false;
-
-+ if (!align_ok_ldrd_strd (align[0], offset))
-+ return false;
-+
- /* Make sure we generate legal instructions. */
- if (operands_ok_ldrd_strd (operands[0], operands[1], base, offset,
- false, load))
-diff --git a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c b/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-index eb2b86ee7b6..d49eff6b87e 100644
---- a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-+++ b/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-@@ -8,4 +8,4 @@ int foo(int a, int b, int* p, int *q)
- *p = a;
- return a;
- }
--/* { dg-final { scan-assembler "ldrd" } } */
-+/* { dg-final { scan-assembler "ldrd\\t" } } */
-diff --git a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c b/gcc/testsuite/gcc.target/arm/peep-ldrd-2.c
-similarity index 63%
-copy from gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-copy to gcc/testsuite/gcc.target/arm/peep-ldrd-2.c
-index eb2b86ee7b6..6822c2b1454 100644
---- a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-+++ b/gcc/testsuite/gcc.target/arm/peep-ldrd-2.c
-@@ -1,6 +1,6 @@
- /* { dg-do compile } */
- /* { dg-require-effective-target arm_prefer_ldrd_strd } */
--/* { dg-options "-O2" } */
-+/* { dg-options "-O2 -mno-unaligned-access" } */
- int foo(int a, int b, int* p, int *q)
- {
- a = p[2] + p[3];
-@@ -8,4 +8,4 @@ int foo(int a, int b, int* p, int *q)
- *p = a;
- return a;
- }
--/* { dg-final { scan-assembler "ldrd" } } */
-+/* { dg-final { scan-assembler-not "ldrd\\t" } } */
-diff --git a/gcc/testsuite/gcc.target/arm/peep-strd-1.c b/gcc/testsuite/gcc.target/arm/peep-strd-1.c
-index bd330769599..fe1beac7229 100644
---- a/gcc/testsuite/gcc.target/arm/peep-strd-1.c
-+++ b/gcc/testsuite/gcc.target/arm/peep-strd-1.c
-@@ -6,4 +6,4 @@ void foo(int a, int b, int* p)
- p[2] = a;
- p[3] = b;
- }
--/* { dg-final { scan-assembler "strd" } } */
-+/* { dg-final { scan-assembler "strd\\t" } } */
-diff --git a/gcc/testsuite/gcc.target/arm/peep-strd-1.c b/gcc/testsuite/gcc.target/arm/peep-strd-2.c
-similarity index 58%
-copy from gcc/testsuite/gcc.target/arm/peep-strd-1.c
-copy to gcc/testsuite/gcc.target/arm/peep-strd-2.c
-index bd330769599..bfc5ebe9eec 100644
---- a/gcc/testsuite/gcc.target/arm/peep-strd-1.c
-+++ b/gcc/testsuite/gcc.target/arm/peep-strd-2.c
-@@ -1,9 +1,9 @@
- /* { dg-do compile } */
- /* { dg-require-effective-target arm_prefer_ldrd_strd } */
--/* { dg-options "-O2" } */
-+/* { dg-options "-O2 -mno-unaligned-access" } */
- void foo(int a, int b, int* p)
- {
- p[2] = a;
- p[3] = b;
- }
--/* { dg-final { scan-assembler "strd" } } */
-+/* { dg-final { scan-assembler-not "strd\\t" } } */
---
-2.15.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-enable-FL_LPAE-flag-for-armv7ve-cores.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-enable-FL_LPAE-flag-for-armv7ve-cores.patch
deleted file mode 100644
index 3f664c5..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-enable-FL_LPAE-flag-for-armv7ve-cores.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 22fcc126fad61a8e9ddaaabbc8036644273642dc Mon Sep 17 00:00:00 2001
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 9 Nov 2017 14:34:28 +0000
-Subject: [PATCH] enable FL_LPAE flag for armv7ve cores
-
-The following commit added the FL_LPAE flag to FL_FOR_ARCH7VE, but
-neglected to also add it to the armv7ve compatible cores defined in
-arm-cores.def.
-
- https://github.com/gcc-mirror/gcc/commit/af2d9b9e58e8be576c53d94f30c48c68146b0c98
-
-The result is that gcc 6.4 now refuses to allow -march=armv7ve and
--mcpu=XXX to be used together, even when -mcpu is set to an armv7ve
-compatible core:
-
- arm-linux-gnueabi-gcc -march=armv7ve -mcpu=cortex-a7 -Werror ...
- error: switch -mcpu=cortex-a7 conflicts with -march=armv7ve switch [-Werror]
-
-Fix by defining flags for armv7ve compatible cores directly from
-FL_FOR_ARCH7VE, rather than re-creating the armv7ve flags
-independently by combining FL_FOR_ARCH7A with the armv7ve specific
-FL_THUMB_DIV and FL_ARM_DIV flags.
-
-Upstream-Status: Backport
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@254584 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- gcc/config/arm/arm-cores.def | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/gcc/config/arm/arm-cores.def b/gcc/config/arm/arm-cores.def
-index 829b839..ca37e6f 100644
---- a/gcc/config/arm/arm-cores.def
-+++ b/gcc/config/arm/arm-cores.def
-@@ -145,12 +145,12 @@ ARM_CORE("cortex-m0plus.small-multiply",cortexm0plussmallmultiply, cortexm0plus,
- /* V7 Architecture Processors */
- ARM_CORE("generic-armv7-a", genericv7a, genericv7a, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7A), cortex)
- ARM_CORE("cortex-a5", cortexa5, cortexa5, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7A), cortex_a5)
--ARM_CORE("cortex-a7", cortexa7, cortexa7, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a7)
-+ARM_CORE("cortex-a7", cortexa7, cortexa7, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a7)
- ARM_CORE("cortex-a8", cortexa8, cortexa8, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7A), cortex_a8)
- ARM_CORE("cortex-a9", cortexa9, cortexa9, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7A), cortex_a9)
--ARM_CORE("cortex-a12", cortexa12, cortexa17, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a12)
--ARM_CORE("cortex-a15", cortexa15, cortexa15, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a15)
--ARM_CORE("cortex-a17", cortexa17, cortexa17, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a12)
-+ARM_CORE("cortex-a12", cortexa12, cortexa17, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a12)
-+ARM_CORE("cortex-a15", cortexa15, cortexa15, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a15)
-+ARM_CORE("cortex-a17", cortexa17, cortexa17, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a12)
- ARM_CORE("cortex-r4", cortexr4, cortexr4, 7R, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7R), cortex)
- ARM_CORE("cortex-r4f", cortexr4f, cortexr4f, 7R, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7R), cortex)
- ARM_CORE("cortex-r5", cortexr5, cortexr5, 7R, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_ARM_DIV | FL_FOR_ARCH7R), cortex)
-@@ -162,8 +162,8 @@ ARM_CORE("cortex-m3", cortexm3, cortexm3, 7M, ARM_FSET_MAKE_CPU1 (FL_LDSCHED |
- ARM_CORE("marvell-pj4", marvell_pj4, marvell_pj4, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7A), marvell_pj4)
-
- /* V7 big.LITTLE implementations */
--ARM_CORE("cortex-a15.cortex-a7", cortexa15cortexa7, cortexa7, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a15)
--ARM_CORE("cortex-a17.cortex-a7", cortexa17cortexa7, cortexa7, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a12)
-+ARM_CORE("cortex-a15.cortex-a7", cortexa15cortexa7, cortexa7, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a15)
-+ARM_CORE("cortex-a17.cortex-a7", cortexa17cortexa7, cortexa7, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a12)
-
- /* V8 Architecture Processors */
- ARM_CORE("cortex-a32", cortexa32, cortexa53, 8A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_CRC32 | FL_FOR_ARCH8A), cortex_a35)
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-i386-Move-struct-ix86_frame-to-machine_function.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-i386-Move-struct-ix86_frame-to-machine_function.patch
deleted file mode 100644
index 00b0ffd..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-i386-Move-struct-ix86_frame-to-machine_function.patch
+++ /dev/null
@@ -1,247 +0,0 @@
-From c2c7775c5587dc59b6756162d390d89d60971a16 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 15 Jan 2018 11:27:24 +0000
-Subject: [PATCH 01/12] i386: Move struct ix86_frame to machine_function
-
-Make ix86_frame available to i386 code generation. This is needed to
-backport the patch set of -mindirect-branch= to mitigate variant #2 of
-the speculative execution vulnerabilities on x86 processors identified
-by CVE-2017-5715, aka Spectre.
-
- Backport from mainline
- 2017-06-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
-
- * config/i386/i386.c (ix86_frame): Moved to ...
- * config/i386/i386.h (ix86_frame): Here.
- (machine_function): Add frame.
- * config/i386/i386.c (ix86_compute_frame_layout): Repace the
- frame argument with &cfun->machine->frame.
- (ix86_can_use_return_insn_p): Don't pass &frame to
- ix86_compute_frame_layout. Copy frame from cfun->machine->frame.
- (ix86_can_eliminate): Likewise.
- (ix86_expand_prologue): Likewise.
- (ix86_expand_epilogue): Likewise.
- (ix86_expand_split_stack_prologue): Likewise.
-
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 68 ++++++++++----------------------------------------
- gcc/config/i386/i386.h | 53 ++++++++++++++++++++++++++++++++++++++-
- 2 files changed, 65 insertions(+), 56 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 8b5faac..a1ff32b 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -2434,53 +2434,6 @@ struct GTY(()) stack_local_entry {
- struct stack_local_entry *next;
- };
-
--/* Structure describing stack frame layout.
-- Stack grows downward:
--
-- [arguments]
-- <- ARG_POINTER
-- saved pc
--
-- saved static chain if ix86_static_chain_on_stack
--
-- saved frame pointer if frame_pointer_needed
-- <- HARD_FRAME_POINTER
-- [saved regs]
-- <- regs_save_offset
-- [padding0]
--
-- [saved SSE regs]
-- <- sse_regs_save_offset
-- [padding1] |
-- | <- FRAME_POINTER
-- [va_arg registers] |
-- |
-- [frame] |
-- |
-- [padding2] | = to_allocate
-- <- STACK_POINTER
-- */
--struct ix86_frame
--{
-- int nsseregs;
-- int nregs;
-- int va_arg_size;
-- int red_zone_size;
-- int outgoing_arguments_size;
--
-- /* The offsets relative to ARG_POINTER. */
-- HOST_WIDE_INT frame_pointer_offset;
-- HOST_WIDE_INT hard_frame_pointer_offset;
-- HOST_WIDE_INT stack_pointer_offset;
-- HOST_WIDE_INT hfp_save_offset;
-- HOST_WIDE_INT reg_save_offset;
-- HOST_WIDE_INT sse_reg_save_offset;
--
-- /* When save_regs_using_mov is set, emit prologue using
-- move instead of push instructions. */
-- bool save_regs_using_mov;
--};
--
- /* Which cpu are we scheduling for. */
- enum attr_cpu ix86_schedule;
-
-@@ -2572,7 +2525,7 @@ static unsigned int ix86_function_arg_boundary (machine_mode,
- const_tree);
- static rtx ix86_static_chain (const_tree, bool);
- static int ix86_function_regparm (const_tree, const_tree);
--static void ix86_compute_frame_layout (struct ix86_frame *);
-+static void ix86_compute_frame_layout (void);
- static bool ix86_expand_vector_init_one_nonzero (bool, machine_mode,
- rtx, rtx, int);
- static void ix86_add_new_builtins (HOST_WIDE_INT);
-@@ -10944,7 +10897,8 @@ ix86_can_use_return_insn_p (void)
- if (crtl->args.pops_args && crtl->args.size >= 32768)
- return 0;
-
-- ix86_compute_frame_layout (&frame);
-+ ix86_compute_frame_layout ();
-+ frame = cfun->machine->frame;
- return (frame.stack_pointer_offset == UNITS_PER_WORD
- && (frame.nregs + frame.nsseregs) == 0);
- }
-@@ -11355,8 +11309,8 @@ ix86_can_eliminate (const int from, const int to)
- HOST_WIDE_INT
- ix86_initial_elimination_offset (int from, int to)
- {
-- struct ix86_frame frame;
-- ix86_compute_frame_layout (&frame);
-+ ix86_compute_frame_layout ();
-+ struct ix86_frame frame = cfun->machine->frame;
-
- if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
- return frame.hard_frame_pointer_offset;
-@@ -11395,8 +11349,9 @@ ix86_builtin_setjmp_frame_value (void)
- /* Fill structure ix86_frame about frame of currently computed function. */
-
- static void
--ix86_compute_frame_layout (struct ix86_frame *frame)
-+ix86_compute_frame_layout (void)
- {
-+ struct ix86_frame *frame = &cfun->machine->frame;
- unsigned HOST_WIDE_INT stack_alignment_needed;
- HOST_WIDE_INT offset;
- unsigned HOST_WIDE_INT preferred_alignment;
-@@ -12702,7 +12657,8 @@ ix86_expand_prologue (void)
- m->fs.sp_offset = INCOMING_FRAME_SP_OFFSET;
- m->fs.sp_valid = true;
-
-- ix86_compute_frame_layout (&frame);
-+ ix86_compute_frame_layout ();
-+ frame = m->frame;
-
- if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl))
- {
-@@ -13379,7 +13335,8 @@ ix86_expand_epilogue (int style)
- bool using_drap;
-
- ix86_finalize_stack_realign_flags ();
-- ix86_compute_frame_layout (&frame);
-+ ix86_compute_frame_layout ();
-+ frame = m->frame;
-
- m->fs.sp_valid = (!frame_pointer_needed
- || (crtl->sp_is_unchanging
-@@ -13876,7 +13833,8 @@ ix86_expand_split_stack_prologue (void)
- gcc_assert (flag_split_stack && reload_completed);
-
- ix86_finalize_stack_realign_flags ();
-- ix86_compute_frame_layout (&frame);
-+ ix86_compute_frame_layout ();
-+ frame = cfun->machine->frame;
- allocate = frame.stack_pointer_offset - INCOMING_FRAME_SP_OFFSET;
-
- /* This is the label we will branch to if we have enough stack
-diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
-index 8113f83..5414416 100644
---- a/gcc/config/i386/i386.h
-+++ b/gcc/config/i386/i386.h
-@@ -2427,9 +2427,56 @@ enum avx_u128_state
-
- #define FASTCALL_PREFIX '@'
-
-+#ifndef USED_FOR_TARGET
-+/* Structure describing stack frame layout.
-+ Stack grows downward:
-+
-+ [arguments]
-+ <- ARG_POINTER
-+ saved pc
-+
-+ saved static chain if ix86_static_chain_on_stack
-+
-+ saved frame pointer if frame_pointer_needed
-+ <- HARD_FRAME_POINTER
-+ [saved regs]
-+ <- regs_save_offset
-+ [padding0]
-+
-+ [saved SSE regs]
-+ <- sse_regs_save_offset
-+ [padding1] |
-+ | <- FRAME_POINTER
-+ [va_arg registers] |
-+ |
-+ [frame] |
-+ |
-+ [padding2] | = to_allocate
-+ <- STACK_POINTER
-+ */
-+struct GTY(()) ix86_frame
-+{
-+ int nsseregs;
-+ int nregs;
-+ int va_arg_size;
-+ int red_zone_size;
-+ int outgoing_arguments_size;
-+
-+ /* The offsets relative to ARG_POINTER. */
-+ HOST_WIDE_INT frame_pointer_offset;
-+ HOST_WIDE_INT hard_frame_pointer_offset;
-+ HOST_WIDE_INT stack_pointer_offset;
-+ HOST_WIDE_INT hfp_save_offset;
-+ HOST_WIDE_INT reg_save_offset;
-+ HOST_WIDE_INT sse_reg_save_offset;
-+
-+ /* When save_regs_using_mov is set, emit prologue using
-+ move instead of push instructions. */
-+ bool save_regs_using_mov;
-+};
-+
- /* Machine specific frame tracking during prologue/epilogue generation. */
-
--#ifndef USED_FOR_TARGET
- struct GTY(()) machine_frame_state
- {
- /* This pair tracks the currently active CFA as reg+offset. When reg
-@@ -2475,6 +2522,9 @@ struct GTY(()) machine_function {
- int varargs_fpr_size;
- int optimize_mode_switching[MAX_386_ENTITIES];
-
-+ /* Cached initial frame layout for the current function. */
-+ struct ix86_frame frame;
-+
- /* Number of saved registers USE_FAST_PROLOGUE_EPILOGUE
- has been computed for. */
- int use_fast_prologue_epilogue_nregs;
-@@ -2554,6 +2604,7 @@ struct GTY(()) machine_function {
- #define ix86_current_function_calls_tls_descriptor \
- (ix86_tls_descriptor_calls_expanded_in_cfun && df_regs_ever_live_p (SP_REG))
- #define ix86_static_chain_on_stack (cfun->machine->static_chain_on_stack)
-+#define ix86_red_zone_size (cfun->machine->frame.red_zone_size)
-
- /* Control behavior of x86_file_start. */
- #define X86_FILE_START_VERSION_DIRECTIVE false
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
deleted file mode 100644
index df65b08..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From fe2b3be3f4b6ec6b3a6f89c26016a3983b7cb351 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 15 Jan 2018 11:28:44 +0000
-Subject: [PATCH 02/12] i386: Use reference of struct ix86_frame to avoid copy
-
-When there is no need to make a copy of ix86_frame, we can use reference
-of struct ix86_frame to avoid copy.
-
- Backport from mainline
- 2017-11-06 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
- of struct ix86_frame.
- (ix86_initial_elimination_offset): Likewise.
- (ix86_expand_split_stack_prologue): Likewise.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 8 +++-----
- 1 file changed, 3 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index a1ff32b..13ebf10 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -10887,7 +10887,6 @@ symbolic_reference_mentioned_p (rtx op)
- bool
- ix86_can_use_return_insn_p (void)
- {
-- struct ix86_frame frame;
-
- if (! reload_completed || frame_pointer_needed)
- return 0;
-@@ -10898,7 +10897,7 @@ ix86_can_use_return_insn_p (void)
- return 0;
-
- ix86_compute_frame_layout ();
-- frame = cfun->machine->frame;
-+ struct ix86_frame &frame = cfun->machine->frame;
- return (frame.stack_pointer_offset == UNITS_PER_WORD
- && (frame.nregs + frame.nsseregs) == 0);
- }
-@@ -11310,7 +11309,7 @@ HOST_WIDE_INT
- ix86_initial_elimination_offset (int from, int to)
- {
- ix86_compute_frame_layout ();
-- struct ix86_frame frame = cfun->machine->frame;
-+ struct ix86_frame &frame = cfun->machine->frame;
-
- if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
- return frame.hard_frame_pointer_offset;
-@@ -13821,7 +13820,6 @@ static GTY(()) rtx split_stack_fn_large;
- void
- ix86_expand_split_stack_prologue (void)
- {
-- struct ix86_frame frame;
- HOST_WIDE_INT allocate;
- unsigned HOST_WIDE_INT args_size;
- rtx_code_label *label;
-@@ -13834,7 +13832,7 @@ ix86_expand_split_stack_prologue (void)
-
- ix86_finalize_stack_realign_flags ();
- ix86_compute_frame_layout ();
-- frame = cfun->machine->frame;
-+ struct ix86_frame &frame = cfun->machine->frame;
- allocate = frame.stack_pointer_offset - INCOMING_FRAME_SP_OFFSET;
-
- /* This is the label we will branch to if we have enough stack
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
deleted file mode 100644
index a5ffd85..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From 82243732dc63e9b90396a5ae4ad99ca36af81355 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Sat, 27 Jan 2018 13:10:24 +0000
-Subject: [PATCH 03/12] i386: Use const reference of struct ix86_frame to avoid
- copy
-
-We can use const reference of struct ix86_frame to avoid making a local
-copy of ix86_frame. ix86_expand_epilogue makes a local copy of struct
-ix86_frame and uses the reg_save_offset field as a local variable. This
-patch uses a separate local variable for reg_save_offset.
-
-Tested on x86-64 with ada.
-
- Backport from mainline
- PR target/83905
- * config/i386/i386.c (ix86_expand_prologue): Use cost reference
- of struct ix86_frame.
- (ix86_expand_epilogue): Likewise. Add a local variable for
- the reg_save_offset field in struct ix86_frame.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@257123 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 24 ++++++++++++------------
- 1 file changed, 12 insertions(+), 12 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 13ebf10..6c98f75 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -12633,7 +12633,6 @@ ix86_expand_prologue (void)
- {
- struct machine_function *m = cfun->machine;
- rtx insn, t;
-- struct ix86_frame frame;
- HOST_WIDE_INT allocate;
- bool int_registers_saved;
- bool sse_registers_saved;
-@@ -12657,7 +12656,7 @@ ix86_expand_prologue (void)
- m->fs.sp_valid = true;
-
- ix86_compute_frame_layout ();
-- frame = m->frame;
-+ const struct ix86_frame &frame = cfun->machine->frame;
-
- if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl))
- {
-@@ -13329,13 +13328,12 @@ ix86_expand_epilogue (int style)
- {
- struct machine_function *m = cfun->machine;
- struct machine_frame_state frame_state_save = m->fs;
-- struct ix86_frame frame;
- bool restore_regs_via_mov;
- bool using_drap;
-
- ix86_finalize_stack_realign_flags ();
- ix86_compute_frame_layout ();
-- frame = m->frame;
-+ const struct ix86_frame &frame = cfun->machine->frame;
-
- m->fs.sp_valid = (!frame_pointer_needed
- || (crtl->sp_is_unchanging
-@@ -13377,11 +13375,13 @@ ix86_expand_epilogue (int style)
- + UNITS_PER_WORD);
- }
-
-+ HOST_WIDE_INT reg_save_offset = frame.reg_save_offset;
-+
- /* Special care must be taken for the normal return case of a function
- using eh_return: the eax and edx registers are marked as saved, but
- not restored along this path. Adjust the save location to match. */
- if (crtl->calls_eh_return && style != 2)
-- frame.reg_save_offset -= 2 * UNITS_PER_WORD;
-+ reg_save_offset -= 2 * UNITS_PER_WORD;
-
- /* EH_RETURN requires the use of moves to function properly. */
- if (crtl->calls_eh_return)
-@@ -13397,11 +13397,11 @@ ix86_expand_epilogue (int style)
- else if (TARGET_EPILOGUE_USING_MOVE
- && cfun->machine->use_fast_prologue_epilogue
- && (frame.nregs > 1
-- || m->fs.sp_offset != frame.reg_save_offset))
-+ || m->fs.sp_offset != reg_save_offset))
- restore_regs_via_mov = true;
- else if (frame_pointer_needed
- && !frame.nregs
-- && m->fs.sp_offset != frame.reg_save_offset)
-+ && m->fs.sp_offset != reg_save_offset)
- restore_regs_via_mov = true;
- else if (frame_pointer_needed
- && TARGET_USE_LEAVE
-@@ -13439,7 +13439,7 @@ ix86_expand_epilogue (int style)
- rtx t;
-
- if (frame.nregs)
-- ix86_emit_restore_regs_using_mov (frame.reg_save_offset, style == 2);
-+ ix86_emit_restore_regs_using_mov (reg_save_offset, style == 2);
-
- /* eh_return epilogues need %ecx added to the stack pointer. */
- if (style == 2)
-@@ -13529,19 +13529,19 @@ ix86_expand_epilogue (int style)
- epilogues. */
- if (!m->fs.sp_valid
- || (TARGET_SEH
-- && (m->fs.sp_offset - frame.reg_save_offset
-+ && (m->fs.sp_offset - reg_save_offset
- >= SEH_MAX_FRAME_SIZE)))
- {
- pro_epilogue_adjust_stack (stack_pointer_rtx, hard_frame_pointer_rtx,
- GEN_INT (m->fs.fp_offset
-- - frame.reg_save_offset),
-+ - reg_save_offset),
- style, false);
- }
-- else if (m->fs.sp_offset != frame.reg_save_offset)
-+ else if (m->fs.sp_offset != reg_save_offset)
- {
- pro_epilogue_adjust_stack (stack_pointer_rtx, stack_pointer_rtx,
- GEN_INT (m->fs.sp_offset
-- - frame.reg_save_offset),
-+ - reg_save_offset),
- style,
- m->fs.cfa_reg == stack_pointer_rtx);
- }
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0004-x86-Add-mindirect-branch.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0004-x86-Add-mindirect-branch.patch
deleted file mode 100644
index a9d6e5f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0004-x86-Add-mindirect-branch.patch
+++ /dev/null
@@ -1,2154 +0,0 @@
-From 6140c2c0bb2b61e69d0da84315e0433ff3520aaa Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 6 Jan 2018 22:29:55 -0800
-Subject: [PATCH 04/12] x86: Add -mindirect-branch=
-
-Add -mindirect-branch= option to convert indirect call and jump to call
-and return thunks. The default is 'keep', which keeps indirect call and
-jump unmodified. 'thunk' converts indirect call and jump to call and
-return thunk. 'thunk-inline' converts indirect call and jump to inlined
-call and return thunk. 'thunk-extern' converts indirect call and jump to
-external call and return thunk provided in a separate object file. You
-can control this behavior for a specific function by using the function
-attribute indirect_branch.
-
-2 kinds of thunks are geneated. Memory thunk where the function address
-is at the top of the stack:
-
-__x86_indirect_thunk:
- call L2
-L1:
- pause
- lfence
- jmp L1
-L2:
- lea 8(%rsp), %rsp|lea 4(%esp), %esp
- ret
-
-Indirect jmp via memory, "jmp mem", is converted to
-
- push memory
- jmp __x86_indirect_thunk
-
-Indirect call via memory, "call mem", is converted to
-
- jmp L2
-L1:
- push [mem]
- jmp __x86_indirect_thunk
-L2:
- call L1
-
-Register thunk where the function address is in a register, reg:
-
-__x86_indirect_thunk_reg:
- call L2
-L1:
- pause
- lfence
- jmp L1
-L2:
- movq %reg, (%rsp)|movl %reg, (%esp)
- ret
-
-where reg is one of (r|e)ax, (r|e)dx, (r|e)cx, (r|e)bx, (r|e)si, (r|e)di,
-(r|e)bp, r8, r9, r10, r11, r12, r13, r14 and r15.
-
-Indirect jmp via register, "jmp reg", is converted to
-
- jmp __x86_indirect_thunk_reg
-
-Indirect call via register, "call reg", is converted to
-
- call __x86_indirect_thunk_reg
-
-gcc/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/i386-opts.h (indirect_branch): New.
- * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
- * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
- with local indirect jump when converting indirect call and jump.
- (ix86_set_indirect_branch_type): New.
- (ix86_set_current_function): Call ix86_set_indirect_branch_type.
- (indirectlabelno): New.
- (indirect_thunk_needed): Likewise.
- (indirect_thunk_bnd_needed): Likewise.
- (indirect_thunks_used): Likewise.
- (indirect_thunks_bnd_used): Likewise.
- (INDIRECT_LABEL): Likewise.
- (indirect_thunk_name): Likewise.
- (output_indirect_thunk): Likewise.
- (output_indirect_thunk_function): Likewise.
- (ix86_output_indirect_branch_via_reg): Likewise.
- (ix86_output_indirect_branch_via_push): Likewise.
- (ix86_output_indirect_branch): Likewise.
- (ix86_output_indirect_jmp): Likewise.
- (ix86_code_end): Call output_indirect_thunk_function if needed.
- (ix86_output_call_insn): Call ix86_output_indirect_branch if
- needed.
- (ix86_handle_fndecl_attribute): Handle indirect_branch.
- (ix86_attribute_table): Add indirect_branch.
- * config/i386/i386.h (machine_function): Add indirect_branch_type
- and has_local_indirect_jump.
- * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
- to true.
- (tablejump): Likewise.
- (*indirect_jump): Use ix86_output_indirect_jmp.
- (*tablejump_1): Likewise.
- (simple_return_indirect_internal): Likewise.
- * config/i386/i386.opt (mindirect-branch=): New option.
- (indirect_branch): New.
- (keep): Likewise.
- (thunk): Likewise.
- (thunk-inline): Likewise.
- (thunk-extern): Likewise.
- * doc/extend.texi: Document indirect_branch function attribute.
- * doc/invoke.texi: Document -mindirect-branch= option.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * gcc.target/i386/indirect-thunk-1.c: New test.
- * gcc.target/i386/indirect-thunk-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386-opts.h | 13 +
- gcc/config/i386/i386-protos.h | 1 +
- gcc/config/i386/i386.c | 639 ++++++++++++++++++++-
- gcc/config/i386/i386.h | 7 +
- gcc/config/i386/i386.md | 26 +-
- gcc/config/i386/i386.opt | 20 +
- gcc/doc/extend.texi | 10 +
- gcc/doc/invoke.texi | 13 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 20 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 20 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 21 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 21 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-5.c | 17 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-6.c | 18 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 44 ++
- .../gcc.target/i386/indirect-thunk-attr-1.c | 23 +
- .../gcc.target/i386/indirect-thunk-attr-2.c | 21 +
- .../gcc.target/i386/indirect-thunk-attr-3.c | 23 +
- .../gcc.target/i386/indirect-thunk-attr-4.c | 22 +
- .../gcc.target/i386/indirect-thunk-attr-5.c | 22 +
- .../gcc.target/i386/indirect-thunk-attr-6.c | 21 +
- .../gcc.target/i386/indirect-thunk-attr-7.c | 44 ++
- .../gcc.target/i386/indirect-thunk-attr-8.c | 42 ++
- .../gcc.target/i386/indirect-thunk-bnd-1.c | 20 +
- .../gcc.target/i386/indirect-thunk-bnd-2.c | 21 +
- .../gcc.target/i386/indirect-thunk-bnd-3.c | 19 +
- .../gcc.target/i386/indirect-thunk-bnd-4.c | 20 +
- .../gcc.target/i386/indirect-thunk-extern-1.c | 19 +
- .../gcc.target/i386/indirect-thunk-extern-2.c | 19 +
- .../gcc.target/i386/indirect-thunk-extern-3.c | 20 +
- .../gcc.target/i386/indirect-thunk-extern-4.c | 20 +
- .../gcc.target/i386/indirect-thunk-extern-5.c | 16 +
- .../gcc.target/i386/indirect-thunk-extern-6.c | 17 +
- .../gcc.target/i386/indirect-thunk-extern-7.c | 43 ++
- .../gcc.target/i386/indirect-thunk-inline-1.c | 20 +
- .../gcc.target/i386/indirect-thunk-inline-2.c | 20 +
- .../gcc.target/i386/indirect-thunk-inline-3.c | 21 +
- .../gcc.target/i386/indirect-thunk-inline-4.c | 21 +
- .../gcc.target/i386/indirect-thunk-inline-5.c | 17 +
- .../gcc.target/i386/indirect-thunk-inline-6.c | 18 +
- .../gcc.target/i386/indirect-thunk-inline-7.c | 44 ++
- 41 files changed, 1486 insertions(+), 17 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-
-diff --git a/gcc/config/i386/i386-opts.h b/gcc/config/i386/i386-opts.h
-index b7f92e3..cc21152 100644
---- a/gcc/config/i386/i386-opts.h
-+++ b/gcc/config/i386/i386-opts.h
-@@ -99,4 +99,17 @@ enum stack_protector_guard {
- SSP_GLOBAL /* global canary */
- };
-
-+/* This is used to mitigate variant #2 of the speculative execution
-+ vulnerabilities on x86 processors identified by CVE-2017-5715, aka
-+ Spectre. They convert indirect branches and function returns to
-+ call and return thunks to avoid speculative execution via indirect
-+ call, jmp and ret. */
-+enum indirect_branch {
-+ indirect_branch_unset = 0,
-+ indirect_branch_keep,
-+ indirect_branch_thunk,
-+ indirect_branch_thunk_inline,
-+ indirect_branch_thunk_extern
-+};
-+
- #endif
-diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
-index ff47bc1..eca4cbf 100644
---- a/gcc/config/i386/i386-protos.h
-+++ b/gcc/config/i386/i386-protos.h
-@@ -311,6 +311,7 @@ extern enum attr_cpu ix86_schedule;
- #endif
-
- extern const char * ix86_output_call_insn (rtx_insn *insn, rtx call_op);
-+extern const char * ix86_output_indirect_jmp (rtx call_op, bool ret_p);
- extern bool ix86_operands_ok_for_move_multiple (rtx *operands, bool load,
- enum machine_mode mode);
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 6c98f75..0b9fc4d 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -3662,12 +3662,23 @@ make_pass_stv (gcc::context *ctxt)
- return new pass_stv (ctxt);
- }
-
--/* Return true if a red-zone is in use. */
-+/* Return true if a red-zone is in use. We can't use red-zone when
-+ there are local indirect jumps, like "indirect_jump" or "tablejump",
-+ which jumps to another place in the function, since "call" in the
-+ indirect thunk pushes the return address onto stack, destroying
-+ red-zone.
-+
-+ TODO: If we can reserve the first 2 WORDs, for PUSH and, another
-+ for CALL, in red-zone, we can allow local indirect jumps with
-+ indirect thunk. */
-
- bool
- ix86_using_red_zone (void)
- {
-- return TARGET_RED_ZONE && !TARGET_64BIT_MS_ABI;
-+ return (TARGET_RED_ZONE
-+ && !TARGET_64BIT_MS_ABI
-+ && (!cfun->machine->has_local_indirect_jump
-+ || cfun->machine->indirect_branch_type == indirect_branch_keep));
- }
-
- /* Return a string that documents the current -m options. The caller is
-@@ -6350,6 +6361,37 @@ ix86_reset_previous_fndecl (void)
- ix86_previous_fndecl = NULL_TREE;
- }
-
-+/* Set the indirect_branch_type field from the function FNDECL. */
-+
-+static void
-+ix86_set_indirect_branch_type (tree fndecl)
-+{
-+ if (cfun->machine->indirect_branch_type == indirect_branch_unset)
-+ {
-+ tree attr = lookup_attribute ("indirect_branch",
-+ DECL_ATTRIBUTES (fndecl));
-+ if (attr != NULL)
-+ {
-+ tree args = TREE_VALUE (attr);
-+ if (args == NULL)
-+ gcc_unreachable ();
-+ tree cst = TREE_VALUE (args);
-+ if (strcmp (TREE_STRING_POINTER (cst), "keep") == 0)
-+ cfun->machine->indirect_branch_type = indirect_branch_keep;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk") == 0)
-+ cfun->machine->indirect_branch_type = indirect_branch_thunk;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-inline") == 0)
-+ cfun->machine->indirect_branch_type = indirect_branch_thunk_inline;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-extern") == 0)
-+ cfun->machine->indirect_branch_type = indirect_branch_thunk_extern;
-+ else
-+ gcc_unreachable ();
-+ }
-+ else
-+ cfun->machine->indirect_branch_type = ix86_indirect_branch;
-+ }
-+}
-+
- /* Establish appropriate back-end context for processing the function
- FNDECL. The argument might be NULL to indicate processing at top
- level, outside of any function scope. */
-@@ -6360,7 +6402,13 @@ ix86_set_current_function (tree fndecl)
- several times in the course of compiling a function, and we don't want to
- slow things down too much or call target_reinit when it isn't safe. */
- if (fndecl == ix86_previous_fndecl)
-- return;
-+ {
-+ /* There may be 2 function bodies for the same function FNDECL,
-+ one is extern inline and one isn't. */
-+ if (fndecl != NULL_TREE)
-+ ix86_set_indirect_branch_type (fndecl);
-+ return;
-+ }
-
- tree old_tree;
- if (ix86_previous_fndecl == NULL_TREE)
-@@ -6377,6 +6425,8 @@ ix86_set_current_function (tree fndecl)
- return;
- }
-
-+ ix86_set_indirect_branch_type (fndecl);
-+
- tree new_tree = DECL_FUNCTION_SPECIFIC_TARGET (fndecl);
- if (new_tree == NULL_TREE)
- new_tree = target_option_default_node;
-@@ -10962,6 +11012,220 @@ ix86_setup_frame_addresses (void)
- # endif
- #endif
-
-+/* Label count for call and return thunks. It is used to make unique
-+ labels in call and return thunks. */
-+static int indirectlabelno;
-+
-+/* True if call and return thunk functions are needed. */
-+static bool indirect_thunk_needed = false;
-+/* True if call and return thunk functions with the BND prefix are
-+ needed. */
-+static bool indirect_thunk_bnd_needed = false;
-+
-+/* Bit masks of integer registers, which contain branch target, used
-+ by call and return thunks functions. */
-+static int indirect_thunks_used;
-+/* Bit masks of integer registers, which contain branch target, used
-+ by call and return thunks functions with the BND prefix. */
-+static int indirect_thunks_bnd_used;
-+
-+#ifndef INDIRECT_LABEL
-+# define INDIRECT_LABEL "LIND"
-+#endif
-+
-+/* Fills in the label name that should be used for the indirect thunk. */
-+
-+static void
-+indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
-+{
-+ if (USE_HIDDEN_LINKONCE)
-+ {
-+ const char *bnd = need_bnd_p ? "_bnd" : "";
-+ if (regno >= 0)
-+ {
-+ const char *reg_prefix;
-+ if (LEGACY_INT_REGNO_P (regno))
-+ reg_prefix = TARGET_64BIT ? "r" : "e";
-+ else
-+ reg_prefix = "";
-+ sprintf (name, "__x86_indirect_thunk%s_%s%s",
-+ bnd, reg_prefix, reg_names[regno]);
-+ }
-+ else
-+ sprintf (name, "__x86_indirect_thunk%s", bnd);
-+ }
-+ else
-+ {
-+ if (regno >= 0)
-+ {
-+ if (need_bnd_p)
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LITBR", regno);
-+ else
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LITR", regno);
-+ }
-+ else
-+ {
-+ if (need_bnd_p)
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
-+ else
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
-+ }
-+ }
-+}
-+
-+/* Output a call and return thunk for indirect branch. If BND_P is
-+ true, the BND prefix is needed. If REGNO != -1, the function
-+ address is in REGNO and the call and return thunk looks like:
-+
-+ call L2
-+ L1:
-+ pause
-+ jmp L1
-+ L2:
-+ mov %REG, (%sp)
-+ ret
-+
-+ Otherwise, the function address is on the top of stack and the
-+ call and return thunk looks like:
-+
-+ call L2
-+ L1:
-+ pause
-+ jmp L1
-+ L2:
-+ lea WORD_SIZE(%sp), %sp
-+ ret
-+ */
-+
-+static void
-+output_indirect_thunk (bool need_bnd_p, int regno)
-+{
-+ char indirectlabel1[32];
-+ char indirectlabel2[32];
-+
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1, INDIRECT_LABEL,
-+ indirectlabelno++);
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2, INDIRECT_LABEL,
-+ indirectlabelno++);
-+
-+ /* Call */
-+ if (need_bnd_p)
-+ fputs ("\tbnd call\t", asm_out_file);
-+ else
-+ fputs ("\tcall\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel2);
-+ fputc ('\n', asm_out_file);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
-+
-+ /* Pause + lfence. */
-+ fprintf (asm_out_file, "\tpause\n\tlfence\n");
-+
-+ /* Jump. */
-+ fputs ("\tjmp\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel1);
-+ fputc ('\n', asm_out_file);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
-+
-+ if (regno >= 0)
-+ {
-+ /* MOV. */
-+ rtx xops[2];
-+ xops[0] = gen_rtx_MEM (word_mode, stack_pointer_rtx);
-+ xops[1] = gen_rtx_REG (word_mode, regno);
-+ output_asm_insn ("mov\t{%1, %0|%0, %1}", xops);
-+ }
-+ else
-+ {
-+ /* LEA. */
-+ rtx xops[2];
-+ xops[0] = stack_pointer_rtx;
-+ xops[1] = plus_constant (Pmode, stack_pointer_rtx, UNITS_PER_WORD);
-+ output_asm_insn ("lea\t{%E1, %0|%0, %E1}", xops);
-+ }
-+
-+ if (need_bnd_p)
-+ fputs ("\tbnd ret\n", asm_out_file);
-+ else
-+ fputs ("\tret\n", asm_out_file);
-+}
-+
-+/* Output a funtion with a call and return thunk for indirect branch.
-+ If BND_P is true, the BND prefix is needed. If REGNO != -1, the
-+ function address is in REGNO. Otherwise, the function address is
-+ on the top of stack. */
-+
-+static void
-+output_indirect_thunk_function (bool need_bnd_p, int regno)
-+{
-+ char name[32];
-+ tree decl;
-+
-+ /* Create __x86_indirect_thunk/__x86_indirect_thunk_bnd. */
-+ indirect_thunk_name (name, regno, need_bnd_p);
-+ decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL,
-+ get_identifier (name),
-+ build_function_type_list (void_type_node, NULL_TREE));
-+ DECL_RESULT (decl) = build_decl (BUILTINS_LOCATION, RESULT_DECL,
-+ NULL_TREE, void_type_node);
-+ TREE_PUBLIC (decl) = 1;
-+ TREE_STATIC (decl) = 1;
-+ DECL_IGNORED_P (decl) = 1;
-+
-+#if TARGET_MACHO
-+ if (TARGET_MACHO)
-+ {
-+ switch_to_section (darwin_sections[picbase_thunk_section]);
-+ fputs ("\t.weak_definition\t", asm_out_file);
-+ assemble_name (asm_out_file, name);
-+ fputs ("\n\t.private_extern\t", asm_out_file);
-+ assemble_name (asm_out_file, name);
-+ putc ('\n', asm_out_file);
-+ ASM_OUTPUT_LABEL (asm_out_file, name);
-+ DECL_WEAK (decl) = 1;
-+ }
-+ else
-+#endif
-+ if (USE_HIDDEN_LINKONCE)
-+ {
-+ cgraph_node::create (decl)->set_comdat_group (DECL_ASSEMBLER_NAME (decl));
-+
-+ targetm.asm_out.unique_section (decl, 0);
-+ switch_to_section (get_named_section (decl, NULL, 0));
-+
-+ targetm.asm_out.globalize_label (asm_out_file, name);
-+ fputs ("\t.hidden\t", asm_out_file);
-+ assemble_name (asm_out_file, name);
-+ putc ('\n', asm_out_file);
-+ ASM_DECLARE_FUNCTION_NAME (asm_out_file, name, decl);
-+ }
-+ else
-+ {
-+ switch_to_section (text_section);
-+ ASM_OUTPUT_LABEL (asm_out_file, name);
-+ }
-+
-+ DECL_INITIAL (decl) = make_node (BLOCK);
-+ current_function_decl = decl;
-+ allocate_struct_function (decl, false);
-+ init_function_start (decl);
-+ /* We're about to hide the function body from callees of final_* by
-+ emitting it directly; tell them we're a thunk, if they care. */
-+ cfun->is_thunk = true;
-+ first_function_block_is_cold = false;
-+ /* Make sure unwind info is emitted for the thunk if needed. */
-+ final_start_function (emit_barrier (), asm_out_file, 1);
-+
-+ output_indirect_thunk (need_bnd_p, regno);
-+
-+ final_end_function ();
-+ init_insn_lengths ();
-+ free_after_compilation (cfun);
-+ set_cfun (NULL);
-+ current_function_decl = NULL;
-+}
-+
- static int pic_labels_used;
-
- /* Fills in the label name that should be used for a pc thunk for
-@@ -10988,11 +11252,32 @@ ix86_code_end (void)
- rtx xops[2];
- int regno;
-
-+ if (indirect_thunk_needed)
-+ output_indirect_thunk_function (false, -1);
-+ if (indirect_thunk_bnd_needed)
-+ output_indirect_thunk_function (true, -1);
-+
-+ for (regno = FIRST_REX_INT_REG; regno <= LAST_REX_INT_REG; regno++)
-+ {
-+ int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1;
-+ if ((indirect_thunks_used & (1 << i)))
-+ output_indirect_thunk_function (false, regno);
-+
-+ if ((indirect_thunks_bnd_used & (1 << i)))
-+ output_indirect_thunk_function (true, regno);
-+ }
-+
- for (regno = AX_REG; regno <= SP_REG; regno++)
- {
- char name[32];
- tree decl;
-
-+ if ((indirect_thunks_used & (1 << regno)))
-+ output_indirect_thunk_function (false, regno);
-+
-+ if ((indirect_thunks_bnd_used & (1 << regno)))
-+ output_indirect_thunk_function (true, regno);
-+
- if (!(pic_labels_used & (1 << regno)))
- continue;
-
-@@ -27369,12 +27654,292 @@ ix86_nopic_noplt_attribute_p (rtx call_op)
- return false;
- }
-
-+/* Output indirect branch via a call and return thunk. CALL_OP is a
-+ register which contains the branch target. XASM is the assembly
-+ template for CALL_OP. Branch is a tail call if SIBCALL_P is true.
-+ A normal call is converted to:
-+
-+ call __x86_indirect_thunk_reg
-+
-+ and a tail call is converted to:
-+
-+ jmp __x86_indirect_thunk_reg
-+ */
-+
-+static void
-+ix86_output_indirect_branch_via_reg (rtx call_op, bool sibcall_p)
-+{
-+ char thunk_name_buf[32];
-+ char *thunk_name;
-+ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
-+ int regno = REGNO (call_op);
-+
-+ if (cfun->machine->indirect_branch_type
-+ != indirect_branch_thunk_inline)
-+ {
-+ if (cfun->machine->indirect_branch_type == indirect_branch_thunk)
-+ {
-+ int i = regno;
-+ if (i >= FIRST_REX_INT_REG)
-+ i -= (FIRST_REX_INT_REG - LAST_INT_REG - 1);
-+ if (need_bnd_p)
-+ indirect_thunks_bnd_used |= 1 << i;
-+ else
-+ indirect_thunks_used |= 1 << i;
-+ }
-+ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
-+ thunk_name = thunk_name_buf;
-+ }
-+ else
-+ thunk_name = NULL;
-+
-+ if (sibcall_p)
-+ {
-+ if (thunk_name != NULL)
-+ {
-+ if (need_bnd_p)
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ else
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, regno);
-+ }
-+ else
-+ {
-+ if (thunk_name != NULL)
-+ {
-+ if (need_bnd_p)
-+ fprintf (asm_out_file, "\tbnd call\t%s\n", thunk_name);
-+ else
-+ fprintf (asm_out_file, "\tcall\t%s\n", thunk_name);
-+ return;
-+ }
-+
-+ char indirectlabel1[32];
-+ char indirectlabel2[32];
-+
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1,
-+ INDIRECT_LABEL,
-+ indirectlabelno++);
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2,
-+ INDIRECT_LABEL,
-+ indirectlabelno++);
-+
-+ /* Jump. */
-+ if (need_bnd_p)
-+ fputs ("\tbnd jmp\t", asm_out_file);
-+ else
-+ fputs ("\tjmp\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel2);
-+ fputc ('\n', asm_out_file);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
-+
-+ if (thunk_name != NULL)
-+ {
-+ if (need_bnd_p)
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ else
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, regno);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
-+
-+ /* Call. */
-+ if (need_bnd_p)
-+ fputs ("\tbnd call\t", asm_out_file);
-+ else
-+ fputs ("\tcall\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel1);
-+ fputc ('\n', asm_out_file);
-+ }
-+}
-+
-+/* Output indirect branch via a call and return thunk. CALL_OP is
-+ the branch target. XASM is the assembly template for CALL_OP.
-+ Branch is a tail call if SIBCALL_P is true. A normal call is
-+ converted to:
-+
-+ jmp L2
-+ L1:
-+ push CALL_OP
-+ jmp __x86_indirect_thunk
-+ L2:
-+ call L1
-+
-+ and a tail call is converted to:
-+
-+ push CALL_OP
-+ jmp __x86_indirect_thunk
-+ */
-+
-+static void
-+ix86_output_indirect_branch_via_push (rtx call_op, const char *xasm,
-+ bool sibcall_p)
-+{
-+ char thunk_name_buf[32];
-+ char *thunk_name;
-+ char push_buf[64];
-+ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
-+ int regno = -1;
-+
-+ if (cfun->machine->indirect_branch_type
-+ != indirect_branch_thunk_inline)
-+ {
-+ if (cfun->machine->indirect_branch_type == indirect_branch_thunk)
-+ {
-+ if (need_bnd_p)
-+ indirect_thunk_bnd_needed = true;
-+ else
-+ indirect_thunk_needed = true;
-+ }
-+ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
-+ thunk_name = thunk_name_buf;
-+ }
-+ else
-+ thunk_name = NULL;
-+
-+ snprintf (push_buf, sizeof (push_buf), "push{%c}\t%s",
-+ TARGET_64BIT ? 'q' : 'l', xasm);
-+
-+ if (sibcall_p)
-+ {
-+ output_asm_insn (push_buf, &call_op);
-+ if (thunk_name != NULL)
-+ {
-+ if (need_bnd_p)
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ else
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, regno);
-+ }
-+ else
-+ {
-+ char indirectlabel1[32];
-+ char indirectlabel2[32];
-+
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1,
-+ INDIRECT_LABEL,
-+ indirectlabelno++);
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2,
-+ INDIRECT_LABEL,
-+ indirectlabelno++);
-+
-+ /* Jump. */
-+ if (need_bnd_p)
-+ fputs ("\tbnd jmp\t", asm_out_file);
-+ else
-+ fputs ("\tjmp\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel2);
-+ fputc ('\n', asm_out_file);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
-+
-+ /* An external function may be called via GOT, instead of PLT. */
-+ if (MEM_P (call_op))
-+ {
-+ struct ix86_address parts;
-+ rtx addr = XEXP (call_op, 0);
-+ if (ix86_decompose_address (addr, &parts)
-+ && parts.base == stack_pointer_rtx)
-+ {
-+ /* Since call will adjust stack by -UNITS_PER_WORD,
-+ we must convert "disp(stack, index, scale)" to
-+ "disp+UNITS_PER_WORD(stack, index, scale)". */
-+ if (parts.index)
-+ {
-+ addr = gen_rtx_MULT (Pmode, parts.index,
-+ GEN_INT (parts.scale));
-+ addr = gen_rtx_PLUS (Pmode, stack_pointer_rtx,
-+ addr);
-+ }
-+ else
-+ addr = stack_pointer_rtx;
-+
-+ rtx disp;
-+ if (parts.disp != NULL_RTX)
-+ disp = plus_constant (Pmode, parts.disp,
-+ UNITS_PER_WORD);
-+ else
-+ disp = GEN_INT (UNITS_PER_WORD);
-+
-+ addr = gen_rtx_PLUS (Pmode, addr, disp);
-+ call_op = gen_rtx_MEM (GET_MODE (call_op), addr);
-+ }
-+ }
-+
-+ output_asm_insn (push_buf, &call_op);
-+
-+ if (thunk_name != NULL)
-+ {
-+ if (need_bnd_p)
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ else
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, regno);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
-+
-+ /* Call. */
-+ if (need_bnd_p)
-+ fputs ("\tbnd call\t", asm_out_file);
-+ else
-+ fputs ("\tcall\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel1);
-+ fputc ('\n', asm_out_file);
-+ }
-+}
-+
-+/* Output indirect branch via a call and return thunk. CALL_OP is
-+ the branch target. XASM is the assembly template for CALL_OP.
-+ Branch is a tail call if SIBCALL_P is true. */
-+
-+static void
-+ix86_output_indirect_branch (rtx call_op, const char *xasm,
-+ bool sibcall_p)
-+{
-+ if (REG_P (call_op))
-+ ix86_output_indirect_branch_via_reg (call_op, sibcall_p);
-+ else
-+ ix86_output_indirect_branch_via_push (call_op, xasm, sibcall_p);
-+}
-+/* Output indirect jump. CALL_OP is the jump target. Jump is a
-+ function return if RET_P is true. */
-+
-+const char *
-+ix86_output_indirect_jmp (rtx call_op, bool ret_p)
-+{
-+ if (cfun->machine->indirect_branch_type != indirect_branch_keep)
-+ {
-+ /* We can't have red-zone if this isn't a function return since
-+ "call" in the indirect thunk pushes the return address onto
-+ stack, destroying red-zone. */
-+ if (!ret_p && ix86_red_zone_size != 0)
-+ gcc_unreachable ();
-+
-+ ix86_output_indirect_branch (call_op, "%0", true);
-+ return "";
-+ }
-+ else
-+ return "%!jmp\t%A0";
-+}
-+
- /* Output the assembly for a call instruction. */
-
- const char *
- ix86_output_call_insn (rtx_insn *insn, rtx call_op)
- {
- bool direct_p = constant_call_address_operand (call_op, VOIDmode);
-+ bool output_indirect_p
-+ = (!TARGET_SEH
-+ && cfun->machine->indirect_branch_type != indirect_branch_keep);
- bool seh_nop_p = false;
- const char *xasm;
-
-@@ -27383,7 +27948,13 @@ ix86_output_call_insn (rtx_insn *insn, rtx call_op)
- if (direct_p)
- {
- if (ix86_nopic_noplt_attribute_p (call_op))
-- xasm = "%!jmp\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ {
-+ direct_p = false;
-+ if (output_indirect_p)
-+ xasm = "{%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ else
-+ xasm = "%!jmp\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ }
- else
- xasm = "%!jmp\t%P0";
- }
-@@ -27392,9 +27963,17 @@ ix86_output_call_insn (rtx_insn *insn, rtx call_op)
- else if (TARGET_SEH)
- xasm = "%!rex.W jmp\t%A0";
- else
-- xasm = "%!jmp\t%A0";
-+ {
-+ if (output_indirect_p)
-+ xasm = "%0";
-+ else
-+ xasm = "%!jmp\t%A0";
-+ }
-
-- output_asm_insn (xasm, &call_op);
-+ if (output_indirect_p && !direct_p)
-+ ix86_output_indirect_branch (call_op, xasm, true);
-+ else
-+ output_asm_insn (xasm, &call_op);
- return "";
- }
-
-@@ -27431,14 +28010,28 @@ ix86_output_call_insn (rtx_insn *insn, rtx call_op)
- if (direct_p)
- {
- if (ix86_nopic_noplt_attribute_p (call_op))
-- xasm = "%!call\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ {
-+ direct_p = false;
-+ if (output_indirect_p)
-+ xasm = "{%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ else
-+ xasm = "%!call\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ }
- else
- xasm = "%!call\t%P0";
- }
- else
-- xasm = "%!call\t%A0";
-+ {
-+ if (output_indirect_p)
-+ xasm = "%0";
-+ else
-+ xasm = "%!call\t%A0";
-+ }
-
-- output_asm_insn (xasm, &call_op);
-+ if (output_indirect_p && !direct_p)
-+ ix86_output_indirect_branch (call_op, xasm, false);
-+ else
-+ output_asm_insn (xasm, &call_op);
-
- if (seh_nop_p)
- return "nop";
-@@ -44836,7 +45429,7 @@ ix86_handle_struct_attribute (tree *node, tree name, tree, int,
- }
-
- static tree
--ix86_handle_fndecl_attribute (tree *node, tree name, tree, int,
-+ix86_handle_fndecl_attribute (tree *node, tree name, tree args, int,
- bool *no_add_attrs)
- {
- if (TREE_CODE (*node) != FUNCTION_DECL)
-@@ -44845,6 +45438,29 @@ ix86_handle_fndecl_attribute (tree *node, tree name, tree, int,
- name);
- *no_add_attrs = true;
- }
-+
-+ if (is_attribute_p ("indirect_branch", name))
-+ {
-+ tree cst = TREE_VALUE (args);
-+ if (TREE_CODE (cst) != STRING_CST)
-+ {
-+ warning (OPT_Wattributes,
-+ "%qE attribute requires a string constant argument",
-+ name);
-+ *no_add_attrs = true;
-+ }
-+ else if (strcmp (TREE_STRING_POINTER (cst), "keep") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk-inline") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk-extern") != 0)
-+ {
-+ warning (OPT_Wattributes,
-+ "argument to %qE attribute is not "
-+ "(keep|thunk|thunk-inline|thunk-extern)", name);
-+ *no_add_attrs = true;
-+ }
-+ }
-+
- return NULL_TREE;
- }
-
-@@ -49072,6 +49688,9 @@ static const struct attribute_spec ix86_attribute_table[] =
- false },
- { "callee_pop_aggregate_return", 1, 1, false, true, true,
- ix86_handle_callee_pop_aggregate_return, true },
-+ { "indirect_branch", 1, 1, true, false, false,
-+ ix86_handle_fndecl_attribute, false },
-+
- /* End element. */
- { NULL, 0, 0, false, false, false, NULL, false }
- };
-diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
-index 5414416..9dccdb0 100644
---- a/gcc/config/i386/i386.h
-+++ b/gcc/config/i386/i386.h
-@@ -2572,6 +2572,13 @@ struct GTY(()) machine_function {
- /* If true, it is safe to not save/restore DRAP register. */
- BOOL_BITFIELD no_drap_save_restore : 1;
-
-+ /* How to generate indirec branch. */
-+ ENUM_BITFIELD(indirect_branch) indirect_branch_type : 3;
-+
-+ /* If true, the current function has local indirect jumps, like
-+ "indirect_jump" or "tablejump". */
-+ BOOL_BITFIELD has_local_indirect_jump : 1;
-+
- /* If true, there is register available for argument passing. This
- is used only in ix86_function_ok_for_sibcall by 32-bit to determine
- if there is scratch register available for indirect sibcall. In
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index d2bfe31..153e162 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -11807,13 +11807,18 @@
- {
- if (TARGET_X32)
- operands[0] = convert_memory_address (word_mode, operands[0]);
-+ cfun->machine->has_local_indirect_jump = true;
- })
-
- (define_insn "*indirect_jump"
- [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))]
- ""
-- "%!jmp\t%A0"
-- [(set_attr "type" "ibr")
-+ "* return ix86_output_indirect_jmp (operands[0], false);"
-+ [(set (attr "type")
-+ (if_then_else (match_test "(cfun->machine->indirect_branch_type
-+ != indirect_branch_keep)")
-+ (const_string "multi")
-+ (const_string "ibr")))
- (set_attr "length_immediate" "0")
- (set_attr "maybe_prefix_bnd" "1")])
-
-@@ -11856,14 +11861,19 @@
-
- if (TARGET_X32)
- operands[0] = convert_memory_address (word_mode, operands[0]);
-+ cfun->machine->has_local_indirect_jump = true;
- })
-
- (define_insn "*tablejump_1"
- [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))
- (use (label_ref (match_operand 1)))]
- ""
-- "%!jmp\t%A0"
-- [(set_attr "type" "ibr")
-+ "* return ix86_output_indirect_jmp (operands[0], false);"
-+ [(set (attr "type")
-+ (if_then_else (match_test "(cfun->machine->indirect_branch_type
-+ != indirect_branch_keep)")
-+ (const_string "multi")
-+ (const_string "ibr")))
- (set_attr "length_immediate" "0")
- (set_attr "maybe_prefix_bnd" "1")])
-
-@@ -12520,8 +12530,12 @@
- [(simple_return)
- (use (match_operand:SI 0 "register_operand" "r"))]
- "reload_completed"
-- "%!jmp\t%A0"
-- [(set_attr "type" "ibr")
-+ "* return ix86_output_indirect_jmp (operands[0], true);"
-+ [(set (attr "type")
-+ (if_then_else (match_test "(cfun->machine->indirect_branch_type
-+ != indirect_branch_keep)")
-+ (const_string "multi")
-+ (const_string "ibr")))
- (set_attr "length_immediate" "0")
- (set_attr "maybe_prefix_bnd" "1")])
-
-diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
-index f304b62..5ffa334 100644
---- a/gcc/config/i386/i386.opt
-+++ b/gcc/config/i386/i386.opt
-@@ -897,3 +897,23 @@ Enum(stack_protector_guard) String(global) Value(SSP_GLOBAL)
- mmitigate-rop
- Target Var(flag_mitigate_rop) Init(0)
- Attempt to avoid generating instruction sequences containing ret bytes.
-+
-+mindirect-branch=
-+Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_indirect_branch) Init(indirect_branch_keep)
-+Convert indirect call and jump to call and return thunks.
-+
-+Enum
-+Name(indirect_branch) Type(enum indirect_branch)
-+Known indirect branch choices (for use with the -mindirect-branch= option):
-+
-+EnumValue
-+Enum(indirect_branch) String(keep) Value(indirect_branch_keep)
-+
-+EnumValue
-+Enum(indirect_branch) String(thunk) Value(indirect_branch_thunk)
-+
-+EnumValue
-+Enum(indirect_branch) String(thunk-inline) Value(indirect_branch_thunk_inline)
-+
-+EnumValue
-+Enum(indirect_branch) String(thunk-extern) Value(indirect_branch_thunk_extern)
-diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
-index 8cc4f7e..8668dae 100644
---- a/gcc/doc/extend.texi
-+++ b/gcc/doc/extend.texi
-@@ -5419,6 +5419,16 @@ Specify which floating-point unit to use. You must specify the
- @code{target("fpmath=sse,387")} option as
- @code{target("fpmath=sse+387")} because the comma would separate
- different options.
-+
-+@item indirect_branch("@var{choice}")
-+@cindex @code{indirect_branch} function attribute, x86
-+On x86 targets, the @code{indirect_branch} attribute causes the compiler
-+to convert indirect call and jump with @var{choice}. @samp{keep}
-+keeps indirect call and jump unmodified. @samp{thunk} converts indirect
-+call and jump to call and return thunk. @samp{thunk-inline} converts
-+indirect call and jump to inlined call and return thunk.
-+@samp{thunk-extern} converts indirect call and jump to external call
-+and return thunk provided in a separate object file.
- @end table
-
- On the x86, the inliner does not inline a
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index b066f7b..ff9a194 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -1169,7 +1169,7 @@ See RS/6000 and PowerPC Options.
- -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol
- -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
- -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
---mmitigate-rop}
-+-mmitigate-rop -mindirect-branch=@var{choice}}
-
- @emph{x86 Windows Options}
- @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
-@@ -24218,6 +24218,17 @@ opcodes, to mitigate against certain forms of attack. At the moment,
- this option is limited in what it can do and should not be relied
- on to provide serious protection.
-
-+@item -mindirect-branch=@var{choice}
-+@opindex -mindirect-branch
-+Convert indirect call and jump with @var{choice}. The default is
-+@samp{keep}, which keeps indirect call and jump unmodified.
-+@samp{thunk} converts indirect call and jump to call and return thunk.
-+@samp{thunk-inline} converts indirect call and jump to inlined call
-+and return thunk. @samp{thunk-extern} converts indirect call and jump
-+to external call and return thunk provided in a separate object file.
-+You can control this behavior for a specific function by using the
-+function attribute @code{indirect_branch}. @xref{Function Attributes}.
-+
- @end table
-
- These @samp{-m} switches are supported in addition to the above
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-new file mode 100644
-index 0000000..d983e1c
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-new file mode 100644
-index 0000000..58f09b4
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-new file mode 100644
-index 0000000..f20d35c
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-new file mode 100644
-index 0000000..0eff8fb
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-new file mode 100644
-index 0000000..a25b20d
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-@@ -0,0 +1,17 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk" } */
-+
-+extern void bar (void);
-+
-+void
-+foo (void)
-+{
-+ bar ();
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-new file mode 100644
-index 0000000..cff114a
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-@@ -0,0 +1,18 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk" } */
-+
-+extern void bar (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-new file mode 100644
-index 0000000..afdb600
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-@@ -0,0 +1,44 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+void
-+bar (int i)
-+{
-+ switch (i)
-+ {
-+ default:
-+ func0 ();
-+ break;
-+ case 1:
-+ func1 ();
-+ break;
-+ case 2:
-+ func2 ();
-+ break;
-+ case 3:
-+ func3 ();
-+ break;
-+ case 4:
-+ func4 ();
-+ break;
-+ case 5:
-+ func5 ();
-+ break;
-+ }
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-new file mode 100644
-index 0000000..d64d978
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-@@ -0,0 +1,23 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+extern void male_indirect_jump (long)
-+ __attribute__ ((indirect_branch("thunk")));
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-new file mode 100644
-index 0000000..9306745
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+__attribute__ ((indirect_branch("thunk")))
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-new file mode 100644
-index 0000000..97744d6
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-@@ -0,0 +1,23 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+extern int male_indirect_jump (long)
-+ __attribute__ ((indirect_branch("thunk-inline")));
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-new file mode 100644
-index 0000000..bfce3ea
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+__attribute__ ((indirect_branch("thunk-inline")))
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-new file mode 100644
-index 0000000..0833606
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+extern int male_indirect_jump (long)
-+ __attribute__ ((indirect_branch("thunk-extern")));
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-new file mode 100644
-index 0000000..2eba0fb
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+__attribute__ ((indirect_branch("thunk-extern")))
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-new file mode 100644
-index 0000000..f58427e
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-@@ -0,0 +1,44 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+__attribute__ ((indirect_branch("thunk-extern")))
-+void
-+bar (int i)
-+{
-+ switch (i)
-+ {
-+ default:
-+ func0 ();
-+ break;
-+ case 1:
-+ func1 ();
-+ break;
-+ case 2:
-+ func2 ();
-+ break;
-+ case 3:
-+ func3 ();
-+ break;
-+ case 4:
-+ func4 ();
-+ break;
-+ case 5:
-+ func5 ();
-+ break;
-+ }
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-new file mode 100644
-index 0000000..564ed39
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-@@ -0,0 +1,42 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+__attribute__ ((indirect_branch("keep")))
-+void
-+bar (int i)
-+{
-+ switch (i)
-+ {
-+ default:
-+ func0 ();
-+ break;
-+ case 1:
-+ func1 ();
-+ break;
-+ case 2:
-+ func2 ();
-+ break;
-+ case 3:
-+ func3 ();
-+ break;
-+ case 4:
-+ func4 ();
-+ break;
-+ case 5:
-+ func5 ();
-+ break;
-+ }
-+}
-+
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-new file mode 100644
-index 0000000..50fbee2
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile { target { ! x32 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+
-+void (*dispatch) (char *);
-+char buf[10];
-+
-+void
-+foo (void)
-+{
-+ dispatch (buf);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd ret" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-new file mode 100644
-index 0000000..2976e67
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile { target { ! x32 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+
-+void (*dispatch) (char *);
-+char buf[10];
-+
-+int
-+foo (void)
-+{
-+ dispatch (buf);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd ret" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-new file mode 100644
-index 0000000..da4bc98
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-@@ -0,0 +1,19 @@
-+/* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+
-+void bar (char *);
-+char buf[10];
-+
-+void
-+foo (void)
-+{
-+ bar (buf);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd ret" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-new file mode 100644
-index 0000000..c64d12e
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+
-+void bar (char *);
-+char buf[10];
-+
-+int
-+foo (void)
-+{
-+ bar (buf);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-times "bnd call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler "bnd ret" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-new file mode 100644
-index 0000000..49f27b4
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-@@ -0,0 +1,19 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-new file mode 100644
-index 0000000..a1e3eb6
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-@@ -0,0 +1,19 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-new file mode 100644
-index 0000000..395634e
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-new file mode 100644
-index 0000000..fd3f633
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-new file mode 100644
-index 0000000..ba2f92b
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-@@ -0,0 +1,16 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+
-+extern void bar (void);
-+
-+void
-+foo (void)
-+{
-+ bar ();
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-new file mode 100644
-index 0000000..0c5a2d4
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-@@ -0,0 +1,17 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+
-+extern void bar (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-new file mode 100644
-index 0000000..6652523
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-@@ -0,0 +1,43 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+void
-+bar (int i)
-+{
-+ switch (i)
-+ {
-+ default:
-+ func0 ();
-+ break;
-+ case 1:
-+ func1 ();
-+ break;
-+ case 2:
-+ func2 ();
-+ break;
-+ case 3:
-+ func3 ();
-+ break;
-+ case 4:
-+ func4 ();
-+ break;
-+ case 5:
-+ func5 ();
-+ break;
-+ }
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-new file mode 100644
-index 0000000..68c0ff7
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-new file mode 100644
-index 0000000..e2da1fc
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-new file mode 100644
-index 0000000..244fec7
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-new file mode 100644
-index 0000000..107ebe3
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-new file mode 100644
-index 0000000..17b04ef
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-@@ -0,0 +1,17 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+
-+extern void bar (void);
-+
-+void
-+foo (void)
-+{
-+ bar ();
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-new file mode 100644
-index 0000000..d9eb112
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-@@ -0,0 +1,18 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+
-+extern void bar (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-new file mode 100644
-index 0000000..d02b1dc
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-@@ -0,0 +1,44 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+void
-+bar (int i)
-+{
-+ switch (i)
-+ {
-+ default:
-+ func0 ();
-+ break;
-+ case 1:
-+ func1 ();
-+ break;
-+ case 2:
-+ func2 ();
-+ break;
-+ case 3:
-+ func3 ();
-+ break;
-+ case 4:
-+ func4 ();
-+ break;
-+ case 5:
-+ func5 ();
-+ break;
-+ }
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0005-x86-Add-mfunction-return.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0005-x86-Add-mfunction-return.patch
deleted file mode 100644
index 5354c77..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0005-x86-Add-mfunction-return.patch
+++ /dev/null
@@ -1,1570 +0,0 @@
-From e3270814b9e0caad63fbcdfd7ae9da2d52c97497 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 6 Jan 2018 22:29:56 -0800
-Subject: [PATCH 05/12] x86: Add -mfunction-return=
-
-Add -mfunction-return= option to convert function return to call and
-return thunks. The default is 'keep', which keeps function return
-unmodified. 'thunk' converts function return to call and return thunk.
-'thunk-inline' converts function return to inlined call and return thunk.
-'thunk-extern' converts function return to external call and return
-thunk provided in a separate object file. You can control this behavior
-for a specific function by using the function attribute function_return.
-
-Function return thunk is the same as memory thunk for -mindirect-branch=
-where the return address is at the top of the stack:
-
-__x86_return_thunk:
- call L2
-L1:
- pause
- lfence
- jmp L1
-L2:
- lea 8(%rsp), %rsp|lea 4(%esp), %esp
- ret
-
-and function return becomes
-
- jmp __x86_return_thunk
-
--mindirect-branch= tests are updated with -mfunction-return=keep to
-avoid false test failures when -mfunction-return=thunk is added to
-RUNTESTFLAGS for "make check".
-
-gcc/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/i386-protos.h (ix86_output_function_return): New.
- * config/i386/i386.c (ix86_set_indirect_branch_type): Also
- set function_return_type.
- (indirect_thunk_name): Add ret_p to indicate thunk for function
- return.
- (output_indirect_thunk_function): Pass false to
- indirect_thunk_name.
- (ix86_output_indirect_branch_via_reg): Likewise.
- (ix86_output_indirect_branch_via_push): Likewise.
- (output_indirect_thunk_function): Create alias for function
- return thunk if regno < 0.
- (ix86_output_function_return): New function.
- (ix86_handle_fndecl_attribute): Handle function_return.
- (ix86_attribute_table): Add function_return.
- * config/i386/i386.h (machine_function): Add
- function_return_type.
- * config/i386/i386.md (simple_return_internal): Use
- ix86_output_function_return.
- (simple_return_internal_long): Likewise.
- * config/i386/i386.opt (mfunction-return=): New option.
- (indirect_branch): Mention -mfunction-return=.
- * doc/extend.texi: Document function_return function attribute.
- * doc/invoke.texi: Document -mfunction-return= option.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * gcc.target/i386/indirect-thunk-1.c (dg-options): Add
- -mfunction-return=keep.
- * gcc.target/i386/indirect-thunk-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
- * gcc.target/i386/ret-thunk-1.c: New test.
- * gcc.target/i386/ret-thunk-10.c: Likewise.
- * gcc.target/i386/ret-thunk-11.c: Likewise.
- * gcc.target/i386/ret-thunk-12.c: Likewise.
- * gcc.target/i386/ret-thunk-13.c: Likewise.
- * gcc.target/i386/ret-thunk-14.c: Likewise.
- * gcc.target/i386/ret-thunk-15.c: Likewise.
- * gcc.target/i386/ret-thunk-16.c: Likewise.
- * gcc.target/i386/ret-thunk-2.c: Likewise.
- * gcc.target/i386/ret-thunk-3.c: Likewise.
- * gcc.target/i386/ret-thunk-4.c: Likewise.
- * gcc.target/i386/ret-thunk-5.c: Likewise.
- * gcc.target/i386/ret-thunk-6.c: Likewise.
- * gcc.target/i386/ret-thunk-7.c: Likewise.
- * gcc.target/i386/ret-thunk-8.c: Likewise.
- * gcc.target/i386/ret-thunk-9.c: Likewise.
-
-i386: Don't use ASM_OUTPUT_DEF for TARGET_MACHO
-
-ASM_OUTPUT_DEF isn't defined for TARGET_MACHO. Use ASM_OUTPUT_LABEL to
-generate the __x86_return_thunk label, instead of the set directive.
-Update testcase to remove the __x86_return_thunk label check. Since
--fno-pic is ignored on Darwin, update testcases to sscan or "push"
-only on Linux.
-
-gcc/
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- PR target/83839
- * config/i386/i386.c (output_indirect_thunk_function): Use
- ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
- for __x86.return_thunk.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- PR target/83839
- * gcc.target/i386/indirect-thunk-1.c: Scan for "push" only on
- Linux.
- * gcc.target/i386/indirect-thunk-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-register-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-register-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-register-4.c: Likewise.
- * gcc.target/i386/ret-thunk-10.c: Likewise.
- * gcc.target/i386/ret-thunk-11.c: Likewise.
- * gcc.target/i386/ret-thunk-12.c: Likewise.
- * gcc.target/i386/ret-thunk-13.c: Likewise.
- * gcc.target/i386/ret-thunk-14.c: Likewise.
- * gcc.target/i386/ret-thunk-15.c: Likewise.
- * gcc.target/i386/ret-thunk-9.c: Don't check the
- __x86_return_thunk label.
- Scan for "push" only for Linux.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386-protos.h | 1 +
- gcc/config/i386/i386.c | 152 +++++++++++++++++++--
- gcc/config/i386/i386.h | 3 +
- gcc/config/i386/i386.md | 9 +-
- gcc/config/i386/i386.opt | 6 +-
- gcc/doc/extend.texi | 9 ++
- gcc/doc/invoke.texi | 14 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 4 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 4 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 4 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 4 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-5.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-6.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-1.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-2.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-3.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-4.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-5.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-6.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-7.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-8.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-1.c | 4 +-
- .../gcc.target/i386/indirect-thunk-bnd-2.c | 4 +-
- .../gcc.target/i386/indirect-thunk-bnd-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-1.c | 4 +-
- .../gcc.target/i386/indirect-thunk-extern-2.c | 4 +-
- .../gcc.target/i386/indirect-thunk-extern-3.c | 4 +-
- .../gcc.target/i386/indirect-thunk-extern-4.c | 4 +-
- .../gcc.target/i386/indirect-thunk-extern-5.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-6.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-7.c | 4 +-
- .../gcc.target/i386/indirect-thunk-inline-1.c | 4 +-
- .../gcc.target/i386/indirect-thunk-inline-2.c | 4 +-
- .../gcc.target/i386/indirect-thunk-inline-3.c | 4 +-
- .../gcc.target/i386/indirect-thunk-inline-4.c | 4 +-
- .../gcc.target/i386/indirect-thunk-inline-5.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-6.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-7.c | 4 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-1.c | 13 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-10.c | 23 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-11.c | 23 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-12.c | 22 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-13.c | 22 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-14.c | 22 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-15.c | 22 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-16.c | 18 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-2.c | 13 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-3.c | 12 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-4.c | 12 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-5.c | 15 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-6.c | 14 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-7.c | 13 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-8.c | 14 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 24 ++++
- 56 files changed, 516 insertions(+), 74 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-10.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-11.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-12.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-13.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-14.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-15.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-16.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-7.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-8.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-
-diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
-index eca4cbf..620d70e 100644
---- a/gcc/config/i386/i386-protos.h
-+++ b/gcc/config/i386/i386-protos.h
-@@ -312,6 +312,7 @@ extern enum attr_cpu ix86_schedule;
-
- extern const char * ix86_output_call_insn (rtx_insn *insn, rtx call_op);
- extern const char * ix86_output_indirect_jmp (rtx call_op, bool ret_p);
-+extern const char * ix86_output_function_return (bool long_p);
- extern bool ix86_operands_ok_for_move_multiple (rtx *operands, bool load,
- enum machine_mode mode);
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 0b9fc4d..34e26a3 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -6390,6 +6390,31 @@ ix86_set_indirect_branch_type (tree fndecl)
- else
- cfun->machine->indirect_branch_type = ix86_indirect_branch;
- }
-+
-+ if (cfun->machine->function_return_type == indirect_branch_unset)
-+ {
-+ tree attr = lookup_attribute ("function_return",
-+ DECL_ATTRIBUTES (fndecl));
-+ if (attr != NULL)
-+ {
-+ tree args = TREE_VALUE (attr);
-+ if (args == NULL)
-+ gcc_unreachable ();
-+ tree cst = TREE_VALUE (args);
-+ if (strcmp (TREE_STRING_POINTER (cst), "keep") == 0)
-+ cfun->machine->function_return_type = indirect_branch_keep;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk") == 0)
-+ cfun->machine->function_return_type = indirect_branch_thunk;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-inline") == 0)
-+ cfun->machine->function_return_type = indirect_branch_thunk_inline;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-extern") == 0)
-+ cfun->machine->function_return_type = indirect_branch_thunk_extern;
-+ else
-+ gcc_unreachable ();
-+ }
-+ else
-+ cfun->machine->function_return_type = ix86_function_return;
-+ }
- }
-
- /* Establish appropriate back-end context for processing the function
-@@ -11036,8 +11061,12 @@ static int indirect_thunks_bnd_used;
- /* Fills in the label name that should be used for the indirect thunk. */
-
- static void
--indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
-+indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
-+ bool ret_p)
- {
-+ if (regno >= 0 && ret_p)
-+ gcc_unreachable ();
-+
- if (USE_HIDDEN_LINKONCE)
- {
- const char *bnd = need_bnd_p ? "_bnd" : "";
-@@ -11052,7 +11081,10 @@ indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
- bnd, reg_prefix, reg_names[regno]);
- }
- else
-- sprintf (name, "__x86_indirect_thunk%s", bnd);
-+ {
-+ const char *ret = ret_p ? "return" : "indirect";
-+ sprintf (name, "__x86_%s_thunk%s", ret, bnd);
-+ }
- }
- else
- {
-@@ -11065,10 +11097,20 @@ indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
- }
- else
- {
-- if (need_bnd_p)
-- ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
-+ if (ret_p)
-+ {
-+ if (need_bnd_p)
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LRTB", 0);
-+ else
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LRT", 0);
-+ }
- else
-- ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
-+ {
-+ if (need_bnd_p)
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
-+ else
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
-+ }
- }
- }
- }
-@@ -11163,7 +11205,7 @@ output_indirect_thunk_function (bool need_bnd_p, int regno)
- tree decl;
-
- /* Create __x86_indirect_thunk/__x86_indirect_thunk_bnd. */
-- indirect_thunk_name (name, regno, need_bnd_p);
-+ indirect_thunk_name (name, regno, need_bnd_p, false);
- decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL,
- get_identifier (name),
- build_function_type_list (void_type_node, NULL_TREE));
-@@ -11206,6 +11248,36 @@ output_indirect_thunk_function (bool need_bnd_p, int regno)
- ASM_OUTPUT_LABEL (asm_out_file, name);
- }
-
-+ if (regno < 0)
-+ {
-+ /* Create alias for __x86.return_thunk/__x86.return_thunk_bnd. */
-+ char alias[32];
-+
-+ indirect_thunk_name (alias, regno, need_bnd_p, true);
-+#if TARGET_MACHO
-+ if (TARGET_MACHO)
-+ {
-+ fputs ("\t.weak_definition\t", asm_out_file);
-+ assemble_name (asm_out_file, alias);
-+ fputs ("\n\t.private_extern\t", asm_out_file);
-+ assemble_name (asm_out_file, alias);
-+ putc ('\n', asm_out_file);
-+ ASM_OUTPUT_LABEL (asm_out_file, alias);
-+ }
-+#else
-+ ASM_OUTPUT_DEF (asm_out_file, alias, name);
-+ if (USE_HIDDEN_LINKONCE)
-+ {
-+ fputs ("\t.globl\t", asm_out_file);
-+ assemble_name (asm_out_file, alias);
-+ putc ('\n', asm_out_file);
-+ fputs ("\t.hidden\t", asm_out_file);
-+ assemble_name (asm_out_file, alias);
-+ putc ('\n', asm_out_file);
-+ }
-+#endif
-+ }
-+
- DECL_INITIAL (decl) = make_node (BLOCK);
- current_function_decl = decl;
- allocate_struct_function (decl, false);
-@@ -27687,7 +27759,7 @@ ix86_output_indirect_branch_via_reg (rtx call_op, bool sibcall_p)
- else
- indirect_thunks_used |= 1 << i;
- }
-- indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
-+ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p, false);
- thunk_name = thunk_name_buf;
- }
- else
-@@ -27796,7 +27868,7 @@ ix86_output_indirect_branch_via_push (rtx call_op, const char *xasm,
- else
- indirect_thunk_needed = true;
- }
-- indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
-+ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p, false);
- thunk_name = thunk_name_buf;
- }
- else
-@@ -27931,6 +28003,46 @@ ix86_output_indirect_jmp (rtx call_op, bool ret_p)
- return "%!jmp\t%A0";
- }
-
-+/* Output function return. CALL_OP is the jump target. Add a REP
-+ prefix to RET if LONG_P is true and function return is kept. */
-+
-+const char *
-+ix86_output_function_return (bool long_p)
-+{
-+ if (cfun->machine->function_return_type != indirect_branch_keep)
-+ {
-+ char thunk_name[32];
-+ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
-+
-+ if (cfun->machine->function_return_type
-+ != indirect_branch_thunk_inline)
-+ {
-+ bool need_thunk = (cfun->machine->function_return_type
-+ == indirect_branch_thunk);
-+ indirect_thunk_name (thunk_name, -1, need_bnd_p, true);
-+ if (need_bnd_p)
-+ {
-+ indirect_thunk_bnd_needed |= need_thunk;
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ }
-+ else
-+ {
-+ indirect_thunk_needed |= need_thunk;
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, -1);
-+
-+ return "";
-+ }
-+
-+ if (!long_p || ix86_bnd_prefixed_insn_p (current_output_insn))
-+ return "%!ret";
-+
-+ return "rep%; ret";
-+}
-+
- /* Output the assembly for a call instruction. */
-
- const char *
-@@ -45461,6 +45573,28 @@ ix86_handle_fndecl_attribute (tree *node, tree name, tree args, int,
- }
- }
-
-+ if (is_attribute_p ("function_return", name))
-+ {
-+ tree cst = TREE_VALUE (args);
-+ if (TREE_CODE (cst) != STRING_CST)
-+ {
-+ warning (OPT_Wattributes,
-+ "%qE attribute requires a string constant argument",
-+ name);
-+ *no_add_attrs = true;
-+ }
-+ else if (strcmp (TREE_STRING_POINTER (cst), "keep") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk-inline") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk-extern") != 0)
-+ {
-+ warning (OPT_Wattributes,
-+ "argument to %qE attribute is not "
-+ "(keep|thunk|thunk-inline|thunk-extern)", name);
-+ *no_add_attrs = true;
-+ }
-+ }
-+
- return NULL_TREE;
- }
-
-@@ -49690,6 +49824,8 @@ static const struct attribute_spec ix86_attribute_table[] =
- ix86_handle_callee_pop_aggregate_return, true },
- { "indirect_branch", 1, 1, true, false, false,
- ix86_handle_fndecl_attribute, false },
-+ { "function_return", 1, 1, true, false, false,
-+ ix86_handle_fndecl_attribute, false },
-
- /* End element. */
- { NULL, 0, 0, false, false, false, NULL, false }
-diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
-index 9dccdb0..b34bc11 100644
---- a/gcc/config/i386/i386.h
-+++ b/gcc/config/i386/i386.h
-@@ -2579,6 +2579,9 @@ struct GTY(()) machine_function {
- "indirect_jump" or "tablejump". */
- BOOL_BITFIELD has_local_indirect_jump : 1;
-
-+ /* How to generate function return. */
-+ ENUM_BITFIELD(indirect_branch) function_return_type : 3;
-+
- /* If true, there is register available for argument passing. This
- is used only in ix86_function_ok_for_sibcall by 32-bit to determine
- if there is scratch register available for indirect sibcall. In
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index 153e162..2da671e 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -12489,7 +12489,7 @@
- (define_insn "simple_return_internal"
- [(simple_return)]
- "reload_completed"
-- "%!ret"
-+ "* return ix86_output_function_return (false);"
- [(set_attr "length" "1")
- (set_attr "atom_unit" "jeu")
- (set_attr "length_immediate" "0")
-@@ -12503,12 +12503,7 @@
- [(simple_return)
- (unspec [(const_int 0)] UNSPEC_REP)]
- "reload_completed"
--{
-- if (ix86_bnd_prefixed_insn_p (insn))
-- return "%!ret";
--
-- return "rep%; ret";
--}
-+ "* return ix86_output_function_return (true);"
- [(set_attr "length" "2")
- (set_attr "atom_unit" "jeu")
- (set_attr "length_immediate" "0")
-diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
-index 5ffa334..ad5916f 100644
---- a/gcc/config/i386/i386.opt
-+++ b/gcc/config/i386/i386.opt
-@@ -902,9 +902,13 @@ mindirect-branch=
- Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_indirect_branch) Init(indirect_branch_keep)
- Convert indirect call and jump to call and return thunks.
-
-+mfunction-return=
-+Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_function_return) Init(indirect_branch_keep)
-+Convert function return to call and return thunk.
-+
- Enum
- Name(indirect_branch) Type(enum indirect_branch)
--Known indirect branch choices (for use with the -mindirect-branch= option):
-+Known indirect branch choices (for use with the -mindirect-branch=/-mfunction-return= options):
-
- EnumValue
- Enum(indirect_branch) String(keep) Value(indirect_branch_keep)
-diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
-index 8668dae..2cb6bd1 100644
---- a/gcc/doc/extend.texi
-+++ b/gcc/doc/extend.texi
-@@ -5429,6 +5429,15 @@ call and jump to call and return thunk. @samp{thunk-inline} converts
- indirect call and jump to inlined call and return thunk.
- @samp{thunk-extern} converts indirect call and jump to external call
- and return thunk provided in a separate object file.
-+
-+@item function_return("@var{choice}")
-+@cindex @code{function_return} function attribute, x86
-+On x86 targets, the @code{function_return} attribute causes the compiler
-+to convert function return with @var{choice}. @samp{keep} keeps function
-+return unmodified. @samp{thunk} converts function return to call and
-+return thunk. @samp{thunk-inline} converts function return to inlined
-+call and return thunk. @samp{thunk-extern} converts function return to
-+external call and return thunk provided in a separate object file.
- @end table
-
- On the x86, the inliner does not inline a
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index ff9a194..fa63dc5 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -1169,7 +1169,8 @@ See RS/6000 and PowerPC Options.
- -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol
- -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
- -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
---mmitigate-rop -mindirect-branch=@var{choice}}
-+-mmitigate-rop -mindirect-branch=@var{choice} @gol
-+-mfunction-return=@var{choice}}
-
- @emph{x86 Windows Options}
- @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
-@@ -24229,6 +24230,17 @@ to external call and return thunk provided in a separate object file.
- You can control this behavior for a specific function by using the
- function attribute @code{indirect_branch}. @xref{Function Attributes}.
-
-+@item -mfunction-return=@var{choice}
-+@opindex -mfunction-return
-+Convert function return with @var{choice}. The default is @samp{keep},
-+which keeps function return unmodified. @samp{thunk} converts function
-+return to call and return thunk. @samp{thunk-inline} converts function
-+return to inlined call and return thunk. @samp{thunk-extern} converts
-+function return to external call and return thunk provided in a separate
-+object file. You can control this behavior for a specific function by
-+using the function attribute @code{function_return}.
-+@xref{Function Attributes}.
-+
- @end table
-
- These @samp{-m} switches are supported in addition to the above
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-index d983e1c..e365ef5 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-index 58f09b4..05a51ad 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-index f20d35c..3c0d4c3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-index 0eff8fb..14d4ef6 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-index a25b20d..b4836c3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-index cff114a..1f06bd1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-index afdb600..bc6b47a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-@@ -35,7 +35,7 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-index d64d978..2257be3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-index 9306745..e9cfdc5 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-index 97744d6..f938db0 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-index bfce3ea..4e58599 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -13,7 +13,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-index 0833606..b8d5024 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-index 2eba0fb..455adab 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -13,7 +13,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-index f58427e..4595b84 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-@@ -36,7 +36,7 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-index 564ed39..d730d31 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-index 50fbee2..5e3e118 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { ! x32 } } } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-
- void (*dispatch) (char *);
- char buf[10];
-@@ -10,7 +10,7 @@ foo (void)
- dispatch (buf);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
- /* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-index 2976e67..2801aa4 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { ! x32 } } } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-
- void (*dispatch) (char *);
- char buf[10];
-@@ -11,7 +11,7 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
- /* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
- /* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-index da4bc98..70b4fb3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-
- void bar (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-index c64d12e..3baf03e 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-
- void bar (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-index 49f27b4..edeb264 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-index a1e3eb6..1d00413 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-index 395634e..06ebf1c 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-index fd3f633..1c8f944 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-index ba2f92b..21740ac 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-index 0c5a2d4..a77c1f4 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-index 6652523..86e9fd1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-@@ -35,7 +35,7 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-index 68c0ff7..3ecde87 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-index e2da1fc..df32a19 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-index 244fec7..9540996 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-index 107ebe3..f3db6e2 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-index 17b04ef..0f687c3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-index d9eb112..b27c6fc 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-index d02b1dc..764a375 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-@@ -35,7 +35,7 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-1.c b/gcc/testsuite/gcc.target/i386/ret-thunk-1.c
-new file mode 100644
-index 0000000..7223f67
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-1.c
-@@ -0,0 +1,13 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk" } */
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-new file mode 100644
-index 0000000..3a6727b
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-@@ -0,0 +1,23 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 2 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 2 } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-new file mode 100644
-index 0000000..b8f6818
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-@@ -0,0 +1,23 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-new file mode 100644
-index 0000000..01b0a02
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-new file mode 100644
-index 0000000..4b497b5
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+extern void (*bar) (void);
-+extern int foo (void) __attribute__ ((function_return("thunk")));
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 2 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 2 } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 3 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 3 } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-new file mode 100644
-index 0000000..4ae4c44
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+__attribute__ ((function_return("thunk-inline")))
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-new file mode 100644
-index 0000000..5b5bc76
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+__attribute__ ((function_return("thunk-extern"), indirect_branch("thunk")))
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-16.c b/gcc/testsuite/gcc.target/i386/ret-thunk-16.c
-new file mode 100644
-index 0000000..a16cad1
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-16.c
-@@ -0,0 +1,18 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+__attribute__ ((function_return("keep"), indirect_branch("keep")))
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-2.c b/gcc/testsuite/gcc.target/i386/ret-thunk-2.c
-new file mode 100644
-index 0000000..c6659e3
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-2.c
-@@ -0,0 +1,13 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline" } */
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-3.c b/gcc/testsuite/gcc.target/i386/ret-thunk-3.c
-new file mode 100644
-index 0000000..0f7f388
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-3.c
-@@ -0,0 +1,12 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-extern" } */
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-4.c b/gcc/testsuite/gcc.target/i386/ret-thunk-4.c
-new file mode 100644
-index 0000000..9ae37e8
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-4.c
-@@ -0,0 +1,12 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep" } */
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-5.c b/gcc/testsuite/gcc.target/i386/ret-thunk-5.c
-new file mode 100644
-index 0000000..4bd0d2a
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-5.c
-@@ -0,0 +1,15 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep" } */
-+
-+extern void foo (void) __attribute__ ((function_return("thunk")));
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-6.c b/gcc/testsuite/gcc.target/i386/ret-thunk-6.c
-new file mode 100644
-index 0000000..053841f
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-6.c
-@@ -0,0 +1,14 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep" } */
-+
-+__attribute__ ((function_return("thunk-inline")))
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-7.c b/gcc/testsuite/gcc.target/i386/ret-thunk-7.c
-new file mode 100644
-index 0000000..262e678
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-7.c
-@@ -0,0 +1,13 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep" } */
-+
-+__attribute__ ((function_return("thunk-extern")))
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-8.c b/gcc/testsuite/gcc.target/i386/ret-thunk-8.c
-new file mode 100644
-index 0000000..c1658e9
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-8.c
-@@ -0,0 +1,14 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline" } */
-+
-+extern void foo (void) __attribute__ ((function_return("keep")));
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-new file mode 100644
-index 0000000..fa24a1f
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-@@ -0,0 +1,24 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk:" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times {\tpause} 2 { target { x32 } } } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 2 { target { x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0006-x86-Add-mindirect-branch-register.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0006-x86-Add-mindirect-branch-register.patch
deleted file mode 100644
index ad73691..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0006-x86-Add-mindirect-branch-register.patch
+++ /dev/null
@@ -1,946 +0,0 @@
-From 3f1c39fb543884d36e759a6dc196a8e914eb4f73 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 6 Jan 2018 22:29:56 -0800
-Subject: [PATCH 06/12] x86: Add -mindirect-branch-register
-
-Add -mindirect-branch-register to force indirect branch via register.
-This is implemented by disabling patterns of indirect branch via memory,
-similar to TARGET_X32.
-
--mindirect-branch= and -mfunction-return= tests are updated with
--mno-indirect-branch-register to avoid false test failures when
--mindirect-branch-register is added to RUNTESTFLAGS for "make check".
-
-gcc/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/constraints.md (Bs): Disallow memory operand for
- -mindirect-branch-register.
- (Bw): Likewise.
- * config/i386/predicates.md (indirect_branch_operand): Likewise.
- (GOT_memory_operand): Likewise.
- (call_insn_operand): Likewise.
- (sibcall_insn_operand): Likewise.
- (GOT32_symbol_operand): Likewise.
- * config/i386/i386.md (indirect_jump): Call convert_memory_address
- for -mindirect-branch-register.
- (tablejump): Likewise.
- (*sibcall_memory): Likewise.
- (*sibcall_value_memory): Likewise.
- Disallow peepholes of indirect call and jump via memory for
- -mindirect-branch-register.
- (*call_pop): Replace m with Bw.
- (*call_value_pop): Likewise.
- (*sibcall_pop_memory): Replace m with Bs.
- * config/i386/i386.opt (mindirect-branch-register): New option.
- * doc/invoke.texi: Document -mindirect-branch-register option.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * gcc.target/i386/indirect-thunk-1.c (dg-options): Add
- -mno-indirect-branch-register.
- * gcc.target/i386/indirect-thunk-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
- * gcc.target/i386/ret-thunk-10.c: Likewise.
- * gcc.target/i386/ret-thunk-11.c: Likewise.
- * gcc.target/i386/ret-thunk-12.c: Likewise.
- * gcc.target/i386/ret-thunk-13.c: Likewise.
- * gcc.target/i386/ret-thunk-14.c: Likewise.
- * gcc.target/i386/ret-thunk-15.c: Likewise.
- * gcc.target/i386/ret-thunk-9.c: Likewise.
- * gcc.target/i386/indirect-thunk-register-1.c: New test.
- * gcc.target/i386/indirect-thunk-register-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-register-3.c: Likewise.
-
-i386: Rename to ix86_indirect_branch_register
-
-Rename the variable for -mindirect-branch-register to
-ix86_indirect_branch_register to match the command-line option name.
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/constraints.md (Bs): Replace
- ix86_indirect_branch_thunk_register with
- ix86_indirect_branch_register.
- (Bw): Likewise.
- * config/i386/i386.md (indirect_jump): Likewise.
- (tablejump): Likewise.
- (*sibcall_memory): Likewise.
- (*sibcall_value_memory): Likewise.
- Peepholes of indirect call and jump via memory: Likewise.
- * config/i386/i386.opt: Likewise.
- * config/i386/predicates.md (indirect_branch_operand): Likewise.
- (GOT_memory_operand): Likewise.
- (call_insn_operand): Likewise.
- (sibcall_insn_operand): Likewise.
- (GOT32_symbol_operand): Likewise.
-
-x86: Rewrite ix86_indirect_branch_register logic
-
-Rewrite ix86_indirect_branch_register logic with
-
-(and (not (match_test "ix86_indirect_branch_register"))
- (original condition before r256662))
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/predicates.md (constant_call_address_operand):
- Rewrite ix86_indirect_branch_register logic.
- (sibcall_insn_operand): Likewise.
-
-Don't check ix86_indirect_branch_register for GOT operand
-
-Since GOT_memory_operand and GOT32_symbol_operand are simple pattern
-matches, don't check ix86_indirect_branch_register here. If needed,
--mindirect-branch= will convert indirect branch via GOT slot to a call
-and return thunk.
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/constraints.md (Bs): Update
- ix86_indirect_branch_register check. Don't check
- ix86_indirect_branch_register with GOT_memory_operand.
- (Bw): Likewise.
- * config/i386/predicates.md (GOT_memory_operand): Don't check
- ix86_indirect_branch_register here.
- (GOT32_symbol_operand): Likewise.
-
-i386: Rewrite indirect_branch_operand logic
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/predicates.md (indirect_branch_operand): Rewrite
- ix86_indirect_branch_register logic.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/constraints.md | 6 ++--
- gcc/config/i386/i386.md | 34 ++++++++++++++--------
- gcc/config/i386/i386.opt | 4 +++
- gcc/config/i386/predicates.md | 21 +++++++------
- gcc/doc/invoke.texi | 6 +++-
- gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-5.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-6.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-1.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-2.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-5.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-6.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-7.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-1.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-2.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-1.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-2.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-5.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-6.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-7.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-1.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-2.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-5.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-6.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-7.c | 2 +-
- .../gcc.target/i386/indirect-thunk-register-1.c | 22 ++++++++++++++
- .../gcc.target/i386/indirect-thunk-register-2.c | 20 +++++++++++++
- .../gcc.target/i386/indirect-thunk-register-3.c | 19 ++++++++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-10.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-11.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-12.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-13.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-14.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-15.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 2 +-
- 47 files changed, 147 insertions(+), 63 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
-
-diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md
-index 1a4c701..9204c8e 100644
---- a/gcc/config/i386/constraints.md
-+++ b/gcc/config/i386/constraints.md
-@@ -172,14 +172,16 @@
-
- (define_constraint "Bs"
- "@internal Sibcall memory operand."
-- (ior (and (not (match_test "TARGET_X32"))
-+ (ior (and (not (match_test "ix86_indirect_branch_register"))
-+ (not (match_test "TARGET_X32"))
- (match_operand 0 "sibcall_memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
- (match_operand 0 "GOT_memory_operand"))))
-
- (define_constraint "Bw"
- "@internal Call memory operand."
-- (ior (and (not (match_test "TARGET_X32"))
-+ (ior (and (not (match_test "ix86_indirect_branch_register"))
-+ (not (match_test "TARGET_X32"))
- (match_operand 0 "memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
- (match_operand 0 "GOT_memory_operand"))))
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index 2da671e..05a88ff 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -11805,7 +11805,7 @@
- [(set (pc) (match_operand 0 "indirect_branch_operand"))]
- ""
- {
-- if (TARGET_X32)
-+ if (TARGET_X32 || ix86_indirect_branch_register)
- operands[0] = convert_memory_address (word_mode, operands[0]);
- cfun->machine->has_local_indirect_jump = true;
- })
-@@ -11859,7 +11859,7 @@
- OPTAB_DIRECT);
- }
-
-- if (TARGET_X32)
-+ if (TARGET_X32 || ix86_indirect_branch_register)
- operands[0] = convert_memory_address (word_mode, operands[0]);
- cfun->machine->has_local_indirect_jump = true;
- })
-@@ -12048,7 +12048,7 @@
- [(call (mem:QI (match_operand:W 0 "memory_operand" "m"))
- (match_operand 1))
- (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
-- "!TARGET_X32"
-+ "!TARGET_X32 && !ix86_indirect_branch_register"
- "* return ix86_output_call_insn (insn, operands[0]);"
- [(set_attr "type" "call")])
-
-@@ -12057,7 +12057,9 @@
- (match_operand:W 1 "memory_operand"))
- (call (mem:QI (match_dup 0))
- (match_operand 3))]
-- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (1))
-+ "!TARGET_X32
-+ && !ix86_indirect_branch_register
-+ && SIBLING_CALL_P (peep2_next_insn (1))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
- [(parallel [(call (mem:QI (match_dup 1))
-@@ -12070,7 +12072,9 @@
- (unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
- (call (mem:QI (match_dup 0))
- (match_operand 3))]
-- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (2))
-+ "!TARGET_X32
-+ && !ix86_indirect_branch_register
-+ && SIBLING_CALL_P (peep2_next_insn (2))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
- [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
-@@ -12092,7 +12096,7 @@
- })
-
- (define_insn "*call_pop"
-- [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lmBz"))
-+ [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lBwBz"))
- (match_operand 1))
- (set (reg:SI SP_REG)
- (plus:SI (reg:SI SP_REG)
-@@ -12112,7 +12116,7 @@
- [(set_attr "type" "call")])
-
- (define_insn "*sibcall_pop_memory"
-- [(call (mem:QI (match_operand:SI 0 "memory_operand" "m"))
-+ [(call (mem:QI (match_operand:SI 0 "memory_operand" "Bs"))
- (match_operand 1))
- (set (reg:SI SP_REG)
- (plus:SI (reg:SI SP_REG)
-@@ -12166,7 +12170,9 @@
- [(set (match_operand:W 0 "register_operand")
- (match_operand:W 1 "memory_operand"))
- (set (pc) (match_dup 0))]
-- "!TARGET_X32 && peep2_reg_dead_p (2, operands[0])"
-+ "!TARGET_X32
-+ && !ix86_indirect_branch_register
-+ && peep2_reg_dead_p (2, operands[0])"
- [(set (pc) (match_dup 1))])
-
- ;; Call subroutine, returning value in operand 0
-@@ -12244,7 +12250,7 @@
- (call (mem:QI (match_operand:W 1 "memory_operand" "m"))
- (match_operand 2)))
- (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
-- "!TARGET_X32"
-+ "!TARGET_X32 && !ix86_indirect_branch_register"
- "* return ix86_output_call_insn (insn, operands[1]);"
- [(set_attr "type" "callv")])
-
-@@ -12254,7 +12260,9 @@
- (set (match_operand 2)
- (call (mem:QI (match_dup 0))
- (match_operand 3)))]
-- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (1))
-+ "!TARGET_X32
-+ && !ix86_indirect_branch_register
-+ && SIBLING_CALL_P (peep2_next_insn (1))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
- [(parallel [(set (match_dup 2)
-@@ -12269,7 +12277,9 @@
- (set (match_operand 2)
- (call (mem:QI (match_dup 0))
- (match_operand 3)))]
-- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (2))
-+ "!TARGET_X32
-+ && !ix86_indirect_branch_register
-+ && SIBLING_CALL_P (peep2_next_insn (2))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
- [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
-@@ -12294,7 +12304,7 @@
-
- (define_insn "*call_value_pop"
- [(set (match_operand 0)
-- (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lmBz"))
-+ (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lBwBz"))
- (match_operand 2)))
- (set (reg:SI SP_REG)
- (plus:SI (reg:SI SP_REG)
-diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
-index ad5916f..a97f84f 100644
---- a/gcc/config/i386/i386.opt
-+++ b/gcc/config/i386/i386.opt
-@@ -921,3 +921,7 @@ Enum(indirect_branch) String(thunk-inline) Value(indirect_branch_thunk_inline)
-
- EnumValue
- Enum(indirect_branch) String(thunk-extern) Value(indirect_branch_thunk_extern)
-+
-+mindirect-branch-register
-+Target Report Var(ix86_indirect_branch_register) Init(0)
-+Force indirect call and jump via register.
-diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
-index 93dda7b..d1f0a7d 100644
---- a/gcc/config/i386/predicates.md
-+++ b/gcc/config/i386/predicates.md
-@@ -593,7 +593,8 @@
- ;; Test for a valid operand for indirect branch.
- (define_predicate "indirect_branch_operand"
- (ior (match_operand 0 "register_operand")
-- (and (not (match_test "TARGET_X32"))
-+ (and (not (match_test "ix86_indirect_branch_register"))
-+ (not (match_test "TARGET_X32"))
- (match_operand 0 "memory_operand"))))
-
- ;; Return true if OP is a memory operands that can be used in sibcalls.
-@@ -636,20 +637,22 @@
- (ior (match_test "constant_call_address_operand
- (op, mode == VOIDmode ? mode : Pmode)")
- (match_operand 0 "call_register_no_elim_operand")
-- (ior (and (not (match_test "TARGET_X32"))
-- (match_operand 0 "memory_operand"))
-- (and (match_test "TARGET_X32 && Pmode == DImode")
-- (match_operand 0 "GOT_memory_operand")))))
-+ (and (not (match_test "ix86_indirect_branch_register"))
-+ (ior (and (not (match_test "TARGET_X32"))
-+ (match_operand 0 "memory_operand"))
-+ (and (match_test "TARGET_X32 && Pmode == DImode")
-+ (match_operand 0 "GOT_memory_operand"))))))
-
- ;; Similarly, but for tail calls, in which we cannot allow memory references.
- (define_special_predicate "sibcall_insn_operand"
- (ior (match_test "constant_call_address_operand
- (op, mode == VOIDmode ? mode : Pmode)")
- (match_operand 0 "register_no_elim_operand")
-- (ior (and (not (match_test "TARGET_X32"))
-- (match_operand 0 "sibcall_memory_operand"))
-- (and (match_test "TARGET_X32 && Pmode == DImode")
-- (match_operand 0 "GOT_memory_operand")))))
-+ (and (not (match_test "ix86_indirect_branch_register"))
-+ (ior (and (not (match_test "TARGET_X32"))
-+ (match_operand 0 "sibcall_memory_operand"))
-+ (and (match_test "TARGET_X32 && Pmode == DImode")
-+ (match_operand 0 "GOT_memory_operand"))))))
-
- ;; Return true if OP is a 32-bit GOT symbol operand.
- (define_predicate "GOT32_symbol_operand"
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index fa63dc5..ad9f295 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -1170,7 +1170,7 @@ See RS/6000 and PowerPC Options.
- -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
- -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
- -mmitigate-rop -mindirect-branch=@var{choice} @gol
---mfunction-return=@var{choice}}
-+-mfunction-return=@var{choice} -mindirect-branch-register}
-
- @emph{x86 Windows Options}
- @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
-@@ -24241,6 +24241,10 @@ object file. You can control this behavior for a specific function by
- using the function attribute @code{function_return}.
- @xref{Function Attributes}.
-
-+@item -mindirect-branch-register
-+@opindex -mindirect-branch-register
-+Force indirect call and jump via register.
-+
- @end table
-
- These @samp{-m} switches are supported in addition to the above
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-index e365ef5..60d0988 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-index 05a51ad..aac7516 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-index 3c0d4c3..9e24a38 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-index 14d4ef6..127b5d9 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-index b4836c3..fcaa18d 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-index 1f06bd1..e464928 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-index bc6b47a..17c2d0f 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-index 2257be3..9194ccf 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-index e9cfdc5..e51f261 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-index f938db0..4aeec18 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-index 4e58599..ac0e599 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-index b8d5024..573cf1e 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-index 455adab..b2b37fc 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-index 4595b84..4a43e19 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-index 5e3e118..ac84ab6 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { ! x32 } } } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-
- void (*dispatch) (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-index 2801aa4..ce655e8 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { ! x32 } } } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-
- void (*dispatch) (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-index 70b4fb3..d34485a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-
- void bar (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-index 3baf03e..0e19830 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-
- void bar (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-index edeb264..579441f 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-index 1d00413..c92e6f2 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-index 06ebf1c..d9964c2 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-index 1c8f944..d4dca4d 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-index 21740ac..5c07e02 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-index a77c1f4..3eb4406 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-index 86e9fd1..aece938 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-index 3ecde87..3aba5e8 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-index df32a19..0f0181d 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-index 9540996..2eef6f3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-index f3db6e2..e825a10 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-index 0f687c3..c6d77e1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-index b27c6fc..6454827 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-index 764a375..c67066c 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
-new file mode 100644
-index 0000000..7d396a3
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -mindirect-branch-register -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "mov\[ \t\](%eax|%rax), \\((%esp|%rsp)\\)" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk\n" } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk_bnd\n" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
-new file mode 100644
-index 0000000..e7e616b
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -mindirect-branch-register -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "mov\[ \t\](%eax|%rax), \\((%esp|%rsp)\\)" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
-new file mode 100644
-index 0000000..5320e92
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
-@@ -0,0 +1,19 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -mindirect-branch-register -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-+/* { dg-final { scan-assembler-not {\t(pause|pause|nop)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-index 3a6727b..e6fea84 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
-
- extern void (*bar) (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-index b8f6818..e239ec4 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
-
- extern void (*bar) (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-index 01b0a02..fa31813 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- extern void (*bar) (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-index 4b497b5..fd5b41f 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- extern void (*bar) (void);
- extern int foo (void) __attribute__ ((function_return("thunk")));
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-index 4ae4c44..d606373 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- extern void (*bar) (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-index 5b5bc76..75e45e2 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
-
- extern void (*bar) (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-index fa24a1f..d1db41c 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
-
- extern void (*bar) (void);
-
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0007-x86-Add-V-register-operand-modifier.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0007-x86-Add-V-register-operand-modifier.patch
deleted file mode 100644
index cec84fe..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0007-x86-Add-V-register-operand-modifier.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-From 8f0efd692eb8db06d6c00b759c872bd2170b7f7b Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 6 Jan 2018 22:29:56 -0800
-Subject: [PATCH 07/12] x86: Add 'V' register operand modifier
-
-Add 'V', a special modifier which prints the name of the full integer
-register without '%'. For
-
-extern void (*func_p) (void);
-
-void
-foo (void)
-{
- asm ("call __x86_indirect_thunk_%V0" : : "a" (func_p));
-}
-
-it generates:
-
-foo:
- movq func_p(%rip), %rax
- call __x86_indirect_thunk_rax
- ret
-
-gcc/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/i386.c (print_reg): Print the name of the full
- integer register without '%'.
- (ix86_print_operand): Handle 'V'.
- * doc/extend.texi: Document 'V' modifier.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * gcc.target/i386/indirect-thunk-register-4.c: New test.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 13 ++++++++++++-
- gcc/doc/extend.texi | 3 +++
- gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c | 13 +++++++++++++
- 3 files changed, 28 insertions(+), 1 deletion(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 34e26a3..eeca7e5 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -16869,6 +16869,7 @@ put_condition_code (enum rtx_code code, machine_mode mode, bool reverse,
- If CODE is 'h', pretend the reg is the 'high' byte register.
- If CODE is 'y', print "st(0)" instead of "st", if the reg is stack op.
- If CODE is 'd', duplicate the operand for AVX instruction.
-+ If CODE is 'V', print naked full integer register name without %.
- */
-
- void
-@@ -16879,7 +16880,7 @@ print_reg (rtx x, int code, FILE *file)
- unsigned int regno;
- bool duplicated;
-
-- if (ASSEMBLER_DIALECT == ASM_ATT)
-+ if (ASSEMBLER_DIALECT == ASM_ATT && code != 'V')
- putc ('%', file);
-
- if (x == pc_rtx)
-@@ -16922,6 +16923,14 @@ print_reg (rtx x, int code, FILE *file)
- && regno != FPSR_REG
- && regno != FPCR_REG);
-
-+ if (code == 'V')
-+ {
-+ if (GENERAL_REGNO_P (regno))
-+ msize = GET_MODE_SIZE (word_mode);
-+ else
-+ error ("'V' modifier on non-integer register");
-+ }
-+
- duplicated = code == 'd' && TARGET_AVX;
-
- switch (msize)
-@@ -17035,6 +17044,7 @@ print_reg (rtx x, int code, FILE *file)
- & -- print some in-use local-dynamic symbol name.
- H -- print a memory address offset by 8; used for sse high-parts
- Y -- print condition for XOP pcom* instruction.
-+ V -- print naked full integer register name without %.
- + -- print a branch hint as 'cs' or 'ds' prefix
- ; -- print a semicolon (after prefixes due to bug in older gas).
- ~ -- print "i" if TARGET_AVX2, "f" otherwise.
-@@ -17259,6 +17269,7 @@ ix86_print_operand (FILE *file, rtx x, int code)
- case 'X':
- case 'P':
- case 'p':
-+ case 'V':
- break;
-
- case 's':
-diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
-index 2cb6bd1..76ba1d4 100644
---- a/gcc/doc/extend.texi
-+++ b/gcc/doc/extend.texi
-@@ -8511,6 +8511,9 @@ The table below shows the list of supported modifiers and their effects.
- @tab @code{2}
- @end multitable
-
-+@code{V} is a special modifier which prints the name of the full integer
-+register without @code{%}.
-+
- @anchor{x86floatingpointasmoperands}
- @subsubsection x86 Floating-Point @code{asm} Operands
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
-new file mode 100644
-index 0000000..f0cd9b7
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
-@@ -0,0 +1,13 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=keep -fno-pic" } */
-+
-+extern void (*func_p) (void);
-+
-+void
-+foo (void)
-+{
-+ asm("call __x86_indirect_thunk_%V0" : : "a" (func_p));
-+}
-+
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_eax" { target ia32 } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_rax" { target { ! ia32 } } } } */
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch
deleted file mode 100644
index d8a5810..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch
+++ /dev/null
@@ -1,304 +0,0 @@
-From 8e0d9bf93e2e2ec03c544572aef4b03a8e7090f3 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 13 Jan 2018 18:01:54 -0800
-Subject: [PATCH 08/12] x86: Disallow -mindirect-branch=/-mfunction-return=
- with -mcmodel=large
-
-Since the thunk function may not be reachable in large code model,
--mcmodel=large is incompatible with -mindirect-branch=thunk,
--mindirect-branch=thunk-extern, -mfunction-return=thunk and
--mfunction-return=thunk-extern. Issue an error when they are used with
--mcmodel=large.
-
-gcc/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
- -mcmodel=large with -mindirect-branch=thunk,
- -mindirect-branch=thunk-extern, -mfunction-return=thunk and
- -mfunction-return=thunk-extern.
- * doc/invoke.texi: Document -mcmodel=large is incompatible with
- -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
- -mfunction-return=thunk and -mfunction-return=thunk-extern.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * gcc.target/i386/indirect-thunk-10.c: New test.
- * gcc.target/i386/indirect-thunk-8.c: Likewise.
- * gcc.target/i386/indirect-thunk-9.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-10.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-11.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-9.c: Likewise.
- * gcc.target/i386/ret-thunk-17.c: Likewise.
- * gcc.target/i386/ret-thunk-18.c: Likewise.
- * gcc.target/i386/ret-thunk-19.c: Likewise.
- * gcc.target/i386/ret-thunk-20.c: Likewise.
- * gcc.target/i386/ret-thunk-21.c: Likewise.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 26 ++++++++++++++++++++++
- gcc/doc/invoke.texi | 11 +++++++++
- gcc/testsuite/gcc.target/i386/indirect-thunk-10.c | 7 ++++++
- gcc/testsuite/gcc.target/i386/indirect-thunk-8.c | 7 ++++++
- gcc/testsuite/gcc.target/i386/indirect-thunk-9.c | 7 ++++++
- .../gcc.target/i386/indirect-thunk-attr-10.c | 9 ++++++++
- .../gcc.target/i386/indirect-thunk-attr-11.c | 9 ++++++++
- .../gcc.target/i386/indirect-thunk-attr-9.c | 9 ++++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-17.c | 7 ++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-18.c | 8 +++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-19.c | 8 +++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-20.c | 9 ++++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-21.c | 9 ++++++++
- 13 files changed, 126 insertions(+)
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-17.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-18.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-19.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-20.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-21.c
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index eeca7e5..9c038be 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -6389,6 +6389,19 @@ ix86_set_indirect_branch_type (tree fndecl)
- }
- else
- cfun->machine->indirect_branch_type = ix86_indirect_branch;
-+
-+ /* -mcmodel=large is not compatible with -mindirect-branch=thunk
-+ nor -mindirect-branch=thunk-extern. */
-+ if ((ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
-+ && ((cfun->machine->indirect_branch_type
-+ == indirect_branch_thunk_extern)
-+ || (cfun->machine->indirect_branch_type
-+ == indirect_branch_thunk)))
-+ error ("%<-mindirect-branch=%s%> and %<-mcmodel=large%> are not "
-+ "compatible",
-+ ((cfun->machine->indirect_branch_type
-+ == indirect_branch_thunk_extern)
-+ ? "thunk-extern" : "thunk"));
- }
-
- if (cfun->machine->function_return_type == indirect_branch_unset)
-@@ -6414,6 +6427,19 @@ ix86_set_indirect_branch_type (tree fndecl)
- }
- else
- cfun->machine->function_return_type = ix86_function_return;
-+
-+ /* -mcmodel=large is not compatible with -mfunction-return=thunk
-+ nor -mfunction-return=thunk-extern. */
-+ if ((ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
-+ && ((cfun->machine->function_return_type
-+ == indirect_branch_thunk_extern)
-+ || (cfun->machine->function_return_type
-+ == indirect_branch_thunk)))
-+ error ("%<-mfunction-return=%s%> and %<-mcmodel=large%> are not "
-+ "compatible",
-+ ((cfun->machine->function_return_type
-+ == indirect_branch_thunk_extern)
-+ ? "thunk-extern" : "thunk"));
- }
- }
-
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index ad9f295..48e827f 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -24230,6 +24230,11 @@ to external call and return thunk provided in a separate object file.
- You can control this behavior for a specific function by using the
- function attribute @code{indirect_branch}. @xref{Function Attributes}.
-
-+Note that @option{-mcmodel=large} is incompatible with
-+@option{-mindirect-branch=thunk} nor
-+@option{-mindirect-branch=thunk-extern} since the thunk function may
-+not be reachable in large code model.
-+
- @item -mfunction-return=@var{choice}
- @opindex -mfunction-return
- Convert function return with @var{choice}. The default is @samp{keep},
-@@ -24241,6 +24246,12 @@ object file. You can control this behavior for a specific function by
- using the function attribute @code{function_return}.
- @xref{Function Attributes}.
-
-+Note that @option{-mcmodel=large} is incompatible with
-+@option{-mfunction-return=thunk} nor
-+@option{-mfunction-return=thunk-extern} since the thunk function may
-+not be reachable in large code model.
-+
-+
- @item -mindirect-branch-register
- @opindex -mindirect-branch-register
- Force indirect call and jump via register.
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
-new file mode 100644
-index 0000000..a0674bd
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
-@@ -0,0 +1,7 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -mfunction-return=keep -mcmodel=large" } */
-+
-+void
-+bar (void)
-+{
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
-new file mode 100644
-index 0000000..7a80a89
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
-@@ -0,0 +1,7 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -mfunction-return=keep -mcmodel=large" } */
-+
-+void
-+bar (void)
-+{ /* { dg-error "'-mindirect-branch=thunk' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
-new file mode 100644
-index 0000000..d4d45c5
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
-@@ -0,0 +1,7 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -mfunction-return=keep -mcmodel=large" } */
-+
-+void
-+bar (void)
-+{ /* { dg-error "'-mindirect-branch=thunk-extern' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
-new file mode 100644
-index 0000000..3a2aead
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((indirect_branch("thunk-extern")))
-+void
-+bar (void)
-+{ /* { dg-error "'-mindirect-branch=thunk-extern' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
-new file mode 100644
-index 0000000..8e52f03
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((indirect_branch("thunk-inline")))
-+void
-+bar (void)
-+{
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
-new file mode 100644
-index 0000000..bdaa4f6
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((indirect_branch("thunk")))
-+void
-+bar (void)
-+{ /* { dg-error "'-mindirect-branch=thunk' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-17.c b/gcc/testsuite/gcc.target/i386/ret-thunk-17.c
-new file mode 100644
-index 0000000..0605e2c
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-17.c
-@@ -0,0 +1,7 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=keep -mcmodel=large" } */
-+
-+void
-+bar (void)
-+{ /* { dg-error "'-mfunction-return=thunk' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-18.c b/gcc/testsuite/gcc.target/i386/ret-thunk-18.c
-new file mode 100644
-index 0000000..307019d
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-18.c
-@@ -0,0 +1,8 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+void
-+bar (void)
-+{ /* { dg-error "'-mfunction-return=thunk-extern' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-19.c b/gcc/testsuite/gcc.target/i386/ret-thunk-19.c
-new file mode 100644
-index 0000000..772617f
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-19.c
-@@ -0,0 +1,8 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
-+
-+__attribute__ ((function_return("thunk")))
-+void
-+bar (void)
-+{ /* { dg-error "'-mfunction-return=thunk' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-20.c b/gcc/testsuite/gcc.target/i386/ret-thunk-20.c
-new file mode 100644
-index 0000000..1e9f9bd
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-20.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((function_return("thunk-extern")))
-+void
-+bar (void)
-+{ /* { dg-error "'-mfunction-return=thunk-extern' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-21.c b/gcc/testsuite/gcc.target/i386/ret-thunk-21.c
-new file mode 100644
-index 0000000..eea07f7
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-21.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((function_return("thunk-inline")))
-+void
-+bar (void)
-+{
-+}
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch
deleted file mode 100644
index 7364a2c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From 3eff2adada2b1667b0e76496fa559e0c248ecd84 Mon Sep 17 00:00:00 2001
-From: uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 25 Jan 2018 19:39:01 +0000
-Subject: [PATCH 09/12] Use INVALID_REGNUM in indirect thunk processing
-
- Backport from mainline
- 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
-
- * config/i386/i386.c (indirect_thunk_name): Declare regno
- as unsigned int. Compare regno with INVALID_REGNUM.
- (output_indirect_thunk): Ditto.
- (output_indirect_thunk_function): Ditto.
- (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
- in the call to output_indirect_thunk_function.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@257067 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 30 +++++++++++++++---------------
- 1 file changed, 15 insertions(+), 15 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 9c038be..4012657 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -11087,16 +11087,16 @@ static int indirect_thunks_bnd_used;
- /* Fills in the label name that should be used for the indirect thunk. */
-
- static void
--indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
-- bool ret_p)
-+indirect_thunk_name (char name[32], unsigned int regno,
-+ bool need_bnd_p, bool ret_p)
- {
-- if (regno >= 0 && ret_p)
-+ if (regno != INVALID_REGNUM && ret_p)
- gcc_unreachable ();
-
- if (USE_HIDDEN_LINKONCE)
- {
- const char *bnd = need_bnd_p ? "_bnd" : "";
-- if (regno >= 0)
-+ if (regno != INVALID_REGNUM)
- {
- const char *reg_prefix;
- if (LEGACY_INT_REGNO_P (regno))
-@@ -11114,7 +11114,7 @@ indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
- }
- else
- {
-- if (regno >= 0)
-+ if (regno != INVALID_REGNUM)
- {
- if (need_bnd_p)
- ASM_GENERATE_INTERNAL_LABEL (name, "LITBR", regno);
-@@ -11166,7 +11166,7 @@ indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
- */
-
- static void
--output_indirect_thunk (bool need_bnd_p, int regno)
-+output_indirect_thunk (bool need_bnd_p, unsigned int regno)
- {
- char indirectlabel1[32];
- char indirectlabel2[32];
-@@ -11196,7 +11196,7 @@ output_indirect_thunk (bool need_bnd_p, int regno)
-
- ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
-
-- if (regno >= 0)
-+ if (regno != INVALID_REGNUM)
- {
- /* MOV. */
- rtx xops[2];
-@@ -11220,12 +11220,12 @@ output_indirect_thunk (bool need_bnd_p, int regno)
- }
-
- /* Output a funtion with a call and return thunk for indirect branch.
-- If BND_P is true, the BND prefix is needed. If REGNO != -1, the
-- function address is in REGNO. Otherwise, the function address is
-+ If BND_P is true, the BND prefix is needed. If REGNO != INVALID_REGNUM,
-+ the function address is in REGNO. Otherwise, the function address is
- on the top of stack. */
-
- static void
--output_indirect_thunk_function (bool need_bnd_p, int regno)
-+output_indirect_thunk_function (bool need_bnd_p, unsigned int regno)
- {
- char name[32];
- tree decl;
-@@ -11274,7 +11274,7 @@ output_indirect_thunk_function (bool need_bnd_p, int regno)
- ASM_OUTPUT_LABEL (asm_out_file, name);
- }
-
-- if (regno < 0)
-+ if (regno == INVALID_REGNUM)
- {
- /* Create alias for __x86.return_thunk/__x86.return_thunk_bnd. */
- char alias[32];
-@@ -11348,16 +11348,16 @@ static void
- ix86_code_end (void)
- {
- rtx xops[2];
-- int regno;
-+ unsigned int regno;
-
- if (indirect_thunk_needed)
-- output_indirect_thunk_function (false, -1);
-+ output_indirect_thunk_function (false, INVALID_REGNUM);
- if (indirect_thunk_bnd_needed)
-- output_indirect_thunk_function (true, -1);
-+ output_indirect_thunk_function (true, INVALID_REGNUM);
-
- for (regno = FIRST_REX_INT_REG; regno <= LAST_REX_INT_REG; regno++)
- {
-- int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1;
-+ unsigned int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1;
- if ((indirect_thunks_used & (1 << i)))
- output_indirect_thunk_function (false, regno);
-
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch
deleted file mode 100644
index 080d741..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From c4300d9ad683e693c90d02d4f1b13183bf2d4acc Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 2 Feb 2018 16:47:02 +0000
-Subject: [PATCH 10/12] i386: Pass INVALID_REGNUM as invalid register number
-
- Backport from mainline
- * config/i386/i386.c (ix86_output_function_return): Pass
- INVALID_REGNUM, instead of -1, as invalid register number to
- indirect_thunk_name and output_indirect_thunk.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@257341 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 4012657..66502ee 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -28056,7 +28056,8 @@ ix86_output_function_return (bool long_p)
- {
- bool need_thunk = (cfun->machine->function_return_type
- == indirect_branch_thunk);
-- indirect_thunk_name (thunk_name, -1, need_bnd_p, true);
-+ indirect_thunk_name (thunk_name, INVALID_REGNUM, need_bnd_p,
-+ true);
- if (need_bnd_p)
- {
- indirect_thunk_bnd_needed |= need_thunk;
-@@ -28069,7 +28070,7 @@ ix86_output_function_return (bool long_p)
- }
- }
- else
-- output_indirect_thunk (need_bnd_p, -1);
-+ output_indirect_thunk (need_bnd_p, INVALID_REGNUM);
-
- return "";
- }
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0011-i386-Update-mfunction-return-for-return-with-pop.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0011-i386-Update-mfunction-return-for-return-with-pop.patch
deleted file mode 100644
index 3b036fb..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0011-i386-Update-mfunction-return-for-return-with-pop.patch
+++ /dev/null
@@ -1,453 +0,0 @@
-From b3a2269c7884378a9afd394ac7e669aab0443b57 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 26 Feb 2018 15:29:30 +0000
-Subject: [PATCH 11/12] i386: Update -mfunction-return= for return with pop
-
-When -mfunction-return= is used, simple_return_pop_internal should pop
-return address into ECX register, adjust stack by bytes to pop from stack
-and jump to the return thunk via ECX register.
-
-Revision 257992 removed the bool argument from ix86_output_indirect_jmp.
-Update comments to reflect it.
-
-Tested on i686 and x86-64.
-
- Backport from mainline
- * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
-
- PR target/84530
- * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
- the bool argument.
- (ix86_output_indirect_function_return): New prototype.
- (ix86_split_simple_return_pop_internal): Likewise.
- * config/i386/i386.c (indirect_return_via_cx): New.
- (indirect_return_via_cx_bnd): Likewise.
- (indirect_thunk_name): Handle return va CX_REG.
- (output_indirect_thunk_function): Create alias for
- __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
- (ix86_output_indirect_jmp): Remove the bool argument.
- (ix86_output_indirect_function_return): New function.
- (ix86_split_simple_return_pop_internal): Likewise.
- * config/i386/i386.md (*indirect_jump): Don't pass false
- to ix86_output_indirect_jmp.
- (*tablejump_1): Likewise.
- (simple_return_pop_internal): Change it to define_insn_and_split.
- Call ix86_split_simple_return_pop_internal to split it for
- -mfunction-return=.
- (simple_return_indirect_internal): Call
- ix86_output_indirect_function_return instead of
- ix86_output_indirect_jmp.
-
-gcc/testsuite/
-
- Backport from mainline
- PR target/84530
- * gcc.target/i386/ret-thunk-22.c: New test.
- * gcc.target/i386/ret-thunk-23.c: Likewise.
- * gcc.target/i386/ret-thunk-24.c: Likewise.
- * gcc.target/i386/ret-thunk-25.c: Likewise.
- * gcc.target/i386/ret-thunk-26.c: Likewise.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386-protos.h | 4 +-
- gcc/config/i386/i386.c | 127 +++++++++++++++++++++++----
- gcc/config/i386/i386.md | 11 ++-
- gcc/testsuite/gcc.target/i386/ret-thunk-22.c | 15 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-23.c | 15 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-24.c | 15 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-25.c | 15 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-26.c | 40 +++++++++
- 8 files changed, 222 insertions(+), 20 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-22.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-23.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-24.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-25.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-26.c
-
-diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
-index 620d70e..c7a0ccb5 100644
---- a/gcc/config/i386/i386-protos.h
-+++ b/gcc/config/i386/i386-protos.h
-@@ -311,8 +311,10 @@ extern enum attr_cpu ix86_schedule;
- #endif
-
- extern const char * ix86_output_call_insn (rtx_insn *insn, rtx call_op);
--extern const char * ix86_output_indirect_jmp (rtx call_op, bool ret_p);
-+extern const char * ix86_output_indirect_jmp (rtx call_op);
- extern const char * ix86_output_function_return (bool long_p);
-+extern const char * ix86_output_indirect_function_return (rtx ret_op);
-+extern void ix86_split_simple_return_pop_internal (rtx);
- extern bool ix86_operands_ok_for_move_multiple (rtx *operands, bool load,
- enum machine_mode mode);
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 66502ee..21c3c18 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -11080,6 +11080,12 @@ static int indirect_thunks_used;
- by call and return thunks functions with the BND prefix. */
- static int indirect_thunks_bnd_used;
-
-+/* True if return thunk function via CX is needed. */
-+static bool indirect_return_via_cx;
-+/* True if return thunk function via CX with the BND prefix is
-+ needed. */
-+static bool indirect_return_via_cx_bnd;
-+
- #ifndef INDIRECT_LABEL
- # define INDIRECT_LABEL "LIND"
- #endif
-@@ -11090,12 +11096,13 @@ static void
- indirect_thunk_name (char name[32], unsigned int regno,
- bool need_bnd_p, bool ret_p)
- {
-- if (regno != INVALID_REGNUM && ret_p)
-+ if (regno != INVALID_REGNUM && regno != CX_REG && ret_p)
- gcc_unreachable ();
-
- if (USE_HIDDEN_LINKONCE)
- {
- const char *bnd = need_bnd_p ? "_bnd" : "";
-+ const char *ret = ret_p ? "return" : "indirect";
- if (regno != INVALID_REGNUM)
- {
- const char *reg_prefix;
-@@ -11103,14 +11110,11 @@ indirect_thunk_name (char name[32], unsigned int regno,
- reg_prefix = TARGET_64BIT ? "r" : "e";
- else
- reg_prefix = "";
-- sprintf (name, "__x86_indirect_thunk%s_%s%s",
-- bnd, reg_prefix, reg_names[regno]);
-+ sprintf (name, "__x86_%s_thunk%s_%s%s",
-+ ret, bnd, reg_prefix, reg_names[regno]);
- }
- else
-- {
-- const char *ret = ret_p ? "return" : "indirect";
-- sprintf (name, "__x86_%s_thunk%s", ret, bnd);
-- }
-+ sprintf (name, "__x86_%s_thunk%s", ret, bnd);
- }
- else
- {
-@@ -11274,9 +11278,23 @@ output_indirect_thunk_function (bool need_bnd_p, unsigned int regno)
- ASM_OUTPUT_LABEL (asm_out_file, name);
- }
-
-+ /* Create alias for __x86_return_thunk/__x86_return_thunk_bnd or
-+ __x86_return_thunk_ecx/__x86_return_thunk_ecx_bnd. */
-+ bool need_alias;
- if (regno == INVALID_REGNUM)
-+ need_alias = true;
-+ else if (regno == CX_REG)
-+ {
-+ if (need_bnd_p)
-+ need_alias = indirect_return_via_cx_bnd;
-+ else
-+ need_alias = indirect_return_via_cx;
-+ }
-+ else
-+ need_alias = false;
-+
-+ if (need_alias)
- {
-- /* Create alias for __x86.return_thunk/__x86.return_thunk_bnd. */
- char alias[32];
-
- indirect_thunk_name (alias, regno, need_bnd_p, true);
-@@ -28019,18 +28037,17 @@ ix86_output_indirect_branch (rtx call_op, const char *xasm,
- else
- ix86_output_indirect_branch_via_push (call_op, xasm, sibcall_p);
- }
--/* Output indirect jump. CALL_OP is the jump target. Jump is a
-- function return if RET_P is true. */
-+
-+/* Output indirect jump. CALL_OP is the jump target. */
-
- const char *
--ix86_output_indirect_jmp (rtx call_op, bool ret_p)
-+ix86_output_indirect_jmp (rtx call_op)
- {
- if (cfun->machine->indirect_branch_type != indirect_branch_keep)
- {
-- /* We can't have red-zone if this isn't a function return since
-- "call" in the indirect thunk pushes the return address onto
-- stack, destroying red-zone. */
-- if (!ret_p && ix86_red_zone_size != 0)
-+ /* We can't have red-zone since "call" in the indirect thunk
-+ pushes the return address onto stack, destroying red-zone. */
-+ if (ix86_red_zone_size != 0)
- gcc_unreachable ();
-
- ix86_output_indirect_branch (call_op, "%0", true);
-@@ -28081,6 +28098,86 @@ ix86_output_function_return (bool long_p)
- return "rep%; ret";
- }
-
-+/* Output indirect function return. RET_OP is the function return
-+ target. */
-+
-+const char *
-+ix86_output_indirect_function_return (rtx ret_op)
-+{
-+ if (cfun->machine->function_return_type != indirect_branch_keep)
-+ {
-+ char thunk_name[32];
-+ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
-+ unsigned int regno = REGNO (ret_op);
-+ gcc_assert (regno == CX_REG);
-+
-+ if (cfun->machine->function_return_type
-+ != indirect_branch_thunk_inline)
-+ {
-+ bool need_thunk = (cfun->machine->function_return_type
-+ == indirect_branch_thunk);
-+ indirect_thunk_name (thunk_name, regno, need_bnd_p, true);
-+ if (need_bnd_p)
-+ {
-+ if (need_thunk)
-+ {
-+ indirect_return_via_cx_bnd = true;
-+ indirect_thunks_bnd_used |= 1 << CX_REG;
-+ }
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ }
-+ else
-+ {
-+ if (need_thunk)
-+ {
-+ indirect_return_via_cx = true;
-+ indirect_thunks_used |= 1 << CX_REG;
-+ }
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, regno);
-+
-+ return "";
-+ }
-+ else
-+ return "%!jmp\t%A0";
-+}
-+
-+/* Split simple return with popping POPC bytes from stack to indirect
-+ branch with stack adjustment . */
-+
-+void
-+ix86_split_simple_return_pop_internal (rtx popc)
-+{
-+ struct machine_function *m = cfun->machine;
-+ rtx ecx = gen_rtx_REG (SImode, CX_REG);
-+ rtx_insn *insn;
-+
-+ /* There is no "pascal" calling convention in any 64bit ABI. */
-+ gcc_assert (!TARGET_64BIT);
-+
-+ insn = emit_insn (gen_pop (ecx));
-+ m->fs.cfa_offset -= UNITS_PER_WORD;
-+ m->fs.sp_offset -= UNITS_PER_WORD;
-+
-+ rtx x = plus_constant (Pmode, stack_pointer_rtx, UNITS_PER_WORD);
-+ x = gen_rtx_SET (stack_pointer_rtx, x);
-+ add_reg_note (insn, REG_CFA_ADJUST_CFA, x);
-+ add_reg_note (insn, REG_CFA_REGISTER, gen_rtx_SET (ecx, pc_rtx));
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+
-+ x = gen_rtx_PLUS (Pmode, stack_pointer_rtx, popc);
-+ x = gen_rtx_SET (stack_pointer_rtx, x);
-+ insn = emit_insn (x);
-+ add_reg_note (insn, REG_CFA_ADJUST_CFA, x);
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+
-+ /* Now return address is in ECX. */
-+ emit_jump_insn (gen_simple_return_indirect_internal (ecx));
-+}
-+
- /* Output the assembly for a call instruction. */
-
- const char *
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index 05a88ff..857466a 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -11813,7 +11813,7 @@
- (define_insn "*indirect_jump"
- [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))]
- ""
-- "* return ix86_output_indirect_jmp (operands[0], false);"
-+ "* return ix86_output_indirect_jmp (operands[0]);"
- [(set (attr "type")
- (if_then_else (match_test "(cfun->machine->indirect_branch_type
- != indirect_branch_keep)")
-@@ -11868,7 +11868,7 @@
- [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))
- (use (label_ref (match_operand 1)))]
- ""
-- "* return ix86_output_indirect_jmp (operands[0], false);"
-+ "* return ix86_output_indirect_jmp (operands[0]);"
- [(set (attr "type")
- (if_then_else (match_test "(cfun->machine->indirect_branch_type
- != indirect_branch_keep)")
-@@ -12520,11 +12520,14 @@
- (set_attr "prefix_rep" "1")
- (set_attr "modrm" "0")])
-
--(define_insn "simple_return_pop_internal"
-+(define_insn_and_split "simple_return_pop_internal"
- [(simple_return)
- (use (match_operand:SI 0 "const_int_operand"))]
- "reload_completed"
- "%!ret\t%0"
-+ "&& cfun->machine->function_return_type != indirect_branch_keep"
-+ [(const_int 0)]
-+ "ix86_split_simple_return_pop_internal (operands[0]); DONE;"
- [(set_attr "length" "3")
- (set_attr "atom_unit" "jeu")
- (set_attr "length_immediate" "2")
-@@ -12535,7 +12538,7 @@
- [(simple_return)
- (use (match_operand:SI 0 "register_operand" "r"))]
- "reload_completed"
-- "* return ix86_output_indirect_jmp (operands[0], true);"
-+ "* return ix86_output_indirect_function_return (operands[0]);"
- [(set (attr "type")
- (if_then_else (match_test "(cfun->machine->indirect_branch_type
- != indirect_branch_keep)")
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-22.c b/gcc/testsuite/gcc.target/i386/ret-thunk-22.c
-new file mode 100644
-index 0000000..89e086d
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-22.c
-@@ -0,0 +1,15 @@
-+/* PR target/r84530 */
-+/* { dg-do compile { target ia32 } } */
-+/* { dg-options "-O2 -mfunction-return=thunk" } */
-+
-+struct s { _Complex unsigned short x; };
-+struct s gs = { 100 + 200i };
-+struct s __attribute__((noinline)) foo (void) { return gs; }
-+
-+/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */
-+/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk_ecx" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-23.c b/gcc/testsuite/gcc.target/i386/ret-thunk-23.c
-new file mode 100644
-index 0000000..43f0cca
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-23.c
-@@ -0,0 +1,15 @@
-+/* PR target/r84530 */
-+/* { dg-do compile { target ia32 } } */
-+/* { dg-options "-O2 -mfunction-return=thunk-extern" } */
-+
-+struct s { _Complex unsigned short x; };
-+struct s gs = { 100 + 200i };
-+struct s __attribute__((noinline)) foo (void) { return gs; }
-+
-+/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */
-+/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk_ecx" } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not {\tpause} } } */
-+/* { dg-final { scan-assembler-not {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-24.c b/gcc/testsuite/gcc.target/i386/ret-thunk-24.c
-new file mode 100644
-index 0000000..8729e35
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-24.c
-@@ -0,0 +1,15 @@
-+/* PR target/r84530 */
-+/* { dg-do compile { target ia32 } } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline" } */
-+
-+struct s { _Complex unsigned short x; };
-+struct s gs = { 100 + 200i };
-+struct s __attribute__((noinline)) foo (void) { return gs; }
-+
-+/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */
-+/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk_ecx" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-25.c b/gcc/testsuite/gcc.target/i386/ret-thunk-25.c
-new file mode 100644
-index 0000000..f73553c
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-25.c
-@@ -0,0 +1,15 @@
-+/* PR target/r84530 */
-+/* { dg-do compile { target ia32 } } */
-+/* { dg-options "-O2 -mfunction-return=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+
-+struct s { _Complex unsigned short x; };
-+struct s gs = { 100 + 200i };
-+struct s __attribute__((noinline)) foo (void) { return gs; }
-+
-+/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */
-+/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk_bnd_ecx" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-26.c b/gcc/testsuite/gcc.target/i386/ret-thunk-26.c
-new file mode 100644
-index 0000000..9144e98
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-26.c
-@@ -0,0 +1,40 @@
-+/* PR target/r84530 */
-+/* { dg-do run } */
-+/* { dg-options "-Os -mfunction-return=thunk" } */
-+
-+struct S { int i; };
-+__attribute__((const, noinline, noclone))
-+struct S foo (int x)
-+{
-+ struct S s;
-+ s.i = x;
-+ return s;
-+}
-+
-+int a[2048], b[2048], c[2048], d[2048];
-+struct S e[2048];
-+
-+__attribute__((noinline, noclone)) void
-+bar (void)
-+{
-+ int i;
-+ for (i = 0; i < 1024; i++)
-+ {
-+ e[i] = foo (i);
-+ a[i+2] = a[i] + a[i+1];
-+ b[10] = b[10] + i;
-+ c[i] = c[2047 - i];
-+ d[i] = d[i + 1];
-+ }
-+}
-+
-+int
-+main ()
-+{
-+ int i;
-+ bar ();
-+ for (i = 0; i < 1024; i++)
-+ if (e[i].i != i)
-+ __builtin_abort ();
-+ return 0;
-+}
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch
deleted file mode 100644
index b50ac5c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch
+++ /dev/null
@@ -1,1004 +0,0 @@
-From 7ba192d11a43d24ce427a3dfce0ad0592bd52830 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 26 Feb 2018 17:00:46 +0000
-Subject: [PATCH 12/12] i386: Add TARGET_INDIRECT_BRANCH_REGISTER
-
-For
-
----
-struct C {
- virtual ~C();
- virtual void f();
-};
-
-void
-f (C *p)
-{
- p->f();
- p->f();
-}
----
-
--mindirect-branch=thunk-extern -O2 on x86-64 GNU/Linux generates:
-
-_Z1fP1C:
-.LFB0:
- .cfi_startproc
- pushq %rbx
- .cfi_def_cfa_offset 16
- .cfi_offset 3, -16
- movq (%rdi), %rax
- movq %rdi, %rbx
- jmp .LIND1
-.LIND0:
- pushq 16(%rax)
- jmp __x86_indirect_thunk
-.LIND1:
- call .LIND0
- movq (%rbx), %rax
- movq %rbx, %rdi
- popq %rbx
- .cfi_def_cfa_offset 8
- movq 16(%rax), %rax
- jmp __x86_indirect_thunk_rax
- .cfi_endproc
-
-x86-64 is supposed to have asynchronous unwind tables by default, but
-there is nothing that reflects the change in the (relative) frame
-address after .LIND0. That region really has to be moved outside of
-the .cfi_startproc/.cfi_endproc bracket.
-
-This patch adds TARGET_INDIRECT_BRANCH_REGISTER to force indirect
-branch via register whenever -mindirect-branch= is used. Now,
--mindirect-branch=thunk-extern -O2 on x86-64 GNU/Linux generates:
-
-_Z1fP1C:
-.LFB0:
- .cfi_startproc
- pushq %rbx
- .cfi_def_cfa_offset 16
- .cfi_offset 3, -16
- movq (%rdi), %rax
- movq %rdi, %rbx
- movq 16(%rax), %rax
- call __x86_indirect_thunk_rax
- movq (%rbx), %rax
- movq %rbx, %rdi
- popq %rbx
- .cfi_def_cfa_offset 8
- movq 16(%rax), %rax
- jmp __x86_indirect_thunk_rax
- .cfi_endproc
-
-so that "-mindirect-branch=thunk-extern" is equivalent to
-"-mindirect-branch=thunk-extern -mindirect-branch-register", which is
-used by Linux kernel.
-
-gcc/
-
- Backport from mainline
- PR target/84039
- * config/i386/constraints.md (Bs): Replace
- ix86_indirect_branch_register with
- TARGET_INDIRECT_BRANCH_REGISTER.
- (Bw): Likewise.
- * config/i386/i386.md (indirect_jump): Likewise.
- (tablejump): Likewise.
- (*sibcall_memory): Likewise.
- (*sibcall_value_memory): Likewise.
- Peepholes of indirect call and jump via memory: Likewise.
- (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
- (*sibcall_value_GOT_32): Likewise.
- * config/i386/predicates.md (indirect_branch_operand): Likewise.
- (GOT_memory_operand): Likewise.
- (call_insn_operand): Likewise.
- (sibcall_insn_operand): Likewise.
- (GOT32_symbol_operand): Likewise.
- * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
-
-gcc/testsuite/
-
- Backport from mainline
- PR target/84039
- * gcc.target/i386/indirect-thunk-1.c: Updated.
- * gcc.target/i386/indirect-thunk-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
- * gcc.target/i386/ret-thunk-9.c: Likewise.
- * gcc.target/i386/ret-thunk-10.c: Likewise.
- * gcc.target/i386/ret-thunk-11.c: Likewise.
- * gcc.target/i386/ret-thunk-12.c: Likewise.
- * gcc.target/i386/ret-thunk-13.c: Likewise.
- * gcc.target/i386/ret-thunk-14.c: Likewise.
- * gcc.target/i386/ret-thunk-15.c: Likewise.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/constraints.md | 4 ++--
- gcc/config/i386/i386.h | 5 ++++
- gcc/config/i386/i386.md | 28 +++++++++++++---------
- gcc/config/i386/predicates.md | 6 ++---
- gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 5 ++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 5 ++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 5 ++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 5 ++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-5.c | 6 +++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-6.c | 12 ++++++----
- gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-attr-1.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-attr-2.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-attr-3.c | 3 +--
- .../gcc.target/i386/indirect-thunk-attr-4.c | 3 +--
- .../gcc.target/i386/indirect-thunk-attr-5.c | 9 ++++---
- .../gcc.target/i386/indirect-thunk-attr-6.c | 9 ++++---
- .../gcc.target/i386/indirect-thunk-attr-7.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-bnd-1.c | 6 ++---
- .../gcc.target/i386/indirect-thunk-bnd-2.c | 6 ++---
- .../gcc.target/i386/indirect-thunk-bnd-3.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-bnd-4.c | 7 +++---
- .../gcc.target/i386/indirect-thunk-extern-1.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-extern-2.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-extern-3.c | 9 ++++---
- .../gcc.target/i386/indirect-thunk-extern-4.c | 6 ++---
- .../gcc.target/i386/indirect-thunk-extern-5.c | 6 +++--
- .../gcc.target/i386/indirect-thunk-extern-6.c | 8 +++----
- .../gcc.target/i386/indirect-thunk-extern-7.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-inline-1.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-2.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-5.c | 3 ++-
- .../gcc.target/i386/indirect-thunk-inline-6.c | 3 ++-
- .../gcc.target/i386/indirect-thunk-inline-7.c | 4 ++--
- gcc/testsuite/gcc.target/i386/ret-thunk-10.c | 9 +++----
- gcc/testsuite/gcc.target/i386/ret-thunk-11.c | 9 +++----
- gcc/testsuite/gcc.target/i386/ret-thunk-12.c | 8 +++----
- gcc/testsuite/gcc.target/i386/ret-thunk-13.c | 5 ++--
- gcc/testsuite/gcc.target/i386/ret-thunk-14.c | 7 +++---
- gcc/testsuite/gcc.target/i386/ret-thunk-15.c | 7 +++---
- gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 13 ++++------
- 43 files changed, 128 insertions(+), 141 deletions(-)
-
-diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md
-index 9204c8e..ef684a9 100644
---- a/gcc/config/i386/constraints.md
-+++ b/gcc/config/i386/constraints.md
-@@ -172,7 +172,7 @@
-
- (define_constraint "Bs"
- "@internal Sibcall memory operand."
-- (ior (and (not (match_test "ix86_indirect_branch_register"))
-+ (ior (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- (not (match_test "TARGET_X32"))
- (match_operand 0 "sibcall_memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
-@@ -180,7 +180,7 @@
-
- (define_constraint "Bw"
- "@internal Call memory operand."
-- (ior (and (not (match_test "ix86_indirect_branch_register"))
-+ (ior (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- (not (match_test "TARGET_X32"))
- (match_operand 0 "memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
-diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
-index b34bc11..1816d71 100644
---- a/gcc/config/i386/i386.h
-+++ b/gcc/config/i386/i386.h
-@@ -2676,6 +2676,11 @@ extern void debug_dispatch_window (int);
- #define TARGET_RECIP_VEC_DIV ((recip_mask & RECIP_MASK_VEC_DIV) != 0)
- #define TARGET_RECIP_VEC_SQRT ((recip_mask & RECIP_MASK_VEC_SQRT) != 0)
-
-+
-+#define TARGET_INDIRECT_BRANCH_REGISTER \
-+ (ix86_indirect_branch_register \
-+ || cfun->machine->indirect_branch_type != indirect_branch_keep)
-+
- #define IX86_HLE_ACQUIRE (1 << 16)
- #define IX86_HLE_RELEASE (1 << 17)
-
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index 857466a..6a6dc26 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -11805,7 +11805,7 @@
- [(set (pc) (match_operand 0 "indirect_branch_operand"))]
- ""
- {
-- if (TARGET_X32 || ix86_indirect_branch_register)
-+ if (TARGET_X32 || TARGET_INDIRECT_BRANCH_REGISTER)
- operands[0] = convert_memory_address (word_mode, operands[0]);
- cfun->machine->has_local_indirect_jump = true;
- })
-@@ -11859,7 +11859,7 @@
- OPTAB_DIRECT);
- }
-
-- if (TARGET_X32 || ix86_indirect_branch_register)
-+ if (TARGET_X32 || TARGET_INDIRECT_BRANCH_REGISTER)
- operands[0] = convert_memory_address (word_mode, operands[0]);
- cfun->machine->has_local_indirect_jump = true;
- })
-@@ -12029,7 +12029,10 @@
- (match_operand:SI 0 "register_no_elim_operand" "U")
- (match_operand:SI 1 "GOT32_symbol_operand"))))
- (match_operand 2))]
-- "!TARGET_MACHO && !TARGET_64BIT && SIBLING_CALL_P (insn)"
-+ "!TARGET_MACHO
-+ && !TARGET_64BIT
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
-+ && SIBLING_CALL_P (insn)"
- {
- rtx fnaddr = gen_rtx_PLUS (Pmode, operands[0], operands[1]);
- fnaddr = gen_const_mem (Pmode, fnaddr);
-@@ -12048,7 +12051,7 @@
- [(call (mem:QI (match_operand:W 0 "memory_operand" "m"))
- (match_operand 1))
- (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
-- "!TARGET_X32 && !ix86_indirect_branch_register"
-+ "!TARGET_X32 && !TARGET_INDIRECT_BRANCH_REGISTER"
- "* return ix86_output_call_insn (insn, operands[0]);"
- [(set_attr "type" "call")])
-
-@@ -12058,7 +12061,7 @@
- (call (mem:QI (match_dup 0))
- (match_operand 3))]
- "!TARGET_X32
-- && !ix86_indirect_branch_register
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
- && SIBLING_CALL_P (peep2_next_insn (1))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
-@@ -12073,7 +12076,7 @@
- (call (mem:QI (match_dup 0))
- (match_operand 3))]
- "!TARGET_X32
-- && !ix86_indirect_branch_register
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
- && SIBLING_CALL_P (peep2_next_insn (2))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
-@@ -12171,7 +12174,7 @@
- (match_operand:W 1 "memory_operand"))
- (set (pc) (match_dup 0))]
- "!TARGET_X32
-- && !ix86_indirect_branch_register
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
- && peep2_reg_dead_p (2, operands[0])"
- [(set (pc) (match_dup 1))])
-
-@@ -12229,7 +12232,10 @@
- (match_operand:SI 1 "register_no_elim_operand" "U")
- (match_operand:SI 2 "GOT32_symbol_operand"))))
- (match_operand 3)))]
-- "!TARGET_MACHO && !TARGET_64BIT && SIBLING_CALL_P (insn)"
-+ "!TARGET_MACHO
-+ && !TARGET_64BIT
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
-+ && SIBLING_CALL_P (insn)"
- {
- rtx fnaddr = gen_rtx_PLUS (Pmode, operands[1], operands[2]);
- fnaddr = gen_const_mem (Pmode, fnaddr);
-@@ -12250,7 +12256,7 @@
- (call (mem:QI (match_operand:W 1 "memory_operand" "m"))
- (match_operand 2)))
- (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
-- "!TARGET_X32 && !ix86_indirect_branch_register"
-+ "!TARGET_X32 && !TARGET_INDIRECT_BRANCH_REGISTER"
- "* return ix86_output_call_insn (insn, operands[1]);"
- [(set_attr "type" "callv")])
-
-@@ -12261,7 +12267,7 @@
- (call (mem:QI (match_dup 0))
- (match_operand 3)))]
- "!TARGET_X32
-- && !ix86_indirect_branch_register
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
- && SIBLING_CALL_P (peep2_next_insn (1))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
-@@ -12278,7 +12284,7 @@
- (call (mem:QI (match_dup 0))
- (match_operand 3)))]
- "!TARGET_X32
-- && !ix86_indirect_branch_register
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
- && SIBLING_CALL_P (peep2_next_insn (2))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
-diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
-index d1f0a7d..5f8a98f 100644
---- a/gcc/config/i386/predicates.md
-+++ b/gcc/config/i386/predicates.md
-@@ -593,7 +593,7 @@
- ;; Test for a valid operand for indirect branch.
- (define_predicate "indirect_branch_operand"
- (ior (match_operand 0 "register_operand")
-- (and (not (match_test "ix86_indirect_branch_register"))
-+ (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- (not (match_test "TARGET_X32"))
- (match_operand 0 "memory_operand"))))
-
-@@ -637,7 +637,7 @@
- (ior (match_test "constant_call_address_operand
- (op, mode == VOIDmode ? mode : Pmode)")
- (match_operand 0 "call_register_no_elim_operand")
-- (and (not (match_test "ix86_indirect_branch_register"))
-+ (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- (ior (and (not (match_test "TARGET_X32"))
- (match_operand 0 "memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
-@@ -648,7 +648,7 @@
- (ior (match_test "constant_call_address_operand
- (op, mode == VOIDmode ? mode : Pmode)")
- (match_operand 0 "register_no_elim_operand")
-- (and (not (match_test "ix86_indirect_branch_register"))
-+ (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- (ior (and (not (match_test "TARGET_X32"))
- (match_operand 0 "sibcall_memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-index 60d0988..6e94d2c 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-@@ -11,9 +11,8 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-index aac7516..3c46707 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-@@ -11,9 +11,8 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-index 9e24a38..2c7fb52 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-@@ -12,9 +12,8 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-index 127b5d9..0d3f895 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-@@ -12,9 +12,8 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-index fcaa18d..fb26c00 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-@@ -9,8 +9,10 @@ foo (void)
- bar ();
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-index e464928..aa03fbd 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-@@ -10,9 +10,13 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target x32 } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 { target x32 } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler {\tpause} } } */
- /* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-index 17c2d0f..3c72036 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-@@ -35,9 +35,8 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-index 9194ccf..7106407 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-@@ -14,9 +14,8 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-index e51f261..27c7e5b 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-@@ -12,9 +12,8 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-index 4aeec18..89a2bac 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-@@ -14,10 +14,9 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler {\tpause} } } */
- /* { dg-final { scan-assembler {\tlfence} } } */
- /* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-index ac0e599..3eb83c3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-@@ -13,10 +13,9 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler {\tpause} } } */
- /* { dg-final { scan-assembler {\tlfence} } } */
- /* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-index 573cf1e..0098dd1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-@@ -14,9 +14,8 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-index b2b37fc..ece8de1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-@@ -13,9 +13,8 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-index 4a43e19..d53fc88 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-@@ -36,9 +36,8 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-index ac84ab6..73d16ba 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-@@ -10,9 +10,9 @@ foo (void)
- dispatch (buf);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd_rax" { target lp64 } } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_eax" { target ia32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd ret" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-index ce655e8..856751a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-@@ -11,10 +11,8 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_(r|e)ax" } } */
- /* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd ret" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-index d34485a..42312f6 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-@@ -10,8 +10,9 @@ foo (void)
- bar (buf);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd_rax" { target lp64 } } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_eax" { target ia32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd ret" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-index 0e19830..c8ca102 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-@@ -11,10 +11,9 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
--/* { dg-final { scan-assembler-times "bnd call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-times "bnd call\[ \t\]*\.LIND" 1 } } */
- /* { dg-final { scan-assembler "bnd ret" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
- /* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-index 579441f..c09dd0a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-@@ -11,9 +11,8 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-index c92e6f2..826425a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-@@ -11,9 +11,8 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-index d9964c2..3856268 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-@@ -12,9 +12,8 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-index d4dca4d..1ae49b1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-@@ -12,9 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-index 5c07e02..5328239 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-@@ -9,8 +9,10 @@ foo (void)
- bar ();
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-index 3eb4406..8ae4348 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-@@ -10,8 +10,8 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-index aece938..2b9a33e 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-@@ -35,9 +35,8 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-index 3aba5e8..869d904 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-index 0f0181d..c5c16ed 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-index 2eef6f3..4a63ebe 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-index e825a10..a395ffc 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-index c6d77e1..21cbfd3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-@@ -9,7 +9,8 @@ foo (void)
- bar ();
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-index 6454827..d1300f1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-@@ -10,7 +10,8 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-index c67066c..ea00924 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-@@ -35,8 +35,8 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-index e6fea84..af9023a 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-@@ -15,9 +15,6 @@ foo (void)
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
- /* { dg-final { scan-assembler-times {\tpause} 2 } } */
- /* { dg-final { scan-assembler-times {\tlfence} 2 } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-index e239ec4..ba467c5 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-@@ -15,9 +15,6 @@ foo (void)
- /* { dg-final { scan-assembler-times {\tlfence} 1 } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-index fa31813..43e57ca 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-@@ -15,8 +15,6 @@ foo (void)
- /* { dg-final { scan-assembler-times {\tlfence} 1 } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-index fd5b41f..55f156c 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-@@ -14,9 +14,8 @@ foo (void)
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
- /* { dg-final { scan-assembler-times {\tpause} 2 } } */
- /* { dg-final { scan-assembler-times {\tlfence} 2 } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 3 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 3 } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler-not "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-index d606373..1c79043 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-@@ -16,7 +16,6 @@ foo (void)
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?bar" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-index 75e45e2..58aba31 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-@@ -16,7 +16,6 @@ foo (void)
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
- /* { dg-final { scan-assembler-times {\tlfence} 1 } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?bar" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-index d1db41c..d2df8b8 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-@@ -14,11 +14,8 @@ foo (void)
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "__x86_indirect_thunk:" } } */
--/* { dg-final { scan-assembler-times {\tpause} 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times {\tlfence} 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times {\tpause} 2 { target { x32 } } } } */
--/* { dg-final { scan-assembler-times {\tlfence} 2 { target { x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?bar" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler-times {\tpause} 2 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 2 } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch
deleted file mode 100644
index 47bcd8e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 0fa7102d76376b27ae4bbc10848600aac6ed71d2 Mon Sep 17 00:00:00 2001
-From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 17 Jul 2017 19:41:08 +0000
-Subject: [PATCH] Backported from mainline 2017-07-14 Jakub
- Jelinek <jakub@redhat.com>
-
- PR sanitizer/81066
- * sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969.
- * sanitizer_common/sanitizer_linux.cc: Likewise.
- * sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise.
- * tsan/tsan_platform_linux.cc: Likewise.
-
-[Romain cherry-pick on gcc-6-branch from gcc-7-branch]
-Signed-off-by: Romain Naour <romain.naour@gmail.com>
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@250287 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
----
- libsanitizer/sanitizer_common/sanitizer_linux.cc | 3 +--
- libsanitizer/sanitizer_common/sanitizer_linux.h | 4 +---
- libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc | 2 +-
- libsanitizer/tsan/tsan_platform_linux.cc | 2 +-
- 4 files changed, 4 insertions(+), 7 deletions(-)
-
-diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc
-index 2cefa20..223d9c6 100644
---- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
-+++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc
-@@ -546,8 +546,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
- }
- #endif
-
--uptr internal_sigaltstack(const struct sigaltstack *ss,
-- struct sigaltstack *oss) {
-+uptr internal_sigaltstack(const void *ss, void *oss) {
- return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
- }
-
-diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h
-index 4497702..1594058 100644
---- a/libsanitizer/sanitizer_common/sanitizer_linux.h
-+++ b/libsanitizer/sanitizer_common/sanitizer_linux.h
-@@ -19,7 +19,6 @@
- #include "sanitizer_platform_limits_posix.h"
-
- struct link_map; // Opaque type returned by dlopen().
--struct sigaltstack;
-
- namespace __sanitizer {
- // Dirent structure for getdents(). Note that this structure is different from
-@@ -28,8 +27,7 @@ struct linux_dirent;
-
- // Syscall wrappers.
- uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
--uptr internal_sigaltstack(const struct sigaltstack* ss,
-- struct sigaltstack* oss);
-+uptr internal_sigaltstack(const void* ss, void* oss);
- uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
- __sanitizer_sigset_t *oldset);
- void internal_sigfillset(__sanitizer_sigset_t *set);
-diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
-index c919e4f..014162af 100644
---- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
-+++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
-@@ -267,7 +267,7 @@ static int TracerThread(void* argument) {
-
- // Alternate stack for signal handling.
- InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
-- struct sigaltstack handler_stack;
-+ stack_t handler_stack;
- internal_memset(&handler_stack, 0, sizeof(handler_stack));
- handler_stack.ss_sp = handler_stack_memory.data();
- handler_stack.ss_size = kHandlerStackSize;
-diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
-index 09cec5f..908f4fe 100644
---- a/libsanitizer/tsan/tsan_platform_linux.cc
-+++ b/libsanitizer/tsan/tsan_platform_linux.cc
-@@ -291,7 +291,7 @@ bool IsGlobalVar(uptr addr) {
- int ExtractResolvFDs(void *state, int *fds, int nfd) {
- #if SANITIZER_LINUX
- int cnt = 0;
-- __res_state *statp = (__res_state*)state;
-+ struct __res_state *statp = (struct __res_state*)state;
- for (int i = 0; i < MAXNS && cnt < nfd; i++) {
- if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
- fds[cnt++] = statp->_u._ext.nssocks[i];
---
-2.9.4
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/CVE-2016-6131.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/CVE-2016-6131.patch
deleted file mode 100644
index 3cdbb2d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/CVE-2016-6131.patch
+++ /dev/null
@@ -1,223 +0,0 @@
-From 59a0e4bd8391962f62600ae3ac95ab0fba74d464 Mon Sep 17 00:00:00 2001
-From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 4 Aug 2016 16:53:18 +0000
-Subject: [PATCH] Fix for PR71696 in Libiberty Demangler
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-[BZ #71696] -- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71696
-
-2016-08-04 Marcel Böhme <boehme.marcel@gmail.com>
-
- PR c++/71696
- * cplus-dem.c: Prevent infinite recursion when there is a cycle
- in the referencing of remembered mangled types.
- (work_stuff): New stack to keep track of the remembered mangled
- types that are currently being processed.
- (push_processed_type): New method to push currently processed
- remembered type onto the stack.
- (pop_processed_type): New method to pop currently processed
- remembered type from the stack.
- (work_stuff_copy_to_from): Copy values of new variables.
- (delete_non_B_K_work_stuff): Free stack memory.
- (demangle_args): Push/Pop currently processed remembered type.
- (do_type): Do not demangle a cyclic reference and push/pop
- referenced remembered type.
-
-cherry-picked from commit of
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239143 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport [master]
-CVE: CVE-2016-6131
-Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
----
- libiberty/ChangeLog | 17 ++++++++
- libiberty/cplus-dem.c | 78 ++++++++++++++++++++++++++++++++---
- libiberty/testsuite/demangle-expected | 18 ++++++++
- 3 files changed, 108 insertions(+), 5 deletions(-)
-
-Index: gcc-6.4.0/libiberty/cplus-dem.c
-===================================================================
---- gcc-6.4.0.orig/libiberty/cplus-dem.c
-+++ gcc-6.4.0/libiberty/cplus-dem.c
-@@ -144,6 +144,9 @@ struct work_stuff
- string* previous_argument; /* The last function argument demangled. */
- int nrepeats; /* The number of times to repeat the previous
- argument. */
-+ int *proctypevec; /* Indices of currently processed remembered typevecs. */
-+ int proctypevec_size;
-+ int nproctypes;
- };
-
- #define PRINT_ANSI_QUALIFIERS (work -> options & DMGL_ANSI)
-@@ -435,6 +438,10 @@ iterate_demangle_function (struct work_s
-
- static void remember_type (struct work_stuff *, const char *, int);
-
-+static void push_processed_type (struct work_stuff *, int);
-+
-+static void pop_processed_type (struct work_stuff *);
-+
- static void remember_Btype (struct work_stuff *, const char *, int, int);
-
- static int register_Btype (struct work_stuff *);
-@@ -1301,6 +1308,10 @@ work_stuff_copy_to_from (struct work_stu
- memcpy (to->btypevec[i], from->btypevec[i], len);
- }
-
-+ if (from->proctypevec)
-+ to->proctypevec =
-+ XDUPVEC (int, from->proctypevec, from->proctypevec_size);
-+
- if (from->ntmpl_args)
- to->tmpl_argvec = XNEWVEC (char *, from->ntmpl_args);
-
-@@ -1329,11 +1340,17 @@ delete_non_B_K_work_stuff (struct work_s
- /* Discard the remembered types, if any. */
-
- forget_types (work);
-- if (work -> typevec != NULL)
-+ if (work->typevec != NULL)
- {
-- free ((char *) work -> typevec);
-- work -> typevec = NULL;
-- work -> typevec_size = 0;
-+ free ((char *) work->typevec);
-+ work->typevec = NULL;
-+ work->typevec_size = 0;
-+ }
-+ if (work->proctypevec != NULL)
-+ {
-+ free (work->proctypevec);
-+ work->proctypevec = NULL;
-+ work->proctypevec_size = 0;
- }
- if (work->tmpl_argvec)
- {
-@@ -3552,6 +3569,8 @@ static int
- do_type (struct work_stuff *work, const char **mangled, string *result)
- {
- int n;
-+ int i;
-+ int is_proctypevec;
- int done;
- int success;
- string decl;
-@@ -3564,6 +3583,7 @@ do_type (struct work_stuff *work, const
-
- done = 0;
- success = 1;
-+ is_proctypevec = 0;
- while (success && !done)
- {
- int member;
-@@ -3616,8 +3636,15 @@ do_type (struct work_stuff *work, const
- success = 0;
- }
- else
-+ for (i = 0; i < work->nproctypes; i++)
-+ if (work -> proctypevec [i] == n)
-+ success = 0;
-+
-+ if (success)
- {
-- remembered_type = work -> typevec[n];
-+ is_proctypevec = 1;
-+ push_processed_type (work, n);
-+ remembered_type = work->typevec[n];
- mangled = &remembered_type;
- }
- break;
-@@ -3840,6 +3867,9 @@ do_type (struct work_stuff *work, const
- string_delete (result);
- string_delete (&decl);
-
-+ if (is_proctypevec)
-+ pop_processed_type (work);
-+
- if (success)
- /* Assume an integral type, if we're not sure. */
- return (int) ((tk == tk_none) ? tk_integral : tk);
-@@ -4252,6 +4282,41 @@ do_arg (struct work_stuff *work, const c
- }
-
- static void
-+push_processed_type (struct work_stuff *work, int typevec_index)
-+{
-+ if (work->nproctypes >= work->proctypevec_size)
-+ {
-+ if (!work->proctypevec_size)
-+ {
-+ work->proctypevec_size = 4;
-+ work->proctypevec = XNEWVEC (int, work->proctypevec_size);
-+ }
-+ else
-+ {
-+ if (work->proctypevec_size < 16)
-+ /* Double when small. */
-+ work->proctypevec_size *= 2;
-+ else
-+ {
-+ /* Grow slower when large. */
-+ if (work->proctypevec_size > (INT_MAX / 3) * 2)
-+ xmalloc_failed (INT_MAX);
-+ work->proctypevec_size = (work->proctypevec_size * 3 / 2);
-+ }
-+ work->proctypevec
-+ = XRESIZEVEC (int, work->proctypevec, work->proctypevec_size);
-+ }
-+ }
-+ work->proctypevec [work->nproctypes++] = typevec_index;
-+}
-+
-+static void
-+pop_processed_type (struct work_stuff *work)
-+{
-+ work->nproctypes--;
-+}
-+
-+static void
- remember_type (struct work_stuff *work, const char *start, int len)
- {
- char *tem;
-@@ -4515,10 +4580,13 @@ demangle_args (struct work_stuff *work,
- {
- string_append (declp, ", ");
- }
-+ push_processed_type (work, t);
- if (!do_arg (work, &tem, &arg))
- {
-+ pop_processed_type (work);
- return (0);
- }
-+ pop_processed_type (work);
- if (PRINT_ARG_TYPES)
- {
- string_appends (declp, &arg);
-Index: gcc-6.4.0/libiberty/testsuite/demangle-expected
-===================================================================
---- gcc-6.4.0.orig/libiberty/testsuite/demangle-expected
-+++ gcc-6.4.0/libiberty/testsuite/demangle-expected
-@@ -4491,3 +4491,21 @@ void eat<int*, Foo()::{lambda(auto:1*, a
-
- _Z3eatIPiZ3BarIsEvvEUlPsPT_PT0_E0_EvRS3_RS5_
- void eat<int*, void Bar<short>()::{lambda(short*, auto:1*, auto:2*)#2}>(int*&, void Bar<short>()::{lambda(short*, auto:1*, auto:2*)#2}&)
-+#
-+# Tests write access violation PR70926
-+
-+0__Ot2m02R5T0000500000
-+0__Ot2m02R5T0000500000
-+#
-+
-+0__GT50000000000_
-+0__GT50000000000_
-+#
-+
-+__t2m05B500000000000000000_
-+__t2m05B500000000000000000_
-+#
-+# Tests stack overflow PR71696
-+
-+__10%0__S4_0T0T0
-+%0<>::%0(%0<>)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc
index 2dc3db8..d968c32 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc
@@ -10,8 +10,8 @@
FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-7.3:${FILE_DIRNAME}/gcc-7.3/backport:"
-DEPENDS =+ "mpfr gmp libmpc zlib"
-NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"
+DEPENDS =+ "mpfr gmp libmpc zlib flex-native"
+NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native"
LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
@@ -73,12 +73,12 @@
file://0047-sync-gcc-stddef.h-with-musl.patch \
file://0048-gcc-Enable-static-PIE.patch \
file://fix-segmentation-fault-precompiled-hdr.patch \
- file://0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch \
file://no-sse-fix-test-case-failures.patch \
${BACKPORTS} \
"
BACKPORTS = "\
file://0001-Fix-internal-compiler-error-in-testcase.patch \
+ file://0001-PR-rtl-optimization-83030.patch \
"
SRC_URI[md5sum] = "be2da21680f27624f3a87055c4ba5af2"
@@ -101,7 +101,7 @@
--disable-bootstrap \
--disable-libmudflap \
--with-system-zlib \
- --with-linker-hash-style=${LINKER_HASH_STYLE} \
+ ${@'--with-linker-hash-style=${LINKER_HASH_STYLE}' if '${LINKER_HASH_STYLE}' else ''} \
--enable-linker-build-id \
--with-ppl=no \
--with-cloog=no \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-PR-rtl-optimization-83030.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-PR-rtl-optimization-83030.patch
new file mode 100644
index 0000000..71f7988
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-PR-rtl-optimization-83030.patch
@@ -0,0 +1,272 @@
+From f5c4a9440f15ccf6775659910a2014a5494ee86e Mon Sep 17 00:00:00 2001
+From: ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 22 Nov 2017 21:43:22 +0000
+Subject: [PATCH] PR rtl-optimization/83030 * doc/rtl.texi (Flags
+ in an RTL Expression): Alphabetize, add entry for CROSSING_JUMP_P and
+ mention usage of 'jump' for JUMP_INSNs. (Insns): Delete entry for
+ REG_CROSSING_JUMP in register notes. * bb-reorder.c
+ (update_crossing_jump_flags): Do not test whether the CROSSING_JUMP_P flag
+ is already set before setting it. * cfgrtl.c (fixup_partition_crossing):
+ Likewise. * reorg.c (relax_delay_slots): Do not consider a
+ CROSSING_JUMP_P insn as useless.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255083 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport
+
+This patch removes changes to Changelog from the original upstream patch.
+This will help us avoid conflicts.
+
+Original backport to GCC 7.x by Amruta Pawar <Amruta.Pawar@kpit.com>
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+---
+ gcc/bb-reorder.c | 5 +--
+ gcc/cfgrtl.c | 3 +-
+ gcc/doc/rtl.texi | 129 ++++++++++++++++++++++++++++---------------------------
+ gcc/reorg.c | 7 +--
+ 5 files changed, 84 insertions(+), 72 deletions(-)
+
+diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
+index 55e6dc6..794283c 100644
+--- a/gcc/bb-reorder.c
++++ b/gcc/bb-reorder.c
+@@ -2236,10 +2236,7 @@ update_crossing_jump_flags (void)
+ FOR_EACH_EDGE (e, ei, bb->succs)
+ if (e->flags & EDGE_CROSSING)
+ {
+- if (JUMP_P (BB_END (bb))
+- /* Some flags were added during fix_up_fall_thru_edges, via
+- force_nonfallthru_and_redirect. */
+- && !CROSSING_JUMP_P (BB_END (bb)))
++ if (JUMP_P (BB_END (bb)))
+ CROSSING_JUMP_P (BB_END (bb)) = 1;
+ break;
+ }
+diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
+index d6e5ac0..a2ad075 100644
+--- a/gcc/cfgrtl.c
++++ b/gcc/cfgrtl.c
+@@ -1334,8 +1334,7 @@ fixup_partition_crossing (edge e)
+ if (BB_PARTITION (e->src) != BB_PARTITION (e->dest))
+ {
+ e->flags |= EDGE_CROSSING;
+- if (JUMP_P (BB_END (e->src))
+- && !CROSSING_JUMP_P (BB_END (e->src)))
++ if (JUMP_P (BB_END (e->src)))
+ CROSSING_JUMP_P (BB_END (e->src)) = 1;
+ }
+ else if (BB_PARTITION (e->src) == BB_PARTITION (e->dest))
+diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi
+index 21524f5..a58eedc 100644
+--- a/gcc/doc/rtl.texi
++++ b/gcc/doc/rtl.texi
+@@ -565,6 +565,16 @@ that are used in certain types of expression. Most often they
+ are accessed with the following macros, which expand into lvalues.
+
+ @table @code
++@findex CROSSING_JUMP_P
++@cindex @code{jump_insn} and @samp{/j}
++@item CROSSING_JUMP_P (@var{x})
++Nonzero in a @code{jump_insn} if it crosses between hot and cold sections,
++which could potentially be very far apart in the executable. The presence
++of this flag indicates to other optimizations that this branching instruction
++should not be ``collapsed'' into a simpler branching construct. It is used
++when the optimization to partition basic blocks into hot and cold sections
++is turned on.
++
+ @findex CONSTANT_POOL_ADDRESS_P
+ @cindex @code{symbol_ref} and @samp{/u}
+ @cindex @code{unchanging}, in @code{symbol_ref}
+@@ -577,37 +587,6 @@ In either case GCC assumes these addresses can be addressed directly,
+ perhaps with the help of base registers.
+ Stored in the @code{unchanging} field and printed as @samp{/u}.
+
+-@findex RTL_CONST_CALL_P
+-@cindex @code{call_insn} and @samp{/u}
+-@cindex @code{unchanging}, in @code{call_insn}
+-@item RTL_CONST_CALL_P (@var{x})
+-In a @code{call_insn} indicates that the insn represents a call to a
+-const function. Stored in the @code{unchanging} field and printed as
+-@samp{/u}.
+-
+-@findex RTL_PURE_CALL_P
+-@cindex @code{call_insn} and @samp{/i}
+-@cindex @code{return_val}, in @code{call_insn}
+-@item RTL_PURE_CALL_P (@var{x})
+-In a @code{call_insn} indicates that the insn represents a call to a
+-pure function. Stored in the @code{return_val} field and printed as
+-@samp{/i}.
+-
+-@findex RTL_CONST_OR_PURE_CALL_P
+-@cindex @code{call_insn} and @samp{/u} or @samp{/i}
+-@item RTL_CONST_OR_PURE_CALL_P (@var{x})
+-In a @code{call_insn}, true if @code{RTL_CONST_CALL_P} or
+-@code{RTL_PURE_CALL_P} is true.
+-
+-@findex RTL_LOOPING_CONST_OR_PURE_CALL_P
+-@cindex @code{call_insn} and @samp{/c}
+-@cindex @code{call}, in @code{call_insn}
+-@item RTL_LOOPING_CONST_OR_PURE_CALL_P (@var{x})
+-In a @code{call_insn} indicates that the insn represents a possibly
+-infinite looping call to a const or pure function. Stored in the
+-@code{call} field and printed as @samp{/c}. Only true if one of
+-@code{RTL_CONST_CALL_P} or @code{RTL_PURE_CALL_P} is true.
+-
+ @findex INSN_ANNULLED_BRANCH_P
+ @cindex @code{jump_insn} and @samp{/u}
+ @cindex @code{call_insn} and @samp{/u}
+@@ -702,6 +681,29 @@ Stored in the @code{call} field and printed as @samp{/c}.
+ Nonzero in a @code{mem} if the memory reference holds a pointer.
+ Stored in the @code{frame_related} field and printed as @samp{/f}.
+
++@findex MEM_READONLY_P
++@cindex @code{mem} and @samp{/u}
++@cindex @code{unchanging}, in @code{mem}
++@item MEM_READONLY_P (@var{x})
++Nonzero in a @code{mem}, if the memory is statically allocated and read-only.
++
++Read-only in this context means never modified during the lifetime of the
++program, not necessarily in ROM or in write-disabled pages. A common
++example of the later is a shared library's global offset table. This
++table is initialized by the runtime loader, so the memory is technically
++writable, but after control is transferred from the runtime loader to the
++application, this memory will never be subsequently modified.
++
++Stored in the @code{unchanging} field and printed as @samp{/u}.
++
++@findex PREFETCH_SCHEDULE_BARRIER_P
++@cindex @code{prefetch} and @samp{/v}
++@cindex @code{volatile}, in @code{prefetch}
++@item PREFETCH_SCHEDULE_BARRIER_P (@var{x})
++In a @code{prefetch}, indicates that the prefetch is a scheduling barrier.
++No other INSNs will be moved over it.
++Stored in the @code{volatil} field and printed as @samp{/v}.
++
+ @findex REG_FUNCTION_VALUE_P
+ @cindex @code{reg} and @samp{/i}
+ @cindex @code{return_val}, in @code{reg}
+@@ -731,6 +733,37 @@ The same hard register may be used also for collecting the values of
+ functions called by this one, but @code{REG_FUNCTION_VALUE_P} is zero
+ in this kind of use.
+
++@findex RTL_CONST_CALL_P
++@cindex @code{call_insn} and @samp{/u}
++@cindex @code{unchanging}, in @code{call_insn}
++@item RTL_CONST_CALL_P (@var{x})
++In a @code{call_insn} indicates that the insn represents a call to a
++const function. Stored in the @code{unchanging} field and printed as
++@samp{/u}.
++
++@findex RTL_PURE_CALL_P
++@cindex @code{call_insn} and @samp{/i}
++@cindex @code{return_val}, in @code{call_insn}
++@item RTL_PURE_CALL_P (@var{x})
++In a @code{call_insn} indicates that the insn represents a call to a
++pure function. Stored in the @code{return_val} field and printed as
++@samp{/i}.
++
++@findex RTL_CONST_OR_PURE_CALL_P
++@cindex @code{call_insn} and @samp{/u} or @samp{/i}
++@item RTL_CONST_OR_PURE_CALL_P (@var{x})
++In a @code{call_insn}, true if @code{RTL_CONST_CALL_P} or
++@code{RTL_PURE_CALL_P} is true.
++
++@findex RTL_LOOPING_CONST_OR_PURE_CALL_P
++@cindex @code{call_insn} and @samp{/c}
++@cindex @code{call}, in @code{call_insn}
++@item RTL_LOOPING_CONST_OR_PURE_CALL_P (@var{x})
++In a @code{call_insn} indicates that the insn represents a possibly
++infinite looping call to a const or pure function. Stored in the
++@code{call} field and printed as @samp{/c}. Only true if one of
++@code{RTL_CONST_CALL_P} or @code{RTL_PURE_CALL_P} is true.
++
+ @findex RTX_FRAME_RELATED_P
+ @cindex @code{insn} and @samp{/f}
+ @cindex @code{call_insn} and @samp{/f}
+@@ -765,21 +798,6 @@ computation performed by this instruction, i.e., one that
+ This flag is required for exception handling support on targets with RTL
+ prologues.
+
+-@findex MEM_READONLY_P
+-@cindex @code{mem} and @samp{/u}
+-@cindex @code{unchanging}, in @code{mem}
+-@item MEM_READONLY_P (@var{x})
+-Nonzero in a @code{mem}, if the memory is statically allocated and read-only.
+-
+-Read-only in this context means never modified during the lifetime of the
+-program, not necessarily in ROM or in write-disabled pages. A common
+-example of the later is a shared library's global offset table. This
+-table is initialized by the runtime loader, so the memory is technically
+-writable, but after control is transferred from the runtime loader to the
+-application, this memory will never be subsequently modified.
+-
+-Stored in the @code{unchanging} field and printed as @samp{/u}.
+-
+ @findex SCHED_GROUP_P
+ @cindex @code{insn} and @samp{/s}
+ @cindex @code{call_insn} and @samp{/s}
+@@ -879,14 +897,6 @@ Stored in the @code{volatil} field and printed as @samp{/v}.
+ Most uses of @code{SYMBOL_REF_FLAG} are historic and may be subsumed
+ by @code{SYMBOL_REF_FLAGS}. Certainly use of @code{SYMBOL_REF_FLAGS}
+ is mandatory if the target requires more than one bit of storage.
+-
+-@findex PREFETCH_SCHEDULE_BARRIER_P
+-@cindex @code{prefetch} and @samp{/v}
+-@cindex @code{volatile}, in @code{prefetch}
+-@item PREFETCH_SCHEDULE_BARRIER_P (@var{x})
+-In a @code{prefetch}, indicates that the prefetch is a scheduling barrier.
+-No other INSNs will be moved over it.
+-Stored in the @code{volatil} field and printed as @samp{/v}.
+ @end table
+
+ These are the fields to which the above macros refer:
+@@ -974,6 +985,8 @@ In a @code{set}, 1 means it is for a return.
+
+ In a @code{call_insn}, 1 means it is a sibling call.
+
++In a @code{jump_insn}, 1 means it is a crossing jump.
++
+ In an RTL dump, this flag is represented as @samp{/j}.
+
+ @findex unchanging
+@@ -3887,16 +3900,6 @@ multiple targets; the last label in the insn (in the highest numbered
+ insn-field) goes into the @code{JUMP_LABEL} field and does not have a
+ @code{REG_LABEL_TARGET} note. @xref{Insns, JUMP_LABEL}.
+
+-@findex REG_CROSSING_JUMP
+-@item REG_CROSSING_JUMP
+-This insn is a branching instruction (either an unconditional jump or
+-an indirect jump) which crosses between hot and cold sections, which
+-could potentially be very far apart in the executable. The presence
+-of this note indicates to other optimizations that this branching
+-instruction should not be ``collapsed'' into a simpler branching
+-construct. It is used when the optimization to partition basic blocks
+-into hot and cold sections is turned on.
+-
+ @findex REG_SETJMP
+ @item REG_SETJMP
+ Appears attached to each @code{CALL_INSN} to @code{setjmp} or a
+diff --git a/gcc/reorg.c b/gcc/reorg.c
+index 5914af6..77f3fe7 100644
+--- a/gcc/reorg.c
++++ b/gcc/reorg.c
+@@ -3360,10 +3360,11 @@ relax_delay_slots (rtx_insn *first)
+ }
+
+ /* See if we have a simple (conditional) jump that is useless. */
+- if (! INSN_ANNULLED_BRANCH_P (delay_jump_insn)
+- && ! condjump_in_parallel_p (delay_jump_insn)
++ if (!CROSSING_JUMP_P (delay_jump_insn)
++ && !INSN_ANNULLED_BRANCH_P (delay_jump_insn)
++ && !condjump_in_parallel_p (delay_jump_insn)
+ && prev_active_insn (as_a<rtx_insn *> (target_label)) == insn
+- && ! BARRIER_P (prev_nonnote_insn (as_a<rtx_insn *> (target_label)))
++ && !BARRIER_P (prev_nonnote_insn (as_a<rtx_insn *> (target_label)))
+ /* If the last insn in the delay slot sets CC0 for some insn,
+ various code assumes that it is in a delay slot. We could
+ put it back where it belonged and delete the register notes,
+--
+1.8.5.6
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch
deleted file mode 100644
index 5a14d04..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 16210e6270e200cd4892a90ecef608906be3a130 Mon Sep 17 00:00:00 2001
-From: Kito Cheng <kito.cheng@gmail.com>
-Date: Thu, 4 May 2017 02:11:13 +0800
-Subject: [PATCH] RISC-V: Handle non-legitimate address in
- riscv_legitimize_move
-
-GCC may generate non-legitimate address due to we allow some
-load/store with non-legitimate address in pic.md.
-
- 2017-05-12 Kito Cheng <kito.cheng@gmail.com>
-
- * config/riscv/riscv.c (riscv_legitimize_move): Handle
- non-legitimate address.
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- gcc/ChangeLog | 5 +++++
- gcc/config/riscv/riscv.c | 16 ++++++++++++++++
- 2 files changed, 21 insertions(+)
-
-diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c
-index f7fec4bfcf8..d519be1659a 100644
---- a/gcc/config/riscv/riscv.c
-+++ b/gcc/config/riscv/riscv.c
-@@ -1385,6 +1385,22 @@ riscv_legitimize_move (enum machine_mode mode, rtx dest, rtx src)
- return true;
- }
-
-+ /* RISC-V GCC may generate non-legitimate address due to we provide some
-+ pattern for optimize access PIC local symbol and it's make GCC generate
-+ unrecognizable instruction during optmizing. */
-+
-+ if (MEM_P (dest) && !riscv_legitimate_address_p (mode, XEXP (dest, 0),
-+ reload_completed))
-+ {
-+ XEXP (dest, 0) = riscv_force_address (XEXP (dest, 0), mode);
-+ }
-+
-+ if (MEM_P (src) && !riscv_legitimate_address_p (mode, XEXP (src, 0),
-+ reload_completed))
-+ {
-+ XEXP (src, 0) = riscv_force_address (XEXP (src, 0), mode);
-+ }
-+
- return false;
- }
-
---
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 6d77620..bdd6f7e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -3,7 +3,7 @@
SUMMARY = "GNU cc and gcc C compilers (cross-canadian for ${TARGET_ARCH} target)"
PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}"
-DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext flex-native"
GCCMULTILIB = "--enable-multilib"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_6.4.bb
deleted file mode 100644
index bf53c5c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_6.4.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-cross-canadian.inc
-
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_6.4.bb
deleted file mode 100644
index 4c73e5c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_6.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-cross_${PV}.bb
-require gcc-cross-initial.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_6.4.bb
deleted file mode 100644
index b43cca0..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_6.4.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-cross.inc
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.4.bb
deleted file mode 100644
index fd90e11..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.4.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-cross-initial_${PV}.bb
-require gcc-crosssdk-initial.inc
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_6.4.bb
deleted file mode 100644
index 40a6c4f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_6.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-cross_${PV}.bb
-require gcc-crosssdk.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc
index d3d4bd3..7629fa5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -34,6 +34,18 @@
# libmudflap
# libgfortran needs separate recipe due to libquadmath dependency
+SLIB = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
+SLIB_NEW = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
+
+DEBUG_PREFIX_MAP_class-target = " \
+ -fdebug-prefix-map=${WORKDIR}/recipe-sysroot= \
+ -fdebug-prefix-map=${WORKDIR}/recipe-sysroot-native= \
+ -fdebug-prefix-map=${SLIB}=${SLIB_NEW} \
+ -fdebug-prefix-map=${SLIB}/include=${SLIB_NEW}/libstdc++-v3/../include \
+ -fdebug-prefix-map=${SLIB}/libiberty=${SLIB_NEW}/libstdc++-v3/../libiberty \
+ -fdebug-prefix-map=${B}=${SLIB_NEW} \
+ "
+
do_configure () {
export CXX="${CXX} -nostdinc++ -nostdlib++"
for d in libgcc ${RUNTIMETARGET}; do
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_6.4.bb
deleted file mode 100644
index 8f31e77..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_6.4.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-runtime.inc
-
-FILES_libgomp-dev += "\
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \
-"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
index 3183b29..3b7e002 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -61,15 +61,19 @@
RDEPENDS_liblsan-dev += "${PN}"
RDEPENDS_libtsan-dev += "${PN}"
RRECOMMENDS_${PN} += "libasan libubsan"
-RRECOMMENDS_${PN}_append_x86-64 = " liblsan libtsan"
RRECOMMENDS_${PN}_append_x86 = " liblsan"
+RRECOMMENDS_${PN}_append_x86-64 = " liblsan libtsan"
+RRECOMMENDS_${PN}_append_powerpc64 = " liblsan libtsan"
+RRECOMMENDS_${PN}_append_aarch64 = " liblsan libtsan"
do_package_write_ipk[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
do_package_write_deb[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
do_package_write_rpm[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
-# MIPS, aarch64, and SPARC are broken.
-COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm).*-linux'
+# Only x86, powerpc, sparc, s390, arm, and aarch64 are supported
+COMPATIBLE_HOST = '(x86_64|i.86|powerpc|sparc|s390|arm|aarch64).*-linux'
+# musl is currently broken entirely
+COMPATIBLE_HOST_libc-musl = 'null'
FILES_libasan += "${libdir}/libasan.so.*"
FILES_libasan-dev += "\
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_6.4.bb
deleted file mode 100644
index 601f666..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_6.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-sanitizers.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_6.4.bb
deleted file mode 100644
index b890fa3..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_6.4.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require recipes-devtools/gcc/gcc-source.inc
-
-EXCLUDE_FROM_WORLD = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_6.4.bb
deleted file mode 100644
index 2c618df..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_6.4.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-target.inc
-
-# Building with thumb enabled on armv4t fails with
-# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs
-# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output
-ARM_INSTRUCTION_SET_armv4 = "arm"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_6.4.bb
deleted file mode 100644
index 19f253f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_6.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require libgcc-initial.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc
index 1500fb5..5f1dff6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc
@@ -28,7 +28,7 @@
FILES_${PN}-dev = "\
${base_libdir}/libgcc*.so \
- ${@base_conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
+ ${@oe.utils.conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
${libdir}/${TARGET_SYS}/${BINV}* \
${libdir}/${TARGET_ARCH}${TARGET_VENDOR}* \
"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_6.4.bb
deleted file mode 100644
index a5152f2..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_6.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require libgcc.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc
index 5f5d4af..0523764 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc
@@ -6,22 +6,28 @@
"
do_configure () {
- rm -rf ${B}/${TARGET_SYS}/libgfortran/
- mkdir -p ${B}/${TARGET_SYS}/libgfortran/
- cd ${B}/${TARGET_SYS}/libgfortran/
- chmod a+x ${S}/libgfortran/configure
- relpath=${@os.path.relpath("${S}/libgfortran", "${B}/${TARGET_SYS}/libgfortran")}
- $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
- # Easiest way to stop bad RPATHs getting into the library since we have a
- # broken libtool here
- sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/${TARGET_SYS}/libgfortran/libtool
+ for target in libbacktrace libgfortran
+ do
+ rm -rf ${B}/${TARGET_SYS}/$target/
+ mkdir -p ${B}/${TARGET_SYS}/$target/
+ cd ${B}/${TARGET_SYS}/$target/
+ chmod a+x ${S}/$target/configure
+ relpath=${@os.path.relpath("${S}", "${B}/${TARGET_SYS}")}
+ ../$relpath/$target/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+ # Easiest way to stop bad RPATHs getting into the library since we have a
+ # broken libtool here
+ sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/${TARGET_SYS}/$target/libtool
+ done
}
EXTRACONFFUNCS += "extract_stashed_builddir"
do_configure[depends] += "${COMPILERDEP}"
do_compile () {
- cd ${B}/${TARGET_SYS}/libgfortran/
- oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/libgfortran/
+ for target in libbacktrace libgfortran
+ do
+ cd ${B}/${TARGET_SYS}/$target/
+ oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$target/
+ done
}
do_install () {
@@ -67,5 +73,5 @@
python __anonymous () {
f = d.getVar("FORTRAN")
if "fortran" not in f:
- raise bb.parse.SkipPackage("libgfortran needs fortran support to be enabled in the compiler")
+ raise bb.parse.SkipRecipe("libgfortran needs fortran support to be enabled in the compiler")
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_6.4.bb
deleted file mode 100644
index 71dd8b4..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_6.4.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require libgfortran.inc
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.1.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.1.inc
new file mode 100644
index 0000000..4a5299b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.1.inc
@@ -0,0 +1,24 @@
+LICENSE = "GPLv2 & GPLv3 & LGPLv2 & LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
+
+SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
+ file://0001-include-sys-types.h-for-mode_t.patch \
+ file://0002-make-man-install-relative-to-DESTDIR.patch \
+ file://0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \
+ file://0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \
+ file://0005-Add-support-for-Renesas-SH-sh4-architecture.patch \
+ file://0006-Dont-disable-libreadline.a-when-using-disable-static.patch \
+ file://0007-use-asm-sgidefs.h.patch \
+ file://0008-Use-exorted-definitions-of-SIGRTMIN.patch \
+ file://0009-Change-order-of-CFLAGS.patch \
+ file://0010-resolve-restrict-keyword-conflict.patch \
+ file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \
+ file://0012-Unbreak-GDBserver-build-for-x32.patch \
+ file://gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \
+"
+SRC_URI[md5sum] = "48cac527e6f3018b865ece021e9723ac"
+SRC_URI[sha256sum] = "3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.inc
deleted file mode 100644
index 227abd9..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.inc
+++ /dev/null
@@ -1,23 +0,0 @@
-LICENSE = "GPLv2 & GPLv3 & LGPLv2 & LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
- file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
-
-SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
- file://0001-include-sys-types.h-for-mode_t.patch \
- file://0002-make-man-install-relative-to-DESTDIR.patch \
- file://0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \
- file://0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \
- file://0005-Add-support-for-Renesas-SH-sh4-architecture.patch \
- file://0006-Dont-disable-libreadline.a-when-using-disable-static.patch \
- file://0007-use-asm-sgidefs.h.patch \
- file://0008-Use-exorted-definitions-of-SIGRTMIN.patch \
- file://0009-Change-order-of-CFLAGS.patch \
- file://0010-resolve-restrict-keyword-conflict.patch \
- file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \
- file://gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \
-"
-SRC_URI[md5sum] = "c3d35cd949084be53b92cc1e03485f88"
-SRC_URI[sha256sum] = "f6a24ffe4917e67014ef9273eb8b547cb96a13e5ca74895b06d683b391f3f4ee"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc
index 9164a2b..039577b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc
@@ -5,6 +5,7 @@
LTTNGUST = "lttng-ust"
LTTNGUST_aarch64 = ""
+LTTNGUST_riscv64 = ""
LTTNGUST_mipsarch = ""
LTTNGUST_sh4 = ""
LTTNGUST_libc-musl = ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index 3ff1989..4fc6747 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -13,9 +13,9 @@
# Overrides PACKAGECONFIG variables in gdb-common.inc
PACKAGECONFIG ??= "python readline"
PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python3, \
- nativesdk-python3-core nativesdk-python3-lang nativesdk-python3-re \
+ nativesdk-python3-core \
nativesdk-python3-codecs nativesdk-python3-netclient \
- nativesdk-python3-importlib"
+ "
PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,nativesdk-readline"
SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.1.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.1.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.1.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.1.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0012-Unbreak-GDBserver-build-for-x32.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0012-Unbreak-GDBserver-build-for-x32.patch
new file mode 100644
index 0000000..18a3ce3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0012-Unbreak-GDBserver-build-for-x32.patch
@@ -0,0 +1,101 @@
+From 3e1e401053ea5f02a9e9c65abddd31a03baa1bd1 Mon Sep 17 00:00:00 2001
+From: Yao Qi <yao.qi@linaro.org>
+Date: Fri, 29 Dec 2017 12:57:25 +0800
+Subject: [PATCH] Unbreak GDBserver build for x32
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When I verify my target description changes, I build GDB and GDBserver for
+x32, but it failed.
+
+/../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c
+../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c: In function ‘const target_desc* get_ipa_tdesc(int)’:
+../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:184:10: error: ‘X86_TDESC_AVX512’ was not declared in this scope
+ case X86_TDESC_AVX512:
+ ^
+../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:185:14: error: ‘tdesc_x32_avx512_linux’ was not declared in this scope
+ return tdesc_x32_avx512_linux;
+ ^
+../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c: In function ‘void initialize_low_tracepoint()’:
+../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:282:36: error: ‘init_registers_x32_avx512_linux’ was not declared in this scope
+ init_registers_x32_avx512_linux ();
+ ^
+
+ipa_x32_linux_regobj use to be there, but removed by
+22049425ce40324139be82d9a6ec518c46b65815 by mistake.
+
+gdb/gdbserver:
+
+2017-08-04 Yao Qi <yao.qi@linaro.org>
+
+ * configure.srv (ipa_x32_linux_regobj): New.
+ * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
+ instead of X86_TDESC_AVX512.
+ (initialize_low_tracepoint): Call
+ init_registers_x32_avx_avx512_linux.
+
+Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=f02fd7745d003d65fd3b981618e07b874b721d79]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ ChangeLog | 8 ++++++++
+ gdb/gdbserver/configure.srv | 1 +
+ gdb/gdbserver/linux-amd64-ipa.c | 6 +++---
+ 3 files changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index 4ac2d63..b5b8228 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,11 @@
++ 2017-08-04 Yao Qi <yao.qi@linaro.org>
++
++ * configure.srv (ipa_x32_linux_regobj): New.
++ * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
++ instead of X86_TDESC_AVX512.
++ (initialize_low_tracepoint): Call
++ init_registers_x32_avx_avx512_linux.
++
+ 2017-04-13 Andrew Jenner <andrew@codesourcery.com>
+
+ * config.sub: Sync with master version in config project.
+diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
+index d00d9e2..56951c8 100644
+--- a/gdb/gdbserver/configure.srv
++++ b/gdb/gdbserver/configure.srv
+@@ -31,6 +31,7 @@ srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o amd64-avx-avx512-linux.o
+
+ ipa_i386_linux_regobj="i386-linux-ipa.o i386-avx-linux-ipa.o i386-avx-mpx-linux-ipa.o i386-avx-avx512-linux-ipa.o i386-avx-mpx-avx512-pku-linux-ipa.o i386-mpx-linux-ipa.o i386-mmx-linux-ipa.o"
+ ipa_amd64_linux_regobj="amd64-linux-ipa.o amd64-avx-linux-ipa.o amd64-avx-mpx-linux-ipa.o amd64-avx-avx512-linux-ipa.o amd64-avx-mpx-avx512-pku-linux-ipa.o amd64-mpx-linux-ipa.o"
++ipa_x32_linux_regobj="x32-linux-ipa.o x32-avx-linux-ipa.o x32-avx-avx512-linux-ipa.o"
+ ipa_ppc_linux_regobj="powerpc-32l-ipa.o powerpc-altivec32l-ipa.o powerpc-cell32l-ipa.o powerpc-vsx32l-ipa.o powerpc-isa205-32l-ipa.o powerpc-isa205-altivec32l-ipa.o powerpc-isa205-vsx32l-ipa.o powerpc-e500l-ipa.o powerpc-64l-ipa.o powerpc-altivec64l-ipa.o powerpc-cell64l-ipa.o powerpc-vsx64l-ipa.o powerpc-isa205-64l-ipa.o powerpc-isa205-altivec64l-ipa.o powerpc-isa205-vsx64l-ipa.o"
+
+ srv_i386_32bit_xmlfiles="i386/32bit-core.xml i386/32bit-sse.xml i386/32bit-avx.xml i386/32bit-avx512.xml i386/32bit-mpx.xml i386/32bit-pkeys.xml"
+diff --git a/gdb/gdbserver/linux-amd64-ipa.c b/gdb/gdbserver/linux-amd64-ipa.c
+index 67f36c2..683339b 100644
+--- a/gdb/gdbserver/linux-amd64-ipa.c
++++ b/gdb/gdbserver/linux-amd64-ipa.c
+@@ -181,8 +181,8 @@ get_ipa_tdesc (int idx)
+ return tdesc_x32_linux;
+ case X86_TDESC_AVX:
+ return tdesc_x32_avx_linux;
+- case X86_TDESC_AVX512:
+- return tdesc_x32_avx512_linux;
++ case X86_TDESC_AVX_AVX512:
++ return tdesc_x32_avx_avx512_linux;
+ default:
+ break;
+ }
+@@ -279,7 +279,7 @@ initialize_low_tracepoint (void)
+ #if defined __ILP32__
+ init_registers_x32_linux ();
+ init_registers_x32_avx_linux ();
+- init_registers_x32_avx512_linux ();
++ init_registers_x32_avx_avx512_linux ();
+ #else
+ init_registers_amd64_linux ();
+ init_registers_amd64_avx_linux ();
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.1.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.1.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc b/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc
index 9b4c128..dd9d792 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc
@@ -116,6 +116,7 @@
${datadir}/gitweb/gitweb.cgi \
${datadir}/git-core/templates/hooks/prepare-commit-msg.sample \
${datadir}/git-core/templates/hooks/pre-rebase.sample \
+ ${datadir}/git-core/templates/hooks/fsmonitor-watchman.sample \
"
# Git tools requiring perl
@@ -125,6 +126,7 @@
${libdir}/perl \
${datadir}/perl \
"
+
RDEPENDS_${PN}-perltools = "${PN} perl perl-module-file-path findutils"
# git-tk package with gitk and git-gui
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.13.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.13.3.bb
deleted file mode 100644
index b3e3887..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.13.3.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] = "d2dc550f6693ba7e5b16212b2714f59f"
-SRC_URI[tarball.sha256sum] = "1497001772f630d49809e981672edfe3e3ce1a1d18e905cd539c4d2f4dbcd75a"
-SRC_URI[manpages.md5sum] = "3037d11a4f4cdd19435871c267ca48b4"
-SRC_URI[manpages.sha256sum] = "f9b302eeb08ce08934e7afb42280ce9294411fbf5f7b6ac3fcc236e8031f10c5"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.16.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.16.1.bb
new file mode 100644
index 0000000..9dc4eba
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.16.1.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] = "37467da8e79e72f28598d667f219f75e"
+SRC_URI[tarball.sha256sum] = "56cfa48af2b289bba172ca0a47c29f0083f5846cf4759978b70988e4f07fc9fd"
+SRC_URI[manpages.md5sum] = "5587407f3c28446af12fde3f3131ba34"
+SRC_URI[manpages.sha256sum] = "d499e825f429d76862be415f579c20cc26b046573a3a39237acaf9682cb71be7"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/glide/glide_0.13.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/glide/glide_0.13.1.bb
new file mode 100644
index 0000000..1a5b145
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/glide/glide_0.13.1.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Vendor Package Management for Golang"
+HOMEPAGE = "https://glide.sh"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=54905cf894f8cc416a92f4fc350c35b2"
+
+GO_IMPORT = "github.com/Masterminds/glide"
+SRC_URI = "git://${GO_IMPORT}"
+SRCREV = "67790b3dbede72cfdc54aa53be4706322c9499e0"
+
+inherit go
+
+RDEPENDS_${PN}-dev += "bash"
+RDEPENDS_${PN}-ptest += "bash"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
index 4fded60..8de8138 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
@@ -14,7 +14,7 @@
SRC_URI = "git://git.savannah.gnu.org/config.git \
file://gnu-configize.in"
S = "${WORKDIR}/git"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
CLEANBROKEN = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10.inc
new file mode 100644
index 0000000..3a135bf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10.inc
@@ -0,0 +1,24 @@
+require go-common.inc
+
+GO_BASEVERSION = "1.10"
+GO_MINOR = ".2"
+PV .= "${GO_MINOR}"
+FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
+
+SRC_URI += "\
+ file://0001-allow-CC-and-CXX-to-have-multiple-words.patch \
+ file://0002-cmd-go-make-content-based-hash-generation-less-pedan.patch \
+ file://0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch \
+ file://0004-ld-add-soname-to-shareable-objects.patch \
+ file://0005-make.bash-override-CC-when-building-dist-and-go_boot.patch \
+ file://0006-cmd-dist-separate-host-and-target-builds.patch \
+ file://0007-cmd-go-make-GOROOT-precious-by-default.patch \
+ file://0008-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch \
+"
+
+SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
+
+SRC_URI[main.md5sum] = "c63b35075bed693bbfc84d4a6262948a"
+SRC_URI[main.sha256sum] = "6264609c6b9cd8ed8e02ca84605d727ce1898d74efa79841660b2e3e985a98bd"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0001-allow-CC-and-CXX-to-have-multiple-words.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0001-allow-CC-and-CXX-to-have-multiple-words.patch
new file mode 100644
index 0000000..3bb33b0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0001-allow-CC-and-CXX-to-have-multiple-words.patch
@@ -0,0 +1,33 @@
+From 7a7de46129fa6859fb6311096eb9f54c53c7fe2f Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Mon, 19 Feb 2018 08:49:33 -0800
+Subject: [PATCH 1/9] allow CC and CXX to have multiple words
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ 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 603f7b5060..f891123f9c 100644
+--- a/src/cmd/go/internal/envcmd/env.go
++++ b/src/cmd/go/internal/envcmd/env.go
+@@ -82,11 +82,11 @@ func MkEnv() []cfg.EnvVar {
+
+ cc := cfg.DefaultCC(cfg.Goos, cfg.Goarch)
+ if env := strings.Fields(os.Getenv("CC")); len(env) > 0 {
+- cc = env[0]
++ cc = strings.Join(env, " ")
+ }
+ cxx := cfg.DefaultCXX(cfg.Goos, cfg.Goarch)
+ if env := strings.Fields(os.Getenv("CXX")); len(env) > 0 {
+- cxx = env[0]
++ cxx = strings.Join(env, " ")
+ }
+ env = append(env, cfg.EnvVar{Name: "CC", Value: cc})
+ env = append(env, cfg.EnvVar{Name: "CXX", Value: cxx})
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
new file mode 100644
index 0000000..74f37a9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
@@ -0,0 +1,220 @@
+From 8b2feaee81d7a16adc59e61d06c1e7314d3a5408 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Mon, 19 Feb 2018 08:50:59 -0800
+Subject: [PATCH 2/9] cmd/go: make content-based hash generation less pedantic
+
+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.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/go/internal/envcmd/env.go | 2 +-
+ src/cmd/go/internal/work/exec.go | 63 ++++++++++++++++++++++++++++-----------
+ 2 files changed, 46 insertions(+), 19 deletions(-)
+
+diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
+index f891123f9c..ebacfbfdbc 100644
+--- a/src/cmd/go/internal/envcmd/env.go
++++ b/src/cmd/go/internal/envcmd/env.go
+@@ -113,7 +113,7 @@ func findEnv(env []cfg.EnvVar, name string) string {
+ func ExtraEnvVars() []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 c4c1500eb2..b0f6b45647 100644
+--- a/src/cmd/go/internal/work/exec.go
++++ b/src/cmd/go/internal/work/exec.go
+@@ -173,6 +173,8 @@ func (b *Builder) Do(root *Action) {
+ wg.Wait()
+ }
+
++var omitGopath = os.Getenv("GOPATH_OMIT_IN_ACTIONID") != ""
++
+ // buildActionID computes the action ID for a build action.
+ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+ p := a.Package
+@@ -189,7 +191,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+ // but it does not hide the exact value of $GOPATH.
+ // Include the full dir in that case.
+ // Assume b.WorkDir is being trimmed properly.
+- if !p.Goroot && !strings.HasPrefix(p.Dir, b.WorkDir) {
++ if !p.Goroot && !omitGopath && !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)
+@@ -197,13 +199,13 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+ fmt.Fprintf(h, "omitdebug %v standard %v local %v prefix %q\n", p.Internal.OmitDebug, p.Standard, p.Internal.Local, p.Internal.LocalPrefix)
+ if len(p.CgoFiles)+len(p.SwigFiles) > 0 {
+ fmt.Fprintf(h, "cgo %q\n", b.toolID("cgo"))
+- cppflags, cflags, cxxflags, fflags, _, _ := b.CFlags(p)
+- fmt.Fprintf(h, "CC=%q %q %q\n", b.ccExe(), cppflags, cflags)
++ cppflags, cflags, cxxflags, fflags, _, _ := b.CFlags(p, true)
++ fmt.Fprintf(h, "CC=%q %q %q\n", b.ccExe(true), cppflags, cflags)
+ 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?
+ }
+@@ -1731,33 +1733,33 @@ 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(os.Getenv("FC"), "gfortran")
++func (b *Builder) fcExe(filtered bool) []string {
++ return b.compilerExe(os.Getenv("FC"), "gfortran", filtered)
+ }
+
+ // compilerExe returns the compiler to use given an
+@@ -1766,11 +1768,14 @@ 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
+ }
+
+@@ -1920,8 +1925,23 @@ func envList(key, def string) []string {
+ return strings.Fields(v)
+ }
+
++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
++}
++
+ // 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 {
+@@ -1939,6 +1959,13 @@ func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, l
+ if ldflags, err = buildFlags("LDFLAGS", defaults, p.CgoLDFLAGS, checkLinkerFlags); err != nil {
+ return
+ }
++ if filtered {
++ cppflags = filterCompilerFlags(cppflags)
++ cflags = filterCompilerFlags(cflags)
++ cxxflags = filterCompilerFlags(cxxflags)
++ fflags = filterCompilerFlags(fflags)
++ ldflags = filterCompilerFlags(ldflags)
++ }
+
+ return
+ }
+@@ -1954,7 +1981,7 @@ var cgoRe = regexp.MustCompile(`[/\\:]`)
+
+ 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
+ }
+@@ -2306,7 +2333,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.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
new file mode 100644
index 0000000..818fe66
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
@@ -0,0 +1,64 @@
+From acd179b49f1fc8d6f7f69e569fb4a56039c725a1 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sat, 17 Feb 2018 05:24:20 -0800
+Subject: [PATCH 3/9] allow GOTOOLDIR to be overridden in the environment
+
+to allow for split host/target build roots
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/dist/build.go | 4 +++-
+ src/cmd/go/internal/cfg/cfg.go | 6 +++++-
+ src/go/build/build.go | 2 +-
+ 3 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
+index 49ed80033e..afc615b5c2 100644
+--- a/src/cmd/dist/build.go
++++ b/src/cmd/dist/build.go
+@@ -220,7 +220,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 1de4f0dc79..4f6010d660 100644
+--- a/src/cmd/go/internal/cfg/cfg.go
++++ b/src/cmd/go/internal/cfg/cfg.go
+@@ -96,7 +96,11 @@ func init() {
+ // as the tool directory does not move based on environment variables.
+ // This matches the initialization of ToolDir in go/build,
+ // except for using GOROOT rather than runtime.GOROOT().
+- build.ToolDir = filepath.Join(GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
++ if s := os.Getenv("GOTOOLDIR"); s != "" {
++ build.ToolDir = filepath.Clean(s)
++ } else {
++ build.ToolDir = filepath.Join(GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
++ }
+ }
+
+ func findGOROOT() string {
+diff --git a/src/go/build/build.go b/src/go/build/build.go
+index 68fb423983..81b1b32270 100644
+--- a/src/go/build/build.go
++++ b/src/go/build/build.go
+@@ -1594,7 +1594,7 @@ func init() {
+ }
+
+ // ToolDir is the directory containing build tools.
+-var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
++var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH))
+
+ // IsLocalImport reports whether the import path is
+ // a local import path, like ".", "..", "./foo", or "../foo".
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch
new file mode 100644
index 0000000..c23ca94
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch
@@ -0,0 +1,47 @@
+From 85252f0bd8743223eb778edbe9fb31dff17a23d8 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sat, 17 Feb 2018 06:26:10 -0800
+Subject: [PATCH 4/9] ld: add soname to shareable objects
+
+so that OE's shared library dependency handling
+can find them.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/link/internal/ld/lib.go | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
+index 6dcaf64122..11cbb8a8bb 100644
+--- a/src/cmd/link/internal/ld/lib.go
++++ b/src/cmd/link/internal/ld/lib.go
+@@ -1134,6 +1134,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.
+@@ -1145,6 +1146,8 @@ 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")
+@@ -1153,6 +1156,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.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
new file mode 100644
index 0000000..67a9393
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
@@ -0,0 +1,40 @@
+From 16124d84648f4dfdfa4738c5660b5400b30bf9da Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sat, 17 Feb 2018 06:32:45 -0800
+Subject: [PATCH 5/9] make.bash: override CC when building dist and
+ go_bootstrap
+
+for handling OE cross-canadian builds.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/make.bash | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/make.bash b/src/make.bash
+index 93a5c43d11..3a63682bc4 100755
+--- a/src/make.bash
++++ b/src/make.bash
+@@ -162,7 +162,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then
+ exit 1
+ fi
+ rm -f cmd/dist/dist
+-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
++CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$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)
+@@ -193,7 +193,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.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0006-cmd-dist-separate-host-and-target-builds.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0006-cmd-dist-separate-host-and-target-builds.patch
new file mode 100644
index 0000000..9fe6996
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0006-cmd-dist-separate-host-and-target-builds.patch
@@ -0,0 +1,277 @@
+From 2f07af34697c61decdcfa5b11434451fbcf37704 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sat, 17 Feb 2018 10:03:48 -0800
+Subject: [PATCH 6/9] cmd/dist: separate host and target builds
+
+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.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+
+more dist cleanup
+---
+ src/cmd/dist/build.go | 149 +++++++++++++++++++++++++++++++++++++-------------
+ 1 file changed, 111 insertions(+), 38 deletions(-)
+
+diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
+index afc615b5c2..36262665b2 100644
+--- a/src/cmd/dist/build.go
++++ b/src/cmd/dist/build.go
+@@ -38,6 +38,7 @@ var (
+ goldflags string
+ workdir string
+ tooldir string
++ build_tooldir string
+ oldgoos string
+ oldgoarch string
+ exe string
+@@ -49,6 +50,7 @@ var (
+
+ rebuildall bool
+ defaultclang bool
++ crossBuild bool
+
+ vflag int // verbosity
+ )
+@@ -223,6 +225,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
+@@ -252,7 +256,6 @@ func compilerEnv(envName, def string) map[string]string {
+ if gohostos != goos || gohostarch != goarch {
+ m[gohostos+"/"+gohostarch] = m[""]
+ }
+- m[""] = env
+ }
+
+ for _, goos := range okgoos {
+@@ -479,8 +482,10 @@ func setup() {
+ // We keep it in pkg/, just like the object directory above.
+ if rebuildall {
+ xremoveall(tooldir)
++ xremoveall(build_tooldir)
+ }
+ xmkdirall(tooldir)
++ xmkdirall(build_tooldir)
+
+ // Remove tool binaries from before the tool/gohostos_gohostarch
+ xremoveall(pathf("%s/bin/tool", goroot))
+@@ -1130,11 +1135,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")
++ }
++ }
+
+ if debug {
+ // cmd/buildid is used in debug mode.
+@@ -1182,8 +1205,13 @@ func cmdbootstrap() {
+ xprintf("\n")
+ }
+
+- gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now
+- goldflags = os.Getenv("GO_LDFLAGS")
++ // 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")
++ }
+ goBootstrap := pathf("%s/go_bootstrap", tooldir)
+ cmdGo := pathf("%s/go", gobin)
+ if debug {
+@@ -1212,7 +1240,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")
+@@ -1249,45 +1281,82 @@ 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")
++ 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)
+ }
+- 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")
++ 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)
+- }
+- goInstall(goBootstrap, "std", "cmd")
+- checkNotStale(goBootstrap, "std", "cmd")
+- checkNotStale(cmdGo, "std", "cmd")
+- 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
+@@ -1305,7 +1374,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))
++ }
+
+ // Print trailing banner unless instructed otherwise.
+ if !noBanner {
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0007-cmd-go-make-GOROOT-precious-by-default.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0007-cmd-go-make-GOROOT-precious-by-default.patch
new file mode 100644
index 0000000..7242762
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0007-cmd-go-make-GOROOT-precious-by-default.patch
@@ -0,0 +1,108 @@
+From f98aa287941417226a6e4f78759f8a5e19732cde Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Fri, 2 Mar 2018 06:00:20 -0800
+Subject: [PATCH 7/9] cmd/go: make GOROOT precious by default
+
+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.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/go/internal/work/action.go | 3 +++
+ src/cmd/go/internal/work/build.go | 5 +++++
+ src/cmd/go/internal/work/exec.go | 25 +++++++++++++++++++++++++
+ 3 files changed, 33 insertions(+)
+
+diff --git a/src/cmd/go/internal/work/action.go b/src/cmd/go/internal/work/action.go
+index 9f1f8f8a50..a382880474 100644
+--- a/src/cmd/go/internal/work/action.go
++++ b/src/cmd/go/internal/work/action.go
+@@ -563,6 +563,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 57b7b00879..e2ba95420e 100644
+--- a/src/cmd/go/internal/work/build.go
++++ b/src/cmd/go/internal/work/build.go
+@@ -143,6 +143,7 @@ See also: go install, go get, go clean.
+ }
+
+ const concurrentGCBackendCompilationEnabledByDefault = true
++var goRootPrecious bool = true
+
+ func init() {
+ // break init cycle
+@@ -156,6 +157,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 b0f6b45647..c8f266a8ad 100644
+--- a/src/cmd/go/internal/work/exec.go
++++ b/src/cmd/go/internal/work/exec.go
+@@ -371,6 +371,23 @@ func (b *Builder) build(a *Action) (err error) {
+ return fmt.Errorf("missing or invalid binary-only package")
+ }
+
++ 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
++ }
++ if b.ComputeStaleOnly {
++ a.Package.Stale = true
++ a.Package.StaleReason = "missing or invalid GOROOT-resident package"
++ return nil
++ }
++ }
++
+ if err := b.Mkdir(a.Objdir); err != nil {
+ return err
+ }
+@@ -1097,6 +1114,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.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0008-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0008-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch
new file mode 100644
index 0000000..1e75417
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0008-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch
@@ -0,0 +1,58 @@
+From 41b90ed7af10a071ccfeede6a429e0d80518436d Mon Sep 17 00:00:00 2001
+From: Cherry Zhang <cherryyz@google.com>
+Date: Sat, 17 Feb 2018 10:31:39 -0500
+Subject: [PATCH 8/9] cmd/internal/obj/arm64: fix branch-too-far with TBZ like
+ instructions
+
+The compiler now emits TBZ like instructions, but the assembler's
+too-far-branch patch code didn't include that case. Add it.
+
+Fixes #23889.
+
+Change-Id: Ib75f9250c660b9fb652835fbc83263a5d5073dc5
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport
+
+ src/cmd/internal/obj/arm64/asm7.go | 11 +++++++++--
+ src/cmd/internal/obj/arm64/asm_test.go | 1 +
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/src/cmd/internal/obj/arm64/asm7.go b/src/cmd/internal/obj/arm64/asm7.go
+index ca81238c93..b1ee552489 100644
+--- a/src/cmd/internal/obj/arm64/asm7.go
++++ b/src/cmd/internal/obj/arm64/asm7.go
+@@ -696,9 +696,16 @@ func span7(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
+ o = c.oplook(p)
+
+ /* very large branches */
+- if (o.type_ == 7 || o.type_ == 39) && p.Pcond != nil { // 7: BEQ and like, 39: CBZ and like
++ if (o.type_ == 7 || o.type_ == 39 || o.type_ == 40) && p.Pcond != nil { // 7: BEQ and like, 39: CBZ and like, 40: TBZ and like
+ otxt := p.Pcond.Pc - pc
+- if otxt <= -(1<<18)+10 || otxt >= (1<<18)-10 {
++ var toofar bool
++ switch o.type_ {
++ case 7, 39: // branch instruction encodes 19 bits
++ toofar = otxt <= -(1<<20)+10 || otxt >= (1<<20)-10
++ case 40: // branch instruction encodes 14 bits
++ toofar = otxt <= -(1<<15)+10 || otxt >= (1<<15)-10
++ }
++ if toofar {
+ q := c.newprog()
+ q.Link = p.Link
+ p.Link = q
+diff --git a/src/cmd/internal/obj/arm64/asm_test.go b/src/cmd/internal/obj/arm64/asm_test.go
+index 369c48f510..3e0c9c13a6 100644
+--- a/src/cmd/internal/obj/arm64/asm_test.go
++++ b/src/cmd/internal/obj/arm64/asm_test.go
+@@ -52,6 +52,7 @@ func TestLarge(t *testing.T) {
+ // gen generates a very large program, with a very far conditional branch.
+ func gen(buf *bytes.Buffer) {
+ fmt.Fprintln(buf, "TEXT f(SB),0,$0-0")
++ fmt.Fprintln(buf, "TBZ $5, R0, label")
+ fmt.Fprintln(buf, "CBZ R0, label")
+ fmt.Fprintln(buf, "BEQ label")
+ for i := 0; i < 1<<19; i++ {
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0009-ld-replace-glibc-dynamic-linker-with-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
new file mode 100644
index 0000000..06b00b3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
@@ -0,0 +1,130 @@
+From f575d85c4bd9b2903223d6c0dcc38a12775d582f Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sun, 18 Feb 2018 08:24:05 -0800
+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.
+
+Upstream-Status: Inappropriate [Real fix should be portable across libcs]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ 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 87e809166a..f522a63034 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 da16f92345..fd14940ede 100644
+--- a/src/cmd/link/internal/arm/obj.go
++++ b/src/cmd/link/internal/arm/obj.go
+@@ -58,7 +58,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ Gentext: gentext,
+ Machoreloc1: machoreloc1,
+
+- 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 6b386ad737..99863712cc 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: "XXX",
+diff --git a/src/cmd/link/internal/mips/obj.go b/src/cmd/link/internal/mips/obj.go
+index c5d3451c39..fd85e6368d 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 83974e5b56..097224f6da 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 273d9b42cb..a503abe8ea 100644
+--- a/src/cmd/link/internal/ppc64/obj.go
++++ b/src/cmd/link/internal/ppc64/obj.go
+@@ -62,7 +62,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ Machoreloc1: machoreloc1,
+
+ // 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 9ac7eb8217..3825ff7abe 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 6a744dc04e..d81f392549 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.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc
index 2823304..a942f6d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc
@@ -1,7 +1,7 @@
require go-common.inc
GO_BASEVERSION = "1.9"
-GO_MINOR = ".4"
+GO_MINOR = ".6"
PV .= "${GO_MINOR}"
FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
@@ -22,5 +22,5 @@
"
SRC_URI_append_libc-musl = " file://set-external-linker.patch"
-SRC_URI[main.md5sum] = "6816441fd6680c63865cdd5cb8bc1960"
-SRC_URI[main.sha256sum] = "0573a8df33168977185aa44173305e5a0450f55213600e94541604b75d46dc06"
+SRC_URI[main.md5sum] = "52c1a3063291036597552d3fed0b2917"
+SRC_URI[main.sha256sum] = "36f4059be658f7f07091e27fe04bb9e97a0c4836eb446e4c5bac3c90ff9e5828"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-common.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-common.inc
index 9af6873..11d55c4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-common.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-common.inc
@@ -17,10 +17,17 @@
SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz;name=main"
S = "${WORKDIR}/go"
B = "${S}"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.src\.tar"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
SSTATE_SCAN_CMD = "true"
+export GOROOT_OVERRIDE = "1"
+export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+GOTMPDIR[vardepvalue] = ""
+export GOCACHE = "off"
+export CGO_ENABLED = "1"
+
do_compile_prepend() {
BUILD_CC=${BUILD_CC}
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc
index 8afda6b..ea68b88 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc
@@ -7,34 +7,29 @@
export GOHOSTOS = "${BUILD_GOOS}"
export GOHOSTARCH = "${BUILD_GOARCH}"
-export GOHOSTOS_CROSS = "${HOST_GOOS}"
-export GOHOSTARCH_CROSS = "${HOST_GOARCH}"
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
export GOTOOLDIR_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/${HOST_SYS}/go/pkg/tool/${BUILD_GOTUPLE}"
export GOROOT_FINAL = "${libdir}/go"
-export CGO_ENABLED = "1"
-export CC_FOR_TARGET = "${TARGET_PREFIX}gcc"
-export CXX_FOR_TARGET = "${TARGET_PREFIX}g++"
-CC = "${HOST_PREFIX}gcc"
-export CGO_CFLAGS = "--sysroot=${STAGING_DIR_TARGET} ${HOST_CC_ARCH} ${CFLAGS}"
-export CGO_LDFLAGS = "--sysroot=${STAGING_DIR_TARGET} ${HOST_CC_ARCH} ${LDFLAGS}"
-export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_TARGET} ${HOST_CC_ARCH} ${LDFLAGS}"'
+export CGO_CFLAGS = "${CFLAGS}"
+export CGO_LDFLAGS = "${LDFLAGS}"
+export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_HOST} ${SECURITY_NOPIE_CFLAGS} ${HOST_CC_ARCH} ${LDFLAGS}"'
do_configure[noexec] = "1"
do_compile() {
- export GOBIN="${B}/bin"
- rm -rf ${GOBIN} ${B}/pkg
- mkdir ${GOBIN}
+ export CC_FOR_${HOST_GOOS}_${HOST_GOARCH}="${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
+ export CXX_FOR_${HOST_GOOS}_${HOST_GOARCH}="${HOST_PREFIX}gxx --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
cd src
./make.bash --host-only --no-banner
cd ${B}
}
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
make_wrapper() {
- rm -f ${D}${bindir}/$2
- cat <<END >${D}${bindir}/$2
+ rm -f ${D}${bindir}/$2
+ cat <<END >${D}${bindir}/$2
#!/bin/sh
here=\`dirname \$0\`
native_goroot=\`readlink -f \$here/../../lib/${TARGET_SYS}/go\`
@@ -42,11 +37,12 @@
export GOOS="${TARGET_GOOS}"
test -n "\$GOARM" || export GOARM="${TARGET_GOARM}"
test -n "\$GO386" || export GO386="${TARGET_GO386}"
+test -n "\$GOMIPS" || export GOMIPS="${TARGET_GOMIPS}"
export GOTOOLDIR="\$native_goroot/pkg/tool/${HOST_GOTUPLE}"
test -n "\$GOROOT" || export GOROOT="\$OECORE_TARGET_SYSROOT/${target_libdir}/go"
\$here/../../lib/${TARGET_SYS}/go/bin/$1 "\$@"
END
- chmod +x ${D}${bindir}/$2
+ chmod +x ${D}${bindir}/$2
}
do_install() {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.10.bb
new file mode 100644
index 0000000..7ac9449
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.10.bb
@@ -0,0 +1,2 @@
+require go-cross-canadian.inc
+require go-${PV}.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb
index 7ac9449..367a967 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb
@@ -1,2 +1,12 @@
require go-cross-canadian.inc
require go-${PV}.inc
+
+export GOHOSTOS_CROSS = "${HOST_GOOS}"
+export GOHOSTARCH_CROSS = "${HOST_GOARCH}"
+export CC_FOR_TARGET = "${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
+export CXX_FOR_TARGET = "${HOST_PREFIX}g++ --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
+
+do_compile_prepend() {
+ export GOBIN="${B}/bin"
+ export TMPDIR="$GOTMPDIR"
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc
index 3ac7211..44f230b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc
@@ -1,7 +1,7 @@
inherit cross
PROVIDES = "virtual/${TARGET_PREFIX}go"
-DEPENDS += "go-native"
+DEPENDS = "go-native"
PN = "go-cross-${TARGET_ARCH}"
@@ -11,52 +11,52 @@
export GOARCH = "${TARGET_GOARCH}"
export GOARM = "${TARGET_GOARM}"
export GO386 = "${TARGET_GO386}"
+export GOMIPS = "${TARGET_GOMIPS}"
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
export GOROOT_FINAL = "${libdir}/go"
-export CGO_ENABLED = "1"
-export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
-export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+export GOCACHE = "off"
CC = "${@d.getVar('BUILD_CC').strip()}"
do_configure[noexec] = "1"
do_compile() {
- export GOBIN="${B}/bin"
- rm -rf ${GOBIN} ${B}/pkg
- mkdir ${GOBIN}
- cd src
- ./make.bash --host-only
- cd ${B}
+ export CC_FOR_${GOOS}_${GOARCH}="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+ export CXX_FOR_${GOOS}_${GOARCh}="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+ cd src
+ ./make.bash --host-only --no-banner
+ cd ${B}
}
-
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
make_wrapper() {
- rm -f ${D}${bindir}/$2
- cat <<END >${D}${bindir}/$2
+ rm -f ${D}${bindir}/$2
+ cat <<END >${D}${bindir}/$2
#!/bin/bash
here=\`dirname \$0\`
export GOARCH="${TARGET_GOARCH}"
export GOOS="${TARGET_GOOS}"
export GOARM="\${GOARM:-${TARGET_GOARM}}"
export GO386="\${GO386:-${TARGET_GO386}}"
+export GOMIPS="\${GOMIPS:-${TARGET_GOMIPS}}"
\$here/../../lib/${CROSS_TARGET_SYS_DIR}/go/bin/$1 "\$@"
END
- chmod +x ${D}${bindir}/$2
+ chmod +x ${D}${bindir}/$2
}
do_install() {
- install -d ${D}${libdir}/go
- cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/
- install -d ${D}${libdir}/go/src
- (cd ${S}/src; for d in *; do \
- [ ! -d $d ] || cp --preserve=mode,timestamps -R ${S}/src/$d ${D}${libdir}/go/src/; \
- done)
- rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata
- install -d ${D}${bindir} ${D}${libdir}/go/bin
- for f in ${B}/bin/*
- do
- base=`basename $f`
- install -m755 $f ${D}${libdir}/go/bin
- make_wrapper $base ${TARGET_PREFIX}$base
- done
+ install -d ${D}${libdir}/go
+ cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/
+ install -d ${D}${libdir}/go/src
+ (cd ${S}/src; for d in *; do \
+ [ ! -d $d ] || cp --preserve=mode,timestamps -R ${S}/src/$d ${D}${libdir}/go/src/; \
+ done)
+ find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
+ install -d ${D}${bindir} ${D}${libdir}/go/bin
+ for f in ${B}/bin/*
+ do
+ base=`basename $f`
+ install -m755 $f ${D}${libdir}/go/bin
+ make_wrapper $base ${TARGET_PREFIX}$base
+ done
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.10.bb
new file mode 100644
index 0000000..80b5a03
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.10.bb
@@ -0,0 +1,2 @@
+require go-cross.inc
+require go-${PV}.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb
index 80b5a03..4739c7d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb
@@ -1,2 +1,10 @@
require go-cross.inc
require go-${PV}.inc
+
+export CC_FOR_TARGET = "${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+export CXX_FOR_TARGET = "${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+
+do_compile_prepend() {
+ export GOBIN="${B}/bin"
+ export TMPDIR="$GOTMPDIR"
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc
index f67e4b9..4391b32 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc
@@ -10,22 +10,18 @@
export GOARCH = "${TARGET_GOARCH}"
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
export GOROOT_FINAL = "${libdir}/go"
-export CGO_ENABLED = "1"
-export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
-export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
-export GO_INSTALL = "cmd"
-CC = "${@d.getVar('BUILD_CC').strip()}"
do_configure[noexec] = "1"
do_compile() {
- export GOBIN="${B}/bin"
- rm -rf ${GOBIN} ${B}/pkg
- mkdir ${GOBIN}
+ export CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
+ export CXX_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
cd src
- ./make.bash --host-only
+ ./make.bash --host-only --no-banner
cd ${B}
}
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
make_wrapper() {
rm -f ${D}${bindir}/$2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.10.bb
new file mode 100644
index 0000000..1857c8a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.10.bb
@@ -0,0 +1,2 @@
+require go-crosssdk.inc
+require go-${PV}.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb
index 1857c8a..3ac629b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb
@@ -1,2 +1,11 @@
require go-crosssdk.inc
require go-${PV}.inc
+
+export CC_FOR_TARGET = "${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+export CXX_FOR_TARGET = "${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+export GO_INSTALL = "cmd"
+
+do_compile_prepend() {
+ export GOBIN="${B}/bin"
+ export TMPDIR="$GOTMPDIR"
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep/0001-Add-support-for-mips-mips64.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep/0001-Add-support-for-mips-mips64.patch
new file mode 100644
index 0000000..34ec987
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep/0001-Add-support-for-mips-mips64.patch
@@ -0,0 +1,54 @@
+From f0fb80604385ae3266a472601ef685896b4cc0af Mon Sep 17 00:00:00 2001
+From: Vladimir Stefanovic <vladimir.stefanovic@imgtec.com>
+Date: Fri, 17 Feb 2017 20:44:43 +0100
+Subject: [PATCH] Add support for mips, mips64
+
+---
+Upstream-Status: Submitted
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ vendor/github.com/boltdb/bolt/bolt_mips64x.go | 12 ++++++++++++
+ vendor/github.com/boltdb/bolt/bolt_mipsx.go | 12 ++++++++++++
+ 2 files changed, 24 insertions(+)
+ create mode 100644 vendor/github.com/boltdb/bolt/bolt_mips64x.go
+ create mode 100644 vendor/github.com/boltdb/bolt/bolt_mipsx.go
+
+diff --git a/vendor/github.com/boltdb/bolt/bolt_mips64x.go b/vendor/github.com/boltdb/bolt/bolt_mips64x.go
+new file mode 100644
+index 00000000..134b578b
+--- /dev/null
++++ b/vendor/github.com/boltdb/bolt/bolt_mips64x.go
+@@ -0,0 +1,12 @@
++// +build mips64 mips64le
++
++package bolt
++
++// maxMapSize represents the largest mmap size supported by Bolt.
++const maxMapSize = 0x8000000000 // 512GB
++
++// maxAllocSize is the size used when creating array pointers.
++const maxAllocSize = 0x7FFFFFFF
++
++// Are unaligned load/stores broken on this arch?
++var brokenUnaligned = false
+diff --git a/vendor/github.com/boltdb/bolt/bolt_mipsx.go b/vendor/github.com/boltdb/bolt/bolt_mipsx.go
+new file mode 100644
+index 00000000..d5ecb059
+--- /dev/null
++++ b/vendor/github.com/boltdb/bolt/bolt_mipsx.go
+@@ -0,0 +1,12 @@
++// +build mips mipsle
++
++package bolt
++
++// maxMapSize represents the largest mmap size supported by Bolt.
++const maxMapSize = 0x40000000 // 1GB
++
++// maxAllocSize is the size used when creating array pointers.
++const maxAllocSize = 0xFFFFFFF
++
++// Are unaligned load/stores broken on this arch?
++var brokenUnaligned = false
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.3.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.3.0.bb
deleted file mode 100644
index abfeb48..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.3.0.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "Dependency management tool for Golang"
-HOMEPAGE = "https://github.com/golang/dep"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=1bad315647751fab0007812f70d42c0d"
-
-GO_IMPORT = "github.com/golang/dep"
-SRC_URI = "git://${GO_IMPORT}"
-
-# Points to 0.3.0 tag
-SRCREV = "7a91b794bbfbf1f3b8b79823799316451127801b"
-
-inherit go
-
-GO_INSTALL = "${GO_IMPORT}/cmd/dep"
-
-RDEPENDS_${PN}-dev += "bash"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.4.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.4.1.bb
new file mode 100644
index 0000000..d82e637
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.4.1.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Dependency management tool for Golang"
+HOMEPAGE = "https://github.com/golang/dep"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=1bad315647751fab0007812f70d42c0d"
+
+GO_IMPORT = "github.com/golang/dep"
+SRC_URI = "git://${GO_IMPORT} \
+ file://0001-Add-support-for-mips-mips64.patch;patchdir=src/github.com/golang/dep \
+ "
+
+# Points to 0.4.1 tag
+SRCREV = "37d9ea0ac16f0e0a05afc3b60e1ac8c364b6c329"
+
+inherit go
+
+GO_INSTALL = "${GO_IMPORT}/cmd/dep"
+
+RDEPENDS_${PN}-dev += "bash"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc
index 95db1c2..b76fb08 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc
@@ -4,34 +4,31 @@
inherit native
-SRC_URI_append = " http://golang.org/dl/go1.4.3.src.tar.gz;name=bootstrap;subdir=go1.4"
-SRC_URI[bootstrap.md5sum] = "dfb604511115dd402a77a553a5923a04"
-SRC_URI[bootstrap.sha256sum] = "9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959"
+SRC_URI_append = " https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz;name=bootstrap;subdir=go1.4"
+SRC_URI[bootstrap.md5sum] = "dbf727a4b0e365bf88d97cbfde590016"
+SRC_URI[bootstrap.sha256sum] = "f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52"
export GOOS = "${BUILD_GOOS}"
export GOARCH = "${BUILD_GOARCH}"
CC = "${@d.getVar('BUILD_CC').strip()}"
-export CGO_ENABLED = "1"
+GOMAKEARGS ?= "--no-banner"
do_configure() {
- cd ${WORKDIR}/go1.4/go/src
- CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash
+ cd ${WORKDIR}/go1.4/go/src
+ CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash
}
do_compile() {
- export GOBIN="${B}/bin"
export GOROOT_FINAL="${nonstaging_libdir}/go"
export GOROOT_BOOTSTRAP="${WORKDIR}/go1.4/go"
- rm -rf ${GOBIN}
- mkdir ${GOBIN}
-
- export TMPDIR=${WORKDIR}/build-tmp
- mkdir -p ${WORKDIR}/build-tmp
cd src
- ./make.bash --host-only
+ ./make.bash ${GOMAKEARGS}
+ cd ${B}
}
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin"
make_wrapper() {
rm -f ${D}${bindir}/$2$3
@@ -51,7 +48,7 @@
(cd ${S}/src; for d in *; do \
[ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \
done)
- rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata
+ find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
install -d ${D}${bindir} ${D}${libdir}/go/bin
for f in ${B}/bin/*
do
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.10.bb
new file mode 100644
index 0000000..bbf3c0d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.10.bb
@@ -0,0 +1,2 @@
+require ${PN}.inc
+require go-${PV}.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb
index bbf3c0d..8621e1d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb
@@ -1,2 +1,4 @@
require ${PN}.inc
require go-${PV}.inc
+
+GOMAKEARGS = "--host-only --no-banner"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc
index 29ae86e..0041e8a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc
@@ -8,13 +8,16 @@
export GOARCH = "${TARGET_GOARCH}"
export GOARM = "${TARGET_GOARM}"
export GO386 = "${TARGET_GO386}"
+export GOMIPS = "${TARGET_GOMIPS}"
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
export GOROOT_FINAL = "${libdir}/go"
-export GO_TARGET_INSTALL = "std"
-export CGO_ENABLED = "1"
-export CC_FOR_TARGET="${CC}"
-export CXX_FOR_TARGET="${CXX}"
-export GOROOT_OVERRIDE = "1"
+export CGO_CFLAGS = "${CFLAGS}"
+export CGO_CPPFLAGS = "${CPPFLAGS}"
+export CGO_CXXFLAGS = "${CXXFLAGS}"
+export CGO_LDFLAGS = "${LDFLAGS}"
+
+GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}"
+GO_SHLIB_LDFLAGS ?= '-ldflags="--linkmode=external -extldflags '${GO_EXTLDFLAGS}'"'
do_configure() {
:
@@ -25,21 +28,20 @@
}
do_compile() {
- export GOBIN="${B}/bin"
- export CC="${@d.getVar('BUILD_CC').strip()}"
- rm -rf ${GOBIN} ${B}/pkg
- mkdir ${GOBIN}
+ export CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CC}"
+ export CXX_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CXX}"
+
cd src
- ./make.bash --host-only
- cp ${B}/pkg/tool/${BUILD_GOTUPLE}/go_bootstrap ${B}
- rm -rf ${B}/pkg/${TARGET_GOTUPLE}
- ./make.bash --target-only
+ ./make.bash --target-only --no-banner std
if [ -n "${GO_DYNLINK}" ]; then
- cp ${B}/go_bootstrap ${B}/pkg/tool/${BUILD_GOTUPLE}
- GO_FLAGS="-buildmode=shared" GO_LDFLAGS="-extldflags \"${LDFLAGS}\"" ./make.bash --target-only
+ export GOTOOLDIR="${B}/pkg/tool/native_native"
+ CC="$CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}" GOARCH="${TARGET_GOARCH}" GOOS="${TARGET_GOOS}" GOROOT=${B} \
+ $GOTOOLDIR/go_bootstrap install -linkshared -buildmode=shared ${GO_SHLIB_LDFLAGS} std
fi
cd ${B}
}
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
do_install() {
install -d ${D}${libdir}/go/src
@@ -54,20 +56,10 @@
find src -mindepth 1 -maxdepth 1 -type d | while read srcdir; do
cp --preserve=mode,timestamps -R $srcdir ${D}${libdir}/go/src/
done
+ find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
rm -f ${D}${libdir}/go/src/cmd/dist/dist
}
-# Remove test binaries that cannot be relocated
-do_install_append_class-nativesdk() {
- rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata
-}
-
-# These testdata directories aren't needed for builds and contain binaries
-# that can cause errors in sysroot_strip(), so just remove them.
-sysroot_stage_all_append() {
- find ${SYSROOT_DESTDIR}${libdir}/go/src -depth -type d -name 'testdata' -exec rm -rf {} \;
-}
-
ALLOW_EMPTY_${PN} = "1"
FILES_${PN} = "${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*${SOLIBSDEV}"
FILES_${PN}-dev = "${libdir}/go/src ${libdir}/go/pkg/include \
@@ -78,8 +70,6 @@
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*.shlibname \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.shlibname \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.shlibname \
-"
-FILES_${PN}-staticdev = "${libdir}/go/pkg/${TARGET_GOTUPLE} \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*.a \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*.a \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*.a \
@@ -88,11 +78,15 @@
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.a \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.a \
"
-# The testdata directories in the source tree include some binaries for various
-# architectures, scripts, and .a files
-INSANE_SKIP_${PN}-dev = "staticdev ldflags file-rdeps arch"
+FILES_${PN}-staticdev = "${libdir}/go/pkg/${TARGET_GOTUPLE}"
+
+# Go sources include some scripts and pre-built binaries for
+# multiple architectures. The static .a files for dynamically-linked
+# runtime are also required in -dev.
+INSANE_SKIP_${PN}-dev = "staticdev file-rdeps arch"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+INHIBIT_SYSROOT_STRIP = "1"
BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.10.bb
new file mode 100644
index 0000000..43b68b4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.10.bb
@@ -0,0 +1,2 @@
+require go-${PV}.inc
+require go-runtime.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.bb
index 43b68b4..d5279ea 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.bb
@@ -1,2 +1,23 @@
require go-${PV}.inc
require go-runtime.inc
+
+export GO_TARGET_INSTALL = "std"
+export CC_FOR_TARGET = "${CC}"
+export CXX_FOR_TARGET = "${CXX}"
+
+do_compile() {
+ export GOBIN="${B}/bin"
+ export TMPDIR="$GOTMPDIR"
+ export CC=$BUILD_CC
+
+ cd src
+ CGO_CFLAGS="${BUILD_CFLAGS}" CGO_LDFLAGS="${BUILD_LDFLAGS}" ./make.bash --host-only
+ cp ${B}/pkg/tool/${BUILD_GOTUPLE}/go_bootstrap ${B}
+ rm -rf ${B}/pkg/${TARGET_GOTUPLE}
+ ./make.bash --target-only
+ if [ -n "${GO_DYNLINK}" ]; then
+ cp ${B}/go_bootstrap ${B}/pkg/tool/${BUILD_GOTUPLE}
+ GO_FLAGS="-buildmode=shared" GO_LDFLAGS="-extldflags \"${LDFLAGS}\"" ./make.bash --target-only
+ fi
+ cd ${B}
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc
index cac5d78..29a1344 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc
@@ -1,4 +1,3 @@
-inherit goarch
DEPENDS = "virtual/${TARGET_PREFIX}go go-native"
DEPENDS_class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk go-native"
@@ -8,41 +7,34 @@
export GOARCH = "${TARGET_GOARCH}"
export GOARM = "${TARGET_GOARM}"
export GO386 = "${TARGET_GO386}"
+export GOMIPS = "${TARGET_GOMIPS}"
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
export GOROOT_FINAL = "${libdir}/go"
-export CGO_ENABLED = "1"
-export CC_FOR_TARGET = "${CC}"
-export CXX_FOR_TARGET = "${CXX}"
-export GO_TARGET_INSTALL = "cmd"
-export GO_FLAGS = "-a"
GO_LDFLAGS = ""
GO_LDFLAGS_class-nativesdk = "-linkmode external"
export GO_LDFLAGS
-SECURITY_CFLAGS = "${SECURITY_NOPIE_CFLAGS}"
-SECURITY_LDFLAGS = ""
+CC_append_class-nativesdk = " ${SECURITY_NOPIE_CFLAGS}"
do_configure[noexec] = "1"
do_compile() {
- export GOBIN="${B}/bin"
- export CC="${@d.getVar('BUILD_CC').strip()}"
- rm -rf ${GOBIN} ${B}/pkg
- mkdir ${GOBIN}
-
- export TMPDIR=${WORKDIR}/build-tmp
- mkdir -p ${WORKDIR}/build-tmp
+ export CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CC}"
+ export CXX_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CXX}"
cd src
- ./make.bash
+ ./make.bash --target-only --no-banner
cd ${B}
}
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
do_install() {
install -d ${D}${libdir}/go/pkg/tool
cp --preserve=mode,timestamps -R ${B}/pkg/tool/${TARGET_GOTUPLE} ${D}${libdir}/go/pkg/tool/
install -d ${D}${libdir}/go/src
cp --preserve=mode,timestamps -R ${S}/src/cmd ${D}${libdir}/go/src/
+ find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
install -d ${D}${libdir}/go/bin
install -d ${D}${bindir}
for f in ${B}/${GO_BUILD_BINDIR}/*; do
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.10.bb
new file mode 100644
index 0000000..c67e2cb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.10.bb
@@ -0,0 +1,2 @@
+require go-${PV}.inc
+require go-target.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb
index c67e2cb..ec5a314 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb
@@ -1,2 +1,17 @@
require go-${PV}.inc
require go-target.inc
+
+export GO_TARGET_INSTALL = "cmd"
+export GO_FLAGS = "-a"
+export CC_FOR_TARGET = "${CC}"
+export CXX_FOR_TARGET = "${CXX}"
+
+do_compile() {
+ export GOBIN="${B}/bin"
+ export TMPDIR="$GOTMPDIR"
+ export CC=$BUILD_CC
+
+ cd src
+ ./make.bash
+ cd ${B}
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.4.bb
deleted file mode 100644
index 64dc32c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.4.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Program for creating simple man pages"
-SECTION = "devel"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "autoconf-native automake-native"
-
-SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "544aca496a7d89de3e5d99e56a2f03d3"
-SRC_URI[sha256sum] = "d4ecf697d13f14dd1a78c5995f06459bff706fd1ce593d1c02d81667c0207753"
-
-inherit autotools native
-
-EXTRA_OECONF = "--disable-nls"
-
-# We don't want to reconfigure things as it would require 'perlnative' to be
-# used.
-do_configure() {
- oe_runconf
-}
-
-do_install_append () {
- # Make sure we use /usr/bin/env perl
- sed -i -e "1s:#!.*:#! /usr/bin/env perl:" ${D}${bindir}/help2man
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.5.bb
new file mode 100644
index 0000000..2dd6d38
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.5.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Program for creating simple man pages"
+SECTION = "devel"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+DEPENDS = "autoconf-native automake-native"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "1c886063c9e0ab463906de804596aa2f"
+SRC_URI[sha256sum] = "7ca60b2519fdbe97f463fe2df66a6188d18b514bfd44127d985f0234ee2461b1"
+
+inherit autotools native
+
+EXTRA_OECONF = "--disable-nls"
+
+# We don't want to reconfigure things as it would require 'perlnative' to be
+# used.
+do_configure() {
+ oe_runconf
+}
+
+do_install_append () {
+ # Make sure we use /usr/bin/env perl
+ sed -i -e "1s:#!.*:#! /usr/bin/env perl:" ${D}${bindir}/help2man
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch
new file mode 100644
index 0000000..5b1a538
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch
@@ -0,0 +1,32 @@
+From 01674fefe3bd24fd93412fbb3eb4e85fe70c80aa Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Mon, 18 Dec 2017 16:01:39 +0200
+Subject: [PATCH] i2c-tools: eeprog/Module.mk: Add missing dependency
+
+Absence of this dependency caused parallel build to run into a race
+and break.
+
+Upstream-Status: Accepted
+https://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git/commit/?id=f87c97317012a3b96b67237925893b8ffd5f4f50
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ eeprog/Module.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/eeprog/Module.mk b/eeprog/Module.mk
+index 9d36869..d215855 100644
+--- a/eeprog/Module.mk
++++ b/eeprog/Module.mk
+@@ -20,7 +20,7 @@ EEPROG_TARGETS := eeprog
+ # Programs
+ #
+
+-$(EEPROG_DIR)/eeprog: $(EEPROG_DIR)/eeprog.o $(EEPROG_DIR)/24cXX.o
++$(EEPROG_DIR)/eeprog: $(EEPROG_DIR)/eeprog.o $(EEPROG_DIR)/24cXX.o $(LIB_DEPS)
+ $(CC) $(LDFLAGS) -o $@ $^ $(EEPROG_LDFLAGS)
+
+ #
+--
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-lib-Module.mk-Add-missing-dependencies.patch b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-lib-Module.mk-Add-missing-dependencies.patch
new file mode 100644
index 0000000..426b433
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-lib-Module.mk-Add-missing-dependencies.patch
@@ -0,0 +1,37 @@
+From a6a59693066fd8da81f7107479df3e32a129247d Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Wed, 6 Dec 2017 09:55:04 +0100
+Subject: [PATCH] lib/Module.mk: Add missing dependencies
+
+The lib symlinks lacked a dependency to the actual library file, so
+parallel builds could run into a race and break.
+
+Upstream-Status: Backport
+
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ lib/Module.mk | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Module.mk b/lib/Module.mk
+index 432a051..fd2c8c4 100644
+--- a/lib/Module.mk
++++ b/lib/Module.mk
+@@ -42,11 +42,11 @@ endif
+ $(LIB_DIR)/$(LIB_SHLIBNAME): $(LIB_DIR)/smbus.o
+ $(CC) -shared $(LDFLAGS) -Wl,--version-script=$(LIB_DIR)/libi2c.map -Wl,-soname,$(LIB_SHSONAME) -o $@ $^ -lc
+
+-$(LIB_DIR)/$(LIB_SHSONAME):
++$(LIB_DIR)/$(LIB_SHSONAME): $(LIB_DIR)/$(LIB_SHLIBNAME)
+ $(RM) $@
+ $(LN) $(LIB_SHLIBNAME) $@
+
+-$(LIB_DIR)/$(LIB_SHBASENAME):
++$(LIB_DIR)/$(LIB_SHBASENAME): $(LIB_DIR)/$(LIB_SHLIBNAME)
+ $(RM) $@
+ $(LN) $(LIB_SHLIBNAME) $@
+
+--
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-tools-Module.mk-Add-missing-dependencies.patch b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-tools-Module.mk-Add-missing-dependencies.patch
new file mode 100644
index 0000000..33cf2d4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-tools-Module.mk-Add-missing-dependencies.patch
@@ -0,0 +1,66 @@
+From 08b0d67ba7eceb862cb17f52eb1911e9579726ea Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Thu, 14 Dec 2017 08:52:26 +0100
+Subject: [PATCH] tools/Module.mk: Add missing dependencies
+
+Better build the library before building the tools which link against
+it, otherwise parallel builds could run into a race and break.
+
+Upstream-Status: Backport
+
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+Tested-by: Angelo Compagnucci <angelo@amarulasolutions.com>
+Acked-by: Angelo Compagnucci <angelo@amarulasolutions.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ lib/Module.mk | 7 +++++++
+ tools/Module.mk | 10 +++++-----
+ 2 files changed, 12 insertions(+), 5 deletions(-)
+
+Index: i2c-tools-4.0/lib/Module.mk
+===================================================================
+--- i2c-tools-4.0.orig/lib/Module.mk
++++ i2c-tools-4.0/lib/Module.mk
+@@ -35,6 +35,13 @@ LIB_TARGETS += $(LIB_STLIBNAME)
+ LIB_OBJECTS += smbus.ao
+ endif
+
++# Library file to link against (static or dynamic)
++ifeq ($(USE_STATIC_LIB),1)
++LIB_DEPS := $(LIB_DIR)/$(LIB_STLIBNAME)
++else
++LIB_DEPS := $(LIB_DIR)/$(LIB_SHBASENAME)
++endif
++
+ #
+ # Libraries
+ #
+Index: i2c-tools-4.0/tools/Module.mk
+===================================================================
+--- i2c-tools-4.0.orig/tools/Module.mk
++++ i2c-tools-4.0/tools/Module.mk
+@@ -24,19 +24,19 @@ TOOLS_TARGETS := i2cdetect i2cdump i2cse
+ # Programs
+ #
+
+-$(TOOLS_DIR)/i2cdetect: $(TOOLS_DIR)/i2cdetect.o $(TOOLS_DIR)/i2cbusses.o
++$(TOOLS_DIR)/i2cdetect: $(TOOLS_DIR)/i2cdetect.o $(TOOLS_DIR)/i2cbusses.o $(LIB_DEPS)
+ $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
+
+-$(TOOLS_DIR)/i2cdump: $(TOOLS_DIR)/i2cdump.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
++$(TOOLS_DIR)/i2cdump: $(TOOLS_DIR)/i2cdump.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
+ $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
+
+-$(TOOLS_DIR)/i2cset: $(TOOLS_DIR)/i2cset.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
++$(TOOLS_DIR)/i2cset: $(TOOLS_DIR)/i2cset.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
+ $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
+
+-$(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
++$(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
+ $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
+
+-$(TOOLS_DIR)/i2ctransfer: $(TOOLS_DIR)/i2ctransfer.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
++$(TOOLS_DIR)/i2ctransfer: $(TOOLS_DIR)/i2ctransfer.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
+ $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
+
+ #
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/Module.mk b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/Module.mk
deleted file mode 100644
index fcaf72f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/Module.mk
+++ /dev/null
@@ -1,72 +0,0 @@
-# EEPROMER
-#
-# Licensed under the GNU General Public License.
-
-EEPROMER_DIR := eepromer
-
-EEPROMER_CFLAGS := -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \
- -Wcast-align -Wwrite-strings -Wnested-externs -Winline \
- -W -Wundef -Wmissing-prototypes -Iinclude
-
-EEPROMER_TARGETS := eepromer eeprom eeprog
-
-#
-# Programs
-#
-
-$(EEPROMER_DIR)/eepromer: $(EEPROMER_DIR)/eepromer.o
- $(CC) $(LDFLAGS) -o $@ $^
-
-$(EEPROMER_DIR)/eeprom: $(EEPROMER_DIR)/eeprom.o
- $(CC) $(LDFLAGS) -o $@ $^
-
-$(EEPROMER_DIR)/eeprog: $(EEPROMER_DIR)/eeprog.o $(EEPROMER_DIR)/24cXX.o
- $(CC) $(LDFLAGS) -o $@ $^
-
-#
-# Objects
-#
-
-$(EEPROMER_DIR)/eepromer.o: $(EEPROMER_DIR)/eepromer.c
- $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
-
-$(EEPROMER_DIR)/eeprom.o: $(EEPROMER_DIR)/eeprom.c
- $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
-
-$(EEPROMER_DIR)/eeprog.o: $(EEPROMER_DIR)/eeprog.c
- $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
-
-$(EEPROMER_DIR)/24cXX.o: $(EEPROMER_DIR)/24cXX.c
- $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
-
-#
-# Commands
-#
-
-all-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
-
-strip-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
- strip $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
-
-clean-eepromer:
- $(RM) $(addprefix $(EEPROMER_DIR)/,*.o $(EEPROMER_TARGETS))
-
-install-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
- $(INSTALL_DIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir)
- for program in $(EEPROMER_TARGETS) ; do \
- $(INSTALL_PROGRAM) $(EEPROMER_DIR)/$$program $(DESTDIR)$(sbindir) ; done
-
-uninstall-eepromer:
- for program in $(EEPROMER_TARGETS) ; do \
- $(RM) $(DESTDIR)$(sbindir)/$$program ; \
- $(RM) $(DESTDIR)$(man8dir)/$$program.8 ; done
-
-all: all-eepromer
-
-strip: strip-eepromer
-
-clean: clean-eepromer
-
-install: install-eepromer
-
-uninstall: uninstall-eepromer
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch
new file mode 100644
index 0000000..703688d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch
@@ -0,0 +1,98 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 226bc03acca44cf4b300597308064c44676b6f4b Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Tue, 23 Jan 2018 14:24:16 +0100
+Subject: Delete duplicate i2c-dev.h
+
+The <linux/i2c-dev.h> header file is provided by the kernel, so drop
+our own copy of this file.
+
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+Acked-by: Wolfram Sang <wsa@the-dreams.de>
+---
+ include/linux/i2c-dev.h | 72 -------------------------------------------------
+ 1 file changed, 72 deletions(-)
+ delete mode 100644 include/linux/i2c-dev.h
+
+diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h
+deleted file mode 100644
+index 839d25a..0000000
+--- a/include/linux/i2c-dev.h
++++ /dev/null
+@@ -1,72 +0,0 @@
+-/*
+- i2c-dev.h - i2c-bus driver, char device interface
+-
+- Copyright (C) 1995-97 Simon G. Vogl
+- Copyright (C) 1998-99 Frodo Looijaard <frodol@dds.nl>
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2 of the License, or
+- (at your option) any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program; if not, write to the Free Software
+- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+- MA 02110-1301 USA.
+-*/
+-
+-#ifndef _LINUX_I2C_DEV_H
+-#define _LINUX_I2C_DEV_H
+-
+-#include <linux/types.h>
+-
+-
+-/* /dev/i2c-X ioctl commands. The ioctl's parameter is always an
+- * unsigned long, except for:
+- * - I2C_FUNCS, takes pointer to an unsigned long
+- * - I2C_RDWR, takes pointer to struct i2c_rdwr_ioctl_data
+- * - I2C_SMBUS, takes pointer to struct i2c_smbus_ioctl_data
+- */
+-#define I2C_RETRIES 0x0701 /* number of times a device address should
+- be polled when not acknowledging */
+-#define I2C_TIMEOUT 0x0702 /* set timeout in units of 10 ms */
+-
+-/* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses
+- * are NOT supported! (due to code brokenness)
+- */
+-#define I2C_SLAVE 0x0703 /* Use this slave address */
+-#define I2C_SLAVE_FORCE 0x0706 /* Use this slave address, even if it
+- is already in use by a driver! */
+-#define I2C_TENBIT 0x0704 /* 0 for 7 bit addrs, != 0 for 10 bit */
+-
+-#define I2C_FUNCS 0x0705 /* Get the adapter functionality mask */
+-
+-#define I2C_RDWR 0x0707 /* Combined R/W transfer (one STOP only) */
+-
+-#define I2C_PEC 0x0708 /* != 0 to use PEC with SMBus */
+-#define I2C_SMBUS 0x0720 /* SMBus transfer */
+-
+-
+-/* This is the structure as used in the I2C_SMBUS ioctl call */
+-struct i2c_smbus_ioctl_data {
+- __u8 read_write;
+- __u8 command;
+- __u32 size;
+- union i2c_smbus_data *data;
+-};
+-
+-/* This is the structure as used in the I2C_RDWR ioctl call */
+-struct i2c_rdwr_ioctl_data {
+- struct i2c_msg *msgs; /* pointers to i2c_msgs */
+- __u32 nmsgs; /* number of i2c_msgs */
+-};
+-
+-#define I2C_RDRW_IOCTL_MAX_MSGS 42
+-
+-
+-#endif /* _LINUX_I2C_DEV_H */
+--
+cgit v1.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb
deleted file mode 100644
index c017252..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "Set of i2c tools for linux"
-HOMEPAGE = "https://i2c.wiki.kernel.org/index.php/I2C_Tools"
-SECTION = "base"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/${BP}.tar.bz2 \
- file://Module.mk \
-"
-SRC_URI[md5sum] = "7104a1043d11a5e2c7b131614eb1b962"
-SRC_URI[sha256sum] = "db5e69f2e2a6e3aa2ecdfe6a5f490b149c504468770f58921c8c5b8a7860a441"
-
-inherit autotools-brokensep
-
-do_compile_prepend() {
- cp ${WORKDIR}/Module.mk ${S}/eepromer/
- sed -i 's#/usr/local#/usr#' ${S}/Makefile
- echo "include eepromer/Module.mk" >> ${S}/Makefile
-}
-
-do_install_append() {
- install -d ${D}${includedir}/linux
- install -m 0644 include/linux/i2c-dev.h ${D}${includedir}/linux/i2c-dev-user.h
- rm -f ${D}${includedir}/linux/i2c-dev.h
-}
-
-PACKAGES =+ "${PN}-misc"
-FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \
- ${bindir}/ddcmon \
- ${bindir}/decode-edid \
- ${bindir}/decode-dimms \
- ${bindir}/decode-vaio \
- "
-RDEPENDS_${PN}-misc = "${PN} perl"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb
new file mode 100644
index 0000000..01ac47f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Set of i2c tools for linux"
+HOMEPAGE = "https://i2c.wiki.kernel.org/index.php/I2C_Tools"
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "${KERNELORG_MIRROR}/software/utils/i2c-tools/${BP}.tar.gz \
+ file://0001-lib-Module.mk-Add-missing-dependencies.patch \
+ file://0001-tools-Module.mk-Add-missing-dependencies.patch \
+ file://0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch \
+ file://remove-i2c-dev.patch \
+"
+
+SRC_URI[md5sum] = "d92a288d70f306d3895e3a7e9c14c9aa"
+SRC_URI[sha256sum] = "5b60daf6f011de0acb61de57dba62f2054bb39f19961d67e0c91610f071ca403"
+
+EXTRA_OEMAKE = "bindir=${bindir} sbindir=${sbindir} \
+ incdir=${includedir} libdir=${libdir} \
+ mandir=${mandir} \
+ EXTRA=eeprog"
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+}
+
+PACKAGES =+ "${PN}-misc"
+FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \
+ ${bindir}/ddcmon \
+ ${bindir}/decode-edid \
+ ${bindir}/decode-dimms \
+ ${bindir}/decode-vaio \
+ "
+RDEPENDS_${PN}-misc = "${PN} perl perl-module-posix \
+ perl-module-constant perl-module-file-basename \
+ perl-module-fcntl perl-module-strict perl-module-vars \
+ "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb
deleted file mode 100644
index f8f4aef..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "icecc environment setup script"
-DESCRIPTION = "This is a version of the icecc-create-env script that has \
-been modified in order to make it work with OE."
-SECTION = "base"
-# source file has just a "GPL" word, but upstream is GPLv2+.
-# most probably just GPL would be a mistake
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://icecc-create-env;beginline=2;endline=5;md5=ae1df3d6a058bfda40b66094c5f6065f"
-
-PR = "r2"
-
-DEPENDS = ""
-INHIBIT_DEFAULT_DEPS = "1"
-
-inherit native
-
-# This is needed, because otherwise there is dependency loop from quilt-native
-# Dependency loop #1 found:
-# Task 10907 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_install) (dependent Tasks ['quilt-native, do_compile'])
-# Task 10908 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_populate_sysroot) (dependent Tasks ['quilt-native, do_install'])
-# Task 10997 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_patch) (dependent Tasks ['icecc-create-env-native, do_unpack', 'quilt-native, do_populate_sysroot'])
-# Task 11001 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_configure) (dependent Tasks ['icecc-create-env-native, do_patch'])
-# Task 11002 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_compile) (dependent Tasks ['icecc-create-env-native, do_configure'])
-# Task 10998 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_install) (dependent Tasks ['icecc-create-env-native, do_compile'])
-# Task 10999 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_populate_sysroot) (dependent Tasks ['icecc-create-env-native, do_install'])
-# Task 10910 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_configure) (dependent Tasks ['quilt-native, do_patch', 'icecc-create-env-native, do_populate_sysroot'])
-# Task 10911 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_compile) (dependent Tasks ['quilt-native, do_configure'])
-PATCHTOOL = "patch"
-SRC_URI = "file://icecc-create-env"
-
-S = "${WORKDIR}"
-
-do_install() {
- install -d ${D}/${bindir}
- install -m 0755 ${WORKDIR}/icecc-create-env ${D}/${bindir}
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env b/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
index 7e4dbc4..64b5e20 100755
--- a/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
+++ b/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
@@ -4,69 +4,208 @@
# Copyright (C) 2004 by the Icecream Authors
# GPL
-target_files=
+target_paths=
+target_aliases=
-is_contained ()
+# Always prints, optionally to a log file
+print_output ()
{
- case " $target_files " in
- *" $1 "* ) return 0 ;;
- *"=$1 "* ) return 0;;
- * ) return 1 ;;
- esac
+ if test -n "$log_path"; then
+ echo "$@" | tee -a "$log_path"
+ else
+ echo "$@"
+ fi
+}
+
+# Only prints if the debug flag is specified
+print_debug ()
+{
+ if test -n "$debug"; then
+ print_output "$@"
+ fi
+}
+
+is_dynamic_elf ()
+{
+ # Is the file an dynamically linked ELF executable?
+ (file -L "$1" | grep 'ELF' > /dev/null 2>&1) && (! file -L "$1" | grep 'static' > /dev/null 2>&1)
+}
+
+fix_rpath ()
+{
+ # Patches the RPATH for a file. When the program is executed in the chroot
+ # be iceccd, /proc is not mounted. As such, $ORIGIN can't be resolved. To
+ # work around this, replace all instances of $ORIGIN in RPATH with the
+ # known chroot path to the executables directory
+ local path="$1"
+ local origin="$2"
+ if ! is_dynamic_elf "$path"; then
+ return
+ fi
+ local old_rpath="`$PATCHELF --print-rpath "$path"`"
+ local new_rpath="`echo "$old_rpath" | \
+ sed 's/.*\[\(.*\)\]/\1/g' | \
+ sed "s,\\\$ORIGIN,/$origin,g"`"
+
+ if test -n "$new_rpath"; then
+ print_debug "Converting RPATH '$old_rpath' -> '$new_rpath'"
+ $PATCHELF --set-rpath "$new_rpath" "$path"
+ fi
+}
+
+add_path ()
+{
+ case " $target_paths " in
+ *" $1 "*)
+ return 1
+ ;;
+ *)
+ target_paths="$target_paths $1"
+ return 0
+ ;;
+ esac
+}
+
+add_alias ()
+{
+ if test "$1" != "$2"; then
+ local alias="$1=$2"
+ case " $target_aliases " in
+ *" $alias "*)
+ ;;
+ *)
+ print_debug "Adding alias '$2' -> '$1'"
+ target_aliases="$target_aliases $alias"
+ ;;
+ esac
+ fi
+}
+
+normalize_path ()
+{
+ # Normalizes the path to a file or directory, removing all "." and ".."
+ # entries. Use pwd -L to explicitly prevent symlink expansion
+ local path=$1
+ if test -f "$path"; then
+ pushd $(dirname $path) > /dev/null 2>&1
+ dir_path=$(pwd -L)
+ path=$dir_path/$(basename $path)
+ popd > /dev/null 2>&1
+ elif test -d "$path"; then
+ pushd $path > /dev/null 2>&1
+ path=$(pwd -L)
+ popd > /dev/null 2>&1
+ fi
+ echo $path
+}
+
+add_file_common()
+{
+ local p="$1"
+ local path="$2"
+ local alias="$3"
+
+ add_alias "$path" "$p"
+ if test -n "$alias"; then
+ add_alias "$path" "$alias"
+ fi
+
+ add_path "$path" || return 1
+ print_debug "Adding file '$path'"
+
+ return 0
+}
+
+add_deps()
+{
+ local path="$1"
+ local interp="$2"
+
+ if test -n "$interp" && test -x "$interp"; then
+ # Use the dynamic loaders --list argument to list the
+ # dependencies. The program may have a different program
+ # interpreter (typical when using uninative tarballs), which is
+ # why we can't just call ldd.
+ deps="`$interp --list "$path"`"
+ else
+ deps="`ldd "$path"`"
+ fi
+
+ print_debug "Dependencies are:"
+ print_debug "$deps"
+ if test -n "$deps"; then
+ for lib in $deps; do
+ # ldd now outputs ld as /lib/ld-linux.so.xx on current nptl
+ # based glibc this regexp parse the outputs like:
+ # ldd /usr/bin/gcc
+ # linux-gate.so.1 => (0xffffe000)
+ # libc.so.6 => /lib/tls/libc.so.6 (0xb7e81000)
+ # /lib/ld-linux.so.2 (0xb7fe8000)
+ # covering both situations ( with => and without )
+ lib="`echo "$lib" | sed -n 's,^[^/]*\(/[^ ]*\).*,\1,p'`"
+
+ test -f "$lib" || continue
+ # Check whether the same library also exists in the parent
+ # directory, and prefer that on the assumption that it is a
+ # more generic one.
+ local baselib=`echo "$lib" | sed 's,\(/[^/]*\)/.*\(/[^/]*\)$,\1\2,'`
+ test -f "$baselib" && lib=$baselib
+ add_dependency "$lib" "$interp"
+ done
+ fi
+}
+
+add_dependency()
+{
+ local p=`normalize_path $1`
+ # readlink is required for Yocto, so we can use it
+ local path=`readlink -f "$p"`
+ local interp="$2"
+
+ add_file_common "$p" "$path" || return
+
+ if test -x "$path" && is_dynamic_elf "$path"; then
+ add_deps "$path" "$interp"
+ fi
}
add_file ()
{
- local name="$1"
- local path="$1";
- if test -n "$2"; then
- name="$2"
- fi
- test -z "$name" && return
- # ls -H isn't really the same as readlink, but
- # readlink is not portable enough.
- path=`ls -H $path`
- toadd="$name=$path"
- is_contained "$toadd" && return
- if test -z "$silent"; then
- echo "adding file $toadd"
- fi
- target_files="$target_files $toadd"
- if test -x "$path"; then
- # Only call ldd when it makes sense
- if file -L "$path" | grep 'ELF' > /dev/null 2>&1; then
- if ! file -L "$path" | grep 'static' > /dev/null 2>&1; then
- # ldd now outputs ld as /lib/ld-linux.so.xx on current nptl based glibc
- # this regexp parse the outputs like:
- # ldd /usr/bin/gcc
- # linux-gate.so.1 => (0xffffe000)
- # libc.so.6 => /lib/tls/libc.so.6 (0xb7e81000)
- # /lib/ld-linux.so.2 (0xb7fe8000)
- # covering both situations ( with => and without )
- for lib in `ldd "$path" | sed -n 's,^[^/]*\(/[^ ]*\).*,\1,p'`; do
- test -f "$lib" || continue
- # Check wether the same library also exists in the parent directory,
- # and prefer that on the assumption that it is a more generic one.
- local baselib=`echo "$lib" | sed 's,\(/[^/]*\)/.*\(/[^/]*\)$,\1\2,'`
- test -f "$baselib" && lib=$baselib
- add_file "$lib"
- done
- fi
+ local p=`normalize_path $1`
+ # readlink is required for Yocto, so we can use it
+ local path=`readlink -f "$p"`
+
+ add_file_common "$p" "$path" "$2" || return
+
+ if test -x "$path" && is_dynamic_elf "$path"; then
+ # Request the program interpeter (dynamic loader)
+ interp=`readelf -W -l "$path" | grep "Requesting program interpreter:" | sed "s/\s*\[Requesting program interpreter:\s*\(.*\)\]/\1/g"`
+ print_debug "Interpreter is '$interp'"
+
+ add_deps "$path" "$interp"
fi
- fi
}
-# backward compat
-if test "$1" = "--respect-path"; then
- shift
-fi
-
-#add a --silent switch to avoid "broken pipe" errors when calling this scipt from within OE
-if test "$1" = "--silent"; then
- silent=1
- shift
-fi
-
+while test -n "$1"; do
+ case "$1" in
+ --respect-path)
+ # Ignore for backward compatability
+ ;;
+ --debug)
+ debug=1
+ ;;
+ --log)
+ do_log=1
+ ;;
+ --extra=*)
+ extra_tools="$extra_tools ${1#--extra=}"
+ ;;
+ *)
+ break
+ ;;
+ esac
+ shift
+done
added_gcc=$1
shift
@@ -76,19 +215,35 @@
shift
archive_name=$1
+if test -n "$do_log"; then
+ log_path="$archive_name.log"
+ rm -f "$log_path"
+fi
+
+if test -z "$PATCHELF"; then
+ PATCHELF=`which patchelf 2> /dev/null`
+fi
+if test -z "$PATCHELF"; then
+ PATCHELF=`which patchelf-uninative 2> /dev/null`
+fi
+if test -z "$PATCHELF"; then
+ print_output "patchelf is required"
+ exit 1
+fi
+
if test -z "$added_gcc" || test -z "$added_gxx" ; then
- echo "usage: $0 <gcc_path> <g++_path>"
- exit 1
+ print_output "usage: $0 <gcc_path> <g++_path>"
+ exit 1
fi
if ! test -x "$added_gcc" ; then
- echo "'$added_gcc' is no executable."
- exit 1
+ print_output "'$added_gcc' is not executable."
+ exit 1
fi
if ! test -x "$added_gxx" ; then
- echo "'$added_gcc' is no executable."
- exit 1
+ print_output "'$added_gcc' is not executable."
+ exit 1
fi
@@ -97,96 +252,131 @@
add_file $added_gxx /usr/bin/g++
if test -z "$added_as" ; then
- add_file /usr/bin/as /usr/bin/as
+ add_file /usr/bin/as /usr/bin/as
else
- if ! test -x "$added_as" ; then
- echo "'$added_as' is no executable."
- exit 1
- fi
+ if ! test -x "$added_as" ; then
+ print_output "'$added_as' is not executable."
+ exit 1
+ fi
- add_file $added_as /usr/bin/as
+ add_file $added_as /usr/bin/as
fi
add_file `$added_gcc -print-prog-name=cc1` /usr/bin/cc1
add_file `$added_gxx -print-prog-name=cc1plus` /usr/bin/cc1plus
specfile=`$added_gcc -print-file-name=specs`
if test -n "$specfile" && test -e "$specfile"; then
- add_file "$specfile"
+ add_file "$specfile"
fi
ltofile=`$added_gcc -print-prog-name=lto1`
-pluginfile="${ltofile%lto1}liblto_plugin.so"
+pluginfile=`normalize_path "${ltofile%lto1}liblto_plugin.so"`
if test -r "$pluginfile"
then
- add_file $pluginfile ${pluginfile#*usr}
- add_file $pluginfile /usr${pluginfile#*usr}
+ add_file $pluginfile ${pluginfile#*usr}
+ add_file $pluginfile /usr${pluginfile#*usr}
fi
+# for testing the environment is usable at all
+if test -x /bin/true; then
+ add_file /bin/true
+elif test -x /usr/bin/true; then
+ add_file /usr/bin/true /bin/true
+else
+ print_output "'true' not found"
+ exit 1
+fi
+
+for extra in $extra_tools; do
+ if test -x "$extra"; then
+ add_file "$extra"
+ else
+ print_output "'$extra' not found"
+ exit 1
+ fi
+done
+
+link_rel ()
+{
+ local target="$1"
+ local name="$2"
+ local base="$3"
+
+ local prefix=`dirname $name`
+
+ prefix=`echo $prefix | sed 's,[^/]\+,..,g' | sed 's,^/*,,g'`
+
+ ln -s $prefix/$target $base/$name
+}
+
tempdir=`mktemp -d /tmp/iceccenvXXXXXX`
-new_target_files=
-for i in $target_files; do
- case $i in
- *=/*)
+target_files=
+for path in $target_paths; do
+ mkdir -p $tempdir/`dirname $path`
+ cp -pH $path $tempdir/$path
+
+ if test -f $tempdir/$path -a -x $tempdir/$path; then
+ strip -s $tempdir/$path 2>/dev/null
+ fi
+
+ fix_rpath $tempdir/$path `dirname $path`
+ target_files="$target_files $path"
+done
+
+for i in $target_aliases; do
target=`echo $i | cut -d= -f1`
- path=`echo $i | cut -d= -f2`
- ;;
- *)
- path=$i
- target=$i
- ;;
- esac
- mkdir -p $tempdir/`dirname $target`
- cp -p $path $tempdir/$target
- if test -f $tempdir/$target -a -x $tempdir/$target; then
- strip -s $tempdir/$target 2>/dev/null
- fi
- target=`echo $target | cut -b2-`
- new_target_files="$new_target_files $target"
+ link_name=`echo $i | cut -d= -f2`
+
+ mkdir -p $tempdir/`dirname $link_name`
+ # Relative links are used because the files are checked for being
+ # executable outside the chroot
+ link_rel $target $link_name $tempdir
+
+ link_name=`echo $link_name | cut -b2-`
+ target_files="$target_files $link_name"
done
#sort the files
-target_files=`for i in $new_target_files; do echo $i; done | sort`
+target_files=`for i in $target_files; do echo $i; done | sort`
#test if an archive name was supplied
#if not use the md5 of all files as the archive name
if test -z "$archive_name"; then
- md5sum=NONE
- for file in /usr/bin/md5sum /bin/md5 /usr/bin/md5; do
- if test -x $file; then
- md5sum=$file
- break
- fi
- done
+ md5sum=NONE
+ for file in /usr/bin/md5sum /bin/md5 /usr/bin/md5; do
+ if test -x $file; then
+ md5sum=$file
+ break
+ fi
+ done
- #calculate md5 and use it as the archive name
- archive_name=`for i in $target_files; do test -f $tempdir/$i && $md5sum $tempdir/$i; done | sed -e 's/ .*$//' | $md5sum | sed -e 's/ .*$//'`.tar.gz || {
- if test -z "$silent"; then
- echo "Couldn't compute MD5 sum."
- fi
- exit 2
- }
- mydir=`pwd`
-else
- mydir="`dirname "$archive_name"`"
-
- #check if we have a full path or only a filename
- if test "$mydir" = "." ; then
+ #calculate md5 and use it as the archive name
+ archive_name=`for i in $target_files; do test -f $tempdir/$i && $md5sum $tempdir/$i; done | sed -e 's/ .*$//' | $md5sum | sed -e 's/ .*$//'`.tar.gz || {
+ print_output "Couldn't compute MD5 sum."
+ exit 2
+ }
mydir=`pwd`
- else
- mydir=""
- fi
+else
+ mydir="`dirname "$archive_name"`"
+
+ #check if we have a full path or only a filename
+ if test "$mydir" = "." ; then
+ mydir=`pwd`
+ else
+ mydir=""
+ fi
fi
-if test -z "$silent"; then
-echo "creating $archive_name"
-fi
+print_output "creating $archive_name"
cd $tempdir
-tar -czhf "$mydir/$archive_name" $target_files || {
- if test -z "$silent"; then
- echo "Couldn't create archive"
- fi
- exit 3
+# Add everything in the temp directory. Tar doesn't like to be given files with
+# ".." in them, which frequently happens in $target_files, and will strip off
+# the path prefix past the offending "..". This makes the archive generate
+# incorrectly
+tar -czf "$mydir/$archive_name" . || {
+ print_output "Couldn't create archive"
+ exit 3
}
cd ..
rm -rf $tempdir
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb
new file mode 100644
index 0000000..053945e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb
@@ -0,0 +1,36 @@
+SUMMARY = "icecc environment setup script"
+DESCRIPTION = "This is a version of the icecc-create-env script that has \
+been modified in order to make it work with OE."
+SECTION = "base"
+# source file has just a "GPL" word, but upstream is GPLv2+.
+# most probably just GPL would be a mistake
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://icecc-create-env;beginline=2;endline=5;md5=ae1df3d6a058bfda40b66094c5f6065f"
+
+PR = "r2"
+
+DEPENDS = ""
+INHIBIT_DEFAULT_DEPS = "1"
+
+# This is needed, because otherwise there is dependency loop from quilt-native
+# Dependency loop #1 found:
+# Task 10907 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_install) (dependent Tasks ['quilt-native, do_compile'])
+# Task 10908 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_populate_sysroot) (dependent Tasks ['quilt-native, do_install'])
+# Task 10997 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_patch) (dependent Tasks ['icecc-create-env-native, do_unpack', 'quilt-native, do_populate_sysroot'])
+# Task 11001 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_configure) (dependent Tasks ['icecc-create-env-native, do_patch'])
+# Task 11002 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_compile) (dependent Tasks ['icecc-create-env-native, do_configure'])
+# Task 10998 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_install) (dependent Tasks ['icecc-create-env-native, do_compile'])
+# Task 10999 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_populate_sysroot) (dependent Tasks ['icecc-create-env-native, do_install'])
+# Task 10910 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_configure) (dependent Tasks ['quilt-native, do_patch', 'icecc-create-env-native, do_populate_sysroot'])
+# Task 10911 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_compile) (dependent Tasks ['quilt-native, do_configure'])
+PATCHTOOL = "patch"
+SRC_URI = "file://icecc-create-env"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}/${bindir}
+ install -m 0755 ${WORKDIR}/icecc-create-env ${D}/${bindir}
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh
new file mode 100644
index 0000000..9476007
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh
@@ -0,0 +1,49 @@
+#! /bin/sh
+# Copyright (c) 2018 Joshua Watt, Garmin International,Inc.
+#
+# 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 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.
+#
+
+if [ -z "$ICECC_PATH" ]; then
+ ICECC_PATH=$(which icecc 2> /dev/null)
+fi
+
+if [ -n "$ICECC_PATH" ]; then
+ # Default to disabling the caret workaround. If set to "1", icecc will
+ # locally recompile any files that have warnings, which can adversely
+ # affect performance.
+ #
+ # See: https://github.com/icecc/icecream/issues/190
+ if [ -z "$ICECC_CARET_WORKAROUND" ]; then
+ ICECC_CARET_WORKAROUND="0"
+ fi
+ if [ "$ICECC_CARET_WORKAROUND" != "1" ]; then
+ CFLAGS="$CFLAGS -fno-diagnostics-show-caret"
+ CXXFLAGS="$CXXFLAGS -fno-diagnostics-show-caret"
+ fi
+ export ICECC_PATH ICECC_CARET_WORKAROUND
+ export ICECC_VERSION="$OECORE_NATIVE_SYSROOT/usr/share/icecream/@TOOLCHAIN_ENV@"
+ export ICECC="$(which ${CROSS_COMPILE}gcc)"
+ export ICECXX="$(which ${CROSS_COMPILE}g++)"
+ export ICEAS="$(which ${CROSS_COMPILE}as)"
+ export PATH="$OECORE_NATIVE_SYSROOT/usr/share/icecream/bin:$PATH"
+else
+ echo "Icecc not found. Disabling distributed compiling"
+fi
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-setup.sh b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-setup.sh
new file mode 100644
index 0000000..0480826
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-setup.sh
@@ -0,0 +1,43 @@
+#! /bin/sh
+# Copyright (c) 2018 Joshua Watt, Garmin International,Inc.
+#
+# 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 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.
+#
+
+# Setup environment
+for env_setup_script in `ls $1/environment-setup-*`; do
+ . $env_setup_script
+done
+
+# ICECC_PATH will have been found icecc-env.sh
+if [ -z "$ICECC_PATH" ]; then
+ exit 0
+fi
+
+echo "Setting up IceCream distributed compiling..."
+
+# Create the environment
+mkdir -p "`dirname $ICECC_VERSION`"
+icecc-create-env $ICECC $ICECXX $ICEAS $ICECC_VERSION || exit $?
+
+# Create symbolic links
+d="$OECORE_NATIVE_SYSROOT/usr/share/icecream/bin"
+mkdir -p "$d"
+ln -s "$ICECC_PATH" "$d/${CROSS_COMPILE}gcc"
+ln -s "$ICECC_PATH" "$d/${CROSS_COMPILE}g++"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb
new file mode 100644
index 0000000..9d2750e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb
@@ -0,0 +1,38 @@
+# Copyright (c) 2018 Joshua Watt, Garmin International,Inc.
+# Released under the MIT license (see COPYING.MIT for the terms)
+SUMMARY = "Generates Icecream toolchain for SDK"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/icecc-env.sh;beginline=2;endline=20;md5=dd6b68c1efed8a9fb04e409b3b287d47"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+SRC_URI = "\
+ file://icecc-env.sh \
+ file://icecc-setup.sh \
+ "
+
+inherit nativesdk
+
+ENV_NAME="${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TUNE_PKGARCH}-${DISTRO_VERSION}.tar.gz"
+
+do_compile() {
+}
+
+do_install() {
+ install -d ${D}${SDKPATHNATIVE}${datadir}/icecream/bin
+
+ install -d ${D}${SDKPATHNATIVE}/environment-setup.d/
+ install -m 0644 ${WORKDIR}/icecc-env.sh ${D}${SDKPATHNATIVE}/environment-setup.d/
+ sed -i ${D}${SDKPATHNATIVE}/environment-setup.d/icecc-env.sh \
+ -e "s,@TOOLCHAIN_ENV@,${ENV_NAME},g"
+
+ install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d/
+ install -m 0755 ${WORKDIR}/icecc-setup.sh ${D}${SDKPATHNATIVE}/post-relocate-setup.d/
+ sed -i ${D}${SDKPATHNATIVE}/post-relocate-setup.d/icecc-setup.sh \
+ -e "s,@TOOLCHAIN_ENV@,${ENV_NAME},g"
+}
+
+PACKAGES = "${PN}"
+FILES_${PN} = "${SDKPATHNATIVE}"
+RDEPENDS_${PN} += "nativesdk-icecc-create-env"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/perl-522-deprecations.patch b/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/perl-522-deprecations.patch
index eb52172..f1049e4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/perl-522-deprecations.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/perl-522-deprecations.patch
@@ -10,9 +10,11 @@
Upstream-Status: Submitted (https://bugs.launchpad.net/intltool/+bug/1465010)
Signed-off-by: Ross Burton <ross.burton@intel.com>
---- intltool-0.51.0-ORIG/intltool-update.in 2015-05-27 00:20:43.038379963 +0200
-+++ intltool-0.51.0/intltool-update.in 2015-05-27 00:23:53.309078052 +0200
-@@ -1062,7 +1062,7 @@
+Index: intltool-0.51.0/intltool-update.in
+===================================================================
+--- intltool-0.51.0.orig/intltool-update.in
++++ intltool-0.51.0/intltool-update.in
+@@ -1062,7 +1062,7 @@ sub SubstituteVariable
}
}
@@ -21,7 +23,7 @@
{
my $rest = $3;
my $untouched = $1;
-@@ -1190,10 +1190,10 @@
+@@ -1190,10 +1190,10 @@ sub FindPackageName
$name =~ s/\(+$//g;
$version =~ s/\(+$//g;
@@ -36,7 +38,7 @@
}
if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)[,]?([^,\)]+)?/m)
-@@ -1219,11 +1219,11 @@
+@@ -1219,11 +1219,11 @@ sub FindPackageName
$version =~ s/\(+$//g;
$bugurl =~ s/\(+$//g if (defined $bugurl);
@@ -52,4 +54,4 @@
+ $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\$\{?\w+\}?/);
}
- # \s makes this not work, why?
\ No newline at end of file
+ # \s makes this not work, why?
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch
deleted file mode 100644
index 537be5e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 7b24f8bd95ad4f7d00c93ca2ad998c14a0266dbe Mon Sep 17 00:00:00 2001
-From: marxin <mliska@suse.cz>
-Date: Tue, 21 Mar 2017 08:42:11 +0100
-Subject: [PATCH] Add FALLTHRU comment to handle GCC7 warnings.
-
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- json_object.c | 1 +
- json_tokener.c | 1 +
- linkhash.c | 22 +++++++++++-----------
- 3 files changed, 13 insertions(+), 11 deletions(-)
-
-diff --git a/json_object.c b/json_object.c
-index 6cc73bc..77e8b21 100644
---- a/json_object.c
-+++ b/json_object.c
-@@ -552,6 +552,7 @@ int64_t json_object_get_int64(struct json_object *jso)
- return jso->o.c_boolean;
- case json_type_string:
- if (json_parse_int64(jso->o.c_string.str, &cint) == 0) return cint;
-+ /* FALLTHRU */
- default:
- return 0;
- }
-diff --git a/json_tokener.c b/json_tokener.c
-index 9a76293..ae7b1ae 100644
---- a/json_tokener.c
-+++ b/json_tokener.c
-@@ -305,6 +305,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
- tok->err = json_tokener_error_parse_unexpected;
- goto out;
- }
-+ /* FALLTHRU */
- case '"':
- state = json_tokener_state_string;
- printbuf_reset(tok->pb);
-diff --git a/linkhash.c b/linkhash.c
-index 712c387..74e3b0f 100644
---- a/linkhash.c
-+++ b/linkhash.c
-@@ -376,17 +376,17 @@ static uint32_t hashlittle( const void *key, size_t length, uint32_t initval)
- /*-------------------------------- last block: affect all 32 bits of (c) */
- switch(length) /* all the case statements fall through */
- {
-- case 12: c+=((uint32_t)k[11])<<24;
-- case 11: c+=((uint32_t)k[10])<<16;
-- case 10: c+=((uint32_t)k[9])<<8;
-- case 9 : c+=k[8];
-- case 8 : b+=((uint32_t)k[7])<<24;
-- case 7 : b+=((uint32_t)k[6])<<16;
-- case 6 : b+=((uint32_t)k[5])<<8;
-- case 5 : b+=k[4];
-- case 4 : a+=((uint32_t)k[3])<<24;
-- case 3 : a+=((uint32_t)k[2])<<16;
-- case 2 : a+=((uint32_t)k[1])<<8;
-+ case 12: c+=((uint32_t)k[11])<<24; /* FALLTHRU */
-+ case 11: c+=((uint32_t)k[10])<<16; /* FALLTHRU */
-+ case 10: c+=((uint32_t)k[9])<<8; /* FALLTHRU */
-+ case 9 : c+=k[8]; /* FALLTHRU */
-+ case 8 : b+=((uint32_t)k[7])<<24; /* FALLTHRU */
-+ case 7 : b+=((uint32_t)k[6])<<16; /* FALLTHRU */
-+ case 6 : b+=((uint32_t)k[5])<<8; /* FALLTHRU */
-+ case 5 : b+=k[4]; /* FALLTHRU */
-+ case 4 : a+=((uint32_t)k[3])<<24; /* FALLTHRU */
-+ case 3 : a+=((uint32_t)k[2])<<16; /* FALLTHRU */
-+ case 2 : a+=((uint32_t)k[1])<<8; /* FALLTHRU */
- case 1 : a+=k[0];
- break;
- case 0 : return c;
---
-2.12.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.1.bb
deleted file mode 100644
index 401cf13..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.1.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "C bindings for apps which will manipulate JSON data"
-DESCRIPTION = "JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C."
-HOMEPAGE = "https://github.com/json-c/json-c/wiki"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
-
-SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
- file://0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch \
- "
-SRC_URI[md5sum] = "55f7853f7d8cf664554ce3fa71bf1c7d"
-SRC_URI[sha256sum] = "2a136451a7932d80b7d197b10441e26e39428d67b1443ec43bbba824705e1123"
-
-UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+).tar"
-# json-c releases page is fetching the list of releases in some weird XML format
-# from https://s3.amazonaws.com/json-c_releases and processes it with javascript :-/
-#UPSTREAM_CHECK_URI = "https://s3.amazonaws.com/json-c_releases/releases/index.html"
-RECIPE_UPSTREAM_VERSION = "0.12.1"
-RECIPE_UPSTREAM_DATE = "Jun 07, 2016"
-CHECK_DATE = "Apr 19, 2017"
-
-RPROVIDES_${PN} = "libjson"
-
-inherit autotools
-
-EXTRA_OECONF = "--enable-rdrand"
-
-do_configure_prepend() {
- # Clean up autoconf cruft that should not be in the tarball
- rm -f ${S}/config.status
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.13.bb b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.13.bb
new file mode 100644
index 0000000..06319de
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.13.bb
@@ -0,0 +1,31 @@
+SUMMARY = "C bindings for apps which will manipulate JSON data"
+DESCRIPTION = "JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C."
+HOMEPAGE = "https://github.com/json-c/json-c/wiki"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
+
+SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
+ "
+SRC_URI[md5sum] = "11fc5d90c77375e5fc8401e8b9efbf21"
+SRC_URI[sha256sum] = "0316780be9ad16c42d7c26b015a784fd5df4b0909fef0aba51cfb13e492ac24d"
+
+UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+).tar"
+# json-c releases page is fetching the list of releases in some weird XML format
+# from https://s3.amazonaws.com/json-c_releases and processes it with javascript :-/
+#UPSTREAM_CHECK_URI = "https://s3.amazonaws.com/json-c_releases/releases/index.html"
+RECIPE_UPSTREAM_VERSION = "0.13"
+RECIPE_UPSTREAM_DATE = "Dec 07, 2017"
+CHECK_DATE = "Jan 31, 2018"
+
+RPROVIDES_${PN} = "libjson"
+
+inherit autotools
+
+EXTRA_OECONF = "--enable-rdrand"
+
+do_configure_prepend() {
+ # Clean up autoconf cruft that should not be in the tarball
+ rm -f ${S}/config.status
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
index 280edb7..cbd0362 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
@@ -1,7 +1,8 @@
-From 3012a93745223751cc979e3770207a09a075bec6 Mon Sep 17 00:00:00 2001
+From 2bf0666544293dcfac2f67b678e24353acdcd4e7 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Tue, 7 Feb 2017 12:16:03 +0200
-Subject: [PATCH 5/5] Get parameters for both libsolv and libsolvext (libdnf is
+Subject: [PATCH 2/2] Get parameters for both libsolv and libsolvext (libdnf is
+
using both)
Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312]
@@ -12,12 +13,12 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8b2ab9a..e2d33d7 100644
+index ca280f3..6ab9827 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,7 +29,7 @@ find_package (PkgConfig REQUIRED)
SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
- PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.44.0 REQUIRED)
+ PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.46.0 REQUIRED)
FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
-PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
+PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv libsolvext)
@@ -25,5 +26,5 @@
if (ENABLE_RHSM_SUPPORT)
pkg_check_modules (RHSM REQUIRED librhsm)
--
-2.11.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
index 1ea9310..6cf48a4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
@@ -1,7 +1,8 @@
-From 55cbe6f40fe0836385e1a7241ec811cbe99e5840 Mon Sep 17 00:00:00 2001
+From bcea5c5063a2d5f07dbe6f40aee30370fc4ba656 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 30 Dec 2016 18:24:50 +0200
-Subject: [PATCH 4/5] Set libsolv variables with pkg-config (cmake's own module
+Subject: [PATCH 1/2] Set libsolv variables with pkg-config (cmake's own module
+
doesn't work properly).
Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312]
@@ -12,12 +13,12 @@
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index a75df04..8b2ab9a 100644
+index 8875bbf..ca280f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,7 +29,8 @@ find_package (PkgConfig REQUIRED)
SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
- PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.44.0 REQUIRED)
+ PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.46.0 REQUIRED)
FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
-find_package (LibSolv 0.6.21 REQUIRED COMPONENTS ext)
+PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
@@ -26,5 +27,5 @@
pkg_check_modules (RHSM REQUIRED librhsm)
include_directories (${RHSM_INCLUDE_DIRS})
--
-2.11.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.11.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.11.1.bb
new file mode 100644
index 0000000..4fc1d6d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.11.1.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Library providing simplified C and Python API to libsolv"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "git://github.com/rpm-software-management/libdnf \
+ file://0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch \
+ file://0002-Prefix-sysroot-path-to-introspection-tools-path.patch \
+ file://0003-Set-the-library-installation-directory-correctly.patch \
+ file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \
+ file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \
+ "
+
+SRCREV = "60f979bd8db651229c559c1412f1eb880257127d"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc"
+
+inherit gtk-doc gobject-introspection cmake pkgconfig distutils3-base
+
+EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF -DPYTHON_DESIRED=3 \
+ ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DWITH_GIR=ON', '-DWITH_GIR=OFF', d)} \
+ "
+EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"
+EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.9.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.9.3.bb
deleted file mode 100644
index 01d9346..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.9.3.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Library providing simplified C and Python API to libsolv"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-SRC_URI = "git://github.com/rpm-software-management/libdnf \
- file://0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch \
- file://0002-Prefix-sysroot-path-to-introspection-tools-path.patch \
- file://0003-Set-the-library-installation-directory-correctly.patch \
- file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \
- file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \
- "
-
-SRCREV = "1b19950e82d88eec28d01b4e7c1da712c941201d"
-
-S = "${WORKDIR}/git"
-
-DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc"
-
-inherit gtk-doc gobject-introspection cmake pkgconfig distutils3-base
-
-EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF -DPYTHON_DESIRED=3 \
- ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DWITH_GIR=ON', '-DWITH_GIR=OFF', d)} \
- "
-EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"
-EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
-
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
deleted file mode 100644
index 08a58f1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 36d87919223db9b054862ad38cdda8d9222a2bab Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 30 Dec 2016 18:04:35 +0200
-Subject: [PATCH 1/4] Correctly set the library installation directory
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/librepo/pull/110]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- librepo/CMakeLists.txt | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/librepo/CMakeLists.txt b/librepo/CMakeLists.txt
-index 2fe76d8..5026def 100644
---- a/librepo/CMakeLists.txt
-+++ b/librepo/CMakeLists.txt
-@@ -60,7 +60,8 @@ CONFIGURE_FILE("version.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/version.h" @ONLY)
- IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
- SET (LIB_SUFFIX "64")
- ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
--SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
-+#SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
-+SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
-
- INSTALL(FILES ${librepo_HEADERS} DESTINATION include/librepo)
- INSTALL(TARGETS librepo LIBRARY DESTINATION ${LIB_INSTALL_DIR})
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
index 7138dfc..d69deb5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
@@ -1,41 +1,62 @@
-From 1570ad33dd7e5d83f3ee80bd104b114709ac1e34 Mon Sep 17 00:00:00 2001
+From 5b6849d9d7e030c3a521b5245d86f853b0271a61 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 30 Dec 2016 18:05:36 +0200
-Subject: [PATCH 2/4] Do not try to obtain PYTHON_INSTALL_DIR by running
+Subject: [PATCH 1/2] Do not try to obtain PYTHON_INSTALL_DIR by running
python.
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
- librepo/python/python2/CMakeLists.txt | 2 +-
- librepo/python/python3/CMakeLists.txt | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
+ librepo/python/python2/CMakeLists.txt | 12 ++++++------
+ librepo/python/python3/CMakeLists.txt | 12 ++++++------
+ 2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/librepo/python/python2/CMakeLists.txt b/librepo/python/python2/CMakeLists.txt
-index 3615e17..cffa99f 100644
+index 5ffbd62..90d3c22 100644
--- a/librepo/python/python2/CMakeLists.txt
+++ b/librepo/python/python2/CMakeLists.txt
-@@ -1,6 +1,6 @@
+@@ -1,11 +1,11 @@
FIND_PACKAGE (PythonLibs 2 )
FIND_PACKAGE (PythonInterp 2 REQUIRED)
--EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
-+#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
+-from sys import stdout
+-from distutils import sysconfig
+-path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
+-stdout.write(path)"
+-OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
++#from sys import stdout
++#from distutils import sysconfig
++#path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
++#stdout.write(path)"
++#OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
diff --git a/librepo/python/python3/CMakeLists.txt b/librepo/python/python3/CMakeLists.txt
-index dfecac9..38bcc72 100644
+index 47559f7..b39adc2 100644
--- a/librepo/python/python3/CMakeLists.txt
+++ b/librepo/python/python3/CMakeLists.txt
-@@ -10,7 +10,7 @@ message("--- ${PYTHON_INCLUDE_DIR}")
+@@ -10,12 +10,12 @@ message("--- ${PYTHON_INCLUDE_DIR}")
FIND_PACKAGE(PythonLibs 3.0)
FIND_PACKAGE(PythonInterp 3.0 REQUIRED)
--EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
-+#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
+-from sys import stdout
+-from distutils import sysconfig
+-path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
+-stdout.write(path)"
+-OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
++#from sys import stdout
++#from distutils import sysconfig
++#path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
++#stdout.write(path)"
++#OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
MESSAGE(STATUS "Python3 install dir is ${PYTHON_INSTALL_DIR}")
--
-2.11.0
+2.14.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch
deleted file mode 100644
index 89ca60e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From b1a5c92dbd1d11f1afdc094fccea64de334d2783 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 30 Dec 2016 18:06:24 +0200
-Subject: [PATCH 3/4] tests: fix a race when deleting temporary directories
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/librepo/pull/110]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- tests/python/tests/test_yum_repo_downloading.py | 2 +-
- tests/python/tests/test_yum_repo_locating.py | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tests/python/tests/test_yum_repo_downloading.py b/tests/python/tests/test_yum_repo_downloading.py
-index ad597dc..4a32519 100644
---- a/tests/python/tests/test_yum_repo_downloading.py
-+++ b/tests/python/tests/test_yum_repo_downloading.py
-@@ -32,7 +32,7 @@ class TestCaseYumRepoDownloading(TestCaseWithFlask):
- os.environ.pop('GNUPGHOME')
- else:
- os.environ['GNUPGHOME'] = self._gnupghome
-- shutil.rmtree(self.tmpdir)
-+ shutil.rmtree(self.tmpdir, True)
-
- def test_download_repo_01(self):
- h = librepo.Handle()
-diff --git a/tests/python/tests/test_yum_repo_locating.py b/tests/python/tests/test_yum_repo_locating.py
-index 8f4bea5..db4294c 100644
---- a/tests/python/tests/test_yum_repo_locating.py
-+++ b/tests/python/tests/test_yum_repo_locating.py
-@@ -34,7 +34,7 @@ class TestCaseYumRepoLocating(TestCase):
- os.environ.pop('GNUPGHOME')
- else:
- os.environ['GNUPGHOME'] = self._gnupghome
-- shutil.rmtree(self.tmpdir)
-+ shutil.rmtree(self.tmpdir, True)
-
- def test_read_mirrorlist(self):
- h = librepo.Handle()
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch
deleted file mode 100644
index b0c7d1c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From a4bbbccce6edc1a2d1bd475506e2975fd7696c88 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 8 Jun 2017 16:31:30 +0800
-Subject: [PATCH] Fix typo: correct LRO_SSLVERIFYHOST with
- CURLOPT_SSL_VERIFYHOST
-
-In commit 51d32c6cd88ba0139c32793183fd6a236c1ef456
----
-Author: Tomas Mlcoch <tmlcoch@redhat.com>
-Date: Mon May 5 14:31:35 2014 +0200
-
- Add LRO_SSLVERIFYPEER and LRO_SSLVERIFYHOST options (RhBug: 1093014)
----
-
-It incorrectly setopt CURLOPT_SSL_VERIFYPEER for LRO_SSLVERIFYHOST.
-Use CURLOPT_SSL_VERIFYHOST to correct.
-
-Upstream-Status: Submitted
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- librepo/handle.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/librepo/handle.c b/librepo/handle.c
-index ccea79b..ff39db4 100644
---- a/librepo/handle.c
-+++ b/librepo/handle.c
-@@ -629,7 +629,7 @@ lr_handle_setopt(LrHandle *handle,
-
- case LRO_SSLVERIFYHOST:
- handle->sslverifyhost = va_arg(arg, long) ? 2 : 0;
-- c_rc = curl_easy_setopt(c_h, CURLOPT_SSL_VERIFYPEER, handle->sslverifyhost);
-+ c_rc = curl_easy_setopt(c_h, CURLOPT_SSL_VERIFYHOST, handle->sslverifyhost);
- break;
-
- case LRO_SSLCLIENTCERT:
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_1.8.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_1.8.1.bb
new file mode 100644
index 0000000..4569885
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_1.8.1.bb
@@ -0,0 +1,21 @@
+SUMMARY = " A library providing C and Python (libcURL like) API for downloading linux repository metadata and packages."
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "git://github.com/rpm-software-management/librepo.git \
+ file://0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch \
+ file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \
+ "
+
+SRCREV = "7b9b7bf388f3f059529c6f50c40b30919fef30f9"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "curl expat glib-2.0 openssl attr gpgme"
+
+inherit cmake distutils3-base pkgconfig
+
+EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3 -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF"
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_git.bb
deleted file mode 100644
index 3238b14..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_git.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = " A library providing C and Python (libcURL like) API for downloading linux repository metadata and packages."
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-SRC_URI = "git://github.com/rpm-software-management/librepo.git \
- file://0001-Correctly-set-the-library-installation-directory.patch \
- file://0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch \
- file://0003-tests-fix-a-race-when-deleting-temporary-directories.patch \
- file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \
- file://0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch \
- "
-
-PV = "1.7.20+git${SRCPV}"
-SRCREV = "e1137cbbda78fecb192146300790680a5bc811b1"
-
-S = "${WORKDIR}/git"
-
-DEPENDS = "curl expat glib-2.0 openssl attr libcheck gpgme"
-
-inherit cmake distutils3-base pkgconfig
-
-EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3"
-
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-Disable-generating-a-native-llvm-config.patch b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-Disable-generating-a-native-llvm-config.patch
new file mode 100644
index 0000000..2809e4c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-Disable-generating-a-native-llvm-config.patch
@@ -0,0 +1,41 @@
+From 7f7743ce233fcd735ec580c75270413493658aa6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 19 Apr 2018 18:08:31 -0700
+Subject: [PATCH] Disable generating a native llvm-config
+
+OpenEmbedded already builds this as part of llvm-native
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tools/llvm-config/CMakeLists.txt | 16 ----------------
+ 1 file changed, 16 deletions(-)
+
+diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt
+index 25f99cec978..c45e9b642a8 100644
+--- a/tools/llvm-config/CMakeLists.txt
++++ b/tools/llvm-config/CMakeLists.txt
+@@ -63,19 +63,3 @@ endif()
+
+ # Add the dependency on the generation step.
+ add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp ${BUILDVARIABLES_OBJPATH})
+-
+-if(CMAKE_CROSSCOMPILING)
+- set(${project}_LLVM_CONFIG_EXE "${LLVM_NATIVE_BUILD}/bin/llvm-config")
+- set(${project}_LLVM_CONFIG_EXE ${${project}_LLVM_CONFIG_EXE} PARENT_SCOPE)
+-
+- add_custom_command(OUTPUT "${${project}_LLVM_CONFIG_EXE}"
+- COMMAND ${CMAKE_COMMAND} --build . --target llvm-config --config $<CONFIGURATION>
+- DEPENDS ${LLVM_NATIVE_BUILD}/CMakeCache.txt
+- WORKING_DIRECTORY ${LLVM_NATIVE_BUILD}
+- COMMENT "Building native llvm-config..."
+- USES_TERMINAL)
+- add_custom_target(${project}NativeLLVMConfig DEPENDS ${${project}_LLVM_CONFIG_EXE})
+- add_dependencies(${project}NativeLLVMConfig CONFIGURE_LLVM_NATIVE)
+-
+- add_dependencies(llvm-config ${project}NativeLLVMConfig)
+-endif(CMAKE_CROSSCOMPILING)
+--
+2.17.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
index e251799..209764c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
@@ -1,4 +1,4 @@
-From 28293e48cf1a52004c6a78de448718441f9e05f9 Mon Sep 17 00:00:00 2001
+From 96558c4f25d5132936014f6f2d6252cfdfdf478a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 21 May 2016 00:33:20 +0000
Subject: [PATCH 1/2] llvm: TargetLibraryInfo: Undefine libc functions if they
@@ -15,10 +15,10 @@
1 file changed, 21 insertions(+)
diff --git a/include/llvm/Analysis/TargetLibraryInfo.def b/include/llvm/Analysis/TargetLibraryInfo.def
-index 9cbe917c146..aff8419cf54 100644
+index a461ed813b9..f9fd9faeee0 100644
--- a/include/llvm/Analysis/TargetLibraryInfo.def
+++ b/include/llvm/Analysis/TargetLibraryInfo.def
-@@ -656,6 +656,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl")
+@@ -665,6 +665,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl")
TLI_DEFINE_ENUM_INTERNAL(fopen)
TLI_DEFINE_STRING_INTERNAL("fopen")
/// FILE *fopen64(const char *filename, const char *opentype)
@@ -28,7 +28,7 @@
TLI_DEFINE_ENUM_INTERNAL(fopen64)
TLI_DEFINE_STRING_INTERNAL("fopen64")
/// int fprintf(FILE *stream, const char *format, ...);
-@@ -691,6 +694,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek")
+@@ -700,6 +703,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek")
/// int fseeko(FILE *stream, off_t offset, int whence);
TLI_DEFINE_ENUM_INTERNAL(fseeko)
TLI_DEFINE_STRING_INTERNAL("fseeko")
@@ -38,7 +38,7 @@
/// int fseeko64(FILE *stream, off64_t offset, int whence)
TLI_DEFINE_ENUM_INTERNAL(fseeko64)
TLI_DEFINE_STRING_INTERNAL("fseeko64")
-@@ -701,6 +707,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos")
+@@ -710,6 +716,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos")
TLI_DEFINE_ENUM_INTERNAL(fstat)
TLI_DEFINE_STRING_INTERNAL("fstat")
/// int fstat64(int filedes, struct stat64 *buf)
@@ -48,7 +48,7 @@
TLI_DEFINE_ENUM_INTERNAL(fstat64)
TLI_DEFINE_STRING_INTERNAL("fstat64")
/// int fstatvfs(int fildes, struct statvfs *buf);
-@@ -716,6 +725,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell")
+@@ -725,6 +734,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell")
TLI_DEFINE_ENUM_INTERNAL(ftello)
TLI_DEFINE_STRING_INTERNAL("ftello")
/// off64_t ftello64(FILE *stream)
@@ -58,7 +58,7 @@
TLI_DEFINE_ENUM_INTERNAL(ftello64)
TLI_DEFINE_STRING_INTERNAL("ftello64")
/// int ftrylockfile(FILE *file);
-@@ -836,6 +848,9 @@ TLI_DEFINE_STRING_INTERNAL("logl")
+@@ -845,6 +857,9 @@ TLI_DEFINE_STRING_INTERNAL("logl")
TLI_DEFINE_ENUM_INTERNAL(lstat)
TLI_DEFINE_STRING_INTERNAL("lstat")
/// int lstat64(const char *path, struct stat64 *buf);
@@ -68,7 +68,7 @@
TLI_DEFINE_ENUM_INTERNAL(lstat64)
TLI_DEFINE_STRING_INTERNAL("lstat64")
/// void *malloc(size_t size);
-@@ -1055,6 +1070,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf")
+@@ -1064,6 +1079,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf")
TLI_DEFINE_ENUM_INTERNAL(stat)
TLI_DEFINE_STRING_INTERNAL("stat")
/// int stat64(const char *path, struct stat64 *buf);
@@ -78,7 +78,7 @@
TLI_DEFINE_ENUM_INTERNAL(stat64)
TLI_DEFINE_STRING_INTERNAL("stat64")
/// int statvfs(const char *path, struct statvfs *buf);
-@@ -1184,6 +1202,9 @@ TLI_DEFINE_STRING_INTERNAL("times")
+@@ -1193,6 +1211,9 @@ TLI_DEFINE_STRING_INTERNAL("times")
TLI_DEFINE_ENUM_INTERNAL(tmpfile)
TLI_DEFINE_STRING_INTERNAL("tmpfile")
/// FILE *tmpfile64(void)
@@ -89,5 +89,5 @@
TLI_DEFINE_STRING_INTERNAL("tmpfile64")
/// int toascii(int c);
--
-2.13.1
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch
index 832bd72..21d2f81 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch
@@ -1,4 +1,4 @@
-From d776487bac17650704614248d19d1e6b35775001 Mon Sep 17 00:00:00 2001
+From 2f8ea767afdaa440c6368040630e1b3ea6a0977a Mon Sep 17 00:00:00 2001
From: Martin Kelly <mkelly@xevo.com>
Date: Fri, 19 May 2017 00:22:57 -0700
Subject: [PATCH 2/2] llvm: allow env override of exe path
@@ -35,5 +35,5 @@
// allow taking the address of ::main however.
void *P = (void *)(intptr_t)GetExecutablePath;
--
-2.13.1
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb
index f06fa49..cb3bba6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb
@@ -8,7 +8,7 @@
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=e825e017edc35cfd58e26116e5251771"
-DEPENDS = "libffi libxml2-native zlib ninja-native llvm-native"
+DEPENDS = "libffi libxml2 zlib ninja-native llvm-native"
RDEPENDS_${PN}_append_class-target = " ncurses-terminfo"
@@ -19,14 +19,16 @@
LLVM_RELEASE = "${PV}"
LLVM_DIR = "llvm${LLVM_RELEASE}"
-SRCREV = "9a5c333388cbb54a0ce3a67c4f539f5e590a089b"
-PV = "5.0"
+SRCREV = "089d4c0c490687db6c75f1d074e99c4d42936a50"
+PV = "6.0"
+BRANCH = "release_60"
PATCH_VERSION = "0"
-SRC_URI = "git://github.com/llvm-mirror/llvm.git;branch=release_50;protocol=http \
+SRC_URI = "git://github.com/llvm-mirror/llvm.git;branch=${BRANCH};protocol=http \
file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \
file://0002-llvm-allow-env-override-of-exe-path.patch \
+ file://0001-Disable-generating-a-native-llvm-config.patch \
"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install"
@@ -84,15 +86,15 @@
}
do_compile() {
- NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE}
+ ninja -v ${PARALLEL_MAKE}
}
do_compile_class-native() {
- NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen
+ ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen
}
do_install() {
- NINJA_STATUS="[%p] " DESTDIR=${LLVM_INSTALL_DIR} ninja -v install
+ DESTDIR=${LLVM_INSTALL_DIR} ninja -v install
install -D -m 0755 ${B}/bin/llvm-config ${D}${libdir}/${LLVM_DIR}/llvm-config
install -d ${D}${bindir}/${LLVM_DIR}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-1.4.18.inc b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-1.4.18.inc
index d7c8648..ee8bee4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-1.4.18.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-1.4.18.inc
@@ -1,22 +1,29 @@
-require m4.inc
+SUMMARY = "Traditional Unix macro processor"
+HOMEPAGE = "https://www.gnu.org/software/m4/m4.html"
+DESCRIPTION = "GNU m4 is an implementation of the traditional Unix macro processor. It is mostly SVR4 \
+compatible although it has some extensions (for example, handling more than 9 positional parameters to macros). \
+GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc."
-EXTRA_OECONF += "--without-libsigsegv-prefix"
+inherit autotools texinfo
+
+SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \
+ file://ac_config_links.patch \
+ file://remove-gets.patch \
+ "
+
+SRC_URI_append_class-target = " file://0001-Unset-need_charset_alias-when-building-for-musl.patch"
+
+SRC_URI[md5sum] = "a077779db287adf4e12a035029002d28"
+SRC_URI[sha256sum] = "ab2633921a5cd38e48797bf5521ad259bdc4b979078034a3b790d7fec5493fab"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
file://examples/COPYING;md5=4031593b2166d6c47cae282d944a7ede"
-SRC_URI += "file://ac_config_links.patch \
- file://remove-gets.patch \
- "
-
-SRC_URI_append_class-target = "\
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- "
-
# Fix "Argument list too long" error when len(TMPDIR) = 410
acpaths = "-I ./m4"
-SRC_URI[md5sum] = "a077779db287adf4e12a035029002d28"
-SRC_URI[sha256sum] = "ab2633921a5cd38e48797bf5521ad259bdc4b979078034a3b790d7fec5493fab"
+EXTRA_OECONF += "--without-libsigsegv-prefix"
+
+EXTRA_OEMAKE += "'infodir=${infodir}'"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb
index 06d8aa2..407ad89 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb
@@ -11,3 +11,4 @@
oe_runconf
}
+UPSTREAM_CHECK_URI = "${GNU_MIRROR}/m4/"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc
deleted file mode 100644
index 2002594..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-SUMMARY = "Traditional Unix macro processor"
-HOMEPAGE = "https://www.gnu.org/software/m4/m4.html"
-DESCRIPTION = "GNU m4 is an implementation of the traditional Unix macro processor. It is mostly SVR4 \
-compatible although it has some extensions (for example, handling more than 9 positional parameters to macros). \
-GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc."
-
-inherit autotools texinfo
-
-EXTRA_OEMAKE += "'infodir=${infodir}'"
-SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4/ac_config_links.patch b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4/ac_config_links.patch
index 275c0b2..71edf59 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4/ac_config_links.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4/ac_config_links.patch
@@ -14,10 +14,11 @@
2009-11-10 Esben Haabendal <eha@doredevelopment.dk>
-diff -urN m4-1.4.13.orig/configure m4-1.4.13/configure
---- m4-1.4.13.orig/configure 2009-11-10 10:54:00.301707097 +0100
-+++ m4-1.4.13/configure 2009-11-10 10:54:17.314206379 +0100
-@@ -14860,8 +14860,8 @@
+Index: m4-1.4.18/configure
+===================================================================
+--- m4-1.4.18.orig/configure
++++ m4-1.4.18/configure
+@@ -24415,8 +24415,8 @@ $as_echo "#define GNULIB_TEST_GETTIMEOFD
# only, it does not matter if we skip the link with older autoconf.
# Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
# builds, so use a shell variable to bypass this.
@@ -27,4 +28,4 @@
+ # ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
-
+ :
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/make/make.inc b/import-layers/yocto-poky/meta/recipes-devtools/make/make.inc
index 849b742..b8905bc 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/make/make.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/make/make.inc
@@ -5,7 +5,10 @@
HOMEPAGE = "http://www.gnu.org/software/make/"
SECTION = "devel"
-SRC_URI = "${GNU_MIRROR}/make/make-${PV}.tar.bz2"
+SRC_URI = "${GNU_MIRROR}/make/make-${PV}.tar.bz2 \
+ file://0001-glob-Do-not-assume-glibc-glob-internals.patch \
+ file://0002-glob-Do-not-assume-glibc-glob-internals.patch \
+ "
inherit autotools gettext pkgconfig texinfo
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch b/import-layers/yocto-poky/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch
new file mode 100644
index 0000000..2b6e4d4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch
@@ -0,0 +1,70 @@
+From c90a7dda6c572f79b8e78da44b6ebf8704edef65 Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Sun, 24 Sep 2017 09:12:58 -0400
+Subject: [PATCH 1/2] glob: Do not assume glibc glob internals.
+
+It has been proposed that glibc glob start using gl_lstat,
+which the API allows it to do. GNU 'make' should not get in
+the way of this. See:
+https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html
+
+* dir.c (local_lstat): New function, like local_stat.
+(dir_setup_glob): Use it to initialize gl_lstat too, as the API
+requires.
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ dir.c | 29 +++++++++++++++++++++++++++--
+ 1 file changed, 27 insertions(+), 2 deletions(-)
+
+diff --git a/dir.c b/dir.c
+index f34bbf5..12eef30 100644
+--- a/dir.c
++++ b/dir.c
+@@ -1299,15 +1299,40 @@ local_stat (const char *path, struct stat *buf)
+ }
+ #endif
+
++/* Similarly for lstat. */
++#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS)
++# ifndef VMS
++# ifndef HAVE_SYS_STAT_H
++int lstat (const char *path, struct stat *sbuf);
++# endif
++# else
++ /* We are done with the fake lstat. Go back to the real lstat */
++# ifdef lstat
++# undef lstat
++# endif
++# endif
++# define local_lstat lstat
++#elif defined(WINDOWS32)
++/* Windows doesn't support lstat(). */
++# define local_lstat local_stat
++#else
++static int
++local_lstat (const char *path, struct stat *buf)
++{
++ int e;
++ EINTRLOOP (e, lstat (path, buf));
++ return e;
++}
++#endif
++
+ void
+ dir_setup_glob (glob_t *gl)
+ {
+ gl->gl_opendir = open_dirstream;
+ gl->gl_readdir = read_dirstream;
+ gl->gl_closedir = free;
++ gl->gl_lstat = local_lstat;
+ gl->gl_stat = local_stat;
+- /* We don't bother setting gl_lstat, since glob never calls it.
+- The slot is only there for compatibility with 4.4 BSD. */
+ }
+
+ void
+--
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch b/import-layers/yocto-poky/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch
new file mode 100644
index 0000000..d49acd9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch
@@ -0,0 +1,38 @@
+From 9858702dbd1e137262c06765919937660879f63c Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Sun, 24 Sep 2017 09:12:58 -0400
+Subject: [PATCH 2/2] glob: Do not assume glibc glob internals.
+
+It has been proposed that glibc glob start using gl_lstat,
+which the API allows it to do. GNU 'make' should not get in
+the way of this. See:
+https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html
+
+* dir.c (local_lstat): New function, like local_stat.
+(dir_setup_glob): Use it to initialize gl_lstat too, as the API
+requires.
+---
+Upstream-Status: Backport
+
+ configure.ac | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 64ec870..e87901c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -399,10 +399,9 @@ AC_CACHE_CHECK([if system libc has GNU glob], [make_cv_sys_gnu_glob],
+ #include <glob.h>
+ #include <fnmatch.h>
+
+-#define GLOB_INTERFACE_VERSION 1
+ #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
+ # include <gnu-versions.h>
+-# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
++if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2
+ gnu glob
+ # endif
+ #endif],
+--
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-Linker-rules-move-cross_args-in-front-of-output_args.patch b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-Linker-rules-move-cross_args-in-front-of-output_args.patch
new file mode 100644
index 0000000..97778c3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-Linker-rules-move-cross_args-in-front-of-output_args.patch
@@ -0,0 +1,30 @@
+From 4676224dbdff0f7107e8cbdbe0eab19c855f1454 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 17 Nov 2017 13:18:28 +0200
+Subject: [PATCH] Linker rules: move {cross_args} in front of {output_args}
+
+The previous order was found to break linking in some cases
+(e.g. when -no-pic -fno-PIC was present in {cross_args}.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ mesonbuild/backend/ninjabackend.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
+index bb281e1..969b70e 100644
+--- a/mesonbuild/backend/ninjabackend.py
++++ b/mesonbuild/backend/ninjabackend.py
+@@ -1501,7 +1501,7 @@ int dummy;
+ rspfile_content = $ARGS {output_args} $in $LINK_ARGS {cross_args} $aliasing
+ '''
+ else:
+- command_template = ' command = {executable} $ARGS {output_args} $in $LINK_ARGS {cross_args} $aliasing\n'
++ command_template = ' command = {executable} $ARGS {cross_args} {output_args} $in $LINK_ARGS $aliasing\n'
+ command = command_template.format(
+ executable=' '.join(compiler.get_linker_exelist()),
+ cross_args=' '.join(cross_args),
+--
+2.15.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
new file mode 100644
index 0000000..1912e94
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
@@ -0,0 +1,113 @@
+From c5692cac9c555664281377a82bf8b1e46934f437 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 4 Aug 2017 16:16:41 +0300
+Subject: [PATCH 1/3] gtkdoc: fix issues that arise when cross-compiling
+
+Specifically:
+1) Make it possible to specify a wrapper for executing binaries
+(usually, some kind of target hardware emulator, such as qemu)
+2) Explicitly provide CC and LD via command line, as otherwise gtk-doc will
+try to guess them, incorrectly.
+3) If things break down, print the full command with arguments,
+not just the binary name.
+4) Correctly determine the compiler/linker executables and cross-options when cross-compiling
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ mesonbuild/modules/gnome.py | 18 +++++++++++++++---
+ mesonbuild/scripts/gtkdochelper.py | 9 +++++++--
+ 2 files changed, 22 insertions(+), 5 deletions(-)
+
+diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
+index 56765a5..4f7fe30 100644
+--- a/mesonbuild/modules/gnome.py
++++ b/mesonbuild/modules/gnome.py
+@@ -769,6 +769,10 @@ This will become a hard error in the future.''')
+ '--mode=' + mode]
+ if namespace:
+ args.append('--namespace=' + namespace)
++ gtkdoc_exe_wrapper = state.environment.cross_info.config["properties"].get('gtkdoc_exe_wrapper', None)
++ if gtkdoc_exe_wrapper is not None:
++ args.append('--gtkdoc-exe-wrapper=' + gtkdoc_exe_wrapper)
++
+ args += self._unpack_args('--htmlargs=', 'html_args', kwargs)
+ args += self._unpack_args('--scanargs=', 'scan_args', kwargs)
+ args += self._unpack_args('--scanobjsargs=', 'scanobjs_args', kwargs)
+@@ -796,14 +800,22 @@ This will become a hard error in the future.''')
+ raise MesonException(
+ 'Gir include dirs should be include_directories().')
+ cflags.update(get_include_args(inc_dirs))
++
++ cross_c_args = " ".join(state.environment.cross_info.config["properties"].get('c_args', ""))
++ cross_link_args = " ".join(state.environment.cross_info.config["properties"].get('c_link_args', ""))
++
+ if cflags:
+- args += ['--cflags=%s' % ' '.join(cflags)]
++ args += ['--cflags=%s %s' % (cross_c_args,' '.join(cflags))]
+ if ldflags:
+- args += ['--ldflags=%s' % ' '.join(ldflags)]
++ args += ['--ldflags=%s %s' % (cross_link_args, ' '.join(ldflags))]
+ compiler = state.environment.coredata.compilers.get('c')
+- if compiler:
++ cross_compiler = state.environment.coredata.cross_compilers.get('c')
++ if compiler and not state.environment.is_cross_build():
+ args += ['--cc=%s' % ' '.join(compiler.get_exelist())]
+ args += ['--ld=%s' % ' '.join(compiler.get_linker_exelist())]
++ elif cross_compiler and state.environment.is_cross_build():
++ args += ['--cc=%s' % ' '.join(cross_compiler.get_exelist())]
++ args += ['--ld=%s' % ' '.join(cross_compiler.get_linker_exelist())]
+
+ return args
+
+diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py
+index 4406b28..b846827 100644
+--- a/mesonbuild/scripts/gtkdochelper.py
++++ b/mesonbuild/scripts/gtkdochelper.py
+@@ -44,13 +44,14 @@ parser.add_argument('--ignore-headers', dest='ignore_headers', default='')
+ parser.add_argument('--namespace', dest='namespace', default='')
+ parser.add_argument('--mode', dest='mode', default='')
+ parser.add_argument('--installdir', dest='install_dir')
++parser.add_argument('--gtkdoc-exe-wrapper', dest='gtkdoc_exe_wrapper')
+
+ def gtkdoc_run_check(cmd, cwd):
+ # Put stderr into stdout since we want to print it out anyway.
+ # This preserves the order of messages.
+ p, out = Popen_safe(cmd, cwd=cwd, stderr=subprocess.STDOUT)[0:2]
+ if p.returncode != 0:
+- err_msg = ["{!r} failed with status {:d}".format(cmd[0], p.returncode)]
++ err_msg = ["{!r} failed with status {:d}".format(cmd, p.returncode)]
+ if out:
+ err_msg.append(out)
+ raise MesonException('\n'.join(err_msg))
+@@ -58,7 +59,7 @@ def gtkdoc_run_check(cmd, cwd):
+ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
+ main_file, module,
+ html_args, scan_args, fixxref_args, mkdb_args,
+- gobject_typesfile, scanobjs_args, ld, cc, ldflags, cflags,
++ gobject_typesfile, scanobjs_args, gtkdoc_exe_wrapper, ld, cc, ldflags, cflags,
+ html_assets, content_files, ignore_headers, namespace,
+ expand_content_files, mode):
+ print("Building documentation for %s" % module)
+@@ -111,6 +112,9 @@ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
+ if gobject_typesfile:
+ scanobjs_cmd = ['gtkdoc-scangobj'] + scanobjs_args + ['--types=' + gobject_typesfile,
+ '--module=' + module,
++ '--run=' + gtkdoc_exe_wrapper,
++ '--cc=' + cc,
++ '--ld=' + ld,
+ '--cflags=' + cflags,
+ '--ldflags=' + ldflags,
+ '--ld=' + ld]
+@@ -207,6 +211,7 @@ def run(args):
+ mkdbargs,
+ options.gobject_typesfile,
+ scanobjsargs,
++ options.gtkdoc_exe_wrapper,
+ options.ld,
+ options.cc,
+ options.ldflags,
+--
+2.15.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
new file mode 100644
index 0000000..ded42d1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
@@ -0,0 +1,42 @@
+From 972667e0d789a6969a5d79249404f3539f891810 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 4 Aug 2017 16:18:47 +0300
+Subject: [PATCH 1/2] gobject-introspection: determine g-ir-scanner and
+ g-ir-compiler paths from pkgconfig
+
+Do not hardcode the name of those binaries; gobject-introspection
+provides them via pkgconfig, and they can be set to something else
+(for example when cross-compiling).
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ mesonbuild/modules/gnome.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
+index 4f7fe30..9610cf6 100644
+--- a/mesonbuild/modules/gnome.py
++++ b/mesonbuild/modules/gnome.py
+@@ -390,8 +390,6 @@ class GnomeModule(ExtensionModule):
+ raise MesonException('Gir takes one argument')
+ if kwargs.get('install_dir'):
+ raise MesonException('install_dir is not supported with generate_gir(), see "install_dir_gir" and "install_dir_typelib"')
+- giscanner = find_program('g-ir-scanner', 'Gir')
+- gicompiler = find_program('g-ir-compiler', 'Gir')
+ girtarget = args[0]
+ while hasattr(girtarget, 'held_object'):
+ girtarget = girtarget.held_object
+@@ -402,6 +400,8 @@ class GnomeModule(ExtensionModule):
+ self.gir_dep = PkgConfigDependency('gobject-introspection-1.0',
+ state.environment,
+ {'native': True})
++ giscanner = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {})
++ gicompiler = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {})
+ pkgargs = self.gir_dep.get_compile_args()
+ except Exception:
+ raise MesonException('gobject-introspection dependency was not found, gir cannot be generated.')
+--
+2.15.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
new file mode 100644
index 0000000..af5e6a1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
@@ -0,0 +1,114 @@
+From ffa72eac56558aa4171dd70ac1e9c27a07338fa2 Mon Sep 17 00:00:00 2001
+From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+Date: Wed, 15 Nov 2017 15:05:01 +0100
+Subject: [PATCH 4/4] native_bindir
+
+Some libraries, like QT, have pre-processors that convert their input
+files into something that the cross-compiler can process. We find the
+path of those pre-processors via pkg-config-native instead of
+pkg-config.
+
+This path forces the use of pkg-config-native for host_bins arguments.
+
+There are some discussions upstream to merge this patch, but I presonaly believe
+that is is OE only. https://github.com/mesonbuild/meson/issues/1849#issuecomment-303730323
+
+Upstream-Status: Inappropriate [OE specific]
+Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+
+---
+ mesonbuild/dependencies/base.py | 16 ++++++++++------
+ mesonbuild/dependencies/ui.py | 6 +++---
+ 2 files changed, 13 insertions(+), 9 deletions(-)
+
+diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
+index bf79bc5..c9fd08c 100644
+--- a/mesonbuild/dependencies/base.py
++++ b/mesonbuild/dependencies/base.py
+@@ -131,7 +131,7 @@ class Dependency:
+ def need_threads(self):
+ return False
+
+- def get_pkgconfig_variable(self, variable_name, kwargs):
++ def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False):
+ raise DependencyException('{!r} is not a pkgconfig dependency'.format(self.name))
+
+ def get_configtool_variable(self, variable_name):
+@@ -150,7 +150,7 @@ class InternalDependency(Dependency):
+ self.sources = sources
+ self.ext_deps = ext_deps
+
+- def get_pkgconfig_variable(self, variable_name, kwargs):
++ def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False):
+ raise DependencyException('Method "get_pkgconfig_variable()" is '
+ 'invalid for an internal dependency')
+
+@@ -425,10 +425,14 @@ class PkgConfigDependency(ExternalDependency):
+ return s.format(self.__class__.__name__, self.name, self.is_found,
+ self.version_reqs)
+
+- def _call_pkgbin(self, args, env=None):
++ def _call_pkgbin(self, args, env=None, use_native=False):
+ if not env:
+ env = os.environ
+- p, out = Popen_safe([self.pkgbin] + args, env=env)[0:2]
++ if use_native:
++ pkgbin = [self.pkgbin + "-native"]
++ else:
++ pkgbin = [self.pkgbin]
++ p, out = Popen_safe(pkgbin + args, env=env)[0:2]
+ return p.returncode, out.strip()
+
+ def _convert_mingw_paths(self, args):
+@@ -522,7 +526,7 @@ class PkgConfigDependency(ExternalDependency):
+ # linkers such as MSVC, so prepend them.
+ self.link_args = ['-L' + lp for lp in libpaths] + self.link_args
+
+- def get_pkgconfig_variable(self, variable_name, kwargs):
++ def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False):
+ options = ['--variable=' + variable_name, self.name]
+
+ if 'define_variable' in kwargs:
+@@ -535,7 +539,7 @@ class PkgConfigDependency(ExternalDependency):
+
+ options = ['--define-variable=' + '='.join(definition)] + options
+
+- ret, out = self._call_pkgbin(options)
++ ret, out = self._call_pkgbin(options, use_native=use_native)
+ variable = ''
+ if ret != 0:
+ if self.required:
+diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
+index 1db518c..4ed1d04 100644
+--- a/mesonbuild/dependencies/ui.py
++++ b/mesonbuild/dependencies/ui.py
+@@ -239,7 +239,7 @@ class QtBaseDependency(ExternalDependency):
+ self.bindir = self.get_pkgconfig_host_bins(core)
+ if not self.bindir:
+ # If exec_prefix is not defined, the pkg-config file is broken
+- prefix = core.get_pkgconfig_variable('exec_prefix', {})
++ prefix = core.get_pkgconfig_variable('exec_prefix', {}, use_native=True)
+ if prefix:
+ self.bindir = os.path.join(prefix, 'bin')
+
+@@ -359,7 +359,7 @@ class Qt4Dependency(QtBaseDependency):
+ applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease']
+ for application in applications:
+ try:
+- return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}))
++ return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}, use_native=True))
+ except MesonException:
+ pass
+
+@@ -369,7 +369,7 @@ class Qt5Dependency(QtBaseDependency):
+ QtBaseDependency.__init__(self, 'qt5', env, kwargs)
+
+ def get_pkgconfig_host_bins(self, core):
+- return core.get_pkgconfig_variable('host_bins', {})
++ return core.get_pkgconfig_variable('host_bins', {}, use_native=True)
+
+
+ # There are three different ways of depending on SDL2:
+--
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/meson/meson_0.44.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson_0.44.1.bb
new file mode 100644
index 0000000..6a81dab
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson_0.44.1.bb
@@ -0,0 +1,21 @@
+HOMEPAGE = "http://mesonbuild.com"
+SUMMARY = "A high performance build system"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/${BP}.tar.gz \
+ file://0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch \
+ file://0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch \
+ file://0001-Linker-rules-move-cross_args-in-front-of-output_args.patch \
+ file://0003-native_bindir.patch \
+ "
+SRC_URI[md5sum] = "82b1198bf714b5a4da84bfe8376c79cc"
+SRC_URI[sha256sum] = "2ea1a721574adb23160b6481191bcc1173f374e02b0ff3bb0ae85d988d97e4fa"
+UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
+
+inherit setuptools3
+
+RDEPENDS_${PN} = "ninja python3-core python3-modules"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/convert.bin.c b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/convert.bin.c
deleted file mode 100644
index cb6faa8..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/convert.bin.c
+++ /dev/null
@@ -1,348 +0,0 @@
-0xfc, 0xfa, 0xa3, 0x9c, 0x02, 0x01, 0x00, 0x89, 0x1d, 0xa0, 0x02, 0x01, 0x00, 0x83, 0xfc, 0x00,
-0x74, 0x09, 0x8b, 0x44, 0x24, 0x04, 0xa3, 0xa4, 0x02, 0x01, 0x00, 0x8b, 0x25, 0x80, 0x14, 0x01,
-0x00, 0x6a, 0x00, 0x9d, 0x31, 0xc0, 0xbf, 0xb8, 0x15, 0x01, 0x00, 0xb9, 0x44, 0x58, 0x01, 0x00,
-0x29, 0xf9, 0xfc, 0xf3, 0xaa, 0xbe, 0xba, 0x02, 0x01, 0x00, 0xbf, 0x00, 0x10, 0x02, 0x00, 0xb9,
-0x70, 0x00, 0x00, 0x00, 0xf3, 0xa4, 0x0f, 0x01, 0x15, 0xb4, 0x02, 0x01, 0x00, 0x0f, 0x01, 0x1d,
-0xae, 0x02, 0x01, 0x00, 0xb8, 0x18, 0x00, 0x00, 0x00, 0x8e, 0xd8, 0x8e, 0xc0, 0x8e, 0xe0, 0x8e,
-0xe8, 0x8e, 0xd0, 0x68, 0x90, 0x14, 0x01, 0x00, 0xff, 0x35, 0xa4, 0x02, 0x01, 0x00, 0xff, 0x35,
-0xa0, 0x02, 0x01, 0x00, 0xff, 0x35, 0x9c, 0x02, 0x01, 0x00, 0xe8, 0xe3, 0x08, 0x00, 0x00, 0x89,
-0xc6, 0x83, 0xc4, 0x10, 0x6a, 0x00, 0x9d, 0x31, 0xdb, 0xa1, 0xac, 0x14, 0x01, 0x00, 0x83, 0xf8,
-0x01, 0x74, 0x13, 0x31, 0xc0, 0x31, 0xc9, 0x31, 0xd2, 0x31, 0xff, 0x31, 0xed, 0x6a, 0x10, 0xa1,
-0xa8, 0x14, 0x01, 0x00, 0x50, 0xcb, 0x89, 0xf0, 0xbe, 0x2a, 0x03, 0x01, 0x00, 0xbf, 0x00, 0x20,
-0x02, 0x00, 0xb9, 0x20, 0x00, 0x00, 0x00, 0xf3, 0xa4, 0x89, 0xc6, 0x0f, 0x01, 0x15, 0x2a, 0x03,
-0x01, 0x00, 0x31, 0xc0, 0x0f, 0xba, 0xe8, 0x05, 0x0f, 0x22, 0xe0, 0xbf, 0x00, 0x30, 0x02, 0x00,
-0x31, 0xc0, 0xb9, 0x00, 0x18, 0x00, 0x00, 0xf3, 0xab, 0xbf, 0x00, 0x30, 0x02, 0x00, 0x8d, 0x87,
-0x07, 0x10, 0x00, 0x00, 0x89, 0x07, 0xbf, 0x00, 0x40, 0x02, 0x00, 0x8d, 0x87, 0x07, 0x10, 0x00,
-0x00, 0xb9, 0x04, 0x00, 0x00, 0x00, 0x89, 0x07, 0x05, 0x00, 0x10, 0x00, 0x00, 0x83, 0xc7, 0x08,
-0x49, 0x75, 0xf3, 0xbf, 0x00, 0x50, 0x02, 0x00, 0xb8, 0x83, 0x01, 0x00, 0x00, 0xb9, 0x00, 0x08,
-0x00, 0x00, 0x89, 0x07, 0x05, 0x00, 0x00, 0x20, 0x00, 0x83, 0xc7, 0x08, 0x49, 0x75, 0xf3, 0xb8,
-0x00, 0x30, 0x02, 0x00, 0x0f, 0x22, 0xd8, 0xb9, 0x80, 0x00, 0x00, 0xc0, 0x0f, 0x32, 0x0f, 0xba,
-0xe8, 0x08, 0x0f, 0x30, 0x6a, 0x10, 0xa1, 0xa8, 0x14, 0x01, 0x00, 0x50, 0x31, 0xc0, 0x0f, 0xba,
-0xe8, 0x1f, 0x0f, 0xba, 0xe8, 0x00, 0x0f, 0x22, 0xc0, 0xcb, 0x55, 0x89, 0xe5, 0x53, 0x56, 0x57,
-0x8b, 0x7d, 0x08, 0x81, 0xef, 0x00, 0x00, 0x01, 0x00, 0x8b, 0x75, 0x0c, 0x56, 0xe8, 0xfc, 0x00,
-0x00, 0x00, 0x66, 0x31, 0xdb, 0x66, 0xb8, 0x20, 0xe8, 0x00, 0x00, 0x66, 0xba, 0x50, 0x41, 0x4d,
-0x53, 0x66, 0xb9, 0x14, 0x00, 0x00, 0x00, 0xcd, 0x15, 0x72, 0x18, 0x66, 0x3d, 0x50, 0x41, 0x4d,
-0x53, 0x75, 0x10, 0x66, 0x4e, 0x66, 0x85, 0xf6, 0x74, 0x09, 0x83, 0xc7, 0x14, 0x66, 0x83, 0xfb,
-0x00, 0x75, 0xd2, 0x66, 0xe8, 0x82, 0x00, 0x00, 0x00, 0x58, 0x29, 0xf0, 0x5f, 0x5e, 0x5b, 0x89,
-0xec, 0x5d, 0xc3, 0x53, 0x56, 0x57, 0xe8, 0xb3, 0x00, 0x00, 0x00, 0xf9, 0x31, 0xc9, 0x31, 0xd2,
-0xb8, 0x01, 0xe8, 0xcd, 0x15, 0x72, 0x28, 0x83, 0xf9, 0x00, 0x75, 0x09, 0x83, 0xfa, 0x00, 0x75,
-0x04, 0x89, 0xc1, 0x89, 0xda, 0x66, 0x81, 0xe2, 0xff, 0xff, 0x00, 0x00, 0x66, 0xc1, 0xe2, 0x06,
-0x66, 0x89, 0xd0, 0x66, 0x81, 0xe1, 0xff, 0xff, 0x00, 0x00, 0x66, 0x01, 0xc8, 0xeb, 0x03, 0x66,
-0x31, 0xc0, 0x66, 0xe8, 0x33, 0x00, 0x00, 0x00, 0x5f, 0x5e, 0x5b, 0xc3, 0x53, 0x56, 0x57, 0xe8,
-0x6a, 0x00, 0x00, 0x00, 0xb4, 0x88, 0xcd, 0x15, 0x66, 0x25, 0xff, 0xff, 0x00, 0x00, 0x66, 0xe8,
-0x17, 0x00, 0x00, 0x00, 0x5f, 0x5e, 0x5b, 0xc3, 0xe8, 0x51, 0x00, 0x00, 0x00, 0xcd, 0x12, 0x89,
-0xc1, 0x66, 0xe8, 0x04, 0x00, 0x00, 0x00, 0x66, 0x89, 0xc8, 0xc3, 0xfa, 0x2e, 0x67, 0x0f, 0x01,
-0x15, 0xb4, 0x02, 0x00, 0x00, 0x0f, 0x20, 0xc0, 0x66, 0x83, 0xc8, 0x01, 0x0f, 0x22, 0xc0, 0x66,
-0xea, 0x37, 0x02, 0x01, 0x00, 0x10, 0x00, 0xb8, 0x18, 0x00, 0x00, 0x00, 0x8e, 0xd8, 0x8e, 0xc0,
-0x8e, 0xd0, 0x81, 0xc4, 0x00, 0x00, 0x01, 0x00, 0x31, 0xc0, 0x8e, 0xe0, 0x8e, 0xe8, 0x58, 0x05,
-0x00, 0x00, 0x01, 0x00, 0x50, 0x2e, 0x0f, 0x01, 0x1d, 0xae, 0x02, 0x01, 0x00, 0xc3, 0x58, 0x2d,
-0x00, 0x00, 0x01, 0x00, 0x50, 0x81, 0xec, 0x00, 0x00, 0x01, 0x00, 0xea, 0x72, 0x02, 0x00, 0x00,
-0x08, 0x00, 0x0f, 0x20, 0xc0, 0x66, 0x83, 0xe0, 0xfe, 0x0f, 0x22, 0xc0, 0x66, 0xea, 0x84, 0x02,
-0x00, 0x00, 0x00, 0x10, 0x8c, 0xc8, 0x8e, 0xd8, 0x8e, 0xc0, 0x8e, 0xd0, 0x8e, 0xe0, 0x8e, 0xe8,
-0x2e, 0x67, 0x0f, 0x01, 0x1d, 0xa8, 0x02, 0x00, 0x00, 0xfb, 0x66, 0xc3, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x9b, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x9a,
-0xcf, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0xcf, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x93,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x9a,
-0xcf, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0xcf, 0x00, 0x20, 0x00, 0x00, 0x20, 0x02, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x9a,
-0xaf, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0xcf, 0x00, 0x55, 0x89, 0xc1, 0x89, 0xe5, 0xba,
-0xfd, 0x03, 0x00, 0x00, 0xec, 0xa8, 0x20, 0x74, 0xfb, 0xba, 0xf8, 0x03, 0x00, 0x00, 0x88, 0xc8,
-0xee, 0xba, 0xfd, 0x03, 0x00, 0x00, 0xec, 0xa8, 0x40, 0x74, 0xfb, 0x5d, 0xc3, 0x55, 0x83, 0xf8,
-0x0a, 0x89, 0xe5, 0x53, 0x89, 0xc3, 0x75, 0x0a, 0xb8, 0x0d, 0x00, 0x00, 0x00, 0xe8, 0xc8, 0xff,
-0xff, 0xff, 0x89, 0xd8, 0x5b, 0x5d, 0xeb, 0xc2, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x83, 0xec,
-0x44, 0x8d, 0x5d, 0x0c, 0x8b, 0x7d, 0x08, 0x0f, 0xbe, 0x07, 0x84, 0xc0, 0x0f, 0x84, 0x68, 0x01,
-0x00, 0x00, 0x3c, 0x25, 0x74, 0x0d, 0xe8, 0xc2, 0xff, 0xff, 0xff, 0x89, 0x7d, 0xbc, 0xe9, 0x4e,
-0x01, 0x00, 0x00, 0x8d, 0x47, 0x01, 0x89, 0x45, 0xbc, 0x8a, 0x47, 0x01, 0x3c, 0x73, 0x75, 0x1a,
-0x89, 0xd8, 0x83, 0xc3, 0x04, 0x8b, 0x30, 0x0f, 0xbe, 0x06, 0x84, 0xc0, 0x0f, 0x84, 0x2f, 0x01,
-0x00, 0x00, 0xe8, 0x96, 0xff, 0xff, 0xff, 0x46, 0xeb, 0xed, 0x3c, 0x4c, 0x75, 0x0d, 0x8d, 0x47,
-0x02, 0xbe, 0x3c, 0x00, 0x00, 0x00, 0x89, 0x45, 0xbc, 0xeb, 0x38, 0x3c, 0x6c, 0x75, 0x0d, 0x8d,
-0x47, 0x02, 0xbe, 0x1c, 0x00, 0x00, 0x00, 0x89, 0x45, 0xbc, 0xeb, 0x27, 0xbe, 0x1c, 0x00, 0x00,
-0x00, 0x3c, 0x68, 0x75, 0x1e, 0x80, 0x7f, 0x02, 0x68, 0x74, 0x0d, 0x8d, 0x47, 0x02, 0xbe, 0x0c,
-0x00, 0x00, 0x00, 0x89, 0x45, 0xbc, 0xeb, 0x0b, 0x8d, 0x47, 0x03, 0xbe, 0x04, 0x00, 0x00, 0x00,
-0x89, 0x45, 0xbc, 0x8b, 0x45, 0xbc, 0x8a, 0x00, 0x88, 0xc2, 0x83, 0xca, 0x20, 0x80, 0xfa, 0x78,
-0x75, 0x5b, 0x8b, 0x13, 0x83, 0xfe, 0x1c, 0x7e, 0x0e, 0x8b, 0x4b, 0x04, 0x89, 0x55, 0xb0, 0x89,
-0x4d, 0xb4, 0x83, 0xc3, 0x08, 0xeb, 0x0b, 0x31, 0xc9, 0x89, 0x55, 0xb0, 0x89, 0x4d, 0xb4, 0x83,
-0xc3, 0x04, 0x83, 0xe0, 0x20, 0x8d, 0x7d, 0xc8, 0x88, 0x45, 0xbb, 0x89, 0xf1, 0x8b, 0x55, 0xb4,
-0x8b, 0x45, 0xb0, 0x0f, 0xad, 0xd0, 0xd3, 0xea, 0xf6, 0xc1, 0x20, 0x74, 0x02, 0x89, 0xd0, 0x83,
-0xe0, 0x0f, 0x8a, 0x55, 0xbb, 0x47, 0x0a, 0x90, 0x14, 0x10, 0x01, 0x00, 0x88, 0x57, 0xff, 0x83,
-0xe9, 0x04, 0x79, 0xd9, 0xc1, 0xee, 0x02, 0x8d, 0x74, 0x35, 0xc9, 0xeb, 0x62, 0x3c, 0x64, 0x75,
-0x4a, 0x8b, 0x03, 0x83, 0xfe, 0x1c, 0x7e, 0x05, 0x83, 0xc3, 0x08, 0xeb, 0x03, 0x83, 0xc3, 0x04,
-0x8d, 0x4d, 0xc8, 0x85, 0xc0, 0x79, 0x09, 0xc6, 0x45, 0xc8, 0x2d, 0x8d, 0x4d, 0xc9, 0xf7, 0xd8,
-0x89, 0xce, 0xbf, 0x0a, 0x00, 0x00, 0x00, 0x99, 0x46, 0xf7, 0xff, 0x83, 0xc2, 0x30, 0x85, 0xc0,
-0x88, 0x56, 0xff, 0x75, 0xf2, 0x89, 0xf0, 0x48, 0x39, 0xc1, 0x73, 0x23, 0x0f, 0xb6, 0x38, 0x8a,
-0x11, 0x41, 0x88, 0x10, 0x89, 0xfa, 0x88, 0x51, 0xff, 0xeb, 0xec, 0x3c, 0x63, 0x75, 0x0a, 0x8b,
-0x03, 0x83, 0xc3, 0x04, 0x88, 0x45, 0xc8, 0xeb, 0x03, 0x88, 0x45, 0xc8, 0x8d, 0x75, 0xc9, 0x8d,
-0x7d, 0xc8, 0x39, 0xf7, 0x73, 0x0b, 0x0f, 0xbe, 0x07, 0x47, 0xe8, 0x6e, 0xfe, 0xff, 0xff, 0xeb,
-0xf1, 0x8b, 0x7d, 0xbc, 0x47, 0xe9, 0x8d, 0xfe, 0xff, 0xff, 0x83, 0xc4, 0x44, 0x5b, 0x5e, 0x5f,
-0x5d, 0xc3, 0x55, 0x31, 0xc9, 0x89, 0xe5, 0x56, 0x53, 0x31, 0xdb, 0x83, 0xec, 0x10, 0x39, 0xd3,
-0x74, 0x23, 0x0f, 0xb6, 0x34, 0x18, 0xf6, 0xc3, 0x01, 0x74, 0x03, 0xc1, 0xe6, 0x08, 0x01, 0xf1,
-0x81, 0xf9, 0xff, 0xff, 0x00, 0x00, 0x76, 0x0a, 0x89, 0xce, 0xc1, 0xee, 0x10, 0x01, 0xf1, 0x0f,
-0xb7, 0xc9, 0x43, 0xeb, 0xd9, 0x88, 0x4d, 0xf6, 0xc1, 0xe9, 0x08, 0x88, 0x4d, 0xf7, 0x0f, 0xb7,
-0x45, 0xf6, 0x83, 0xc4, 0x10, 0x5b, 0x5e, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x89,
-0xc3, 0x51, 0x89, 0x55, 0xf0, 0x3b, 0x5d, 0xf0, 0x73, 0x5f, 0x81, 0x3b, 0x4c, 0x42, 0x49, 0x4f,
-0x74, 0x05, 0x83, 0xc3, 0x10, 0xeb, 0xee, 0x83, 0x7b, 0x04, 0x18, 0x75, 0xf5, 0xba, 0x18, 0x00,
-0x00, 0x00, 0x89, 0xd8, 0xe8, 0x89, 0xff, 0xff, 0xff, 0xf7, 0xd0, 0x66, 0x85, 0xc0, 0x75, 0xe2,
-0x8d, 0x73, 0x18, 0x8b, 0x53, 0x0c, 0x89, 0xf0, 0xe8, 0x75, 0xff, 0xff, 0xff, 0xf7, 0xd0, 0x0f,
-0xb7, 0xc0, 0x39, 0x43, 0x10, 0x75, 0xcb, 0x8b, 0x4b, 0x0c, 0x31, 0xc0, 0x01, 0xf1, 0x39, 0xf1,
-0x76, 0x10, 0x89, 0xcf, 0x8b, 0x56, 0x04, 0x29, 0xf7, 0x39, 0xfa, 0x77, 0x05, 0x40, 0x01, 0xd6,
-0xeb, 0xec, 0x39, 0x43, 0x14, 0x75, 0xab, 0xeb, 0x02, 0x31, 0xdb, 0x5a, 0x89, 0xd8, 0x5b, 0x5e,
-0x5f, 0x5d, 0xc3, 0x55, 0xba, 0x00, 0x10, 0x00, 0x00, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x89, 0xc3,
-0x31, 0xc0, 0x51, 0xe8, 0x71, 0xff, 0xff, 0xff, 0x85, 0xc0, 0x75, 0x17, 0xba, 0x00, 0x00, 0x10,
-0x00, 0xb8, 0x00, 0x00, 0x0f, 0x00, 0xe8, 0x5e, 0xff, 0xff, 0xff, 0x85, 0xc0, 0x75, 0x04, 0x31,
-0xc0, 0xeb, 0x2f, 0x8b, 0x50, 0x04, 0x01, 0xc2, 0x83, 0x3a, 0x11, 0x75, 0x16, 0x8b, 0x72, 0x08,
-0x89, 0xf2, 0x89, 0xf0, 0x81, 0xc2, 0x00, 0x10, 0x00, 0x00, 0xe8, 0x3a, 0xff, 0xff, 0xff, 0x85,
-0xc0, 0x74, 0xdc, 0x89, 0x43, 0x28, 0xc7, 0x43, 0x24, 0x01, 0x00, 0x00, 0x00, 0xb8, 0x01, 0x00,
-0x00, 0x00, 0x5a, 0x5b, 0x5e, 0x5f, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x83, 0xec,
-0x14, 0x89, 0x55, 0xe8, 0x8b, 0x75, 0x0c, 0x8b, 0x5d, 0x08, 0x89, 0x75, 0xe4, 0x89, 0x4d, 0xec,
-0x0f, 0xb6, 0xb0, 0xe8, 0x01, 0x00, 0x00, 0x89, 0x5d, 0xe0, 0x8b, 0x7d, 0x10, 0x83, 0xfe, 0x1f,
-0x7f, 0x32, 0x89, 0xf3, 0x6b, 0xf6, 0x14, 0x01, 0xc6, 0x43, 0x89, 0x96, 0xd0, 0x02, 0x00, 0x00,
-0x89, 0x8e, 0xd4, 0x02, 0x00, 0x00, 0x8b, 0x55, 0xe0, 0x8b, 0x4d, 0xe4, 0x89, 0x96, 0xd8, 0x02,
-0x00, 0x00, 0x89, 0x8e, 0xdc, 0x02, 0x00, 0x00, 0x89, 0xbe, 0xe0, 0x02, 0x00, 0x00, 0x88, 0x98,
-0xe8, 0x01, 0x00, 0x00, 0x4f, 0x75, 0x65, 0x8b, 0x5d, 0xe0, 0x8b, 0x75, 0xe4, 0x03, 0x5d, 0xe8,
-0x13, 0x75, 0xec, 0x89, 0xd9, 0x89, 0xf3, 0xbe, 0xff, 0xff, 0x3f, 0x00, 0x81, 0xfb, 0xff, 0x03,
-0x00, 0x00, 0x77, 0x13, 0x0f, 0xac, 0xd9, 0x0a, 0x89, 0xce, 0x81, 0xf9, 0xff, 0xff, 0x3f, 0x00,
-0x76, 0x05, 0xbe, 0xff, 0xff, 0x3f, 0x00, 0x8b, 0xb8, 0xe0, 0x01, 0x00, 0x00, 0x8d, 0x97, 0x00,
-0x04, 0x00, 0x00, 0x39, 0xf2, 0x73, 0x25, 0x8d, 0x96, 0x00, 0xfc, 0xff, 0xff, 0x89, 0x90, 0xe0,
-0x01, 0x00, 0x00, 0x81, 0xfa, 0xff, 0xff, 0x00, 0x00, 0x77, 0x0b, 0x66, 0x81, 0xee, 0x00, 0x04,
-0x66, 0x89, 0x70, 0x02, 0xeb, 0x06, 0x66, 0xc7, 0x40, 0x02, 0x00, 0xfc, 0x83, 0xc4, 0x14, 0x5b,
-0x5e, 0x5f, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b, 0x55, 0x08, 0xec, 0x5d, 0xc3, 0x55, 0x89, 0xe5,
-0x8b, 0x55, 0x08, 0x66, 0xed, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b, 0x55, 0x08, 0xed, 0x5d, 0xc3,
-0x55, 0x89, 0xe5, 0x8b, 0x45, 0x08, 0x8b, 0x55, 0x0c, 0xee, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b,
-0x45, 0x08, 0x8b, 0x55, 0x0c, 0x66, 0xef, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b, 0x45, 0x08, 0x8b,
-0x55, 0x0c, 0xef, 0x5d, 0xc3, 0x55, 0x31, 0xc0, 0x89, 0xe5, 0x8b, 0x55, 0x08, 0x3b, 0x45, 0x0c,
-0x74, 0x09, 0x80, 0x3c, 0x02, 0x00, 0x74, 0x03, 0x40, 0xeb, 0xf2, 0x5d, 0xc3, 0x55, 0x31, 0xd2,
-0x89, 0xe5, 0x8b, 0x45, 0x08, 0x8b, 0x4d, 0x0c, 0x3b, 0x55, 0x10, 0x74, 0x06, 0x88, 0x0c, 0x10,
-0x42, 0xeb, 0xf5, 0x5d, 0xc3, 0x55, 0x31, 0xd2, 0x89, 0xe5, 0x53, 0x8b, 0x45, 0x08, 0x8b, 0x4d,
-0x0c, 0x3b, 0x55, 0x10, 0x74, 0x09, 0x8a, 0x1c, 0x11, 0x88, 0x1c, 0x10, 0x42, 0xeb, 0xf2, 0x5b,
-0x5d, 0xc3, 0x55, 0x31, 0xc9, 0x89, 0xe5, 0x3b, 0x4d, 0x10, 0x74, 0x17, 0x8b, 0x45, 0x08, 0x0f,
-0xb6, 0x10, 0x8b, 0x45, 0x0c, 0x0f, 0xb6, 0x00, 0x38, 0xc2, 0x74, 0x04, 0x29, 0xd0, 0xeb, 0x05,
-0x41, 0xeb, 0xe4, 0x31, 0xc0, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x8b, 0x45, 0x08,
-0x68, 0x00, 0x01, 0x00, 0x00, 0x8b, 0x4d, 0x10, 0x8d, 0x98, 0x00, 0x08, 0x00, 0x00, 0x53, 0xe8,
-0x71, 0xff, 0xff, 0xff, 0x01, 0xc3, 0x5e, 0x81, 0xf9, 0xfe, 0x00, 0x00, 0x00, 0x5f, 0x8d, 0x73,
-0x01, 0xc6, 0x03, 0x20, 0x7e, 0x05, 0xb9, 0xff, 0x00, 0x00, 0x00, 0x51, 0xff, 0x75, 0x0c, 0xe8,
-0x51, 0xff, 0xff, 0xff, 0x5a, 0x59, 0x50, 0xff, 0x75, 0x0c, 0x89, 0xc7, 0x56, 0xe8, 0x73, 0xff,
-0xff, 0xff, 0x83, 0xc4, 0x0c, 0xc6, 0x44, 0x3b, 0x01, 0x00, 0x8d, 0x65, 0xf4, 0x5b, 0x5e, 0x5f,
-0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b, 0x45, 0x10, 0x8b, 0x55, 0x0c, 0x89, 0x45, 0x0c, 0x8b, 0x45,
-0x08, 0x89, 0x55, 0x10, 0x8b, 0x40, 0x10, 0x89, 0x45, 0x08, 0x5d, 0xeb, 0x8a, 0x55, 0x89, 0xe5,
-0x57, 0x56, 0x53, 0x8b, 0x5d, 0x08, 0x68, 0x00, 0x10, 0x00, 0x00, 0x6a, 0x00, 0xff, 0x73, 0x10,
-0xe8, 0x18, 0xff, 0xff, 0xff, 0x8b, 0x43, 0x10, 0xc7, 0x40, 0x0e, 0x19, 0x01, 0x10, 0x00, 0xc7,
-0x00, 0x00, 0x19, 0x00, 0x00, 0xc7, 0x40, 0x04, 0x00, 0x00, 0x00, 0x50, 0xc6, 0x80, 0xe8, 0x01,
-0x00, 0x00, 0x00, 0x8d, 0xb8, 0x00, 0x08, 0x00, 0x00, 0x66, 0xc7, 0x40, 0x0a, 0x00, 0x00, 0xc7,
-0x40, 0x20, 0x3f, 0xa3, 0x00, 0x08, 0x89, 0xb8, 0x28, 0x02, 0x00, 0x00, 0x8b, 0x43, 0x0c, 0x68,
-0xff, 0x00, 0x00, 0x00, 0x8d, 0x48, 0x28, 0x51, 0xe8, 0xb8, 0xfe, 0xff, 0xff, 0x5a, 0x5e, 0x89,
-0xc6, 0x50, 0x51, 0x57, 0xe8, 0xdc, 0xfe, 0xff, 0xff, 0x8b, 0x43, 0x10, 0x83, 0xc0, 0x40, 0xc6,
-0x84, 0x30, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x6a, 0x40, 0x6a, 0x00, 0x50, 0xe8, 0xac, 0xfe, 0xff,
-0xff, 0x83, 0xc4, 0x24, 0x8b, 0x43, 0x10, 0x83, 0xe8, 0x80, 0x6a, 0x20, 0x6a, 0x00, 0x50, 0xe8,
-0x99, 0xfe, 0xff, 0xff, 0x8b, 0x53, 0x0c, 0x8b, 0x43, 0x10, 0x05, 0x02, 0x02, 0x00, 0x00, 0x8b,
-0x4a, 0x14, 0x66, 0x8b, 0x52, 0x16, 0x66, 0x89, 0x48, 0xf6, 0x66, 0x89, 0x50, 0xfa, 0x66, 0xc7,
-0x80, 0x9e, 0xfe, 0xff, 0xff, 0x00, 0x00, 0xc7, 0x40, 0xde, 0x00, 0x00, 0x00, 0x00, 0x66, 0xc7,
-0x80, 0x00, 0xfe, 0xff, 0xff, 0x00, 0x00, 0x66, 0xc7, 0x40, 0xf0, 0xff, 0xff, 0xc6, 0x40, 0xfd,
-0x00, 0x6a, 0x04, 0x68, 0x25, 0x10, 0x01, 0x00, 0x50, 0xe8, 0x67, 0xfe, 0xff, 0xff, 0x8b, 0x43,
-0x10, 0x66, 0xc7, 0x80, 0x10, 0x02, 0x00, 0x00, 0x50, 0x00, 0x83, 0xc4, 0x18, 0x8b, 0x4b, 0x0c,
-0x66, 0xc7, 0x80, 0x06, 0x02, 0x00, 0x00, 0x01, 0x02, 0xc7, 0x80, 0x18, 0x02, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xc7, 0x80, 0x1c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8b, 0x51, 0x24,
-0x85, 0xd2, 0x74, 0x0f, 0x8b, 0x49, 0x20, 0x89, 0x90, 0x1c, 0x02, 0x00, 0x00, 0x89, 0x88, 0x18,
-0x02, 0x00, 0x00, 0xc7, 0x43, 0x2c, 0x01, 0x00, 0x00, 0x00, 0x8d, 0x65, 0xf4, 0x5b, 0x5e, 0x5f,
-0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x83, 0xec, 0x4c, 0xc7, 0x45, 0xc8, 0x00, 0x00,
-0x02, 0x00, 0x8b, 0x45, 0x08, 0x89, 0x45, 0xb8, 0x8b, 0x45, 0x0c, 0x89, 0x45, 0xbc, 0x8b, 0x45,
-0x10, 0x89, 0x45, 0xc0, 0x8b, 0x45, 0x14, 0x89, 0x45, 0xc4, 0x8d, 0x45, 0xb8, 0x50, 0xe8, 0x9a,
-0xfe, 0xff, 0xff, 0x8b, 0x45, 0xb8, 0x59, 0x3d, 0x02, 0xb0, 0xad, 0x2b, 0x75, 0x09, 0xc7, 0x45,
-0xcc, 0x01, 0x00, 0x00, 0x00, 0xeb, 0x21, 0x31, 0xf6, 0x3d, 0x07, 0xb0, 0x11, 0x0a, 0x75, 0x2c,
-0x8b, 0x45, 0xbc, 0x8b, 0x10, 0xe8, 0x58, 0xfb, 0xff, 0xff, 0xf7, 0xd0, 0x66, 0x85, 0xc0, 0x75,
-0x0e, 0xc7, 0x45, 0xd0, 0x01, 0x00, 0x00, 0x00, 0xbe, 0x01, 0x00, 0x00, 0x00, 0xeb, 0x0d, 0x50,
-0x68, 0x2a, 0x10, 0x01, 0x00, 0xe8, 0xae, 0xf9, 0xff, 0xff, 0x58, 0x5a, 0x31, 0xdb, 0x81, 0x7d,
-0xb8, 0x07, 0xb0, 0x1f, 0x0e, 0x75, 0x03, 0x8b, 0x5d, 0xbc, 0x8b, 0x45, 0xc0, 0x85, 0xc0, 0x74,
-0x0a, 0x81, 0x38, 0x07, 0xb0, 0x1f, 0x0e, 0x75, 0x02, 0x89, 0xc3, 0x85, 0xf6, 0x0f, 0x85, 0xce,
-0x00, 0x00, 0x00, 0x85, 0xdb, 0x0f, 0x84, 0xc6, 0x00, 0x00, 0x00, 0x66, 0x83, 0x7b, 0x08, 0x00,
-0x74, 0x0f, 0x8b, 0x53, 0x04, 0x89, 0xd8, 0xe8, 0xf6, 0xfa, 0xff, 0xff, 0xf7, 0xd0, 0x0f, 0xb7,
-0xf0, 0x8b, 0x4b, 0x04, 0x8d, 0x43, 0x0c, 0x01, 0xd9, 0x31, 0xff, 0x89, 0x4d, 0xb4, 0x39, 0x45,
-0xb4, 0x76, 0x1f, 0x8b, 0x08, 0x8b, 0x50, 0x04, 0x83, 0xc1, 0x03, 0x83, 0xc2, 0x03, 0x83, 0xe1,
-0xfc, 0x83, 0xe2, 0xfc, 0x8d, 0x54, 0x11, 0x0c, 0x01, 0xd0, 0x39, 0x45, 0xb4, 0x72, 0x03, 0x47,
-0xeb, 0xdc, 0x81, 0x3b, 0x07, 0xb0, 0x1f, 0x0e, 0x75, 0x1b, 0x85, 0xf6, 0x75, 0x17, 0x0f, 0xb7,
-0x43, 0x0a, 0x39, 0xf8, 0x75, 0x0f, 0xc7, 0x45, 0xd4, 0x01, 0x00, 0x00, 0x00, 0x89, 0x5d, 0xc0,
-0xe9, 0x95, 0x00, 0x00, 0x00, 0x50, 0x68, 0x4d, 0x10, 0x01, 0x00, 0xe8, 0x08, 0xf9, 0xff, 0xff,
-0x56, 0x68, 0x67, 0x10, 0x01, 0x00, 0xe8, 0xfd, 0xf8, 0xff, 0xff, 0x57, 0x68, 0x79, 0x10, 0x01,
-0x00, 0xe8, 0xf2, 0xf8, 0xff, 0xff, 0x53, 0x68, 0x8b, 0x10, 0x01, 0x00, 0xe8, 0xe7, 0xf8, 0xff,
-0xff, 0x83, 0xc4, 0x20, 0xff, 0x73, 0x04, 0x68, 0x9d, 0x10, 0x01, 0x00, 0xe8, 0xd7, 0xf8, 0xff,
-0xff, 0xff, 0x33, 0x68, 0xaf, 0x10, 0x01, 0x00, 0xe8, 0xcb, 0xf8, 0xff, 0xff, 0x0f, 0xb7, 0x43,
-0x0a, 0x50, 0x68, 0xc1, 0x10, 0x01, 0x00, 0xe8, 0xbc, 0xf8, 0xff, 0xff, 0x83, 0xc4, 0x18, 0xeb,
-0x04, 0x85, 0xf6, 0x75, 0x35, 0x51, 0x68, 0xd3, 0x10, 0x01, 0x00, 0xe8, 0xa8, 0xf8, 0xff, 0xff,
-0xff, 0x75, 0xb8, 0x68, 0xee, 0x10, 0x01, 0x00, 0xe8, 0x9b, 0xf8, 0xff, 0xff, 0xff, 0x75, 0xbc,
-0x68, 0xf7, 0x10, 0x01, 0x00, 0xe8, 0x8e, 0xf8, 0xff, 0xff, 0xff, 0x75, 0xc0, 0x68, 0x00, 0x11,
-0x01, 0x00, 0xe8, 0x81, 0xf8, 0xff, 0xff, 0x83, 0xc4, 0x20, 0xc7, 0x45, 0xd8, 0x00, 0x00, 0x00,
-0x00, 0xc7, 0x45, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x83, 0x7d, 0xd4, 0x00, 0x0f, 0x84, 0xfc, 0x00,
-0x00, 0x00, 0x8b, 0x7d, 0xc0, 0x8d, 0x57, 0x0c, 0x03, 0x7f, 0x04, 0x39, 0xd7, 0x76, 0x51, 0x8b,
-0x32, 0x8b, 0x5a, 0x04, 0x89, 0x5d, 0xb4, 0x83, 0xc3, 0x03, 0x8d, 0x4e, 0x03, 0x83, 0xe3, 0xfc,
-0x83, 0xe1, 0xfc, 0x8d, 0x42, 0x0c, 0x01, 0xcb, 0x01, 0xc3, 0x39, 0xdf, 0x72, 0x32, 0x83, 0x7a,
-0x08, 0x01, 0x75, 0x28, 0x85, 0xf6, 0x75, 0x24, 0x89, 0x55, 0xb0, 0x89, 0x4d, 0xac, 0x52, 0x6a,
-0x00, 0x6a, 0x00, 0x50, 0xe8, 0x29, 0xfc, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x89, 0xc6, 0x85, 0xc0,
-0x8b, 0x55, 0xb0, 0x8b, 0x4d, 0xac, 0x0f, 0x84, 0x1d, 0x04, 0x00, 0x00, 0x89, 0xda, 0xeb, 0xab,
-0x31, 0xd2, 0x31, 0xff, 0x31, 0xf6, 0x85, 0xd2, 0x0f, 0x95, 0xc3, 0xf7, 0xc6, 0x01, 0x00, 0x00,
-0x00, 0x75, 0x34, 0x84, 0xdb, 0x74, 0x30, 0x31, 0xf6, 0x83, 0x7a, 0x04, 0x0a, 0x75, 0x28, 0x89,
-0x55, 0xb4, 0x50, 0x6a, 0x0a, 0x68, 0x35, 0x11, 0x01, 0x00, 0x57, 0xe8, 0xe2, 0xfb, 0xff, 0xff,
-0x83, 0xc4, 0x10, 0x8b, 0x55, 0xb4, 0x85, 0xc0, 0x75, 0x0d, 0x8d, 0x45, 0xb8, 0xe8, 0x11, 0xfa,
-0xff, 0xff, 0x8b, 0x55, 0xb4, 0x89, 0xc6, 0x85, 0xf6, 0x75, 0x0f, 0x84, 0xdb, 0x74, 0x0b, 0x31,
-0xc0, 0x83, 0x7a, 0x04, 0x00, 0x0f, 0x94, 0xc0, 0x89, 0xc6, 0x85, 0xf6, 0x75, 0x25, 0x84, 0xdb,
-0x74, 0x21, 0x83, 0x7a, 0x04, 0x01, 0x75, 0x1b, 0x50, 0x6a, 0x01, 0x68, 0x66, 0x10, 0x01, 0x00,
-0x57, 0xe8, 0x9c, 0xfb, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x85, 0xc0, 0x0f, 0x94, 0xc0, 0x0f, 0xb6,
-0xc0, 0x89, 0xc6, 0x85, 0xf6, 0x75, 0x13, 0x84, 0xdb, 0x74, 0x0f, 0x57, 0x68, 0x0a, 0x11, 0x01,
-0x00, 0xe8, 0x72, 0xf7, 0xff, 0xff, 0x5f, 0x58, 0xeb, 0x04, 0x85, 0xf6, 0x75, 0x13, 0x8d, 0x45,
-0xb8, 0xe8, 0xad, 0xf9, 0xff, 0xff, 0x85, 0xc0, 0x75, 0x07, 0xc7, 0x45, 0xd8, 0x01, 0x00, 0x00,
-0x00, 0x51, 0x68, 0x25, 0x11, 0x01, 0x00, 0xe8, 0x4c, 0xf7, 0xff, 0xff, 0x5b, 0x83, 0x7d, 0xdc,
-0x00, 0x5e, 0x74, 0x0d, 0x50, 0x68, 0x34, 0x11, 0x01, 0x00, 0xe8, 0x39, 0xf7, 0xff, 0xff, 0x58,
-0x5a, 0x83, 0x7d, 0xd8, 0x00, 0x74, 0x0d, 0x53, 0x68, 0x3f, 0x11, 0x01, 0x00, 0xe8, 0x26, 0xf7,
-0xff, 0xff, 0x5e, 0x5f, 0x50, 0x68, 0x65, 0x10, 0x01, 0x00, 0xe8, 0x19, 0xf7, 0xff, 0xff, 0x5a,
-0x83, 0x7d, 0xdc, 0x00, 0x59, 0x75, 0x31, 0x83, 0x7d, 0xd8, 0x00, 0x0f, 0x84, 0x16, 0x01, 0x00,
-0x00, 0x50, 0x50, 0x6a, 0x20, 0x68, 0xc4, 0x55, 0x01, 0x00, 0xe8, 0xbb, 0xf4, 0xff, 0xff, 0xbb,
-0xc0, 0x55, 0x01, 0x00, 0xa3, 0xc0, 0x55, 0x01, 0x00, 0x83, 0xc4, 0x10, 0xc7, 0x45, 0xb4, 0x00,
-0x00, 0x00, 0x00, 0xe9, 0xaa, 0x00, 0x00, 0x00, 0x8b, 0x45, 0xe0, 0x8d, 0x58, 0x18, 0x8b, 0x48,
-0x0c, 0x01, 0xd9, 0x89, 0x4d, 0xb4, 0x39, 0x5d, 0xb4, 0x76, 0xbc, 0x8b, 0x55, 0xb4, 0x8b, 0x43,
-0x04, 0x29, 0xda, 0x39, 0xd0, 0x77, 0xb0, 0x83, 0x3b, 0x01, 0x75, 0x4f, 0x83, 0xe8, 0x08, 0xb9,
-0x14, 0x00, 0x00, 0x00, 0x31, 0xd2, 0x8d, 0x73, 0x08, 0xf7, 0xf1, 0x89, 0x45, 0xb0, 0x31, 0xff,
-0x39, 0x7d, 0xb0, 0x7e, 0x2f, 0x83, 0xff, 0x1f, 0x7f, 0x2a, 0x31, 0xc0, 0x8b, 0x16, 0x83, 0x7e,
-0x10, 0x01, 0x0f, 0x95, 0xc0, 0x83, 0xec, 0x04, 0x40, 0x8b, 0x4e, 0x04, 0x47, 0x50, 0x8b, 0x45,
-0xc8, 0xff, 0x76, 0x0c, 0xff, 0x76, 0x08, 0x83, 0xc6, 0x14, 0xe8, 0x29, 0xf9, 0xff, 0xff, 0x83,
-0xc4, 0x10, 0xeb, 0xcc, 0xc7, 0x45, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5b, 0x04, 0xeb, 0x96,
-0x8b, 0x43, 0x14, 0x8b, 0x53, 0x04, 0x8b, 0x4b, 0x08, 0x8b, 0x73, 0x0c, 0x8b, 0x7b, 0x10, 0x83,
-0xf8, 0x01, 0x75, 0x07, 0xc7, 0x45, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x83, 0xec, 0x04, 0x83, 0xc3,
-0x14, 0x50, 0x8b, 0x45, 0xb0, 0x57, 0x56, 0xe8, 0xec, 0xf8, 0xff, 0xff, 0xff, 0x45, 0xb4, 0x83,
-0xc4, 0x10, 0x8b, 0x45, 0xb4, 0x3b, 0x05, 0xc0, 0x55, 0x01, 0x00, 0x8b, 0x45, 0xc8, 0x89, 0x45,
-0xb0, 0x7c, 0xbd, 0xe8, 0x3b, 0xf4, 0xff, 0xff, 0x8b, 0x7d, 0xb0, 0x89, 0x87, 0xe0, 0x01, 0x00,
-0x00, 0x8b, 0x5d, 0xc8, 0xe8, 0x73, 0xf4, 0xff, 0xff, 0x66, 0x89, 0x43, 0x02, 0x8b, 0x45, 0xc8,
-0x83, 0xb8, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x75, 0x07, 0x66, 0x83, 0x78, 0x02, 0x00, 0x74, 0x07,
-0xc7, 0x45, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x83, 0x7d, 0xcc, 0x00, 0x0f, 0x84, 0xb9, 0x00, 0x00,
-0x00, 0x8b, 0x75, 0xbc, 0x8b, 0x55, 0xc8, 0x83, 0x7d, 0xe4, 0x00, 0x8b, 0x1e, 0x74, 0x4d, 0xf6,
-0xc3, 0x01, 0x74, 0x48, 0x8b, 0x46, 0x08, 0x05, 0x00, 0x04, 0x00, 0x00, 0x3d, 0xff, 0xff, 0x3f,
-0x00, 0x76, 0x05, 0xb8, 0xff, 0xff, 0x3f, 0x00, 0x8b, 0xba, 0xe0, 0x01, 0x00, 0x00, 0x8d, 0x8f,
-0x00, 0x04, 0x00, 0x00, 0x39, 0xc1, 0x73, 0x24, 0x8d, 0x88, 0x00, 0xfc, 0xff, 0xff, 0x89, 0x8a,
-0xe0, 0x01, 0x00, 0x00, 0x81, 0xf9, 0xff, 0xff, 0x00, 0x00, 0x77, 0x0a, 0x66, 0x2d, 0x00, 0x04,
-0x66, 0x89, 0x42, 0x02, 0xeb, 0x06, 0x66, 0xc7, 0x42, 0x02, 0x00, 0xfc, 0x80, 0xe3, 0x04, 0x74,
-0x0f, 0x50, 0x6a, 0xff, 0xff, 0x76, 0x10, 0x52, 0xe8, 0xaa, 0xf9, 0xff, 0xff, 0x83, 0xc4, 0x10,
-0x83, 0x7d, 0xe4, 0x00, 0x0f, 0x84, 0xbd, 0x01, 0x00, 0x00, 0xf6, 0x06, 0x40, 0x0f, 0x84, 0xb4,
-0x01, 0x00, 0x00, 0x8b, 0x5e, 0x30, 0x8b, 0x46, 0x2c, 0x01, 0xd8, 0x8b, 0x7d, 0xc8, 0x89, 0x45,
-0xb4, 0x8b, 0x73, 0xfc, 0x39, 0x5d, 0xb4, 0x0f, 0x86, 0x9a, 0x01, 0x00, 0x00, 0x8b, 0x13, 0x8b,
-0x4b, 0x04, 0x50, 0x89, 0xf8, 0xff, 0x73, 0x10, 0xff, 0x73, 0x0c, 0xff, 0x73, 0x08, 0x01, 0xf3,
-0xe8, 0xe3, 0xf7, 0xff, 0xff, 0x83, 0xc4, 0x10, 0xeb, 0xda, 0x83, 0x7d, 0xd0, 0x00, 0x0f, 0x84,
-0xaa, 0x00, 0x00, 0x00, 0x8b, 0x75, 0xbc, 0x8b, 0x46, 0x0c, 0x85, 0xc0, 0x74, 0x10, 0x52, 0x50,
-0xff, 0x76, 0x08, 0xff, 0x75, 0xc8, 0xe8, 0x3c, 0xf9, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x8b, 0x46,
-0x14, 0x8b, 0x5e, 0x10, 0x89, 0x45, 0xb4, 0x83, 0x7d, 0xb4, 0x00, 0x0f, 0x84, 0x46, 0x01, 0x00,
-0x00, 0x83, 0x3b, 0x01, 0x75, 0x6b, 0x83, 0x7d, 0xe4, 0x00, 0x74, 0x65, 0x8b, 0x45, 0xc8, 0xb9,
-0x14, 0x00, 0x00, 0x00, 0x89, 0x45, 0xb0, 0x8b, 0x43, 0x04, 0x83, 0xe8, 0x08, 0x31, 0xd2, 0xf7,
-0xf1, 0x89, 0x45, 0xac, 0x8d, 0x73, 0x08, 0x31, 0xff, 0x39, 0x7d, 0xac, 0x7e, 0x3c, 0x83, 0xff,
-0x1f, 0x7f, 0x37, 0x8b, 0x46, 0x10, 0x8d, 0x50, 0xff, 0xb8, 0x02, 0x00, 0x00, 0x00, 0x83, 0xfa,
-0x03, 0x77, 0x07, 0x0f, 0xb6, 0x82, 0x10, 0x10, 0x01, 0x00, 0x83, 0xec, 0x04, 0x8b, 0x16, 0x8b,
-0x4e, 0x04, 0x47, 0x50, 0x8b, 0x45, 0xb0, 0xff, 0x76, 0x0c, 0xff, 0x76, 0x08, 0x83, 0xc6, 0x14,
-0xe8, 0x43, 0xf7, 0xff, 0xff, 0x83, 0xc4, 0x10, 0xeb, 0xbf, 0xc7, 0x45, 0xe4, 0x00, 0x00, 0x00,
-0x00, 0x8b, 0x43, 0x04, 0x01, 0xc3, 0x29, 0x45, 0xb4, 0xe9, 0x79, 0xff, 0xff, 0xff, 0x83, 0x7d,
-0xd4, 0x00, 0x0f, 0x84, 0xbf, 0x00, 0x00, 0x00, 0x8b, 0x55, 0xc0, 0x8b, 0x7a, 0x04, 0x8d, 0x42,
-0x0c, 0x01, 0xd7, 0x39, 0xc7, 0x0f, 0x86, 0xac, 0x00, 0x00, 0x00, 0x8b, 0x10, 0x8d, 0x48, 0x0c,
-0x8d, 0x5a, 0x03, 0x83, 0xe3, 0xfc, 0x8d, 0x34, 0x19, 0x8b, 0x58, 0x04, 0x89, 0x75, 0xb4, 0x8d,
-0x73, 0x03, 0x83, 0xe6, 0xfc, 0x03, 0x75, 0xb4, 0x89, 0x75, 0xb0, 0x39, 0xf7, 0x0f, 0x82, 0x84,
-0x00, 0x00, 0x00, 0x8b, 0x35, 0x70, 0x14, 0x01, 0x00, 0x8b, 0x40, 0x08, 0x89, 0x75, 0xac, 0x39,
-0x05, 0x78, 0x14, 0x01, 0x00, 0x8b, 0x35, 0x74, 0x14, 0x01, 0x00, 0x75, 0x27, 0x3b, 0x55, 0xac,
-0x75, 0x22, 0x50, 0x52, 0x56, 0x51, 0xe8, 0x17, 0xf8, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x85, 0xc0,
-0x75, 0x12, 0x52, 0x8d, 0x45, 0xb8, 0xff, 0x75, 0xb4, 0x53, 0x50, 0xff, 0x15, 0x7c, 0x14, 0x01,
-0x00, 0x83, 0xc4, 0x10, 0x8b, 0x45, 0xb0, 0xeb, 0x8a, 0x8d, 0x7c, 0x0a, 0x0c, 0x83, 0x7d, 0xb4,
-0x07, 0x0f, 0x85, 0xdf, 0xfb, 0xff, 0xff, 0x89, 0x55, 0xb4, 0x50, 0x6a, 0x07, 0x68, 0x40, 0x11,
-0x01, 0x00, 0x57, 0xe8, 0xda, 0xf7, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x8b, 0x55, 0xb4, 0x85, 0xc0,
-0x0f, 0x85, 0xc0, 0xfb, 0xff, 0xff, 0xc7, 0x45, 0xd8, 0x01, 0x00, 0x00, 0x00, 0xbe, 0x01, 0x00,
-0x00, 0x00, 0xe9, 0xaf, 0xfb, 0xff, 0xff, 0xb0, 0x80, 0xe6, 0x70, 0x31, 0xc0, 0xe6, 0xf0, 0xe6,
-0xf1, 0xb0, 0x11, 0xe6, 0x20, 0xe6, 0xa0, 0xb0, 0x20, 0xe6, 0x21, 0xb0, 0x28, 0xe6, 0xa1, 0xb0,
-0x04, 0xe6, 0x21, 0xb0, 0x02, 0xe6, 0xa1, 0xb0, 0x01, 0xe6, 0x21, 0xe6, 0xa1, 0xb0, 0xff, 0xe6,
-0xa1, 0xb0, 0xfb, 0xe6, 0x21, 0x8b, 0x45, 0xc8, 0x8d, 0x65, 0xf4, 0x5b, 0x5e, 0x5f, 0x5d, 0xc3,
-0x01, 0x02, 0x03, 0x04, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x41, 0x42,
-0x43, 0x44, 0x45, 0x46, 0x00, 0x48, 0x64, 0x72, 0x53, 0x00, 0x42, 0x61, 0x64, 0x20, 0x75, 0x6e,
-0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x62, 0x6f, 0x6f, 0x74, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65,
-0x72, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x21, 0x0a, 0x00, 0x42, 0x61, 0x64,
-0x20, 0x45, 0x4c, 0x46, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x20, 0x74,
-0x61, 0x62, 0x6c, 0x65, 0x21, 0x0a, 0x00, 0x20, 0x20, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73,
-0x75, 0x6d, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63,
-0x6f, 0x75, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20,
-0x20, 0x20, 0x20, 0x68, 0x64, 0x72, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a, 0x00, 0x20, 0x20, 0x20,
-0x20, 0x20, 0x62, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a, 0x00, 0x62,
-0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a,
-0x00, 0x20, 0x20, 0x62, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x20, 0x3d, 0x20, 0x25,
-0x78, 0x0a, 0x00, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x62, 0x6f, 0x6f, 0x74, 0x6c,
-0x6f, 0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x21, 0x0a, 0x00, 0x74, 0x79,
-0x70, 0x65, 0x3d, 0x25, 0x78, 0x0a, 0x00, 0x64, 0x61, 0x74, 0x61, 0x3d, 0x25, 0x78, 0x0a, 0x00,
-0x70, 0x61, 0x72, 0x61, 0x6d, 0x3d, 0x25, 0x78, 0x0a, 0x00, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77,
-0x6e, 0x20, 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3a,
-0x20, 0x25, 0x73, 0x0a, 0x00, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x20, 0x74, 0x79,
-0x70, 0x65, 0x3a, 0x00, 0x20, 0x4c, 0x69, 0x6e, 0x75, 0x78, 0x42, 0x49, 0x4f, 0x53, 0x00, 0x20,
-0x50, 0x43, 0x42, 0x49, 0x4f, 0x53, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x7a, 0x52, 0x00, 0x01, 0x7c, 0x08, 0x01, 0x1b, 0x0c, 0x04, 0x04, 0x88, 0x01, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0xe2, 0xf1, 0xff, 0xff, 0x23, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x5d, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x20, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0xe5, 0xf1, 0xff, 0xff, 0x1b, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x45, 0x0d, 0x05, 0x41, 0x83, 0x03, 0x51, 0xc3, 0x41, 0xc5,
-0x0c, 0x04, 0x04, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xdc, 0xf1, 0xff, 0xff,
-0x8a, 0x01, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x46, 0x87, 0x03,
-0x86, 0x04, 0x83, 0x05, 0x03, 0x7d, 0x01, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04,
-0x04, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x36, 0xf3, 0xff, 0xff,
-0x47, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x42, 0x86, 0x03,
-0x83, 0x04, 0x7d, 0xc3, 0x41, 0xc6, 0x41, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x28, 0x00, 0x00, 0x00,
-0xb8, 0x00, 0x00, 0x00, 0x55, 0xf3, 0xff, 0xff, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08,
-0x85, 0x02, 0x42, 0x0d, 0x05, 0x43, 0x87, 0x03, 0x86, 0x04, 0x83, 0x05, 0x02, 0x70, 0xc3, 0x41,
-0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04, 0x28, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00,
-0xa3, 0xf3, 0xff, 0xff, 0x65, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x47, 0x0d,
-0x05, 0x43, 0x87, 0x03, 0x86, 0x04, 0x83, 0x05, 0x02, 0x56, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41,
-0xc5, 0x0c, 0x04, 0x04, 0x28, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0xdc, 0xf3, 0xff, 0xff,
-0xcc, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x46, 0x87, 0x03,
-0x86, 0x04, 0x83, 0x05, 0x02, 0xbf, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04,
-0x1c, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x00, 0x7c, 0xf4, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x45, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0x5c, 0x01, 0x00, 0x00, 0x65, 0xf4, 0xff, 0xff, 0x0a, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x46, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0x7c, 0x01, 0x00, 0x00, 0x4f, 0xf4, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x45, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0x9c, 0x01, 0x00, 0x00, 0x38, 0xf4, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x48, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x24, 0xf4, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x49, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x00, 0x11, 0xf4, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x48, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xfd, 0xf3, 0xff, 0xff, 0x18, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x52, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0x1c, 0x02, 0x00, 0x00, 0xf5, 0xf3, 0xff, 0xff, 0x18, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x52, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x20, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x00, 0x00, 0xed, 0xf3, 0xff, 0xff, 0x1d, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x41, 0x83, 0x03, 0x55, 0xc3, 0x41, 0xc5,
-0x0c, 0x04, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0xe6, 0xf3, 0xff, 0xff,
-0x25, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x5f, 0xc5, 0x0c,
-0x04, 0x04, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0xeb, 0xf3, 0xff, 0xff,
-0x5b, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x43, 0x87, 0x03,
-0x86, 0x04, 0x83, 0x05, 0x02, 0x51, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04,
-0x1c, 0x00, 0x00, 0x00, 0xac, 0x02, 0x00, 0x00, 0x1a, 0xf4, 0xff, 0xff, 0x1b, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x56, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x2c, 0x00, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x15, 0xf4, 0xff, 0xff, 0x35, 0x01, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x43, 0x87, 0x03, 0x86, 0x04, 0x83, 0x05,
-0x03, 0x2b, 0x01, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, 0x00,
-0x2c, 0x00, 0x00, 0x00, 0xfc, 0x02, 0x00, 0x00, 0x1a, 0xf5, 0xff, 0xff, 0xae, 0x06, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x46, 0x87, 0x03, 0x86, 0x04, 0x83, 0x05,
-0x03, 0xa1, 0x06, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x66, 0x10, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x12, 0x08, 0x01, 0x00,
-0xc0, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xa5, 0xa5, 0xa5, 0xa5, 0x70, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
-0x8c, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4f, 0x4f, 0x54, 0x5f, 0x49, 0x4d, 0x41,
-0x47, 0x45, 0x3d, 0x68, 0x65, 0x61, 0x64, 0x2e, 0x53, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c,
-0x65, 0x3d, 0x74, 0x74, 0x79, 0x53, 0x30, 0x20, 0x69, 0x70, 0x3d, 0x64, 0x68, 0x63, 0x70, 0x20,
-0x72, 0x6f, 0x6f, 0x74, 0x3d, 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x6e, 0x66, 0x73, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
deleted file mode 100644
index a162eb7..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From dc2712119d6832e24a9b7bed9ed4ce5ae03ce0a3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 14 Jul 2012 14:14:07 -0700
-Subject: [PATCH] mkelfimage: Fix cross build
-
-Make the tool to be cross compilable, by separating the variables for build
-tools from those for the target. Also modified to obey LDFLAGS.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-
-Upstream-Status: Pending
-
----
- Makefile.conf.in | 3 +++
- configure.ac | 7 +++++--
- linux-i386/Makefile | 2 +-
- linux-ia64/Makefile | 2 +-
- main/Makefile | 4 ++--
- 5 files changed, 12 insertions(+), 6 deletions(-)
-
-diff --git a/Makefile.conf.in b/Makefile.conf.in
-index 4645e44..dcb6cf2 100644
---- a/Makefile.conf.in
-+++ b/Makefile.conf.in
-@@ -17,6 +17,9 @@ DEFS=@DEFS@
- LIBS=@LIBS@
- HOST_CC=@HOST_CC@
- HOST_CFLAGS=@HOST_CFLAGS@ $(DEFS)
-+CC=@CC@
-+CFLAGS=@CFLAGS@ $(DEFS)
-+LDFLAGS=@LDFLAGS@
-
- I386_CC =@I386_CC@
- I386_LD =@I386_LD@
-diff --git a/configure.ac b/configure.ac
-index 652b952..0f2ac72 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -70,6 +70,9 @@ if test "with_default" != no ; then
- AC_MSG_ERROR([cc not found])
- fi
- eval "${with_default}_CC='$CC'"
-+ if test "x$HOST_CC" = 'x'; then
-+ AC_CHECK_PROG([HOST_CC], [$CC], [$CC], [gcc], [$PATH])
-+ fi
- AC_PROG_CPP
- if test "$CPP" = no; then
- AC_MSG_ERROR([cpp not found])
-@@ -172,8 +175,8 @@ fi
-
- dnl ---Output variables...
-
--HOST_CC=$CC
--HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS)"
-+CFLAGS="${CFLAGS:--O2} -Wall \$(CPPFLAGS)"
-+HOST_CFLAGS="${HOST_CFLAGS:--O2} -Wall \$(HOST_CPPFLAGS)"
-
- dnl TODO: figure out how to set these appropriately for compilers other than gcc
- I386_CFLAGS="$I386_CFLAGS -Os -ffreestanding -Wall -W -Wno-format \$(I386_CPPFLAGS)"
-diff --git a/linux-i386/Makefile b/linux-i386/Makefile
-index 51531d6..7e8aa3c 100644
---- a/linux-i386/Makefile
-+++ b/linux-i386/Makefile
-@@ -4,7 +4,7 @@ LI386_DEP=Makefile Makefile.conf $(LI386_DIR)/Makefile
-
- $(LI386_OBJ)/mkelf-linux-i386.o: $(LI386_DIR)/mkelf-linux-i386.c $(LI386_DIR)/convert.bin.c $(LI386_DEP)
- $(MKDIR) -p $(@D)
-- $(HOST_CC) $(HOST_CFLAGS) -c -g $< -o $@
-+ $(CC) $(CFLAGS) -c -g $< -o $@
-
-
- ifdef I386_CC
-diff --git a/linux-ia64/Makefile b/linux-ia64/Makefile
-index 38f5d8c..5df8870 100644
---- a/linux-ia64/Makefile
-+++ b/linux-ia64/Makefile
-@@ -4,7 +4,7 @@ LIA64_DEP=Makefile Makefile.conf $(LIA64_DIR)/Makefile
-
- $(LIA64_OBJ)/mkelf-linux-ia64.o: $(LIA64_DIR)/mkelf-linux-ia64.c $(LIA64_DIR)/convert.bin.c $(LIA64_DEP)
- $(MKDIR) -p $(@D)
-- $(HOST_CC) $(HOST_CFLAGS) -c -g $< -o $@
-+ $(CC) $(CFLAGS) -c -g $< -o $@
-
- ifdef IA64_CC
-
-diff --git a/main/Makefile b/main/Makefile
-index 403b0a4..cd53613 100644
---- a/main/Makefile
-+++ b/main/Makefile
-@@ -4,11 +4,11 @@ MKELF_OBJS=$(OBJDIR)/main/mkelfImage.o \
-
- $(OBJDIR)/sbin/mkelfImage: $(MKELF_OBJS) $(DEPS)
- $(MKDIR) -p $(@D)
-- $(HOST_CC) $(HOST_CFLAGS) $(MKELF_OBJS) -o $@ $(LIBS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(MKELF_OBJS) -o $@ $(LIBS)
-
- $(OBJDIR)/main/mkelfImage.o: main/mkelfImage.c include/mkelfImage.h $(DEPS)
- $(MKDIR) -p $(@D)
-- $(HOST_CC) $(HOST_CFLAGS) -c $< -o $@
-+ $(CC) $(CFLAGS) -c $< -o $@
-
- $(OBJDIR)/man/man8/mkelfImage.8: main/mkelfImage.man
- $(MKDIR) -p $(@D)
---
-2.8.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch
deleted file mode 100644
index be54754..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Let makefile find libz and zlib.h by CFLAGS and LDFLAGS.
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-Upstream-Status: Pending
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 0f2ac72..f9099a2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -62,7 +62,7 @@ AC_CHECK_PROG([RPM], rpm, rpm, [], [$PATH])
- AC_CHECK_PROG([SED], sed, sed, [], [$PATH])
- AC_CHECK_PROG([FIND], find, find, [], [$PATH])
-
--AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, inflateInit_, [AC_DEFINE(HAVE_ZLIB_H, 1) LIBS="$LIBS -lz"]))
-+AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, inflateInit_, [AC_DEFINE(HAVE_ZLIB_H, 1) LIBS="$LIBS $LDFLAGS -lz"]))
-
- dnl Find the default programs
- if test "with_default" != no ; then
-@@ -176,7 +176,7 @@ fi
- dnl ---Output variables...
-
- CFLAGS="${CFLAGS:--O2} -Wall \$(CPPFLAGS)"
--HOST_CFLAGS="${HOST_CFLAGS:--O2} -Wall \$(HOST_CPPFLAGS)"
-+HOST_CFLAGS="${HOST_CFLAGS:--O2} -Wall \$(HOST_CPPFLAGS) $CFLAGS"
-
- dnl TODO: figure out how to set these appropriately for compilers other than gcc
- I386_CFLAGS="$I386_CFLAGS -Os -ffreestanding -Wall -W -Wno-format \$(I386_CPPFLAGS)"
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
deleted file mode 100644
index 330fa7c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "Utility for creating ELF boot images for ELF-based Linux kernel images"
-HOMEPAGE = "http://www.coreboot.org/Mkelfimage"
-SECTION = "devel"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a"
-
-SRCREV = "686a48a339b3200184c27e7f98d4c03180b2be6c"
-PV = "4.0+git${SRCPV}"
-RECIPE_NO_UPDATE_REASON = "mkelfimage has been removed in coreboot 4.1 release: \
-http://review.coreboot.org/gitweb?p=coreboot.git;a=commit;h=34fc4ab80b507739e2580d490dff67fcfdde11ea"
-
-
-DEPENDS += "zlib"
-
-SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http \
- file://cross-compile.patch \
- "
-SRC_URI_append_class-native = " \
- file://fix-makefile-to-find-libz.patch \
- file://convert.bin.c \
-"
-
-CLEANBROKEN = "1"
-
-S = "${WORKDIR}/git/util/mkelfImage"
-
-CACHED_CONFIGUREVARS += "\
- HOST_CC='${BUILD_CC}' \
- HOST_CFLAGS='${BUILD_CFLAGS}' \
- HOST_CPPFLAGS='${BUILD_CPPFLAGS}' \
- I386_CFLAGS='-fno-stack-protector' \
- IA64_CFLAGS='-fno-stack-protector' \
-"
-EXTRA_OECONF_append_x86-64 = " --with-i386=${HOST_SYS}"
-
-inherit autotools-brokensep
-
-do_configure_prepend-class-native() {
- cp ${WORKDIR}/convert.bin.c ${S}/linux-i386/
-}
-
-do_install_append() {
- rmdir ${D}${datadir}/mkelfImage/elf32-i386
- rmdir ${D}${datadir}/mkelfImage
- chown root:root ${D}/${sbindir}/mkelfImage
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch b/import-layers/yocto-poky/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
index 7d6d62e..17d9af4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
@@ -1,7 +1,7 @@
-From f172101130604e4a9efa5746f4d8d30de99a0fdc Mon Sep 17 00:00:00 2001
+From dcb45256970b15b672d0004533826c94083356e5 Mon Sep 17 00:00:00 2001
From: Yuanjie Huang <yuanjie.huang@windriver.com>
Date: Fri, 17 Apr 2015 14:48:20 +0800
-Subject: [PATCH] avoid failure on symbol provided by application
+Subject: [PATCH 4/6] avoid failure on symbol provided by application
Upstream-Status: Pending
@@ -13,12 +13,13 @@
of symbols.
Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
+
---
src/mklibs | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/src/mklibs b/src/mklibs
-index c5614ea..b0d9034 100755
+index a3533c0..66b7a09 100755
--- a/src/mklibs
+++ b/src/mklibs
@@ -133,9 +133,9 @@ class Symbol(object):
@@ -31,9 +32,9 @@
- self.weak, self.library = weak, library
+ self.weak, self.library, self.object = weak, library, object
- # Return undefined symbols in an object as a set of tuples (name, weakness)
- def undefined_symbols(obj):
-@@ -144,6 +144,11 @@ def undefined_symbols(obj):
+ def symbol_is_blacklisted(name):
+ # The ARM Embedded ABI spec states symbols under this namespace as
+@@ -152,6 +152,11 @@ def undefined_symbols(obj):
output = command("mklibs-readelf", "--print-symbols-undefined", obj)
@@ -45,7 +46,7 @@
result = []
for line in output:
name, weak_string, version_string, library_string = line.split()[:4]
-@@ -160,7 +165,7 @@ def undefined_symbols(obj):
+@@ -171,7 +176,7 @@ def undefined_symbols(obj):
if library_string.lower() != 'none':
library = library_string
@@ -54,7 +55,7 @@
return result
-@@ -495,12 +500,13 @@ while 1:
+@@ -498,12 +503,13 @@ while 1:
and re.search("^ps_", str(symbol)))
and not (re.search("ld-linux.so.3$", str(symbol)))
and not (re.search("^__gnu_local_gp", str(symbol)))):
@@ -68,8 +69,8 @@
+ present_symbol_progs = {}
checked_libs = small_libs
checked_libs.extend(available_libs)
- checked_libs.append(ldlib)
-@@ -510,6 +516,12 @@ while 1:
+ checked_libs.append(sysroot + ldlib)
+@@ -513,6 +519,12 @@ while 1:
names = symbol.base_names()
for name in names:
present_symbols[name] = symbol
@@ -82,7 +83,7 @@
# are we finished?
num_unresolved = 0
-@@ -565,6 +577,14 @@ while 1:
+@@ -568,6 +580,14 @@ while 1:
for name in needed_symbols:
if not name in symbol_provider:
if not needed_symbols[name].weak:
@@ -98,5 +99,5 @@
else:
lib = symbol_provider[name]
--
-1.8.5.2.233.g932f7e4
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch b/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch
new file mode 100644
index 0000000..62e25fd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch
@@ -0,0 +1,36 @@
+From 175ac0f362bf6121c3537e2f1760ad41c8f81367 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 29 Mar 2018 01:04:57 -0700
+Subject: [PATCH] lsmmc: replace strncpy with memmove on overlapping memory
+ copy
+
+here source and destination addresses are overlapping so using memmove is
+going to be more efficient.
+
+Additionally, the bounded size for copy is overflowing for first copy
+
+In function 'strncpy',
+ inlined from 'read_file' at lsmmc.c:356:3:
+/mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-gnueabi/mmc-utils/0.1-r0/recipe-sysroot/usr/include/bits/string_fortified.h:106:10: error: '__builtin_strncpy' accessing 4096 bytes at offsets 0 and 1 overlaps 4095 bytes at offset 1 [-Werror=restrict]
+ return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted [https://patchwork.kernel.org/patch/10314723/]
+ lsmmc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index c4faa00..bcb854d 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -353,7 +353,7 @@ char *read_file(char *name)
+ line[strlen(line) - 1] = '\0';
+
+ while (isspace(line[0]))
+- strncpy(&line[0], &line[1], sizeof(line));
++ memmove(&line[0], &line[1], sizeof(line)-1);
+
+ return strdup(line);
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
index 50acdb1..37a4755 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
@@ -4,12 +4,14 @@
LIC_FILES_CHKSUM = "file://mmc.c;beginline=1;endline=20;md5=fae32792e20f4d27ade1c5a762d16b7d"
SRCBRANCH ?= "master"
-SRCREV = "37c86e60c0442fef570b75cd81aeb1db4d0cbafd"
+SRCREV = "b4fe0c8c0e57a74c01755fa9362703b60d7ee49d"
PV = "0.1"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH}"
-UPSTREAM_VERSION_UNKNOWN = "1"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH} \
+ file://0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch \
+ "
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch
deleted file mode 100644
index bf3f98f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 4dab9bed1033f797ef9b482c77342fe3fe26d0be Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 6 Oct 2015 23:51:34 +0000
-Subject: [PATCH] Fix build with musl
-
-Upstream-Status: Backport
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
----
- jffsX-utils/mkfs.jffs2.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/jffsX-utils/mkfs.jffs2.c b/jffsX-utils/mkfs.jffs2.c
-index 5446a16..ca5e0d5 100644
---- a/jffsX-utils/mkfs.jffs2.c
-+++ b/jffsX-utils/mkfs.jffs2.c
-@@ -72,6 +72,7 @@
- #include <byteswap.h>
- #include <crc32.h>
- #include <inttypes.h>
-+#include <limits.h>
-
- #include "rbtree.h"
- #include "common.h"
---
-2.6.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
deleted file mode 100644
index 853de6a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 82839c3c0371ca2a1643a99d7d01f5bc1c850b28 Mon Sep 17 00:00:00 2001
-From: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-Date: Thu, 2 Mar 2017 11:40:36 +0100
-Subject: [PATCH] Replace rpmatch() usage with checking first character of line
-
-This is based on the patch from Khem Raj used by openembedded. In
-addition to the original patch, this also removes the fallback
-implementation that was provided for C libraries that don't implement
-rpmatch.
-
-Upstream-Status: Backport
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
----
- include/common.h | 25 ++++++-------------------
- 1 file changed, 6 insertions(+), 19 deletions(-)
-
-diff --git a/include/common.h b/include/common.h
-index d0c706d..d609257 100644
---- a/include/common.h
-+++ b/include/common.h
-@@ -129,21 +129,6 @@ extern "C" {
- fprintf(stderr, "%s: warning!: " fmt "\n", PROGRAM_NAME, ##__VA_ARGS__); \
- } while(0)
-
--/* uClibc versions before 0.9.34 and musl don't have rpmatch() */
--#if defined(__UCLIBC__) && \
-- (__UCLIBC_MAJOR__ == 0 && \
-- (__UCLIBC_MINOR__ < 9 || \
-- (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ < 34))) || \
-- !defined(__GLIBC__)
--#undef rpmatch
--#define rpmatch __rpmatch
--static inline int __rpmatch(const char *resp)
--{
-- return (resp[0] == 'y' || resp[0] == 'Y') ? 1 :
-- (resp[0] == 'n' || resp[0] == 'N') ? 0 : -1;
--}
--#endif
--
- /**
- * prompt the user for confirmation
- */
-@@ -164,10 +149,12 @@ static inline bool prompt(const char *msg, bool def)
- }
-
- if (strcmp("\n", line) != 0) {
-- switch (rpmatch(line)) {
-- case 0: ret = false; break;
-- case 1: ret = true; break;
-- case -1:
-+ switch (line[0]) {
-+ case 'N':
-+ case 'n': ret = false; break;
-+ case 'Y':
-+ case 'y': ret = true; break;
-+ default:
- puts("unknown response; please try again");
- continue;
- }
---
-2.6.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch
index 0e3776a..5d874d9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch
@@ -1,8 +1,10 @@
Upstream-Status: Pending
---- /tmp/mkfs.jffs2.c 2009-01-11 15:28:41.000000000 +0100
-+++ git/jffsX-utils/mkfs.jffs2.c 2009-01-11 15:59:29.000000000 +0100
-@@ -100,6 +100,11 @@
+Index: git/jffsX-utils/mkfs.jffs2.c
+===================================================================
+--- git.orig/jffsX-utils/mkfs.jffs2.c
++++ git/jffsX-utils/mkfs.jffs2.c
+@@ -100,6 +100,11 @@ struct filesystem_entry {
struct rb_node hardlink_rb;
};
@@ -14,7 +16,7 @@
struct rb_root hardlinks;
static int out_fd = -1;
static int in_fd = -1;
-@@ -408,7 +413,7 @@
+@@ -309,7 +314,7 @@ static struct filesystem_entry *recursiv
char *hpath, *tpath;
struct dirent *dp, **namelist;
struct filesystem_entry *entry;
@@ -22,8 +24,8 @@
+ struct ignorepath_entry* element = ignorepath;
if (lstat(hostpath, &sb)) {
- perror_msg_and_die("%s", hostpath);
-@@ -417,6 +422,15 @@
+ sys_errmsg_die("%s", hostpath);
+@@ -318,6 +323,15 @@ static struct filesystem_entry *recursiv
entry = add_host_filesystem_entry(targetpath, hostpath,
sb.st_uid, sb.st_gid, sb.st_mode, 0, parent);
@@ -38,8 +40,8 @@
+
n = scandir(hostpath, &namelist, 0, alphasort);
if (n < 0) {
- perror_msg_and_die("opening directory %s", hostpath);
-@@ -1453,6 +1467,7 @@
+ sys_errmsg_die("opening directory %s", hostpath);
+@@ -1359,6 +1373,7 @@ static struct option long_options[] = {
{"root", 1, NULL, 'r'},
{"pagesize", 1, NULL, 's'},
{"eraseblock", 1, NULL, 'e'},
@@ -47,15 +49,15 @@
{"output", 1, NULL, 'o'},
{"help", 0, NULL, 'h'},
{"verbose", 0, NULL, 'v'},
-@@ -1500,6 +1515,7 @@
- " -L, --list-compressors Show the list of the avaiable compressors\n"
+@@ -1409,6 +1424,7 @@ static const char helptext[] =
+ " -L, --list-compressors Show the list of the available compressors\n"
" -t, --test-compression Call decompress and compare with the original (for test)\n"
" -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n"
+" -I, --ignore=PATH Ignore sub directory and file tree below PATH when recursing over the file system\n"
" -o, --output=FILE Output to FILE (default: stdout)\n"
" -l, --little-endian Create a little-endian filesystem\n"
" -b, --big-endian Create a big-endian filesystem\n"
-@@ -1666,6 +1682,7 @@
+@@ -1566,6 +1582,7 @@ int main(int argc, char **argv)
char *compr_name = NULL;
int compr_prior = -1;
int warn_page_size = 0;
@@ -63,7 +65,7 @@
page_size = sysconf(_SC_PAGESIZE);
if (page_size < 0) /* System doesn't know so ... */
-@@ -1676,7 +1693,7 @@
+@@ -1576,7 +1593,7 @@ int main(int argc, char **argv)
jffs2_compressors_init();
while ((opt = getopt_long(argc, argv,
@@ -72,7 +74,7 @@
{
switch (opt) {
case 'D':
-@@ -1700,6 +1717,28 @@
+@@ -1600,6 +1617,28 @@ int main(int argc, char **argv)
warn_page_size = 0; /* set by user, so don't need to warn */
break;
@@ -100,4 +102,4 @@
+
case 'o':
if (out_fd != -1) {
- error_msg_and_die("output filename specified more than once");
+ errmsg_die("output filename specified more than once");
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
deleted file mode 100644
index 6fc594f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 7d026a85946a08b8167dcd792ea6660bf6a49e08 Mon Sep 17 00:00:00 2001
-From: Yuanjie Huang <Yuanjie.Huang@windriver.com>
-Date: Thu, 2 Mar 2017 10:43:56 +0100
-Subject: [PATCH] Fix alignment trap triggered by NEON instructions
-
-NEON instruction VLD1.64 was used to copy 64 bits data after type
-casting, and they will trigger alignment trap.
-This patch uses memcpy to avoid alignment problem.
-
-Upstream-Status: Backport
-
-Signed-off-by: Yuanjie Huang <Yuanjie.Huang@windriver.com>
-Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
----
- ubifs-utils/mkfs.ubifs/key.h | 16 ++++++++++------
- 1 file changed, 10 insertions(+), 6 deletions(-)
-
-diff --git a/ubifs-utils/mkfs.ubifs/key.h b/ubifs-utils/mkfs.ubifs/key.h
-index 39379fd..118858b 100644
---- a/ubifs-utils/mkfs.ubifs/key.h
-+++ b/ubifs-utils/mkfs.ubifs/key.h
-@@ -159,10 +159,12 @@ static inline void data_key_init(union ubifs_key *key, ino_t inum,
- */
- static inline void key_write(const union ubifs_key *from, void *to)
- {
-- union ubifs_key *t = to;
-+ __le32 x[2];
-
-- t->j32[0] = cpu_to_le32(from->u32[0]);
-- t->j32[1] = cpu_to_le32(from->u32[1]);
-+ x[0] = cpu_to_le32(from->u32[0]);
-+ x[1] = cpu_to_le32(from->u32[1]);
-+
-+ memcpy(to, &x, 8);
- memset(to + 8, 0, UBIFS_MAX_KEY_LEN - 8);
- }
-
-@@ -174,10 +176,12 @@ static inline void key_write(const union ubifs_key *from, void *to)
- */
- static inline void key_write_idx(const union ubifs_key *from, void *to)
- {
-- union ubifs_key *t = to;
-+ __le32 x[2];
-+
-+ x[0] = cpu_to_le32(from->u32[0]);
-+ x[1] = cpu_to_le32(from->u32[1]);
-
-- t->j32[0] = cpu_to_le32(from->u32[0]);
-- t->j32[1] = cpu_to_le32(from->u32[1]);
-+ memcpy(to, &x, 8);
- }
-
- /**
---
-2.6.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch
deleted file mode 100644
index 0f42e73..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-Upstream-Status: Pending
-From patchwork Mon Aug 8 08:16:43 2011
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: mtd-utils: fix corrupt cleanmarker with flash_erase -j command
-Date: Sun, 07 Aug 2011 22:16:43 -0000
-From: b35362@freescale.com
-X-Patchwork-Id: 108873
-Message-Id: <1312791403-13473-1-git-send-email-b35362@freescale.com>
-To: <dwmw2@infradead.org>
-Cc: Liu Shuo <b35362@freescale.com>, Artem.Bityutskiy@nokia.com,
- Li Yang <leoli@freescale.com>, linux-mtd@lists.infradead.org
-
-From: Liu Shuo <b35362@freescale.com>
-
-Flash_erase -j should fill discrete freeoob areas with required bytes
-of JFFS2 cleanmarker in jffs2_check_nand_cleanmarker(). Not just fill
-the first freeoob area.
-
-The below is the result without this workaround:
-
-JFFS2: Erase block at 0x00000000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00004000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00008000 is not formatted. It will be erased
-JFFS2: Erase block at 0x0000c000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00010000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00014000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00018000 is not formatted. It will be erased
-JFFS2: Erase block at 0x0001c000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00020000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00024000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00028000 is not formatted. It will be erased
-...
-
-Signed-off-by: Liu Shuo <b35362@freescale.com>
-Signed-off-by: Li Yang <leoli@freescale.com>
-
-Updated for the new version
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
----
-v2 : get length of availble freeoob bytes from oobinfo information,
- not use the ioctl ECCGETLAYOUT which is being deprecated.
-
- flash_erase.c | 46 +++++++++++++++++++++++++++++++++++++++-------
- 1 files changed, 39 insertions(+), 7 deletions(-)
-
-diff --git a/flash_erase.c b/flash_erase.c
-index 933373a..4b9d84b 100644
---- a/misc-utils/flash_erase.c
-+++ b/misc-utils/flash_erase.c
-@@ -99,6 +99,7 @@ int main(int argc, char *argv[])
- bool isNAND;
- int error = 0;
- off_t offset = 0;
-+ void *oob_data = NULL;
-
- /*
- * Process user arguments
-@@ -201,15 +202,43 @@ int main(int argc, char *argv[])
- if (ioctl(fd, MEMGETOOBSEL, &oobinfo) != 0)
- return sys_errmsg("%s: unable to get NAND oobinfo", mtd_device);
-
-+ cleanmarker.totlen = cpu_to_je32(8);
- /* Check for autoplacement */
- if (oobinfo.useecc == MTD_NANDECC_AUTOPLACE) {
-- /* Get the position of the free bytes */
-- if (!oobinfo.oobfree[0][1])
-+ struct nand_ecclayout_user ecclayout;
-+ int i, oobavail;
-+
-+ for (i = 0, oobavail = 0; oobinfo.oobfree[i][1]; i++)
-+ oobavail += oobinfo.oobfree[i][1];
-+
-+ if (!oobavail)
- return errmsg(" Eeep. Autoplacement selected and no empty space in oob");
-+
-+ /* Get the position of the free bytes */
- clmpos = oobinfo.oobfree[0][0];
-- clmlen = oobinfo.oobfree[0][1];
-- if (clmlen > 8)
-- clmlen = 8;
-+ clmlen = MIN(oobavail, 8);
-+
-+ if (oobinfo.oobfree[0][1] < 8 && oobavail >= 8) {
-+ int left, n, last = 0;
-+ void *cm;
-+
-+ oob_data = malloc(mtd.oob_size);
-+ if (!oob_data)
-+ return -ENOMEM;
-+
-+ memset(oob_data, 0xff, mtd.oob_size);
-+ cm = &cleanmarker;
-+ for (i = 0, left = clmlen; left ; i++) {
-+ n = MIN(left, oobinfo.oobfree[i][1]);
-+ memcpy(oob_data + oobinfo.oobfree[i][0],
-+ cm, n);
-+ left -= n;
-+ cm += n;
-+ last = oobinfo.oobfree[i][0] + n;
-+ }
-+
-+ clmlen = last - clmpos;
-+ }
- } else {
- /* Legacy mode */
- switch (mtd.oob_size) {
-@@ -227,7 +256,6 @@ int main(int argc, char *argv[])
- break;
- }
- }
-- cleanmarker.totlen = cpu_to_je32(8);
- }
- cleanmarker.hdr_crc = cpu_to_je32(mtd_crc32(0, &cleanmarker, sizeof(cleanmarker) - 4));
- }
-@@ -276,7 +304,8 @@ int main(int argc, char *argv[])
-
- /* write cleanmarker */
- if (isNAND) {
-- if (mtd_write_oob(mtd_desc, &mtd, fd, (uint64_t)offset + clmpos, clmlen, &cleanmarker) != 0) {
-+ void *data = oob_data ? oob_data + clmpos : &cleanmarker;
-+ if (mtd_write_oob(mtd_desc, &mtd, fd, (uint64_t)offset + clmpos, clmlen, data) != 0) {
- sys_errmsg("%s: MTD writeoob failure", mtd_device);
- continue;
- }
-@@ -291,5 +320,8 @@ int main(int argc, char *argv[])
- show_progress(&mtd, offset, eb, eb_start, eb_cnt);
- bareverbose(!quiet, "\n");
-
-+ if (oob_data)
-+ free(oob_data);
-+
- return 0;
- }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 48ba2ee..a0e1cf7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -8,42 +8,61 @@
inherit autotools pkgconfig update-alternatives
DEPENDS = "zlib lzo e2fsprogs util-linux"
+RDEPENDS_mtd-utils-tests += "bash"
-PV = "2.0.0"
+PV = "2.0.1+${SRCPV}"
-SRCREV = "1bfee8660131fca7a18f68e9548a18ca6b3378a0"
+SRCREV = "9c6173559f95e939e66efb2ec3193d6f3618cf69"
SRC_URI = "git://git.infradead.org/mtd-utils.git \
file://add-exclusion-to-mkfs-jffs2-git-2.patch \
- file://fix-armv7-neon-alignment.patch \
- file://mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch \
- file://0001-Fix-build-with-musl.patch \
- file://010-fix-rpmatch.patch \
"
S = "${WORKDIR}/git/"
+EXTRA_OECONF += "--enable-install-tests"
+
# xattr support creates an additional compile-time dependency on acl because
# the sys/acl.h header is needed. libacl is not needed and thus enabling xattr
# regardless whether acl is enabled or disabled in the distro should be okay.
PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)}"
PACKAGECONFIG[xattr] = ",,acl,"
+CPPFLAGS_append_riscv64 = " -pthread -D_REENTRANT"
+
EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} ${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} -I${S}/include' 'BUILDDIR=${S}'"
-ALTERNATIVE_${PN} = "flash_eraseall"
+# Use higher priority than corresponding BusyBox-provided applets
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "flashcp flash_eraseall flash_lock flash_unlock nanddump nandwrite"
+ALTERNATIVE_${PN}-ubifs = "ubiattach ubidetach ubimkvol ubirename ubirmvol ubirsvol ubiupdatevol"
+
ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall"
-# Use higher priority than busybox's flash_eraseall (created when built with CONFIG_FLASH_ERASEALL)
-ALTERNATIVE_PRIORITY[flash_eraseall] = "100"
+ALTERNATIVE_LINK_NAME[nandwrite] = "${sbindir}/nandwrite"
+ALTERNATIVE_LINK_NAME[nanddump] = "${sbindir}/nanddump"
+ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach"
+ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach"
+ALTERNATIVE_LINK_NAME[ubidetach] = "${sbindir}/ubidetach"
+ALTERNATIVE_LINK_NAME[ubimkvol] = "${sbindir}/ubimkvol"
+ALTERNATIVE_LINK_NAME[ubirename] = "${sbindir}/ubirename"
+ALTERNATIVE_LINK_NAME[ubirmvol] = "${sbindir}/ubirmvol"
+ALTERNATIVE_LINK_NAME[ubirsvol] = "${sbindir}/ubirsvol"
+ALTERNATIVE_LINK_NAME[ubiupdatevol] = "${sbindir}/ubiupdatevol"
+ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall"
+ALTERNATIVE_LINK_NAME[flash_lock] = "${sbindir}/flash_lock"
+ALTERNATIVE_LINK_NAME[flash_unlock] = "${sbindir}/flash_unlock"
+ALTERNATIVE_LINK_NAME[flashcp] = "${sbindir}/flashcp"
do_install () {
oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
}
-PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc"
+PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc mtd-utils-tests"
FILES_mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool"
FILES_mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*"
FILES_mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image"
+FILES_mtd-utils-tests = "${libexecdir}/mtd-utils/*"
BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch
index 2e2873a..8ceb0af 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch
@@ -1,8 +1,10 @@
Upstream-Status: Inappropriate [licensing]
---- mtools-3.9.9/configure.in.orig 2006-04-14 16:05:54.337655192 -0600
-+++ mtools-3.9.9/configure.in 2006-04-14 16:12:29.736545424 -0600
-@@ -21,6 +21,33 @@
+Index: mtools-4.0.18/configure.in
+===================================================================
+--- mtools-4.0.18.orig/configure.in
++++ mtools-4.0.18/configure.in
+@@ -35,6 +35,33 @@ AC_CANONICAL_SYSTEM
AC_C_CONST
AC_C_INLINE
@@ -36,9 +38,11 @@
dnl Check for configuration options
dnl Enable OS/2 extended density format disks
---- mtools-3.9.9/Makefile.in.sav 2006-04-14 15:56:19.000000000 -0600
-+++ mtools-3.9.9/Makefile.in 2006-04-14 16:15:29.315245312 -0600
-@@ -11,10 +11,11 @@
+Index: mtools-4.0.18/Makefile.in
+===================================================================
+--- mtools-4.0.18.orig/Makefile.in
++++ mtools-4.0.18/Makefile.in
+@@ -26,10 +26,11 @@ USERCFLAGS =
USERLDFLAGS =
USERLDLIBS =
@@ -54,7 +58,7 @@
# do not edit below this line
-@@ -181,7 +182,7 @@
+@@ -198,7 +199,7 @@ dvi: mtools.dvi
ps: mtools.ps
%.ps: %.dvi
@@ -62,4 +66,4 @@
+ $(DVI2PS) -f < $< > $@
pdf: mtools.pdf
- %.pdf: %.texi
+ %.pdf: %.texi sysconfdir.texi
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm/0001-asmlib-Drop-pure-function-attribute-from-seg_init.patch b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm/0001-asmlib-Drop-pure-function-attribute-from-seg_init.patch
new file mode 100644
index 0000000..12ae3a9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm/0001-asmlib-Drop-pure-function-attribute-from-seg_init.patch
@@ -0,0 +1,27 @@
+From 77c3a77210d8ca8b94e999c711156e984a8dc737 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 31 Mar 2018 11:05:33 -0700
+Subject: [PATCH] asmlib: Drop pure function attribute from seg_init
+
+seg_init returns void, so it is impure function
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ include/nasmlib.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/nasmlib.h b/include/nasmlib.h
+index 79e866b..b80b7e2 100644
+--- a/include/nasmlib.h
++++ b/include/nasmlib.h
+@@ -191,7 +191,7 @@ int64_t readstrnum(char *str, int length, bool *warn);
+ * seg_init: Initialise the segment-number allocator.
+ * seg_alloc: allocate a hitherto unused segment number.
+ */
+-void pure_func seg_init(void);
++void seg_init(void);
+ int32_t pure_func seg_alloc(void);
+
+ /*
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.01.bb b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.01.bb
deleted file mode 100644
index bf18cd6..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.01.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "General-purpose x86 assembler"
-SECTION = "devel"
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=90904486f8fbf1861cf42752e1a39efe"
-
-SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 "
-
-SRC_URI[md5sum] = "1f7d4662040d24351df7d6719ed4f97a"
-SRC_URI[sha256sum] = "08f97baf0a7f892128c6413cfa93b69dc5825fbbd06c70928aea028835d198fa"
-
-inherit autotools-brokensep
-
-do_configure_prepend () {
- if [ -f ${S}/aclocal.m4 ] && [ ! -f ${S}/acinclude.m4 ]; then
- mv ${S}/aclocal.m4 ${S}/acinclude.m4
- fi
-}
-
-do_install() {
- install -d ${D}${bindir}
- install -d ${D}${mandir}/man1
-
- oe_runmake 'INSTALLROOT=${D}' install
-}
-
-BBCLASSEXTEND = "native"
-
-DEPENDS = "groff-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.03.bb b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.03.bb
new file mode 100644
index 0000000..236d7e5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.03.bb
@@ -0,0 +1,30 @@
+SUMMARY = "General-purpose x86 assembler"
+SECTION = "devel"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=90904486f8fbf1861cf42752e1a39efe"
+
+SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 \
+ file://0001-asmlib-Drop-pure-function-attribute-from-seg_init.patch \
+ "
+
+SRC_URI[md5sum] = "0c581d482f39d5111879ca9601938f74"
+SRC_URI[sha256sum] = "63ec86477ad3f0f6292325fd89e1d93aea2e2fd490070863f17d48f7cd387011"
+
+inherit autotools-brokensep
+
+do_configure_prepend () {
+ if [ -f ${S}/aclocal.m4 ] && [ ! -f ${S}/acinclude.m4 ]; then
+ mv ${S}/aclocal.m4 ${S}/acinclude.m4
+ fi
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -d ${D}${mandir}/man1
+
+ oe_runmake 'INSTALLROOT=${D}' install
+}
+
+BBCLASSEXTEND = "native"
+
+DEPENDS = "groff-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.7.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.7.2.bb
deleted file mode 100644
index 4d3b272..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.7.2.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Ninja is a small build system with a focus on speed."
-HOMEPAGE = "http://martine.github.com/ninja/"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a81586a64ad4e476c791cda7e2f2c52e"
-
-DEPENDS = "re2c-native ninja-native"
-
-SRCREV = "717b7b4a31db6027207588c0fb89c3ead384747b"
-
-SRC_URI = "git://github.com/martine/ninja.git;branch=release"
-UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"
-
-S = "${WORKDIR}/git"
-
-do_configure[noexec] = "1"
-
-do_compile_class-native() {
- ./configure.py --bootstrap
-}
-
-do_compile() {
- ./configure.py
- ninja
-}
-
-do_install() {
- install -D -m 0755 ${S}/ninja ${D}${bindir}/ninja
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.8.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.8.2.bb
new file mode 100644
index 0000000..c6fcfef
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.8.2.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Ninja is a small build system with a focus on speed."
+HOMEPAGE = "http://martine.github.com/ninja/"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a81586a64ad4e476c791cda7e2f2c52e"
+
+DEPENDS = "re2c-native ninja-native"
+
+SRCREV = "253e94c1fa511704baeb61cf69995bbf09ba435e"
+
+SRC_URI = "git://github.com/ninja-build/ninja.git;branch=release"
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"
+
+S = "${WORKDIR}/git"
+
+do_configure[noexec] = "1"
+
+do_compile_class-native() {
+ ./configure.py --bootstrap
+}
+
+do_compile() {
+ ./configure.py
+ ninja
+}
+
+do_install() {
+ install -D -m 0755 ${S}/ninja ${D}${bindir}/ninja
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
new file mode 100644
index 0000000..6b7ca7d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
@@ -0,0 +1,51 @@
+From ef5db062b7d25e6070acc6922ea48f50491313b5 Mon Sep 17 00:00:00 2001
+From: Michael Hansen <michael.j.hansen@hp.com>
+Date: Mon, 26 Feb 2018 09:42:56 -0800
+Subject: [PATCH 1/2] Only use --sort=name on versions of tar which support it.
+ This fixes compatibility with bsdtar and old versions of GNU tar (e.g.
+ RHEL6).
+
+Signed-off-by: Michael Hansen <michael.j.hansen@hp.com>
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+Upstream-Status: Backport
+
+---
+ opkg-build | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+Index: opkg-utils-0.3.6/opkg-build
+===================================================================
+--- opkg-utils-0.3.6.orig/opkg-build
++++ opkg-utils-0.3.6/opkg-build
+@@ -232,6 +232,11 @@ if [ $compressor = "gzip" ] ; then
+ compressorargs=$zipargs
+ fi
+
++tsortargs=
++if tar --help 2>&1 | grep -- "--sort=" > /dev/null; then
++ tsortargs="--sort=name"
++fi
++
+ shift $(($OPTIND - 1))
+
+ # continue on to process additional arguments
+@@ -280,8 +285,8 @@ mkdir $tmp_dir
+ build_date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)"
+
+ echo $CONTROL > $tmp_dir/tarX
+-( cd $pkg_dir && tar $ogargs --sort=name --mtime=$build_date -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
+-( cd $pkg_dir/$CONTROL && tar $ogargs --sort=name --mtime=$build_date -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
++( cd $pkg_dir && tar $ogargs $tsortargs --mtime=$build_date -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
++( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime=$build_date -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
+ rm $tmp_dir/tarX
+
+ echo "2.0" > $tmp_dir/debian-binary
+@@ -296,7 +301,7 @@ rm -f $pkg_file
+ if [ "$outer" = "ar" ] ; then
+ ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./control.tar.gz ./data.tar.$cext )
+ else
+- ( cd $tmp_dir && tar -c --sort=name --mtime=$build_date $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
++ ( cd $tmp_dir && tar -c $tsortargs --mtime=$build_date $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
+ fi
+
+ rm $tmp_dir/debian-binary $tmp_dir/data.tar.$cext $tmp_dir/control.tar.gz
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
new file mode 100644
index 0000000..e338914
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
@@ -0,0 +1,44 @@
+From 5727826b51cf99feaff3483a9df8af2043e7efc1 Mon Sep 17 00:00:00 2001
+From: Michael Hansen <michael.j.hansen@hp.com>
+Date: Mon, 26 Feb 2018 10:17:01 -0800
+Subject: [PATCH 2/2] opkg-build: Use local time for build_date, since opkg
+ extracts files assuming local time rather than UTC. Also increase resolution
+ of build date down to the second, rather than clamping to midnight of the
+ current date.
+
+Signed-off-by: Michael Hansen <michael.j.hansen@hp.com>
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+Upstream-Status: Backport
+
+---
+ opkg-build | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+Index: opkg-utils-0.3.6/opkg-build
+===================================================================
+--- opkg-utils-0.3.6.orig/opkg-build
++++ opkg-utils-0.3.6/opkg-build
+@@ -282,11 +282,11 @@ fi
+ tmp_dir=$dest_dir/IPKG_BUILD.$$
+ mkdir $tmp_dir
+
+-build_date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)"
++build_date="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%d %H:%M:%S")"
+
+ echo $CONTROL > $tmp_dir/tarX
+-( cd $pkg_dir && tar $ogargs $tsortargs --mtime=$build_date -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
+-( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime=$build_date -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
++( cd $pkg_dir && tar $ogargs $tsortargs --mtime="$build_date" -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
++( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime="$build_date" -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
+ rm $tmp_dir/tarX
+
+ echo "2.0" > $tmp_dir/debian-binary
+@@ -301,7 +301,7 @@ rm -f $pkg_file
+ if [ "$outer" = "ar" ] ; then
+ ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./control.tar.gz ./data.tar.$cext )
+ else
+- ( cd $tmp_dir && tar -c $tsortargs --mtime=$build_date $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
++ ( cd $tmp_dir && tar -c $tsortargs --mtime="$build_date" $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
+ fi
+
+ rm $tmp_dir/debian-binary $tmp_dir/data.tar.$cext $tmp_dir/control.tar.gz
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch
index 3824eb3..d8931b2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch
@@ -18,26 +18,27 @@
Index: git/opkg-build
+
===================================================================
--- git.orig/opkg-build
+++ git/opkg-build
-@@ -250,8 +250,21 @@ tmp_dir=$dest_dir/IPKG_BUILD.$$
- mkdir $tmp_dir
+@@ -285,8 +285,21 @@ mkdir $tmp_dir
+ build_date="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%d %H:%M:%S")"
echo $CONTROL > $tmp_dir/tarX
--( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -c --$compressor $tarformat -f $tmp_dir/data.tar.$cext . )
--( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . )
+-( cd $pkg_dir && tar $ogargs $tsortargs --mtime="$build_date" -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
+-( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime="$build_date" -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
+
+
+# Ignore error code 1, caused by modifying the number of hard links while creating the tar file
+rc=0
-+( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -cz $tarformat -f $tmp_dir/data.tar.gz . ) || rc=$?
++( cd $pkg_dir && tar $ogargs $tsortargs --mtime="$build_date" -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext ) || rc=$?
+if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then
+ exit $rc
+fi
+
+rc=0
-+( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . ) || rc=$?
++( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime="$build_date" -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz ) || rc=$?
+if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then
+ exit $rc
+fi
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/threaded-xz.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/threaded-xz.patch
new file mode 100644
index 0000000..13a49f9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/threaded-xz.patch
@@ -0,0 +1,18 @@
+Pass --threads=0 to xz so that it will use as many threads as there are cores to compress the packages. This makes qemu's do_package_ipk run in 34s instead of 275s on my machine.
+
+Upstream-Status: Inappropriate (ugly but works, discussing with upstream now)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/opkg-build b/opkg-build
+index 0050c2b..93a7956 100755
+--- a/opkg-build
++++ b/opkg-build
+@@ -230,6 +230,8 @@ if gzip --help 2>&1 | grep -- "-T" > /dev/null; then
+ fi
+ if [ $compressor = "gzip" ] ; then
+ compressorargs=$zipargs
++elif [ $compressor = "xz" ] ; then
++ compressorargs="--threads 0"
+ fi
+
+ tsortargs=
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb
deleted file mode 100644
index 646cc8f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb
+++ /dev/null
@@ -1,62 +0,0 @@
-SUMMARY = "Additional utilities for the opkg package manager"
-SUMMARY_update-alternatives-opkg = "Utility for managing the alternatives system"
-SECTION = "base"
-HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://opkg.py;beginline=2;endline=18;md5=63ce9e6bcc445181cd9e4baf4b4ccc35"
-PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
-
-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 \
-"
-SRC_URI_append_class-native = " file://tar_ignore_error.patch"
-
-SRC_URI[md5sum] = "a19e09c79bf1152aac62e8a120d679ff"
-SRC_URI[sha256sum] = "7f4b08912e26a3f4f6f423f3b4e7157a73b1f3a7483fc59b216d1a80b50b0c38"
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-# For native builds we use the host Python
-PYTHONRDEPS = "python3 python3-shell python3-io python3-math python3-crypt python3-logging python3-fcntl python3-subprocess python3-pickle python3-compression python3-textutils python3-stringold"
-PYTHONRDEPS_class-native = ""
-
-PACKAGECONFIG = "python update-alternatives"
-PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
-PACKAGECONFIG[update-alternatives] = ",,,"
-
-do_install() {
- oe_runmake PREFIX=${prefix} DESTDIR=${D} install
- if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then
- rm -f "${D}${bindir}/update-alternatives"
- fi
-
- if ! ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
- grep -lZ "/usr/bin/env.*python" ${D}${bindir}/* | xargs -0 rm
- fi
-}
-
-do_install_append_class-target() {
- if [ -e "${D}${bindir}/update-alternatives" ]; then
- sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g; s,/usr/lib,${nonarch_libdir},g'
- fi
-}
-
-# These are empty and will pull python3-dev into images where it wouldn't
-# have been otherwise, so don't generate them.
-PACKAGES_remove = "${PN}-dev ${PN}-staticdev"
-
-PACKAGES =+ "update-alternatives-opkg"
-FILES_update-alternatives-opkg = "${bindir}/update-alternatives"
-RPROVIDES_update-alternatives-opkg = "update-alternatives update-alternatives-cworth"
-RREPLACES_update-alternatives-opkg = "update-alternatives-cworth"
-RCONFLICTS_update-alternatives-opkg = "update-alternatives-cworth"
-
-pkg_postrm_update-alternatives-opkg() {
- rm -rf $D${nonarch_libdir}/opkg/alternatives
- rmdir $D${nonarch_libdir}/opkg || true
-}
-
-BBCLASSEXTEND = "native nativesdk"
-
-CLEANBROKEN = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb
new file mode 100644
index 0000000..0487c5f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb
@@ -0,0 +1,67 @@
+SUMMARY = "Additional utilities for the opkg package manager"
+SUMMARY_update-alternatives-opkg = "Utility for managing the alternatives system"
+SECTION = "base"
+HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://opkg.py;beginline=2;endline=18;md5=63ce9e6bcc445181cd9e4baf4b4ccc35"
+PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
+
+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-Only-use-sort-name-on-versions-of-tar-which-support-.patch \
+ file://0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch \
+ file://threaded-xz.patch \
+"
+SRC_URI_append_class-native = " file://tar_ignore_error.patch"
+UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/"
+
+
+SRC_URI[md5sum] = "391c1c80aca26961375dd22e1d2d0cbf"
+SRC_URI[sha256sum] = "26b3f4dd1c1ef65f519d4cddfb35ebea41ae8af989aea2699a39783598c33769"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+# 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 = ""
+
+PACKAGECONFIG = "python update-alternatives"
+PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
+PACKAGECONFIG[update-alternatives] = ",,,"
+
+do_install() {
+ oe_runmake PREFIX=${prefix} DESTDIR=${D} install
+ if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then
+ rm -f "${D}${bindir}/update-alternatives"
+ fi
+
+ if ! ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
+ grep -lZ "/usr/bin/env.*python" ${D}${bindir}/* | xargs -0 rm
+ fi
+}
+
+do_install_append_class-target() {
+ if [ -e "${D}${bindir}/update-alternatives" ]; then
+ sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g; s,/usr/lib,${nonarch_libdir},g'
+ fi
+}
+
+# These are empty and will pull python3-dev into images where it wouldn't
+# have been otherwise, so don't generate them.
+PACKAGES_remove = "${PN}-dev ${PN}-staticdev"
+
+PACKAGES =+ "update-alternatives-opkg"
+FILES_update-alternatives-opkg = "${bindir}/update-alternatives"
+RPROVIDES_update-alternatives-opkg = "update-alternatives update-alternatives-cworth"
+RREPLACES_update-alternatives-opkg = "update-alternatives-cworth"
+RCONFLICTS_update-alternatives-opkg = "update-alternatives-cworth"
+
+pkg_postrm_update-alternatives-opkg() {
+ rm -rf $D${nonarch_libdir}/opkg/alternatives
+ rmdir $D${nonarch_libdir}/opkg || true
+}
+
+BBCLASSEXTEND = "native nativesdk"
+
+CLEANBROKEN = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb
deleted file mode 100644
index 3e511b6..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb
+++ /dev/null
@@ -1,75 +0,0 @@
-SUMMARY = "Open Package Manager"
-SUMMARY_libopkg = "Open Package Manager library"
-SECTION = "base"
-HOMEPAGE = "http://code.google.com/p/opkg/"
-BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://src/opkg.c;beginline=2;endline=21;md5=90435a519c6ea69ef22e4a88bcc52fa0"
-
-DEPENDS = "libarchive"
-
-PE = "1"
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
- file://opkg-configure.service \
- file://opkg.conf \
- file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
-"
-
-SRC_URI[md5sum] = "d202d09ea0932943071b842626cab13c"
-SRC_URI[sha256sum] = "734bc21dea11262113fa86b928d09812618b3966f352350cf916a6ae0d343f32"
-
-inherit autotools pkgconfig systemd
-
-SYSTEMD_SERVICE_${PN} = "opkg-configure.service"
-
-target_localstatedir := "${localstatedir}"
-OPKGLIBDIR = "${target_localstatedir}/lib"
-
-PACKAGECONFIG ??= "libsolv"
-
-PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg"
-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"
-PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
-PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder"
-PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv"
-
-EXTRA_OECONF_class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}"
-
-do_install_append () {
- install -d ${D}${sysconfdir}/opkg
- install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
- echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf
-
- # We need to create the lock directory
- install -d ${D}${OPKGLIBDIR}/opkg
-
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/opkg-configure.service ${D}${systemd_unitdir}/system/
- sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
- -e 's,@SYSCONFDIR@,${sysconfdir},g' \
- -e 's,@BINDIR@,${bindir},g' \
- -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \
- ${D}${systemd_unitdir}/system/opkg-configure.service
- fi
-}
-
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive"
-RDEPENDS_${PN}_class-native = ""
-RDEPENDS_${PN}_class-nativesdk = ""
-RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
-RCONFLICTS_${PN} = "opkg-collateral"
-RPROVIDES_${PN} = "opkg-collateral"
-
-PACKAGES =+ "libopkg"
-
-FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
-FILES_${PN} += "${systemd_unitdir}/system/"
-
-BBCLASSEXTEND = "native nativesdk"
-
-CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.6.bb
new file mode 100644
index 0000000..70f20af
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.6.bb
@@ -0,0 +1,75 @@
+SUMMARY = "Open Package Manager"
+SUMMARY_libopkg = "Open Package Manager library"
+SECTION = "base"
+HOMEPAGE = "http://code.google.com/p/opkg/"
+BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://src/opkg.c;beginline=2;endline=21;md5=90435a519c6ea69ef22e4a88bcc52fa0"
+
+DEPENDS = "libarchive"
+
+PE = "1"
+
+SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
+ file://opkg-configure.service \
+ file://opkg.conf \
+ file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
+"
+
+SRC_URI[md5sum] = "79e04307f6f54db431c251772d7d987c"
+SRC_URI[sha256sum] = "f607f0e61be8cf8a3bbd0d2dccd9ec9e9b6c21dd4307b671c600d6eeaf84d30b"
+
+inherit autotools pkgconfig systemd
+
+SYSTEMD_SERVICE_${PN} = "opkg-configure.service"
+
+target_localstatedir := "${localstatedir}"
+OPKGLIBDIR = "${target_localstatedir}/lib"
+
+PACKAGECONFIG ??= "libsolv"
+
+PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg"
+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"
+PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
+PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder"
+PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv"
+
+EXTRA_OECONF_class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}"
+
+do_install_append () {
+ install -d ${D}${sysconfdir}/opkg
+ install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
+ echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf
+
+ # We need to create the lock directory
+ install -d ${D}${OPKGLIBDIR}/opkg
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/opkg-configure.service ${D}${systemd_unitdir}/system/
+ sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ -e 's,@BINDIR@,${bindir},g' \
+ -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \
+ ${D}${systemd_unitdir}/system/opkg-configure.service
+ fi
+}
+
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive"
+RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-nativesdk = ""
+RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
+RCONFLICTS_${PN} = "opkg-collateral"
+RPROVIDES_${PN} = "opkg-collateral"
+
+PACKAGES =+ "libopkg"
+
+FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
+FILES_${PN} += "${systemd_unitdir}/system/"
+
+BBCLASSEXTEND = "native nativesdk"
+
+CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.27.bb b/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.27.bb
deleted file mode 100644
index 303f991..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.27.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "Optimised Inner Loop Runtime Compiler"
-HOMEPAGE = "http://gstreamer.freedesktop.org/modules/orc.html"
-LICENSE = "BSD-2-Clause & BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e"
-
-SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "5837dc20dacb5b668935bbded10cbb61"
-SRC_URI[sha256sum] = "51e53e58fc8158e5986a1f1a49a6d970c5b16493841cf7b9de2c2bde7ce36b93"
-
-inherit autotools pkgconfig gtk-doc
-
-BBCLASSEXTEND = "native nativesdk"
-
-PACKAGES =+ "orc-examples"
-PACKAGES_DYNAMIC += "^liborc-.*"
-FILES_orc-examples = "${libdir}/orc/*"
-FILES_${PN} = "${bindir}/*"
-
-python populate_packages_prepend () {
- libdir = d.expand('${libdir}')
- do_split_packages(d, libdir, '^lib(.*)\.so\.*', 'lib%s', 'ORC %s library', extra_depends='', allow_links=True)
-}
-
-do_compile_prepend_class-native () {
- sed -i -e 's#/tmp#.#g' ${S}/orc/orccodemem.c
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.28.bb b/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.28.bb
new file mode 100644
index 0000000..415de64
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.28.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Optimised Inner Loop Runtime Compiler"
+HOMEPAGE = "http://gstreamer.freedesktop.org/modules/orc.html"
+LICENSE = "BSD-2-Clause & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e"
+
+SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "6b582ec4b3275c5efd51e3ae6406d445"
+SRC_URI[sha256sum] = "bfcd7c6563b05672386c4eedfc4c0d4a0a12b4b4775b74ec6deb88fc2bcd83ce"
+
+inherit autotools pkgconfig gtk-doc
+
+BBCLASSEXTEND = "native nativesdk"
+
+PACKAGES =+ "orc-examples"
+PACKAGES_DYNAMIC += "^liborc-.*"
+FILES_orc-examples = "${libdir}/orc/*"
+FILES_${PN} = "${bindir}/*"
+
+python populate_packages_prepend () {
+ libdir = d.expand('${libdir}')
+ do_split_packages(d, libdir, '^lib(.*)\.so\.*', 'lib%s', 'ORC %s library', extra_depends='', allow_links=True)
+}
+
+do_compile_prepend_class-native () {
+ sed -i -e 's#/tmp#.#g' ${S}/orc/orccodemem.c
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch
new file mode 100644
index 0000000..b0bd6fa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch
@@ -0,0 +1,35 @@
+From f290f48a621867084884bfff87f8093c15195e6a Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Mon, 12 Feb 2018 16:48:24 +0100
+Subject: [PATCH] Fix segfault with mangled rename patch
+
+http://savannah.gnu.org/bugs/?53132
+* src/pch.c (intuit_diff_type): Ensure that two filenames are specified
+for renames and copies (fix the existing check).
+
+Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=f290f48a621867084884bfff87f8093c15195e6a]
+CVE: CVE-2018-6951
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+---
+ src/pch.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/pch.c b/src/pch.c
+index ff9ed2c..bc6278c 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -974,7 +974,8 @@ intuit_diff_type (bool need_header, mode_t *p_file_type)
+ if ((pch_rename () || pch_copy ())
+ && ! inname
+ && ! ((i == OLD || i == NEW) &&
+- p_name[! reverse] &&
++ p_name[reverse] && p_name[! reverse] &&
++ name_is_valid (p_name[reverse]) &&
+ name_is_valid (p_name[! reverse])))
+ {
+ say ("Cannot %s file without two valid file names\n", pch_rename () ? "rename" : "copy");
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch
new file mode 100644
index 0000000..2a09d0c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch
@@ -0,0 +1,38 @@
+From b5a91a01e5d0897facdd0f49d64b76b0f02b43e1 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Fri, 6 Apr 2018 11:34:51 +0200
+Subject: [PATCH] Allow input files to be missing for ed-style patches
+
+* src/pch.c (do_ed_script): Allow input files to be missing so that new
+files will be created as with non-ed-style patches.
+
+Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=b5a91a01e5d0897facdd0f49d64b76b0f02b43e1]
+CVE: CVE-2018-1000156
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ src/pch.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/pch.c b/src/pch.c
+index bc6278c..0c5cc26 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -2394,9 +2394,11 @@ do_ed_script (char const *inname, char const *outname,
+
+ if (! dry_run && ! skip_rest_of_patch) {
+ int exclusive = *outname_needs_removal ? 0 : O_EXCL;
+- assert (! inerrno);
+- *outname_needs_removal = true;
+- copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
++ if (inerrno != ENOENT)
++ {
++ *outname_needs_removal = true;
++ copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
++ }
+ sprintf (buf, "%s %s%s", editor_program,
+ verbosity == VERBOSE ? "" : "- ",
+ outname);
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch
new file mode 100644
index 0000000..d74c2f1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch
@@ -0,0 +1,215 @@
+From 123eaff0d5d1aebe128295959435b9ca5909c26d Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Fri, 6 Apr 2018 12:14:49 +0200
+Subject: [PATCH] Fix arbitrary command execution in ed-style patches (CVE-2018-1000156)
+
+* src/pch.c (do_ed_script): Write ed script to a temporary file instead
+of piping it to ed: this will cause ed to abort on invalid commands
+instead of rejecting them and carrying on.
+* tests/ed-style: New test case.
+* tests/Makefile.am (TESTS): Add test case.
+
+Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=123eaff0d5d1aebe128295959435b9ca5909c26d]
+CVE: CVE-2018-1000156
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ src/pch.c | 91 ++++++++++++++++++++++++++++++++++++++++---------------
+ tests/Makefile.am | 1 +
+ tests/ed-style | 41 +++++++++++++++++++++++++
+ 3 files changed, 108 insertions(+), 25 deletions(-)
+ create mode 100644 tests/ed-style
+
+diff --git a/src/pch.c b/src/pch.c
+index 0c5cc26..4fd5a05 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -33,6 +33,7 @@
+ # include <io.h>
+ #endif
+ #include <safe.h>
++#include <sys/wait.h>
+
+ #define INITHUNKMAX 125 /* initial dynamic allocation size */
+
+@@ -2389,24 +2390,28 @@ do_ed_script (char const *inname, char const *outname,
+ static char const editor_program[] = EDITOR_PROGRAM;
+
+ file_offset beginning_of_this_line;
+- FILE *pipefp = 0;
+ size_t chars_read;
++ FILE *tmpfp = 0;
++ char const *tmpname;
++ int tmpfd;
++ pid_t pid;
++
++ if (! dry_run && ! skip_rest_of_patch)
++ {
++ /* Write ed script to a temporary file. This causes ed to abort on
++ invalid commands such as when line numbers or ranges exceed the
++ number of available lines. When ed reads from a pipe, it rejects
++ invalid commands and treats the next line as a new command, which
++ can lead to arbitrary command execution. */
++
++ tmpfd = make_tempfile (&tmpname, 'e', NULL, O_RDWR | O_BINARY, 0);
++ if (tmpfd == -1)
++ pfatal ("Can't create temporary file %s", quotearg (tmpname));
++ tmpfp = fdopen (tmpfd, "w+b");
++ if (! tmpfp)
++ pfatal ("Can't open stream for file %s", quotearg (tmpname));
++ }
+
+- if (! dry_run && ! skip_rest_of_patch) {
+- int exclusive = *outname_needs_removal ? 0 : O_EXCL;
+- if (inerrno != ENOENT)
+- {
+- *outname_needs_removal = true;
+- copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
+- }
+- sprintf (buf, "%s %s%s", editor_program,
+- verbosity == VERBOSE ? "" : "- ",
+- outname);
+- fflush (stdout);
+- pipefp = popen(buf, binary_transput ? "wb" : "w");
+- if (!pipefp)
+- pfatal ("Can't open pipe to %s", quotearg (buf));
+- }
+ for (;;) {
+ char ed_command_letter;
+ beginning_of_this_line = file_tell (pfp);
+@@ -2417,14 +2422,14 @@ do_ed_script (char const *inname, char const *outname,
+ }
+ ed_command_letter = get_ed_command_letter (buf);
+ if (ed_command_letter) {
+- if (pipefp)
+- if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
++ if (tmpfp)
++ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp))
+ write_fatal ();
+ if (ed_command_letter != 'd' && ed_command_letter != 's') {
+ p_pass_comments_through = true;
+ while ((chars_read = get_line ()) != 0) {
+- if (pipefp)
+- if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
++ if (tmpfp)
++ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp))
+ write_fatal ();
+ if (chars_read == 2 && strEQ (buf, ".\n"))
+ break;
+@@ -2437,13 +2442,49 @@ do_ed_script (char const *inname, char const *outname,
+ break;
+ }
+ }
+- if (!pipefp)
++ if (!tmpfp)
+ return;
+- if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, pipefp) == 0
+- || fflush (pipefp) != 0)
++ if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, tmpfp) == 0
++ || fflush (tmpfp) != 0)
+ write_fatal ();
+- if (pclose (pipefp) != 0)
+- fatal ("%s FAILED", editor_program);
++
++ if (lseek (tmpfd, 0, SEEK_SET) == -1)
++ pfatal ("Can't rewind to the beginning of file %s", quotearg (tmpname));
++
++ if (! dry_run && ! skip_rest_of_patch) {
++ int exclusive = *outname_needs_removal ? 0 : O_EXCL;
++ *outname_needs_removal = true;
++ if (inerrno != ENOENT)
++ {
++ *outname_needs_removal = true;
++ copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
++ }
++ sprintf (buf, "%s %s%s", editor_program,
++ verbosity == VERBOSE ? "" : "- ",
++ outname);
++ fflush (stdout);
++
++ pid = fork();
++ if (pid == -1)
++ pfatal ("Can't fork");
++ else if (pid == 0)
++ {
++ dup2 (tmpfd, 0);
++ execl ("/bin/sh", "sh", "-c", buf, (char *) 0);
++ _exit (2);
++ }
++ else
++ {
++ int wstatus;
++ if (waitpid (pid, &wstatus, 0) == -1
++ || ! WIFEXITED (wstatus)
++ || WEXITSTATUS (wstatus) != 0)
++ fatal ("%s FAILED", editor_program);
++ }
++ }
++
++ fclose (tmpfp);
++ safe_unlink (tmpname);
+
+ if (ofp)
+ {
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 6b6df63..16f8693 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -32,6 +32,7 @@ TESTS = \
+ crlf-handling \
+ dash-o-append \
+ deep-directories \
++ ed-style \
+ empty-files \
+ false-match \
+ fifo \
+diff --git a/tests/ed-style b/tests/ed-style
+new file mode 100644
+index 0000000..d8c0689
+--- /dev/null
++++ b/tests/ed-style
+@@ -0,0 +1,41 @@
++# Copyright (C) 2018 Free Software Foundation, Inc.
++#
++# Copying and distribution of this file, with or without modification,
++# in any medium, are permitted without royalty provided the copyright
++# notice and this notice are preserved.
++
++. $srcdir/test-lib.sh
++
++require cat
++use_local_patch
++use_tmpdir
++
++# ==============================================================
++
++cat > ed1.diff <<EOF
++0a
++foo
++.
++EOF
++
++check 'patch -e foo -i ed1.diff' <<EOF
++EOF
++
++check 'cat foo' <<EOF
++foo
++EOF
++
++cat > ed2.diff <<EOF
++1337a
++r !echo bar
++,p
++EOF
++
++check 'patch -e foo -i ed2.diff 2> /dev/null || echo "Status: $?"' <<EOF
++?
++Status: 2
++EOF
++
++check 'cat foo' <<EOF
++foo
++EOF
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.5.bb
deleted file mode 100644
index 151f021..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.5.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require patch.inc
-LICENSE = "GPLv3"
-
-SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch"
-
-SRC_URI[md5sum] = "ed4d5674ef4543b4eb463db168886dc7"
-SRC_URI[sha256sum] = "7436f5a19f93c3ca83153ce9c5cbe4847e97c5d956e57a220121e741f6e7968f"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-acpaths = "-I ${S}/m4 "
-
-PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)}"
-PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.6.bb
new file mode 100644
index 0000000..823486d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.6.bb
@@ -0,0 +1,19 @@
+require patch.inc
+LICENSE = "GPLv3"
+
+SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+ file://0002-Fix-segfault-with-mangled-rename-patch.patch \
+ file://0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch \
+ file://0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch \
+"
+
+SRC_URI[md5sum] = "4c68cee989d83c87b00a3860bcd05600"
+SRC_URI[sha256sum] = "8cf86e00ad3aaa6d26aca30640e86b0e3e1f395ed99f189b06d4c9f74bc58a4e"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+acpaths = "-I ${S}/m4 "
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)}"
+PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17024.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17024.bb
deleted file mode 100644
index 6ae0e7e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17024.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Error - Error/exception handling in an OO-ish way"
-DESCRIPTION = "The Error package provides two interfaces. Firstly \
-Error provides a procedural interface to exception handling. \
-Secondly Error is a base class for errors/exceptions that can \
-either be thrown, for subsequent catch, or can simply be recorded."
-
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=8f3499d09ee74a050c0319391ff9d100"
-
-DEPENDS += "perl"
-
-SRC_URI = "http://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/Error-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "7e3676a7fb14f65f568f12d4b40a2a72"
-SRC_URI[sha256sum] = "074db7c783a67b0667eca64a4f6a0c3de94998afc92c01d6453163eb04b9150d"
-
-S = "${WORKDIR}/Error-${PV}"
-
-inherit cpan
-
-do_compile() {
- export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
- cpan_do_compile
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17025.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17025.bb
new file mode 100644
index 0000000..f6dc30d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17025.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Error - Error/exception handling in an OO-ish way"
+DESCRIPTION = "The Error package provides two interfaces. Firstly \
+Error provides a procedural interface to exception handling. \
+Secondly Error is a base class for errors/exceptions that can \
+either be thrown, for subsequent catch, or can simply be recorded."
+
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=8f3499d09ee74a050c0319391ff9d100"
+
+DEPENDS += "perl"
+
+SRC_URI = "http://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/Error-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "1a2ee7f0dc44f9ee76661a16bbbc0c48"
+SRC_URI[sha256sum] = "6c9f474ad3d4fe0cabff6b6be532cb1dd348245986d4a6b600ad921d5cfdefaf"
+
+S = "${WORKDIR}/Error-${PV}"
+
+inherit cpan ptest-perl
+
+do_compile() {
+ export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
+ cpan_do_compile
+}
+
+do_install_prepend() {
+ # test requires "-T" (taint) command line option
+ rm -rf ${B}/t/pod-coverage.t
+}
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002005.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002005.bb
new file mode 100644
index 0000000..e5ab7a3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002005.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Skip tests when modules not available"
+DESCRIPTION = "Skip test scripts if modules are not available. \
+The requested modules will be loaded, and optionally have their versions \
+checked. If the module is missing, the test script will be skipped. Modules \
+that are found but fail to compile will exit with an error rather than skip."
+
+HOMEPAGE = "https://metacpan.org/release/Test-Needs"
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+
+CPAN_NAME = "Test-Needs"
+CPAN_AUTHOR = "HAARG"
+
+LIC_FILES_CHKSUM = "file://README;md5=3f3ccd21a0a48aa313db212cc3b1bc09;beginline=81;endline=82"
+
+DEPENDS += "perl"
+
+SRC_URI = "http://www.cpan.org/authors/id/H/HA/${CPAN_AUTHOR}/${CPAN_NAME}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "356634a56c99282e8059f290f5d534c8"
+SRC_URI[sha256sum] = "5a4f33983586edacdbe00a3b429a9834190140190dab28d0f873c394eb7df399"
+
+S = "${WORKDIR}/${CPAN_NAME}-${PV}"
+
+inherit cpan ptest-perl
+
+RDEPENDS_${PN}-ptest += "perl-module-test-more"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.72.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.72.bb
deleted file mode 100644
index a399c10..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.72.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Perl module to manipulate and access URI strings"
-DESCRIPTION = "This package contains the URI.pm module with friends. \
-The module implements the URI class. URI objects can be used to access \
-and manipulate the various components that make up these strings."
-
-HOMEPAGE = "http://search.cpan.org/dist/URI/"
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=c453e94fae672800f83bc1bd7a38b53f"
-
-DEPENDS += "perl"
-
-SRC_URI = "http://www.cpan.org/authors/id/E/ET/ETHER/URI-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "cd56d81ed429efaa97e7f3ff08851b48"
-SRC_URI[sha256sum] = "35f14431d4b300de4be1163b0b5332de2d7fbda4f05ff1ed198a8e9330d40a32"
-
-S = "${WORKDIR}/URI-${PV}"
-
-EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
-
-inherit cpan
-
-do_compile() {
- export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
- cpan_do_compile
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.73.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.73.bb
new file mode 100644
index 0000000..49238f3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.73.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Perl module to manipulate and access URI strings"
+DESCRIPTION = "This package contains the URI.pm module with friends. \
+The module implements the URI class. URI objects can be used to access \
+and manipulate the various components that make up these strings."
+
+HOMEPAGE = "http://search.cpan.org/dist/URI/"
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c453e94fae672800f83bc1bd7a38b53f"
+
+DEPENDS += "perl"
+
+SRC_URI = "http://www.cpan.org/authors/id/E/ET/ETHER/URI-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "37d44a08e599aa945b32a9434ffe00a5"
+SRC_URI[sha256sum] = "cca7ab4a6f63f3ccaacae0f2e1337e8edf84137e73f18548ec7d659f23efe413"
+
+S = "${WORKDIR}/URI-${PV}"
+
+EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
+
+inherit cpan ptest-perl
+
+do_compile() {
+ export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
+ cpan_do_compile
+}
+
+do_install_prepend() {
+ # these tests require "-T" (taint) command line option
+ rm -rf ${B}/t/cwd.t
+ rm -rf ${B}/t/file.t
+}
+
+RDEPENDS_${PN}-ptest += "libtest-needs-perl"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
index cc3a660..c5e0ae6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
@@ -14,7 +14,7 @@
EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR} CC='${CC}' LD='${CCLD}' FULL_AR='${AR}'"
-inherit cpan
+inherit cpan ptest-perl
# fix up sub MakeMaker project as arguments don't get propagated though
# see https://rt.cpan.org/Public/Bug/Display.html?id=28632
@@ -34,4 +34,13 @@
cpan_do_compile
}
+do_install_ptest() {
+ sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlstats
+ sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlfilter
+ sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlcomments
+ sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/canonical
+ cp -r ${B}/samples ${D}${PTEST_PATH}
+ chown -R root:root ${D}${PTEST_PATH}/samples
+}
+
BBCLASSEXTEND="native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb
index 0478427..0f60998 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb
@@ -19,7 +19,7 @@
EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
-inherit cpan
+inherit cpan ptest-perl
do_compile() {
export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb
index 0cf2eeb..f9d00d2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb
@@ -19,6 +19,6 @@
EXTRA_PERLFLAGS = "-I ${PERLHOSTLIB}"
-inherit cpan
+inherit cpan ptest-perl
BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.24.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.24.1.bb
index 6c56a7d..71f4589 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.24.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.24.1.bb
@@ -1,8 +1,7 @@
require perl.inc
# We need gnugrep (for -I)
-DEPENDS = "virtual/db-native grep-native"
-DEPENDS += "gdbm-native zlib-native"
+DEPENDS = "db-native grep-native gdbm-native zlib-native"
EXTRA_OEMAKE = "-e MAKEFLAGS="
@@ -16,6 +15,7 @@
file://dynaloaderhack.patch \
file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \
file://0001-Configure-Remove-fstack-protector-strong-for-native-.patch \
+ file://perl-5.26.1-guard_old_libcrypt_fix.patch \
"
SRC_URI[md5sum] = "af6a84c7c3e2b8b269c105a5db2f6d53"
@@ -135,3 +135,5 @@
# Fix the path in sstate
SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
+PACKAGES_DYNAMIC_class-native += "^perl-module-.*native$"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc
index 1f549af..6a7a2d7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc
@@ -2,31 +2,43 @@
SRC_URI += "file://run-ptest \
"
-
do_install_ptest () {
mkdir -p ${D}${PTEST_PATH}
sed -e "s:\/usr\/local:${bindir}:g" -i cpan/version/t/*
sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
- tar -c --exclude=\*.o --exclude=libperl.so --exclude=Makefile --exclude=makefile --exclude=hostperl \
+ tar -c --exclude='*.o' --exclude=libperl.so --exclude=Makefile --exclude=makefile --exclude=hostperl \
+ --exclude=cygwin --exclude=os2 --exclude=djgpp --exclude=qnx --exclude=symbian --exclude=haiku \
+ --exclude=vms --exclude=vos --exclude=NetWare --exclude=amigaos4 --exclude=buildcustomize.pl \
+ --exclude='win32/config.*' --exclude=plan9 --exclude=README.plan9 --exclude=perlplan9.pod --exclude=Configure \
+ --exclude=veryclean.sh --exclude=realclean.sh --exclude=getioctlsizes \
+ --exclude=dl_aix.xs --exclude=sdbm.3 --exclude='cflags.SH' --exclude=makefile.old \
--exclude=miniperl --exclude=generate_uudmap --exclude=patches * | ( cd ${D}${PTEST_PATH} && tar -x )
- sed -i -e "s,${D},,g" \
+ ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl
+
+ # Remove build host references from various scattered files...
+ find "${D}${PTEST_PATH}" \
+ \( -name '*.PL' -o -name 'myconfig' -o -name 'cflags' -o -name '*.pl' -o -name '*.sh' -o -name '*.pm' \
+ -o -name 'h2xs' -o -name 'h2ph' \
+ -o -name '*.h' -o -name 'config.sh-*' -o -name 'pod2man' -o -name 'pod2text' \) \
+ -type f -exec sed -i \
+ -e "s,${D},,g" \
-e "s,--sysroot=${STAGING_DIR_HOST},,g" \
-e "s,-isystem${STAGING_INCDIR} ,,g" \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
-e "s,${STAGING_LIBDIR},${libdir},g" \
-e "s,${STAGING_BINDIR},${bindir},g" \
-e "s,${STAGING_INCDIR},${includedir},g" \
- -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
-e "s,${STAGING_BINDIR_NATIVE}/,,g" \
-e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
- ${D}${PTEST_PATH}/lib/Config.pm \
- ${D}${PTEST_PATH}/cpan/podlators/scripts/pod2man \
- ${D}${PTEST_PATH}/cpan/podlators/scripts/pod2text
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ {} +
- ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl
- # Remove plan9 related stuff
- rm -rf ${D}${PTEST_PATH}/plan9 ${D}${PTEST_PATH}/README.plan9 ${D}${PTEST_PATH}/pod/perlplan9.pod
+ # Remove a useless timestamp...
+ sed -i -e '/Autogenerated starting on/d' ${D}${PTEST_PATH}/lib/unicore/mktables.lst
}
python populate_packages_prepend() {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12837.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12837.patch
new file mode 100644
index 0000000..0b59fcd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12837.patch
@@ -0,0 +1,32 @@
+From 73d7247ecab863ef26b5687a37ccc75d6144ad0f Mon Sep 17 00:00:00 2001
+From: Karl Williamson <khw@cpan.org>
+Date: Tue, 17 Oct 2017 13:49:14 +0800
+Subject: [PATCH] fix CVE-2017-12837
+
+Signed-off-by: Karl Williamson <khw@cpan.org>
+Signed-off-by: Steve Hay <steve.m.hay@googlemail.com>
+
+CVE: CVE-2017-12837
+Upstream-Status: Backport
+https://perl5.git.perl.org/perl.git/commitdiff/96c83ed78aeea1a0496dd2b2d935869a822dc8a5
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ regcomp.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/regcomp.c b/regcomp.c
+index 5498d14..31ec383 100644
+--- a/regcomp.c
++++ b/regcomp.c
+@@ -13021,6 +13021,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
+ goto loopdone;
+ }
+ p = RExC_parse;
++ RExC_parse = parse_start;
+ if (ender > 0xff) {
+ REQUIRE_UTF8(flagp);
+ }
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12883.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12883.patch
new file mode 100644
index 0000000..5c1805f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12883.patch
@@ -0,0 +1,44 @@
+From 40b3cdad3649334585cee8f4630ec9a025e62be6 Mon Sep 17 00:00:00 2001
+From: Karl Williamson <khw@cpan.org>
+Date: Fri, 25 Aug 2017 11:33:58 -0600
+Subject: [PATCH] PATCH: [perl #131598]
+
+The cause of this is that the vFAIL macro uses RExC_parse, and that
+variable has just been changed in preparation for code after the vFAIL.
+The solution is to not change RExC_parse until after the vFAIL.
+
+This is a case where the macro hides stuff that can bite you.
+
+(cherry picked from commit 2be4edede4ae226e2eebd4eff28cedd2041f300f)
+
+Upstream-Status: Backport
+CVE: CVE-2017-12833
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ regcomp.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+Index: perl-5.24.1/regcomp.c
+===================================================================
+--- perl-5.24.1.orig/regcomp.c
++++ perl-5.24.1/regcomp.c
+@@ -11918,14 +11918,16 @@ S_grok_bslash_N(pTHX_ RExC_state_t *pREx
+ }
+ sv_catpv(substitute_parse, ")");
+
+- RExC_parse = RExC_start = RExC_adjusted_start = SvPV(substitute_parse,
+- len);
++ len = SvCUR(substitute_parse);
+
+ /* Don't allow empty number */
+ if (len < (STRLEN) 8) {
+ RExC_parse = endbrace;
+ vFAIL("Invalid hexadecimal number in \\N{U+...}");
+ }
++
++ RExC_parse = RExC_start = RExC_adjusted_start
++ = SvPV_nolen(substitute_parse);
+ RExC_end = RExC_parse + len;
+
+ /* The values are Unicode, and therefore not subject to recoding, but
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/Makefile.SH.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/Makefile.SH.patch
index fd8237f..c1db335 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/Makefile.SH.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/Makefile.SH.patch
@@ -12,10 +12,10 @@
Makefile.SH | 147 ++++++++++++++++++++++++++++--------------------------------
1 file changed, 68 insertions(+), 79 deletions(-)
-diff --git a/Makefile.SH b/Makefile.SH
-index 916b332..b143d46 100755
---- a/Makefile.SH
-+++ b/Makefile.SH
+Index: perl-5.24.1/Makefile.SH
+===================================================================
+--- perl-5.24.1.orig/Makefile.SH
++++ perl-5.24.1/Makefile.SH
@@ -48,10 +48,10 @@ case "$useshrplib" in
true)
# Prefix all runs of 'miniperl' and 'perl' with
@@ -74,6 +74,10 @@
-all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make $(MANIFEST_SRT)
- @echo " ";
- @echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
+-
+-$(MANIFEST_SRT): MANIFEST $(PERL_EXE)
+- @$(RUN_PERL) Porting/manisort -q || (echo "WARNING: re-sorting MANIFEST"; \
+- $(RUN_PERL) Porting/manisort -q -o MANIFEST; sh -c true)
+#all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make $(MANIFEST_SRT)
+# @echo " ";
+# @echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
@@ -83,10 +87,7 @@
+more: $(generated_pods) $(private) $(public)
+
+more2: $(dynamic_ext)
-
--$(MANIFEST_SRT): MANIFEST $(PERL_EXE)
-- @$(RUN_PERL) Porting/manisort -q || (echo "WARNING: re-sorting MANIFEST"; \
-- $(RUN_PERL) Porting/manisort -q -o MANIFEST; sh -c true)
++
+more3: $(nonxs_ext)
+
+more4: extras.make $(MANIFEST_SRT)
@@ -151,7 +152,7 @@
./$(MINIPERLEXP) makedef.pl PLATFORM=os2 -DPERL_DLL=$(PERL_DLL) CC_FLAGS="$(OPTIMIZE)" > perl5.def
!NO!SUBS!
-@@ -878,7 +878,7 @@ $(LIBPERL): $& $(perllib_objs) $(DYNALOADER) $(LIBPERLEXPORT)
+@@ -878,7 +878,7 @@ $(LIBPERL): $& $(perllib_objs) $(DYNALOA
true)
$spitshell >>$Makefile <<'!NO!SUBS!'
rm -f $@
@@ -160,7 +161,7 @@
!NO!SUBS!
case "$osname" in
aix)
-@@ -936,15 +936,19 @@ lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
+@@ -936,15 +936,19 @@ lib/buildcustomize.pl: $& $(miniperl_obj
$spitshell >>$Makefile <<'!NO!SUBS!'
lib/buildcustomize.pl: $& $(miniperl_objs)
$(CC) -o $(MINIPERL_EXE) $(CLDFLAGS) $(miniperl_objs) $(libs)
@@ -183,7 +184,7 @@
$(MINIPERL) -f write_buildcustomize.pl
!NO!SUBS!
;;
-@@ -966,7 +970,9 @@ lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
+@@ -966,7 +970,9 @@ lib/buildcustomize.pl: $& $(miniperl_obj
-@rm -f miniperl.xok
$(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
@@ -194,7 +195,7 @@
$(MINIPERL) -f write_buildcustomize.pl
!NO!SUBS!
;;
-@@ -977,7 +983,9 @@ lib/buildcustomize.pl: \$& \$(miniperl_objs) write_buildcustomize.pl
+@@ -977,7 +983,9 @@ lib/buildcustomize.pl: \$& \$(miniperl_o
-@rm -f miniperl.xok
-@rm \$(MINIPERL_EXE)
\$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE)
@@ -205,7 +206,7 @@
\$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname"
!GROK!THIS!
else
-@@ -986,7 +994,9 @@ lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
+@@ -986,7 +994,9 @@ lib/buildcustomize.pl: $& $(miniperl_obj
-@rm -f miniperl.xok
$(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
@@ -225,7 +226,7 @@
-@for f in Makefile.PL PPPort_pm.PL PPPort_xs.PL ppport_h.PL; do \
(cd ext/Devel-PPPort && `pwd`/run.sh ../../$(MINIPERL_EXE) -I../../lib \$\$f); \
done
-@@ -1046,7 +1056,7 @@ makeppport: \$(MINIPERL_EXE) \$(CONFIGPM)
+@@ -1046,7 +1056,7 @@ makeppport: \$(MINIPERL_EXE) \$(CONFIGPM
*)
$spitshell >>$Makefile <<'!NO!SUBS!'
.PHONY: makeppport
@@ -254,7 +255,7 @@
$(MINIPERL) lib/unicore/mktables -C lib/unicore -P pod -maketest -makelist -p
# Commented out so always runs, mktables looks at far more files than we
# can in this makefile to decide if needs to run or not
-@@ -1074,12 +1084,12 @@ uni.data: $(MINIPERL_EXE) $(CONFIGPM) lib/unicore/mktables $(nonxs_ext)
+@@ -1074,12 +1084,12 @@ uni.data: $(MINIPERL_EXE) $(CONFIGPM) li
# $(PERL_EXE) and ext because pod_lib.pl needs Digest::MD5
# But also this ensures that all extensions are built before we try to scan
# them, which picks up Devel::PPPort's documentation.
@@ -270,9 +271,9 @@
$(MINIPERL) autodoc.pl
pod/perlmodlib.pod: $(MINIPERL_EXE) pod/perlmodlib.PL MANIFEST
-@@ -1089,7 +1099,7 @@ pod/perl5240delta.pod: pod/perldelta.pod
- $(RMS) pod/perl5240delta.pod
- $(LNS) perldelta.pod pod/perl5240delta.pod
+@@ -1089,7 +1099,7 @@ pod/perl5241delta.pod: pod/perldelta.pod
+ $(RMS) pod/perl5241delta.pod
+ $(LNS) perldelta.pod pod/perl5241delta.pod
-extra.pods: $(MINIPERL_EXE)
+extra.pods:
@@ -345,7 +346,7 @@
$(MINIPERL) make_ext.pl $@ $(MAKE_EXT_ARGS) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS)
n_dummy $(nonxs_ext): $(MINIPERL_EXE) lib/buildcustomize.pl preplibrary FORCE
-@@ -1479,14 +1468,14 @@ test_prep_pre: preplibrary utilities $(nonxs_ext)
+@@ -1479,14 +1468,14 @@ test_prep_pre: preplibrary utilities $(n
case "$targethost" in
'') $spitshell >>$Makefile <<'!NO!SUBS!'
@@ -362,7 +363,7 @@
\$(dynamic_ext) \$(TEST_PERL_DLL) runtests \
\$(generated_pods)
$to libperl.*
-@@ -1539,7 +1528,7 @@ test_prep test-prep: test_prep_pre \$(MINIPERL_EXE) \$(unidatafiles) \$(PERL_EXE
+@@ -1539,7 +1528,7 @@ test_prep test-prep: test_prep_pre \$(MI
esac
$spitshell >>$Makefile <<'!NO!SUBS!'
@@ -380,6 +381,3 @@
- cd t && $(RUN_PERL) TEST $(MINITEST_TESTS) <$(devtty)
minitest-notty minitest_notty: $(MINIPERL_EXE) minitest_prep
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/config.sh b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/config.sh
index 4657673..ac0484c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/config.sh
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/config.sh
@@ -361,7 +361,7 @@
d_ldexpl='define'
d_lgamma='define'
d_lgamma_r='define'
-d_libm_lib_version='define'
+d_libm_lib_version='undef'
d_libname_unique='undef'
d_link='define'
d_llrint='define'
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/cross-generate_uudmap.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/cross-generate_uudmap.patch
index a00ad61..33e2222 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/cross-generate_uudmap.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/cross-generate_uudmap.patch
@@ -1,15 +1,15 @@
Upstream-Status:Inappropriate [embedded specific]
-Index: perl-5.14.2/Makefile.SH
+Index: perl-5.24.1/Makefile.SH
===================================================================
---- perl-5.14.2.orig/Makefile.SH
-+++ perl-5.14.2/Makefile.SH
-@@ -622,7 +622,7 @@ bitcount.h: generate_uudmap$(HOST_EXE_EX
- $(RUN) ./generate_uudmap$(HOST_EXE_EXT) uudmap.h bitcount.h
+--- perl-5.24.1.orig/Makefile.SH
++++ perl-5.24.1/Makefile.SH
+@@ -710,7 +710,7 @@ bitcount.h: generate_uudmap\$(HOST_EXE_E
+ $spitshell >>$Makefile <<'!NO!SUBS!'
generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT)
- $(CC) -o generate_uudmap$(EXE_EXT) $(LDFLAGS) generate_uudmap$(OBJ_EXT) $(libs)
+ $(BUILD_CC) -o generate_uudmap$(EXE_EXT) generate_uudmap.c
- miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.h
- $(CCCMD) $(PLDLFLAGS) $*.c
+ !NO!SUBS!
+ ;;
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch
index 7650128..49efcbe 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch
@@ -10,15 +10,15 @@
It is a fix to MakeMaker within perl, so all such perl recipes will get
fixed with this perl fix.
-Index: perl-5.14.2/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
+Index: perl-5.24.1/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
===================================================================
---- perl-5.14.2.orig/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
-+++ perl-5.14.2/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
-@@ -55,6 +55,7 @@ sub _unix_os2_ext {
- my($found) = 0;
+--- perl-5.24.1.orig/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
++++ perl-5.24.1/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
+@@ -57,6 +57,7 @@ sub _unix_os2_ext {
+ my ( $found ) = 0;
# Debian-specific: don't use LD_RUN_PATH for standard dirs
+ push(@libpath, "SYSROOTLIB");
$ld_run_path_seen{$_}++ for @libpath;
- foreach my $thislib (split ' ', $potential_libs) {
+ foreach my $thislib ( split ' ', $potential_libs ) {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/installperl.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/installperl.patch
index 4560123..7fd1f50 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/installperl.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/installperl.patch
@@ -1,12 +1,12 @@
Upstream-Status:Inappropriate [embedded specific]
-Index: perl-5.12.3/installperl
+Index: perl-5.24.1/installperl
===================================================================
---- perl-5.12.3.orig/installperl
-+++ perl-5.12.3/installperl
-@@ -3,8 +3,8 @@
+--- perl-5.24.1.orig/installperl
++++ perl-5.24.1/installperl
+@@ -2,8 +2,8 @@
+
BEGIN {
- require 5.004;
chdir '..' if !-d 'lib' and -d '../lib';
- @INC = 'lib';
- $ENV{PERL5LIB} = 'lib';
@@ -14,4 +14,4 @@
+# $ENV{PERL5LIB} = 'lib';
# This needs to be at BEGIN time, before any use of Config
- require './install_lib.pl';
+ # install_lib itself loads and imports Config into main::
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch
index de6f652..b2c5979 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch
@@ -10,10 +10,10 @@
make_ext.pl | 4 ++++
1 file changed, 4 insertions(+)
-diff --git a/make_ext.pl b/make_ext.pl
-index b433762..9fc1a36 100644
---- a/make_ext.pl
-+++ b/make_ext.pl
+Index: perl-5.24.1/make_ext.pl
+===================================================================
+--- perl-5.24.1.orig/make_ext.pl
++++ perl-5.24.1/make_ext.pl
@@ -335,6 +335,10 @@ sub build_extension {
print "Deleting non-Cross makefile\n";
close $mfh or die "close $makefile: $!";
@@ -24,7 +24,4 @@
+ }
}
}
- }
---
-1.8.1.2
-
+ } else {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-5.26.1-guard_old_libcrypt_fix.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-5.26.1-guard_old_libcrypt_fix.patch
new file mode 100644
index 0000000..ff3d6dc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-5.26.1-guard_old_libcrypt_fix.patch
@@ -0,0 +1,28 @@
+commit 13e70b397dcb0d1bf4a869b670f041c1d7b730d0
+Author: Bjรถrn Esser <besser82@fedoraproject.org>
+Date: Sat Jan 20 20:22:53 2018 +0100
+
+ pp: Guard fix for really old bug in glibc libcrypt
+
+Upstream-Status: Pending
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+diff --git a/pp.c b/pp.c
+index d50ad7ddbf..6510c7b15c 100644
+--- a/pp.c
++++ b/pp.c
+@@ -3650,8 +3650,12 @@ PP(pp_crypt)
+ #if defined(__GLIBC__) || defined(__EMX__)
+ if (PL_reentrant_buffer->_crypt_struct_buffer) {
+ PL_reentrant_buffer->_crypt_struct_buffer->initialized = 0;
+- /* work around glibc-2.2.5 bug */
++#if (defined(__GLIBC__) && __GLIBC__ == 2) && \
++ (defined(__GLIBC_MINOR__) && __GLIBC_MINOR__ >= 2 && __GLIBC_MINOR__ < 4)
++ /* work around glibc-2.2.5 bug, has been fixed at some
++ * time in glibc-2.3.X */
+ PL_reentrant_buffer->_crypt_struct_buffer->current_saltbits = 0;
++#endif
+ }
+ #endif
+ }
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-archlib-exp.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-archlib-exp.patch
index d912d00..37bf523 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-archlib-exp.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-archlib-exp.patch
@@ -25,16 +25,16 @@
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
-Index: perl-5.14.2/config_h.SH
+Index: perl-5.24.1/config_h.SH
===================================================================
---- perl-5.14.2.orig/config_h.SH
-+++ perl-5.14.2/config_h.SH
-@@ -996,7 +996,7 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#und
+--- perl-5.24.1.orig/config_h.SH
++++ perl-5.24.1/config_h.SH
+@@ -1434,7 +1434,7 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#und
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
#$d_archlib ARCHLIB "$archlib" /**/
-#$d_archlib ARCHLIB_EXP "$archlibexp" /**/
+#$d_archlib ARCHLIB_EXP "$archlib_exp" /**/
- /* ARCHNAME:
- * This symbol holds a string representing the architecture name.
+ /* BIN:
+ * This symbol holds the path of the bin directory where the package will
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-dynloader.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-dynloader.patch
index 035beba..2572067 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-dynloader.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-dynloader.patch
@@ -7,13 +7,13 @@
Update by Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/21
-Index: perl-5.14.2/dist/XSLoader/XSLoader_pm.PL
+Index: perl-5.24.1/dist/XSLoader/XSLoader_pm.PL
===================================================================
---- perl-5.14.2.orig/dist/XSLoader/XSLoader_pm.PL
-+++ perl-5.14.2/dist/XSLoader/XSLoader_pm.PL
-@@ -28,6 +28,20 @@ sub load {
-
- my ($module, $modlibname) = caller();
+--- perl-5.24.1.orig/dist/XSLoader/XSLoader_pm.PL
++++ perl-5.24.1/dist/XSLoader/XSLoader_pm.PL
+@@ -52,6 +52,20 @@ sub load {
+ my ($caller, $modlibname) = caller();
+ my $module = $caller;
+ # OE: Allow env to form dynamic loader to look in a different place
+ # This is so it finds the host .so files, not the targets
@@ -30,5 +30,5 @@
+ }
+
if (@_) {
- $module = $_[0];
+ $module = $_[0];
} else {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-enable-gdbm.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-enable-gdbm.patch
deleted file mode 100644
index aa83fca..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-enable-gdbm.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream-Status:Inappropriate [embedded specific]
-
-Index: perl-5.8.8/config_h.SH
-===================================================================
---- perl-5.8.8.orig/config_h.SH 2005-11-01 02:13:05.000000000 +0800
-+++ perl-5.8.8/config_h.SH 2010-11-01 17:06:07.215219738 +0800
-@@ -709,6 +709,12 @@
- */
- #$i_float I_FLOAT /**/
-
-+/* I_GDBM:
-+ * This symbol, if defined, indicates that <gdbm.h> exists and should
-+ * be included.
-+ */
-+#$i_gdbm I_GDBM /**/
-+
- /* I_LIMITS:
- * This symbol, if defined, indicates to the C program that it should
- * include <limits.h> to get definition of symbols like WORD_BIT or
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-test-customized.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-test-customized.patch
index 90e4dcd..1d9a56d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-test-customized.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-test-customized.patch
@@ -32,7 +32,7 @@
ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm 0e1e4c25eddb999fec6c4dc66593f76db34cfd16
-ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm bfd2aa00ca4ed251f342e1d1ad704abbaf5a615e
-ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm 5529ae3064365eafd99536621305d52f4ab31b45
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm d593d8fdc5c0ebcb6d3701c70fc6640c50d93455
++ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm f1ca5ec247eb69ba13a269f34dc205da37b61244
+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm bf9174c70a0e50ff2fee4552c7df89b37d292da1
ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm bc88b275af73b8faac6abd59a9aad3f625925810
ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod 062e5d14a803fbbec8d61803086a3d7997e8a473
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.24.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.24.1.bb
index b55d222..91f310d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.24.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.24.1.bb
@@ -1,8 +1,7 @@
require perl.inc
# We need gnugrep (for -I)
-DEPENDS = "virtual/db grep-native"
-DEPENDS += "gdbm zlib"
+DEPENDS = "db grep-native gdbm zlib virtual/crypt"
# Pick up patches from debian
# http://ftp.de.debian.org/debian/pool/main/p/perl/perl_5.22.0-1.debian.tar.xz
@@ -46,7 +45,6 @@
file://letgcc-find-errno.patch \
file://generate-sh.patch \
file://native-perlinc.patch \
- file://perl-enable-gdbm.patch \
file://cross-generate_uudmap.patch \
file://fix_bad_rpath.patch \
file://dynaloaderhack.patch \
@@ -65,6 +63,9 @@
file://perl-errno-generation-gcc5.patch \
file://perl-fix-conflict-between-skip_all-and-END.patch \
file://perl-test-customized.patch \
+ file://perl-5.26.1-guard_old_libcrypt_fix.patch \
+ file://CVE-2017-12883.patch \
+ file://CVE-2017-12837.patch \
"
# Fix test case issues
@@ -189,6 +190,19 @@
oe_runmake perl LD="${CCLD}"
}
+do_compile_append_class-target() {
+ # Remove build host references from numerous comments...
+ find "${S}/cpan/Encode" -type f \
+ \( -name '*.exh' -o -name '*.c' -o -name '*.h' \)\
+ -exec sed -i -e 's:${RECIPE_SYSROOT_NATIVE}::g' {} +
+ sed -i -e 's:${RECIPE_SYSROOT}::g' ${S}/perl.h ${S}/pp.h
+ sed -i -e 's:${RECIPE_SYSROOT_NATIVE}/usr/bin/perl-native/perl${PV}.real:/usr/bin/perl${PV}:g' \
+ ${S}/cpan/Compress-Raw-Bzip2/constants.h \
+ ${S}/cpan/Compress-Raw-Zlib/constants.h \
+ ${S}/cpan/IPC-SysV/const-c.inc \
+ ${S}/dist/Time-HiRes/const-c.inc
+}
+
do_install() {
#export hostperl="${STAGING_BINDIR_NATIVE}/perl-native/perl${PV}"
oe_runmake install DESTDIR=${D}
@@ -232,6 +246,7 @@
-e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
-e "s,${STAGING_BINDIR_NATIVE}/,,g" \
-e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
+ -e 's:${RECIPE_SYSROOT}::g' \
${PKGD}${bindir}/h2xs \
${PKGD}${bindir}/h2ph \
${PKGD}${bindir}/pod2man \
@@ -267,6 +282,7 @@
FILES_${PN}-lib = "${libdir}/libperl.so* \
${libdir}/perl5 \
${libdir}/perl/config.sh \
+ ${libdir}/perl/${PV}/Config_git.pl \
${libdir}/perl/${PV}/Config_heavy.pl \
${libdir}/perl/${PV}/Config_heavy-target.pl"
FILES_${PN}-pod = "${libdir}/perl/${PV}/pod \
@@ -324,7 +340,7 @@
d.setVar(d.expand("RRECOMMENDS_${PN}-modules"), ' '.join(packages))
}
-PACKAGES_DYNAMIC += "^perl-module-.*"
+PACKAGES_DYNAMIC += "^perl-module-.*(?<!\-native)$"
PACKAGES_DYNAMIC_class-nativesdk += "^nativesdk-perl-module-.*"
RPROVIDES_perl-lib = "perl-lib"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch
deleted file mode 100644
index 3805ad3..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch
+++ /dev/null
@@ -1,224 +0,0 @@
-From 4d7b4d7c8e9966c593f472355607204c6c80fecb Mon Sep 17 00:00:00 2001
-From: Dan Kegel <dank@kegel.com>
-Date: Sun, 4 Jun 2017 19:19:55 -0700
-Subject: [PATCH] Minimal tweaks to compile with Visual C 2015
-
-Upstream-Status: Backport
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- getopt_long.c | 2 ++
- libpkgconf/bsdstubs.c | 1 +
- libpkgconf/libpkgconf.h | 2 +-
- libpkgconf/path.c | 10 +++++-----
- libpkgconf/pkg.c | 28 +++++++++++++++++++---------
- libpkgconf/stdinc.h | 9 +++++++--
- 6 files changed, 35 insertions(+), 17 deletions(-)
-
-diff --git a/getopt_long.c b/getopt_long.c
-index afeb68d..5ce9bfd 100644
---- a/getopt_long.c
-+++ b/getopt_long.c
-@@ -62,7 +62,9 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#ifndef _WIN32
- #include <unistd.h>
-+#endif
-
- #define PKGCONF_HACK_LOGICAL_OR_ALL_VALUES
-
-diff --git a/libpkgconf/bsdstubs.c b/libpkgconf/bsdstubs.c
-index 8f70ff3..2c000ac 100644
---- a/libpkgconf/bsdstubs.c
-+++ b/libpkgconf/bsdstubs.c
-@@ -17,6 +17,7 @@
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-+#include <stdlib.h>
- #include <sys/types.h>
- #include <string.h>
-
-diff --git a/libpkgconf/libpkgconf.h b/libpkgconf/libpkgconf.h
-index 404bf0c..551d85d 100644
---- a/libpkgconf/libpkgconf.h
-+++ b/libpkgconf/libpkgconf.h
-@@ -310,7 +310,7 @@ void pkgconf_audit_log_dependency(pkgconf_client_t *client, const pkgconf_pkg_t
- /* path.c */
- void pkgconf_path_add(const char *text, pkgconf_list_t *dirlist, bool filter);
- size_t pkgconf_path_split(const char *text, pkgconf_list_t *dirlist, bool filter);
--size_t pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist, bool filter);
-+size_t pkgconf_path_build_from_environ(const char *envvarname, const char *fallback, pkgconf_list_t *dirlist, bool filter);
- bool pkgconf_path_match_list(const char *path, const pkgconf_list_t *dirlist);
- void pkgconf_path_free(pkgconf_list_t *dirlist);
- bool pkgconf_path_relocate(char *buf, size_t buflen);
-diff --git a/libpkgconf/path.c b/libpkgconf/path.c
-index dddb3bf..59e003e 100644
---- a/libpkgconf/path.c
-+++ b/libpkgconf/path.c
-@@ -20,7 +20,7 @@
- # include <sys/cygwin.h>
- #endif
-
--#ifdef HAVE_SYS_STAT_H
-+#if defined(HAVE_SYS_STAT_H) && ! defined(_WIN32)
- # include <sys/stat.h>
- # define PKGCONF_CACHE_INODES
- #endif
-@@ -156,12 +156,12 @@ pkgconf_path_split(const char *text, pkgconf_list_t *dirlist, bool filter)
- /*
- * !doc
- *
-- * .. c:function:: size_t pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist)
-+ * .. c:function:: size_t pkgconf_path_build_from_environ(const char *envvarname, const char *fallback, pkgconf_list_t *dirlist)
- *
- * Adds the paths specified in an environment variable to a path list. If the environment variable is not set,
- * an optional default set of paths is added.
- *
-- * :param char* environ: The environment variable to look up.
-+ * :param char* envvarname: The environment variable to look up.
- * :param char* fallback: The fallback paths to use if the environment variable is not set.
- * :param pkgconf_list_t* dirlist: The path list to add the path nodes to.
- * :param bool filter: Whether to perform duplicate filtering.
-@@ -169,11 +169,11 @@ pkgconf_path_split(const char *text, pkgconf_list_t *dirlist, bool filter)
- * :rtype: size_t
- */
- size_t
--pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist, bool filter)
-+pkgconf_path_build_from_environ(const char *envvarname, const char *fallback, pkgconf_list_t *dirlist, bool filter)
- {
- const char *data;
-
-- data = getenv(environ);
-+ data = getenv(envvarname);
- if (data != NULL)
- return pkgconf_path_split(data, dirlist, filter);
-
-diff --git a/libpkgconf/pkg.c b/libpkgconf/pkg.c
-index 7aebd61..5dacae3 100644
---- a/libpkgconf/pkg.c
-+++ b/libpkgconf/pkg.c
-@@ -30,6 +30,8 @@
- # define PKG_CONFIG_REG_KEY "Software\\pkgconfig\\PKG_CONFIG_PATH"
- # undef PKG_DEFAULT_PATH
- # define PKG_DEFAULT_PATH "../lib/pkgconfig;../share/pkgconfig"
-+#define strncasecmp _strnicmp
-+#define strcasecmp _stricmp
- #endif
-
- #define PKG_CONFIG_EXT ".pc"
-@@ -134,21 +136,21 @@ static int pkgconf_pkg_parser_keyword_pair_cmp(const void *key, const void *ptr)
- static void
- pkgconf_pkg_parser_tuple_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const ptrdiff_t offset, char *value)
- {
-- char **dest = ((void *) pkg + offset);
-+ char **dest = (char **)((char *) pkg + offset);
- *dest = pkgconf_tuple_parse(client, &pkg->vars, value);
- }
-
- static void
- pkgconf_pkg_parser_fragment_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const ptrdiff_t offset, char *value)
- {
-- pkgconf_list_t *dest = ((void *) pkg + offset);
-+ pkgconf_list_t *dest = (pkgconf_list_t *)((char *) pkg + offset);
- pkgconf_fragment_parse(client, dest, &pkg->vars, value);
- }
-
- static void
- pkgconf_pkg_parser_dependency_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const ptrdiff_t offset, char *value)
- {
-- pkgconf_list_t *dest = ((void *) pkg + offset);
-+ pkgconf_list_t *dest = (pkgconf_list_t *)((char *) pkg + offset);
- pkgconf_dependency_parse(client, pkg, dest, value);
- }
-
-@@ -238,7 +240,7 @@ pkgconf_pkg_validate(const pkgconf_client_t *client, const pkgconf_pkg_t *pkg)
-
- for (i = 0; i < PKGCONF_ARRAY_SIZE(pkgconf_pkg_validations); i++)
- {
-- char **p = ((void *) pkg + pkgconf_pkg_validations[i].offset);
-+ char **p = (char **)((char *) pkg + pkgconf_pkg_validations[i].offset);
-
- if (*p != NULL)
- continue;
-@@ -587,7 +589,7 @@ pkgconf_scan_all(pkgconf_client_t *client, void *data, pkgconf_pkg_iteration_fun
-
- #ifdef _WIN32
- static pkgconf_pkg_t *
--pkgconf_pkg_find_in_registry_key(const pkgconf_client_t *client, HKEY hkey, const char *name)
-+pkgconf_pkg_find_in_registry_key(pkgconf_client_t *client, HKEY hkey, const char *name)
- {
- pkgconf_pkg_t *pkg = NULL;
-
-@@ -1048,8 +1050,12 @@ typedef struct {
-
- static const pkgconf_pkg_provides_vermatch_rule_t pkgconf_pkg_provides_vermatch_rules[] = {
- [PKGCONF_CMP_ANY] = {
-- .rulecmp = {},
-- .depcmp = {},
-+ .rulecmp = {
-+ [PKGCONF_CMP_ANY] = pkgconf_pkg_comparator_none,
-+ },
-+ .depcmp = {
-+ [PKGCONF_CMP_ANY] = pkgconf_pkg_comparator_none,
-+ },
- },
- [PKGCONF_CMP_LESS_THAN] = {
- .rulecmp = {
-@@ -1121,7 +1127,9 @@ static const pkgconf_pkg_provides_vermatch_rule_t pkgconf_pkg_provides_vermatch_
- [PKGCONF_CMP_EQUAL] = pkgconf_pkg_comparator_eq,
- [PKGCONF_CMP_NOT_EQUAL] = pkgconf_pkg_comparator_ne
- },
-- .depcmp = {},
-+ .depcmp = {
-+ [PKGCONF_CMP_ANY] = pkgconf_pkg_comparator_none,
-+ },
- },
- [PKGCONF_CMP_NOT_EQUAL] = {
- .rulecmp = {
-@@ -1133,7 +1141,9 @@ static const pkgconf_pkg_provides_vermatch_rule_t pkgconf_pkg_provides_vermatch_
- [PKGCONF_CMP_EQUAL] = pkgconf_pkg_comparator_ne,
- [PKGCONF_CMP_NOT_EQUAL] = pkgconf_pkg_comparator_eq
- },
-- .depcmp = {},
-+ .depcmp = {
-+ [PKGCONF_CMP_ANY] = pkgconf_pkg_comparator_none,
-+ },
- },
- };
-
-diff --git a/libpkgconf/stdinc.h b/libpkgconf/stdinc.h
-index 58cc6c7..ac7e53c 100644
---- a/libpkgconf/stdinc.h
-+++ b/libpkgconf/stdinc.h
-@@ -24,9 +24,7 @@
- #include <stdbool.h>
- #include <stdarg.h>
- #include <string.h>
--#include <dirent.h>
- #include <sys/types.h>
--#include <unistd.h>
- #include <stdint.h>
-
- #ifdef _WIN32
-@@ -34,8 +32,15 @@
- # include <windows.h>
- # include <malloc.h>
- # define PATH_DEV_NULL "nul"
-+# ifndef ssize_t
-+# include <BaseTsd.h>
-+# define ssize_t SSIZE_T
-+# endif
-+# include "win-dirent.h"
- #else
- # define PATH_DEV_NULL "/dev/null"
-+# include <dirent.h>
-+# include <unistd.h>
- #endif
-
- #endif
---
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch
deleted file mode 100644
index 49ebe31..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From ea28c5b34457cf7676181b284e22ea5f79a30d85 Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Thu, 13 Jul 2017 14:47:31 +0300
-Subject: [PATCH] stdinc.h: fix build with mingw
-
-Fixes this build error with mingw:
-...
-| compilation terminated.
-| In file included from ../pkgconf-1.3.7/libpkgconf/libpkgconf.h:19:0,
-| from ../pkgconf-1.3.7/libpkgconf/audit.c:16:
-| ../pkgconf-1.3.7/libpkgconf/stdinc.h:36:12: fatal error: BaseTsd.h: No
-such file or directory
-| # include <BaseTsd.h>
-
-Upstream-Status: Submitted
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- libpkgconf/stdinc.h | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/libpkgconf/stdinc.h b/libpkgconf/stdinc.h
-index ac7e53c..d8efcf5 100644
---- a/libpkgconf/stdinc.h
-+++ b/libpkgconf/stdinc.h
-@@ -33,10 +33,18 @@
- # include <malloc.h>
- # define PATH_DEV_NULL "nul"
- # ifndef ssize_t
-+# ifndef __MINGW32__
- # include <BaseTsd.h>
-+# else
-+# include <basetsd.h>
-+# endif
- # define ssize_t SSIZE_T
- # endif
--# include "win-dirent.h"
-+# ifndef __MINGW32__
-+# include "win-dirent.h"
-+# else
-+# include <dirent.h>
-+# endif
- #else
- # define PATH_DEV_NULL "/dev/null"
- # include <dirent.h>
---
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb
deleted file mode 100644
index 5da0dd1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb
+++ /dev/null
@@ -1,73 +0,0 @@
-SUMMARY = "pkgconf provides compiler and linker configuration for development frameworks."
-DESCRIPTION = "pkgconf is a program which helps to configure compiler and linker \
-flags for development frameworks. It is similar to pkg-config from \
-freedesktop.org, providing additional functionality while also maintaining \
-compatibility."
-HOMEPAGE = "http://pkgconf.org"
-BUGTRACKER = "https://github.com/pkgconf/pkgconf/issues"
-SECTION = "devel"
-PROVIDES += "pkgconfig"
-RPROVIDES_${PN} += "pkgconfig"
-DEFAULT_PREFERENCE = "-1"
-
-# The pkgconf license seems to be functionally equivalent to BSD-2-Clause or
-# ISC, but has different wording, so needs its own name.
-LICENSE = "pkgconf"
-LIC_FILES_CHKSUM = "file://COPYING;md5=548a9d1db10cc0a84810c313a0e9266f"
-
-SRC_URI = "\
- https://distfiles.dereferenced.org/pkgconf/pkgconf-${PV}.tar.xz \
- file://0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch \
- file://0001-stdinc.h-fix-build-with-mingw.patch \
- file://pkg-config-wrapper \
- file://pkg-config-native.in \
- file://pkg-config-esdk.in \
-"
-SRC_URI[md5sum] = "ac35c34d84eeb6a03d4d61b8555d6197"
-SRC_URI[sha256sum] = "1be7e40900c7467893c65f810211b1e68da3f8d5e70fddb883fc24839cad0339"
-
-inherit autotools update-alternatives
-
-EXTRA_OECONF += "--with-pkg-config-dir='${libdir}/pkgconfig:${datadir}/pkgconfig'"
-
-do_install_append () {
- # Install a wrapper which deals, as much as possible with pkgconf vs
- # pkg-config compatibility issues.
- install -m 0755 "${WORKDIR}/pkg-config-wrapper" "${D}${bindir}/pkg-config"
-}
-
-do_install_append_class-native () {
- # Install a pkg-config-native wrapper that will use the native sysroot instead
- # of the MACHINE sysroot, for using pkg-config when building native tools.
- sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
- < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
- install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
- sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
- -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
- < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk
- install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk
-}
-
-ALTERNATIVE_${PN} = "pkg-config"
-
-# When using the RPM generated automatic package dependencies, some packages
-# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by
-# specifying an appropriate provide.
-RPROVIDES_${PN} += "pkgconfig(pkg-config)"
-
-# Include pkg.m4 in the main package, leaving libpkgconf dev files in -dev
-FILES_${PN}-dev_remove = "${datadir}/aclocal"
-FILES_${PN} += "${datadir}/aclocal"
-
-BBCLASSEXTEND += "native nativesdk"
-
-pkgconf_sstate_fixup_esdk () {
- if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then
- pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
- mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real
- lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
- sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native
- fi
-}
-
-SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconf_sstate_fixup_esdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.4.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.4.2.bb
new file mode 100644
index 0000000..ea7b666
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.4.2.bb
@@ -0,0 +1,71 @@
+SUMMARY = "pkgconf provides compiler and linker configuration for development frameworks."
+DESCRIPTION = "pkgconf is a program which helps to configure compiler and linker \
+flags for development frameworks. It is similar to pkg-config from \
+freedesktop.org, providing additional functionality while also maintaining \
+compatibility."
+HOMEPAGE = "http://pkgconf.org"
+BUGTRACKER = "https://github.com/pkgconf/pkgconf/issues"
+SECTION = "devel"
+PROVIDES += "pkgconfig"
+RPROVIDES_${PN} += "pkgconfig"
+DEFAULT_PREFERENCE = "-1"
+
+# The pkgconf license seems to be functionally equivalent to BSD-2-Clause or
+# ISC, but has different wording, so needs its own name.
+LICENSE = "pkgconf"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2214222ec1a820bd6cc75167a56925e0"
+
+SRC_URI = "\
+ https://distfiles.dereferenced.org/pkgconf/pkgconf-${PV}.tar.xz \
+ file://pkg-config-wrapper \
+ file://pkg-config-native.in \
+ file://pkg-config-esdk.in \
+"
+SRC_URI[md5sum] = "678d242b4eef1754bba6a58642af10bb"
+SRC_URI[sha256sum] = "bab39371d4ab972be1d539a8b10b6cc21f8eafc97f617102e667e82bd32eb234"
+
+inherit autotools update-alternatives
+
+EXTRA_OECONF += "--with-pkg-config-dir='${libdir}/pkgconfig:${datadir}/pkgconfig'"
+
+do_install_append () {
+ # Install a wrapper which deals, as much as possible with pkgconf vs
+ # pkg-config compatibility issues.
+ install -m 0755 "${WORKDIR}/pkg-config-wrapper" "${D}${bindir}/pkg-config"
+}
+
+do_install_append_class-native () {
+ # Install a pkg-config-native wrapper that will use the native sysroot instead
+ # of the MACHINE sysroot, for using pkg-config when building native tools.
+ sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
+ < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
+ install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
+ sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
+ -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
+ < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk
+ install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk
+}
+
+ALTERNATIVE_${PN} = "pkg-config"
+
+# When using the RPM generated automatic package dependencies, some packages
+# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by
+# specifying an appropriate provide.
+RPROVIDES_${PN} += "pkgconfig(pkg-config)"
+
+# Include pkg.m4 in the main package, leaving libpkgconf dev files in -dev
+FILES_${PN}-dev_remove = "${datadir}/aclocal"
+FILES_${PN} += "${datadir}/aclocal"
+
+BBCLASSEXTEND += "native nativesdk"
+
+pkgconf_sstate_fixup_esdk () {
+ if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then
+ pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
+ mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real
+ lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
+ sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native
+ fi
+}
+
+SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconf_sstate_fixup_esdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb
deleted file mode 100644
index 938ac8a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "Postinstall scriptlets"
-LICENSE = "MIT"
-
-FILES_${PN}_append = " ${datadir}/postinst-intercepts/*"
-
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
-do_install() {
- install -d ${D}${datadir}/postinst-intercepts
- install -m 755 ${COREBASE}/scripts/postinst-intercepts/postinst_intercept ${D}${datadir}/postinst-intercepts/
- install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_font_cache ${D}${datadir}/postinst-intercepts/
- install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_icon_cache ${D}${datadir}/postinst-intercepts/
- install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_pixbuf_cache ${D}${datadir}/postinst-intercepts/
-}
-
-inherit nativesdk
-INHIBIT_DEFAULT_DEPS = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb
index 570ef36..0f6d16e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb
@@ -9,7 +9,7 @@
runtime and thus programs come up faster."
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
-SRCREV = "ef20628dd78b92e1a3123afc67b64cf010bdd9e4"
+SRCREV = "05aeafd053e56356ec8c62f4bb8f7b95bae192f3"
PV = "1.0+git${SRCPV}"
#
@@ -32,8 +32,7 @@
file://prelink.cron.daily \
file://prelink.default \
file://macros.prelink"
-UPSTREAM_CHECK_GITTAGREGEX = "upstream has no usable tags"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
TARGET_OS_ORIG := "${TARGET_OS}"
OVERRIDES_append = ":${TARGET_OS_ORIG}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Use-epoll-API-on-Linux.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Use-epoll-API-on-Linux.patch
deleted file mode 100644
index 42557b1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Use-epoll-API-on-Linux.patch
+++ /dev/null
@@ -1,292 +0,0 @@
-From 9e407e0be01695e7b927f5820ade87ee9602c248 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 15 Sep 2017 17:00:14 +0300
-Subject: [PATCH] Use epoll API on Linux
-
-Also a couple of other modifications due to epoll having
-a different approach to how the working set of fds is defined
-and used:
-1) open_client() returns an index into the array of clients
-2) close_client() has a protection against being called twice
-with the same client (which would mess up the active_clients
-counter)
-
-Upstream-Status: Submitted [Seebs CC'd by email]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- enums/exit_status.in | 3 +
- pseudo_server.c | 189 ++++++++++++++++++++++++++++++++++++++++++++++++++-
- 2 files changed, 190 insertions(+), 2 deletions(-)
-
-diff --git a/enums/exit_status.in b/enums/exit_status.in
-index 6be44d3..88f94cd 100644
---- a/enums/exit_status.in
-+++ b/enums/exit_status.in
-@@ -18,3 +18,6 @@ listen_fd, "server loop had no valid listen fd"
- pseudo_loaded, "server couldn't get out of pseudo environment"
- pseudo_prefix, "couldn't get valid pseudo prefix"
- pseudo_invocation, "invalid server command arguments"
-+epoll_create, "epoll_create() failed"
-+epoll_ctl, "epoll_ctl() failed"
-+
-diff --git a/pseudo_server.c b/pseudo_server.c
-index ff16efd..14d34de 100644
---- a/pseudo_server.c
-+++ b/pseudo_server.c
-@@ -40,6 +40,12 @@
- #include "pseudo_client.h"
- #include "pseudo_db.h"
-
-+// This has to come after pseudo includes, as that's where PSEUDO_PORT defines are
-+#ifdef PSEUDO_PORT_LINUX
-+#include <sys/epoll.h>
-+#endif
-+
-+
- static int listen_fd = -1;
-
- typedef struct {
-@@ -59,6 +65,7 @@ static int active_clients = 0, highest_client = 0, max_clients = 0;
-
- #define LOOP_DELAY 2
- #define DEFAULT_PSEUDO_SERVER_TIMEOUT 30
-+#define EPOLL_MAX_EVENTS 10
- int pseudo_server_timeout = DEFAULT_PSEUDO_SERVER_TIMEOUT;
- static int die_peacefully = 0;
- static int die_forcefully = 0;
-@@ -80,6 +87,9 @@ quit_now(int signal) {
- static int messages = 0, responses = 0;
- static struct timeval message_time = { .tv_sec = 0 };
-
-+#ifdef PSEUDO_PORT_LINUX
-+static void pseudo_server_loop_epoll(void);
-+#endif
- static void pseudo_server_loop(void);
-
- /* helper function to make a directory, just like mkdir -p.
-@@ -369,12 +379,16 @@ pseudo_server_start(int daemonize) {
- kill(ppid, SIGUSR1);
- }
- }
-+#ifdef PSEUDO_PORT_LINUX
-+ pseudo_server_loop_epoll();
-+#else
- pseudo_server_loop();
-+#endif
- return 0;
- }
-
- /* mess with internal tables as needed */
--static void
-+static unsigned int
- open_client(int fd) {
- pseudo_client_t *new_clients;
- int i;
-@@ -390,7 +404,7 @@ open_client(int fd) {
- ++active_clients;
- if (i > highest_client)
- highest_client = i;
-- return;
-+ return i;
- }
- }
-
-@@ -414,9 +428,11 @@ open_client(int fd) {
-
- max_clients += 16;
- ++active_clients;
-+ return max_clients - 16;
- } else {
- pseudo_diag("error allocating new client, fd %d\n", fd);
- close(fd);
-+ return 0;
- }
- }
-
-@@ -433,6 +449,10 @@ close_client(int client) {
- client, highest_client);
- return;
- }
-+ if (clients[client].fd == -1) {
-+ pseudo_debug(PDBGF_SERVER, "client %d already closed\n", client);
-+ return;
-+ }
- close(clients[client].fd);
- clients[client].fd = -1;
- free(clients[client].tag);
-@@ -566,6 +586,171 @@ serve_client(int i) {
- }
- }
-
-+#ifdef PSEUDO_PORT_LINUX
-+static void pseudo_server_loop_epoll(void)
-+{
-+ struct sockaddr_un client;
-+ socklen_t len;
-+ int i;
-+ int rc;
-+ int fd;
-+ int timeout;
-+ struct epoll_event ev, events[EPOLL_MAX_EVENTS];
-+ int loop_timeout = pseudo_server_timeout;
-+
-+ clients = malloc(16 * sizeof(*clients));
-+
-+ clients[0].fd = listen_fd;
-+ clients[0].pid = getpid();
-+
-+ for (i = 1; i < 16; ++i) {
-+ clients[i].fd = -1;
-+ clients[i].pid = 0;
-+ clients[i].tag = NULL;
-+ clients[i].program = NULL;
-+ }
-+
-+ active_clients = 1;
-+ max_clients = 16;
-+ highest_client = 0;
-+
-+ pseudo_debug(PDBGF_SERVER, "server loop started.\n");
-+ if (listen_fd < 0) {
-+ pseudo_diag("got into loop with no valid listen fd.\n");
-+ exit(PSEUDO_EXIT_LISTEN_FD);
-+ }
-+
-+ timeout = LOOP_DELAY * 1000;
-+
-+ int epollfd = epoll_create1(0);
-+ if (epollfd == -1) {
-+ pseudo_diag("epoll_create1() failed.\n");
-+ exit(PSEUDO_EXIT_EPOLL_CREATE);
-+ }
-+ ev.events = EPOLLIN;
-+ ev.data.u64 = 0;
-+ if (epoll_ctl(epollfd, EPOLL_CTL_ADD, clients[0].fd, &ev) == -1) {
-+ pseudo_diag("epoll_ctl() failed with listening socket.\n");
-+ exit(PSEUDO_EXIT_EPOLL_CTL);
-+ }
-+
-+ pdb_log_msg(SEVERITY_INFO, NULL, NULL, NULL, "server started (pid %d)", getpid());
-+
-+ for (;;) {
-+ rc = epoll_wait(epollfd, events, EPOLL_MAX_EVENTS, timeout);
-+ if (rc == 0 || (rc == -1 && errno == EINTR)) {
-+ /* If there's no clients, start timing out. If there
-+ * are active clients, never time out.
-+ */
-+ if (active_clients == 1) {
-+ loop_timeout -= LOOP_DELAY;
-+ /* maybe flush database to disk */
-+ pdb_maybe_backup();
-+ if (loop_timeout <= 0) {
-+ pseudo_debug(PDBGF_SERVER, "no more clients, got bored.\n");
-+ die_peacefully = 1;
-+ } else {
-+ /* display this if not exiting */
-+ pseudo_debug(PDBGF_SERVER | PDBGF_BENCHMARK, "%d messages handled in %.4f seconds, %d responses\n",
-+ messages,
-+ (double) message_time.tv_sec +
-+ (double) message_time.tv_usec / 1000000.0,
-+ responses);
-+ }
-+ }
-+ } else if (rc > 0) {
-+ loop_timeout = pseudo_server_timeout;
-+ for (i = 0; i < rc; ++i) {
-+ if (clients[events[i].data.u64].fd == listen_fd) {
-+ if (!die_forcefully) {
-+ len = sizeof(client);
-+ if ((fd = accept(listen_fd, (struct sockaddr *) &client, &len)) != -1) {
-+ /* Don't allow clients to end up on fd 2, because glibc's
-+ * malloc debug uses that fd unconditionally.
-+ */
-+ if (fd == 2) {
-+ int newfd = fcntl(fd, F_DUPFD, 3);
-+ close(fd);
-+ fd = newfd;
-+ }
-+ pseudo_debug(PDBGF_SERVER, "new client fd %d\n", fd);
-+ /* A new client implicitly cancels any
-+ * previous shutdown request, or a
-+ * shutdown for lack of clients.
-+ */
-+ pseudo_server_timeout = DEFAULT_PSEUDO_SERVER_TIMEOUT;
-+ die_peacefully = 0;
-+
-+ ev.events = EPOLLIN;
-+ ev.data.u64 = open_client(fd);
-+ if (ev.data.u64 != 0 && epoll_ctl(epollfd, EPOLL_CTL_ADD, clients[ev.data.u64].fd, &ev) == -1) {
-+ pseudo_diag("epoll_ctl() failed with accepted socket.\n");
-+ exit(PSEUDO_EXIT_EPOLL_CTL);
-+ }
-+ } else if (errno == EMFILE) {
-+ pseudo_debug(PDBGF_SERVER, "Hit max open files, dropping a client.\n");
-+ /* In theory there is a potential race here where if we close a client,
-+ it may have sent us a fastop message which we don't act upon.
-+ If we don't close a filehandle we'll loop indefinitely thought.
-+ Only close one per loop iteration in the interests of caution */
-+ for (int j = 1; j <= highest_client; ++j) {
-+ if (clients[j].fd != -1) {
-+ close_client(j);
-+ break;
-+ }
-+ }
-+ }
-+ }
-+ } else {
-+ struct timeval tv1, tv2;
-+ int rc;
-+ gettimeofday(&tv1, NULL);
-+ rc = serve_client(events[i].data.u64);
-+ gettimeofday(&tv2, NULL);
-+ ++messages;
-+ if (rc == 0)
-+ ++responses;
-+ message_time.tv_sec += (tv2.tv_sec - tv1.tv_sec);
-+ message_time.tv_usec += (tv2.tv_usec - tv1.tv_usec);
-+ if (message_time.tv_usec < 0) {
-+ message_time.tv_usec += 1000000;
-+ --message_time.tv_sec;
-+ } else while (message_time.tv_usec > 1000000) {
-+ message_time.tv_usec -= 1000000;
-+ ++message_time.tv_sec;
-+ }
-+ }
-+ if (die_forcefully)
-+ break;
-+ }
-+ pseudo_debug(PDBGF_SERVER, "server loop complete [%d clients left]\n", active_clients);
-+ } else {
-+ pseudo_diag("epoll_wait failed: %s\n", strerror(errno));
-+ break;
-+ }
-+ if (die_peacefully || die_forcefully) {
-+ pseudo_debug(PDBGF_SERVER, "quitting.\n");
-+ pseudo_debug(PDBGF_SERVER | PDBGF_BENCHMARK, "server %d exiting: handled %d messages in %.4f seconds\n",
-+ getpid(), messages,
-+ (double) message_time.tv_sec +
-+ (double) message_time.tv_usec / 1000000.0);
-+ pdb_log_msg(SEVERITY_INFO, NULL, NULL, NULL, "server %d exiting: handled %d messages in %.4f seconds",
-+ getpid(), messages,
-+ (double) message_time.tv_sec +
-+ (double) message_time.tv_usec / 1000000.0);
-+ /* and at this point, we'll start refusing connections */
-+ close(clients[0].fd);
-+ /* This is a good place to insert a delay for
-+ * debugging race conditions during startup. */
-+ /* usleep(300000); */
-+ exit(0);
-+ }
-+ }
-+
-+}
-+
-+#endif
-+
- /* get clients, handle messages, shut down.
- * This doesn't actually do any work, it just calls a ton of things which
- * do work.
---
-2.14.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/b6b68db896f9963558334aff7fca61adde4ec10f.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/b6b68db896f9963558334aff7fca61adde4ec10f.patch
deleted file mode 100644
index 3045a3b..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/b6b68db896f9963558334aff7fca61adde4ec10f.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From b6b68db896f9963558334aff7fca61adde4ec10f Mon Sep 17 00:00:00 2001
-From: Seebs <seebs@seebs.net>
-Date: Thu, 13 Apr 2017 18:12:01 -0500
-Subject: Prevent bash from segfaulting when unloading pseudo
-
-bash's extremely fancy internal awareness of how the environment looks
-means that, if you directly call the underlying libc "unsetenv" on
-a variable, bash can end up trying to access a null pointer. Fixing
-this generically is actually rather hard; you can't really avoid
-writing to environ on fork() or popen(), even if you change all
-execv*() functions to use the execv*e() variants. So for now, instead
-of unsetting the variable, set it to an empty string.
-
-Thanks to Saur in IRC for spotting this and helping debug it.
-
-Signed-off-by: Seebs <seebs@seebs.net>
-
-Upstream-Status: Backport
-
-diff --git a/ChangeLog.txt b/ChangeLog.txt
-index a2d30e9..8ba1ffa 100644
---- a/ChangeLog.txt
-+++ b/ChangeLog.txt
-@@ -1,3 +1,8 @@
-+2017-04-13:
-+ * (seebs) don't unset LD_PRELOAD or the like, because if you
-+ do that, bash can segfault because it "knows" how many
-+ fields are in environ.
-+
- 2017-02-24:
- * (seebs) import posix_acl_default fix from Anton Gerasimov
- <anton@advancedtelematic.com>
-diff --git a/pseudo_util.c b/pseudo_util.c
-index 172990b..6a1fac2 100644
---- a/pseudo_util.c
-+++ b/pseudo_util.c
-@@ -844,7 +844,7 @@ void pseudo_dropenv() {
- if (ld_preload && strlen(ld_preload)) {
- SETENV(PRELINK_LIBRARIES, ld_preload, 1);
- } else {
-- UNSETENV(PRELINK_LIBRARIES);
-+ SETENV(PRELINK_LIBRARIES, "", 1);
- }
- }
- }
---
-cgit v0.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/efe0be279901006f939cd357ccee47b651c786da.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/efe0be279901006f939cd357ccee47b651c786da.patch
deleted file mode 100644
index 64fc58c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/efe0be279901006f939cd357ccee47b651c786da.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From efe0be279901006f939cd357ccee47b651c786da Mon Sep 17 00:00:00 2001
-From: Seebs <seebs@seebs.net>
-Date: Fri, 24 Feb 2017 12:47:38 -0600
-Subject: Don't try to record 0-length posix_acl_default xattrs
-
-Based on a submission from Anton Gerasimov <anton@advancedtelematic.com>
-
-On some systems, with some kernel configs, "cp -a" apparently tries to
-set an empty ACL list, with a valid header but no contents, which causes
-strange and mysterious behavior later if we actually create such an entry.
-So filter that out, also sanity-check a couple of other things.
-
-Signed-off-by: Seebs <seebs@seebs.net>
-
-Upstream-Status: Backport
-
-diff --git a/ChangeLog.txt b/ChangeLog.txt
-index ae2a6e9..a2d30e9 100644
---- a/ChangeLog.txt
-+++ b/ChangeLog.txt
-@@ -1,3 +1,6 @@
-+2017-02-24:
-+ * (seebs) import posix_acl_default fix from Anton Gerasimov
-+ <anton@advancedtelematic.com>
- 2017-02-01:
- * (seebs) handle xattr deletion slightly more carefully.
- * (seebs) tag this as 1.8.2
-diff --git a/ports/linux/xattr/pseudo_wrappers.c b/ports/linux/xattr/pseudo_wrappers.c
-index 46bc053..d69d53e 100644
---- a/ports/linux/xattr/pseudo_wrappers.c
-+++ b/ports/linux/xattr/pseudo_wrappers.c
-@@ -62,9 +62,9 @@ static int
- posix_permissions(const acl_header *header, int entries, int *extra, int *mode) {
- int acl_seen = 0;
- if (le32(header->version) != 2) {
-- pseudo_diag("Fatal: ACL support no available for header version %d.\n",
-+ pseudo_diag("Fatal: ACL support not available for header version %d.\n",
- le32(header->version));
-- return 1;
-+ return -1;
- }
- *mode = 0;
- *extra = 0;
-@@ -140,12 +140,38 @@ static int shared_setxattr(const char *path, int fd, const char *name, const voi
- pseudo_debug(PDBGF_XATTR, "setxattr(%s [fd %d], %s => '%.*s')\n",
- path ? path : "<no path>", fd, name, (int) size, (char *) value);
-
-+ /* Filter out erroneous sizes for POSIX ACL
-+ * see posix_acl_xattr_count in include/linux/posix_acl_xattr.h of Linux source code */
-+ /* I don't think there's any posix_acl_* values that aren't in this format */
-+ if (!strncmp(name, "system.posix_acl_", 17)) {
-+ // ACL is corrupt, issue an error
-+ if(size < sizeof(acl_header) || (size - sizeof(acl_header)) % sizeof(acl_entry) != 0) {
-+ pseudo_debug(PDBGF_XATTR, "invalid data size for %s: %d\n",
-+ name, (int) size);
-+ errno = EINVAL;
-+ return -1;
-+ }
-+
-+ // ACL is empty, do nothing
-+ if((size - sizeof(acl_header)) / sizeof(acl_entry) == 0) {
-+ /* on some systems, "cp -a" will attempt to clone the
-+ * posix_acl_default entry for a directory (which would specify
-+ * default ACLs for new files in that directory), but if the
-+ * original was empty, we get a header but no entries. With
-+ * real xattr, that ends up being silently discarded, apparently,
-+ * so we discard it too.
-+ */
-+ pseudo_debug(PDBGF_XATTR, "0-length ACL entry %s.\n", name);
-+ return 0;
-+ }
-+ }
- /* this may be a plain chmod */
- if (!strcmp(name, "system.posix_acl_access")) {
- int extra;
- int mode;
- int entries = (size - sizeof(acl_header)) / sizeof(acl_entry);
-- if (!posix_permissions(value, entries, &extra, &mode)) {
-+ int res = posix_permissions(value, entries, &extra, &mode);
-+ if (res == 0) {
- pseudo_debug(PDBGF_XATTR, "posix_acl_access translated to mode %04o. Remaining attribute(s): %d.\n",
- mode, extra);
- buf.st_mode = mode;
-@@ -164,8 +190,12 @@ static int shared_setxattr(const char *path, int fd, const char *name, const voi
- if (!extra) {
- return 0;
- }
-+ } else if (res == -1) {
-+ errno = EOPNOTSUPP;
-+ return -1;
- }
- }
-+
- if (!strcmp(name, "user.pseudo_data")) {
- pseudo_debug(PDBGF_XATTR | PDBGF_XATTRDB, "user.pseudo_data xattribute does not get to go in database.\n");
- return -1;
---
-cgit v0.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fastopreply.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fastopreply.patch
deleted file mode 100644
index 904c2d0..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fastopreply.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-Ensure FASTOP messages get an ACK reply so that the client can be sure the server
-recieved them. This means if connections are terminated, data isn't lost.
-
-RP 2017/9/22
-
-Upstream-Status: Submitted
-
-Index: pseudo-1.8.2/pseudo_client.c
-===================================================================
---- pseudo-1.8.2.orig/pseudo_client.c
-+++ pseudo-1.8.2/pseudo_client.c
-@@ -1331,21 +1331,19 @@ pseudo_client_request(pseudo_msg_t *msg,
- * indicating a successful send.
- */
- pseudo_debug(PDBGF_CLIENT | PDBGF_VERBOSE, "sent!\n");
-- if (msg->type != PSEUDO_MSG_FASTOP) {
-- response = pseudo_msg_receive(connect_fd);
-- if (!response) {
-- pseudo_debug(PDBGF_CLIENT, "expected response did not occur; retrying\n");
-+ response = pseudo_msg_receive(connect_fd);
-+ if (!response) {
-+ pseudo_debug(PDBGF_CLIENT, "expected response did not occur; retrying\n");
-+ } else {
-+ if (response->type != PSEUDO_MSG_ACK) {
-+ pseudo_debug(PDBGF_CLIENT, "got non-ack response %d\n", response->type);
-+ return 0;
-+ } else if (msg->type != PSEUDO_MSG_FASTOP) {
-+ pseudo_debug(PDBGF_CLIENT | PDBGF_VERBOSE, "got response type %d\n", response->type);
-+ return response;
- } else {
-- if (response->type != PSEUDO_MSG_ACK) {
-- pseudo_debug(PDBGF_CLIENT, "got non-ack response %d\n", response->type);
-- return 0;
-- } else {
-- pseudo_debug(PDBGF_CLIENT | PDBGF_VERBOSE, "got response type %d\n", response->type);
-- return response;
-- }
-+ return 0;
- }
-- } else {
-- return 0;
- }
- }
- pseudo_diag("pseudo: server connection persistently failed, aborting.\n");
-Index: pseudo-1.8.2/pseudo_server.c
-===================================================================
---- pseudo-1.8.2.orig/pseudo_server.c
-+++ pseudo-1.8.2/pseudo_server.c
-@@ -463,6 +463,11 @@ close_client(int client) {
- --highest_client;
- }
-
-+static pseudo_msg_t server_fastop_reply = {
-+ .type = PSEUDO_MSG_ACK,
-+ .op = OP_NONE,
-+};
-+
- /* Actually process a request.
- */
- static int
-@@ -515,8 +520,14 @@ serve_client(int i) {
- * pseudo_server_response.
- */
- if (in->type != PSEUDO_MSG_SHUTDOWN) {
-- if (in->type == PSEUDO_MSG_FASTOP)
-+ if (in->type == PSEUDO_MSG_FASTOP) {
- send_response = 0;
-+ /* For fastops we reply now to say we got the data */
-+ if ((rc = pseudo_msg_send(clients[i].fd, &server_fastop_reply, 0, NULL)) != 0) {
-+ pseudo_debug(PDBGF_SERVER, "failed to send fastop ack to client %d [%d]: %d (%s)\n",
-+ i, (int) clients[i].pid, rc, strerror(errno));
-+ }
-+ }
- /* most messages don't need these, but xattr may */
- response_path = 0;
- response_pathlen = -1;
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch
index b085a45..bda7e4b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch
@@ -1,3 +1,8 @@
+From b0b25fbc041a148d1de09f5a6503cd95973ec77c Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Tue, 25 Apr 2017 15:25:54 +0100
+Subject: [PATCH 3/3] pseudo: Handle too many files deadlock
+
Currently if we max out the maximum number of files, pseudo can deadlock, unable to
accept new connections yet unable to move forward and unblock the other processes
waiting either.
@@ -11,19 +16,23 @@
Upstream-Status: Submitted [Peter is aware of the issue]
-Index: pseudo-1.8.2/pseudo_server.c
-===================================================================
---- pseudo-1.8.2.orig/pseudo_server.c
-+++ pseudo-1.8.2/pseudo_server.c
-@@ -581,6 +581,7 @@ pseudo_server_loop(void) {
- int rc;
- int fd;
- int loop_timeout = pseudo_server_timeout;
+---
+ pseudo_server.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/pseudo_server.c b/pseudo_server.c
+index dac3258..15a3e8f 100644
+--- a/pseudo_server.c
++++ b/pseudo_server.c
+@@ -802,6 +802,7 @@ pseudo_server_loop(void) {
+ struct sigaction eat_usr2 = {
+ .sa_handler = set_do_list_clients
+ };
+ int hitmaxfiles;
clients = malloc(16 * sizeof(*clients));
-@@ -597,6 +598,7 @@ pseudo_server_loop(void) {
+@@ -820,6 +821,7 @@ pseudo_server_loop(void) {
active_clients = 1;
max_clients = 16;
highest_client = 0;
@@ -31,9 +40,9 @@
pseudo_debug(PDBGF_SERVER, "server loop started.\n");
if (listen_fd < 0) {
-@@ -663,10 +665,15 @@ pseudo_server_loop(void) {
- message_time.tv_usec -= 1000000;
- ++message_time.tv_sec;
+@@ -878,10 +880,15 @@ pseudo_server_loop(void) {
+ } else {
+ serve_client(i);
}
+ } else if (hitmaxfiles) {
+ /* Only close one per loop iteration in the interests of caution */
@@ -47,13 +56,16 @@
if (!die_forcefully &&
(FD_ISSET(clients[0].fd, &events) ||
FD_ISSET(clients[0].fd, &reads))) {
-@@ -688,6 +698,9 @@ pseudo_server_loop(void) {
- */
- pseudo_server_timeout = DEFAULT_PSEUDO_SERVER_TIMEOUT;
- die_peacefully = 0;
+@@ -903,6 +910,9 @@ pseudo_server_loop(void) {
+ */
+ pseudo_server_timeout = DEFAULT_PSEUDO_SERVER_TIMEOUT;
+ die_peacefully = 0;
+ } else if (errno == EMFILE) {
+ hitmaxfiles = 1;
+ pseudo_debug(PDBGF_SERVER, "Hit max open files, dropping a client.\n");
}
}
pseudo_debug(PDBGF_SERVER, "server loop complete [%d clients left]\n", active_clients);
+--
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc
index 18ce9f9..cdc2a58 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc
@@ -26,7 +26,7 @@
NO32LIBS ??= "1"
NO32LIBS_class-nativesdk = "1"
-PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback"
+PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback --enable-epoll --enable-xattr"
# Compile for the local machine arch...
do_compile () {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb
deleted file mode 100644
index 73ef572..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require pseudo.inc
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/pseudo/${BPN}-${PV}.tar.bz2 \
- file://0001-configure-Prune-PIE-flags.patch \
- file://fallback-passwd \
- file://fallback-group \
- file://moreretries.patch \
- file://efe0be279901006f939cd357ccee47b651c786da.patch \
- file://b6b68db896f9963558334aff7fca61adde4ec10f.patch \
- file://fastopreply.patch \
- file://toomanyfiles.patch \
- file://0001-Use-epoll-API-on-Linux.patch \
- "
-
-SRC_URI[md5sum] = "7d41e72188fbea1f696c399c1a435675"
-SRC_URI[sha256sum] = "ceb456bd47770a37ca20784a91d715c5a7601e07e26ab11b0c77e9203ed3d196"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb
index 42c7b2e..9103d49 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -1,15 +1,14 @@
require pseudo.inc
-SRCREV = "02168305b0a19f981ffe857f36eb256ba8810b77"
-PV = "1.8.2+git${SRCPV}"
-
-DEFAULT_PREFERENCE = "-1"
-
SRC_URI = "git://git.yoctoproject.org/pseudo \
file://0001-configure-Prune-PIE-flags.patch \
file://fallback-passwd \
file://fallback-group \
- file://moreretries.patch"
+ file://moreretries.patch \
+ file://toomanyfiles.patch \
+ "
+SRCREV = "fddbe854c9db058d5a05830d3bcdd4233d95ee2e"
S = "${WORKDIR}/git"
+PV = "1.9.0+git${SRCPV}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch
deleted file mode 100644
index b9e5856..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 4170b98e0d5864ef4db1c5704a6e9428c3be9fb8 Mon Sep 17 00:00:00 2001
-From: Iryna Shcherbina <ishcherb@redhat.com>
-Date: Thu, 24 Aug 2017 18:01:43 +0200
-Subject: [PATCH] BUG: fix infinite loop when creating np.pad on an empty array
-
-Upstream-Status: Backport [https://github.com/numpy/numpy/pull/9599/commits/6f9ea0abbd305d53f9017debab3a3a591fe0e249]
-CVE: CVE-2017-12852
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- numpy/lib/arraypad.py | 3 +++
- numpy/lib/tests/test_arraypad.py | 4 ++++
- 2 files changed, 7 insertions(+)
-
-diff --git a/numpy/lib/arraypad.py b/numpy/lib/arraypad.py
-index 2dad99c..294a689 100644
---- a/numpy/lib/arraypad.py
-+++ b/numpy/lib/arraypad.py
-@@ -1406,6 +1406,9 @@ def pad(array, pad_width, mode, **kwargs):
- newmat = _append_min(newmat, pad_after, chunk_after, axis)
-
- elif mode == 'reflect':
-+ if narray.size == 0:
-+ raise ValueError("There aren't any elements to reflect in `array`")
-+
- for axis, (pad_before, pad_after) in enumerate(pad_width):
- # Recursive padding along any axis where `pad_amt` is too large
- # for indexing tricks. We can only safely pad the original axis
-diff --git a/numpy/lib/tests/test_arraypad.py b/numpy/lib/tests/test_arraypad.py
-index 056aa45..0f71d32 100644
---- a/numpy/lib/tests/test_arraypad.py
-+++ b/numpy/lib/tests/test_arraypad.py
-@@ -1014,6 +1014,10 @@ class ValueError1(TestCase):
- assert_raises(ValueError, pad, arr, ((-2, 3), (3, 2)),
- **kwargs)
-
-+ def test_check_empty_array(self):
-+ assert_raises(ValueError, pad, [], 4, mode='reflect')
-+ assert_raises(ValueError, pad, np.ndarray(0), 4, mode='reflect')
-+
-
- class ValueError2(TestCase):
- def test_check_negative_pad_amount(self):
---
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
index ffd6ced..516ccd7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
@@ -1,23 +1,24 @@
-From cc2ce6d8b6a3e6e2c8874896c10897034a80cd4f Mon Sep 17 00:00:00 2001
+From c8c6649b29a08f82e1d6761a6d62ce5f632313c5 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 10 Dec 2015 13:20:30 +0200
-Subject: [PATCH] Don't search /usr and so on for libraries by default to avoid
- host contamination.
+Subject: [PATCH 1/3] Don't search /usr and so on for libraries by default to
+ avoid host contamination.
Upstream-Status: Inappropriate (As the code stands, this is a hack)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
numpy/distutils/system_info.py | 50 +++++-------------------------------------
1 file changed, 6 insertions(+), 44 deletions(-)
-Index: numpy-1.13.1/numpy/distutils/system_info.py
-===================================================================
---- numpy-1.13.1.orig/numpy/distutils/system_info.py
-+++ numpy-1.13.1/numpy/distutils/system_info.py
-@@ -211,51 +211,13 @@ if sys.platform == 'win32':
- default_x11_lib_dirs = []
- default_x11_include_dirs = []
+diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
+index bea120c..544e056 100644
+--- a/numpy/distutils/system_info.py
++++ b/numpy/distutils/system_info.py
+@@ -262,51 +262,13 @@ if sys.platform == 'win32':
+ add_system_root(os.path.join(conda_dir, 'Library'))
+
else:
- default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib',
- '/opt/local/lib', '/sw/lib'], platform_bits)
@@ -29,10 +30,7 @@
- '/opt/local/include', '/sw/include',
- '/usr/include/suitesparse']
- default_src_dirs = ['.', '/usr/local/src', '/opt/src', '/sw/src']
-+ default_lib_dirs = libpaths(['/deadir/lib'], platform_bits)
-+ default_include_dirs = ['/deaddir/include']
-+ default_src_dirs = ['.', '/deaddir/src']
-
+-
- default_x11_lib_dirs = libpaths(['/usr/X11R6/lib', '/usr/X11/lib',
- '/usr/lib'], platform_bits)
- default_x11_include_dirs = ['/usr/X11R6/include', '/usr/X11/include',
@@ -67,8 +65,15 @@
- finally:
- if tmp is not None:
- tmp.close()
++ default_lib_dirs = libpaths(['/deadir/lib'], platform_bits)
++ default_include_dirs = ['/deaddir/include']
++ default_src_dirs = ['.', '/deaddir/src']
++
+ default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits)
+ default_x11_include_dirs = ['/deaddir/include']
if os.path.join(sys.prefix, 'lib') not in default_lib_dirs:
default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib'))
+--
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-npy_cpu-Add-riscv-support.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-npy_cpu-Add-riscv-support.patch
new file mode 100644
index 0000000..4f5c4f5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-npy_cpu-Add-riscv-support.patch
@@ -0,0 +1,28 @@
+From 30fb1bf9244bb0789c02ec7c98a923acc7200206 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 16 Mar 2018 19:55:21 -0700
+Subject: [PATCH] npy_cpu: Add riscv support
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted [https://github.com/numpy/numpy/pull/10761]
+
+ numpy/core/include/numpy/npy_cpu.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
+index 84653ea18..9e88db873 100644
+--- a/numpy/core/include/numpy/npy_cpu.h
++++ b/numpy/core/include/numpy/npy_cpu.h
+@@ -78,6 +78,8 @@
+ #define NPY_CPU_AARCH64
+ #elif defined(__mc68000__)
+ #define NPY_CPU_M68K
++#elif defined(__riscv)
++ #define NPY_CPU_RISCV
+ #elif defined(__arc__) && defined(__LITTLE_ENDIAN__)
+ #define NPY_CPU_ARCEL
+ #elif defined(__arc__) && defined(__BIG_ENDIAN__)
+--
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch
deleted file mode 100644
index eb8a71a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From c560abff71f98a39a7401f08c2c13dad9ae7f15f Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 25 Feb 2016 01:23:32 -0500
-Subject: [PATCH] remove build path in comments
-
-It has build path in comments, so remove it.
-
-Upstream-Status: Inappropriate [openembedded specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- numpy/distutils/misc_util.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py
-index 345e60f..dafb068 100644
---- a/numpy/distutils/misc_util.py
-+++ b/numpy/distutils/misc_util.py
-@@ -2254,7 +2254,7 @@ def generate_config_py(target):
- from distutils.dir_util import mkpath
- mkpath(os.path.dirname(target))
- f = open(target, 'w')
-- f.write('# This file is generated by %s\n' % (os.path.abspath(sys.argv[0])))
-+ f.write('# This file is generated by %s\n' % (os.path.abspath(sys.argv[0]).replace(os.path.abspath('../'),'')))
- f.write('# It contains system_info results at the time of building this package.\n')
- f.write('__all__ = ["get_info","show"]\n\n')
- for k, i in system_info.saved_results.items():
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/_numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/_numpyconfig.h
new file mode 100644
index 0000000..109deb0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/_numpyconfig.h
@@ -0,0 +1,32 @@
+#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/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/config.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/config.h
new file mode 100644
index 0000000..c30b868
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/config.h
@@ -0,0 +1,139 @@
+#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/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy.inc b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy.inc
new file mode 100644
index 0000000..284f213
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy.inc
@@ -0,0 +1,114 @@
+SUMMARY = "A sophisticated Numeric Processing Package for Python"
+SECTION = "devel/python"
+LICENSE = "BSD-3-Clause & BSD-2-Clause & PSF & Apache-2.0 & BSD"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=fc53b33304171d132128ebe82ea4a645"
+
+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://fix_shebang_f2py.patch \
+ file://0001-npy_cpu-Add-riscv-support.patch \
+ ${CONFIGFILESURI} "
+SRC_URI[md5sum] = "e39878fafb11828983aeec583dda4a06"
+SRC_URI[sha256sum] = "ddbcda194f49e0cf0663fa8131cb9d7a3b876d14dea0047d3c5fdfaf20adbb40"
+
+UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
+
+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}"
+
+# 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()
+RDEPENDS_${PN} = "${PYTHON_PN}-unittest \
+ ${PYTHON_PN}-difflib \
+ ${PYTHON_PN}-pprint \
+ ${PYTHON_PN}-pickle \
+ ${PYTHON_PN}-shell \
+ ${PYTHON_PN}-nose \
+ ${PYTHON_PN}-doctest \
+ ${PYTHON_PN}-datetime \
+ ${PYTHON_PN}-distutils \
+ ${PYTHON_PN}-misc \
+ ${PYTHON_PN}-mmap \
+ ${PYTHON_PN}-netclient \
+ ${PYTHON_PN}-numbers \
+ ${PYTHON_PN}-pydoc \
+ ${PYTHON_PN}-pkgutil \
+ ${PYTHON_PN}-email \
+ ${PYTHON_PN}-compression \
+ ${PYTHON_PN}-ctypes \
+ ${PYTHON_PN}-threading \
+"
+
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb
deleted file mode 100644
index 13e8f4f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb
+++ /dev/null
@@ -1,114 +0,0 @@
-SUMMARY = "A sophisticated Numeric Processing Package for Python"
-SECTION = "devel/python"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1002b09cd654fcaa2dcc87535acd9a96"
-
-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://remove-build-path-in-comments.patch \
- file://fix_shebang_f2py.patch \
- file://0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch \
- ${CONFIGFILESURI} "
-
-SRC_URI[md5sum] = "6d459e4a24f5035f720dda3c57716a92"
-SRC_URI[sha256sum] = "de020ec06f1e9ce1115a50161a38bf8d4c2525379900f9cb478cc613a1e7cd93"
-
-UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
-
-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 \
-"
-
-S = "${WORKDIR}/numpy-${PV}"
-
-inherit setuptools
-
-# 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-native/python 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()
-RDEPENDS_${PN} = "python-unittest \
- python-difflib \
- python-pprint \
- python-pickle \
- python-shell \
- python-nose \
- python-doctest \
- python-datetime \
- python-distutils \
- python-misc \
- python-mmap \
- python-netclient \
- python-numbers \
- python-pydoc \
- python-pkgutil \
- python-email \
- python-subprocess \
- python-compression \
- python-ctypes \
- python-threading \
-"
-
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.14.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.14.2.bb
new file mode 100644
index 0000000..5013789
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.14.2.bb
@@ -0,0 +1,6 @@
+inherit setuptools
+require python-numpy.inc
+
+RDEPENDS_${PN}_class-target_append = " \
+ ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.13.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.13.1.bb
deleted file mode 100644
index 29874b8..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.13.1.bb
+++ /dev/null
@@ -1,114 +0,0 @@
-SUMMARY = "A sophisticated Numeric Processing Package for Python"
-SECTION = "devel/python"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1002b09cd654fcaa2dcc87535acd9a96"
-
-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://remove-build-path-in-comments.patch \
- file://fix_shebang_f2py.patch \
- file://0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch \
- ${CONFIGFILESURI} "
-SRC_URI[md5sum] = "6d459e4a24f5035f720dda3c57716a92"
-SRC_URI[sha256sum] = "de020ec06f1e9ce1115a50161a38bf8d4c2525379900f9cb478cc613a1e7cd93"
-
-UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
-
-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 \
-"
-
-S = "${WORKDIR}/numpy-${PV}"
-
-inherit setuptools3
-
-# 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}/python3-native/python3 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()
-RDEPENDS_${PN} = "python3-unittest \
- python3-difflib \
- python3-pprint \
- python3-pickle \
- python3-shell \
- python3-nose \
- python3-doctest \
- python3-datetime \
- python3-distutils \
- python3-misc \
- python3-mmap \
- python3-netclient \
- python3-numbers \
- python3-pydoc \
- python3-pkgutil \
- python3-email \
- python3-subprocess \
- python3-compression \
- python3-ctypes \
- python3-threading \
- python3-textutils \
-"
-
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.14.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.14.2.bb
new file mode 100644
index 0000000..915e6f8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.14.2.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-numpy.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc
deleted file mode 100644
index 57d4834..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc
+++ /dev/null
@@ -1,287 +0,0 @@
-
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '../../../scripts/contrib/python/generate-manifest-2.7.py' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-
-
-
-PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-plistlib ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
-
-PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-plistlib ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib ${PN}-modules"
-
-SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
-RDEPENDS_${PN}-2to3="${PN}-core"
-FILES_${PN}-2to3="${bindir}/2to3 ${libdir}/python2.7/lib2to3 "
-
-SUMMARY_${PN}-argparse="Python command line argument parser"
-RDEPENDS_${PN}-argparse="${PN}-core ${PN}-codecs ${PN}-textutils"
-FILES_${PN}-argparse="${libdir}/python2.7/argparse.* "
-
-SUMMARY_${PN}-audio="Python Audio Handling"
-RDEPENDS_${PN}-audio="${PN}-core"
-FILES_${PN}-audio="${libdir}/python2.7/wave.* ${libdir}/python2.7/chunk.* ${libdir}/python2.7/sndhdr.* ${libdir}/python2.7/lib-dynload/ossaudiodev.so ${libdir}/python2.7/lib-dynload/audioop.so ${libdir}/python2.7/audiodev.* ${libdir}/python2.7/sunaudio.* ${libdir}/python2.7/sunau.* ${libdir}/python2.7/toaiff.* "
-
-SUMMARY_${PN}-bsddb="Python bindings for the Berkeley Database"
-RDEPENDS_${PN}-bsddb="${PN}-core"
-FILES_${PN}-bsddb="${libdir}/python2.7/bsddb ${libdir}/python2.7/lib-dynload/_bsddb.so "
-
-SUMMARY_${PN}-codecs="Python codecs, encodings & i18n support"
-RDEPENDS_${PN}-codecs="${PN}-core ${PN}-lang"
-FILES_${PN}-codecs="${libdir}/python2.7/codecs.* ${libdir}/python2.7/encodings ${libdir}/python2.7/gettext.* ${libdir}/python2.7/locale.* ${libdir}/python2.7/lib-dynload/_locale.so ${libdir}/python2.7/lib-dynload/_codecs* ${libdir}/python2.7/lib-dynload/_multibytecodec.so ${libdir}/python2.7/lib-dynload/unicodedata.so ${libdir}/python2.7/stringprep.* ${libdir}/python2.7/xdrlib.* "
-
-SUMMARY_${PN}-compile="Python bytecode compilation support"
-RDEPENDS_${PN}-compile="${PN}-core"
-FILES_${PN}-compile="${libdir}/python2.7/py_compile.* ${libdir}/python2.7/compileall.* "
-
-SUMMARY_${PN}-compiler="Python compiler support"
-RDEPENDS_${PN}-compiler="${PN}-core"
-FILES_${PN}-compiler="${libdir}/python2.7/compiler "
-
-SUMMARY_${PN}-compression="Python high-level compression support"
-RDEPENDS_${PN}-compression="${PN}-core ${PN}-zlib"
-FILES_${PN}-compression="${libdir}/python2.7/gzip.* ${libdir}/python2.7/zipfile.* ${libdir}/python2.7/tarfile.* ${libdir}/python2.7/lib-dynload/bz2.so "
-
-SUMMARY_${PN}-contextlib="Python utilities for with-statementcontexts."
-RDEPENDS_${PN}-contextlib="${PN}-core"
-FILES_${PN}-contextlib="${libdir}/python${PYTHON_MAJMIN}/contextlib.* "
-
-SUMMARY_${PN}-core="Python interpreter and core modules"
-RDEPENDS_${PN}-core="${PN}-lang ${PN}-re"
-FILES_${PN}-core="${libdir}/python2.7/__future__.* ${libdir}/python2.7/_abcoll.* ${libdir}/python2.7/abc.* ${libdir}/python2.7/ast.* ${libdir}/python2.7/copy.* ${libdir}/python2.7/copy_reg.* ${libdir}/python2.7/ConfigParser.* ${libdir}/python2.7/genericpath.* ${libdir}/python2.7/getopt.* ${libdir}/python2.7/linecache.* ${libdir}/python2.7/new.* ${libdir}/python2.7/os.* ${libdir}/python2.7/posixpath.* ${libdir}/python2.7/struct.* ${libdir}/python2.7/warnings.* ${libdir}/python2.7/site.* ${libdir}/python2.7/stat.* ${libdir}/python2.7/UserDict.* ${libdir}/python2.7/UserList.* ${libdir}/python2.7/UserString.* ${libdir}/python2.7/lib-dynload/binascii.so ${libdir}/python2.7/lib-dynload/_struct.so ${libdir}/python2.7/lib-dynload/time.so ${libdir}/python2.7/lib-dynload/xreadlines.so ${libdir}/python2.7/types.* ${libdir}/python2.7/platform.* ${bindir}/python* ${libdir}/python2.7/_weakrefset.* ${libdir}/python2.7/sysconfig.* ${libdir}/python2.7/_sysconfigdata.* ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
-
-SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
-RDEPENDS_${PN}-crypt="${PN}-core"
-FILES_${PN}-crypt="${libdir}/python2.7/hashlib.* ${libdir}/python2.7/md5.* ${libdir}/python2.7/sha.* ${libdir}/python2.7/lib-dynload/crypt.so ${libdir}/python2.7/lib-dynload/_hashlib.so ${libdir}/python2.7/lib-dynload/_sha256.so ${libdir}/python2.7/lib-dynload/_sha512.so "
-
-SUMMARY_${PN}-ctypes="Python C types support"
-RDEPENDS_${PN}-ctypes="${PN}-core"
-FILES_${PN}-ctypes="${libdir}/python2.7/ctypes ${libdir}/python2.7/lib-dynload/_ctypes.so ${libdir}/python2.7/lib-dynload/_ctypes_test.so "
-
-SUMMARY_${PN}-curses="Python curses support"
-RDEPENDS_${PN}-curses="${PN}-core"
-FILES_${PN}-curses="${libdir}/python2.7/curses ${libdir}/python2.7/lib-dynload/_curses.so ${libdir}/python2.7/lib-dynload/_curses_panel.so "
-
-SUMMARY_${PN}-datetime="Python calendar and time support"
-RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs"
-FILES_${PN}-datetime="${libdir}/python2.7/_strptime.* ${libdir}/python2.7/calendar.* ${libdir}/python2.7/lib-dynload/datetime.so "
-
-SUMMARY_${PN}-db="Python file-based database support"
-RDEPENDS_${PN}-db="${PN}-core"
-FILES_${PN}-db="${libdir}/python2.7/anydbm.* ${libdir}/python2.7/dumbdbm.* ${libdir}/python2.7/whichdb.* "
-
-SUMMARY_${PN}-debugger="Python debugger"
-RDEPENDS_${PN}-debugger="${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint"
-FILES_${PN}-debugger="${libdir}/python2.7/bdb.* ${libdir}/python2.7/pdb.* "
-
-SUMMARY_${PN}-dev="Python development package"
-RDEPENDS_${PN}-dev="${PN}-core"
-FILES_${PN}-dev="${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig ${libdir}/python2.7/config/Makefile "
-
-SUMMARY_${PN}-difflib="Python helpers for computing deltas between objects"
-RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re"
-FILES_${PN}-difflib="${libdir}/python2.7/difflib.* "
-
-SUMMARY_${PN}-distutils="Python Distribution Utilities"
-RDEPENDS_${PN}-distutils="${PN}-core ${PN}-email"
-FILES_${PN}-distutils="${libdir}/python2.7/config ${libdir}/python2.7/distutils "
-
-SUMMARY_${PN}-distutils-staticdev="Python distribution utilities (static libraries)"
-RDEPENDS_${PN}-distutils-staticdev="${PN}-distutils"
-FILES_${PN}-distutils-staticdev="${libdir}/python2.7/config/lib*.a "
-
-SUMMARY_${PN}-doctest="Python framework for running examples in docstrings"
-RDEPENDS_${PN}-doctest="${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib"
-FILES_${PN}-doctest="${libdir}/python2.7/doctest.* "
-
-SUMMARY_${PN}-email="Python email support"
-RDEPENDS_${PN}-email="${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient"
-FILES_${PN}-email="${libdir}/python2.7/imaplib.* ${libdir}/python2.7/email "
-
-SUMMARY_${PN}-fcntl="Python's fcntl interface"
-RDEPENDS_${PN}-fcntl="${PN}-core"
-FILES_${PN}-fcntl="${libdir}/python2.7/lib-dynload/fcntl.so "
-
-SUMMARY_${PN}-gdbm="Python GNU database support"
-RDEPENDS_${PN}-gdbm="${PN}-core"
-FILES_${PN}-gdbm="${libdir}/python2.7/lib-dynload/gdbm.so "
-
-SUMMARY_${PN}-hotshot="Python hotshot performance profiler"
-RDEPENDS_${PN}-hotshot="${PN}-core"
-FILES_${PN}-hotshot="${libdir}/python2.7/hotshot ${libdir}/python2.7/lib-dynload/_hotshot.so "
-
-SUMMARY_${PN}-html="Python HTML processing support"
-RDEPENDS_${PN}-html="${PN}-core"
-FILES_${PN}-html="${libdir}/python2.7/formatter.* ${libdir}/python2.7/htmlentitydefs.* ${libdir}/python2.7/htmllib.* ${libdir}/python2.7/markupbase.* ${libdir}/python2.7/sgmllib.* ${libdir}/python2.7/HTMLParser.* "
-
-SUMMARY_${PN}-idle="Python Integrated Development Environment"
-RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter"
-FILES_${PN}-idle="${bindir}/idle ${libdir}/python2.7/idlelib "
-
-SUMMARY_${PN}-image="Python graphical image handling"
-RDEPENDS_${PN}-image="${PN}-core"
-FILES_${PN}-image="${libdir}/python2.7/colorsys.* ${libdir}/python2.7/imghdr.* ${libdir}/python2.7/lib-dynload/imageop.so ${libdir}/python2.7/lib-dynload/rgbimg.so "
-
-SUMMARY_${PN}-importlib="Python import implementation library"
-RDEPENDS_${PN}-importlib="${PN}-core"
-FILES_${PN}-importlib="${libdir}/python2.7/importlib "
-
-SUMMARY_${PN}-io="Python low-level I/O"
-RDEPENDS_${PN}-io="${PN}-core ${PN}-math ${PN}-textutils ${PN}-netclient ${PN}-contextlib"
-FILES_${PN}-io="${libdir}/python2.7/lib-dynload/_socket.so ${libdir}/python2.7/lib-dynload/_io.so ${libdir}/python2.7/lib-dynload/_ssl.so ${libdir}/python2.7/lib-dynload/select.so ${libdir}/python2.7/lib-dynload/termios.so ${libdir}/python2.7/lib-dynload/cStringIO.so ${libdir}/python2.7/pipes.* ${libdir}/python2.7/socket.* ${libdir}/python2.7/ssl.* ${libdir}/python2.7/tempfile.* ${libdir}/python2.7/StringIO.* ${libdir}/python2.7/io.* ${libdir}/python2.7/_pyio.* "
-
-SUMMARY_${PN}-json="Python JSON support"
-RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re ${PN}-codecs"
-FILES_${PN}-json="${libdir}/python2.7/json ${libdir}/python2.7/lib-dynload/_json.so "
-
-SUMMARY_${PN}-lang="Python low-level language support"
-RDEPENDS_${PN}-lang="${PN}-core"
-FILES_${PN}-lang="${libdir}/python2.7/lib-dynload/_bisect.so ${libdir}/python2.7/lib-dynload/_collections.so ${libdir}/python2.7/lib-dynload/_heapq.so ${libdir}/python2.7/lib-dynload/_weakref.so ${libdir}/python2.7/lib-dynload/_functools.so ${libdir}/python2.7/lib-dynload/array.so ${libdir}/python2.7/lib-dynload/itertools.so ${libdir}/python2.7/lib-dynload/operator.so ${libdir}/python2.7/lib-dynload/parser.so ${libdir}/python2.7/atexit.* ${libdir}/python2.7/bisect.* ${libdir}/python2.7/code.* ${libdir}/python2.7/codeop.* ${libdir}/python2.7/collections.* ${libdir}/python2.7/dis.* ${libdir}/python2.7/functools.* ${libdir}/python2.7/heapq.* ${libdir}/python2.7/inspect.* ${libdir}/python2.7/keyword.* ${libdir}/python2.7/opcode.* ${libdir}/python2.7/symbol.* ${libdir}/python2.7/repr.* ${libdir}/python2.7/token.* ${libdir}/python2.7/tokenize.* ${libdir}/python2.7/traceback.* ${libdir}/python2.7/weakref.* "
-
-SUMMARY_${PN}-logging="Python logging support"
-RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold"
-FILES_${PN}-logging="${libdir}/python2.7/logging "
-
-SUMMARY_${PN}-mailbox="Python mailbox format support"
-RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime"
-FILES_${PN}-mailbox="${libdir}/python2.7/mailbox.* "
-
-SUMMARY_${PN}-math="Python math support"
-RDEPENDS_${PN}-math="${PN}-core ${PN}-crypt"
-FILES_${PN}-math="${libdir}/python2.7/lib-dynload/cmath.so ${libdir}/python2.7/lib-dynload/math.so ${libdir}/python2.7/lib-dynload/_random.so ${libdir}/python2.7/random.* ${libdir}/python2.7/sets.* "
-
-SUMMARY_${PN}-mime="Python MIME handling APIs"
-RDEPENDS_${PN}-mime="${PN}-core ${PN}-io"
-FILES_${PN}-mime="${libdir}/python2.7/mimetools.* ${libdir}/python2.7/uu.* ${libdir}/python2.7/quopri.* ${libdir}/python2.7/rfc822.* ${libdir}/python2.7/MimeWriter.* "
-
-SUMMARY_${PN}-mmap="Python memory-mapped file support"
-RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io"
-FILES_${PN}-mmap="${libdir}/python2.7/lib-dynload/mmap.so "
-
-SUMMARY_${PN}-multiprocessing="Python multiprocessing support"
-RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap"
-FILES_${PN}-multiprocessing="${libdir}/python2.7/lib-dynload/_multiprocessing.so ${libdir}/python2.7/multiprocessing "
-
-SUMMARY_${PN}-netclient="Python Internet Protocol clients"
-RDEPENDS_${PN}-netclient="${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime"
-FILES_${PN}-netclient="${libdir}/python2.7/*Cookie*.* ${libdir}/python2.7/base64.* ${libdir}/python2.7/cookielib.* ${libdir}/python2.7/ftplib.* ${libdir}/python2.7/gopherlib.* ${libdir}/python2.7/hmac.* ${libdir}/python2.7/httplib.* ${libdir}/python2.7/mimetypes.* ${libdir}/python2.7/nntplib.* ${libdir}/python2.7/poplib.* ${libdir}/python2.7/smtplib.* ${libdir}/python2.7/telnetlib.* ${libdir}/python2.7/urllib.* ${libdir}/python2.7/urllib2.* ${libdir}/python2.7/urlparse.* ${libdir}/python2.7/uuid.* ${libdir}/python2.7/rfc822.* ${libdir}/python2.7/mimetools.* "
-
-SUMMARY_${PN}-netserver="Python Internet Protocol servers"
-RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading"
-FILES_${PN}-netserver="${libdir}/python2.7/cgi.* ${libdir}/python2.7/*HTTPServer.* ${libdir}/python2.7/SocketServer.* "
-
-SUMMARY_${PN}-numbers="Python number APIs"
-RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re"
-FILES_${PN}-numbers="${libdir}/python2.7/decimal.* ${libdir}/python2.7/fractions.* ${libdir}/python2.7/numbers.* "
-
-SUMMARY_${PN}-pickle="Python serialisation/persistence support"
-RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re"
-FILES_${PN}-pickle="${libdir}/python2.7/pickle.* ${libdir}/python2.7/shelve.* ${libdir}/python2.7/lib-dynload/cPickle.so ${libdir}/python2.7/pickletools.* "
-
-SUMMARY_${PN}-pkgutil="Python package extension utility support"
-RDEPENDS_${PN}-pkgutil="${PN}-core"
-FILES_${PN}-pkgutil="${libdir}/python2.7/pkgutil.* "
-
-SUMMARY_${PN}-plistlib="Generate and parse Mac OS X .plist files"
-RDEPENDS_${PN}-plistlib="${PN}-core ${PN}-datetime ${PN}-io"
-FILES_${PN}-plistlib="${libdir}/python2.7/plistlib.* "
-
-SUMMARY_${PN}-pprint="Python pretty-print support"
-RDEPENDS_${PN}-pprint="${PN}-core ${PN}-io"
-FILES_${PN}-pprint="${libdir}/python2.7/pprint.* "
-
-SUMMARY_${PN}-profile="Python basic performance profiling support"
-RDEPENDS_${PN}-profile="${PN}-core ${PN}-textutils"
-FILES_${PN}-profile="${libdir}/python2.7/profile.* ${libdir}/python2.7/pstats.* ${libdir}/python2.7/cProfile.* ${libdir}/python2.7/lib-dynload/_lsprof.so "
-
-SUMMARY_${PN}-pydoc="Python interactive help support"
-RDEPENDS_${PN}-pydoc="${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re"
-FILES_${PN}-pydoc="${bindir}/pydoc ${libdir}/python2.7/pydoc.* ${libdir}/python2.7/pydoc_data "
-
-SUMMARY_${PN}-re="Python Regular Expression APIs"
-RDEPENDS_${PN}-re="${PN}-core"
-FILES_${PN}-re="${libdir}/python2.7/re.* ${libdir}/python2.7/sre.* ${libdir}/python2.7/sre_compile.* ${libdir}/python2.7/sre_constants* ${libdir}/python2.7/sre_parse.* "
-
-SUMMARY_${PN}-readline="Python readline support"
-RDEPENDS_${PN}-readline="${PN}-core"
-FILES_${PN}-readline="${libdir}/python2.7/lib-dynload/readline.so ${libdir}/python2.7/rlcompleter.* "
-
-SUMMARY_${PN}-resource="Python resource control interface"
-RDEPENDS_${PN}-resource="${PN}-core"
-FILES_${PN}-resource="${libdir}/python2.7/lib-dynload/resource.so "
-
-SUMMARY_${PN}-robotparser="Python robots.txt parser"
-RDEPENDS_${PN}-robotparser="${PN}-core ${PN}-netclient"
-FILES_${PN}-robotparser="${libdir}/python2.7/robotparser.* "
-
-SUMMARY_${PN}-shell="Python shell-like functionality"
-RDEPENDS_${PN}-shell="${PN}-core ${PN}-re"
-FILES_${PN}-shell="${libdir}/python2.7/cmd.* ${libdir}/python2.7/commands.* ${libdir}/python2.7/dircache.* ${libdir}/python2.7/fnmatch.* ${libdir}/python2.7/glob.* ${libdir}/python2.7/popen2.* ${libdir}/python2.7/shlex.* ${libdir}/python2.7/shutil.* "
-
-SUMMARY_${PN}-smtpd="Python Simple Mail Transport Daemon"
-RDEPENDS_${PN}-smtpd="${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime"
-FILES_${PN}-smtpd="${bindir}/smtpd.* ${libdir}/python2.7/smtpd.* "
-
-SUMMARY_${PN}-sqlite3="Python Sqlite3 database support"
-RDEPENDS_${PN}-sqlite3="${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading ${PN}-zlib"
-FILES_${PN}-sqlite3="${libdir}/python2.7/lib-dynload/_sqlite3.so ${libdir}/python2.7/sqlite3/dbapi2.* ${libdir}/python2.7/sqlite3/__init__.* ${libdir}/python2.7/sqlite3/dump.* "
-
-SUMMARY_${PN}-sqlite3-tests="Python Sqlite3 database support tests"
-RDEPENDS_${PN}-sqlite3-tests="${PN}-core ${PN}-sqlite3"
-FILES_${PN}-sqlite3-tests="${libdir}/python2.7/sqlite3/test "
-
-SUMMARY_${PN}-stringold="Python string APIs [deprecated]"
-RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re"
-FILES_${PN}-stringold="${libdir}/python2.7/lib-dynload/strop.so ${libdir}/python2.7/string.* ${libdir}/python2.7/stringold.* "
-
-SUMMARY_${PN}-subprocess="Python subprocess support"
-RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle"
-FILES_${PN}-subprocess="${libdir}/python2.7/subprocess.* "
-
-SUMMARY_${PN}-syslog="Python syslog interface"
-RDEPENDS_${PN}-syslog="${PN}-core"
-FILES_${PN}-syslog="${libdir}/python2.7/lib-dynload/syslog.so "
-
-SUMMARY_${PN}-terminal="Python terminal controlling support"
-RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io"
-FILES_${PN}-terminal="${libdir}/python2.7/pty.* ${libdir}/python2.7/tty.* "
-
-SUMMARY_${PN}-tests="Python tests"
-RDEPENDS_${PN}-tests="${PN}-core ${PN}-modules"
-FILES_${PN}-tests="${libdir}/python2.7/test "
-
-SUMMARY_${PN}-textutils="Python option parsing, text wrapping and CSV support"
-RDEPENDS_${PN}-textutils="${PN}-core ${PN}-io ${PN}-re ${PN}-stringold"
-FILES_${PN}-textutils="${libdir}/python2.7/lib-dynload/_csv.so ${libdir}/python2.7/csv.* ${libdir}/python2.7/optparse.* ${libdir}/python2.7/textwrap.* "
-
-SUMMARY_${PN}-threading="Python threading & synchronization support"
-RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang"
-FILES_${PN}-threading="${libdir}/python2.7/_threading_local.* ${libdir}/python2.7/dummy_thread.* ${libdir}/python2.7/dummy_threading.* ${libdir}/python2.7/mutex.* ${libdir}/python2.7/threading.* ${libdir}/python2.7/Queue.* "
-
-SUMMARY_${PN}-tkinter="Python Tcl/Tk bindings"
-RDEPENDS_${PN}-tkinter="${PN}-core"
-FILES_${PN}-tkinter="${libdir}/python2.7/lib-dynload/_tkinter.so ${libdir}/python2.7/lib-tk "
-
-SUMMARY_${PN}-unittest="Python unit testing framework"
-RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell"
-FILES_${PN}-unittest="${libdir}/python2.7/unittest/ "
-
-SUMMARY_${PN}-unixadmin="Python Unix administration support"
-RDEPENDS_${PN}-unixadmin="${PN}-core"
-FILES_${PN}-unixadmin="${libdir}/python2.7/lib-dynload/nis.so ${libdir}/python2.7/lib-dynload/grp.so ${libdir}/python2.7/lib-dynload/pwd.so ${libdir}/python2.7/getpass.* "
-
-SUMMARY_${PN}-xml="Python basic XML support"
-RDEPENDS_${PN}-xml="${PN}-core ${PN}-re"
-FILES_${PN}-xml="${libdir}/python2.7/lib-dynload/_elementtree.so ${libdir}/python2.7/lib-dynload/pyexpat.so ${libdir}/python2.7/xml ${libdir}/python2.7/xmllib.* "
-
-SUMMARY_${PN}-xmlrpc="Python XML-RPC support"
-RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang"
-FILES_${PN}-xmlrpc="${libdir}/python2.7/xmlrpclib.* ${libdir}/python2.7/SimpleXMLRPCServer.* ${libdir}/python2.7/DocXMLRPCServer.* "
-
-SUMMARY_${PN}-zlib="Python zlib compression support"
-RDEPENDS_${PN}-zlib="${PN}-core"
-FILES_${PN}-zlib="${libdir}/python2.7/lib-dynload/zlib.so "
-
-SUMMARY_${PN}-modules="All Python modules"
-RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-plistlib ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
-ALLOW_EMPTY_${PN}-modules = "1"
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc
deleted file mode 100644
index 0260e87..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ /dev/null
@@ -1,283 +0,0 @@
-
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: 'scripts/contrib/python/generate-manifest-3.5.py' Version 20140131 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-
-
-
-PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-typing ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
-
-PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-typing ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-modules"
-
-SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
-RDEPENDS_${PN}-2to3="${PN}-core"
-FILES_${PN}-2to3="${libdir}/python3.5/lib2to3 ${libdir}/python3.5/lib2to3/__pycache__ "
-
-SUMMARY_${PN}-argparse="Python command line argument parser"
-RDEPENDS_${PN}-argparse="${PN}-core ${PN}-codecs ${PN}-textutils"
-FILES_${PN}-argparse="${libdir}/python3.5/argparse.* ${libdir}/python3.5/__pycache__/argparse.* "
-
-SUMMARY_${PN}-asyncio="Python Asynchronous I/O, event loop, coroutines and tasks"
-RDEPENDS_${PN}-asyncio="${PN}-core"
-FILES_${PN}-asyncio="${libdir}/python3.5/asyncio ${libdir}/python3.5/asyncio/__pycache__ "
-
-SUMMARY_${PN}-audio="Python Audio Handling"
-RDEPENDS_${PN}-audio="${PN}-core"
-FILES_${PN}-audio="${libdir}/python3.5/wave.* ${libdir}/python3.5/__pycache__/wave.* ${libdir}/python3.5/chunk.* ${libdir}/python3.5/__pycache__/chunk.* ${libdir}/python3.5/sndhdr.* ${libdir}/python3.5/__pycache__/sndhdr.* ${libdir}/python3.5/lib-dynload/ossaudiodev.*.so ${libdir}/python3.5/lib-dynload/__pycache__/ossaudiodev.*.so ${libdir}/python3.5/lib-dynload/audioop.*.so ${libdir}/python3.5/lib-dynload/__pycache__/audioop.*.so ${libdir}/python3.5/audiodev.* ${libdir}/python3.5/__pycache__/audiodev.* ${libdir}/python3.5/sunaudio.* ${libdir}/python3.5/__pycache__/sunaudio.* ${libdir}/python3.5/sunau.* ${libdir}/python3.5/__pycache__/sunau.* ${libdir}/python3.5/toaiff.* ${libdir}/python3.5/__pycache__/toaiff.* "
-
-SUMMARY_${PN}-codecs="Python codecs, encodings & i18n support"
-RDEPENDS_${PN}-codecs="${PN}-core ${PN}-lang"
-FILES_${PN}-codecs="${libdir}/python3.5/codecs.* ${libdir}/python3.5/__pycache__/codecs.* ${libdir}/python3.5/encodings ${libdir}/python3.5/encodings/__pycache__ ${libdir}/python3.5/gettext.* ${libdir}/python3.5/__pycache__/gettext.* ${libdir}/python3.5/locale.* ${libdir}/python3.5/__pycache__/locale.* ${libdir}/python3.5/lib-dynload/_locale.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_locale.*.so ${libdir}/python3.5/lib-dynload/_codecs* ${libdir}/python3.5/lib-dynload/_codecs*/__pycache__ ${libdir}/python3.5/lib-dynload/_multibytecodec.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_multibytecodec.*.so ${libdir}/python3.5/lib-dynload/unicodedata.*.so ${libdir}/python3.5/lib-dynload/__pycache__/unicodedata.*.so ${libdir}/python3.5/stringprep.* ${libdir}/python3.5/__pycache__/stringprep.* ${libdir}/python3.5/xdrlib.* ${libdir}/python3.5/__pycache__/xdrlib.* "
-
-SUMMARY_${PN}-compile="Python bytecode compilation support"
-RDEPENDS_${PN}-compile="${PN}-core"
-FILES_${PN}-compile="${libdir}/python3.5/py_compile.* ${libdir}/python3.5/__pycache__/py_compile.* ${libdir}/python3.5/compileall.* ${libdir}/python3.5/__pycache__/compileall.* "
-
-SUMMARY_${PN}-compression="Python high-level compression support"
-RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs ${PN}-importlib ${PN}-threading ${PN}-shell"
-FILES_${PN}-compression="${libdir}/python3.5/gzip.* ${libdir}/python3.5/__pycache__/gzip.* ${libdir}/python3.5/zipfile.* ${libdir}/python3.5/__pycache__/zipfile.* ${libdir}/python3.5/tarfile.* ${libdir}/python3.5/__pycache__/tarfile.* ${libdir}/python3.5/lib-dynload/bz2.*.so ${libdir}/python3.5/lib-dynload/__pycache__/bz2.*.so ${libdir}/python3.5/lib-dynload/zlib.*.so ${libdir}/python3.5/lib-dynload/__pycache__/zlib.*.so ${libdir}/python3.5/bz2.py ${libdir}/python3.5/__pycache__/bz2.py ${libdir}/python3.5/lzma.py ${libdir}/python3.5/__pycache__/lzma.py ${libdir}/python3.5/_compression.py ${libdir}/python3.5/__pycache__/_compression.py "
-
-SUMMARY_${PN}-core="Python interpreter and core modules"
-RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math"
-FILES_${PN}-core="${libdir}/python3.5/__future__.* ${libdir}/python3.5/__pycache__/__future__.* ${libdir}/python3.5/_abcoll.* ${libdir}/python3.5/__pycache__/_abcoll.* ${libdir}/python3.5/abc.* ${libdir}/python3.5/__pycache__/abc.* ${libdir}/python3.5/ast.* ${libdir}/python3.5/__pycache__/ast.* ${libdir}/python3.5/copy.* ${libdir}/python3.5/__pycache__/copy.* ${libdir}/python3.5/copyreg.* ${libdir}/python3.5/__pycache__/copyreg.* ${libdir}/python3.5/configparser.* ${libdir}/python3.5/__pycache__/configparser.* ${libdir}/python3.5/genericpath.* ${libdir}/python3.5/__pycache__/genericpath.* ${libdir}/python3.5/getopt.* ${libdir}/python3.5/__pycache__/getopt.* ${libdir}/python3.5/linecache.* ${libdir}/python3.5/__pycache__/linecache.* ${libdir}/python3.5/new.* ${libdir}/python3.5/__pycache__/new.* ${libdir}/python3.5/os.* ${libdir}/python3.5/__pycache__/os.* ${libdir}/python3.5/posixpath.* ${libdir}/python3.5/__pycache__/posixpath.* ${libdir}/python3.5/struct.* ${libdir}/python3.5/__pycache__/struct.* ${libdir}/python3.5/warnings.* ${libdir}/python3.5/__pycache__/warnings.* ${libdir}/python3.5/site.* ${libdir}/python3.5/__pycache__/site.* ${libdir}/python3.5/stat.* ${libdir}/python3.5/__pycache__/stat.* ${libdir}/python3.5/UserDict.* ${libdir}/python3.5/__pycache__/UserDict.* ${libdir}/python3.5/UserList.* ${libdir}/python3.5/__pycache__/UserList.* ${libdir}/python3.5/UserString.* ${libdir}/python3.5/__pycache__/UserString.* ${libdir}/python3.5/lib-dynload/binascii.*.so ${libdir}/python3.5/lib-dynload/__pycache__/binascii.*.so ${libdir}/python3.5/lib-dynload/_struct.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_struct.*.so ${libdir}/python3.5/lib-dynload/time.*.so ${libdir}/python3.5/lib-dynload/__pycache__/time.*.so ${libdir}/python3.5/lib-dynload/xreadlines.*.so ${libdir}/python3.5/lib-dynload/__pycache__/xreadlines.*.so ${libdir}/python3.5/types.* ${libdir}/python3.5/__pycache__/types.* ${libdir}/python3.5/platform.* ${libdir}/python3.5/__pycache__/platform.* ${bindir}/python* ${libdir}/python3.5/_weakrefset.* ${libdir}/python3.5/__pycache__/_weakrefset.* ${libdir}/python3.5/sysconfig.* ${libdir}/python3.5/__pycache__/sysconfig.* ${libdir}/python3.5/_sysconfigdata.* ${libdir}/python3.5/__pycache__/_sysconfigdata.* ${includedir}/python${PYTHON_BINABI}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* ${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
-
-SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
-RDEPENDS_${PN}-crypt="${PN}-core"
-FILES_${PN}-crypt="${libdir}/python3.5/hashlib.* ${libdir}/python3.5/__pycache__/hashlib.* ${libdir}/python3.5/md5.* ${libdir}/python3.5/__pycache__/md5.* ${libdir}/python3.5/sha.* ${libdir}/python3.5/__pycache__/sha.* ${libdir}/python3.5/lib-dynload/crypt.*.so ${libdir}/python3.5/lib-dynload/__pycache__/crypt.*.so ${libdir}/python3.5/lib-dynload/_hashlib.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_hashlib.*.so ${libdir}/python3.5/lib-dynload/_sha256.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_sha256.*.so ${libdir}/python3.5/lib-dynload/_sha512.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_sha512.*.so "
-
-SUMMARY_${PN}-ctypes="Python C types support"
-RDEPENDS_${PN}-ctypes="${PN}-core ${PN}-subprocess"
-FILES_${PN}-ctypes="${libdir}/python3.5/ctypes ${libdir}/python3.5/ctypes/__pycache__ ${libdir}/python3.5/lib-dynload/_ctypes.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_ctypes.*.so ${libdir}/python3.5/lib-dynload/_ctypes_test.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_ctypes_test.*.so "
-
-SUMMARY_${PN}-curses="Python curses support"
-RDEPENDS_${PN}-curses="${PN}-core"
-FILES_${PN}-curses="${libdir}/python3.5/curses ${libdir}/python3.5/curses/__pycache__ ${libdir}/python3.5/lib-dynload/_curses.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_curses.*.so ${libdir}/python3.5/lib-dynload/_curses_panel.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_curses_panel.*.so "
-
-SUMMARY_${PN}-datetime="Python calendar and time support"
-RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs"
-FILES_${PN}-datetime="${libdir}/python3.5/_strptime.* ${libdir}/python3.5/__pycache__/_strptime.* ${libdir}/python3.5/calendar.* ${libdir}/python3.5/__pycache__/calendar.* ${libdir}/python3.5/datetime.* ${libdir}/python3.5/__pycache__/datetime.* ${libdir}/python3.5/lib-dynload/_datetime.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_datetime.*.so "
-
-SUMMARY_${PN}-db="Python file-based database support"
-RDEPENDS_${PN}-db="${PN}-core"
-FILES_${PN}-db="${libdir}/python3.5/anydbm.* ${libdir}/python3.5/__pycache__/anydbm.* ${libdir}/python3.5/dumbdbm.* ${libdir}/python3.5/__pycache__/dumbdbm.* ${libdir}/python3.5/whichdb.* ${libdir}/python3.5/__pycache__/whichdb.* ${libdir}/python3.5/dbm ${libdir}/python3.5/dbm/__pycache__ ${libdir}/python3.5/lib-dynload/_dbm.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_dbm.*.so "
-
-SUMMARY_${PN}-debugger="Python debugger"
-RDEPENDS_${PN}-debugger="${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint ${PN}-importlib ${PN}-pkgutil"
-FILES_${PN}-debugger="${libdir}/python3.5/bdb.* ${libdir}/python3.5/__pycache__/bdb.* ${libdir}/python3.5/pdb.* ${libdir}/python3.5/__pycache__/pdb.* "
-
-SUMMARY_${PN}-dev="Python development package"
-RDEPENDS_${PN}-dev="${PN}-core"
-FILES_${PN}-dev="${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig ${libdir}/python3.5/config*/Makefile ${libdir}/python3.5/config*/Makefile/__pycache__ "
-
-SUMMARY_${PN}-difflib="Python helpers for computing deltas between objects"
-RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re"
-FILES_${PN}-difflib="${libdir}/python3.5/difflib.* ${libdir}/python3.5/__pycache__/difflib.* "
-
-SUMMARY_${PN}-distutils="Python Distribution Utilities"
-RDEPENDS_${PN}-distutils="${PN}-core ${PN}-email"
-FILES_${PN}-distutils="${libdir}/python3.5/config ${libdir}/python3.5/config/__pycache__ ${libdir}/python3.5/distutils ${libdir}/python3.5/distutils/__pycache__ "
-
-SUMMARY_${PN}-distutils-staticdev="Python distribution utilities (static libraries)"
-RDEPENDS_${PN}-distutils-staticdev="${PN}-distutils"
-FILES_${PN}-distutils-staticdev="${libdir}/python3.5/config/lib*.a ${libdir}/python3.5/config/__pycache__/lib*.a "
-
-SUMMARY_${PN}-doctest="Python framework for running examples in docstrings"
-RDEPENDS_${PN}-doctest="${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib"
-FILES_${PN}-doctest="${libdir}/python3.5/doctest.* ${libdir}/python3.5/__pycache__/doctest.* "
-
-SUMMARY_${PN}-email="Python email support"
-RDEPENDS_${PN}-email="${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient"
-FILES_${PN}-email="${libdir}/python3.5/imaplib.* ${libdir}/python3.5/__pycache__/imaplib.* ${libdir}/python3.5/email ${libdir}/python3.5/email/__pycache__ "
-
-SUMMARY_${PN}-enum="Python support for enumerations"
-RDEPENDS_${PN}-enum="${PN}-core"
-FILES_${PN}-enum="${libdir}/python3.5/enum.* ${libdir}/python3.5/__pycache__/enum.* "
-
-SUMMARY_${PN}-fcntl="Python's fcntl interface"
-RDEPENDS_${PN}-fcntl="${PN}-core"
-FILES_${PN}-fcntl="${libdir}/python3.5/lib-dynload/fcntl.*.so ${libdir}/python3.5/lib-dynload/__pycache__/fcntl.*.so "
-
-SUMMARY_${PN}-gdbm="Python GNU database support"
-RDEPENDS_${PN}-gdbm="${PN}-core"
-FILES_${PN}-gdbm="${libdir}/python3.5/lib-dynload/_gdbm.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_gdbm.*.so "
-
-SUMMARY_${PN}-html="Python HTML processing support"
-RDEPENDS_${PN}-html="${PN}-core"
-FILES_${PN}-html="${libdir}/python3.5/formatter.* ${libdir}/python3.5/__pycache__/formatter.* ${libdir}/python3.5/htmlentitydefs.* ${libdir}/python3.5/__pycache__/htmlentitydefs.* ${libdir}/python3.5/html ${libdir}/python3.5/html/__pycache__ ${libdir}/python3.5/htmllib.* ${libdir}/python3.5/__pycache__/htmllib.* ${libdir}/python3.5/markupbase.* ${libdir}/python3.5/__pycache__/markupbase.* ${libdir}/python3.5/sgmllib.* ${libdir}/python3.5/__pycache__/sgmllib.* ${libdir}/python3.5/HTMLParser.* ${libdir}/python3.5/__pycache__/HTMLParser.* "
-
-SUMMARY_${PN}-idle="Python Integrated Development Environment"
-RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter"
-FILES_${PN}-idle="${bindir}/idle ${libdir}/python3.5/idlelib ${libdir}/python3.5/idlelib/__pycache__ "
-
-SUMMARY_${PN}-image="Python graphical image handling"
-RDEPENDS_${PN}-image="${PN}-core"
-FILES_${PN}-image="${libdir}/python3.5/colorsys.* ${libdir}/python3.5/__pycache__/colorsys.* ${libdir}/python3.5/imghdr.* ${libdir}/python3.5/__pycache__/imghdr.* ${libdir}/python3.5/lib-dynload/imageop.*.so ${libdir}/python3.5/lib-dynload/__pycache__/imageop.*.so ${libdir}/python3.5/lib-dynload/rgbimg.*.so ${libdir}/python3.5/lib-dynload/__pycache__/rgbimg.*.so "
-
-SUMMARY_${PN}-importlib="Python import implementation library"
-RDEPENDS_${PN}-importlib="${PN}-core ${PN}-lang"
-FILES_${PN}-importlib="${libdir}/python3.5/importlib ${libdir}/python3.5/importlib/__pycache__ ${libdir}/python3.5/imp.* ${libdir}/python3.5/__pycache__/imp.* "
-
-SUMMARY_${PN}-io="Python low-level I/O"
-RDEPENDS_${PN}-io="${PN}-core ${PN}-math"
-FILES_${PN}-io="${libdir}/python3.5/lib-dynload/_socket.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_socket.*.so ${libdir}/python3.5/lib-dynload/_io.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_io.*.so ${libdir}/python3.5/lib-dynload/_ssl.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_ssl.*.so ${libdir}/python3.5/lib-dynload/select.*.so ${libdir}/python3.5/lib-dynload/__pycache__/select.*.so ${libdir}/python3.5/lib-dynload/termios.*.so ${libdir}/python3.5/lib-dynload/__pycache__/termios.*.so ${libdir}/python3.5/lib-dynload/cStringIO.*.so ${libdir}/python3.5/lib-dynload/__pycache__/cStringIO.*.so ${libdir}/python3.5/ipaddress.* ${libdir}/python3.5/__pycache__/ipaddress.* ${libdir}/python3.5/pipes.* ${libdir}/python3.5/__pycache__/pipes.* ${libdir}/python3.5/socket.* ${libdir}/python3.5/__pycache__/socket.* ${libdir}/python3.5/ssl.* ${libdir}/python3.5/__pycache__/ssl.* ${libdir}/python3.5/tempfile.* ${libdir}/python3.5/__pycache__/tempfile.* ${libdir}/python3.5/StringIO.* ${libdir}/python3.5/__pycache__/StringIO.* ${libdir}/python3.5/io.* ${libdir}/python3.5/__pycache__/io.* ${libdir}/python3.5/_pyio.* ${libdir}/python3.5/__pycache__/_pyio.* "
-
-SUMMARY_${PN}-json="Python JSON support"
-RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re"
-FILES_${PN}-json="${libdir}/python3.5/json ${libdir}/python3.5/json/__pycache__ ${libdir}/python3.5/lib-dynload/_json.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_json.*.so "
-
-SUMMARY_${PN}-lang="Python low-level language support"
-RDEPENDS_${PN}-lang="${PN}-core ${PN}-importlib"
-FILES_${PN}-lang="${libdir}/python3.5/lib-dynload/_bisect.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_bisect.*.so ${libdir}/python3.5/lib-dynload/_collections.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_collections.*.so ${libdir}/python3.5/lib-dynload/_heapq.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_heapq.*.so ${libdir}/python3.5/lib-dynload/_weakref.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_weakref.*.so ${libdir}/python3.5/lib-dynload/_functools.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_functools.*.so ${libdir}/python3.5/lib-dynload/array.*.so ${libdir}/python3.5/lib-dynload/__pycache__/array.*.so ${libdir}/python3.5/lib-dynload/itertools.*.so ${libdir}/python3.5/lib-dynload/__pycache__/itertools.*.so ${libdir}/python3.5/lib-dynload/operator.*.so ${libdir}/python3.5/lib-dynload/__pycache__/operator.*.so ${libdir}/python3.5/lib-dynload/parser.*.so ${libdir}/python3.5/lib-dynload/__pycache__/parser.*.so ${libdir}/python3.5/atexit.* ${libdir}/python3.5/__pycache__/atexit.* ${libdir}/python3.5/bisect.* ${libdir}/python3.5/__pycache__/bisect.* ${libdir}/python3.5/code.* ${libdir}/python3.5/__pycache__/code.* ${libdir}/python3.5/codeop.* ${libdir}/python3.5/__pycache__/codeop.* ${libdir}/python3.5/collections.* ${libdir}/python3.5/__pycache__/collections.* ${libdir}/python3.5/_collections_abc.* ${libdir}/python3.5/__pycache__/_collections_abc.* ${libdir}/python3.5/contextlib.* ${libdir}/python3.5/__pycache__/contextlib.* ${libdir}/python3.5/dis.* ${libdir}/python3.5/__pycache__/dis.* ${libdir}/python3.5/functools.* ${libdir}/python3.5/__pycache__/functools.* ${libdir}/python3.5/heapq.* ${libdir}/python3.5/__pycache__/heapq.* ${libdir}/python3.5/inspect.* ${libdir}/python3.5/__pycache__/inspect.* ${libdir}/python3.5/keyword.* ${libdir}/python3.5/__pycache__/keyword.* ${libdir}/python3.5/opcode.* ${libdir}/python3.5/__pycache__/opcode.* ${libdir}/python3.5/operator.* ${libdir}/python3.5/__pycache__/operator.* ${libdir}/python3.5/symbol.* ${libdir}/python3.5/__pycache__/symbol.* ${libdir}/python3.5/repr.* ${libdir}/python3.5/__pycache__/repr.* ${libdir}/python3.5/token.* ${libdir}/python3.5/__pycache__/token.* ${libdir}/python3.5/tokenize.* ${libdir}/python3.5/__pycache__/tokenize.* ${libdir}/python3.5/traceback.* ${libdir}/python3.5/__pycache__/traceback.* ${libdir}/python3.5/weakref.* ${libdir}/python3.5/__pycache__/weakref.* "
-
-SUMMARY_${PN}-logging="Python logging support"
-RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold"
-FILES_${PN}-logging="${libdir}/python3.5/logging ${libdir}/python3.5/logging/__pycache__ "
-
-SUMMARY_${PN}-mailbox="Python mailbox format support"
-RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime"
-FILES_${PN}-mailbox="${libdir}/python3.5/mailbox.* ${libdir}/python3.5/__pycache__/mailbox.* "
-
-SUMMARY_${PN}-math="Python math support"
-RDEPENDS_${PN}-math="${PN}-core ${PN}-crypt"
-FILES_${PN}-math="${libdir}/python3.5/lib-dynload/cmath.*.so ${libdir}/python3.5/lib-dynload/__pycache__/cmath.*.so ${libdir}/python3.5/lib-dynload/math.*.so ${libdir}/python3.5/lib-dynload/__pycache__/math.*.so ${libdir}/python3.5/lib-dynload/_random.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_random.*.so ${libdir}/python3.5/random.* ${libdir}/python3.5/__pycache__/random.* ${libdir}/python3.5/sets.* ${libdir}/python3.5/__pycache__/sets.* "
-
-SUMMARY_${PN}-mime="Python MIME handling APIs"
-RDEPENDS_${PN}-mime="${PN}-core ${PN}-io"
-FILES_${PN}-mime="${libdir}/python3.5/mimetools.* ${libdir}/python3.5/__pycache__/mimetools.* ${libdir}/python3.5/uu.* ${libdir}/python3.5/__pycache__/uu.* ${libdir}/python3.5/quopri.* ${libdir}/python3.5/__pycache__/quopri.* ${libdir}/python3.5/rfc822.* ${libdir}/python3.5/__pycache__/rfc822.* ${libdir}/python3.5/MimeWriter.* ${libdir}/python3.5/__pycache__/MimeWriter.* "
-
-SUMMARY_${PN}-mmap="Python memory-mapped file support"
-RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io"
-FILES_${PN}-mmap="${libdir}/python3.5/lib-dynload/mmap.*.so ${libdir}/python3.5/lib-dynload/__pycache__/mmap.*.so "
-
-SUMMARY_${PN}-multiprocessing="Python multiprocessing support"
-RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap"
-FILES_${PN}-multiprocessing="${libdir}/python3.5/lib-dynload/_multiprocessing.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_multiprocessing.*.so ${libdir}/python3.5/multiprocessing ${libdir}/python3.5/multiprocessing/__pycache__ "
-
-SUMMARY_${PN}-netclient="Python Internet Protocol clients"
-RDEPENDS_${PN}-netclient="${PN}-argparse ${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime ${PN}-html"
-FILES_${PN}-netclient="${libdir}/python3.5/*Cookie*.* ${libdir}/python3.5/__pycache__/*Cookie*.* ${libdir}/python3.5/base64.* ${libdir}/python3.5/__pycache__/base64.* ${libdir}/python3.5/cookielib.* ${libdir}/python3.5/__pycache__/cookielib.* ${libdir}/python3.5/ftplib.* ${libdir}/python3.5/__pycache__/ftplib.* ${libdir}/python3.5/gopherlib.* ${libdir}/python3.5/__pycache__/gopherlib.* ${libdir}/python3.5/hmac.* ${libdir}/python3.5/__pycache__/hmac.* ${libdir}/python3.5/http* ${libdir}/python3.5/http*/__pycache__ ${libdir}/python3.5/httplib.* ${libdir}/python3.5/__pycache__/httplib.* ${libdir}/python3.5/mimetypes.* ${libdir}/python3.5/__pycache__/mimetypes.* ${libdir}/python3.5/nntplib.* ${libdir}/python3.5/__pycache__/nntplib.* ${libdir}/python3.5/poplib.* ${libdir}/python3.5/__pycache__/poplib.* ${libdir}/python3.5/smtplib.* ${libdir}/python3.5/__pycache__/smtplib.* ${libdir}/python3.5/telnetlib.* ${libdir}/python3.5/__pycache__/telnetlib.* ${libdir}/python3.5/urllib ${libdir}/python3.5/urllib/__pycache__ ${libdir}/python3.5/uuid.* ${libdir}/python3.5/__pycache__/uuid.* ${libdir}/python3.5/rfc822.* ${libdir}/python3.5/__pycache__/rfc822.* ${libdir}/python3.5/mimetools.* ${libdir}/python3.5/__pycache__/mimetools.* "
-
-SUMMARY_${PN}-netserver="Python Internet Protocol servers"
-RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading"
-FILES_${PN}-netserver="${libdir}/python3.5/cgi.* ${libdir}/python3.5/__pycache__/cgi.* ${libdir}/python3.5/socketserver.* ${libdir}/python3.5/__pycache__/socketserver.* ${libdir}/python3.5/*HTTPServer.* ${libdir}/python3.5/__pycache__/*HTTPServer.* ${libdir}/python3.5/SocketServer.* ${libdir}/python3.5/__pycache__/SocketServer.* "
-
-SUMMARY_${PN}-numbers="Python number APIs"
-RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re"
-FILES_${PN}-numbers="${libdir}/python3.5/decimal.* ${libdir}/python3.5/__pycache__/decimal.* ${libdir}/python3.5/fractions.* ${libdir}/python3.5/__pycache__/fractions.* ${libdir}/python3.5/numbers.* ${libdir}/python3.5/__pycache__/numbers.* "
-
-SUMMARY_${PN}-pickle="Python serialisation/persistence support"
-RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re"
-FILES_${PN}-pickle="${libdir}/python3.5/_compat_pickle.* ${libdir}/python3.5/__pycache__/_compat_pickle.* ${libdir}/python3.5/pickle.* ${libdir}/python3.5/__pycache__/pickle.* ${libdir}/python3.5/shelve.* ${libdir}/python3.5/__pycache__/shelve.* ${libdir}/python3.5/lib-dynload/cPickle.*.so ${libdir}/python3.5/lib-dynload/__pycache__/cPickle.*.so ${libdir}/python3.5/pickletools.* ${libdir}/python3.5/__pycache__/pickletools.* "
-
-SUMMARY_${PN}-pkgutil="Python package extension utility support"
-RDEPENDS_${PN}-pkgutil="${PN}-core"
-FILES_${PN}-pkgutil="${libdir}/python3.5/pkgutil.* ${libdir}/python3.5/__pycache__/pkgutil.* "
-
-SUMMARY_${PN}-pprint="Python pretty-print support"
-RDEPENDS_${PN}-pprint="${PN}-core ${PN}-io"
-FILES_${PN}-pprint="${libdir}/python3.5/pprint.* ${libdir}/python3.5/__pycache__/pprint.* "
-
-SUMMARY_${PN}-profile="Python basic performance profiling support"
-RDEPENDS_${PN}-profile="${PN}-core ${PN}-textutils"
-FILES_${PN}-profile="${libdir}/python3.5/profile.* ${libdir}/python3.5/__pycache__/profile.* ${libdir}/python3.5/pstats.* ${libdir}/python3.5/__pycache__/pstats.* ${libdir}/python3.5/cProfile.* ${libdir}/python3.5/__pycache__/cProfile.* ${libdir}/python3.5/lib-dynload/_lsprof.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_lsprof.*.so "
-
-SUMMARY_${PN}-pydoc="Python interactive help support"
-RDEPENDS_${PN}-pydoc="${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re"
-FILES_${PN}-pydoc="${bindir}/pydoc ${libdir}/python3.5/pydoc.* ${libdir}/python3.5/__pycache__/pydoc.* ${libdir}/python3.5/pydoc_data ${libdir}/python3.5/pydoc_data/__pycache__ "
-
-SUMMARY_${PN}-re="Python Regular Expression APIs"
-RDEPENDS_${PN}-re="${PN}-core"
-FILES_${PN}-re="${libdir}/python3.5/re.* ${libdir}/python3.5/__pycache__/re.* ${libdir}/python3.5/sre.* ${libdir}/python3.5/__pycache__/sre.* ${libdir}/python3.5/sre_compile.* ${libdir}/python3.5/__pycache__/sre_compile.* ${libdir}/python3.5/sre_constants* ${libdir}/python3.5/sre_constants*/__pycache__ ${libdir}/python3.5/sre_parse.* ${libdir}/python3.5/__pycache__/sre_parse.* "
-
-SUMMARY_${PN}-readline="Python readline support"
-RDEPENDS_${PN}-readline="${PN}-core"
-FILES_${PN}-readline="${libdir}/python3.5/lib-dynload/readline.*.so ${libdir}/python3.5/lib-dynload/__pycache__/readline.*.so ${libdir}/python3.5/rlcompleter.* ${libdir}/python3.5/__pycache__/rlcompleter.* "
-
-SUMMARY_${PN}-reprlib="Python alternate repr() implementation"
-RDEPENDS_${PN}-reprlib="${PN}-core"
-FILES_${PN}-reprlib="${libdir}/python3.5/reprlib.py ${libdir}/python3.5/__pycache__/reprlib.py "
-
-SUMMARY_${PN}-resource="Python resource control interface"
-RDEPENDS_${PN}-resource="${PN}-core"
-FILES_${PN}-resource="${libdir}/python3.5/lib-dynload/resource.*.so ${libdir}/python3.5/lib-dynload/__pycache__/resource.*.so "
-
-SUMMARY_${PN}-selectors="Python High-level I/O multiplexing"
-RDEPENDS_${PN}-selectors="${PN}-core"
-FILES_${PN}-selectors="${libdir}/python3.5/selectors.* ${libdir}/python3.5/__pycache__/selectors.* "
-
-SUMMARY_${PN}-shell="Python shell-like functionality"
-RDEPENDS_${PN}-shell="${PN}-core ${PN}-re ${PN}-compression"
-FILES_${PN}-shell="${libdir}/python3.5/cmd.* ${libdir}/python3.5/__pycache__/cmd.* ${libdir}/python3.5/commands.* ${libdir}/python3.5/__pycache__/commands.* ${libdir}/python3.5/dircache.* ${libdir}/python3.5/__pycache__/dircache.* ${libdir}/python3.5/fnmatch.* ${libdir}/python3.5/__pycache__/fnmatch.* ${libdir}/python3.5/glob.* ${libdir}/python3.5/__pycache__/glob.* ${libdir}/python3.5/popen2.* ${libdir}/python3.5/__pycache__/popen2.* ${libdir}/python3.5/shlex.* ${libdir}/python3.5/__pycache__/shlex.* ${libdir}/python3.5/shutil.* ${libdir}/python3.5/__pycache__/shutil.* "
-
-SUMMARY_${PN}-signal="Python set handlers for asynchronous events support"
-RDEPENDS_${PN}-signal="${PN}-core ${PN}-enum"
-FILES_${PN}-signal="${libdir}/python3.5/signal.* ${libdir}/python3.5/__pycache__/signal.* "
-
-SUMMARY_${PN}-smtpd="Python Simple Mail Transport Daemon"
-RDEPENDS_${PN}-smtpd="${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime"
-FILES_${PN}-smtpd="${bindir}/smtpd.* ${libdir}/python3.5/smtpd.* ${libdir}/python3.5/__pycache__/smtpd.* "
-
-SUMMARY_${PN}-sqlite3="Python Sqlite3 database support"
-RDEPENDS_${PN}-sqlite3="${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading"
-FILES_${PN}-sqlite3="${libdir}/python3.5/lib-dynload/_sqlite3.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_sqlite3.*.so ${libdir}/python3.5/sqlite3/dbapi2.* ${libdir}/python3.5/sqlite3/__pycache__/dbapi2.* ${libdir}/python3.5/sqlite3/__init__.* ${libdir}/python3.5/sqlite3/__pycache__/__init__.* ${libdir}/python3.5/sqlite3/dump.* ${libdir}/python3.5/sqlite3/__pycache__/dump.* "
-
-SUMMARY_${PN}-sqlite3-tests="Python Sqlite3 database support tests"
-RDEPENDS_${PN}-sqlite3-tests="${PN}-core ${PN}-sqlite3"
-FILES_${PN}-sqlite3-tests="${libdir}/python3.5/sqlite3/test ${libdir}/python3.5/sqlite3/test/__pycache__ "
-
-SUMMARY_${PN}-stringold="Python string APIs [deprecated]"
-RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re"
-FILES_${PN}-stringold="${libdir}/python3.5/lib-dynload/strop.*.so ${libdir}/python3.5/lib-dynload/__pycache__/strop.*.so ${libdir}/python3.5/string.* ${libdir}/python3.5/__pycache__/string.* ${libdir}/python3.5/stringold.* ${libdir}/python3.5/__pycache__/stringold.* "
-
-SUMMARY_${PN}-subprocess="Python subprocess support"
-RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle ${PN}-threading ${PN}-signal ${PN}-selectors"
-FILES_${PN}-subprocess="${libdir}/python3.5/subprocess.* ${libdir}/python3.5/__pycache__/subprocess.* ${libdir}/python3.5/lib-dynload/_posixsubprocess.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_posixsubprocess.*.so "
-
-SUMMARY_${PN}-syslog="Python syslog interface"
-RDEPENDS_${PN}-syslog="${PN}-core"
-FILES_${PN}-syslog="${libdir}/python3.5/lib-dynload/syslog.*.so ${libdir}/python3.5/lib-dynload/__pycache__/syslog.*.so "
-
-SUMMARY_${PN}-terminal="Python terminal controlling support"
-RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io"
-FILES_${PN}-terminal="${libdir}/python3.5/pty.* ${libdir}/python3.5/__pycache__/pty.* ${libdir}/python3.5/tty.* ${libdir}/python3.5/__pycache__/tty.* "
-
-SUMMARY_${PN}-tests="Python tests"
-RDEPENDS_${PN}-tests="${PN}-core ${PN}-compression"
-FILES_${PN}-tests="${libdir}/python3.5/test ${libdir}/python3.5/test/__pycache__ "
-
-SUMMARY_${PN}-textutils="Python option parsing, text wrapping and CSV support"
-RDEPENDS_${PN}-textutils="${PN}-core ${PN}-io ${PN}-re ${PN}-stringold"
-FILES_${PN}-textutils="${libdir}/python3.5/lib-dynload/_csv.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_csv.*.so ${libdir}/python3.5/csv.* ${libdir}/python3.5/__pycache__/csv.* ${libdir}/python3.5/optparse.* ${libdir}/python3.5/__pycache__/optparse.* ${libdir}/python3.5/textwrap.* ${libdir}/python3.5/__pycache__/textwrap.* "
-
-SUMMARY_${PN}-threading="Python threading & synchronization support"
-RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang"
-FILES_${PN}-threading="${libdir}/python3.5/_threading_local.* ${libdir}/python3.5/__pycache__/_threading_local.* ${libdir}/python3.5/dummy_thread.* ${libdir}/python3.5/__pycache__/dummy_thread.* ${libdir}/python3.5/dummy_threading.* ${libdir}/python3.5/__pycache__/dummy_threading.* ${libdir}/python3.5/mutex.* ${libdir}/python3.5/__pycache__/mutex.* ${libdir}/python3.5/threading.* ${libdir}/python3.5/__pycache__/threading.* ${libdir}/python3.5/queue.* ${libdir}/python3.5/__pycache__/queue.* "
-
-SUMMARY_${PN}-tkinter="Python Tcl/Tk bindings"
-RDEPENDS_${PN}-tkinter="${PN}-core"
-FILES_${PN}-tkinter="${libdir}/python3.5/lib-dynload/_tkinter.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_tkinter.*.so ${libdir}/python3.5/lib-tk ${libdir}/python3.5/lib-tk/__pycache__ ${libdir}/python3.5/tkinter ${libdir}/python3.5/tkinter/__pycache__ "
-
-SUMMARY_${PN}-typing="Python typing support"
-RDEPENDS_${PN}-typing="${PN}-core"
-FILES_${PN}-typing="${libdir}/python3.5/typing.* ${libdir}/python3.5/__pycache__/typing.* "
-
-SUMMARY_${PN}-unittest="Python unit testing framework"
-RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell"
-FILES_${PN}-unittest="${libdir}/python3.5/unittest/ ${libdir}/python3.5/unittest/__pycache__ "
-
-SUMMARY_${PN}-unixadmin="Python Unix administration support"
-RDEPENDS_${PN}-unixadmin="${PN}-core"
-FILES_${PN}-unixadmin="${libdir}/python3.5/lib-dynload/nis.*.so ${libdir}/python3.5/lib-dynload/__pycache__/nis.*.so ${libdir}/python3.5/lib-dynload/grp.*.so ${libdir}/python3.5/lib-dynload/__pycache__/grp.*.so ${libdir}/python3.5/lib-dynload/pwd.*.so ${libdir}/python3.5/lib-dynload/__pycache__/pwd.*.so ${libdir}/python3.5/getpass.* ${libdir}/python3.5/__pycache__/getpass.* "
-
-SUMMARY_${PN}-xml="Python basic XML support"
-RDEPENDS_${PN}-xml="${PN}-core ${PN}-re"
-FILES_${PN}-xml="${libdir}/python3.5/lib-dynload/_elementtree.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_elementtree.*.so ${libdir}/python3.5/lib-dynload/pyexpat.*.so ${libdir}/python3.5/lib-dynload/__pycache__/pyexpat.*.so ${libdir}/python3.5/xml ${libdir}/python3.5/xml/__pycache__ ${libdir}/python3.5/xmllib.* ${libdir}/python3.5/__pycache__/xmllib.* "
-
-SUMMARY_${PN}-xmlrpc="Python XML-RPC support"
-RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang ${PN}-pydoc"
-FILES_${PN}-xmlrpc="${libdir}/python3.5/xmlrpclib.* ${libdir}/python3.5/__pycache__/xmlrpclib.* ${libdir}/python3.5/SimpleXMLRPCServer.* ${libdir}/python3.5/__pycache__/SimpleXMLRPCServer.* ${libdir}/python3.5/DocXMLRPCServer.* ${libdir}/python3.5/__pycache__/DocXMLRPCServer.* ${libdir}/python3.5/xmlrpc ${libdir}/python3.5/xmlrpc/__pycache__ "
-
-SUMMARY_${PN}-modules="All Python modules"
-RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-typing ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
-ALLOW_EMPTY_${PN}-modules = "1"
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-async.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-async.inc
index 2c5cb4d..6664ab0 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-async.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-async.inc
@@ -4,12 +4,11 @@
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e"
-SRC_URI = "https://files.pythonhosted.org/packages/source/a/async/async-${PV}.tar.gz"
+inherit pypi
+
SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b"
SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/async/"
-
-S = "${WORKDIR}/async-${PV}"
+RDEPENDS_${PN} += "${PYTHON_PN}-threading"
BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc
index 777608c..8d37693 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc
@@ -8,14 +8,25 @@
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=8b8d26c37c1d5a04f9b0186edbebc183"
-SRC_URI = "https://files.pythonhosted.org/packages/source/G/GitPython/GitPython-${PV}.tar.gz"
+PYPI_PACKAGE = "GitPython"
-SRC_URI[md5sum] = "df94212b19d270a625b67b4c84ac9a41"
-SRC_URI[sha256sum] = "5c00cbd256e2b1d039381d4f7d71fcb7ee5cc196ca10c101ff7191bd82ab5d9c"
+inherit pypi
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/GitPython/"
-UPSTREAM_CHECK_REGEX = "/GitPython/(?P<pver>(\d+[\.\-_]*)+)"
+SRC_URI[md5sum] = "7a94ee1b923fb772a2a0c6649430a17c"
+SRC_URI[sha256sum] = "ad61bc25deadb535b047684d06f3654c001d9415e1971e51c9c20f5b510076e9"
-S = "${WORKDIR}/GitPython-${PV}"
+DEPENDS = "${PYTHON_PN}-gitdb"
+RDEPENDS_${PN} += " \
+ ${PYTHON_PN}-datetime \
+ ${PYTHON_PN}-gitdb \
+ ${PYTHON_PN}-io \
+ ${PYTHON_PN}-logging \
+ ${PYTHON_PN}-math \
+ ${PYTHON_PN}-netclient \
+ ${PYTHON_PN}-stringold \
+ ${PYTHON_PN}-unittest \
+ ${PYTHON_PN}-unixadmin \
+ git \
+"
BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb.inc
index 08193fb..2d5292e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb.inc
@@ -4,13 +4,21 @@
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=59e5ecb13339a936eedf83282eaf4528"
-SRC_URI = "https://files.pythonhosted.org/packages/source/g/gitdb/gitdb-${PV}.tar.gz"
+inherit pypi
-SRC_URI[md5sum] = "44e4366b8bdfd306b075c3a52c96ae1a"
-SRC_URI[sha256sum] = "a3ebbc27be035a2e874ed904df516e35f4a29a778a764385de09de9e0f139658"
+PYPI_PACKAGE = "gitdb2"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/gitdb/"
+SRC_URI[md5sum] = "d5217eb94ebd36fcec62b929d1f72b00"
+SRC_URI[sha256sum] = "b60e29d4533e5e25bb50b7678bbc187c8f6bcff1344b4f293b2ba55c85795f09"
-S = "${WORKDIR}/gitdb-${PV}"
+DEPENDS = "${PYTHON_PN}-async ${PYTHON_PN}-setuptools-native ${PYTHON_PN}-smmap"
+RDEPENDS_${PN} += "${PYTHON_PN}-async \
+ ${PYTHON_PN}-compression \
+ ${PYTHON_PN}-crypt \
+ ${PYTHON_PN}-io \
+ ${PYTHON_PN}-mmap \
+ ${PYTHON_PN}-shell \
+ ${PYTHON_PN}-smmap \
+"
BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc
index 1c83af6..e265bde 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc
@@ -4,13 +4,18 @@
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1bb21fa2d2f7a534c884b990430a6863"
-SRC_URI = "https://files.pythonhosted.org/packages/source/M/Mako/Mako-${PV}.tar.gz"
+PYPI_PACKAGE = "Mako"
+
+inherit pypi
SRC_URI[md5sum] = "5836cc997b1b773ef389bf6629c30e65"
SRC_URI[sha256sum] = "4e02fde57bd4abb5ec400181e4c314f56ac3e49ba4fb8b0d50bba18cb27d25ae"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/mako/"
-UPSTREAM_CHECK_REGEX = "/Mako/(?P<pver>(\d+[\.\-_]*)+)"
+RDEPENDS_${PN} = "${PYTHON_PN}-html \
+ ${PYTHON_PN}-netclient \
+ ${PYTHON_PN}-threading \
+"
-S = "${WORKDIR}/Mako-${PV}"
+RDEPENDS_${PN}_class-native = ""
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-2.7-manifest.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-2.7-manifest.inc
deleted file mode 100644
index b05aae0..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-2.7-manifest.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '../scripts/contrib/python/generate-manifest-2.7.py --native' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-
-
-
-RPROVIDES += "python-modules-native python-2to3-native python-argparse-native python-audio-native python-bsddb-native python-codecs-native python-compile-native python-compiler-native python-compression-native python-contextlib-native python-core-native python-crypt-native python-ctypes-native python-curses-native python-datetime-native python-db-native python-debugger-native python-dev-native python-difflib-native python-distutils-native python-distutils-staticdev-native python-doctest-native python-email-native python-fcntl-native python-gdbm-native python-hotshot-native python-html-native python-idle-native python-image-native python-importlib-native python-io-native python-json-native python-lang-native python-logging-native python-mailbox-native python-math-native python-mime-native python-mmap-native python-multiprocessing-native python-netclient-native python-netserver-native python-numbers-native python-pickle-native python-pkgutil-native python-plistlib-native python-pprint-native python-profile-native python-pydoc-native python-re-native python-readline-native python-resource-native python-robotparser-native python-shell-native python-smtpd-native python-sqlite3-native python-sqlite3-tests-native python-stringold-native python-subprocess-native python-syslog-native python-terminal-native python-tests-native python-textutils-native python-threading-native python-tkinter-native python-unittest-native python-unixadmin-native python-xml-native python-xmlrpc-native python-zlib-native"
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-3.5-manifest.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-3.5-manifest.inc
deleted file mode 100644
index f1f732e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-3.5-manifest.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '../scripts/contrib/python/generate-manifest-3.5.py --native' Version 20140131 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-
-
-
-RPROVIDES += "python3-modules-native python3-2to3-native python3-argparse-native python3-asyncio-native python3-audio-native python3-codecs-native python3-compile-native python3-compression-native python3-core-native python3-crypt-native python3-ctypes-native python3-curses-native python3-datetime-native python3-db-native python3-debugger-native python3-dev-native python3-difflib-native python3-distutils-native python3-distutils-staticdev-native python3-doctest-native python3-email-native python3-enum-native python3-fcntl-native python3-gdbm-native python3-html-native python3-idle-native python3-image-native python3-importlib-native python3-io-native python3-json-native python3-lang-native python3-logging-native python3-mailbox-native python3-math-native python3-mime-native python3-mmap-native python3-multiprocessing-native python3-netclient-native python3-netserver-native python3-numbers-native python3-pickle-native python3-pkgutil-native python3-pprint-native python3-profile-native python3-pydoc-native python3-re-native python3-readline-native python3-reprlib-native python3-resource-native python3-selectors-native python3-shell-native python3-signal-native python3-smtpd-native python3-sqlite3-native python3-sqlite3-tests-native python3-stringold-native python3-subprocess-native python3-syslog-native python3-terminal-native python3-tests-native python3-textutils-native python3-threading-native python3-tkinter-native python3-typing-native python3-unittest-native python3-unixadmin-native python3-xml-native python3-xmlrpc-native"
-
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/multilib.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/multilib.patch
index ad46085..af0f173 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/multilib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/multilib.patch
@@ -12,10 +12,10 @@
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-Index: Python-2.7.13/Include/pythonrun.h
+Index: Python-2.7.14/Include/pythonrun.h
===================================================================
---- Python-2.7.13.orig/Include/pythonrun.h
-+++ Python-2.7.13/Include/pythonrun.h
+--- Python-2.7.14.orig/Include/pythonrun.h
++++ Python-2.7.14/Include/pythonrun.h
@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
/* In their own files */
PyAPI_FUNC(const char *) Py_GetVersion(void);
@@ -24,10 +24,10 @@
PyAPI_FUNC(const char *) Py_GetCopyright(void);
PyAPI_FUNC(const char *) Py_GetCompiler(void);
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-Index: Python-2.7.13/Lib/distutils/command/install.py
+Index: Python-2.7.14/Lib/distutils/command/install.py
===================================================================
---- Python-2.7.13.orig/Lib/distutils/command/install.py
-+++ Python-2.7.13/Lib/distutils/command/install.py
+--- Python-2.7.14.orig/Lib/distutils/command/install.py
++++ Python-2.7.14/Lib/distutils/command/install.py
@@ -22,6 +22,8 @@ from site import USER_BASE
from site import USER_SITE
@@ -46,10 +46,10 @@
'headers': '$base/include/python$py_version_short/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-Index: Python-2.7.13/Lib/pydoc.py
+Index: Python-2.7.14/Lib/pydoc.py
===================================================================
---- Python-2.7.13.orig/Lib/pydoc.py
-+++ Python-2.7.13/Lib/pydoc.py
+--- Python-2.7.14.orig/Lib/pydoc.py
++++ Python-2.7.14/Lib/pydoc.py
@@ -375,7 +375,7 @@ class Doc:
docmodule = docclass = docroutine = docother = docproperty = docdata = fail
@@ -59,10 +59,10 @@
"python"+sys.version[0:3])):
"""Return the location of module docs or None"""
-Index: Python-2.7.13/Lib/site.py
+Index: Python-2.7.14/Lib/site.py
===================================================================
---- Python-2.7.13.orig/Lib/site.py
-+++ Python-2.7.13/Lib/site.py
+--- Python-2.7.14.orig/Lib/site.py
++++ Python-2.7.14/Lib/site.py
@@ -288,13 +288,19 @@ def getsitepackages():
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
@@ -86,10 +86,10 @@
return sitepackages
def addsitepackages(known_paths):
-Index: Python-2.7.13/Lib/test/test_dl.py
+Index: Python-2.7.14/Lib/test/test_dl.py
===================================================================
---- Python-2.7.13.orig/Lib/test/test_dl.py
-+++ Python-2.7.13/Lib/test/test_dl.py
+--- Python-2.7.14.orig/Lib/test/test_dl.py
++++ Python-2.7.14/Lib/test/test_dl.py
@@ -4,10 +4,11 @@
import unittest
from test.test_support import verbose, import_module
@@ -104,10 +104,10 @@
('/usr/bin/cygwin1.dll', 'getpid'),
('/usr/lib/libc.dylib', 'getpid'),
]
-Index: Python-2.7.13/Lib/trace.py
+Index: Python-2.7.14/Lib/trace.py
===================================================================
---- Python-2.7.13.orig/Lib/trace.py
-+++ Python-2.7.13/Lib/trace.py
+--- Python-2.7.14.orig/Lib/trace.py
++++ Python-2.7.14/Lib/trace.py
@@ -754,10 +754,10 @@ def main(argv=None):
# should I also call expanduser? (after all, could use $HOME)
@@ -121,11 +121,11 @@
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
-Index: Python-2.7.13/Makefile.pre.in
+Index: Python-2.7.14/Makefile.pre.in
===================================================================
---- Python-2.7.13.orig/Makefile.pre.in
-+++ Python-2.7.13/Makefile.pre.in
-@@ -92,6 +92,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
+--- Python-2.7.14.orig/Makefile.pre.in
++++ Python-2.7.14/Makefile.pre.in
+@@ -91,6 +91,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
@@ -133,7 +133,7 @@
# Multiarch directory (may be empty)
MULTIARCH= @MULTIARCH@
-@@ -111,7 +112,7 @@ LIBDIR= @libdir@
+@@ -110,7 +111,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
@@ -142,7 +142,7 @@
# Detailed destination directories
BINLIBDEST= $(LIBDIR)/python$(VERSION)
-@@ -668,6 +669,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
+@@ -644,6 +645,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
@@ -150,8 +150,8 @@
-o $@ $(srcdir)/Modules/getpath.c
Modules/python.o: $(srcdir)/Modules/python.c
-@@ -708,7 +710,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
- Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
+@@ -692,7 +694,7 @@ regen-ast:
+ Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
Python/getplatform.o: $(srcdir)/Python/getplatform.c
- $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
@@ -159,10 +159,10 @@
Python/importdl.o: $(srcdir)/Python/importdl.c
$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-2.7.13/Modules/getpath.c
+Index: Python-2.7.14/Modules/getpath.c
===================================================================
---- Python-2.7.13.orig/Modules/getpath.c
-+++ Python-2.7.13/Modules/getpath.c
+--- Python-2.7.14.orig/Modules/getpath.c
++++ Python-2.7.14/Modules/getpath.c
@@ -100,6 +100,13 @@
#error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
#endif
@@ -186,10 +186,10 @@
static void
reduce(char *dir)
-Index: Python-2.7.13/Python/getplatform.c
+Index: Python-2.7.14/Python/getplatform.c
===================================================================
---- Python-2.7.13.orig/Python/getplatform.c
-+++ Python-2.7.13/Python/getplatform.c
+--- Python-2.7.14.orig/Python/getplatform.c
++++ Python-2.7.14/Python/getplatform.c
@@ -10,3 +10,13 @@ Py_GetPlatform(void)
{
return PLATFORM;
@@ -204,10 +204,10 @@
+{
+ return LIB;
+}
-Index: Python-2.7.13/Python/sysmodule.c
+Index: Python-2.7.14/Python/sysmodule.c
===================================================================
---- Python-2.7.13.orig/Python/sysmodule.c
-+++ Python-2.7.13/Python/sysmodule.c
+--- Python-2.7.14.orig/Python/sysmodule.c
++++ Python-2.7.14/Python/sysmodule.c
@@ -1437,6 +1437,8 @@ _PySys_Init(void)
PyString_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
@@ -217,11 +217,11 @@
SET_SYS_FROM_STRING("executable",
PyString_FromString(Py_GetProgramFullPath()));
SET_SYS_FROM_STRING("prefix",
-Index: Python-2.7.13/configure.ac
+Index: Python-2.7.14/configure.ac
===================================================================
---- Python-2.7.13.orig/configure.ac
-+++ Python-2.7.13/configure.ac
-@@ -759,6 +759,11 @@ SunOS*)
+--- Python-2.7.14.orig/configure.ac
++++ Python-2.7.14/configure.ac
+@@ -758,6 +758,11 @@ SunOS*)
;;
esac
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.13.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.13.bb
deleted file mode 100644
index 7edf153..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.13.bb
+++ /dev/null
@@ -1,61 +0,0 @@
-require python.inc
-
-EXTRANATIVEPATH += "bzip2-native"
-DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native"
-PR = "${INC_PR}.1"
-
-SRC_URI += "\
- file://05-enable-ctypes-cross-build.patch \
- 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://parallel-makeinst-create-bindir.patch \
- file://revert_use_of_sysconfigdata.patch \
- "
-
-S = "${WORKDIR}/Python-${PV}"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
-
-inherit native
-
-require python-native-${PYTHON_MAJMIN}-manifest.inc
-
-EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}"
-
-EXTRA_OEMAKE = '\
- LIBC="" \
- STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
- STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
-'
-
-do_configure_append() {
- autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-do_install() {
- oe_runmake 'DESTDIR=${D}' install
- install -d ${D}${bindir}/${PN}
- install -m 0755 Parser/pgen ${D}${bindir}/${PN}
-
- # Make sure we use /usr/bin/env python
- for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
- sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
- done
-
- # Add a symlink to the native Python so that scripts can just invoke
- # "nativepython" and get the right one without needing absolute paths
- # (these often end up too long for the #! parser in the kernel as the
- # buffer is 128 bytes long).
- ln -s python-native/python ${D}${bindir}/nativepython
-
- # We don't want modules in ~/.local being used in preference to those
- # installed in the native sysroot, so disable user site support.
- sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.14.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.14.bb
new file mode 100644
index 0000000..7c491fa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.14.bb
@@ -0,0 +1,85 @@
+require python.inc
+EXTRANATIVEPATH += "bzip2-native"
+DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native gdbm-native db-native"
+PR = "${INC_PR}.1"
+
+SRC_URI += "\
+ file://05-enable-ctypes-cross-build.patch \
+ 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://parallel-makeinst-create-bindir.patch \
+ file://revert_use_of_sysconfigdata.patch \
+ "
+
+S = "${WORKDIR}/Python-${PV}"
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
+
+inherit native
+
+EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}"
+
+EXTRA_OEMAKE = '\
+ LIBC="" \
+ STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
+ STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
+'
+
+do_configure_append() {
+ autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+}
+
+# Regenerate all of the generated files
+# This ensures that pgen and friends get created during the compile phase
+do_compile_prepend() {
+ oe_runmake regen-all
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+ install -d ${D}${bindir}/${PN}
+ install -m 0755 Parser/pgen ${D}${bindir}/${PN}
+
+ # Make sure we use /usr/bin/env python
+ for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
+ sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
+ done
+
+ # Add a symlink to the native Python so that scripts can just invoke
+ # "nativepython" and get the right one without needing absolute paths
+ # (these often end up too long for the #! parser in the kernel as the
+ # buffer is 128 bytes long).
+ ln -s python-native/python ${D}${bindir}/nativepython
+
+ # We don't want modules in ~/.local being used in preference to those
+ # installed in the native sysroot, so disable user site support.
+ sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
+}
+
+python(){
+
+ # Read JSON manifest
+ import json
+ pythondir = d.getVar('THISDIR',True)
+ with open(pythondir+'/python/python2-manifest.json') as manifest_file:
+ python_manifest=json.load(manifest_file)
+
+ rprovides = d.getVar('RPROVIDES').split()
+
+ # Hardcoded since it cant be python-native-foo, should be python-foo-native
+ pn = 'python'
+
+ for key in python_manifest:
+ pypackage = pn + '-' + key + '-native'
+ if pypackage not in rprovides:
+ rprovides.append(pypackage)
+
+ d.setVar('RPROVIDES', ' '.join(rprovides))
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose.inc
new file mode 100644
index 0000000..ccec68a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose.inc
@@ -0,0 +1,18 @@
+SUMMARY = "Extends Python unittest to make testing easier"
+HOMEPAGE = "http://readthedocs.org/docs/nose/"
+DESCRIPTION = "nose extends the test loading and running features of unittest, \
+making it easier to write, find and run tests."
+SECTION = "devel/python"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
+
+SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
+SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
+
+inherit pypi
+
+RDEPENDS_${PN} = "\
+ ${PYTHON_PN}-unittest \
+ "
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
index 9b3509c..6d69d2d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
@@ -1,25 +1,2 @@
-SUMMARY = "Extends Python unittest to make testing easier"
-HOMEPAGE = "http://readthedocs.org/docs/nose/"
-DESCRIPTION = "nose extends the test loading and running features of unittest, \
-making it easier to write, find and run tests."
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/n/nose/nose-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
-SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/nose/"
-UPSTREAM_CHECK_REGEX = "/nose/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/nose-${PV}"
-
inherit setuptools
-
-RDEPENDS_${PN} = "\
- python-unittest \
- "
-
-BBCLASSEXTEND = "native nativesdk"
+require python-nose.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_2.5.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_3.0.1.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_2.5.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_3.0.1.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_2.5.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_2.5.1.bb
deleted file mode 100644
index 3f43856..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_2.5.1.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Software Construction tool (make/autotools replacement)"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3a885dff6d14e4cd876d9008a09a42de"
-SRCNAME = "scons"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "3eac81e5e8206304a9b4683c57665aa4"
-SRC_URI[sha256sum] = "c8de85fc02ed1a687b1f2ac791eaa0c1707b4382a204f17d782b5b111b9fdf07"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/SCons/"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "\
- python-fcntl \
- python-io \
- python-json \
- python-subprocess \
- "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_3.0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_3.0.1.bb
new file mode 100644
index 0000000..d5084b2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_3.0.1.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Software Construction tool (make/autotools replacement)"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=46ddf66004e5be5566367cb525a66fc6"
+
+SRC_URI[md5sum] = "b6a292e251b34b82c203b56cfa3968b3"
+SRC_URI[sha256sum] = "24475e38d39c19683bc88054524df018fe6949d70fbd4c69e298d39a0269f173"
+
+UPSTREAM_CHECK_URI = "http://scons.org/pages/download.html"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit pypi setuptools
+
+RDEPENDS_${PN} = "\
+ python-fcntl \
+ python-io \
+ python-json \
+ python-subprocess \
+ python-shell \
+ python-pprint \
+ "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc
index ca521a9..74706bf 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc
@@ -5,17 +5,44 @@
LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=19;md5=9a33897f1bca1160d7aad3835152e158"
-SRCNAME = "setuptools"
+PYPI_PACKAGE_EXT = "zip"
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.zip"
+inherit pypi
-SRC_URI[md5sum] = "b9e6c049617bac0f9e908a41ab4a29ac"
-SRC_URI[sha256sum] = "b0fe5d432d922df595e918577c51458d63f245115d141b309ac32ecfca329df5"
+SRC_URI[md5sum] = "379642a4f17214071fdc1894255d8d11"
+SRC_URI[sha256sum] = "94dc566247f35009ed42c0f4422f2b4f0a032fab1372c8308b864c8f26d93388"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/setuptools"
+DEPENDS += "${PYTHON_PN}"
+DEPENDS_class-native += "${PYTHON_PN}-native"
+DEPENDS_class-nativesdk += "nativesdk-${PYTHON_PN}"
-S = "${WORKDIR}/${SRCNAME}-${PV}"
+DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR} \
+ --script-dir=${bindir}"
+
+RDEPENDS_${PN}_class-native = "\
+ ${PYTHON_PN}-distutils \
+ ${PYTHON_PN}-compression \
+"
+RDEPENDS_${PN} = "\
+ ${PYTHON_PN}-compile \
+ ${PYTHON_PN}-compression \
+ ${PYTHON_PN}-ctypes \
+ ${PYTHON_PN}-distutils \
+ ${PYTHON_PN}-email \
+ ${PYTHON_PN}-html \
+ ${PYTHON_PN}-netserver \
+ ${PYTHON_PN}-numbers \
+ ${PYTHON_PN}-pkgutil \
+ ${PYTHON_PN}-plistlib \
+ ${PYTHON_PN}-shell \
+ ${PYTHON_PN}-stringold \
+ ${PYTHON_PN}-threading \
+ ${PYTHON_PN}-unittest \
+ ${PYTHON_PN}-xml \
+"
do_install_prepend() {
install -d ${D}${PYTHON_SITEPACKAGES_DIR}
}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_36.2.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_36.2.7.bb
deleted file mode 100644
index 0efacc1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_36.2.7.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-require python-setuptools.inc
-
-PROVIDES = "python-distribute"
-
-DEPENDS += "python"
-DEPENDS_class-native += "python-native"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "\
- python-stringold \
- python-email \
- python-shell \
- python-distutils \
- python-compression \
- python-pkgutil \
- python-plistlib \
- python-numbers \
- python-html \
- python-netserver \
- python-ctypes \
- python-subprocess \
- python-unittest \
- python-compile \
-"
-
-RDEPENDS_${PN}_class-native = "\
- python-distutils \
- python-compression \
-"
-
-RREPLACES_${PN} = "python-distribute"
-RPROVIDES_${PN} = "python-distribute"
-RCONFLICTS_${PN} = "python-distribute"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_39.0.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_39.0.0.bb
new file mode 100644
index 0000000..cf94404
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_39.0.0.bb
@@ -0,0 +1,9 @@
+require python-setuptools.inc
+
+PROVIDES = "python-distribute"
+
+inherit setuptools
+
+RREPLACES_${PN} = "python-distribute"
+RPROVIDES_${PN} = "python-distribute"
+RCONFLICTS_${PN} = "python-distribute"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-six.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-six.inc
index bd12fa9..c774984 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-six.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-six.inc
@@ -2,15 +2,13 @@
HOMEPAGE = "https://pypi.python.org/pypi/six/"
SECTION = "devel/python"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6f00d4a50713fa859858dd9abaa35b21"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=35cec5bf04dd0820d0a18533ea7c774a"
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/six/six-${PV}.tar.gz"
-SRC_URI[md5sum] = "34eed507548117b2ab523ab14b2f8b55"
-SRC_URI[sha256sum] = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
+SRC_URI[md5sum] = "d12789f9baf7e9fb2524c0c64f1773f8"
+SRC_URI[sha256sum] = "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/six/"
-UPSTREAM_CHECK_REGEX = "/six/(?P<pver>(\d+[\.\-_]*)+)"
+inherit pypi
+
+RDEPENDS_${PN} = "${PYTHON_PN}-io"
BBCLASSEXTEND = "native nativesdk"
-
-S = "${WORKDIR}/six-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap.inc
index d67e6b5..55aa516 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap.inc
@@ -7,13 +7,12 @@
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e910b35b0ef4e1f665b9a75d6afb7709"
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/smmap/smmap-${PV}.tar.gz"
+inherit pypi
+
SRC_URI[md5sum] = "d7932d5ace206bf4ae15198cf36fb6ab"
SRC_URI[sha256sum] = "0e2b62b497bd5f0afebc002eda4d90df9d209c30ef257e8673c90a6b5c119d62"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/smmap/"
-UPSTREAM_CHECK_REGEX = "/smmap/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/smmap-${PV}"
-
+RDEPENDS_${PN} += "${PYTHON_PN}-codecs \
+ ${PYTHON_PN}-mmap \
+"
BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python.inc
index b40f551..979b601 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python.inc
@@ -5,12 +5,12 @@
# bump this on every change in contrib/python/generate-manifest-2.7.py
INC_PR = "r1"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f741e51de91d4eeea5930b9c3c7fa69d"
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz"
-SRC_URI[md5sum] = "53b43534153bb2a0363f08bae8b9d990"
-SRC_URI[sha256sum] = "35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731"
+SRC_URI[md5sum] = "1f6db41ad91d9eb0a6f0c769b8613c5b"
+SRC_URI[sha256sum] = "71ffb26e09e78650e424929b2b457b9c912ac216576e6bd9e7d204ed03296a66"
# python recipe is actually python 2.x
# also, exclude pre-releases for both python 2.x and 3.x
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
index 366ce3e..e795a74 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
@@ -9,6 +9,9 @@
Rebased for python-2.7.9
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+Rebased for python-2.7.14
+Signed-off-by: Derek Straka <derek@asterius.io>
+
Index: Python-2.7.13/Makefile.pre.in
===================================================================
--- Python-2.7.13.orig/Makefile.pre.in
@@ -30,14 +33,14 @@
# Create build directory and generate the sysconfig build-time data there.
# pybuilddir.txt contains the name of the build dir and is used for
-@@ -681,7 +682,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/p
-
- $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN)
+@@ -663,7 +663,7 @@
+ # Regenerate Include/graminit.h and Python/graminit.c
+ # from Grammar/Grammar using pgen
@$(MKDIR_P) Include
-- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H)
- touch $(GRAMMAR_C)
+- $(PGEN) $(srcdir)/Grammar/Grammar \
++ $(HOSTPGEN) $(srcdir)/Grammar/Grammar \
+ $(srcdir)/Include/graminit.h \
+ $(srcdir)/Python/graminit.c
@@ -1121,27 +1122,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch
deleted file mode 100644
index 38e5377..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
-
-From 905d1b30ac7cb0e31c57cec0533825c8f170b942 Mon Sep 17 00:00:00 2001
-From: Victor Stinner <victor.stinner@gmail.com>
-Date: Mon, 9 Jan 2017 11:10:41 +0100
-Subject: [PATCH] Don't use getentropy() on Linux
-
-Issue #29188: Support glibc 2.24 on Linux: don't use getentropy() function but
-read from /dev/urandom to get random bytes, for example in os.urandom(). On
-Linux, getentropy() is implemented which getrandom() is blocking mode, whereas
-os.urandom() should not block.
-
-(cherry picked from commit 2687486756721e39164fa9f597e468c35d495227)
----
- Python/random.c | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/Python/random.c b/Python/random.c
-index b4bc1f3..f3f5d14 100644
---- a/Python/random.c
-+++ b/Python/random.c
-@@ -94,8 +94,15 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
- }
-
- /* Issue #25003: Don't use getentropy() on Solaris (available since
-- * Solaris 11.3), it is blocking whereas os.urandom() should not block. */
--#elif defined(HAVE_GETENTROPY) && !defined(sun)
-+ Solaris 11.3), it is blocking whereas os.urandom() should not block.
-+
-+ Issue #29188: Don't use getentropy() on Linux since the glibc 2.24
-+ implements it with the getrandom() syscall which can fail with ENOSYS,
-+ and this error is not supported in py_getentropy() and getrandom() is called
-+ with flags=0 which blocks until system urandom is initialized, which is not
-+ the desired behaviour to seed the Python hash secret nor for os.urandom():
-+ see the PEP 524 which was only implemented in Python 3.6. */
-+#elif defined(HAVE_GETENTROPY) && !defined(sun) && !defined(linux)
- #define PY_GETENTROPY 1
-
- /* Fill buffer with size pseudo-random bytes generated by getentropy().
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
index a97ff6b..3297340 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
@@ -13,11 +13,11 @@
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-Index: Python-2.7.11/configure.ac
+Index: Python-2.7.14/configure.ac
===================================================================
---- Python-2.7.11.orig/configure.ac
-+++ Python-2.7.11/configure.ac
-@@ -33,7 +33,7 @@ if test "$cross_compiling" = yes; then
+--- Python-2.7.14.orig/configure.ac
++++ Python-2.7.14/configure.ac
+@@ -36,7 +36,7 @@ if test "$cross_compiling" = yes; then
AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
fi
AC_MSG_RESULT($interp)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
index 3347321..287095f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
@@ -7,13 +7,16 @@
Also simply disable the tk module since its not in DEPENDS.
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-Index: Python-2.7.2/setup.py
+Index: Python-2.7.13/setup.py
===================================================================
---- Python-2.7.2.orig/setup.py 2012-04-05 23:18:38.500136647 +0300
-+++ Python-2.7.2/setup.py 2012-04-05 23:19:35.888134969 +0300
-@@ -1634,8 +1634,10 @@
+--- Python-2.7.13.orig/setup.py
++++ Python-2.7.13/setup.py
+@@ -1783,10 +1783,12 @@ class PyBuildExt(build_ext):
+ self.extensions.extend(exts)
+
# Call the method for detecting whether _tkinter can be compiled
- self.detect_tkinter(inc_dirs, lib_dirs)
+- self.detect_tkinter(inc_dirs, lib_dirs)
++ # self.detect_tkinter(inc_dirs, lib_dirs)
- if '_tkinter' not in [e.name for e in self.extensions]:
- missing.append('_tkinter')
@@ -22,18 +25,5 @@
+ #if '_tkinter' not in [e.name for e in self.extensions]:
+ # missing.append('_tkinter')
- return missing
-
-diff --git Python-3.5.1.orig/setup.py Python-3.5.1/setup.py
-index b4633b9..d7588c0 100644
---- Python-3.5.1.orig/setup.py
-+++ Python-3.5.1/setup.py
-@@ -1536,7 +1536,7 @@ class PyBuildExt(build_ext):
- self.extensions.extend(exts)
-
- # Call the method for detecting whether _tkinter can be compiled
-- self.detect_tkinter(inc_dirs, lib_dirs)
-+ # self.detect_tkinter(inc_dirs, lib_dirs)
-
- # tkinter module will not be avalaible as yocto
- # doesn't have tk integrated (yet)
+ ## # Uncomment these lines if you want to play with xxmodule.c
+ ## ext = Extension('xx', ['xxmodule.c'])
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
index 337e0e3..8ba5823 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
@@ -5,12 +5,12 @@
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-Index: Python-2.7.2/setup.py
+Index: Python-2.7.13/setup.py
===================================================================
---- Python-2.7.2.orig/setup.py 2012-04-05 22:29:18.049196608 +0300
-+++ Python-2.7.2/setup.py 2012-04-05 22:29:57.505195453 +0300
-@@ -1522,8 +1522,9 @@
- if platform == 'sunos5':
+--- Python-2.7.13.orig/setup.py
++++ Python-2.7.13/setup.py
+@@ -1671,8 +1671,9 @@ class PyBuildExt(build_ext):
+ if host_platform == 'sunos5':
# SunOS specific modules
exts.append( Extension('sunaudiodev', ['sunaudiodev.c']) )
- else:
@@ -19,5 +19,5 @@
+ #else:
+ # missing.append('sunaudiodev')
- if platform == 'darwin':
+ if host_platform == 'darwin':
# _scproxy
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/create_manifest2.py b/import-layers/yocto-poky/meta/recipes-devtools/python/python/create_manifest2.py
new file mode 100644
index 0000000..e745045
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/create_manifest2.py
@@ -0,0 +1,277 @@
+# This script is used as a bitbake task to create a new python manifest
+# $ bitbake python -c create_manifest
+#
+# Our goal is to keep python-core as small as posible and add other python
+# packages only when the user needs them, hence why we split upstream python
+# into several packages.
+#
+# In a very simplistic way what this does is:
+# Launch python and see specifically what is required for it to run at a minimum
+#
+# Go through the python-manifest file and launch a separate task for every single
+# one of the files on each package, this task will check what was required for that
+# specific module to run, these modules will be called dependencies.
+# The output of such task will be a list of the modules or dependencies that were
+# found for that file.
+#
+# Such output will be parsed by this script, we will look for each dependency on the
+# manifest and if we find that another package already includes it, then we will add
+# that package as an RDEPENDS to the package we are currently checking; in case we dont
+# find the current dependency on any other package we will add it to the current package
+# as part of FILES.
+#
+#
+# This way we will create a new manifest from the data structure that was built during
+# this process, ont this new manifest each package will contain specifically only
+# what it needs to run.
+#
+# There are some caveats which we try to deal with, such as repeated files on different
+# packages, packages that include folders, wildcards, and special packages.
+# Its also important to note that this method only works for python files, and shared
+# libraries. Static libraries, header files and binaries need to be dealt with manually.
+#
+# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
+
+
+import sys
+import subprocess
+import json
+import os
+
+# Hack to get native python search path (for folders), not fond of it but it works for now
+pivot='recipe-sysroot-native'
+for p in sys.path:
+ if pivot in p:
+ nativelibfolder=p[:p.find(pivot)+len(pivot)]
+
+# Empty dict to hold the whole manifest
+new_manifest = {}
+
+# Check for repeated files, folders and wildcards
+allfiles=[]
+repeated=[]
+wildcards=[]
+
+hasfolders=[]
+allfolders=[]
+
+def isFolder(value):
+ if os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib64')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib32')):
+ return True
+ else:
+ return False
+
+# Read existing JSON manifest
+with open('python2-manifest.json') as manifest:
+ old_manifest=json.load(manifest)
+
+
+# First pass to get core-package functionality, because we base everything on the fact that core is actually working
+# Not exactly the same so it should not be a function
+print ("Getting dependencies for core package:")
+
+# Special call to check for core package
+output = subprocess.check_output([sys.executable, 'get_module_deps2.py', 'python-core-package'])
+for item in output.split():
+ # We append it so it doesnt hurt what we currently have:
+ if item not in old_manifest['core']['files']:
+ # We use the same data structure since its the one which will be used to check
+ # dependencies for other packages
+ old_manifest['core']['files'].append(item)
+
+for value in old_manifest['core']['files']:
+ # Ignore folders, since we don't import those, difficult to handle multilib
+ if isFolder(value):
+ # Pass it directly
+ if value not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(value)
+ # Ignore binaries, since we don't import those, assume it was added correctly (manually)
+ if '${bindir}' in value:
+ # Pass it directly
+ if value not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(value)
+ continue
+ # Ignore empty values
+ if value == '':
+ continue
+ if '${includedir}' in value:
+ if value not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(value)
+ continue
+ # Get module name , shouldnt be affected by libdir/bindir
+ value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0]
+
+
+ # Launch separate task for each module for deterministic behavior
+ # Each module will only import what is necessary for it to work in specific
+ print ('Getting dependencies for module: %s' % value)
+ output = subprocess.check_output([sys.executable, 'get_module_deps2.py', '%s' % value])
+ for item in output.split():
+ # We append it so it doesnt hurt what we currently have:
+ if item not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(item)
+
+# We check which packages include folders
+for key in old_manifest:
+ for value in old_manifest[key]['files']:
+ # Ignore folders, since we don't import those, difficult to handle multilib
+ if isFolder(value):
+ print ('%s is a folder' % value)
+ if key not in hasfolders:
+ hasfolders.append(key)
+ if value not in allfolders:
+ allfolders.append(value)
+
+for key in old_manifest:
+ # Use an empty dict as data structure to hold data for each package and fill it up
+ new_manifest[key]={}
+ new_manifest[key]['files']=[]
+ new_manifest[key]['rdepends']=[]
+ # All packages should depend on core
+ if key != 'core':
+ new_manifest[key]['rdepends'].append('core')
+ new_manifest[key]['summary']=old_manifest[key]['summary']
+
+ # Handle special cases, we assume that when they were manually added
+ # to the manifest we knew what we were doing.
+ print ('Handling package %s' % key)
+ special_packages=['misc', 'modules', 'dev']
+ if key in special_packages or 'staticdev' in key:
+ print('Passing %s package directly' % key)
+ new_manifest[key]=old_manifest[key]
+ continue
+
+ for value in old_manifest[key]['files']:
+ # We already handled core on the first pass
+ if key == 'core':
+ new_manifest[key]['files'].append(value)
+ continue
+ # Ignore folders, since we don't import those, difficult to handle multilib
+ if isFolder(value):
+ # Pass folders directly
+ new_manifest[key]['files'].append(value)
+ # Ignore binaries, since we don't import those
+ if '${bindir}' in value:
+ # Pass it directly to the new manifest data structure
+ if value not in new_manifest[key]['files']:
+ new_manifest[key]['files'].append(value)
+ continue
+ # Ignore empty values
+ if value == '':
+ continue
+ if '${includedir}' in value:
+ if value not in new_manifest[key]['files']:
+ new_manifest[key]['files'].append(value)
+ continue
+ # Get module name , shouldnt be affected by libdir/bindir
+ value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0]
+
+ # Launch separate task for each module for deterministic behavior
+ # Each module will only import what is necessary for it to work in specific
+ print ('Getting dependencies for module: %s' % value)
+ output = subprocess.check_output([sys.executable, 'get_module_deps2.py', '%s' % value])
+
+ # We can print dependencies for debugging purposes
+ #print (output)
+ # Output will have all dependencies
+ for item in output.split():
+
+ # Warning: This first part is ugly
+ # One of the dependencies that was found, could be inside of one of the folders included by another package
+ # We need to check if this happens so we can add the package containing the folder as an RDEPENDS
+ # e.g. Folder encodings contained in codecs
+ # This would be solved if no packages included any folders
+
+ # This can be done in two ways:
+ # 1 - We assume that if we take out the filename from the path we would get
+ # the folder string, then we would check if folder string is in the list of folders
+ # This would not work if a package contains a folder which contains another folder
+ # e.g. path/folder1/folder2/filename folder_string= path/folder1/folder2
+ # folder_string would not match any value contained in the list of folders
+ #
+ # 2 - We do it the other way around, checking if the folder is contained in the path
+ # e.g. path/folder1/folder2/filename folder_string= path/folder1/folder2
+ # is folder_string inside path/folder1/folder2/filename?,
+ # Yes, it works, but we waste a couple of milliseconds.
+
+ inFolders=False
+ for folder in allfolders:
+ if folder in item:
+ inFolders = True # Did we find a folder?
+ folderFound = False # Second flag to break inner for
+ # Loop only through packages which contain folders
+ for keyfolder in hasfolders:
+ if (folderFound == False):
+ #print("Checking folder %s on package %s" % (item,keyfolder))
+ for file_folder in old_manifest[keyfolder]['files']:
+ if file_folder==folder:
+ print ('%s found in %s' % (folder, keyfolder))
+ folderFound = True
+ if keyfolder not in new_manifest[key]['rdepends'] and keyfolder != key:
+ new_manifest[key]['rdepends'].append(keyfolder)
+ else:
+ break
+
+ # A folder was found so we're done with this item, we can go on
+ if inFolders:
+ continue
+
+ # We might already have it on the dictionary since it could depend on a (previously checked) module
+ if item not in new_manifest[key]['files']:
+ # Handle core as a special package, we already did it so we pass it to NEW data structure directly
+ if key=='core':
+ print('Adding %s to %s FILES' % (item, key))
+ if item.endswith('*'):
+ wildcards.append(item)
+ new_manifest[key]['files'].append(item)
+
+ # Check for repeated files
+ if item not in allfiles:
+ allfiles.append(item)
+ else:
+ repeated.append(item)
+
+ else:
+
+ # Check if this dependency is already contained on another package, so we add it
+ # as an RDEPENDS, or if its not, it means it should be contained on the current
+ # package, so we should add it to FILES
+ for newkey in old_manifest:
+ # Debug
+ #print("Checking %s " % item + " in %s" % newkey)
+ if item in old_manifest[newkey]['files']:
+ # Since were nesting, we need to check its not the same key
+ if(newkey!=key):
+ if newkey not in new_manifest[key]['rdepends']:
+ # Add it to the new manifest data struct
+ # Debug
+ print('Adding %s to %s RDEPENDS, because it contains %s' % (newkey, key, item))
+ new_manifest[key]['rdepends'].append(newkey)
+ break
+ else:
+ # Debug
+ print('Adding %s to %s FILES' % (item, key))
+ # Since it wasnt found on another package, its not an RDEP, so add it to FILES for this package
+ new_manifest[key]['files'].append(item)
+ if item.endswith('*'):
+ wildcards.append(item)
+ if item not in allfiles:
+ allfiles.append(item)
+ else:
+ repeated.append(item)
+
+print ('The following files are repeated (contained in more than one package), please check which package should get it:')
+print (repeated)
+print('The following files contain wildcards, please check they are necessary')
+print(wildcards)
+print('The following files contain folders, please check they are necessary')
+print(hasfolders)
+
+# Sort it just so it looks nice
+for key in new_manifest:
+ new_manifest[key]['files'].sort()
+ new_manifest[key]['rdepends'].sort()
+
+# Create the manifest from the data structure that was built
+with open('python2-manifest.json.new','w') as outfile:
+ json.dump(new_manifest,outfile,sort_keys=True, indent=4, separators=(',', ': '))
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
index 669112d..60d782c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
@@ -4,18 +4,19 @@
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Upstream-Status: Pending
---
-diff -ruN a/Makefile.pre.in b/Makefile.pre.in
---- a/Makefile.pre.in 2013-06-27 10:44:11.033840532 +0200
-+++ b/Makefile.pre.in 2013-06-27 10:44:39.572635273 +0200
-@@ -709,14 +709,19 @@
- # generated bytecode. This is sometimes a very shy bug needing a lot of
- # sample data.
+Index: Python-2.7.14/Makefile.pre.in
+===================================================================
+--- Python-2.7.14.orig/Makefile.pre.in
++++ Python-2.7.14/Makefile.pre.in
+@@ -846,14 +846,19 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho
+
+ .PHONY: test testall testuniversal buildbottest pythoninfo
-TESTOPTS= -l $(EXTRATESTOPTS)
+TESTOPTS= -l -v $(EXTRATESTOPTS)
TESTPROG= $(srcdir)/Lib/test/regrtest.py
-TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
--test: all platform
+-test: @DEF_MAKE_RULE@ platform
- -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
+TESTPYTHON= $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
+test: build-test
@@ -26,8 +27,8 @@
-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
-+build-test: all platform
++build-test: @DEF_MAKE_RULE@ platform
+
- testall: all platform
+ testall: @DEF_MAKE_RULE@ platform
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
$(TESTPYTHON) $(srcdir)/Lib/compileall.py
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/get_module_deps2.py b/import-layers/yocto-poky/meta/recipes-devtools/python/python/get_module_deps2.py
new file mode 100644
index 0000000..73e7c6f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/get_module_deps2.py
@@ -0,0 +1,112 @@
+# This script is launched on separate task for each python module
+# It checks for dependencies for that specific module and prints
+# them out, the output of this execution will have all dependencies
+# for a specific module, which will be parsed an dealt on create_manifest.py
+#
+# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
+
+
+# We can get a log per module, for all the dependencies that were found, but its messy.
+debug=False
+
+import sys
+
+# We can get a list of the modules which are currently required to run python
+# so we run python-core and get its modules, we then import what we need
+# and check what modules are currently running, if we substract them from the
+# modules we had initially, we get the dependencies for the module we imported.
+
+# We use importlib to achieve this, so we also need to know what modules importlib needs
+import importlib
+
+core_deps=set(sys.modules)
+
+def fix_path(dep_path):
+ import os
+ # We DONT want the path on our HOST system
+ pivot='recipe-sysroot-native'
+ dep_path=dep_path[dep_path.find(pivot)+len(pivot):]
+
+ if '/usr/bin' in dep_path:
+ dep_path = dep_path.replace('/usr/bin''${bindir}')
+
+ # Handle multilib, is there a better way?
+ if '/usr/lib32' in dep_path:
+ dep_path = dep_path.replace('/usr/lib32','${libdir}')
+ if '/usr/lib64' in dep_path:
+ dep_path = dep_path.replace('/usr/lib64','${libdir}')
+ if '/usr/lib' in dep_path:
+ dep_path = dep_path.replace('/usr/lib','${libdir}')
+ if '/usr/include' in dep_path:
+ dep_path = dep_path.replace('/usr/include','${includedir}')
+ if '__init__.' in dep_path:
+ dep_path = os.path.split(dep_path)[0]
+
+ # If a *.pyc file was imported, we replace it with *.py (since we deal with PYCs on create_manifest)
+ if '.pyc' in dep_path:
+ dep_path = dep_path.replace('.pyc','.py')
+
+ return dep_path
+
+# Module to import was passed as an argument
+current_module = str(sys.argv[1]).rstrip()
+if(debug==True):
+ log = open('log_%s' % current_module,'w')
+ log.write('Module %s generated the following dependencies:\n' % current_module)
+try:
+ importlib.import_module('%s' % current_module)
+except ImportError as e:
+ if (debug==True):
+ log.write('Module was not found')
+ pass
+
+
+# Get current module dependencies, dif will contain a list of specific deps for this module
+module_deps=set(sys.modules)
+
+# We handle the core package (1st pass on create_manifest.py) as a special case
+if current_module == 'python-core-package':
+ dif = core_deps
+else:
+ dif = module_deps-core_deps
+
+
+# Check where each dependency came from
+for item in dif:
+ dep_path=''
+ try:
+ if (debug==True):
+ log.write('Calling: sys.modules[' + '%s' % item + '].__file__\n')
+ dep_path = sys.modules['%s' % item].__file__
+ except AttributeError as e:
+ # Deals with thread (builtin module) not having __file__ attribute
+ if debug==True:
+ log.write(item + ' ')
+ log.write(str(e))
+ log.write('\n')
+ pass
+ except NameError as e:
+ # Deals with NameError: name 'dep_path' is not defined
+ # because module is not found (wasn't compiled?), e.g. bddsm
+ if (debug==True):
+ log.write(item+' ')
+ log.write(str(e))
+ pass
+
+ # Site-customize is a special case since we (OpenEmbedded) put it there manually
+ if 'sitecustomize' in dep_path:
+ dep_path = '${libdir}/python2.7/sitecustomize.py'
+ # Prints out result, which is what will be used by create_manifest
+ print (dep_path)
+ continue
+
+ dep_path = fix_path(dep_path)
+
+ if (debug==True):
+ log.write(dep_path+'\n')
+
+ # Prints out result, which is what will be used by create_manifest
+ print (dep_path)
+
+if debug==True:
+ log.close()
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch
index f5568d2..1116dd5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch
@@ -1,11 +1,11 @@
Rebased for python-2.7.9
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Upstream-Status: Pending
-Index: Python-2.7.13/configure.ac
+Index: Python-2.7.14/configure.ac
===================================================================
---- Python-2.7.13.orig/configure.ac
-+++ Python-2.7.13/configure.ac
-@@ -759,6 +759,10 @@ SunOS*)
+--- Python-2.7.14.orig/configure.ac
++++ Python-2.7.14/configure.ac
+@@ -758,6 +758,10 @@ SunOS*)
;;
esac
@@ -16,10 +16,10 @@
AC_SUBST(LIBRARY)
AC_MSG_CHECKING(LIBRARY)
-Index: Python-2.7.13/Include/pythonrun.h
+Index: Python-2.7.14/Include/pythonrun.h
===================================================================
---- Python-2.7.13.orig/Include/pythonrun.h
-+++ Python-2.7.13/Include/pythonrun.h
+--- Python-2.7.14.orig/Include/pythonrun.h
++++ Python-2.7.14/Include/pythonrun.h
@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
/* In their own files */
PyAPI_FUNC(const char *) Py_GetVersion(void);
@@ -28,10 +28,10 @@
PyAPI_FUNC(const char *) Py_GetCopyright(void);
PyAPI_FUNC(const char *) Py_GetCompiler(void);
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-Index: Python-2.7.13/Lib/distutils/command/install.py
+Index: Python-2.7.14/Lib/distutils/command/install.py
===================================================================
---- Python-2.7.13.orig/Lib/distutils/command/install.py
-+++ Python-2.7.13/Lib/distutils/command/install.py
+--- Python-2.7.14.orig/Lib/distutils/command/install.py
++++ Python-2.7.14/Lib/distutils/command/install.py
@@ -22,6 +22,8 @@ from site import USER_BASE
from site import USER_SITE
@@ -41,19 +41,21 @@
if sys.version < "2.2":
WINDOWS_SCHEME = {
'purelib': '$base',
-@@ -42,7 +44,7 @@ else:
+@@ -41,8 +43,8 @@ else:
+
INSTALL_SCHEMES = {
'unix_prefix': {
- 'purelib': '$base/lib/python$py_version_short/site-packages',
+- 'purelib': '$base/lib/python$py_version_short/site-packages',
- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
++ 'purelib': '$platbase/'+libname+'/python$py_version_short/site-packages',
+ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
'headers': '$base/include/python$py_version_short/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-Index: Python-2.7.13/Lib/distutils/sysconfig.py
+Index: Python-2.7.14/Lib/distutils/sysconfig.py
===================================================================
---- Python-2.7.13.orig/Lib/distutils/sysconfig.py
-+++ Python-2.7.13/Lib/distutils/sysconfig.py
+--- Python-2.7.14.orig/Lib/distutils/sysconfig.py
++++ Python-2.7.14/Lib/distutils/sysconfig.py
@@ -119,8 +119,11 @@ def get_python_lib(plat_specific=0, stan
prefix = plat_specific and EXEC_PREFIX or PREFIX
@@ -68,10 +70,10 @@
if standard_lib:
return libpython
else:
-Index: Python-2.7.13/Lib/pydoc.py
+Index: Python-2.7.14/Lib/pydoc.py
===================================================================
---- Python-2.7.13.orig/Lib/pydoc.py
-+++ Python-2.7.13/Lib/pydoc.py
+--- Python-2.7.14.orig/Lib/pydoc.py
++++ Python-2.7.14/Lib/pydoc.py
@@ -375,7 +375,7 @@ class Doc:
docmodule = docclass = docroutine = docother = docproperty = docdata = fail
@@ -81,10 +83,10 @@
"python"+sys.version[0:3])):
"""Return the location of module docs or None"""
-Index: Python-2.7.13/Lib/site.py
+Index: Python-2.7.14/Lib/site.py
===================================================================
---- Python-2.7.13.orig/Lib/site.py
-+++ Python-2.7.13/Lib/site.py
+--- Python-2.7.14.orig/Lib/site.py
++++ Python-2.7.14/Lib/site.py
@@ -288,13 +288,18 @@ def getsitepackages():
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
@@ -107,10 +109,10 @@
return sitepackages
def addsitepackages(known_paths):
-Index: Python-2.7.13/Lib/sysconfig.py
+Index: Python-2.7.14/Lib/sysconfig.py
===================================================================
---- Python-2.7.13.orig/Lib/sysconfig.py
-+++ Python-2.7.13/Lib/sysconfig.py
+--- Python-2.7.14.orig/Lib/sysconfig.py
++++ Python-2.7.14/Lib/sysconfig.py
@@ -7,10 +7,10 @@ from os.path import pardir, realpath
_INSTALL_SCHEMES = {
@@ -139,10 +141,10 @@
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data' : '{userbase}',
-Index: Python-2.7.13/Lib/test/test_dl.py
+Index: Python-2.7.14/Lib/test/test_dl.py
===================================================================
---- Python-2.7.13.orig/Lib/test/test_dl.py
-+++ Python-2.7.13/Lib/test/test_dl.py
+--- Python-2.7.14.orig/Lib/test/test_dl.py
++++ Python-2.7.14/Lib/test/test_dl.py
@@ -4,10 +4,11 @@
import unittest
from test.test_support import verbose, import_module
@@ -157,11 +159,11 @@
('/usr/bin/cygwin1.dll', 'getpid'),
('/usr/lib/libc.dylib', 'getpid'),
]
-Index: Python-2.7.13/Lib/test/test_site.py
+Index: Python-2.7.14/Lib/test/test_site.py
===================================================================
---- Python-2.7.13.orig/Lib/test/test_site.py
-+++ Python-2.7.13/Lib/test/test_site.py
-@@ -235,12 +235,16 @@ class HelperFunctionsTests(unittest.Test
+--- Python-2.7.14.orig/Lib/test/test_site.py
++++ Python-2.7.14/Lib/test/test_site.py
+@@ -252,12 +252,16 @@ class HelperFunctionsTests(unittest.Test
self.assertEqual(dirs[0], wanted)
elif os.sep == '/':
# OS X, Linux, FreeBSD, etc
@@ -181,10 +183,10 @@
else:
# other platforms
self.assertEqual(len(dirs), 2)
-Index: Python-2.7.13/Lib/trace.py
+Index: Python-2.7.14/Lib/trace.py
===================================================================
---- Python-2.7.13.orig/Lib/trace.py
-+++ Python-2.7.13/Lib/trace.py
+--- Python-2.7.14.orig/Lib/trace.py
++++ Python-2.7.14/Lib/trace.py
@@ -754,10 +754,10 @@ def main(argv=None):
# should I also call expanduser? (after all, could use $HOME)
@@ -198,11 +200,11 @@
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
-Index: Python-2.7.13/Makefile.pre.in
+Index: Python-2.7.14/Makefile.pre.in
===================================================================
---- Python-2.7.13.orig/Makefile.pre.in
-+++ Python-2.7.13/Makefile.pre.in
-@@ -92,6 +92,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
+--- Python-2.7.14.orig/Makefile.pre.in
++++ Python-2.7.14/Makefile.pre.in
+@@ -91,6 +91,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
@@ -210,7 +212,7 @@
# Multiarch directory (may be empty)
MULTIARCH= @MULTIARCH@
-@@ -111,7 +112,7 @@ LIBDIR= @libdir@
+@@ -110,7 +111,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
@@ -219,7 +221,7 @@
# Detailed destination directories
BINLIBDEST= $(LIBDIR)/python$(VERSION)
-@@ -669,6 +670,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
+@@ -645,6 +646,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
@@ -227,8 +229,8 @@
-o $@ $(srcdir)/Modules/getpath.c
Modules/python.o: $(srcdir)/Modules/python.c
-@@ -709,7 +711,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
- Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
+@@ -693,7 +695,7 @@ regen-ast:
+ Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
Python/getplatform.o: $(srcdir)/Python/getplatform.c
- $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
@@ -236,10 +238,10 @@
Python/importdl.o: $(srcdir)/Python/importdl.c
$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-2.7.13/Modules/getpath.c
+Index: Python-2.7.14/Modules/getpath.c
===================================================================
---- Python-2.7.13.orig/Modules/getpath.c
-+++ Python-2.7.13/Modules/getpath.c
+--- Python-2.7.14.orig/Modules/getpath.c
++++ Python-2.7.14/Modules/getpath.c
@@ -100,6 +100,13 @@
#error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
#endif
@@ -263,10 +265,10 @@
static void
reduce(char *dir)
-Index: Python-2.7.13/Python/getplatform.c
+Index: Python-2.7.14/Python/getplatform.c
===================================================================
---- Python-2.7.13.orig/Python/getplatform.c
-+++ Python-2.7.13/Python/getplatform.c
+--- Python-2.7.14.orig/Python/getplatform.c
++++ Python-2.7.14/Python/getplatform.c
@@ -10,3 +10,13 @@ Py_GetPlatform(void)
{
return PLATFORM;
@@ -281,10 +283,10 @@
+{
+ return LIB;
+}
-Index: Python-2.7.13/Python/sysmodule.c
+Index: Python-2.7.14/Python/sysmodule.c
===================================================================
---- Python-2.7.13.orig/Python/sysmodule.c
-+++ Python-2.7.13/Python/sysmodule.c
+--- Python-2.7.14.orig/Python/sysmodule.c
++++ Python-2.7.14/Python/sysmodule.c
@@ -1437,6 +1437,8 @@ _PySys_Init(void)
PyString_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
index 951cb46..abab41e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
@@ -8,12 +8,12 @@
--- Python-2.7.3.orig/Makefile.pre.in
+++ Python-2.7.3/Makefile.pre.in
-@@ -1008,7 +1008,7 @@ LIBPL= $(LIBP)/config
+@@ -1187,7 +1187,7 @@
LIBPC= $(LIBDIR)/pkgconfig
-
- libainstall: all python-config
+
+ libainstall: @DEF_MAKE_RULE@ python-config
- @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
+ @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC) $(BINDIR); \
- do \
- if test ! -d $(DESTDIR)$$i; then \
- echo "Creating directory $$i"; \
+ do \
+ if test ! -d $(DESTDIR)$$i; then \
+ echo "Creating directory $$i"; \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/python2-manifest.json b/import-layers/yocto-poky/meta/recipes-devtools/python/python/python2-manifest.json
new file mode 100644
index 0000000..723e513
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/python2-manifest.json
@@ -0,0 +1,1047 @@
+{
+ "2to3": {
+ "files": [
+ "${bindir}/2to3",
+ "${libdir}/python2.7/lib2to3"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python automated Python 2 to 3 code translator"
+ },
+ "argparse": {
+ "files": [
+ "${libdir}/python2.7/argparse.py"
+ ],
+ "rdepends": [
+ "codecs",
+ "core",
+ "lang",
+ "textutils"
+ ],
+ "summary": "Python command line argument parser"
+ },
+ "audio": {
+ "files": [
+ "${libdir}/python2.7/audiodev.py",
+ "${libdir}/python2.7/chunk.py",
+ "${libdir}/python2.7/lib-dynload/audioop.so",
+ "${libdir}/python2.7/lib-dynload/ossaudiodev.so",
+ "${libdir}/python2.7/sndhdr.py",
+ "${libdir}/python2.7/sunau.py",
+ "${libdir}/python2.7/sunaudio.py",
+ "${libdir}/python2.7/toaiff.py",
+ "${libdir}/python2.7/wave.py"
+ ],
+ "rdepends": [
+ "core",
+ "crypt",
+ "fcntl",
+ "io",
+ "math"
+ ],
+ "summary": "Python Audio Handling"
+ },
+ "bsddb": {
+ "files": [
+ "${libdir}/python2.7/bsddb",
+ "${libdir}/python2.7/lib-dynload/_bsddb.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python bindings for the Berkeley Database"
+ },
+ "codecs": {
+ "files": [
+ "${libdir}/python2.7/gettext.py",
+ "${libdir}/python2.7/lib-dynload/_codecs_cn.so",
+ "${libdir}/python2.7/lib-dynload/_codecs_hk.so",
+ "${libdir}/python2.7/lib-dynload/_codecs_iso2022.so",
+ "${libdir}/python2.7/lib-dynload/_codecs_jp.so",
+ "${libdir}/python2.7/lib-dynload/_codecs_kr.so",
+ "${libdir}/python2.7/lib-dynload/_codecs_tw.so",
+ "${libdir}/python2.7/lib-dynload/_multibytecodec.so",
+ "${libdir}/python2.7/lib-dynload/unicodedata.so",
+ "${libdir}/python2.7/locale.py",
+ "${libdir}/python2.7/stringprep.py",
+ "${libdir}/python2.7/xdrlib.py"
+ ],
+ "rdepends": [
+ "core",
+ "io",
+ "lang"
+ ],
+ "summary": "Python codec"
+ },
+ "compile": {
+ "files": [
+ "${libdir}/python2.7/compileall.py",
+ "${libdir}/python2.7/py_compile.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python bytecode compilation support"
+ },
+ "compiler": {
+ "files": [
+ "${libdir}/python2.7/compiler"
+ ],
+ "rdepends": [
+ "core",
+ "io",
+ "lang"
+ ],
+ "summary": "Python compiler support"
+ },
+ "compression": {
+ "files": [
+ "${libdir}/python2.7/gzip.py",
+ "${libdir}/python2.7/lib-dynload/bz2.so",
+ "${libdir}/python2.7/tarfile.py",
+ "${libdir}/python2.7/zipfile.py"
+ ],
+ "rdepends": [
+ "core",
+ "io",
+ "shell",
+ "unixadmin",
+ "zlib"
+ ],
+ "summary": "Python high-level compression support"
+ },
+ "contextlib": {
+ "files": [
+ "${libdir}/python2.7/contextlib.py"
+ ],
+ "rdepends": [
+ "core",
+ "lang"
+ ],
+ "summary": "Python utilities for with-statementcontexts."
+ },
+ "core": {
+ "files": [
+ "${bindir}/python*",
+ "${includedir}/python2.7/pyconfig*.h",
+ "${libdir}/python2.7/ConfigParser.py",
+ "${libdir}/python2.7/UserDict.py",
+ "${libdir}/python2.7/UserList.py",
+ "${libdir}/python2.7/UserString.py",
+ "${libdir}/python2.7/__future__.py",
+ "${libdir}/python2.7/_abcoll.py",
+ "${libdir}/python2.7/_sysconfigdata.py",
+ "${libdir}/python2.7/_weakrefset.py",
+ "${libdir}/python2.7/abc.py",
+ "${libdir}/python2.7/ast.py",
+ "${libdir}/python2.7/atexit.py",
+ "${libdir}/python2.7/codecs.py",
+ "${libdir}/python2.7/collections.py",
+ "${libdir}/python2.7/copy.py",
+ "${libdir}/python2.7/copy_reg.py",
+ "${libdir}/python2.7/encodings",
+ "${libdir}/python2.7/encodings/aliases.py",
+ "${libdir}/python2.7/encodings/utf_8.py",
+ "${libdir}/python2.7/genericpath.py",
+ "${libdir}/python2.7/getopt.py",
+ "${libdir}/python2.7/heapq.py",
+ "${libdir}/python2.7/importlib",
+ "${libdir}/python2.7/keyword.py",
+ "${libdir}/python2.7/lib-dynload/_collections.so",
+ "${libdir}/python2.7/lib-dynload/_heapq.so",
+ "${libdir}/python2.7/lib-dynload/_locale.so",
+ "${libdir}/python2.7/lib-dynload/_struct.so",
+ "${libdir}/python2.7/lib-dynload/binascii.so",
+ "${libdir}/python2.7/lib-dynload/itertools.so",
+ "${libdir}/python2.7/lib-dynload/operator.so",
+ "${libdir}/python2.7/lib-dynload/readline.so",
+ "${libdir}/python2.7/lib-dynload/strop.so",
+ "${libdir}/python2.7/lib-dynload/time.so",
+ "${libdir}/python2.7/lib-dynload/xreadlines.so",
+ "${libdir}/python2.7/linecache.py",
+ "${libdir}/python2.7/new.py",
+ "${libdir}/python2.7/os.py",
+ "${libdir}/python2.7/platform.py",
+ "${libdir}/python2.7/posixpath.py",
+ "${libdir}/python2.7/re.py",
+ "${libdir}/python2.7/rlcompleter.py",
+ "${libdir}/python2.7/site.py",
+ "${libdir}/python2.7/sitecustomize.py",
+ "${libdir}/python2.7/sre_compile.py",
+ "${libdir}/python2.7/sre_constants.py",
+ "${libdir}/python2.7/sre_parse.py",
+ "${libdir}/python2.7/stat.py",
+ "${libdir}/python2.7/string.py",
+ "${libdir}/python2.7/struct.py",
+ "${libdir}/python2.7/sysconfig.py",
+ "${libdir}/python2.7/traceback.py",
+ "${libdir}/python2.7/types.py",
+ "${libdir}/python2.7/warnings.py",
+ "${libdir}/python2.7/weakref.py"
+ ],
+ "rdepends": [],
+ "summary": "Python interpreter and core modules"
+ },
+ "crypt": {
+ "files": [
+ "${libdir}/python2.7/hashlib.py",
+ "${libdir}/python2.7/lib-dynload/_hashlib.so",
+ "${libdir}/python2.7/lib-dynload/crypt.so",
+ "${libdir}/python2.7/md5.py",
+ "${libdir}/python2.7/sha.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python basic cryptographic and hashing support"
+ },
+ "ctypes": {
+ "files": [
+ "${libdir}/python2.7/ctypes",
+ "${libdir}/python2.7/lib-dynload/_ctypes.so",
+ "${libdir}/python2.7/lib-dynload/_ctypes_test.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python C types support"
+ },
+ "curses": {
+ "files": [
+ "${libdir}/python2.7/curses",
+ "${libdir}/python2.7/lib-dynload/_curses.so",
+ "${libdir}/python2.7/lib-dynload/_curses_panel.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python curses support"
+ },
+ "datetime": {
+ "files": [
+ "${libdir}/python2.7/_strptime.py",
+ "${libdir}/python2.7/calendar.py",
+ "${libdir}/python2.7/lib-dynload/datetime.so"
+ ],
+ "rdepends": [
+ "codecs",
+ "core",
+ "lang"
+ ],
+ "summary": "Python calendar and time support"
+ },
+ "db": {
+ "files": [
+ "${libdir}/python2.7/anydbm.py",
+ "${libdir}/python2.7/dbhash.py",
+ "${libdir}/python2.7/dumbdbm.py",
+ "${libdir}/python2.7/lib-dynload/dbm.so",
+ "${libdir}/python2.7/whichdb.py"
+ ],
+ "rdepends": [
+ "bsddb",
+ "core",
+ "gdbm"
+ ],
+ "summary": "Python file-based database support"
+ },
+ "debugger": {
+ "files": [
+ "${libdir}/python2.7/bdb.py",
+ "${libdir}/python2.7/pdb.py"
+ ],
+ "rdepends": [
+ "core",
+ "io",
+ "lang",
+ "pprint",
+ "shell"
+ ],
+ "summary": "Python debugger"
+ },
+ "dev": {
+ "files": [
+ "${base_libdir}/*.a",
+ "${base_libdir}/*.o",
+ "${datadir}/aclocal",
+ "${datadir}/pkgconfig",
+ "${includedir}",
+ "${libdir}/*.a",
+ "${libdir}/*.la",
+ "${libdir}/*.o",
+ "${libdir}/lib*${SOLIBSDEV}",
+ "${libdir}/pkgconfig",
+ "${libdir}/python2.7/config/Makefile"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python development package"
+ },
+ "difflib": {
+ "files": [
+ "${libdir}/python2.7/difflib.py"
+ ],
+ "rdepends": [
+ "core",
+ "lang"
+ ],
+ "summary": "Python helpers for computing deltas between objects"
+ },
+ "distutils": {
+ "files": [
+ "${libdir}/python2.7/config",
+ "${libdir}/python2.7/distutils"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Distribution Utilities"
+ },
+ "distutils-staticdev": {
+ "files": [
+ "${libdir}/python2.7/config/lib*.a"
+ ],
+ "rdepends": [
+ "distutils"
+ ],
+ "summary": "Python distribution utilities (static libraries)"
+ },
+ "doctest": {
+ "files": [
+ "${libdir}/python2.7/doctest.py"
+ ],
+ "rdepends": [
+ "core",
+ "crypt",
+ "debugger",
+ "difflib",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "pprint",
+ "shell",
+ "unittest"
+ ],
+ "summary": "Python framework for running examples in docstrings"
+ },
+ "email": {
+ "files": [
+ "${libdir}/python2.7/email",
+ "${libdir}/python2.7/imaplib.py"
+ ],
+ "rdepends": [
+ "contextlib",
+ "core",
+ "crypt",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "netclient",
+ "pickle",
+ "subprocess",
+ "textutils"
+ ],
+ "summary": "Python email support"
+ },
+ "fcntl": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/fcntl.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python's fcntl interface"
+ },
+ "gdbm": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/gdbm.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python GNU database support"
+ },
+ "hotshot": {
+ "files": [
+ "${libdir}/python2.7/hotshot",
+ "${libdir}/python2.7/lib-dynload/_hotshot.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python hotshot performance profiler"
+ },
+ "html": {
+ "files": [
+ "${libdir}/python2.7/HTMLParser.py",
+ "${libdir}/python2.7/formatter.py",
+ "${libdir}/python2.7/htmlentitydefs.py",
+ "${libdir}/python2.7/htmllib.py",
+ "${libdir}/python2.7/markupbase.py",
+ "${libdir}/python2.7/sgmllib.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python HTML processing support"
+ },
+ "idle": {
+ "files": [
+ "${bindir}/idle",
+ "${libdir}/python2.7/idlelib"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Integrated Development Environment"
+ },
+ "image": {
+ "files": [
+ "${libdir}/python2.7/colorsys.py",
+ "${libdir}/python2.7/imghdr.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python graphical image handling"
+ },
+ "io": {
+ "files": [
+ "${libdir}/python2.7/StringIO.py",
+ "${libdir}/python2.7/_pyio.py",
+ "${libdir}/python2.7/io.py",
+ "${libdir}/python2.7/lib-dynload/_io.so",
+ "${libdir}/python2.7/lib-dynload/_socket.so",
+ "${libdir}/python2.7/lib-dynload/_ssl.so",
+ "${libdir}/python2.7/lib-dynload/cStringIO.so",
+ "${libdir}/python2.7/lib-dynload/select.so",
+ "${libdir}/python2.7/lib-dynload/termios.so",
+ "${libdir}/python2.7/pipes.py",
+ "${libdir}/python2.7/socket.py",
+ "${libdir}/python2.7/ssl.py",
+ "${libdir}/python2.7/tempfile.py"
+ ],
+ "rdepends": [
+ "contextlib",
+ "core",
+ "crypt",
+ "fcntl",
+ "lang",
+ "math",
+ "netclient",
+ "textutils"
+ ],
+ "summary": "Python low-level I/O"
+ },
+ "json": {
+ "files": [
+ "${libdir}/python2.7/json",
+ "${libdir}/python2.7/lib-dynload/_json.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python JSON support"
+ },
+ "lang": {
+ "files": [
+ "${libdir}/python2.7/bisect.py",
+ "${libdir}/python2.7/code.py",
+ "${libdir}/python2.7/codeop.py",
+ "${libdir}/python2.7/dis.py",
+ "${libdir}/python2.7/functools.py",
+ "${libdir}/python2.7/inspect.py",
+ "${libdir}/python2.7/lib-dynload/_bisect.so",
+ "${libdir}/python2.7/lib-dynload/_functools.so",
+ "${libdir}/python2.7/lib-dynload/array.so",
+ "${libdir}/python2.7/lib-dynload/parser.so",
+ "${libdir}/python2.7/opcode.py",
+ "${libdir}/python2.7/repr.py",
+ "${libdir}/python2.7/symbol.py",
+ "${libdir}/python2.7/token.py",
+ "${libdir}/python2.7/tokenize.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python low-level language support"
+ },
+ "logging": {
+ "files": [
+ "${libdir}/python2.7/logging"
+ ],
+ "rdepends": [
+ "core",
+ "io",
+ "threading"
+ ],
+ "summary": "Python logging support"
+ },
+ "mailbox": {
+ "files": [
+ "${libdir}/python2.7/mailbox.py"
+ ],
+ "rdepends": [
+ "codecs",
+ "contextlib",
+ "core",
+ "crypt",
+ "datetime",
+ "email",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "mime",
+ "netclient",
+ "textutils"
+ ],
+ "summary": "Python mailbox format support"
+ },
+ "math": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/_random.so",
+ "${libdir}/python2.7/lib-dynload/cmath.so",
+ "${libdir}/python2.7/lib-dynload/math.so",
+ "${libdir}/python2.7/random.py",
+ "${libdir}/python2.7/sets.py"
+ ],
+ "rdepends": [
+ "core",
+ "crypt"
+ ],
+ "summary": "Python math support"
+ },
+ "mime": {
+ "files": [
+ "${libdir}/python2.7/MimeWriter.py",
+ "${libdir}/python2.7/mimetools.py",
+ "${libdir}/python2.7/mimetypes.py",
+ "${libdir}/python2.7/quopri.py",
+ "${libdir}/python2.7/rfc822.py",
+ "${libdir}/python2.7/uu.py"
+ ],
+ "rdepends": [
+ "contextlib",
+ "core",
+ "crypt",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "netclient",
+ "textutils"
+ ],
+ "summary": "Python MIME handling APIs"
+ },
+ "mmap": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/mmap.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python memory-mapped file support"
+ },
+ "modules": {
+ "files": [],
+ "rdepends": [
+ "2to3",
+ "argparse",
+ "audio",
+ "bsddb",
+ "codecs",
+ "compile",
+ "compiler",
+ "compression",
+ "contextlib",
+ "core",
+ "crypt",
+ "ctypes",
+ "curses",
+ "datetime",
+ "db",
+ "debugger",
+ "difflib",
+ "distutils",
+ "doctest",
+ "email",
+ "fcntl",
+ "gdbm",
+ "hotshot",
+ "html",
+ "idle",
+ "image",
+ "io",
+ "json",
+ "lang",
+ "logging",
+ "mailbox",
+ "math",
+ "mime",
+ "mmap",
+ "multiprocessing",
+ "netclient",
+ "netserver",
+ "numbers",
+ "pickle",
+ "pkgutil",
+ "plistlib",
+ "pprint",
+ "profile",
+ "pydoc",
+ "re",
+ "resource",
+ "robotparser",
+ "runpy",
+ "shell",
+ "smtpd",
+ "sqlite3",
+ "sqlite3",
+ "stringold",
+ "subprocess",
+ "syslog",
+ "terminal",
+ "textutils",
+ "threading",
+ "tkinter",
+ "unittest",
+ "unixadmin",
+ "xml",
+ "xmlrpc",
+ "zlib"
+ ],
+ "summary": "All Python modules"
+ },
+ "multiprocessing": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/_multiprocessing.so",
+ "${libdir}/python2.7/multiprocessing"
+ ],
+ "rdepends": [
+ "core",
+ "fcntl",
+ "io",
+ "pickle",
+ "subprocess",
+ "threading"
+ ],
+ "summary": "Python multiprocessing support"
+ },
+ "netclient": {
+ "files": [
+ "${libdir}/python2.7/Cookie.py",
+ "${libdir}/python2.7/_LWPCookieJar.py",
+ "${libdir}/python2.7/_MozillaCookieJar.py",
+ "${libdir}/python2.7/base64.py",
+ "${libdir}/python2.7/cookielib.py",
+ "${libdir}/python2.7/ftplib.py",
+ "${libdir}/python2.7/hmac.py",
+ "${libdir}/python2.7/httplib.py",
+ "${libdir}/python2.7/nntplib.py",
+ "${libdir}/python2.7/poplib.py",
+ "${libdir}/python2.7/smtplib.py",
+ "${libdir}/python2.7/telnetlib.py",
+ "${libdir}/python2.7/urllib.py",
+ "${libdir}/python2.7/urllib2.py",
+ "${libdir}/python2.7/urlparse.py",
+ "${libdir}/python2.7/uuid.py"
+ ],
+ "rdepends": [
+ "codecs",
+ "contextlib",
+ "core",
+ "crypt",
+ "ctypes",
+ "datetime",
+ "email",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "mime",
+ "pickle",
+ "subprocess",
+ "textutils",
+ "threading"
+ ],
+ "summary": "Python Internet Protocol clients"
+ },
+ "netserver": {
+ "files": [
+ "${libdir}/python2.7/BaseHTTPServer.py",
+ "${libdir}/python2.7/CGIHTTPServer.py",
+ "${libdir}/python2.7/SimpleHTTPServer.py",
+ "${libdir}/python2.7/SocketServer.py",
+ "${libdir}/python2.7/cgi.py"
+ ],
+ "rdepends": [
+ "compression",
+ "contextlib",
+ "core",
+ "crypt",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "mime",
+ "netclient",
+ "shell",
+ "textutils",
+ "threading",
+ "unixadmin",
+ "zlib"
+ ],
+ "summary": "Python Internet Protocol servers"
+ },
+ "numbers": {
+ "files": [
+ "${libdir}/python2.7/decimal.py",
+ "${libdir}/python2.7/fractions.py",
+ "${libdir}/python2.7/numbers.py"
+ ],
+ "rdepends": [
+ "codecs",
+ "core",
+ "lang",
+ "math",
+ "threading"
+ ],
+ "summary": "Python number APIs"
+ },
+ "pickle": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/cPickle.so",
+ "${libdir}/python2.7/pickle.py",
+ "${libdir}/python2.7/pickletools.py",
+ "${libdir}/python2.7/shelve.py"
+ ],
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "summary": "Python serialisation/persistence support"
+ },
+ "pkgutil": {
+ "files": [
+ "${libdir}/python2.7/pkgutil.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python package extension utility support"
+ },
+ "plistlib": {
+ "files": [
+ "${libdir}/python2.7/plistlib.py"
+ ],
+ "rdepends": [
+ "core",
+ "datetime",
+ "io"
+ ],
+ "summary": "Generate and parse Mac OS X .plist files"
+ },
+ "pprint": {
+ "files": [
+ "${libdir}/python2.7/pprint.py"
+ ],
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "summary": "Python pretty-print support"
+ },
+ "profile": {
+ "files": [
+ "${libdir}/python2.7/cProfile.py",
+ "${libdir}/python2.7/lib-dynload/_lsprof.so",
+ "${libdir}/python2.7/profile.py",
+ "${libdir}/python2.7/pstats.py"
+ ],
+ "rdepends": [
+ "codecs",
+ "core",
+ "lang",
+ "resource",
+ "textutils"
+ ],
+ "summary": "Python basic performance profiling support"
+ },
+ "pydoc": {
+ "files": [
+ "${bindir}/pydoc",
+ "${libdir}/python2.7/pydoc.py",
+ "${libdir}/python2.7/pydoc_data"
+ ],
+ "rdepends": [
+ "codecs",
+ "core",
+ "lang",
+ "pkgutil"
+ ],
+ "summary": "Python interactive help support"
+ },
+ "re": {
+ "files": [
+ "${libdir}/python2.7/sre.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Regular Expression APIs"
+ },
+ "resource": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/resource.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python resource control interface"
+ },
+ "robotparser": {
+ "files": [
+ "${libdir}/python2.7/robotparser.py"
+ ],
+ "rdepends": [
+ "contextlib",
+ "core",
+ "io",
+ "lang",
+ "netclient",
+ "textutils"
+ ],
+ "summary": "Python robots.txt parser"
+ },
+ "runpy": {
+ "files": [
+ "${libdir}/python2.7/runpy.py"
+ ],
+ "rdepends": [
+ "core",
+ "pkgutil"
+ ],
+ "summary": "Python helper for locating/executing scripts in module namespace"
+ },
+ "shell": {
+ "files": [
+ "${libdir}/python2.7/cmd.py",
+ "${libdir}/python2.7/commands.py",
+ "${libdir}/python2.7/dircache.py",
+ "${libdir}/python2.7/fnmatch.py",
+ "${libdir}/python2.7/glob.py",
+ "${libdir}/python2.7/popen2.py",
+ "${libdir}/python2.7/shlex.py",
+ "${libdir}/python2.7/shutil.py"
+ ],
+ "rdepends": [
+ "compression",
+ "core",
+ "io",
+ "unixadmin",
+ "zlib"
+ ],
+ "summary": "Python shell-like functionality"
+ },
+ "smtpd": {
+ "files": [
+ "${bindir}/smtpd.py",
+ "${libdir}/python2.7/asynchat.py",
+ "${libdir}/python2.7/asyncore.py",
+ "${libdir}/python2.7/smtpd.py"
+ ],
+ "rdepends": [
+ "core",
+ "fcntl",
+ "io",
+ "lang"
+ ],
+ "summary": "Python Simple Mail Transport Daemon"
+ },
+ "sqlite3": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/_sqlite3.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Sqlite3 database support"
+ },
+ "sqlite3-tests": {
+ "files": [
+ "${libdir}/python2.7/sqlite3/test"
+ ],
+ "rdepends": [
+ "core",
+ "tests"
+ ],
+ "summary": "Python Sqlite3 database support tests"
+ },
+ "stringold": {
+ "files": [
+ "${libdir}/python2.7/stringold.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python string APIs [deprecated]"
+ },
+ "subprocess": {
+ "files": [
+ "${libdir}/python2.7/subprocess.py"
+ ],
+ "rdepends": [
+ "core",
+ "fcntl",
+ "io",
+ "pickle"
+ ],
+ "summary": "Python subprocess support"
+ },
+ "syslog": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/syslog.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python syslog interface"
+ },
+ "terminal": {
+ "files": [
+ "${libdir}/python2.7/pty.py",
+ "${libdir}/python2.7/tty.py"
+ ],
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "summary": "Python terminal controlling support"
+ },
+ "tests": {
+ "files": [
+ "${libdir}/python2.7/test"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python tests"
+ },
+ "textutils": {
+ "files": [
+ "${libdir}/python2.7/csv.py",
+ "${libdir}/python2.7/lib-dynload/_csv.so",
+ "${libdir}/python2.7/optparse.py",
+ "${libdir}/python2.7/textwrap.py"
+ ],
+ "rdepends": [
+ "codecs",
+ "core",
+ "io",
+ "lang"
+ ],
+ "summary": "Python option parsin"
+ },
+ "threading": {
+ "files": [
+ "${libdir}/python2.7/Queue.py",
+ "${libdir}/python2.7/_threading_local.py",
+ "${libdir}/python2.7/dummy_thread.py",
+ "${libdir}/python2.7/dummy_threading.py",
+ "${libdir}/python2.7/mutex.py",
+ "${libdir}/python2.7/threading.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python threading & synchronization support"
+ },
+ "tkinter": {
+ "files": [
+ "${libdir}/python2.7/lib-tk"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Tcl/Tk bindings"
+ },
+ "unittest": {
+ "files": [
+ "${libdir}/python2.7/unittest"
+ ],
+ "rdepends": [
+ "core",
+ "difflib",
+ "io",
+ "lang",
+ "pprint",
+ "shell"
+ ],
+ "summary": "Python unit testing framework"
+ },
+ "unixadmin": {
+ "files": [
+ "${libdir}/python2.7/getpass.py",
+ "${libdir}/python2.7/lib-dynload/grp.so",
+ "${libdir}/python2.7/lib-dynload/nis.so"
+ ],
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "summary": "Python Unix administration support"
+ },
+ "xml": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/_elementtree.so",
+ "${libdir}/python2.7/lib-dynload/pyexpat.so",
+ "${libdir}/python2.7/xml"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python basic XML support"
+ },
+ "xmlrpc": {
+ "files": [
+ "${libdir}/python2.7/DocXMLRPCServer.py",
+ "${libdir}/python2.7/SimpleXMLRPCServer.py"
+ ],
+ "rdepends": [
+ "codecs",
+ "compression",
+ "contextlib",
+ "core",
+ "crypt",
+ "datetime",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "mime",
+ "netclient",
+ "netserver",
+ "pkgutil",
+ "pydoc",
+ "textutils",
+ "threading",
+ "xml",
+ "zlib"
+ ],
+ "summary": "Python XML-RPC support"
+ },
+ "zlib": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/zlib.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python zlib compression support"
+ }
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/sitecustomize.py b/import-layers/yocto-poky/meta/recipes-devtools/python/python/sitecustomize.py
index 2739018..4c8b5e2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/sitecustomize.py
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/sitecustomize.py
@@ -27,19 +27,11 @@
except IOError:
pass
-def __enableDefaultEncoding():
- import sys
- try:
- sys.setdefaultencoding( "utf8" )
- except LookupError:
- pass
-
import sys
try:
import rlcompleter, readline
except ImportError:
pass
else:
- __enableDefaultEncoding()
__registerExitHandler()
__enableReadlineSupport()
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-async_0.6.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-async_0.6.2.bb
index 54a30f5..0da5fde 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-async_0.6.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-async_0.6.2.bb
@@ -1,6 +1,2 @@
-require python-async.inc
-
inherit setuptools3
-
-RDEPENDS_${PN} += "python3-threading python3-lang"
-
+require python-async.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.4.bb
deleted file mode 100644
index de5a01c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.4.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Python bindings for the DBus inter-process communication system"
-SECTION = "devel/python"
-HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0b83047ce9e948b67c0facc5f233476a"
-DEPENDS = "expat dbus dbus-glib virtual/libintl"
-
-SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz \
-"
-
-SRC_URI[md5sum] = "7372a588c83a7232b4e08159bfd48fe5"
-SRC_URI[sha256sum] = "e2f1d6871f74fba23652e51d10873e54f71adab0525833c19bad9e99b1b2f9cc"
-S = "${WORKDIR}/dbus-python-${PV}"
-
-inherit distutils3-base autotools pkgconfig
-
-PACKAGECONFIG ?= ""
-PACKAGECONFIG[docs] = "--enable-html-docs,--disable-html-docs,python3-docutils-native"
-PACKAGECONFIG[api-docs] = "--enable-api-docs,--disable-api-docs,python3-docutils-native python3-epydoc-native"
-
-RDEPENDS_${PN} = "python3-io python3-logging python3-stringold python3-threading python3-xml"
-
-FILES_${PN}-dev += "${libdir}/pkgconfig"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.6.bb
new file mode 100644
index 0000000..19cbae9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.6.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Python bindings for the DBus inter-process communication system"
+SECTION = "devel/python"
+HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b03240518994df6d8c974675675e5ca4"
+DEPENDS = "expat dbus dbus-glib virtual/libintl"
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz \
+"
+
+RSRC_URI[md5sum] = "1ce1ddf2582060f8f971652ea54cc17e"
+SRC_URI[sha256sum] = "32f29c17172cdb9cb61c68b1f1a71dfe7351506fc830869029c47449bd04faeb"
+S = "${WORKDIR}/dbus-python-${PV}"
+
+inherit distutils3-base autotools pkgconfig
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[docs] = "--enable-html-docs,--disable-html-docs,python3-docutils-native"
+PACKAGECONFIG[api-docs] = "--enable-api-docs,--disable-api-docs,python3-docutils-native python3-epydoc-native"
+
+RDEPENDS_${PN} = "python3-io python3-logging python3-stringold python3-threading python3-xml"
+
+FILES_${PN}-dev += "${libdir}/pkgconfig"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.5.bb
deleted file mode 100644
index 4ac2a0e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.5.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require python-git.inc
-
-DEPENDS = "python3-gitdb"
-
-inherit setuptools3
-
-RDEPENDS_${PN} += "python3-gitdb python3-lang python3-io python3-shell python3-math python3-re python3-subprocess python3-stringold python3-unixadmin python3-enum python3-logging python3-datetime python3-netclient python3-unittest python3-argparse git"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.8.bb
new file mode 100644
index 0000000..ac320fa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.8.bb
@@ -0,0 +1,2 @@
+require python-git.inc
+inherit setuptools3
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb
deleted file mode 100644
index 80d9d46..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require python-gitdb.inc
-
-DEPENDS = "python3-async python3-smmap"
-
-inherit distutils3
-
-RDEPENDS_${PN} += "python3-smmap python3-async python3-mmap python3-lang python3-io python3-shell python3-crypt python3-compression"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_2.0.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_2.0.3.bb
new file mode 100644
index 0000000..fe15832
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_2.0.3.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-gitdb.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb
index f51ce64..4eba9ec 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb
@@ -4,17 +4,14 @@
LIC_FILES_CHKSUM = "file://LICENSE-PSF;md5=1c78a5bb3584b353496d5f6f34edb4b2 \
file://LICENSE;md5=52f28065af11d69382693b45b5a8eb54"
-SRC_URI = "https://files.pythonhosted.org/packages/source/i/iniparse/iniparse-${PV}.tar.gz \
- file://0001-Add-python-3-compatibility.patch "
+SRC_URI = "file://0001-Add-python-3-compatibility.patch "
+
SRC_URI[md5sum] = "5e573e9e9733d97623881ce9bbe5eca6"
SRC_URI[sha256sum] = "abc1ee12d2cfb2506109072d6c21e40b6c75a3fe90a9c924327d80bc0d99c054"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/iniparse/"
-inherit distutils3
+inherit pypi distutils3
RDEPENDS_${PN} += "python3-core python3-six"
DEPENDS += "python3-six"
BBCLASSEXTEND = "native nativesdk"
-
-S = "${WORKDIR}/iniparse-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb
index 2b50ffd..22ceeeb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb
@@ -1,11 +1,2 @@
-require python-mako.inc
-
inherit setuptools3
-
-RDEPENDS_${PN} = "python3-threading \
- python3-netclient \
- python3-html \
-"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
+require python-mako.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.3.bb
deleted file mode 100644
index 8cd9c88..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.3.bb
+++ /dev/null
@@ -1,84 +0,0 @@
-require recipes-devtools/python/python.inc
-
-PR = "${INC_PR}.0"
-PYTHON_MAJMIN = "3.5"
-DISTRO_SRC_URI ?= "file://sitecustomize.py"
-DISTRO_SRC_URI_linuxstdbase = ""
-SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
-file://12-distutils-prefix-is-inside-staging-area.patch \
-file://python-config.patch \
-file://0001-cross-compile-support.patch \
-file://030-fixup-include-dirs.patch \
-file://070-dont-clean-ipkg-install.patch \
-file://080-distutils-dont_adjust_files.patch \
-file://130-readline-setup.patch \
-file://150-fix-setupterm.patch \
-file://python-3.3-multilib.patch \
-file://03-fix-tkinter-detection.patch \
-file://avoid_warning_about_tkinter.patch \
-file://shutil-follow-symlink-fix.patch \
-file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
-file://sysroot-include-headers.patch \
-file://unixccompiler.patch \
-${DISTRO_SRC_URI} \
-file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
-file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
-file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \
-file://support_SOURCE_DATE_EPOCH_in_py_compile.patch \
-"
-
-SRC_URI[md5sum] = "57d1f8bfbabf4f2500273fb0706e6f21"
-SRC_URI[sha256sum] = "eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b680ed99aa60d350c65a65914494207e"
-
-# exclude pre-releases for both python 2.x and 3.x
-UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
-
-S = "${WORKDIR}/Python-${PV}"
-
-EXTRANATIVEPATH += "bzip2-native"
-DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native"
-
-inherit native
-
-require python-native-${PYTHON_MAJMIN}-manifest.inc
-
-# uninative may be used on pre glibc 2.25 systems which don't have getentropy
-EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip ac_cv_func_getentropy=no"
-
-EXTRA_OEMAKE = '\
- LIBC="" \
- STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
- STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
- LIB=${baselib} \
- ARCH=${TARGET_ARCH} \
-'
-
-# No ctypes option for python 3
-PYTHONLSBOPTS = ""
-
-do_configure_append() {
- autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
- sed -i -e 's,#define HAVE_GETRANDOM 1,/\* #undef HAVE_GETRANDOM \*/,' ${B}/pyconfig.h
-}
-
-do_install() {
- install -d ${D}${libdir}/pkgconfig
- oe_runmake 'DESTDIR=${D}' install
- if [ -e ${WORKDIR}/sitecustomize.py ]; then
- install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
- fi
- install -d ${D}${bindir}/${PN}
- install -m 0755 Parser/pgen ${D}${bindir}/${PN}
-
- # Make sure we use /usr/bin/env python
- for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
- sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
- done
-
- # Tests are large and we don't need them in the native sysroot
- rm ${D}${libdir}/python${PYTHON_MAJMIN}/test -rf
-}
-
-RPROVIDES += "python3-misc-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.5.bb
new file mode 100644
index 0000000..3098027
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.5.bb
@@ -0,0 +1,112 @@
+require recipes-devtools/python/python.inc
+
+PR = "${INC_PR}.0"
+PYTHON_MAJMIN = "3.5"
+DISTRO_SRC_URI ?= "file://sitecustomize.py"
+DISTRO_SRC_URI_linuxstdbase = ""
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
+file://12-distutils-prefix-is-inside-staging-area.patch \
+file://python-config.patch \
+file://0001-cross-compile-support.patch \
+file://030-fixup-include-dirs.patch \
+file://070-dont-clean-ipkg-install.patch \
+file://080-distutils-dont_adjust_files.patch \
+file://130-readline-setup.patch \
+file://150-fix-setupterm.patch \
+file://python-3.3-multilib.patch \
+file://03-fix-tkinter-detection.patch \
+file://avoid_warning_about_tkinter.patch \
+file://shutil-follow-symlink-fix.patch \
+file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
+file://sysroot-include-headers.patch \
+file://unixccompiler.patch \
+${DISTRO_SRC_URI} \
+file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
+file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
+file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \
+file://support_SOURCE_DATE_EPOCH_in_py_compile.patch \
+file://regen-all.patch \
+"
+
+SRC_URI[md5sum] = "f3763edf9824d5d3a15f5f646083b6e0"
+SRC_URI[sha256sum] = "063d2c3b0402d6191b90731e0f735c64830e7522348aeb7ed382a83165d45009"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b6ec515b22618f55fa07276b897bacea"
+
+# exclude pre-releases for both python 2.x and 3.x
+UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
+
+S = "${WORKDIR}/Python-${PV}"
+
+EXTRANATIVEPATH += "bzip2-native"
+DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native gdbm-native"
+
+inherit native
+
+EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip"
+
+EXTRA_OEMAKE = '\
+ LIBC="" \
+ STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
+ STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
+ LIB=${baselib} \
+ ARCH=${TARGET_ARCH} \
+'
+
+# No ctypes option for python 3
+PYTHONLSBOPTS = ""
+
+do_configure_append() {
+ autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+ sed -i -e 's,#define HAVE_GETRANDOM 1,/\* #undef HAVE_GETRANDOM \*/,' ${B}/pyconfig.h
+}
+
+# Regenerate all of the generated files
+# This ensures that pgen and friends get created during the compile phase
+#
+do_compile_prepend() {
+ # Assuming https://bugs.python.org/issue33080 has been addressed in Makefile.
+ oe_runmake regen-all
+}
+
+do_install() {
+ install -d ${D}${libdir}/pkgconfig
+ oe_runmake 'DESTDIR=${D}' install
+ if [ -e ${WORKDIR}/sitecustomize.py ]; then
+ install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
+ fi
+ install -d ${D}${bindir}/${PN}
+ install -m 0755 Parser/pgen ${D}${bindir}/${PN}
+
+ # Make sure we use /usr/bin/env python
+ for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
+ sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
+ done
+
+ # Add a symlink to the native Python so that scripts can just invoke
+ # "nativepython" and get the right one without needing absolute paths
+ # (these often end up too long for the #! parser in the kernel as the
+ # buffer is 128 bytes long).
+ ln -s python3-native/python3 ${D}${bindir}/nativepython3
+}
+
+python(){
+
+ # Read JSON manifest
+ import json
+ pythondir = d.getVar('THISDIR',True)
+ with open(pythondir+'/python3/python3-manifest.json') as manifest_file:
+ python_manifest=json.load(manifest_file)
+
+ rprovides = d.getVar('RPROVIDES').split()
+
+ # Hardcoded since it cant be python3-native-foo, should be python3-foo-native
+ pn = 'python3'
+
+ for key in python_manifest:
+ pypackage = pn + '-' + key + '-native'
+ if pypackage not in rprovides:
+ rprovides.append(pypackage)
+
+ d.setVar('RPROVIDES', ' '.join(rprovides))
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb
index 1e2ff74..8bc1f49 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb
@@ -1,28 +1,6 @@
-SUMMARY = "Extends Python unittest to make testing easier"
-DESCRIPTION = "nose extends the test loading and running features of unittest, \
-making it easier to write, find and run tests."
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/n/nose/nose-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
-SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/nose/"
-UPSTREAM_CHECK_REGEX = "/nose/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/nose-${PV}"
-
inherit setuptools3
+require python-nose.inc
do_install_append() {
mv ${D}${bindir}/nosetests ${D}${bindir}/nosetests3
}
-
-RDEPENDS_${PN}_class-target = "\
- python3-unittest \
- "
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.1.bb
deleted file mode 100644
index 9b907a2..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.1.bb
+++ /dev/null
@@ -1,56 +0,0 @@
-SUMMARY = "The PyPA recommended tool for installing Python packages"
-sHOMEPAGEsss = "https://pypi.python.org/pypi/pip"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=25fba45109565f87de20bae85bc39452"
-
-SRCNAME = "pip"
-DEPENDS += "python3 python3-setuptools-native"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "35f01da33009719497f01a4ba69d63c9"
-SRC_URI[sha256sum] = "09f243e1a7b461f654c26a725fa373211bb7ff17a9300058b205c61658ca940d"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pip"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit distutils3
-
-DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}"
-
-do_install_prepend() {
- install -d ${D}${PYTHON_SITEPACKAGES_DIR}
-}
-
-# Use setuptools site.py instead, avoid shared state issue
-do_install_append() {
- rm ${D}${PYTHON_SITEPACKAGES_DIR}/site.py
- rm ${D}${PYTHON_SITEPACKAGES_DIR}/__pycache__/site.cpython-*.pyc
-
- # Install as pip3 and leave pip2 as default
- rm ${D}/${bindir}/pip
-
- # Installed eggs need to be passed directly to the interpreter via a pth file
- echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}-${PV}.pth
-
- # Make sure we use /usr/bin/env python3
- for PYTHSCRIPT in `grep -rIl ${bindir} ${D}${bindir}/pip3*`; do
- sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
- done
-}
-
-RDEPENDS_${PN} = "\
- python3-compile \
- python3-io \
- python3-enum \
- python3-html \
- python3-json \
- python3-netserver \
- python3-setuptools \
- python3-unixadmin \
- python3-xmlrpc \
-"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.2.bb
new file mode 100644
index 0000000..53fd6dc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.2.bb
@@ -0,0 +1,48 @@
+SUMMARY = "The PyPA recommended tool for installing Python packages"
+HOMEPAGE = "https://pypi.python.org/pypi/pip"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=25fba45109565f87de20bae85bc39452"
+
+DEPENDS += "python3 python3-setuptools-native"
+
+SRC_URI[md5sum] = "2fddd680422326b9d1fbf56112cf341d"
+SRC_URI[sha256sum] = "88110a224e9d30e5d76592a0b2130ef10e7e67a6426e8617bb918fffbfe91fe5"
+
+inherit pypi distutils3
+
+DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}"
+
+do_install_prepend() {
+ install -d ${D}${PYTHON_SITEPACKAGES_DIR}
+}
+
+# Use setuptools site.py instead, avoid shared state issue
+do_install_append() {
+ rm ${D}${PYTHON_SITEPACKAGES_DIR}/site.py
+ rm ${D}${PYTHON_SITEPACKAGES_DIR}/__pycache__/site.cpython-*.pyc
+
+ # Install as pip3 and leave pip2 as default
+ rm ${D}/${bindir}/pip
+
+ # Installed eggs need to be passed directly to the interpreter via a pth file
+ echo "./${PYPI_PACKAGE}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/${PYPI_PACKAGE}-${PV}.pth
+
+ # Make sure we use /usr/bin/env python3
+ for PYTHSCRIPT in `grep -rIl ${bindir} ${D}${bindir}/pip3*`; do
+ sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
+ done
+}
+
+RDEPENDS_${PN} = "\
+ python3-compile \
+ python3-io \
+ python3-html \
+ python3-json \
+ python3-netserver \
+ python3-setuptools \
+ python3-unixadmin \
+ python3-xmlrpc \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb
deleted file mode 100644
index 9258ba1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "Python bindings for the Cairo canvas library"
-HOMEPAGE = "http://cairographics.org/pycairo"
-BUGTRACKER = "http://bugs.freedesktop.org"
-SECTION = "python-devel"
-LICENSE = "LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-# cairo >= 1.8.8
-DEPENDS = "cairo"
-PR = "r2"
-
-SRC_URI = "http://cairographics.org/releases/pycairo-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "e6fd3f2f1e6a72e0db0868c4985669c5"
-SRC_URI[sha256sum] = "9aa4078e7eb5be583aeabbe8d87172797717f95e8c4338f0d4a17b683a7253be"
-
-S = "${WORKDIR}/pycairo-${PV}"
-
-inherit distutils3 pkgconfig
-
-CFLAGS += "-fPIC"
-
-BBCLASSEXTEND = "native"
-
-do_configure() {
- PYTHON=${PYTHON} ./waf configure --prefix=${D}${prefix} --libdir=${D}${libdir}
-}
-
-do_compile() {
- ./waf build ${PARALLEL_MAKE}
-}
-
-do_install() {
- ./waf install
- sed \
- -e 's:@prefix@:${prefix}:' \
- -e 's:@VERSION@:${PV}:' \
- -e 's:@includedir@:${includedir}:' \
- py3cairo.pc.in > py3cairo.pc
- install -m 0644 py3cairo.pc ${D}${libdir}/pkgconfig/
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.15.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.15.6.bb
new file mode 100644
index 0000000..5c3e1e6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.15.6.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Python bindings for the Cairo canvas library"
+HOMEPAGE = "http://cairographics.org/pycairo"
+BUGTRACKER = "http://bugs.freedesktop.org"
+SECTION = "python-devel"
+LICENSE = "LGPLv2.1 & MPLv1.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f2e071ab72978431b294a0d696327421 \
+ file://COPYING-LGPL-2.1;md5=fad9b3332be894bab9bc501572864b29 \
+ file://COPYING-MPL-1.1;md5=bfe1f75d606912a4111c90743d6c7325"
+
+# cairo >= 1.14
+DEPENDS = "cairo"
+
+SRC_URI = "https://github.com/pygobject/pycairo/releases/download/v${PV}/pycairo-${PV}.tar.gz"
+UPSTREAM_CHECK_URI = "https://github.com/pygobject/pycairo/releases/"
+
+SRC_URI[md5sum] = "3ff210c34e7b052590e15fd0fb147766"
+SRC_URI[sha256sum] = "ad150ea637860836b66705e0513b8e59494538f0b80497ad3462051368755016"
+
+S = "${WORKDIR}/pycairo-${PV}"
+
+inherit setuptools3 pkgconfig
+
+CFLAGS += "-fPIC"
+
+BBCLASSEXTEND = "native"
+
+do_install_append() {
+ install -d ${D}${includedir}/pycairo/
+ install -m 0644 ${D}${datadir}/include/pycairo/py3cairo.h ${D}${includedir}/pycairo/
+}
+FILES_${PN} += "${datadir}/include/pycairo/py3cairo.h"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-Don-t-use-gnome-common-macros.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-Don-t-use-gnome-common-macros.patch
deleted file mode 100644
index aaedb58..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-Don-t-use-gnome-common-macros.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 206360744cedff20eae3c8fcfde9938fdae99592 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Thu, 6 Jul 2017 11:47:21 +0300
-Subject: [PATCH] configure.ac: Don't use gnome-common macros
-
-remove GNOME_COMPILE_WARNINGS() call: it's from gnome-common which
-is deprecated.
-
-This patch can be removed when upgrading to 3.25.1: at that point
-pygobject needs autoconf-archive instead.
-
-Upstream-Status: Inappropriate [Already handled upstream]
-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 1f15b3c..5cb170f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -221,8 +221,6 @@ AC_ARG_WITH(common,
- with_common=yes)
- AM_CONDITIONAL(WITH_COMMON, test "$with_common" = "yes")
-
--# compiler warnings, errors, required cflags, and code coverage support
--GNOME_COMPILE_WARNINGS([maximum], [-Wno-error=missing-prototypes])
- AC_MSG_CHECKING(for Gnome code coverage support)
- m4_ifdef([GNOME_CODE_COVERAGE],
- [AC_MSG_RESULT(yes)
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
deleted file mode 100644
index a391f7e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 5e5350d730f85957a42c6d846d347d080e7dd996 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 23 Oct 2015 12:40:34 +0300
-Subject: [PATCH] configure.ac: add sysroot path to GI_DATADIR; don't set
- introspection scanner and compiler paths
-
-Upstream-Status: Pending [review on oe-core maillist]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure.ac | 8 +-------
- 1 file changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 2c0cfbd..cfcb3bf 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -194,7 +194,7 @@ PKG_CHECK_MODULES(GI,
- gobject-introspection-1.0 >= introspection_required_version
- )
-
--GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
-+GI_DATADIR=$PKG_CONFIG_SYSROOT_DIR$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
- AC_SUBST(GI_DATADIR)
-
- if test "$enable_cairo" != no; then
-@@ -219,12 +219,6 @@ AC_ARG_WITH(common,
- with_common=yes)
- AM_CONDITIONAL(WITH_COMMON, test "$with_common" = "yes")
-
--INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
--INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
--
--AC_SUBST(INTROSPECTION_SCANNER)
--AC_SUBST(INTROSPECTION_COMPILER)
--
- # compiler warnings, errors, required cflags, and code coverage support
- GNOME_COMPILE_WARNINGS([maximum])
- AC_MSG_CHECKING(for Gnome code coverage support)
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.24.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.24.1.bb
deleted file mode 100644
index 9d10af2..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.24.1.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Python GObject bindings"
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
-
-inherit autotools pkgconfig gnomebase distutils3-base gobject-introspection upstream-version-is-even
-
-DEPENDS += "python3 glib-2.0"
-
-SRCNAME="pygobject"
-SRC_URI = " \
- http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \
- file://0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch \
- file://0001-configure.ac-Don-t-use-gnome-common-macros.patch \
-"
-
-SRC_URI[md5sum] = "69a843311d0f0385dff376e11a2d83d2"
-SRC_URI[sha256sum] = "a628a95aa0909e13fb08230b1b98fc48adef10b220932f76d62f6821b3fdbffd"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-
-PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wayland', 'x11' ], 'cairo', '', d)}"
-
-# python3-pycairo is checked on configuration -> DEPENDS
-# we don't link against python3-pycairo -> RDEPENDS
-PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo python3-pycairo, python3-pycairo"
-
-RDEPENDS_${PN} += "python3-setuptools python3-importlib"
-
-BBCLASSEXTEND = "native"
-PACKAGECONFIG_class-native = ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.28.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.28.1.bb
new file mode 100644
index 0000000..97286f4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.28.1.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Python GObject bindings"
+SECTION = "devel/python"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
+
+inherit gnomebase distutils3-base gobject-introspection upstream-version-is-even
+
+DEPENDS += "python3 glib-2.0"
+
+SRCNAME="pygobject"
+SRC_URI = " \
+ http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \
+"
+
+SRC_URI[md5sum] = "612e9e2863d117d810e78672f7bc3ad6"
+SRC_URI[sha256sum] = "42312b4a5015571fa0a4f2d201005da46b71c251ea2625bc95702d071c4ff895"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wayland', 'x11' ], 'cairo', '', d)}"
+
+# python3-pycairo is checked on configuration -> DEPENDS
+# we don't link against python3-pycairo -> RDEPENDS
+PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo python3-pycairo, python3-pycairo"
+
+RDEPENDS_${PN} += "python3-setuptools"
+
+BBCLASSEXTEND = "native"
+PACKAGECONFIG_class-native = ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_36.2.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_36.2.7.bb
deleted file mode 100644
index a7bca97..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_36.2.7.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-require python-setuptools.inc
-
-DEPENDS += "python3"
-DEPENDS_class-native += "python3-native"
-DEPENDS_class-nativesdk += "nativesdk-python3"
-
-inherit setuptools3
-
-do_install_append() {
- mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
-}
-
-RDEPENDS_${PN}_class-native = "\
- python3-distutils \
- python3-compression \
-"
-RDEPENDS_${PN} = "\
- python3-ctypes \
- python3-distutils \
- python3-email \
- python3-importlib \
- python3-numbers \
- python3-compression \
- python3-shell \
- python3-subprocess \
- python3-textutils \
- python3-pkgutil \
- python3-threading \
- python3-misc \
- python3-unittest \
- python3-xml \
-"
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_39.0.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_39.0.0.bb
new file mode 100644
index 0000000..0dc1ed8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_39.0.0.bb
@@ -0,0 +1,6 @@
+require python-setuptools.inc
+inherit setuptools3
+
+do_install_append() {
+ mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.10.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.10.0.bb
deleted file mode 100644
index 38a47b7..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.10.0.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-inherit setuptools3
-require python-six.inc
-
-RDEPENDS_${PN} += "python3-io"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.11.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.11.0.bb
new file mode 100644
index 0000000..8795313
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.11.0.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-six.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-smmap_0.9.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-smmap_0.9.0.bb
index 9f8a26d..e87b8df8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-smmap_0.9.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-smmap_0.9.0.bb
@@ -1,5 +1,2 @@
-require python-smmap.inc
-
inherit setuptools3
-
-RDEPENDS_${PN} += "python3-codecs python3-mmap python3-lang"
+require python-smmap.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch
index 118d75d..7cd7e3b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch
@@ -1,4 +1,4 @@
-From 624c029abcc73c724020ccea9a2b4b5b5c00f2a6 Mon Sep 17 00:00:00 2001
+From ecde3ea170999a9ef734e8af4d7c25be5ba81697 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 31 Mar 2017 15:42:46 +0300
Subject: [PATCH] cross-compile support
@@ -8,60 +8,63 @@
-Khem
+Rebased on 3.5.4
+
Upstream-Status: Inappropriate[Configuration Specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+Signed-off-by: Derek Straka <derek@asterius.io>
---
Makefile.pre.in | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
-index a88b7d5..7cb8bb3 100644
+index 144c1f8629..f252ac2417 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -221,6 +221,7 @@ LIBOBJS= @LIBOBJS@
-
+@@ -223,6 +223,7 @@ LIBOBJS= @LIBOBJS@
+
PYTHON= python$(EXE)
BUILDPYTHON= python$(BUILDEXE)
+HOSTPYTHON= $(BUILDPYTHON)
-
- PYTHON_FOR_GEN=@PYTHON_FOR_GEN@
+
+ PYTHON_FOR_REGEN=@PYTHON_FOR_REGEN@
PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
-@@ -280,6 +281,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
+@@ -277,6 +278,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
##########################################################################
# Parser
PGEN= Parser/pgen$(EXE)
+HOSTPGEN= $(PGEN)$(EXE)
-
+
PSRCS= \
Parser/acceler.c \
-@@ -510,7 +512,7 @@ build_all_generate_profile:
-
+@@ -478,7 +480,7 @@ build_all_generate_profile:
+
run_profile_task:
: # FIXME: can't run for a cross build
- $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
+ $(LLVM_PROF_FILE) $(RUNSHARED) $(HOSTPYTHON) $(PROFILE_TASK) || true
-
+
build_all_merge_profile:
$(LLVM_PROF_MERGER)
-@@ -787,7 +789,7 @@ $(IO_OBJS): $(IO_H)
-
- $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN)
+@@ -772,7 +774,7 @@ regen-grammar: $(PGEN)
+ # Regenerate Include/graminit.h and Python/graminit.c
+ # from Grammar/Grammar using pgen
@$(MKDIR_P) Include
-- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H)
- touch $(GRAMMAR_C)
-
-@@ -976,7 +978,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS)
+- $(PGEN) $(srcdir)/Grammar/Grammar \
++ $(HOSTPGEN) $(srcdir)/Grammar/Grammar \
+ $(srcdir)/Include/graminit.h \
+ $(srcdir)/Python/graminit.c
+
+@@ -978,7 +980,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS)
######################################################################
-
+
TESTOPTS= $(EXTRATESTOPTS)
-TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS)
+TESTPYTHON= $(RUNSHARED) $(HOSTPYTHON) $(TESTPYTHONOPTS)
TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py
TESTTIMEOUT= 3600
-
-@@ -1468,7 +1470,7 @@ frameworkinstallstructure: $(LDLIBRARY)
+
+@@ -1470,7 +1472,7 @@ frameworkinstallstructure: $(LDLIBRARY)
fi; \
done
$(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers
@@ -70,24 +73,24 @@
$(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
$(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
-@@ -1534,7 +1536,7 @@ config.status: $(srcdir)/configure
-
+@@ -1543,7 +1545,7 @@ Python/dtoa.o: Python/dtoa.c
+
# Run reindent on the library
reindent:
- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
+ $(HOSTPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
-
+
# Rerun configure with the same options as it was run last time,
# provided the config.status script exists
-@@ -1674,7 +1676,7 @@ funny:
-
+@@ -1678,7 +1680,7 @@ funny:
+
# Perform some verification checks on any modified files.
- patchcheck: all
+ patchcheck: @DEF_MAKE_RULE@
- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
-+ $(RUNSHARED) ./$(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
-
++ $(RUNSHARED) $(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
+
# Dependencies
-
---
+
+--
2.11.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
index 789929b..f9971c6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
@@ -8,9 +8,11 @@
Makefile.pre.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -1306,8 +1306,8 @@ touch:
+Index: Python-3.5.3/Makefile.pre.in
+===================================================================
+--- Python-3.5.3.orig/Makefile.pre.in
++++ Python-3.5.3/Makefile.pre.in
+@@ -1574,8 +1574,8 @@ touch:
# Sanitation targets -- clean leaves libraries, executables and tags
# files, which clobber removes as well
pycremoval:
@@ -21,7 +23,7 @@
rmtestturds:
-rm -f *BAD *GOOD *SKIPPED
-@@ -1321,9 +1321,9 @@ docclean:
+@@ -1589,9 +1589,9 @@ docclean:
-rm -rf Doc/tools/sphinx Doc/tools/pygments Doc/tools/docutils
clean: pycremoval
@@ -32,5 +34,5 @@
+ find . ! -path './ipkg-install/*' -name '*.s[ol]' -exec rm -f {} ';'
+ find . ! -path './ipkg-install/*' -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
find build -name 'fficonfig.h' -exec rm -f {} ';' || true
- find build -name 'fficonfig.py' -exec rm -f {} ';' || true
- -rm -f Lib/lib2to3/*Grammar*.pickle
+ find build -name '*.py' -exec rm -f {} ';' || true
+ find build -name '*.py[co]' -exec rm -f {} ';' || true
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/Fix-29519-weakref-spewing-exceptions-during-interp-f.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/Fix-29519-weakref-spewing-exceptions-during-interp-f.patch
deleted file mode 100644
index 7217c6e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/Fix-29519-weakref-spewing-exceptions-during-interp-f.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 62dcf34987b680e95873eb947b3f4d802199c667 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=C5=81ukasz=20Langa?= <lukasz@langa.pl>
-Date: Fri, 10 Feb 2017 00:14:55 -0800
-Subject: [PATCH] Fix #29519: weakref spewing exceptions during interp
- finalization
-
-commit 9cd7e17640a49635d1c1f8c2989578a8fc2c1de6
-from https://github.com/python/cpython
-
-Upstream-Status: Backport
-
-Signed-off-by: Lukasz Langa <lukasz@langa.pl>
----
- Lib/weakref.py | 4 ++--
- Misc/NEWS | 3 +++
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/Lib/weakref.py b/Lib/weakref.py
-index aaebd0c..787e33a 100644
---- a/Lib/weakref.py
-+++ b/Lib/weakref.py
-@@ -106,7 +106,7 @@ class WeakValueDictionary(collections.MutableMapping):
- self, *args = args
- if len(args) > 1:
- raise TypeError('expected at most 1 arguments, got %d' % len(args))
-- def remove(wr, selfref=ref(self)):
-+ def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref):
- self = selfref()
- if self is not None:
- if self._iterating:
-@@ -114,7 +114,7 @@ class WeakValueDictionary(collections.MutableMapping):
- else:
- # Atomic removal is necessary since this function
- # can be called asynchronously by the GC
-- _remove_dead_weakref(d, wr.key)
-+ _atomic_removal(d, wr.key)
- self._remove = remove
- # A list of keys to be removed
- self._pending_removals = []
-diff --git a/Misc/NEWS b/Misc/NEWS
-index 41cfdba..6d89f52 100644
---- a/Misc/NEWS
-+++ b/Misc/NEWS
-@@ -5719,6 +5719,9 @@ Core and Builtins
- Library
- -------
-
-+- Issue #29519: Fix weakref spewing exceptions during interpreter shutdown
-+ when used with a rare combination of multiprocessing and custom codecs.
-+
- - Issue #20154: Deadlock in asyncio.StreamReader.readexactly().
-
- - Issue #16113: Remove sha3 module again.
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
index 3347321..a3cc48c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
@@ -7,13 +7,16 @@
Also simply disable the tk module since its not in DEPENDS.
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-Index: Python-2.7.2/setup.py
+Index: Python-3.5.3/setup.py
===================================================================
---- Python-2.7.2.orig/setup.py 2012-04-05 23:18:38.500136647 +0300
-+++ Python-2.7.2/setup.py 2012-04-05 23:19:35.888134969 +0300
-@@ -1634,8 +1634,10 @@
+--- Python-3.5.3.orig/setup.py
++++ Python-3.5.3/setup.py
+@@ -1558,10 +1558,12 @@ class PyBuildExt(build_ext):
+ self.extensions.extend(exts)
+
# Call the method for detecting whether _tkinter can be compiled
- self.detect_tkinter(inc_dirs, lib_dirs)
+- self.detect_tkinter(inc_dirs, lib_dirs)
++ # self.detect_tkinter(inc_dirs, lib_dirs)
- if '_tkinter' not in [e.name for e in self.extensions]:
- missing.append('_tkinter')
@@ -22,18 +25,5 @@
+ #if '_tkinter' not in [e.name for e in self.extensions]:
+ # missing.append('_tkinter')
- return missing
-
-diff --git Python-3.5.1.orig/setup.py Python-3.5.1/setup.py
-index b4633b9..d7588c0 100644
---- Python-3.5.1.orig/setup.py
-+++ Python-3.5.1/setup.py
-@@ -1536,7 +1536,7 @@ class PyBuildExt(build_ext):
- self.extensions.extend(exts)
-
- # Call the method for detecting whether _tkinter can be compiled
-- self.detect_tkinter(inc_dirs, lib_dirs)
-+ # self.detect_tkinter(inc_dirs, lib_dirs)
-
- # tkinter module will not be avalaible as yocto
- # doesn't have tk integrated (yet)
+ ## # Uncomment these lines if you want to play with xxmodule.c
+ ## ext = Extension('xx', ['xxmodule.c'])
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/create_manifest3.py b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/create_manifest3.py
new file mode 100644
index 0000000..2f944f9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/create_manifest3.py
@@ -0,0 +1,354 @@
+# This script is used as a bitbake task to create a new python manifest
+# $ bitbake python -c create_manifest
+#
+# Our goal is to keep python-core as small as posible and add other python
+# packages only when the user needs them, hence why we split upstream python
+# into several packages.
+#
+# In a very simplistic way what this does is:
+# Launch python and see specifically what is required for it to run at a minimum
+#
+# Go through the python-manifest file and launch a separate task for every single
+# one of the files on each package, this task will check what was required for that
+# specific module to run, these modules will be called dependencies.
+# The output of such task will be a list of the modules or dependencies that were
+# found for that file.
+#
+# Such output will be parsed by this script, we will look for each dependency on the
+# manifest and if we find that another package already includes it, then we will add
+# that package as an RDEPENDS to the package we are currently checking; in case we dont
+# find the current dependency on any other package we will add it to the current package
+# as part of FILES.
+#
+#
+# This way we will create a new manifest from the data structure that was built during
+# this process, ont this new manifest each package will contain specifically only
+# what it needs to run.
+#
+# There are some caveats which we try to deal with, such as repeated files on different
+# packages, packages that include folders, wildcards, and special packages.
+# Its also important to note that this method only works for python files, and shared
+# libraries. Static libraries, header files and binaries need to be dealt with manually.
+#
+# This script differs from its python2 version mostly on how shared libraries are handled
+# The manifest file for python3 has an extra field which contains the cached files for
+# each package.
+# Tha method to handle cached files does not work when a module includes a folder which
+# itself contains the pycache folder, gladly this is almost never the case.
+#
+# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
+
+
+import sys
+import subprocess
+import json
+import os
+
+# Hack to get native python search path (for folders), not fond of it but it works for now
+pivot='recipe-sysroot-native'
+for p in sys.path:
+ if pivot in p:
+ nativelibfolder=p[:p.find(pivot)+len(pivot)]
+
+# Empty dict to hold the whole manifest
+new_manifest = {}
+
+# Check for repeated files, folders and wildcards
+allfiles=[]
+repeated=[]
+wildcards=[]
+
+hasfolders=[]
+allfolders=[]
+
+def isFolder(value):
+ if os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib64')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib32')):
+ return True
+ else:
+ return False
+
+def isCached(item):
+ if '__pycache__' in item:
+ return True
+ else:
+ return False
+
+# Read existing JSON manifest
+with open('python3-manifest.json') as manifest:
+ old_manifest=json.load(manifest)
+
+
+# First pass to get core-package functionality, because we base everything on the fact that core is actually working
+# Not exactly the same so it should not be a function
+print ('Getting dependencies for package: core')
+
+# Special call to check for core package
+output = subprocess.check_output([sys.executable, 'get_module_deps3.py', 'python-core-package']).decode('utf8')
+for item in output.split():
+ # We append it so it doesnt hurt what we currently have:
+ if isCached(item):
+ if item not in old_manifest['core']['cached']:
+ # We use the same data structure since its the one which will be used to check
+ # dependencies for other packages
+ old_manifest['core']['cached'].append(item)
+ else:
+ if item not in old_manifest['core']['files']:
+ # We use the same data structure since its the one which will be used to check
+ # dependencies for other packages
+ old_manifest['core']['files'].append(item)
+
+for value in old_manifest['core']['files']:
+ # Ignore folders, since we don't import those, difficult to handle multilib
+ if isFolder(value):
+ # Pass it directly
+ if isCached(value):
+ if value not in old_manifest['core']['cached']:
+ old_manifest['core']['cached'].append(value)
+ else:
+ if value not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(value)
+ continue
+ # Ignore binaries, since we don't import those, assume it was added correctly (manually)
+ if '${bindir}' in value:
+ # Pass it directly
+ if value not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(value)
+ continue
+ # Ignore empty values
+ if value == '':
+ continue
+ if '${includedir}' in value:
+ if value not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(value)
+ continue
+ # Get module name , shouldnt be affected by libdir/bindir
+ value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0]
+
+ # Launch separate task for each module for deterministic behavior
+ # Each module will only import what is necessary for it to work in specific
+ print ('Getting dependencies for module: %s' % value)
+ output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % value]).decode('utf8')
+ print ('The following dependencies were found for module %s:\n' % value)
+ print (output)
+ for item in output.split():
+ # We append it so it doesnt hurt what we currently have:
+ if isCached(item):
+ if item not in old_manifest['core']['cached']:
+ # We use the same data structure since its the one which will be used to check
+ # dependencies for other packages
+ old_manifest['core']['cached'].append(item)
+ else:
+ if item not in old_manifest['core']['files']:
+ # We use the same data structure since its the one which will be used to check
+ # dependencies for other packages
+ old_manifest['core']['files'].append(item)
+
+
+# We check which packages include folders
+for key in old_manifest:
+ for value in old_manifest[key]['files']:
+ # Ignore folders, since we don't import those, difficult to handle multilib
+ if isFolder(value):
+ print ('%s is a folder' % value)
+ if key not in hasfolders:
+ hasfolders.append(key)
+ if value not in allfolders:
+ allfolders.append(value)
+
+for key in old_manifest:
+ # Use an empty dict as data structure to hold data for each package and fill it up
+ new_manifest[key]={}
+ new_manifest[key]['files']=[]
+
+ new_manifest[key]['rdepends']=[]
+ # All packages should depend on core
+ if key != 'core':
+ new_manifest[key]['rdepends'].append('core')
+ new_manifest[key]['cached']=[]
+ else:
+ new_manifest[key]['cached']=old_manifest[key]['cached']
+ new_manifest[key]['summary']=old_manifest[key]['summary']
+
+ # Handle special cases, we assume that when they were manually added
+ # to the manifest we knew what we were doing.
+ print('\n')
+ print('--------------------------')
+ print ('Handling package %s' % key)
+ print('--------------------------')
+ special_packages=['misc', 'modules', 'dev']
+ if key in special_packages or 'staticdev' in key:
+ print('Passing %s package directly' % key)
+ new_manifest[key]=old_manifest[key]
+ continue
+
+ for value in old_manifest[key]['files']:
+ # We already handled core on the first pass
+ if key == 'core':
+ new_manifest[key]['files'].append(value)
+ continue
+ # Ignore folders, since we don't import those, difficult to handle multilib
+ if isFolder(value):
+ # Pass folders directly
+ new_manifest[key]['files'].append(value)
+ # Ignore binaries, since we don't import those
+ if '${bindir}' in value:
+ # Pass it directly to the new manifest data structure
+ if value not in new_manifest[key]['files']:
+ new_manifest[key]['files'].append(value)
+ continue
+ # Ignore empty values
+ if value == '':
+ continue
+ if '${includedir}' in value:
+ if value not in new_manifest[key]['files']:
+ new_manifest[key]['files'].append(value)
+ continue
+
+ # Get module name , shouldnt be affected by libdir/bindir
+ # We need to check if the imported module comes from another (e.g. sqlite3.dump)
+ path,value = os.path.split(value)
+ path = os.path.basename(path)
+ value = os.path.splitext(os.path.basename(value))[0]
+
+ # If this condition is met, it means we need to import it from another module
+ # or its the folder itself (e.g. unittest)
+ if path == key:
+ if value:
+ value = path + '.' + value
+ else:
+ value = path
+
+ # Launch separate task for each module for deterministic behavior
+ # Each module will only import what is necessary for it to work in specific
+ print ('\nGetting dependencies for module: %s' % value)
+ output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % value]).decode('utf8')
+ # We can print dependencies for debugging purposes
+ print ('The following dependencies were found for module %s:\n' % value)
+ print (output)
+ # Output will have all dependencies
+
+ reportFILES = []
+ reportRDEPS = []
+
+ for item in output.split():
+
+ # Warning: This first part is ugly
+ # One of the dependencies that was found, could be inside of one of the folders included by another package
+ # We need to check if this happens so we can add the package containing the folder as an rdependency
+ # e.g. Folder encodings contained in codecs
+ # This would be solved if no packages included any folders
+
+ # This can be done in two ways:
+ # 1 - We assume that if we take out the filename from the path we would get
+ # the folder string, then we would check if folder string is in the list of folders
+ # This would not work if a package contains a folder which contains another folder
+ # e.g. path/folder1/folder2/filename folder_string= path/folder1/folder2
+ # folder_string would not match any value contained in the list of folders
+ #
+ # 2 - We do it the other way around, checking if the folder is contained in the path
+ # e.g. path/folder1/folder2/filename folder_string= path/folder1/folder2
+ # is folder_string inside path/folder1/folder2/filename?,
+ # Yes, it works, but we waste a couple of milliseconds.
+
+ inFolders=False
+ for folder in allfolders:
+ if folder in item:
+ inFolders = True # Did we find a folder?
+ folderFound = False # Second flag to break inner for
+ # Loop only through packages which contain folders
+ for keyfolder in hasfolders:
+ if (folderFound == False):
+ #print('Checking folder %s on package %s' % (item,keyfolder))
+ for file_folder in old_manifest[keyfolder]['files'] or file_folder in old_manifest[keyfolder]['cached']:
+ if file_folder==folder:
+ print ('%s folder found in %s' % (folder, keyfolder))
+ folderFound = True
+ if keyfolder not in new_manifest[key]['rdepends'] and keyfolder != key:
+ new_manifest[key]['rdepends'].append(keyfolder)
+
+ else:
+ break
+
+ # A folder was found so we're done with this item, we can go on
+ if inFolders:
+ continue
+
+
+ # We might already have it on the dictionary since it could depend on a (previously checked) module
+ if item not in new_manifest[key]['files'] and item not in new_manifest[key]['cached']:
+ # Handle core as a special package, we already did it so we pass it to NEW data structure directly
+ if key=='core':
+ print('Adding %s to %s FILES' % (item, key))
+ if item.endswith('*'):
+ wildcards.append(item)
+ if isCached(item):
+ new_manifest[key]['cached'].append(item)
+ else:
+ new_manifest[key]['files'].append(item)
+
+ # Check for repeated files
+ if item not in allfiles:
+ allfiles.append(item)
+ else:
+ repeated.append(item)
+
+ else:
+
+
+ # Check if this dependency is already contained on another package, so we add it
+ # as an RDEPENDS, or if its not, it means it should be contained on the current
+ # package, so we should add it to FILES
+ for newkey in old_manifest:
+ # Debug
+ #print('Checking %s ' % item + ' in %s' % newkey)
+ if item in old_manifest[newkey]['files'] or item in old_manifest[newkey]['cached']:
+ # Since were nesting, we need to check its not the same key
+ if(newkey!=key):
+ if newkey not in new_manifest[key]['rdepends']:
+ # Add it to the new manifest data struct
+ reportRDEPS.append('Adding %s to %s RDEPENDS, because it contains %s\n' % (newkey, key, item))
+ new_manifest[key]['rdepends'].append(newkey)
+ break
+ else:
+ # A module shouldn't contain itself (${libdir}/python3/sqlite3 shouldnt be on sqlite3 files)
+ if os.path.basename(item) != key:
+ reportFILES.append(('Adding %s to %s FILES\n' % (item, key)))
+ # Since it wasnt found on another package, its not an RDEP, so add it to FILES for this package
+ if isCached(item):
+ new_manifest[key]['cached'].append(item)
+ else:
+ new_manifest[key]['files'].append(item)
+
+ if item.endswith('*'):
+ wildcards.append(item)
+ if item not in allfiles:
+ allfiles.append(item)
+ else:
+ repeated.append(item)
+
+ print('\n')
+ print('#################################')
+ print('Summary for module %s' % value)
+ print('FILES found for module %s:' % value)
+ print(''.join(reportFILES))
+ print('RDEPENDS found for module %s:' % value)
+ print(''.join(reportRDEPS))
+ print('#################################')
+
+print ('The following files are repeated (contained in more than one package), please check which package should get it:')
+print (repeated)
+print('The following files contain wildcards, please check they are necessary')
+print(wildcards)
+print('The following files contain folders, please check they are necessary')
+print(hasfolders)
+
+# Sort it just so it looks nicer
+for key in new_manifest:
+ new_manifest[key]['files'].sort()
+ new_manifest[key]['cached'].sort()
+ new_manifest[key]['rdepends'].sort()
+
+# Create the manifest from the data structure that was built
+with open('python3-manifest.json.new','w') as outfile:
+ json.dump(new_manifest,outfile,sort_keys=True, indent=4)
+ outfile.write('\n')
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/get_module_deps3.py b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/get_module_deps3.py
new file mode 100644
index 0000000..fd12baa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/get_module_deps3.py
@@ -0,0 +1,146 @@
+# This script is launched on separate task for each python module
+# It checks for dependencies for that specific module and prints
+# them out, the output of this execution will have all dependencies
+# for a specific module, which will be parsed an dealt on create_manifest.py
+#
+# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
+
+# We can get a log per module, for all the dependencies that were found, but its messy.
+debug=False
+
+import sys
+
+# We can get a list of the modules which are currently required to run python
+# so we run python-core and get its modules, we then import what we need
+# and check what modules are currently running, if we substract them from the
+# modules we had initially, we get the dependencies for the module we imported.
+
+# We use importlib to achieve this, so we also need to know what modules importlib needs
+import importlib
+
+core_deps=set(sys.modules)
+
+def fix_path(dep_path):
+ import os
+ # We DONT want the path on our HOST system
+ pivot='recipe-sysroot-native'
+ dep_path=dep_path[dep_path.find(pivot)+len(pivot):]
+
+ if '/usr/bin' in dep_path:
+ dep_path = dep_path.replace('/usr/bin''${bindir}')
+
+ # Handle multilib, is there a better way?
+ if '/usr/lib32' in dep_path:
+ dep_path = dep_path.replace('/usr/lib32','${libdir}')
+ if '/usr/lib64' in dep_path:
+ dep_path = dep_path.replace('/usr/lib64','${libdir}')
+ if '/usr/lib' in dep_path:
+ dep_path = dep_path.replace('/usr/lib','${libdir}')
+ if '/usr/include' in dep_path:
+ dep_path = dep_path.replace('/usr/include','${includedir}')
+ if '__init__.' in dep_path:
+ dep_path = os.path.split(dep_path)[0]
+ return dep_path
+
+
+# Module to import was passed as an argument
+current_module = str(sys.argv[1]).rstrip()
+if(debug==True):
+ log = open('log_%s' % current_module,'w')
+ log.write('Module %s generated the following dependencies:\n' % current_module)
+try:
+ importlib.import_module('%s' % current_module)
+except ImportError as e:
+ if (debug==True):
+ log.write('Module was not found')
+ pass
+
+
+# Get current module dependencies, dif will contain a list of specific deps for this module
+module_deps=set(sys.modules)
+
+# We handle the core package (1st pass on create_manifest.py) as a special case
+if current_module == 'python-core-package':
+ dif = core_deps
+else:
+ # We know this is not the core package, so there must be a difference.
+ dif = module_deps-core_deps
+
+
+# Check where each dependency came from
+for item in dif:
+ dep_path=''
+ try:
+ if (debug==True):
+ log.write('Calling: sys.modules[' + '%s' % item + '].__file__\n')
+ dep_path = sys.modules['%s' % item].__file__
+ except AttributeError as e:
+ # Deals with thread (builtin module) not having __file__ attribute
+ if debug==True:
+ log.write(item + ' ')
+ log.write(str(e))
+ log.write('\n')
+ pass
+ except NameError as e:
+ # Deals with NameError: name 'dep_path' is not defined
+ # because module is not found (wasn't compiled?), e.g. bddsm
+ if (debug==True):
+ log.write(item+' ')
+ log.write(str(e))
+ pass
+
+ # Site-customize is a special case since we (OpenEmbedded) put it there manually
+ if 'sitecustomize' in dep_path:
+ dep_path = '${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py'
+ # Prints out result, which is what will be used by create_manifest
+ print (dep_path)
+ continue
+
+ dep_path = fix_path(dep_path)
+
+ import sysconfig
+ soabi=sysconfig.get_config_var('SOABI')
+ # Check if its a shared library and deconstruct it
+ if soabi in dep_path:
+ if (debug==True):
+ log.write('Shared library found in %s' % dep_path)
+ dep_path = dep_path.replace(soabi,'*')
+ print (dep_path)
+ continue
+
+ if (debug==True):
+ log.write(dep_path+'\n')
+ # Prints out result, which is what will be used by create_manifest
+ print (dep_path)
+
+
+ import imp
+ cpython_tag = imp.get_tag()
+ cached=''
+ # Theres no naive way to find *.pyc files on python3
+ try:
+ if (debug==True):
+ log.write('Calling: sys.modules[' + '%s' % item + '].__cached__\n')
+ cached = sys.modules['%s' % item].__cached__
+ except AttributeError as e:
+ # Deals with thread (builtin module) not having __cached__ attribute
+ if debug==True:
+ log.write(item + ' ')
+ log.write(str(e))
+ log.write('\n')
+ pass
+ except NameError as e:
+ # Deals with NameError: name 'cached' is not defined
+ if (debug==True):
+ log.write(item+' ')
+ log.write(str(e))
+ pass
+ if cached is not None:
+ if (debug==True):
+ log.write(cached)
+ cached = fix_path(cached)
+ cached = cached.replace(cpython_tag,'*')
+ print (cached)
+
+if debug==True:
+ log.close()
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
index 08c4403..cc35dc1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
@@ -25,10 +25,10 @@
setup.py | 9 ++++-----
12 files changed, 97 insertions(+), 23 deletions(-)
-diff --git a/Include/pythonrun.h b/Include/pythonrun.h
-index 9c2e813..2f79cb6 100644
---- a/Include/pythonrun.h
-+++ b/Include/pythonrun.h
+Index: Python-3.5.4/Include/pythonrun.h
+===================================================================
+--- Python-3.5.4.orig/Include/pythonrun.h
++++ Python-3.5.4/Include/pythonrun.h
@@ -23,6 +23,9 @@ typedef struct {
} PyCompilerFlags;
#endif
@@ -39,10 +39,10 @@
#ifndef Py_LIMITED_API
PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
-diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
-index 67db007..b46b45b 100644
---- a/Lib/distutils/command/install.py
-+++ b/Lib/distutils/command/install.py
+Index: Python-3.5.4/Lib/distutils/command/install.py
+===================================================================
+--- Python-3.5.4.orig/Lib/distutils/command/install.py
++++ Python-3.5.4/Lib/distutils/command/install.py
@@ -19,6 +19,8 @@ from site import USER_BASE
from site import USER_SITE
HAS_USER_SITE = True
@@ -52,20 +52,22 @@
WINDOWS_SCHEME = {
'purelib': '$base/Lib/site-packages',
'platlib': '$base/Lib/site-packages',
-@@ -30,7 +32,7 @@ WINDOWS_SCHEME = {
+@@ -29,8 +31,8 @@ WINDOWS_SCHEME = {
+
INSTALL_SCHEMES = {
'unix_prefix': {
- 'purelib': '$base/lib/python$py_version_short/site-packages',
+- 'purelib': '$base/lib/python$py_version_short/site-packages',
- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
++ 'purelib': '$platbase/'+libname+'/python$py_version_short/site-packages',
+ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-diff --git a/Lib/pydoc.py b/Lib/pydoc.py
-index 3ca08c9..6528730 100755
---- a/Lib/pydoc.py
-+++ b/Lib/pydoc.py
-@@ -384,7 +384,7 @@ class Doc:
+Index: Python-3.5.4/Lib/pydoc.py
+===================================================================
+--- Python-3.5.4.orig/Lib/pydoc.py
++++ Python-3.5.4/Lib/pydoc.py
+@@ -389,7 +389,7 @@ class Doc:
docmodule = docclass = docroutine = docother = docproperty = docdata = fail
def getdocloc(self, object,
@@ -74,10 +76,10 @@
"python%d.%d" % sys.version_info[:2])):
"""Return the location of module docs or None"""
-diff --git a/Lib/site.py b/Lib/site.py
-index 3f78ef5..511931e 100644
---- a/Lib/site.py
-+++ b/Lib/site.py
+Index: Python-3.5.4/Lib/site.py
+===================================================================
+--- Python-3.5.4.orig/Lib/site.py
++++ Python-3.5.4/Lib/site.py
@@ -303,12 +303,12 @@ def getsitepackages(prefixes=None):
seen.add(prefix)
@@ -93,20 +95,21 @@
if sys.platform == "darwin":
# for framework builds *only* we add the standard Apple
# locations.
-diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
-index 9c34be0..3d1181a 100644
---- a/Lib/sysconfig.py
-+++ b/Lib/sysconfig.py
+Index: Python-3.5.4/Lib/sysconfig.py
+===================================================================
+--- Python-3.5.4.orig/Lib/sysconfig.py
++++ Python-3.5.4/Lib/sysconfig.py
@@ -20,10 +20,10 @@ __all__ = [
_INSTALL_SCHEMES = {
'posix_prefix': {
- 'stdlib': '{installed_base}/lib/python{py_version_short}',
- 'platstdlib': '{platbase}/lib/python{py_version_short}',
+- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
+- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
+ 'stdlib': '{installed_base}/'+sys.lib+'/python{py_version_short}',
+ 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}',
- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
-- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
++ 'purelib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
+ 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
'include':
'{installed_base}/include/python{py_version_short}{abiflags}',
@@ -117,10 +120,11 @@
'posix_home': {
- 'stdlib': '{installed_base}/lib/python',
- 'platstdlib': '{base}/lib/python',
+- 'purelib': '{base}/lib/python',
+- 'platlib': '{base}/lib/python',
+ 'stdlib': '{installed_base}/'+sys.lib+'/python',
+ 'platstdlib': '{base}/'+sys.lib+'/python',
- 'purelib': '{base}/lib/python',
-- 'platlib': '{base}/lib/python',
++ 'purelib': '{base}/'+sys.lib+'/python',
+ 'platlib': '{base}/'+sys.lib+'/python',
'include': '{installed_base}/include/python',
'platinclude': '{installed_base}/include/python',
@@ -131,18 +135,19 @@
'posix_user': {
- 'stdlib': '{userbase}/lib/python{py_version_short}',
- 'platstdlib': '{userbase}/lib/python{py_version_short}',
+- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
+- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
+ 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
+ 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
-- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
++ 'purelib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
+ 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data': '{userbase}',
-diff --git a/Lib/trace.py b/Lib/trace.py
-index f108266..7fd83f2 100755
---- a/Lib/trace.py
-+++ b/Lib/trace.py
+Index: Python-3.5.4/Lib/trace.py
+===================================================================
+--- Python-3.5.4.orig/Lib/trace.py
++++ Python-3.5.4/Lib/trace.py
@@ -749,10 +749,10 @@ def main(argv=None):
# should I also call expanduser? (after all, could use $HOME)
@@ -156,11 +161,11 @@
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
-diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 109f402..61a41e2 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -106,6 +106,8 @@ PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARE
+Index: Python-3.5.4/Makefile.pre.in
+===================================================================
+--- Python-3.5.4.orig/Makefile.pre.in
++++ Python-3.5.4/Makefile.pre.in
+@@ -109,6 +109,8 @@ CFLAGS_ALIASING=@CFLAGS_ALIASING@
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
@@ -169,7 +174,7 @@
# Multiarch directory (may be empty)
MULTIARCH= @MULTIARCH@
-@@ -125,7 +127,7 @@ LIBDIR= @libdir@
+@@ -128,7 +130,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
@@ -178,7 +183,7 @@
ABIFLAGS= @ABIFLAGS@
# Detailed destination directories
-@@ -755,6 +757,7 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
+@@ -731,6 +733,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
@@ -186,8 +191,8 @@
-o $@ $(srcdir)/Modules/getpath.c
Programs/python.o: $(srcdir)/Programs/python.c
-@@ -835,7 +838,7 @@ $(OPCODE_H): $(srcdir)/Lib/opcode.py $(OPCODE_H_SCRIPT)
- Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
+@@ -813,7 +816,7 @@ regen-opcode:
+ Python/compile.o Python/symtable.o Python/ast.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
@@ -195,10 +200,10 @@
Python/importdl.o: $(srcdir)/Python/importdl.c
$(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-diff --git a/Modules/getpath.c b/Modules/getpath.c
-index 18deb60..a01c3f8 100644
---- a/Modules/getpath.c
-+++ b/Modules/getpath.c
+Index: Python-3.5.4/Modules/getpath.c
+===================================================================
+--- Python-3.5.4.orig/Modules/getpath.c
++++ Python-3.5.4/Modules/getpath.c
@@ -105,6 +105,13 @@
#error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
#endif
@@ -230,10 +235,10 @@
if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) {
Py_FatalError(
-diff --git a/Python/getplatform.c b/Python/getplatform.c
-index 6899140..66a49c6 100644
---- a/Python/getplatform.c
-+++ b/Python/getplatform.c
+Index: Python-3.5.4/Python/getplatform.c
+===================================================================
+--- Python-3.5.4.orig/Python/getplatform.c
++++ Python-3.5.4/Python/getplatform.c
@@ -10,3 +10,23 @@ Py_GetPlatform(void)
{
return PLATFORM;
@@ -258,11 +263,11 @@
+{
+ return LIB;
+}
-diff --git a/Python/sysmodule.c b/Python/sysmodule.c
-index 8d7e05a..d9dee0f 100644
---- a/Python/sysmodule.c
-+++ b/Python/sysmodule.c
-@@ -1790,6 +1790,10 @@ _PySys_Init(void)
+Index: Python-3.5.4/Python/sysmodule.c
+===================================================================
+--- Python-3.5.4.orig/Python/sysmodule.c
++++ Python-3.5.4/Python/sysmodule.c
+@@ -1827,6 +1827,10 @@ _PySys_Init(void)
PyUnicode_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
PyUnicode_FromString(Py_GetPlatform()));
@@ -273,11 +278,11 @@
SET_SYS_FROM_STRING("executable",
PyUnicode_FromWideChar(
Py_GetProgramFullPath(), -1));
-diff --git a/configure.ac b/configure.ac
-index 707324d..e8d59a3 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -883,6 +883,41 @@ PLATDIR=plat-$MACHDEP
+Index: Python-3.5.4/configure.ac
+===================================================================
+--- Python-3.5.4.orig/configure.ac
++++ Python-3.5.4/configure.ac
+@@ -885,6 +885,41 @@ PLATDIR=plat-$MACHDEP
AC_SUBST(PLATDIR)
AC_SUBST(PLATFORM_TRIPLET)
@@ -319,11 +324,11 @@
AC_MSG_CHECKING([for -Wl,--no-as-needed])
save_LDFLAGS="$LDFLAGS"
-diff --git a/setup.py b/setup.py
-index 6d26deb..7b14215 100644
---- a/setup.py
-+++ b/setup.py
-@@ -495,7 +495,7 @@ class PyBuildExt(build_ext):
+Index: Python-3.5.4/setup.py
+===================================================================
+--- Python-3.5.4.orig/setup.py
++++ Python-3.5.4/setup.py
+@@ -494,7 +494,7 @@ class PyBuildExt(build_ext):
# directories (i.e. '.' and 'Include') must be first. See issue
# 10520.
if not cross_compiling:
@@ -332,7 +337,7 @@
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
# only change this for cross builds for 3.3, issues on Mageia
if cross_compiling:
-@@ -553,8 +553,7 @@ class PyBuildExt(build_ext):
+@@ -552,8 +552,7 @@ class PyBuildExt(build_ext):
# be assumed that no additional -I,-L directives are needed.
if not cross_compiling:
lib_dirs = self.compiler.library_dirs + [
@@ -342,7 +347,7 @@
]
inc_dirs = self.compiler.include_dirs + ['/usr/include']
else:
-@@ -746,11 +745,11 @@ class PyBuildExt(build_ext):
+@@ -745,11 +744,11 @@ class PyBuildExt(build_ext):
elif curses_library:
readline_libs.append(curses_library)
elif self.compiler.find_library_file(lib_dirs +
@@ -356,6 +361,3 @@
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
else:
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-manifest.json b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-manifest.json
new file mode 100644
index 0000000..2491f36
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-manifest.json
@@ -0,0 +1,1149 @@
+{
+ "2to3": {
+ "cached": [],
+ "files": [
+ "${bindir}/2to3-*",
+ "${libdir}/python3.5/lib2to3"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python automated Python 2 to 3 code translator"
+ },
+ "asyncio": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/asyncio",
+ "${libdir}/python3.5/concurrent",
+ "${libdir}/python3.5/concurrent/futures"
+ ],
+ "rdepends": [
+ "compression",
+ "core",
+ "crypt",
+ "io",
+ "logging",
+ "math",
+ "multiprocessing",
+ "netclient",
+ "pickle",
+ "shell",
+ "stringold",
+ "threading",
+ "unixadmin"
+ ],
+ "summary": "Python Asynchronous I/"
+ },
+ "audio": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/chunk.*.pyc",
+ "${libdir}/python3.5/__pycache__/sndhdr.*.pyc",
+ "${libdir}/python3.5/__pycache__/sunau.*.pyc",
+ "${libdir}/python3.5/__pycache__/wave.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/chunk.py",
+ "${libdir}/python3.5/lib-dynload/audioop.*.so",
+ "${libdir}/python3.5/lib-dynload/ossaudiodev.*.so",
+ "${libdir}/python3.5/sndhdr.py",
+ "${libdir}/python3.5/sunau.py",
+ "${libdir}/python3.5/wave.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Audio Handling"
+ },
+ "codecs": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/xdrlib.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/_multibytecodec.*.so",
+ "${libdir}/python3.5/xdrlib.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python codec"
+ },
+ "compile": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/compileall.*.pyc",
+ "${libdir}/python3.5/__pycache__/py_compile.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/compileall.py",
+ "${libdir}/python3.5/py_compile.py"
+ ],
+ "rdepends": [
+ "asyncio",
+ "compression",
+ "core",
+ "crypt",
+ "io",
+ "logging",
+ "math",
+ "multiprocessing",
+ "pickle",
+ "shell",
+ "stringold",
+ "threading",
+ "unixadmin"
+ ],
+ "summary": "Python bytecode compilation support"
+ },
+ "compression": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/_compression.*.pyc",
+ "${libdir}/python3.5/__pycache__/bz2.*.pyc",
+ "${libdir}/python3.5/__pycache__/gzip.*.pyc",
+ "${libdir}/python3.5/__pycache__/lzma.*.pyc",
+ "${libdir}/python3.5/__pycache__/tarfile.*.pyc",
+ "${libdir}/python3.5/__pycache__/zipfile.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/_compression.py",
+ "${libdir}/python3.5/bz2.py",
+ "${libdir}/python3.5/gzip.py",
+ "${libdir}/python3.5/lib-dynload/_bz2.*.so",
+ "${libdir}/python3.5/lib-dynload/_lzma.*.so",
+ "${libdir}/python3.5/lib-dynload/zlib.*.so",
+ "${libdir}/python3.5/lzma.py",
+ "${libdir}/python3.5/tarfile.py",
+ "${libdir}/python3.5/zipfile.py"
+ ],
+ "rdepends": [
+ "core",
+ "shell",
+ "unixadmin"
+ ],
+ "summary": "Python high-level compression support"
+ },
+ "core": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/__future__.*.pyc",
+ "${libdir}/python3.5/__pycache__/_bootlocale.*.pyc",
+ "${libdir}/python3.5/__pycache__/_collections_abc.*.pyc",
+ "${libdir}/python3.5/__pycache__/_markupbase.*.pyc",
+ "${libdir}/python3.5/__pycache__/_sitebuiltins.*.pyc",
+ "${libdir}/python3.5/__pycache__/_sysconfigdata.*.pyc",
+ "${libdir}/python3.5/__pycache__/_weakrefset.*.pyc",
+ "${libdir}/python3.5/__pycache__/abc.*.pyc",
+ "${libdir}/python3.5/__pycache__/argparse.*.pyc",
+ "${libdir}/python3.5/__pycache__/ast.*.pyc",
+ "${libdir}/python3.5/__pycache__/bisect.*.pyc",
+ "${libdir}/python3.5/__pycache__/code.*.pyc",
+ "${libdir}/python3.5/__pycache__/codecs.*.pyc",
+ "${libdir}/python3.5/__pycache__/codeop.*.pyc",
+ "${libdir}/python3.5/__pycache__/configparser.*.pyc",
+ "${libdir}/python3.5/__pycache__/contextlib.*.pyc",
+ "${libdir}/python3.5/__pycache__/copy.*.pyc",
+ "${libdir}/python3.5/__pycache__/copyreg.*.pyc",
+ "${libdir}/python3.5/__pycache__/csv.*.pyc",
+ "${libdir}/python3.5/__pycache__/dis.*.pyc",
+ "${libdir}/python3.5/__pycache__/enum.*.pyc",
+ "${libdir}/python3.5/__pycache__/functools.*.pyc",
+ "${libdir}/python3.5/__pycache__/genericpath.*.pyc",
+ "${libdir}/python3.5/__pycache__/getopt.*.pyc",
+ "${libdir}/python3.5/__pycache__/gettext.*.pyc",
+ "${libdir}/python3.5/__pycache__/heapq.*.pyc",
+ "${libdir}/python3.5/__pycache__/imp.*.pyc",
+ "${libdir}/python3.5/__pycache__/inspect.*.pyc",
+ "${libdir}/python3.5/__pycache__/io.*.pyc",
+ "${libdir}/python3.5/__pycache__/keyword.*.pyc",
+ "${libdir}/python3.5/__pycache__/linecache.*.pyc",
+ "${libdir}/python3.5/__pycache__/locale.*.pyc",
+ "${libdir}/python3.5/__pycache__/opcode.*.pyc",
+ "${libdir}/python3.5/__pycache__/operator.*.pyc",
+ "${libdir}/python3.5/__pycache__/optparse.*.pyc",
+ "${libdir}/python3.5/__pycache__/os.*.pyc",
+ "${libdir}/python3.5/__pycache__/platform.*.pyc",
+ "${libdir}/python3.5/__pycache__/posixpath.*.pyc",
+ "${libdir}/python3.5/__pycache__/re.*.pyc",
+ "${libdir}/python3.5/__pycache__/reprlib.*.pyc",
+ "${libdir}/python3.5/__pycache__/rlcompleter.*.pyc",
+ "${libdir}/python3.5/__pycache__/selectors.*.pyc",
+ "${libdir}/python3.5/__pycache__/signal.*.pyc",
+ "${libdir}/python3.5/__pycache__/site.*.pyc",
+ "${libdir}/python3.5/__pycache__/sre_compile.*.pyc",
+ "${libdir}/python3.5/__pycache__/sre_constants.*.pyc",
+ "${libdir}/python3.5/__pycache__/sre_parse.*.pyc",
+ "${libdir}/python3.5/__pycache__/stat.*.pyc",
+ "${libdir}/python3.5/__pycache__/stringprep.*.pyc",
+ "${libdir}/python3.5/__pycache__/struct.*.pyc",
+ "${libdir}/python3.5/__pycache__/subprocess.*.pyc",
+ "${libdir}/python3.5/__pycache__/symbol.*.pyc",
+ "${libdir}/python3.5/__pycache__/sysconfig.*.pyc",
+ "${libdir}/python3.5/__pycache__/textwrap.*.pyc",
+ "${libdir}/python3.5/__pycache__/threading.*.pyc",
+ "${libdir}/python3.5/__pycache__/token.*.pyc",
+ "${libdir}/python3.5/__pycache__/tokenize.*.pyc",
+ "${libdir}/python3.5/__pycache__/traceback.*.pyc",
+ "${libdir}/python3.5/__pycache__/types.*.pyc",
+ "${libdir}/python3.5/__pycache__/warnings.*.pyc",
+ "${libdir}/python3.5/__pycache__/weakref.*.pyc",
+ "${libdir}/python3.5/collections/__pycache__",
+ "${libdir}/python3.5/collections/__pycache__/abc.*.pyc",
+ "${libdir}/python3.5/encodings/__pycache__",
+ "${libdir}/python3.5/encodings/__pycache__/aliases.*.pyc",
+ "${libdir}/python3.5/encodings/__pycache__/latin_1.*.pyc",
+ "${libdir}/python3.5/encodings/__pycache__/utf_8.*.pyc",
+ "${libdir}/python3.5/importlib/__pycache__",
+ "${libdir}/python3.5/importlib/__pycache__/abc.*.pyc",
+ "${libdir}/python3.5/importlib/__pycache__/machinery.*.pyc",
+ "${libdir}/python3.5/importlib/__pycache__/util.*.pyc"
+ ],
+ "files": [
+ "${bindir}/python*[!-config]",
+ "${includedir}/python${PYTHON_BINABI}/pyconfig*.h",
+ "${libdir}/python${PYTHON_MAJMIN}/_collections_abc.py",
+ "${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.py",
+ "${libdir}/python${PYTHON_MAJMIN}/collections",
+ "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py",
+ "${libdir}/python3.5/UserDict.py",
+ "${libdir}/python3.5/UserList.py",
+ "${libdir}/python3.5/UserString.py",
+ "${libdir}/python3.5/__future__.py",
+ "${libdir}/python3.5/_abcoll.py",
+ "${libdir}/python3.5/_bootlocale.py",
+ "${libdir}/python3.5/_collections_abc.py",
+ "${libdir}/python3.5/_markupbase.py",
+ "${libdir}/python3.5/_sitebuiltins.py",
+ "${libdir}/python3.5/_sysconfigdata.py",
+ "${libdir}/python3.5/_weakrefset.py",
+ "${libdir}/python3.5/abc.py",
+ "${libdir}/python3.5/argparse.py",
+ "${libdir}/python3.5/ast.py",
+ "${libdir}/python3.5/bisect.py",
+ "${libdir}/python3.5/code.py",
+ "${libdir}/python3.5/codecs.py",
+ "${libdir}/python3.5/codeop.py",
+ "${libdir}/python3.5/collections",
+ "${libdir}/python3.5/collections/abc.py",
+ "${libdir}/python3.5/configparser.py",
+ "${libdir}/python3.5/contextlib.py",
+ "${libdir}/python3.5/copy.py",
+ "${libdir}/python3.5/copyreg.py",
+ "${libdir}/python3.5/csv.py",
+ "${libdir}/python3.5/dis.py",
+ "${libdir}/python3.5/encodings",
+ "${libdir}/python3.5/encodings/aliases.py",
+ "${libdir}/python3.5/encodings/latin_1.py",
+ "${libdir}/python3.5/encodings/utf_8.py",
+ "${libdir}/python3.5/enum.py",
+ "${libdir}/python3.5/functools.py",
+ "${libdir}/python3.5/genericpath.py",
+ "${libdir}/python3.5/getopt.py",
+ "${libdir}/python3.5/gettext.py",
+ "${libdir}/python3.5/heapq.py",
+ "${libdir}/python3.5/imp.py",
+ "${libdir}/python3.5/importlib",
+ "${libdir}/python3.5/importlib/_bootstrap.py",
+ "${libdir}/python3.5/importlib/_bootstrap_external.py",
+ "${libdir}/python3.5/importlib/abc.py",
+ "${libdir}/python3.5/importlib/machinery.py",
+ "${libdir}/python3.5/importlib/util.py",
+ "${libdir}/python3.5/inspect.py",
+ "${libdir}/python3.5/io.py",
+ "${libdir}/python3.5/keyword.py",
+ "${libdir}/python3.5/lib-dynload/__pycache__/_struct.*.so",
+ "${libdir}/python3.5/lib-dynload/__pycache__/binascii.*.so",
+ "${libdir}/python3.5/lib-dynload/__pycache__/time.*.so",
+ "${libdir}/python3.5/lib-dynload/__pycache__/xreadlines.*.so",
+ "${libdir}/python3.5/lib-dynload/_bisect.*.so",
+ "${libdir}/python3.5/lib-dynload/_csv.*.so",
+ "${libdir}/python3.5/lib-dynload/_heapq.*.so",
+ "${libdir}/python3.5/lib-dynload/_opcode.*.so",
+ "${libdir}/python3.5/lib-dynload/_posixsubprocess.*.so",
+ "${libdir}/python3.5/lib-dynload/_struct.*.so",
+ "${libdir}/python3.5/lib-dynload/array.*.so",
+ "${libdir}/python3.5/lib-dynload/binascii.*.so",
+ "${libdir}/python3.5/lib-dynload/math.*.so",
+ "${libdir}/python3.5/lib-dynload/parser.*.so",
+ "${libdir}/python3.5/lib-dynload/readline.*.so",
+ "${libdir}/python3.5/lib-dynload/select.*.so",
+ "${libdir}/python3.5/lib-dynload/time.*.so",
+ "${libdir}/python3.5/lib-dynload/unicodedata.*.so",
+ "${libdir}/python3.5/lib-dynload/xreadlines.*.so",
+ "${libdir}/python3.5/linecache.py",
+ "${libdir}/python3.5/locale.py",
+ "${libdir}/python3.5/new.py",
+ "${libdir}/python3.5/opcode.py",
+ "${libdir}/python3.5/operator.py",
+ "${libdir}/python3.5/optparse.py",
+ "${libdir}/python3.5/os.py",
+ "${libdir}/python3.5/platform.py",
+ "${libdir}/python3.5/posixpath.py",
+ "${libdir}/python3.5/re.py",
+ "${libdir}/python3.5/reprlib.py",
+ "${libdir}/python3.5/rlcompleter.py",
+ "${libdir}/python3.5/selectors.py",
+ "${libdir}/python3.5/signal.py",
+ "${libdir}/python3.5/site.py",
+ "${libdir}/python3.5/sre_compile.py",
+ "${libdir}/python3.5/sre_constants.py",
+ "${libdir}/python3.5/sre_parse.py",
+ "${libdir}/python3.5/stat.py",
+ "${libdir}/python3.5/stringprep.py",
+ "${libdir}/python3.5/struct.py",
+ "${libdir}/python3.5/subprocess.py",
+ "${libdir}/python3.5/symbol.py",
+ "${libdir}/python3.5/sysconfig.py",
+ "${libdir}/python3.5/textwrap.py",
+ "${libdir}/python3.5/threading.py",
+ "${libdir}/python3.5/token.py",
+ "${libdir}/python3.5/tokenize.py",
+ "${libdir}/python3.5/traceback.py",
+ "${libdir}/python3.5/types.py",
+ "${libdir}/python3.5/warnings.py",
+ "${libdir}/python3.5/weakref.py"
+ ],
+ "rdepends": [],
+ "summary": "Python interpreter and core modules"
+ },
+ "crypt": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/crypt.*.pyc",
+ "${libdir}/python3.5/__pycache__/hashlib.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/crypt.py",
+ "${libdir}/python3.5/hashlib.py",
+ "${libdir}/python3.5/lib-dynload/_crypt.*.so",
+ "${libdir}/python3.5/lib-dynload/_hashlib.*.so",
+ "${libdir}/python3.5/lib-dynload/_sha256.*.so",
+ "${libdir}/python3.5/lib-dynload/_sha512.*.so"
+ ],
+ "rdepends": [
+ "core",
+ "math",
+ "stringold"
+ ],
+ "summary": "Python basic cryptographic and hashing support"
+ },
+ "ctypes": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/ctypes",
+ "${libdir}/python3.5/lib-dynload/_ctypes.*.so",
+ "${libdir}/python3.5/lib-dynload/_ctypes_test.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python C types support"
+ },
+ "curses": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/curses",
+ "${libdir}/python3.5/lib-dynload/_curses.*.so",
+ "${libdir}/python3.5/lib-dynload/_curses_panel.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python curses support"
+ },
+ "datetime": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/_strptime.*.pyc",
+ "${libdir}/python3.5/__pycache__/calendar.*.pyc",
+ "${libdir}/python3.5/__pycache__/datetime.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/_strptime.py",
+ "${libdir}/python3.5/calendar.py",
+ "${libdir}/python3.5/datetime.py",
+ "${libdir}/python3.5/lib-dynload/_datetime.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python calendar and time support"
+ },
+ "db": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/dbm",
+ "${libdir}/python3.5/lib-dynload/_dbm.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python file-based database support"
+ },
+ "debugger": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/bdb.*.pyc",
+ "${libdir}/python3.5/__pycache__/pdb.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/bdb.py",
+ "${libdir}/python3.5/pdb.py"
+ ],
+ "rdepends": [
+ "core",
+ "pprint",
+ "shell",
+ "stringold"
+ ],
+ "summary": "Python debugger"
+ },
+ "dev": {
+ "cached": [],
+ "files": [
+ "${base_libdir}/*.a",
+ "${base_libdir}/*.o",
+ "${bindir}/python*-config",
+ "${datadir}/aclocal",
+ "${datadir}/pkgconfig",
+ "${includedir}",
+ "${libdir}/*.a",
+ "${libdir}/*.la",
+ "${libdir}/*.o",
+ "${libdir}/lib*${SOLIBSDEV}",
+ "${libdir}/pkgconfig",
+ "${libdir}/python3.5/config*/Makefile",
+ "${libdir}/python3.5/config*/Makefile/__pycache__"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python development package"
+ },
+ "difflib": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/difflib.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/difflib.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python helpers for computing deltas between objects"
+ },
+ "distutils": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/distutils"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Distribution Utilities"
+ },
+ "distutils-staticdev": {
+ "cached": [
+ "${libdir}/python3.5/config/__pycache__/lib*.a"
+ ],
+ "files": [
+ "${libdir}/python3.5/config/lib*.a"
+ ],
+ "rdepends": [
+ "distutils"
+ ],
+ "summary": "Python distribution utilities (static libraries)"
+ },
+ "doctest": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/doctest.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/doctest.py"
+ ],
+ "rdepends": [
+ "core",
+ "debugger",
+ "difflib",
+ "logging",
+ "pprint",
+ "shell",
+ "stringold",
+ "unittest"
+ ],
+ "summary": "Python framework for running examples in docstrings"
+ },
+ "email": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/imaplib.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/email",
+ "${libdir}/python3.5/imaplib.py"
+ ],
+ "rdepends": [
+ "core",
+ "crypt",
+ "datetime",
+ "io",
+ "math",
+ "netclient"
+ ],
+ "summary": "Python email support"
+ },
+ "fcntl": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/fcntl.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python's fcntl interface"
+ },
+ "gdbm": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/_gdbm.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python GNU database support"
+ },
+ "html": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/formatter.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/formatter.py",
+ "${libdir}/python3.5/html"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python HTML processing support"
+ },
+ "idle": {
+ "cached": [],
+ "files": [
+ "${bindir}/idle*",
+ "${libdir}/python3.5/idlelib"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Integrated Development Environment"
+ },
+ "image": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/colorsys.*.pyc",
+ "${libdir}/python3.5/__pycache__/imghdr.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/colorsys.py",
+ "${libdir}/python3.5/imghdr.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python graphical image handling"
+ },
+ "io": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/_pyio.*.pyc",
+ "${libdir}/python3.5/__pycache__/ipaddress.*.pyc",
+ "${libdir}/python3.5/__pycache__/pipes.*.pyc",
+ "${libdir}/python3.5/__pycache__/socket.*.pyc",
+ "${libdir}/python3.5/__pycache__/ssl.*.pyc",
+ "${libdir}/python3.5/__pycache__/tempfile.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/_pyio.py",
+ "${libdir}/python3.5/ipaddress.py",
+ "${libdir}/python3.5/lib-dynload/_socket.*.so",
+ "${libdir}/python3.5/lib-dynload/_ssl.*.so",
+ "${libdir}/python3.5/lib-dynload/termios.*.so",
+ "${libdir}/python3.5/pipes.py",
+ "${libdir}/python3.5/socket.py",
+ "${libdir}/python3.5/ssl.py",
+ "${libdir}/python3.5/tempfile.py"
+ ],
+ "rdepends": [
+ "compression",
+ "core",
+ "crypt",
+ "math",
+ "netclient",
+ "shell",
+ "unixadmin"
+ ],
+ "summary": "Python low-level I/O"
+ },
+ "json": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/json",
+ "${libdir}/python3.5/lib-dynload/_json.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python JSON support"
+ },
+ "logging": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/logging"
+ ],
+ "rdepends": [
+ "core",
+ "stringold"
+ ],
+ "summary": "Python logging support"
+ },
+ "mailbox": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/mailbox.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/mailbox.py"
+ ],
+ "rdepends": [
+ "core",
+ "crypt",
+ "datetime",
+ "email",
+ "fcntl",
+ "io",
+ "math",
+ "mime",
+ "netclient",
+ "stringold"
+ ],
+ "summary": "Python mailbox format support"
+ },
+ "math": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/random.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/_random.*.so",
+ "${libdir}/python3.5/lib-dynload/cmath.*.so",
+ "${libdir}/python3.5/random.py"
+ ],
+ "rdepends": [
+ "core",
+ "crypt"
+ ],
+ "summary": "Python math support"
+ },
+ "mime": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/quopri.*.pyc",
+ "${libdir}/python3.5/__pycache__/uu.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/quopri.py",
+ "${libdir}/python3.5/uu.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python MIME handling APIs"
+ },
+ "mmap": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/mmap.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python memory-mapped file support"
+ },
+ "modules": {
+ "cached": [],
+ "files": [],
+ "rdepends": [
+ "2to3",
+ "asyncio",
+ "audio",
+ "codecs",
+ "compile",
+ "compression",
+ "core",
+ "crypt",
+ "ctypes",
+ "curses",
+ "datetime",
+ "db",
+ "debugger",
+ "difflib",
+ "distutils",
+ "doctest",
+ "email",
+ "fcntl",
+ "html",
+ "idle",
+ "image",
+ "io",
+ "json",
+ "logging",
+ "mailbox",
+ "math",
+ "mime",
+ "mmap",
+ "multiprocessing",
+ "netclient",
+ "netserver",
+ "numbers",
+ "pickle",
+ "pkgutil",
+ "plistlib",
+ "pprint",
+ "profile",
+ "pydoc",
+ "resource",
+ "runpy",
+ "shell",
+ "smtpd",
+ "sqlite3",
+ "stringold",
+ "syslog",
+ "terminal",
+ "threading",
+ "tkinter",
+ "typing",
+ "unittest",
+ "unixadmin",
+ "xml",
+ "xmlrpc"
+ ],
+ "summary": "All Python modules"
+ },
+ "multiprocessing": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/_multiprocessing.*.so",
+ "${libdir}/python3.5/multiprocessing"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python multiprocessing support"
+ },
+ "netclient": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/base64.*.pyc",
+ "${libdir}/python3.5/__pycache__/ftplib.*.pyc",
+ "${libdir}/python3.5/__pycache__/hmac.*.pyc",
+ "${libdir}/python3.5/__pycache__/mimetypes.*.pyc",
+ "${libdir}/python3.5/__pycache__/nntplib.*.pyc",
+ "${libdir}/python3.5/__pycache__/poplib.*.pyc",
+ "${libdir}/python3.5/__pycache__/smtplib.*.pyc",
+ "${libdir}/python3.5/__pycache__/telnetlib.*.pyc",
+ "${libdir}/python3.5/__pycache__/uuid.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/base64.py",
+ "${libdir}/python3.5/ftplib.py",
+ "${libdir}/python3.5/hmac.py",
+ "${libdir}/python3.5/http",
+ "${libdir}/python3.5/http/__pycache__",
+ "${libdir}/python3.5/mimetypes.py",
+ "${libdir}/python3.5/nntplib.py",
+ "${libdir}/python3.5/poplib.py",
+ "${libdir}/python3.5/smtplib.py",
+ "${libdir}/python3.5/telnetlib.py",
+ "${libdir}/python3.5/urllib",
+ "${libdir}/python3.5/urllib/__pycache__",
+ "${libdir}/python3.5/uuid.py"
+ ],
+ "rdepends": [
+ "compression",
+ "core",
+ "crypt",
+ "ctypes",
+ "datetime",
+ "email",
+ "io",
+ "math",
+ "mime",
+ "shell",
+ "stringold",
+ "unixadmin"
+ ],
+ "summary": "Python Internet Protocol clients"
+ },
+ "netserver": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/cgi.*.pyc",
+ "${libdir}/python3.5/__pycache__/socketserver.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/cgi.py",
+ "${libdir}/python3.5/socketserver.py"
+ ],
+ "rdepends": [
+ "compression",
+ "core",
+ "crypt",
+ "datetime",
+ "email",
+ "html",
+ "io",
+ "math",
+ "mime",
+ "netclient",
+ "shell",
+ "stringold",
+ "unixadmin"
+ ],
+ "summary": "Python Internet Protocol servers"
+ },
+ "numbers": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/_pydecimal.*.pyc",
+ "${libdir}/python3.5/__pycache__/decimal.*.pyc",
+ "${libdir}/python3.5/__pycache__/fractions.*.pyc",
+ "${libdir}/python3.5/__pycache__/numbers.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/_pydecimal.py",
+ "${libdir}/python3.5/decimal.py",
+ "${libdir}/python3.5/fractions.py",
+ "${libdir}/python3.5/lib-dynload/_decimal.*.so",
+ "${libdir}/python3.5/numbers.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python number APIs"
+ },
+ "pickle": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/_compat_pickle.*.pyc",
+ "${libdir}/python3.5/__pycache__/pickle.*.pyc",
+ "${libdir}/python3.5/__pycache__/pickletools.*.pyc",
+ "${libdir}/python3.5/__pycache__/shelve.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/_compat_pickle.py",
+ "${libdir}/python3.5/lib-dynload/_pickle.*.so",
+ "${libdir}/python3.5/pickle.py",
+ "${libdir}/python3.5/pickletools.py",
+ "${libdir}/python3.5/shelve.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python serialisation/persistence support"
+ },
+ "pkgutil": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/pkgutil.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/pkgutil.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python package extension utility support"
+ },
+ "plistlib": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/plistlib.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/plistlib.py"
+ ],
+ "rdepends": [
+ "core",
+ "datetime",
+ "xml"
+ ],
+ "summary": "Generate and parse Mac OS X .plist files"
+ },
+ "pprint": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/pprint.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/pprint.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python pretty-print support"
+ },
+ "profile": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/cProfile.*.pyc",
+ "${libdir}/python3.5/__pycache__/profile.*.pyc",
+ "${libdir}/python3.5/__pycache__/pstats.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/cProfile.py",
+ "${libdir}/python3.5/lib-dynload/_lsprof.*.so",
+ "${libdir}/python3.5/profile.py",
+ "${libdir}/python3.5/pstats.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python basic performance profiling support"
+ },
+ "pydoc": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/pydoc.*.pyc"
+ ],
+ "files": [
+ "${bindir}/pydoc*",
+ "${libdir}/python3.5/pydoc.py",
+ "${libdir}/python3.5/pydoc_data"
+ ],
+ "rdepends": [
+ "core",
+ "netclient",
+ "pkgutil"
+ ],
+ "summary": "Python interactive help support"
+ },
+ "resource": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/resource.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python resource control interface"
+ },
+ "runpy": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/runpy.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/runpy.py"
+ ],
+ "rdepends": [
+ "core",
+ "pkgutil"
+ ],
+ "summary": "Python helper for locating/executing scripts in module namespace"
+ },
+ "shell": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/cmd.*.pyc",
+ "${libdir}/python3.5/__pycache__/fnmatch.*.pyc",
+ "${libdir}/python3.5/__pycache__/glob.*.pyc",
+ "${libdir}/python3.5/__pycache__/shlex.*.pyc",
+ "${libdir}/python3.5/__pycache__/shutil.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/cmd.py",
+ "${libdir}/python3.5/fnmatch.py",
+ "${libdir}/python3.5/glob.py",
+ "${libdir}/python3.5/shlex.py",
+ "${libdir}/python3.5/shutil.py"
+ ],
+ "rdepends": [
+ "compression",
+ "core",
+ "stringold",
+ "unixadmin"
+ ],
+ "summary": "Python shell-like functionality"
+ },
+ "smtpd": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/asynchat.*.pyc",
+ "${libdir}/python3.5/__pycache__/asyncore.*.pyc",
+ "${libdir}/python3.5/__pycache__/smtpd.*.pyc"
+ ],
+ "files": [
+ "${bindir}/smtpd.py",
+ "${libdir}/python3.5/asynchat.py",
+ "${libdir}/python3.5/asyncore.py",
+ "${libdir}/python3.5/smtpd.py"
+ ],
+ "rdepends": [
+ "core",
+ "crypt",
+ "datetime",
+ "email",
+ "io",
+ "math",
+ "mime",
+ "netclient",
+ "stringold"
+ ],
+ "summary": "Python Simple Mail Transport Daemon"
+ },
+ "sqlite3": {
+ "cached": [
+ "${libdir}/python3.5/sqlite3/__pycache__",
+ "${libdir}/python3.5/sqlite3/__pycache__/dbapi2.*.pyc",
+ "${libdir}/python3.5/sqlite3/__pycache__/dump.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/_sqlite3.*.so",
+ "${libdir}/python3.5/sqlite3/dbapi2.py",
+ "${libdir}/python3.5/sqlite3/dump.py"
+ ],
+ "rdepends": [
+ "core",
+ "datetime"
+ ],
+ "summary": "Python Sqlite3 database support"
+ },
+ "sqlite3-tests": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/sqlite3/test"
+ ],
+ "rdepends": [
+ "core",
+ "tests"
+ ],
+ "summary": "Python Sqlite3 database support tests"
+ },
+ "stringold": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/string.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/string.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python string APIs [deprecated]"
+ },
+ "syslog": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/syslog.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python syslog interface"
+ },
+ "terminal": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/pty.*.pyc",
+ "${libdir}/python3.5/__pycache__/tty.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/pty.py",
+ "${libdir}/python3.5/tty.py"
+ ],
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "summary": "Python terminal controlling support"
+ },
+ "tests": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/test"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python tests"
+ },
+ "threading": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/_dummy_thread.*.pyc",
+ "${libdir}/python3.5/__pycache__/_threading_local.*.pyc",
+ "${libdir}/python3.5/__pycache__/dummy_threading.*.pyc",
+ "${libdir}/python3.5/__pycache__/queue.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/_dummy_thread.py",
+ "${libdir}/python3.5/_threading_local.py",
+ "${libdir}/python3.5/dummy_threading.py",
+ "${libdir}/python3.5/queue.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python threading & synchronization support"
+ },
+ "tkinter": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/tkinter"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Tcl/Tk bindings"
+ },
+ "typing": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/typing.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/typing.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python typing support"
+ },
+ "unittest": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/unittest",
+ "${libdir}/python3.5/unittest/",
+ "${libdir}/python3.5/unittest/__pycache__"
+ ],
+ "rdepends": [
+ "core",
+ "difflib",
+ "logging",
+ "pprint",
+ "shell",
+ "stringold"
+ ],
+ "summary": "Python unit testing framework"
+ },
+ "unixadmin": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/getpass.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/getpass.py",
+ "${libdir}/python3.5/lib-dynload/grp.*.so",
+ "${libdir}/python3.5/lib-dynload/nis.*.so"
+ ],
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "summary": "Python Unix administration support"
+ },
+ "xml": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/_elementtree.*.so",
+ "${libdir}/python3.5/lib-dynload/pyexpat.*.so",
+ "${libdir}/python3.5/xml"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python basic XML support"
+ },
+ "xmlrpc": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/xmlrpc",
+ "${libdir}/python3.5/xmlrpc/__pycache__"
+ ],
+ "rdepends": [
+ "core",
+ "xml"
+ ],
+ "summary": "Python XML-RPC support"
+ }
+}
\ No newline at end of file
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
deleted file mode 100644
index 2bc8b8c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 43238e1ac13e32984d015c92a5841f3de1fe1d15 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Tue, 18 Nov 2014 00:07:07 -0500
-Subject: [PATCH] setup.py: no host headers libs
-
-When we are cross-compiling, setup.py should never look in /usr
-or /usr/local to find headers or libraries.
-
-Upstream-Status: Inappropriate [Cross compile specific]
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- setup.py | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index f020b28..e8339cd 100644
---- a/setup.py
-+++ b/setup.py
-@@ -444,10 +444,7 @@ class PyBuildExt(build_ext):
- if not cross_compiling:
- add_dir_to_list(self.compiler.library_dirs, os.path.join('/usr/local', sys.lib))
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-- # only change this for cross builds for 3.3, issues on Mageia
-- if cross_compiling:
- self.add_gcc_paths()
-- if not cross_compiling:
- self.add_multiarch_paths()
-
- # Add paths specified in the environment variables LDFLAGS and
---
-2.0.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
index 74490d9..a4f8bd4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
@@ -10,11 +10,11 @@
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/configure.ac b/configure.ac
-index 989baf9..2890c96 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -67,7 +67,7 @@ if test "$cross_compiling" = yes; then
+Index: Python-3.5.4/configure.ac
+===================================================================
+--- Python-3.5.4.orig/configure.ac
++++ Python-3.5.4/configure.ac
+@@ -73,7 +73,7 @@ if test "$cross_compiling" = yes; then
AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
fi
AC_MSG_RESULT($interp)
@@ -23,6 +23,3 @@
fi
elif test "$cross_compiling" = maybe; then
AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
---
-2.0.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/regen-all.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/regen-all.patch
new file mode 100644
index 0000000..36b9d9d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/regen-all.patch
@@ -0,0 +1,25 @@
+python3-native: run regen-importlib target correctly
+
+regen-importlib depends on other regen- targets, so we must be sure to
+run it after (most of) the others. In reality, we do not need to run it
+at all since "make" will invoke it, if necessary. We do not want to
+rely on that, though.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -709,7 +709,8 @@ regen-importlib: Programs/_freeze_import
+ ############################################################################
+ # Regenerate all generated files
+
+-regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar regen-ast regen-importlib
++regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar regen-ast
++ $(MAKE) regen-importlib
+
+ ############################################################################
+ # Special rules for object files
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch
deleted file mode 100644
index f26bd38..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Patch setup.py so that the detect_modules() function looks for required
-libraries and headers in STAGING_LIBDIR / STAGING_INCDIR.
-
-Without this patch, several extension modules are not built, even though
-their dependencies are present in the compiler's search paths.
-The result is the following warning, and ultimately incomplete packages:
-
-| The necessary bits to build these optional modules were not found:
-| _bz2 _curses_panel _dbm
-| _gdbm _lzma _sqlite3
-| nis readline zlib
-| To find the necessary bits, look in setup.py in detect_modules() for the module's name.
-
-Upstream-Status: Inappropriate [Cross compile specific]
-
-Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
-
-Index: Python-3.4.3/setup.py
-===================================================================
---- Python-3.4.3.orig/setup.py
-+++ Python-3.4.3/setup.py
-@@ -521,6 +521,8 @@ class PyBuildExt(build_ext):
- else:
- lib_dirs = self.compiler.library_dirs[:]
- inc_dirs = self.compiler.include_dirs[:]
-+ lib_dirs.append(os.environ.get('STAGING_LIBDIR'))
-+ inc_dirs.append(os.environ.get('STAGING_INCDIR'))
- exts = []
- missing = []
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
index de07643..c89d9a3 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
@@ -17,12 +17,12 @@
Lib/sysconfig.py | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
-diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
-index a545ab9..74317d1 100644
---- a/Lib/distutils/sysconfig.py
-+++ b/Lib/distutils/sysconfig.py
-@@ -554,7 +554,10 @@ def get_config_vars(*args):
- _config_vars['exec_prefix'] = EXEC_PREFIX
+Index: Python-3.5.3/Lib/distutils/sysconfig.py
+===================================================================
+--- Python-3.5.3.orig/Lib/distutils/sysconfig.py
++++ Python-3.5.3/Lib/distutils/sysconfig.py
+@@ -498,7 +498,10 @@ def get_config_vars(*args):
+ _config_vars['SO'] = SO
# Always convert srcdir to an absolute path
- srcdir = _config_vars.get('srcdir', project_base)
@@ -33,11 +33,11 @@
if os.name == 'posix':
if python_build:
# If srcdir is a relative path (typically '.' or '..')
-diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
-index 7287f11..cc92998 100644
---- a/Lib/sysconfig.py
-+++ b/Lib/sysconfig.py
-@@ -562,7 +562,10 @@ def get_config_vars(*args):
+Index: Python-3.5.3/Lib/sysconfig.py
+===================================================================
+--- Python-3.5.3.orig/Lib/sysconfig.py
++++ Python-3.5.3/Lib/sysconfig.py
+@@ -544,7 +544,10 @@ def get_config_vars(*args):
_CONFIG_VARS['userbase'] = _getuserbase()
# Always convert srcdir to an absolute path
@@ -49,6 +49,3 @@
if os.name == 'posix':
if _PYTHON_BUILD:
# If srcdir is a relative path (typically '.' or '..')
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/upstream-random-fixes.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/upstream-random-fixes.patch
deleted file mode 100644
index 9b40e8a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/upstream-random-fixes.patch
+++ /dev/null
@@ -1,703 +0,0 @@
-From 035ba5da3e53e45c712b39fe1f6fb743e697c032 Mon Sep 17 00:00:00 2001
-From: Victor Stinner <victor.stinner@gmail.com>
-Date: Mon, 9 Jan 2017 11:18:53 +0100
-Subject: [PATCH] Issue #29157: Prefer getrandom() over getentropy()
-
-Copy and then adapt Python/random.c from default branch. Difference between 3.5
-and default branches:
-
-* Python 3.5 only uses getrandom() in non-blocking mode: flags=GRND_NONBLOCK
-* If getrandom() fails with EAGAIN: py_getrandom() immediately fails and
- remembers that getrandom() doesn't work.
-* Python 3.5 has no _PyOS_URandomNonblock() function: _PyOS_URandom()
- works in non-blocking mode on Python 3.5
-
-Upstream-Status: Backport [https://github.com/python/cpython/commit/035ba5da3e53e45c712b39fe1f6fb743e697c032]
-Signed-off-by: Alexander Kanavin <alexander.kanavin@intel.com>
-
----
- Python/random.c | 494 +++++++++++++++++++++++++++++++++-----------------------
- 1 file changed, 294 insertions(+), 200 deletions(-)
-
-diff --git a/Python/random.c b/Python/random.c
-index d203939..31f61d0 100644
---- a/Python/random.c
-+++ b/Python/random.c
-@@ -1,6 +1,9 @@
- #include "Python.h"
- #ifdef MS_WINDOWS
- # include <windows.h>
-+/* All sample MSDN wincrypt programs include the header below. It is at least
-+ * required with Min GW. */
-+# include <wincrypt.h>
- #else
- # include <fcntl.h>
- # ifdef HAVE_SYS_STAT_H
-@@ -37,10 +40,9 @@ win32_urandom_init(int raise)
- return 0;
-
- error:
-- if (raise)
-+ if (raise) {
- PyErr_SetFromWindowsErr(0);
-- else
-- Py_FatalError("Failed to initialize Windows random API (CryptoGen)");
-+ }
- return -1;
- }
-
-@@ -53,8 +55,9 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
-
- if (hCryptProv == 0)
- {
-- if (win32_urandom_init(raise) == -1)
-+ if (win32_urandom_init(raise) == -1) {
- return -1;
-+ }
- }
-
- while (size > 0)
-@@ -63,11 +66,9 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
- if (!CryptGenRandom(hCryptProv, (DWORD)chunk, buffer))
- {
- /* CryptGenRandom() failed */
-- if (raise)
-+ if (raise) {
- PyErr_SetFromWindowsErr(0);
-- else
-- Py_FatalError("Failed to initialized the randomized hash "
-- "secret using CryptoGen)");
-+ }
- return -1;
- }
- buffer += chunk;
-@@ -76,58 +77,23 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
- return 0;
- }
-
--/* Issue #25003: Don't use getentropy() on Solaris (available since
-- * Solaris 11.3), it is blocking whereas os.urandom() should not block. */
--#elif defined(HAVE_GETENTROPY) && !defined(sun)
--#define PY_GETENTROPY 1
--
--/* Fill buffer with size pseudo-random bytes generated by getentropy().
-- Return 0 on success, or raise an exception and return -1 on error.
--
-- If fatal is nonzero, call Py_FatalError() instead of raising an exception
-- on error. */
--static int
--py_getentropy(unsigned char *buffer, Py_ssize_t size, int fatal)
--{
-- while (size > 0) {
-- Py_ssize_t len = Py_MIN(size, 256);
-- int res;
--
-- if (!fatal) {
-- Py_BEGIN_ALLOW_THREADS
-- res = getentropy(buffer, len);
-- Py_END_ALLOW_THREADS
--
-- if (res < 0) {
-- PyErr_SetFromErrno(PyExc_OSError);
-- return -1;
-- }
-- }
-- else {
-- res = getentropy(buffer, len);
-- if (res < 0)
-- Py_FatalError("getentropy() failed");
-- }
--
-- buffer += len;
-- size -= len;
-- }
-- return 0;
--}
--
--#else
-+#else /* !MS_WINDOWS */
-
- #if defined(HAVE_GETRANDOM) || defined(HAVE_GETRANDOM_SYSCALL)
- #define PY_GETRANDOM 1
-
--/* Call getrandom()
-+/* Call getrandom() to get random bytes:
-+
- - Return 1 on success
-- - Return 0 if getrandom() syscall is not available (failed with ENOSYS or
-- EPERM) or if getrandom(GRND_NONBLOCK) failed with EAGAIN (system urandom
-- not initialized yet) and raise=0.
-+ - Return 0 if getrandom() is not available (failed with ENOSYS or EPERM),
-+ or if getrandom(GRND_NONBLOCK) failed with EAGAIN (system urandom not
-+ initialized yet).
- - Raise an exception (if raise is non-zero) and return -1 on error:
-- getrandom() failed with EINTR and the Python signal handler raised an
-- exception, or getrandom() failed with a different error. */
-+ if getrandom() failed with EINTR, raise is non-zero and the Python signal
-+ handler raised an exception, or if getrandom() failed with a different
-+ error.
-+
-+ getrandom() is retried if it failed with EINTR: interrupted by a signal. */
- static int
- py_getrandom(void *buffer, Py_ssize_t size, int raise)
- {
-@@ -142,16 +108,19 @@ py_getrandom(void *buffer, Py_ssize_t size, int raise)
- * see https://bugs.python.org/issue26839. To avoid this, use the
- * GRND_NONBLOCK flag. */
- const int flags = GRND_NONBLOCK;
-+ char *dest;
- long n;
-
- if (!getrandom_works) {
- return 0;
- }
-
-+ dest = buffer;
- while (0 < size) {
- #ifdef sun
- /* Issue #26735: On Solaris, getrandom() is limited to returning up
-- to 1024 bytes */
-+ to 1024 bytes. Call it multiple times if more bytes are
-+ requested. */
- n = Py_MIN(size, 1024);
- #else
- n = Py_MIN(size, LONG_MAX);
-@@ -161,34 +130,35 @@ py_getrandom(void *buffer, Py_ssize_t size, int raise)
- #ifdef HAVE_GETRANDOM
- if (raise) {
- Py_BEGIN_ALLOW_THREADS
-- n = getrandom(buffer, n, flags);
-+ n = getrandom(dest, n, flags);
- Py_END_ALLOW_THREADS
- }
- else {
-- n = getrandom(buffer, n, flags);
-+ n = getrandom(dest, n, flags);
- }
- #else
- /* On Linux, use the syscall() function because the GNU libc doesn't
-- * expose the Linux getrandom() syscall yet. See:
-- * https://sourceware.org/bugzilla/show_bug.cgi?id=17252 */
-+ expose the Linux getrandom() syscall yet. See:
-+ https://sourceware.org/bugzilla/show_bug.cgi?id=17252 */
- if (raise) {
- Py_BEGIN_ALLOW_THREADS
-- n = syscall(SYS_getrandom, buffer, n, flags);
-+ n = syscall(SYS_getrandom, dest, n, flags);
- Py_END_ALLOW_THREADS
- }
- else {
-- n = syscall(SYS_getrandom, buffer, n, flags);
-+ n = syscall(SYS_getrandom, dest, n, flags);
- }
- #endif
-
- if (n < 0) {
-- /* ENOSYS: getrandom() syscall not supported by the kernel (but
-- * maybe supported by the host which built Python). EPERM:
-- * getrandom() syscall blocked by SECCOMP or something else. */
-+ /* ENOSYS: the syscall is not supported by the kernel.
-+ EPERM: the syscall is blocked by a security policy (ex: SECCOMP)
-+ or something else. */
- if (errno == ENOSYS || errno == EPERM) {
- getrandom_works = 0;
- return 0;
- }
-+
- if (errno == EAGAIN) {
- /* getrandom(GRND_NONBLOCK) fails with EAGAIN if the system
- urandom is not initialiazed yet. In this case, fall back on
-@@ -202,169 +172,225 @@ py_getrandom(void *buffer, Py_ssize_t size, int raise)
- }
-
- if (errno == EINTR) {
-- if (PyErr_CheckSignals()) {
-- if (!raise) {
-- Py_FatalError("getrandom() interrupted by a signal");
-+ if (raise) {
-+ if (PyErr_CheckSignals()) {
-+ return -1;
- }
-- return -1;
- }
-
-- /* retry getrandom() */
-+ /* retry getrandom() if it was interrupted by a signal */
- continue;
- }
-
- if (raise) {
- PyErr_SetFromErrno(PyExc_OSError);
- }
-- else {
-- Py_FatalError("getrandom() failed");
-- }
- return -1;
- }
-
-- buffer += n;
-+ dest += n;
- size -= n;
- }
- return 1;
- }
--#endif
-
--static struct {
-- int fd;
-- dev_t st_dev;
-- ino_t st_ino;
--} urandom_cache = { -1 };
-+#elif defined(HAVE_GETENTROPY)
-+#define PY_GETENTROPY 1
-
-+/* Fill buffer with size pseudo-random bytes generated by getentropy():
-
--/* Read 'size' random bytes from py_getrandom(). Fall back on reading from
-- /dev/urandom if getrandom() is not available.
-+ - Return 1 on success
-+ - Return 0 if getentropy() syscall is not available (failed with ENOSYS or
-+ EPERM).
-+ - Raise an exception (if raise is non-zero) and return -1 on error:
-+ if getentropy() failed with EINTR, raise is non-zero and the Python signal
-+ handler raised an exception, or if getentropy() failed with a different
-+ error.
-
-- Call Py_FatalError() on error. */
--static void
--dev_urandom_noraise(unsigned char *buffer, Py_ssize_t size)
-+ getentropy() is retried if it failed with EINTR: interrupted by a signal. */
-+static int
-+py_getentropy(char *buffer, Py_ssize_t size, int raise)
- {
-- int fd;
-- Py_ssize_t n;
-+ /* Is getentropy() supported by the running kernel? Set to 0 if
-+ getentropy() failed with ENOSYS or EPERM. */
-+ static int getentropy_works = 1;
-
-- assert (0 < size);
--
--#ifdef PY_GETRANDOM
-- if (py_getrandom(buffer, size, 0) == 1) {
-- return;
-+ if (!getentropy_works) {
-+ return 0;
- }
-- /* getrandom() failed with ENOSYS or EPERM,
-- fall back on reading /dev/urandom */
--#endif
-
-- fd = _Py_open_noraise("/dev/urandom", O_RDONLY);
-- if (fd < 0) {
-- Py_FatalError("Failed to open /dev/urandom");
-- }
-+ while (size > 0) {
-+ /* getentropy() is limited to returning up to 256 bytes. Call it
-+ multiple times if more bytes are requested. */
-+ Py_ssize_t len = Py_MIN(size, 256);
-+ int res;
-
-- while (0 < size)
-- {
-- do {
-- n = read(fd, buffer, (size_t)size);
-- } while (n < 0 && errno == EINTR);
-+ if (raise) {
-+ Py_BEGIN_ALLOW_THREADS
-+ res = getentropy(buffer, len);
-+ Py_END_ALLOW_THREADS
-+ }
-+ else {
-+ res = getentropy(buffer, len);
-+ }
-
-- if (n <= 0) {
-- /* read() failed or returned 0 bytes */
-- Py_FatalError("Failed to read bytes from /dev/urandom");
-- break;
-+ if (res < 0) {
-+ /* ENOSYS: the syscall is not supported by the running kernel.
-+ EPERM: the syscall is blocked by a security policy (ex: SECCOMP)
-+ or something else. */
-+ if (errno == ENOSYS || errno == EPERM) {
-+ getentropy_works = 0;
-+ return 0;
-+ }
-+
-+ if (errno == EINTR) {
-+ if (raise) {
-+ if (PyErr_CheckSignals()) {
-+ return -1;
-+ }
-+ }
-+
-+ /* retry getentropy() if it was interrupted by a signal */
-+ continue;
-+ }
-+
-+ if (raise) {
-+ PyErr_SetFromErrno(PyExc_OSError);
-+ }
-+ return -1;
- }
-- buffer += n;
-- size -= n;
-+
-+ buffer += len;
-+ size -= len;
- }
-- close(fd);
-+ return 1;
- }
-+#endif /* defined(HAVE_GETENTROPY) && !defined(sun) */
-
--/* Read 'size' random bytes from py_getrandom(). Fall back on reading from
-- /dev/urandom if getrandom() is not available.
-
-- Return 0 on success. Raise an exception and return -1 on error. */
-+static struct {
-+ int fd;
-+ dev_t st_dev;
-+ ino_t st_ino;
-+} urandom_cache = { -1 };
-+
-+/* Read random bytes from the /dev/urandom device:
-+
-+ - Return 0 on success
-+ - Raise an exception (if raise is non-zero) and return -1 on error
-+
-+ Possible causes of errors:
-+
-+ - open() failed with ENOENT, ENXIO, ENODEV, EACCES: the /dev/urandom device
-+ was not found. For example, it was removed manually or not exposed in a
-+ chroot or container.
-+ - open() failed with a different error
-+ - fstat() failed
-+ - read() failed or returned 0
-+
-+ read() is retried if it failed with EINTR: interrupted by a signal.
-+
-+ The file descriptor of the device is kept open between calls to avoid using
-+ many file descriptors when run in parallel from multiple threads:
-+ see the issue #18756.
-+
-+ st_dev and st_ino fields of the file descriptor (from fstat()) are cached to
-+ check if the file descriptor was replaced by a different file (which is
-+ likely a bug in the application): see the issue #21207.
-+
-+ If the file descriptor was closed or replaced, open a new file descriptor
-+ but don't close the old file descriptor: it probably points to something
-+ important for some third-party code. */
- static int
--dev_urandom_python(char *buffer, Py_ssize_t size)
-+dev_urandom(char *buffer, Py_ssize_t size, int raise)
- {
- int fd;
- Py_ssize_t n;
-- struct _Py_stat_struct st;
--#ifdef PY_GETRANDOM
-- int res;
--#endif
--
-- if (size <= 0)
-- return 0;
-
--#ifdef PY_GETRANDOM
-- res = py_getrandom(buffer, size, 1);
-- if (res < 0) {
-- return -1;
-- }
-- if (res == 1) {
-- return 0;
-- }
-- /* getrandom() failed with ENOSYS or EPERM,
-- fall back on reading /dev/urandom */
--#endif
-+ if (raise) {
-+ struct _Py_stat_struct st;
-
-- if (urandom_cache.fd >= 0) {
-- /* Does the fd point to the same thing as before? (issue #21207) */
-- if (_Py_fstat_noraise(urandom_cache.fd, &st)
-- || st.st_dev != urandom_cache.st_dev
-- || st.st_ino != urandom_cache.st_ino) {
-- /* Something changed: forget the cached fd (but don't close it,
-- since it probably points to something important for some
-- third-party code). */
-- urandom_cache.fd = -1;
-- }
-- }
-- if (urandom_cache.fd >= 0)
-- fd = urandom_cache.fd;
-- else {
-- fd = _Py_open("/dev/urandom", O_RDONLY);
-- if (fd < 0) {
-- if (errno == ENOENT || errno == ENXIO ||
-- errno == ENODEV || errno == EACCES)
-- PyErr_SetString(PyExc_NotImplementedError,
-- "/dev/urandom (or equivalent) not found");
-- /* otherwise, keep the OSError exception raised by _Py_open() */
-- return -1;
-- }
- if (urandom_cache.fd >= 0) {
-- /* urandom_fd was initialized by another thread while we were
-- not holding the GIL, keep it. */
-- close(fd);
-- fd = urandom_cache.fd;
-+ /* Does the fd point to the same thing as before? (issue #21207) */
-+ if (_Py_fstat_noraise(urandom_cache.fd, &st)
-+ || st.st_dev != urandom_cache.st_dev
-+ || st.st_ino != urandom_cache.st_ino) {
-+ /* Something changed: forget the cached fd (but don't close it,
-+ since it probably points to something important for some
-+ third-party code). */
-+ urandom_cache.fd = -1;
-+ }
- }
-+ if (urandom_cache.fd >= 0)
-+ fd = urandom_cache.fd;
- else {
-- if (_Py_fstat(fd, &st)) {
-- close(fd);
-+ fd = _Py_open("/dev/urandom", O_RDONLY);
-+ if (fd < 0) {
-+ if (errno == ENOENT || errno == ENXIO ||
-+ errno == ENODEV || errno == EACCES) {
-+ PyErr_SetString(PyExc_NotImplementedError,
-+ "/dev/urandom (or equivalent) not found");
-+ }
-+ /* otherwise, keep the OSError exception raised by _Py_open() */
- return -1;
- }
-+ if (urandom_cache.fd >= 0) {
-+ /* urandom_fd was initialized by another thread while we were
-+ not holding the GIL, keep it. */
-+ close(fd);
-+ fd = urandom_cache.fd;
-+ }
- else {
-- urandom_cache.fd = fd;
-- urandom_cache.st_dev = st.st_dev;
-- urandom_cache.st_ino = st.st_ino;
-+ if (_Py_fstat(fd, &st)) {
-+ close(fd);
-+ return -1;
-+ }
-+ else {
-+ urandom_cache.fd = fd;
-+ urandom_cache.st_dev = st.st_dev;
-+ urandom_cache.st_ino = st.st_ino;
-+ }
- }
- }
-- }
-
-- do {
-- n = _Py_read(fd, buffer, (size_t)size);
-- if (n == -1) {
-- return -1;
-- }
-- if (n == 0) {
-- PyErr_Format(PyExc_RuntimeError,
-- "Failed to read %zi bytes from /dev/urandom",
-- size);
-+ do {
-+ n = _Py_read(fd, buffer, (size_t)size);
-+ if (n == -1)
-+ return -1;
-+ if (n == 0) {
-+ PyErr_Format(PyExc_RuntimeError,
-+ "Failed to read %zi bytes from /dev/urandom",
-+ size);
-+ return -1;
-+ }
-+
-+ buffer += n;
-+ size -= n;
-+ } while (0 < size);
-+ }
-+ else {
-+ fd = _Py_open_noraise("/dev/urandom", O_RDONLY);
-+ if (fd < 0) {
- return -1;
- }
-
-- buffer += n;
-- size -= n;
-- } while (0 < size);
-+ while (0 < size)
-+ {
-+ do {
-+ n = read(fd, buffer, (size_t)size);
-+ } while (n < 0 && errno == EINTR);
-
-+ if (n <= 0) {
-+ /* stop on error or if read(size) returned 0 */
-+ close(fd);
-+ return -1;
-+ }
-+
-+ buffer += n;
-+ size -= n;
-+ }
-+ close(fd);
-+ }
- return 0;
- }
-
-@@ -376,8 +402,8 @@ dev_urandom_close(void)
- urandom_cache.fd = -1;
- }
- }
-+#endif /* !MS_WINDOWS */
-
--#endif
-
- /* Fill buffer with pseudo-random bytes generated by a linear congruent
- generator (LCG):
-@@ -400,31 +426,100 @@ lcg_urandom(unsigned int x0, unsigned char *buffer, size_t size)
- }
- }
-
--/* Fill buffer with size pseudo-random bytes from the operating system random
-- number generator (RNG). It is suitable for most cryptographic purposes
-- except long living private keys for asymmetric encryption.
-+/* Read random bytes:
-
-- Return 0 on success, raise an exception and return -1 on error. */
--int
--_PyOS_URandom(void *buffer, Py_ssize_t size)
-+ - Return 0 on success
-+ - Raise an exception (if raise is non-zero) and return -1 on error
-+
-+ Used sources of entropy ordered by preference, preferred source first:
-+
-+ - CryptGenRandom() on Windows
-+ - getrandom() function (ex: Linux and Solaris): call py_getrandom()
-+ - getentropy() function (ex: OpenBSD): call py_getentropy()
-+ - /dev/urandom device
-+
-+ Read from the /dev/urandom device if getrandom() or getentropy() function
-+ is not available or does not work.
-+
-+ Prefer getrandom() over getentropy() because getrandom() supports blocking
-+ and non-blocking mode and Python requires non-blocking RNG at startup to
-+ initialize its hash secret: see the PEP 524.
-+
-+ Prefer getrandom() and getentropy() over reading directly /dev/urandom
-+ because these functions don't need file descriptors and so avoid ENFILE or
-+ EMFILE errors (too many open files): see the issue #18756.
-+
-+ Only use RNG running in the kernel. They are more secure because it is
-+ harder to get the internal state of a RNG running in the kernel land than a
-+ RNG running in the user land. The kernel has a direct access to the hardware
-+ and has access to hardware RNG, they are used as entropy sources.
-+
-+ Note: the OpenSSL RAND_pseudo_bytes() function does not automatically reseed
-+ its RNG on fork(), two child processes (with the same pid) generate the same
-+ random numbers: see issue #18747. Kernel RNGs don't have this issue,
-+ they have access to good quality entropy sources.
-+
-+ If raise is zero:
-+
-+ - Don't raise an exception on error
-+ - Don't call the Python signal handler (don't call PyErr_CheckSignals()) if
-+ a function fails with EINTR: retry directly the interrupted function
-+ - Don't release the GIL to call functions.
-+*/
-+static int
-+pyurandom(void *buffer, Py_ssize_t size, int raise)
- {
-+#if defined(PY_GETRANDOM) || defined(PY_GETENTROPY)
-+ int res;
-+#endif
-+
- if (size < 0) {
-- PyErr_Format(PyExc_ValueError,
-- "negative argument not allowed");
-+ if (raise) {
-+ PyErr_Format(PyExc_ValueError,
-+ "negative argument not allowed");
-+ }
- return -1;
- }
-- if (size == 0)
-+
-+ if (size == 0) {
- return 0;
-+ }
-
- #ifdef MS_WINDOWS
-- return win32_urandom((unsigned char *)buffer, size, 1);
--#elif defined(PY_GETENTROPY)
-- return py_getentropy(buffer, size, 0);
-+ return win32_urandom((unsigned char *)buffer, size, raise);
-+#else
-+
-+#if defined(PY_GETRANDOM) || defined(PY_GETENTROPY)
-+#ifdef PY_GETRANDOM
-+ res = py_getrandom(buffer, size, raise);
- #else
-- return dev_urandom_python((char*)buffer, size);
-+ res = py_getentropy(buffer, size, raise);
-+#endif
-+ if (res < 0) {
-+ return -1;
-+ }
-+ if (res == 1) {
-+ return 0;
-+ }
-+ /* getrandom() or getentropy() function is not available: failed with
-+ ENOSYS, EPERM or EAGAIN. Fall back on reading from /dev/urandom. */
-+#endif
-+
-+ return dev_urandom(buffer, size, raise);
- #endif
- }
-
-+/* Fill buffer with size pseudo-random bytes from the operating system random
-+ number generator (RNG). It is suitable for most cryptographic purposes
-+ except long living private keys for asymmetric encryption.
-+
-+ Return 0 on success. Raise an exception and return -1 on error. */
-+int
-+_PyOS_URandom(void *buffer, Py_ssize_t size)
-+{
-+ return pyurandom(buffer, size, 1);
-+}
-+
- void
- _PyRandom_Init(void)
- {
-@@ -463,13 +558,14 @@ _PyRandom_Init(void)
- }
- }
- else {
--#ifdef MS_WINDOWS
-- (void)win32_urandom(secret, secret_size, 0);
--#elif defined(PY_GETENTROPY)
-- (void)py_getentropy(secret, secret_size, 1);
--#else
-- dev_urandom_noraise(secret, secret_size);
--#endif
-+ int res;
-+
-+ /* _PyRandom_Init() is called very early in the Python initialization
-+ and so exceptions cannot be used (use raise=0). */
-+ res = pyurandom(secret, secret_size, 0);
-+ if (res < 0) {
-+ Py_FatalError("failed to get random numbers to initialize Python");
-+ }
- }
- }
-
-@@ -481,8 +577,6 @@ _PyRandom_Fini(void)
- CryptReleaseContext(hCryptProv, 0);
- hCryptProv = 0;
- }
--#elif defined(PY_GETENTROPY)
-- /* nothing to clean */
- #else
- dev_urandom_close();
- #endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.3.bb
deleted file mode 100644
index 13df12f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.3.bb
+++ /dev/null
@@ -1,227 +0,0 @@
-require recipes-devtools/python/python.inc
-
-DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl xz"
-PR = "${INC_PR}.0"
-PYTHON_MAJMIN = "3.5"
-PYTHON_BINABI= "${PYTHON_MAJMIN}m"
-DISTRO_SRC_URI ?= "file://sitecustomize.py"
-DISTRO_SRC_URI_linuxstdbase = ""
-SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
-file://python-config.patch \
-file://0001-cross-compile-support.patch \
-file://030-fixup-include-dirs.patch \
-file://070-dont-clean-ipkg-install.patch \
-file://080-distutils-dont_adjust_files.patch \
-file://130-readline-setup.patch \
-file://150-fix-setupterm.patch \
-file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
-file://tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch \
-file://support_SOURCE_DATE_EPOCH_in_py_compile.patch \
-${DISTRO_SRC_URI} \
-"
-
-SRC_URI += "\
- file://03-fix-tkinter-detection.patch \
- file://avoid_warning_about_tkinter.patch \
- file://cgi_py.patch \
- file://host_include_contamination.patch \
- file://python-3.3-multilib.patch \
- file://shutil-follow-symlink-fix.patch \
- file://sysroot-include-headers.patch \
- file://unixccompiler.patch \
- file://avoid-ncursesw-include-path.patch \
- file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
- file://python3-setup.py-no-host-headers-libs.patch \
- file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
- file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
- file://setup.py-find-libraries-in-staging-dirs.patch \
- file://configure.ac-fix-LIBPL.patch \
- file://upstream-random-fixes.patch \
- file://0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch \
- file://Fix-29519-weakref-spewing-exceptions-during-interp-f.patch \
- file://pass-missing-libraries-to-Extension-for-mul.patch \
- "
-SRC_URI[md5sum] = "57d1f8bfbabf4f2500273fb0706e6f21"
-SRC_URI[sha256sum] = "eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b680ed99aa60d350c65a65914494207e"
-
-# exclude pre-releases for both python 2.x and 3.x
-UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
-
-S = "${WORKDIR}/Python-${PV}"
-
-inherit autotools multilib_header python3native pkgconfig
-
-CONFIGUREOPTS += " --with-system-ffi "
-
-CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \
- ac_cv_have_lchflags=no \
- ac_cv_have_long_long_format=yes \
- ac_cv_buggy_getaddrinfo=no \
- ac_cv_file__dev_ptmx=yes \
- ac_cv_file__dev_ptc=no \
-"
-
-TARGET_CC_ARCH += "-DNDEBUG -fno-inline"
-SDK_CC_ARCH += "-DNDEBUG -fno-inline"
-EXTRA_OEMAKE += "CROSS_COMPILE=yes"
-EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip"
-
-export CROSS_COMPILE = "${TARGET_PREFIX}"
-export _PYTHON_PROJECT_BASE = "${B}"
-export _PYTHON_PROJECT_SRC = "${S}"
-export CCSHARED = "-fPIC"
-
-# Fix cross compilation of different modules
-export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
-
-# No ctypes option for python 3
-PYTHONLSBOPTS = ""
-
-do_configure_append() {
- rm -f ${S}/Makefile.orig
- autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-do_compile() {
- # regenerate platform specific files, because they depend on system headers
- cd ${S}/Lib/plat-linux*
- include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
- ${S}/Tools/scripts/h2py.py -i '(u_long)' \
- ${STAGING_INCDIR}/dlfcn.h \
- ${STAGING_INCDIR}/linux/cdrom.h \
- ${STAGING_INCDIR}/netinet/in.h \
- ${STAGING_INCDIR}/sys/types.h
- sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
- cd -
-
-
- # remove any bogus LD_LIBRARY_PATH
- sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
-
- if [ ! -f Makefile.orig ]; then
- install -m 0644 Makefile Makefile.orig
- fi
- sed -i -e 's,^CONFIGURE_LDFLAGS=.*,CONFIGURE_LDFLAGS=-L. -L${STAGING_LIBDIR},g' \
- -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
- -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
- -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
- -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
- -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
- -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
- Makefile
- # save copy of it now, because if we do it in do_install and
- # then call do_install twice we get Makefile.orig == Makefile.sysroot
- install -m 0644 Makefile Makefile.sysroot
-
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- LIB=${baselib} \
- ARCH=${TARGET_ARCH} \
- OPT="${CFLAGS}" libpython3.so
-
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- LIB=${baselib} \
- ARCH=${TARGET_ARCH} \
- OPT="${CFLAGS}"
-}
-
-do_install() {
- # make install needs the original Makefile, or otherwise the inclues would
- # go to ${D}${STAGING...}/...
- install -m 0644 Makefile.orig Makefile
-
- install -d ${D}${libdir}/pkgconfig
- install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config
-
- # rerun the build once again with original makefile this time
- # run install in a separate step to avoid compile/install race
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- LIB=${baselib} \
- ARCH=${TARGET_ARCH} \
- DESTDIR=${D} LIBDIR=${libdir}
-
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- LIB=${baselib} \
- ARCH=${TARGET_ARCH} \
- DESTDIR=${D} LIBDIR=${libdir} install
-
- # avoid conflict with 2to3 from Python 2
- rm -f ${D}/${bindir}/2to3
-
- install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
- install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile
-
- if [ -e ${WORKDIR}/sitecustomize.py ]; then
- install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
- fi
-
- oe_multilib_header python${PYTHON_BINABI}/pyconfig.h
-}
-
-do_install_append_class-nativesdk () {
- create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
-}
-
-SSTATE_SCAN_FILES += "Makefile"
-PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
-
-py_package_preprocess () {
- # copy back the old Makefile to fix target package
- install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
- install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile
- # Remove references to buildmachine paths in target Makefile and _sysconfigdata
- sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile \
- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
-}
-
-require python-${PYTHON_MAJMIN}-manifest.inc
-
-# manual dependency additions
-RPROVIDES_${PN}-modules = "${PN}"
-RRECOMMENDS_${PN}-core = "${PN}-readline"
-RRECOMMENDS_${PN}-crypt = "openssl"
-RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
-
-FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}"
-FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
-FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
-
-PACKAGES =+ "${PN}-pyvenv"
-FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv"
-
-# package libpython3
-PACKAGES =+ "libpython3 libpython3-staticdev"
-FILES_libpython3 = "${libdir}/libpython*.so.*"
-FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}/libpython${PYTHON_BINABI}.a"
-INSANE_SKIP_${PN}-dev += "dev-elf"
-
-# catch all the rest (unsorted)
-PACKAGES += "${PN}-misc"
-RDEPENDS_${PN}-misc += "${PN}-core ${PN}-email ${PN}-codecs ${PN}-textutils ${PN}-argparse"
-RDEPENDS_${PN}-modules += "${PN}-misc"
-FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
-
-# catch manpage
-PACKAGES += "${PN}-man"
-FILES_${PN}-man = "${datadir}/man"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.5.bb
new file mode 100644
index 0000000..f893b84
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.5.bb
@@ -0,0 +1,323 @@
+require recipes-devtools/python/python.inc
+
+DEPENDS = "python3-native libffi bzip2 gdbm openssl sqlite3 zlib virtual/libintl xz"
+
+PR = "${INC_PR}.0"
+PYTHON_MAJMIN = "3.5"
+PYTHON_BINABI= "${PYTHON_MAJMIN}m"
+DISTRO_SRC_URI ?= "file://sitecustomize.py"
+DISTRO_SRC_URI_linuxstdbase = ""
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
+file://python-config.patch \
+file://0001-cross-compile-support.patch \
+file://030-fixup-include-dirs.patch \
+file://070-dont-clean-ipkg-install.patch \
+file://080-distutils-dont_adjust_files.patch \
+file://130-readline-setup.patch \
+file://150-fix-setupterm.patch \
+file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
+file://tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch \
+file://support_SOURCE_DATE_EPOCH_in_py_compile.patch \
+${DISTRO_SRC_URI} \
+"
+
+SRC_URI += "\
+ file://03-fix-tkinter-detection.patch \
+ file://avoid_warning_about_tkinter.patch \
+ file://cgi_py.patch \
+ file://host_include_contamination.patch \
+ file://python-3.3-multilib.patch \
+ file://shutil-follow-symlink-fix.patch \
+ file://sysroot-include-headers.patch \
+ file://unixccompiler.patch \
+ file://avoid-ncursesw-include-path.patch \
+ file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
+ file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
+ file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
+ file://configure.ac-fix-LIBPL.patch \
+ file://0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch \
+ file://pass-missing-libraries-to-Extension-for-mul.patch \
+ "
+SRC_URI[md5sum] = "f3763edf9824d5d3a15f5f646083b6e0"
+SRC_URI[sha256sum] = "063d2c3b0402d6191b90731e0f735c64830e7522348aeb7ed382a83165d45009"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b6ec515b22618f55fa07276b897bacea"
+
+# exclude pre-releases for both python 2.x and 3.x
+UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
+
+S = "${WORKDIR}/Python-${PV}"
+
+inherit autotools multilib_header python3native pkgconfig
+
+CONFIGUREOPTS += " --with-system-ffi "
+
+CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \
+ ac_cv_have_lchflags=no \
+ ac_cv_have_long_long_format=yes \
+ ac_cv_buggy_getaddrinfo=no \
+ ac_cv_file__dev_ptmx=yes \
+ ac_cv_file__dev_ptc=no \
+"
+
+TARGET_CC_ARCH += "-DNDEBUG -fno-inline"
+SDK_CC_ARCH += "-DNDEBUG -fno-inline"
+EXTRA_OEMAKE += "CROSS_COMPILE=yes"
+EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip"
+
+export CROSS_COMPILE = "${TARGET_PREFIX}"
+export _PYTHON_PROJECT_BASE = "${B}"
+export _PYTHON_PROJECT_SRC = "${S}"
+export CCSHARED = "-fPIC"
+
+# Fix cross compilation of different modules
+export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
+
+# No ctypes option for python 3
+PYTHONLSBOPTS = ""
+
+PACKAGECONFIG ??= "readline"
+PACKAGECONFIG[readline] = ",,readline"
+
+do_configure_append() {
+ rm -f ${S}/Makefile.orig
+ autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+}
+
+do_compile() {
+ # regenerate platform specific files, because they depend on system headers
+ cd ${S}/Lib/plat-linux*
+ include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+ ${S}/Tools/scripts/h2py.py -i '(u_long)' \
+ ${STAGING_INCDIR}/dlfcn.h \
+ ${STAGING_INCDIR}/linux/cdrom.h \
+ ${STAGING_INCDIR}/netinet/in.h \
+ ${STAGING_INCDIR}/sys/types.h
+ sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
+ cd -
+
+
+ # remove any bogus LD_LIBRARY_PATH
+ sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
+
+ if [ ! -f Makefile.orig ]; then
+ install -m 0644 Makefile Makefile.orig
+ fi
+ sed -i -e 's,^CONFIGURE_LDFLAGS=.*,CONFIGURE_LDFLAGS=-L. -L${STAGING_LIBDIR},g' \
+ -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
+ -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
+ -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
+ -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
+ -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
+ -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
+ Makefile
+ # save copy of it now, because if we do it in do_install and
+ # then call do_install twice we get Makefile.orig == Makefile.sysroot
+ install -m 0644 Makefile Makefile.sysroot
+
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ LIB=${baselib} \
+ ARCH=${TARGET_ARCH} \
+ OPT="${CFLAGS}" libpython3.so
+
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ LIB=${baselib} \
+ ARCH=${TARGET_ARCH} \
+ OPT="${CFLAGS}"
+}
+
+do_install() {
+ # make install needs the original Makefile, or otherwise the inclues would
+ # go to ${D}${STAGING...}/...
+ install -m 0644 Makefile.orig Makefile
+
+ install -d ${D}${libdir}/pkgconfig
+ install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config
+
+ # rerun the build once again with original makefile this time
+ # run install in a separate step to avoid compile/install race
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ LIB=${baselib} \
+ ARCH=${TARGET_ARCH} \
+ DESTDIR=${D} LIBDIR=${libdir}
+
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ LIB=${baselib} \
+ ARCH=${TARGET_ARCH} \
+ DESTDIR=${D} LIBDIR=${libdir} install
+
+ # avoid conflict with 2to3 from Python 2
+ rm -f ${D}/${bindir}/2to3
+
+ install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+ install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile
+
+ if [ -e ${WORKDIR}/sitecustomize.py ]; then
+ install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
+ fi
+
+ oe_multilib_header python${PYTHON_BINABI}/pyconfig.h
+}
+
+do_install_append_class-nativesdk () {
+ create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
+}
+
+SSTATE_SCAN_FILES += "Makefile"
+PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
+
+py_package_preprocess () {
+ # copy back the old Makefile to fix target package
+ install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+ install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile
+ # Remove references to buildmachine paths in target Makefile and _sysconfigdata
+ sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile \
+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py \
+ ${PKGD}/${bindir}/python${PYTHON_BINABI}-config
+
+ # Recompile _sysconfigdata after modifying it
+ cd ${PKGD}
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \
+ -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py')"
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \
+ -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py', optimize=1)"
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \
+ -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py', optimize=2)"
+ cd -
+}
+
+# manual dependency additions
+RPROVIDES_${PN}-modules = "${PN}"
+RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python3-modules"
+RRECOMMENDS_${PN}-crypt = "openssl"
+RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
+
+FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}"
+FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
+FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
+
+PACKAGES =+ "${PN}-pyvenv"
+FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv"
+
+# package libpython3
+PACKAGES =+ "libpython3 libpython3-staticdev"
+FILES_libpython3 = "${libdir}/libpython*.so.*"
+FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}/libpython${PYTHON_BINABI}.a"
+INSANE_SKIP_${PN}-dev += "dev-elf"
+
+# catch all the rest (unsorted)
+PACKAGES += "${PN}-misc"
+RDEPENDS_${PN}-misc += "${PN}-core ${PN}-email ${PN}-codecs"
+RDEPENDS_${PN}-modules += "${PN}-misc"
+FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
+
+# catch manpage
+PACKAGES += "${PN}-man"
+FILES_${PN}-man = "${datadir}/man"
+
+BBCLASSEXTEND = "nativesdk"
+
+RPROVIDES_${PN} += "${PN}-modules"
+
+# We want bytecode precompiled .py files (.pyc's) by default
+# but the user may set it on their own conf
+INCLUDE_PYCS ?= "1"
+
+python(){
+ import json
+
+ filename = os.path.join(d.getVar('THISDIR'), 'python3', 'python3-manifest.json')
+ # This python changes the datastore based on the contents of a file, so mark
+ # that dependency.
+ bb.parse.mark_dependency(d, filename)
+
+ with open(filename) as manifest_file:
+ python_manifest=json.load(manifest_file)
+
+ include_pycs = d.getVar('INCLUDE_PYCS')
+
+ packages = d.getVar('PACKAGES').split()
+ pn = d.getVar('PN')
+
+ newpackages=[]
+ for key in python_manifest:
+ pypackage= pn + '-' + key
+
+ if pypackage not in packages:
+ # We need to prepend, otherwise python-misc gets everything
+ # so we use a new variable
+ newpackages.append(pypackage)
+
+ # "Build" python's manifest FILES, RDEPENDS and SUMMARY
+ d.setVar('FILES_' + pypackage, '')
+ for value in python_manifest[key]['files']:
+ d.appendVar('FILES_' + pypackage, ' ' + value)
+
+ # Add cached files
+ if include_pycs == '1':
+ for value in python_manifest[key]['cached']:
+ d.appendVar('FILES_' + pypackage, ' ' + value)
+
+ d.setVar('RDEPENDS_' + pypackage, '')
+ for value in python_manifest[key]['rdepends']:
+ # Make it work with or without $PN
+ if '${PN}' in value:
+ value=value.split('-')[1]
+ d.appendVar('RDEPENDS_' + pypackage, ' ' + pn + '-' + value)
+ d.setVar('SUMMARY_' + pypackage, python_manifest[key]['summary'])
+
+ # We need to ensure staticdev packages match for files first so we sort in reverse
+ newpackages.sort(reverse=True)
+ # Prepending so to avoid python-misc getting everything
+ packages = newpackages + packages
+ d.setVar('PACKAGES', ' '.join(packages))
+ d.setVar('ALLOW_EMPTY_${PN}-modules', '1')
+}
+
+# Files needed to create a new manifest
+SRC_URI += "file://create_manifest3.py file://get_module_deps3.py file://python3-manifest.json"
+
+do_create_manifest() {
+ # This task should be run with every new release of Python.
+ # We must ensure that PACKAGECONFIG enables everything when creating
+ # a new manifest, this is to base our new manifest on a complete
+ # native python build, containing all dependencies, otherwise the task
+ # wont be able to find the required files.
+ # e.g. BerkeleyDB is an optional build dependency so it may or may not
+ # be present, we must ensure it is.
+
+ cd ${WORKDIR}
+ # This needs to be executed by python-native and NOT by HOST's python
+ nativepython3 create_manifest3.py
+ cp python3-manifest.json.new ${THISDIR}/python3/python3-manifest.json
+}
+
+# bitbake python -c create_manifest
+addtask do_create_manifest
+
+# Make sure we have native python ready when we create a new manifest
+do_create_manifest[depends] += "python3:do_prepare_recipe_sysroot"
+do_create_manifest[depends] += "python3:do_patch"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.13.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.13.bb
deleted file mode 100644
index 754c029..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.13.bb
+++ /dev/null
@@ -1,195 +0,0 @@
-require python.inc
-DEPENDS = "python-native libffi bzip2 gdbm openssl readline sqlite3 zlib"
-PR = "${INC_PR}"
-
-DISTRO_SRC_URI ?= "file://sitecustomize.py"
-DISTRO_SRC_URI_linuxstdbase = ""
-SRC_URI += "\
- file://01-use-proper-tools-for-cross-build.patch \
- file://03-fix-tkinter-detection.patch \
- file://06-avoid_usr_lib_termcap_path_in_linking.patch \
- ${DISTRO_SRC_URI} \
- file://multilib.patch \
- file://cgi_py.patch \
- file://setup_py_skip_cross_import_check.patch \
- file://add-md5module-support.patch \
- file://host_include_contamination.patch \
- file://fix_for_using_different_libdir.patch \
- file://setuptweaks.patch \
- file://check-if-target-is-64b-not-host.patch \
- file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
- file://avoid_warning_about_tkinter.patch \
- file://avoid_warning_for_sunos_specific_module.patch \
- file://python-2.7.3-remove-bsdb-rpath.patch \
- file://fix-makefile-for-ptest.patch \
- file://run-ptest \
- file://parallel-makeinst-create-bindir.patch \
- file://use_sysroot_ncurses_instead_of_host.patch \
- file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
- file://Don-t-use-getentropy-on-Linux.patch \
- file://pass-missing-libraries-to-Extension-for-mul.patch \
- file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \
-"
-
-S = "${WORKDIR}/Python-${PV}"
-
-inherit autotools multilib_header python-dir pythonnative
-
-CONFIGUREOPTS += " --with-system-ffi "
-
-EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
-
-PACKAGECONFIG ??= "bdb"
-PACKAGECONFIG[bdb] = ",,db"
-
-do_configure_append() {
- rm -f ${S}/Makefile.orig
- autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-do_compile() {
- # regenerate platform specific files, because they depend on system headers
- cd ${S}/Lib/plat-linux2
- include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \
- ${S}/Tools/scripts/h2py.py -i '(u_long)' \
- ${STAGING_INCDIR}/dlfcn.h \
- ${STAGING_INCDIR}/linux/cdrom.h \
- ${STAGING_INCDIR}/netinet/in.h \
- ${STAGING_INCDIR}/sys/types.h
- sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
- cd -
-
- # remove any bogus LD_LIBRARY_PATH
- sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
-
- if [ ! -f Makefile.orig ]; then
- install -m 0644 Makefile Makefile.orig
- fi
- sed -i -e 's#^LDFLAGS=.*#LDFLAGS=${LDFLAGS} -L. -L${STAGING_LIBDIR}#g' \
- -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
- -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
- -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
- -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
- -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
- -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
- Makefile
- # save copy of it now, because if we do it in do_install and
- # then call do_install twice we get Makefile.orig == Makefile.sysroot
- install -m 0644 Makefile Makefile.sysroot
-
- export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${B}"
-
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- OPT="${CFLAGS}"
-}
-
-do_install() {
- # make install needs the original Makefile, or otherwise the inclues would
- # go to ${D}${STAGING...}/...
- install -m 0644 Makefile.orig Makefile
-
- export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${B}"
-
- # After swizzling the makefile, we need to run the build again.
- # install can race with the build so we have to run this first, then install
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
- CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- DESTDIR=${D} LIBDIR=${libdir}
-
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
- CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- DESTDIR=${D} LIBDIR=${libdir} install
-
- install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
-
- if [ -e ${WORKDIR}/sitecustomize.py ]; then
- install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
- fi
-
- oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
-
- if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'bdb', d)}" ]; then
- rm -rf ${D}/${libdir}/python${PYTHON_MAJMIN}/bsddb
- fi
-}
-
-do_install_append_class-nativesdk () {
- create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
-}
-
-SSTATE_SCAN_FILES += "Makefile"
-PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
-
-py_package_preprocess () {
- # copy back the old Makefile to fix target package
- install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
-
- # Remove references to buildmachine paths in target Makefile and _sysconfigdata
- sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
- python -m py_compile ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
-}
-
-require python-${PYTHON_MAJMIN}-manifest.inc
-
-# manual dependency additions
-RPROVIDES_${PN}-core = "${PN}"
-RRECOMMENDS_${PN}-core = "${PN}-readline"
-RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
-RRECOMMENDS_${PN}-crypt = "openssl"
-
-# package libpython2
-PACKAGES =+ "lib${BPN}2"
-FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
-
-# catch all the rest (unsorted)
-PACKAGES += "${PN}-misc"
-FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
-RDEPENDS_${PN}-modules += "${PN}-misc"
-
-# ptest
-RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests"
-#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
-inherit ptest
-
-# This must come after inherit ptest for the override to take effect
-do_install_ptest() {
- cp ${B}/Makefile ${D}${PTEST_PATH}
- sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
- -e s:LIBDIR:${libdir}:g \
- -i ${D}${PTEST_PATH}/run-ptest
-
- #Remove build host references
- sed -i \
- -e 's:--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
- -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
- -e 's|${DEBUG_PREFIX_MAP}||g' \
- -e 's:${HOSTTOOLS_DIR}/::g' \
- -e 's:${RECIPE_SYSROOT}::g' \
- -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
- ${D}/${PTEST_PATH}/Makefile
-}
-
-# catch manpage
-PACKAGES += "${PN}-man"
-FILES_${PN}-man = "${datadir}/man"
-
-# Nasty but if bdb isn't enabled the package won't be generated
-RDEPENDS_${PN}-modules_remove = "${@bb.utils.contains('PACKAGECONFIG', 'bdb', '', '${PN}-bsddb', d)}"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.14.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.14.bb
new file mode 100644
index 0000000..0a09926
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.14.bb
@@ -0,0 +1,281 @@
+require python.inc
+
+DEPENDS = "python-native libffi bzip2 gdbm openssl readline sqlite3 zlib"
+
+PR = "${INC_PR}"
+
+DISTRO_SRC_URI ?= "file://sitecustomize.py"
+DISTRO_SRC_URI_linuxstdbase = ""
+SRC_URI += "\
+ file://01-use-proper-tools-for-cross-build.patch \
+ file://03-fix-tkinter-detection.patch \
+ file://06-avoid_usr_lib_termcap_path_in_linking.patch \
+ ${DISTRO_SRC_URI} \
+ file://multilib.patch \
+ file://cgi_py.patch \
+ file://setup_py_skip_cross_import_check.patch \
+ file://add-md5module-support.patch \
+ file://host_include_contamination.patch \
+ file://fix_for_using_different_libdir.patch \
+ file://setuptweaks.patch \
+ file://check-if-target-is-64b-not-host.patch \
+ file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
+ file://avoid_warning_about_tkinter.patch \
+ file://avoid_warning_for_sunos_specific_module.patch \
+ file://python-2.7.3-remove-bsdb-rpath.patch \
+ file://fix-makefile-for-ptest.patch \
+ file://run-ptest \
+ file://parallel-makeinst-create-bindir.patch \
+ file://use_sysroot_ncurses_instead_of_host.patch \
+ file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
+ file://pass-missing-libraries-to-Extension-for-mul.patch \
+ file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \
+"
+
+S = "${WORKDIR}/Python-${PV}"
+
+inherit autotools multilib_header python-dir pythonnative
+
+CONFIGUREOPTS += " --with-system-ffi "
+
+EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
+
+PACKAGECONFIG ??= "bdb"
+PACKAGECONFIG[bdb] = ",,db"
+
+do_configure_append() {
+ rm -f ${S}/Makefile.orig
+ autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+}
+
+do_compile() {
+ # regenerate platform specific files, because they depend on system headers
+ cd ${S}/Lib/plat-linux2
+ include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \
+ ${S}/Tools/scripts/h2py.py -i '(u_long)' \
+ ${STAGING_INCDIR}/dlfcn.h \
+ ${STAGING_INCDIR}/linux/cdrom.h \
+ ${STAGING_INCDIR}/netinet/in.h \
+ ${STAGING_INCDIR}/sys/types.h
+ sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
+ cd -
+
+ # remove any bogus LD_LIBRARY_PATH
+ sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
+
+ if [ ! -f Makefile.orig ]; then
+ install -m 0644 Makefile Makefile.orig
+ fi
+ sed -i -e 's#^LDFLAGS=.*#LDFLAGS=${LDFLAGS} -L. -L${STAGING_LIBDIR}#g' \
+ -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
+ -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
+ -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
+ -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
+ -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
+ -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
+ Makefile
+ # save copy of it now, because if we do it in do_install and
+ # then call do_install twice we get Makefile.orig == Makefile.sysroot
+ install -m 0644 Makefile Makefile.sysroot
+
+ export CROSS_COMPILE="${TARGET_PREFIX}"
+ export PYTHONBUILDDIR="${B}"
+
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ OPT="${CFLAGS}"
+}
+
+do_install() {
+ # make install needs the original Makefile, or otherwise the inclues would
+ # go to ${D}${STAGING...}/...
+ install -m 0644 Makefile.orig Makefile
+
+ export CROSS_COMPILE="${TARGET_PREFIX}"
+ export PYTHONBUILDDIR="${B}"
+
+ # After swizzling the makefile, we need to run the build again.
+ # install can race with the build so we have to run this first, then install
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
+ CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ DESTDIR=${D} LIBDIR=${libdir}
+
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
+ CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ DESTDIR=${D} LIBDIR=${libdir} install
+
+ install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+
+ if [ -e ${WORKDIR}/sitecustomize.py ]; then
+ install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
+ fi
+
+ oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
+
+ if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'bdb', d)}" ]; then
+ rm -rf ${D}/${libdir}/python${PYTHON_MAJMIN}/bsddb
+ fi
+}
+
+do_install_append_class-nativesdk () {
+ create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
+}
+
+SSTATE_SCAN_FILES += "Makefile"
+PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
+
+py_package_preprocess () {
+ # copy back the old Makefile to fix target package
+ install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+
+ # Remove references to buildmachine paths in target Makefile and _sysconfigdata
+ sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
+ (cd ${PKGD}; python -m py_compile ./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py)
+}
+
+
+# manual dependency additions
+RPROVIDES_${PN}-core = "${PN}"
+RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
+RRECOMMENDS_${PN}-crypt = "openssl"
+
+# package libpython2
+PACKAGES =+ "lib${BPN}2"
+FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
+
+# catch all the rest (unsorted)
+PACKAGES += "${PN}-misc"
+FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
+RDEPENDS_${PN}-modules += "${PN}-misc"
+
+# ptest
+RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests"
+#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
+inherit ptest
+
+# This must come after inherit ptest for the override to take effect
+do_install_ptest() {
+ cp ${B}/Makefile ${D}${PTEST_PATH}
+ sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
+ -e s:LIBDIR:${libdir}:g \
+ -i ${D}${PTEST_PATH}/run-ptest
+
+ #Remove build host references
+ sed -i \
+ -e 's:--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+ -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ ${D}/${PTEST_PATH}/Makefile
+}
+
+# catch manpage
+PACKAGES += "${PN}-man"
+FILES_${PN}-man = "${datadir}/man"
+
+# Nasty but if bdb isn't enabled the package won't be generated
+RDEPENDS_${PN}-modules_remove = "${@bb.utils.contains('PACKAGECONFIG', 'bdb', '', '${PN}-bsddb', d)}"
+
+BBCLASSEXTEND = "nativesdk"
+
+RPROVIDES_${PN} += "${PN}-modules"
+
+# We want bytecode precompiled .py files (.pyc's) by default
+# but the user may set it on their own conf
+
+INCLUDE_PYCS ?= "1"
+
+python(){
+ import json
+
+ filename = os.path.join(d.getVar('THISDIR'), 'python', 'python2-manifest.json')
+ # This python changes the datastore based on the contents of a file, so mark
+ # that dependency.
+ bb.parse.mark_dependency(d, filename)
+
+ with open(filename) as manifest_file:
+ python_manifest=json.load(manifest_file)
+
+ include_pycs = d.getVar('INCLUDE_PYCS')
+
+ packages = d.getVar('PACKAGES').split()
+ pn = d.getVar('PN')
+
+ newpackages=[]
+
+ for key in python_manifest:
+ pypackage= pn + '-' + key
+
+ if pypackage not in packages:
+ # We need to prepend, otherwise python-misc gets everything
+ # so we use a new variable
+ newpackages.append(pypackage)
+
+ # "Build" python's manifest FILES, RDEPENDS and SUMMARY
+ d.setVar('FILES_' + pypackage, '')
+ for value in python_manifest[key]['files']:
+ d.appendVar('FILES_' + pypackage, ' ' + value)
+ if include_pycs == '1':
+ if value.endswith('.py'):
+ d.appendVar('FILES_' + pypackage, ' ' + value + 'c')
+
+ d.setVar('RDEPENDS_' + pypackage, '')
+ for value in python_manifest[key]['rdepends']:
+ # Make it work with or without $PN
+ if '${PN}' in value:
+ value=value.split('-')[1]
+ d.appendVar('RDEPENDS_' + pypackage, ' ' + pn + '-' + value)
+ d.setVar('SUMMARY_' + pypackage, python_manifest[key]['summary'])
+
+ # We need to ensure staticdev packages match for files first so we sort in reverse
+ newpackages.sort(reverse=True)
+ # Prepending so to avoid python-misc getting everything
+ packages = newpackages + packages
+ d.setVar('PACKAGES', ' '.join(packages))
+ d.setVar('ALLOW_EMPTY_${PN}-modules', '1')
+}
+
+# Files needed to create a new manifest
+SRC_URI += "file://create_manifest2.py file://get_module_deps2.py file://python2-manifest.json"
+
+do_create_manifest() {
+ # This task should be run with every new release of Python.
+ # We must ensure that PACKAGECONFIG enables everything when creating
+ # a new manifest, this is to base our new manifest on a complete
+ # native python build, containing all dependencies, otherwise the task
+ # wont be able to find the required files.
+ # e.g. BerkeleyDB is an optional build dependency so it may or may not
+ # be present, we must ensure it is.
+
+ cd ${WORKDIR}
+ # This needs to be executed by python-native and NOT by HOST's python
+ nativepython create_manifest2.py
+ cp python2-manifest.json.new ${THISDIR}/python/python2-manifest.json
+}
+
+# bitbake python -c create_manifest
+addtask do_create_manifest
+
+# Make sure we have native python ready when we create a new manifest
+do_create_manifest[depends] += "python:do_prepare_recipe_sysroot"
+do_create_manifest[depends] += "python:do_patch"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
index 943ca5f..cdc2f51 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
@@ -1,7 +1,7 @@
SUMMARY = "Qemu helper scripts"
LICENSE = "GPLv2"
-RDEPENDS_${PN} = "nativesdk-qemu nativesdk-python3-subprocess \
- nativesdk-python3-shell nativesdk-python3-fcntl \
+RDEPENDS_${PN} = "nativesdk-qemu \
+ nativesdk-python3-shell nativesdk-python3-fcntl nativesdk-python3-logging \
"
PR = "r9"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
index 2a1d14b..dc73df8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
@@ -28,7 +28,7 @@
--target-list=${@get_qemu_target_list(d)} \
--extra-cflags='${CFLAGS}' \
"
-EXTRA_OECONF_append_class-native = " --python=${USRBINPATH}/python2.7"
+EXTRA_OECONF_append_class-native = " --python=python2.7"
EXTRA_OEMAKE_append_class-native = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-Provide-support-for-the-CUSE-TPM.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-Provide-support-for-the-CUSE-TPM.patch
deleted file mode 100644
index 74dc6f5..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-Provide-support-for-the-CUSE-TPM.patch
+++ /dev/null
@@ -1,870 +0,0 @@
-From 8737eef18f39ed087fd911d0a0886e8174d0468c Mon Sep 17 00:00:00 2001
-From: Stefan Berger <stefanb@linux.vnet.ibm.com>
-Date: Sat, 31 Dec 2016 11:23:32 -0500
-Subject: [PATCH 1/4] Provide support for the CUSE TPM
-
-Rather than integrating TPM functionality into QEMU directly
-using the TPM emulation of libtpms, we now integrate an external
-emulated TPM device. This device is expected to implement a Linux
-CUSE interface (CUSE = character device in userspace).
-
-QEMU talks to the CUSE TPM using much functionality of the
-passthrough driver. For example, the TPM commands and responses
-are sent to the CUSE TPM using the read()/write() interface.
-However, some out-of-band control needs to be done using the CUSE
-TPM's ioctls. The CUSE TPM currently defines and implements 15
-different ioctls for controlling certain life-cycle aspects of
-the emulated TPM. The ioctls can be regarded as a replacement for
-direct function calls to a TPM emulator if the TPM were to be
-directly integrated into QEMU.
-
-One of the ioctls allows to get a bitmask of supported capabilities.
-Each returned bit indicates which capabilities have been implemented.
-An include file defining the various ioctls is added to QEMU.
-
-The CUSE TPM and associated tools can be found here:
-
-https://github.com/stefanberger/swtpm
-
-(please use the latest version)
-
-To use the external CUSE TPM, the CUSE TPM should be started as follows:
-
-/usr/bin/swtpm_ioctl -s /dev/vtpm-test
-
-/usr/bin/swtpm_cuse -n vtpm-test
-
-QEMU can then be started using the following parameters:
-
-qemu-system-x86_64 \
- [...] \
- -tpmdev cuse-tpm,id=tpm0,cancel-path=/dev/null,path=/dev/vtpm-test \
- -device tpm-tis,id=tpm0,tpmdev=tpm0 \
- [...]
-
-Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
-Cc: Eric Blake <eblake@redhat.com>
-
-Conflicts:
- docs/qmp-commands.txt
-
-Patch cherry-picked from https://github.com/stefanberger/qemu-tpm, branch v2.8.0+tpm,
-commit 27d6cd856d5a14061955df7a93ee490697a7a174. Applied cleanly except for
-docs/qmp-commands.txt which did not exist yet in qemu 2.7.
-
-Upstream-Status: Pending [https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg00252.html]
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
----
- hmp.c | 6 ++
- hw/tpm/tpm_int.h | 1 +
- hw/tpm/tpm_ioctl.h | 215 +++++++++++++++++++++++++++++++++++++
- hw/tpm/tpm_passthrough.c | 274 +++++++++++++++++++++++++++++++++++++++++++++--
- qapi-schema.json | 18 +++-
- qemu-options.hx | 21 +++-
- tpm.c | 11 +-
- 7 files changed, 529 insertions(+), 17 deletions(-)
- create mode 100644 hw/tpm/tpm_ioctl.h
-
-diff --git a/hmp.c b/hmp.c
-index cc2056e9e2..277b45ef5a 100644
---- a/hmp.c
-+++ b/hmp.c
-@@ -883,6 +883,12 @@ void hmp_info_tpm(Monitor *mon, const QDict *qdict)
- tpo->has_cancel_path ? ",cancel-path=" : "",
- tpo->has_cancel_path ? tpo->cancel_path : "");
- break;
-+ case TPM_TYPE_OPTIONS_KIND_CUSE_TPM:
-+ tpo = ti->options->u.passthrough.data;
-+ monitor_printf(mon, "%s%s",
-+ tpo->has_path ? ",path=" : "",
-+ tpo->has_path ? tpo->path : "");
-+ break;
- case TPM_TYPE_OPTIONS_KIND__MAX:
- break;
- }
-diff --git a/hw/tpm/tpm_int.h b/hw/tpm/tpm_int.h
-index f2f285b3cc..6b2c9c953a 100644
---- a/hw/tpm/tpm_int.h
-+++ b/hw/tpm/tpm_int.h
-@@ -61,6 +61,7 @@ struct tpm_resp_hdr {
- #define TPM_TAG_RSP_AUTH1_COMMAND 0xc5
- #define TPM_TAG_RSP_AUTH2_COMMAND 0xc6
-
-+#define TPM_SUCCESS 0
- #define TPM_FAIL 9
-
- #define TPM_ORD_ContinueSelfTest 0x53
-diff --git a/hw/tpm/tpm_ioctl.h b/hw/tpm/tpm_ioctl.h
-new file mode 100644
-index 0000000000..a341e15741
---- /dev/null
-+++ b/hw/tpm/tpm_ioctl.h
-@@ -0,0 +1,215 @@
-+/*
-+ * tpm_ioctl.h
-+ *
-+ * (c) Copyright IBM Corporation 2014, 2015.
-+ *
-+ * This file is licensed under the terms of the 3-clause BSD license
-+ */
-+#ifndef _TPM_IOCTL_H_
-+#define _TPM_IOCTL_H_
-+
-+#include <stdint.h>
-+#include <sys/uio.h>
-+#include <sys/types.h>
-+#include <sys/ioctl.h>
-+
-+/*
-+ * Every response from a command involving a TPM command execution must hold
-+ * the ptm_res as the first element.
-+ * ptm_res corresponds to the error code of a command executed by the TPM.
-+ */
-+
-+typedef uint32_t ptm_res;
-+
-+/* PTM_GET_TPMESTABLISHED: get the establishment bit */
-+struct ptm_est {
-+ union {
-+ struct {
-+ ptm_res tpm_result;
-+ unsigned char bit; /* TPM established bit */
-+ } resp; /* response */
-+ } u;
-+};
-+
-+/* PTM_RESET_TPMESTABLISHED: reset establishment bit */
-+struct ptm_reset_est {
-+ union {
-+ struct {
-+ uint8_t loc; /* locality to use */
-+ } req; /* request */
-+ struct {
-+ ptm_res tpm_result;
-+ } resp; /* response */
-+ } u;
-+};
-+
-+/* PTM_INIT */
-+struct ptm_init {
-+ union {
-+ struct {
-+ uint32_t init_flags; /* see definitions below */
-+ } req; /* request */
-+ struct {
-+ ptm_res tpm_result;
-+ } resp; /* response */
-+ } u;
-+};
-+
-+/* above init_flags */
-+#define PTM_INIT_FLAG_DELETE_VOLATILE (1 << 0)
-+ /* delete volatile state file after reading it */
-+
-+/* PTM_SET_LOCALITY */
-+struct ptm_loc {
-+ union {
-+ struct {
-+ uint8_t loc; /* locality to set */
-+ } req; /* request */
-+ struct {
-+ ptm_res tpm_result;
-+ } resp; /* response */
-+ } u;
-+};
-+
-+/* PTM_HASH_DATA: hash given data */
-+struct ptm_hdata {
-+ union {
-+ struct {
-+ uint32_t length;
-+ uint8_t data[4096];
-+ } req; /* request */
-+ struct {
-+ ptm_res tpm_result;
-+ } resp; /* response */
-+ } u;
-+};
-+
-+/*
-+ * size of the TPM state blob to transfer; x86_64 can handle 8k,
-+ * ppc64le only ~7k; keep the response below a 4k page size
-+ */
-+#define PTM_STATE_BLOB_SIZE (3 * 1024)
-+
-+/*
-+ * The following is the data structure to get state blobs from the TPM.
-+ * If the size of the state blob exceeds the PTM_STATE_BLOB_SIZE, multiple reads
-+ * with this ioctl and with adjusted offset are necessary. All bytes
-+ * must be transferred and the transfer is done once the last byte has been
-+ * returned.
-+ * It is possible to use the read() interface for reading the data; however,
-+ * the first bytes of the state blob will be part of the response to the ioctl();
-+ * a subsequent read() is only necessary if the total length (totlength) exceeds
-+ * the number of received bytes. seek() is not supported.
-+ */
-+struct ptm_getstate {
-+ union {
-+ struct {
-+ uint32_t state_flags; /* may be: PTM_STATE_FLAG_DECRYPTED */
-+ uint32_t type; /* which blob to pull */
-+ uint32_t offset; /* offset from where to read */
-+ } req; /* request */
-+ struct {
-+ ptm_res tpm_result;
-+ uint32_t state_flags; /* may be: PTM_STATE_FLAG_ENCRYPTED */
-+ uint32_t totlength; /* total length that will be transferred */
-+ uint32_t length; /* number of bytes in following buffer */
-+ uint8_t data[PTM_STATE_BLOB_SIZE];
-+ } resp; /* response */
-+ } u;
-+};
-+
-+/* TPM state blob types */
-+#define PTM_BLOB_TYPE_PERMANENT 1
-+#define PTM_BLOB_TYPE_VOLATILE 2
-+#define PTM_BLOB_TYPE_SAVESTATE 3
-+
-+/* state_flags above : */
-+#define PTM_STATE_FLAG_DECRYPTED 1 /* on input: get decrypted state */
-+#define PTM_STATE_FLAG_ENCRYPTED 2 /* on output: state is encrypted */
-+
-+/*
-+ * The following is the data structure to set state blobs in the TPM.
-+ * If the size of the state blob exceeds the PTM_STATE_BLOB_SIZE, multiple
-+ * 'writes' using this ioctl are necessary. The last packet is indicated
-+ * by the length being smaller than the PTM_STATE_BLOB_SIZE.
-+ * The very first packet may have a length indicator of '0' enabling
-+ * a write() with all the bytes from a buffer. If the write() interface
-+ * is used, a final ioctl with a non-full buffer must be made to indicate
-+ * that all data were transferred (a write with 0 bytes would not work).
-+ */
-+struct ptm_setstate {
-+ union {
-+ struct {
-+ uint32_t state_flags; /* may be PTM_STATE_FLAG_ENCRYPTED */
-+ uint32_t type; /* which blob to set */
-+ uint32_t length; /* length of the data;
-+ use 0 on the first packet to
-+ transfer using write() */
-+ uint8_t data[PTM_STATE_BLOB_SIZE];
-+ } req; /* request */
-+ struct {
-+ ptm_res tpm_result;
-+ } resp; /* response */
-+ } u;
-+};
-+
-+/*
-+ * PTM_GET_CONFIG: Data structure to get runtime configuration information
-+ * such as which keys are applied.
-+ */
-+struct ptm_getconfig {
-+ union {
-+ struct {
-+ ptm_res tpm_result;
-+ uint32_t flags;
-+ } resp; /* response */
-+ } u;
-+};
-+
-+#define PTM_CONFIG_FLAG_FILE_KEY 0x1
-+#define PTM_CONFIG_FLAG_MIGRATION_KEY 0x2
-+
-+
-+typedef uint64_t ptm_cap;
-+typedef struct ptm_est ptm_est;
-+typedef struct ptm_reset_est ptm_reset_est;
-+typedef struct ptm_loc ptm_loc;
-+typedef struct ptm_hdata ptm_hdata;
-+typedef struct ptm_init ptm_init;
-+typedef struct ptm_getstate ptm_getstate;
-+typedef struct ptm_setstate ptm_setstate;
-+typedef struct ptm_getconfig ptm_getconfig;
-+
-+/* capability flags returned by PTM_GET_CAPABILITY */
-+#define PTM_CAP_INIT (1)
-+#define PTM_CAP_SHUTDOWN (1<<1)
-+#define PTM_CAP_GET_TPMESTABLISHED (1<<2)
-+#define PTM_CAP_SET_LOCALITY (1<<3)
-+#define PTM_CAP_HASHING (1<<4)
-+#define PTM_CAP_CANCEL_TPM_CMD (1<<5)
-+#define PTM_CAP_STORE_VOLATILE (1<<6)
-+#define PTM_CAP_RESET_TPMESTABLISHED (1<<7)
-+#define PTM_CAP_GET_STATEBLOB (1<<8)
-+#define PTM_CAP_SET_STATEBLOB (1<<9)
-+#define PTM_CAP_STOP (1<<10)
-+#define PTM_CAP_GET_CONFIG (1<<11)
-+
-+enum {
-+ PTM_GET_CAPABILITY = _IOR('P', 0, ptm_cap),
-+ PTM_INIT = _IOWR('P', 1, ptm_init),
-+ PTM_SHUTDOWN = _IOR('P', 2, ptm_res),
-+ PTM_GET_TPMESTABLISHED = _IOR('P', 3, ptm_est),
-+ PTM_SET_LOCALITY = _IOWR('P', 4, ptm_loc),
-+ PTM_HASH_START = _IOR('P', 5, ptm_res),
-+ PTM_HASH_DATA = _IOWR('P', 6, ptm_hdata),
-+ PTM_HASH_END = _IOR('P', 7, ptm_res),
-+ PTM_CANCEL_TPM_CMD = _IOR('P', 8, ptm_res),
-+ PTM_STORE_VOLATILE = _IOR('P', 9, ptm_res),
-+ PTM_RESET_TPMESTABLISHED = _IOWR('P', 10, ptm_reset_est),
-+ PTM_GET_STATEBLOB = _IOWR('P', 11, ptm_getstate),
-+ PTM_SET_STATEBLOB = _IOWR('P', 12, ptm_setstate),
-+ PTM_STOP = _IOR('P', 13, ptm_res),
-+ PTM_GET_CONFIG = _IOR('P', 14, ptm_getconfig),
-+};
-+
-+#endif /* _TPM_IOCTL_H */
-diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
-index e88c0d20bc..050f2ba850 100644
---- a/hw/tpm/tpm_passthrough.c
-+++ b/hw/tpm/tpm_passthrough.c
-@@ -33,6 +33,7 @@
- #include "sysemu/tpm_backend_int.h"
- #include "tpm_tis.h"
- #include "tpm_util.h"
-+#include "tpm_ioctl.h"
-
- #define DEBUG_TPM 0
-
-@@ -45,6 +46,7 @@
- #define TYPE_TPM_PASSTHROUGH "tpm-passthrough"
- #define TPM_PASSTHROUGH(obj) \
- OBJECT_CHECK(TPMPassthruState, (obj), TYPE_TPM_PASSTHROUGH)
-+#define TYPE_TPM_CUSE "tpm-cuse"
-
- static const TPMDriverOps tpm_passthrough_driver;
-
-@@ -71,12 +73,18 @@ struct TPMPassthruState {
- bool had_startup_error;
-
- TPMVersion tpm_version;
-+ ptm_cap cuse_cap; /* capabilities of the CUSE TPM */
-+ uint8_t cur_locty_number; /* last set locality */
- };
-
- typedef struct TPMPassthruState TPMPassthruState;
-
- #define TPM_PASSTHROUGH_DEFAULT_DEVICE "/dev/tpm0"
-
-+#define TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt) (tpm_pt->cuse_cap != 0)
-+
-+#define TPM_CUSE_IMPLEMENTS_ALL(S, cap) (((S)->cuse_cap & (cap)) == (cap))
-+
- /* functions */
-
- static void tpm_passthrough_cancel_cmd(TPMBackend *tb);
-@@ -148,7 +156,28 @@ static bool tpm_passthrough_is_selftest(const uint8_t *in, uint32_t in_len)
- return false;
- }
-
-+static int tpm_passthrough_set_locality(TPMPassthruState *tpm_pt,
-+ uint8_t locty_number)
-+{
-+ ptm_loc loc;
-+
-+ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+ if (tpm_pt->cur_locty_number != locty_number) {
-+ loc.u.req.loc = locty_number;
-+ if (ioctl(tpm_pt->tpm_fd, PTM_SET_LOCALITY, &loc) < 0) {
-+ error_report("tpm_cuse: could not set locality on "
-+ "CUSE TPM: %s",
-+ strerror(errno));
-+ return -1;
-+ }
-+ tpm_pt->cur_locty_number = locty_number;
-+ }
-+ }
-+ return 0;
-+}
-+
- static int tpm_passthrough_unix_tx_bufs(TPMPassthruState *tpm_pt,
-+ uint8_t locality_number,
- const uint8_t *in, uint32_t in_len,
- uint8_t *out, uint32_t out_len,
- bool *selftest_done)
-@@ -157,6 +186,11 @@ static int tpm_passthrough_unix_tx_bufs(TPMPassthruState *tpm_pt,
- bool is_selftest;
- const struct tpm_resp_hdr *hdr;
-
-+ ret = tpm_passthrough_set_locality(tpm_pt, locality_number);
-+ if (ret < 0) {
-+ goto err_exit;
-+ }
-+
- tpm_pt->tpm_op_canceled = false;
- tpm_pt->tpm_executing = true;
- *selftest_done = false;
-@@ -207,10 +241,12 @@ err_exit:
- }
-
- static int tpm_passthrough_unix_transfer(TPMPassthruState *tpm_pt,
-+ uint8_t locality_number,
- const TPMLocality *locty_data,
- bool *selftest_done)
- {
- return tpm_passthrough_unix_tx_bufs(tpm_pt,
-+ locality_number,
- locty_data->w_buffer.buffer,
- locty_data->w_offset,
- locty_data->r_buffer.buffer,
-@@ -231,6 +267,7 @@ static void tpm_passthrough_worker_thread(gpointer data,
- switch (cmd) {
- case TPM_BACKEND_CMD_PROCESS_CMD:
- tpm_passthrough_unix_transfer(tpm_pt,
-+ thr_parms->tpm_state->locty_number,
- thr_parms->tpm_state->locty_data,
- &selftest_done);
-
-@@ -247,6 +284,93 @@ static void tpm_passthrough_worker_thread(gpointer data,
- }
-
- /*
-+ * Gracefully shut down the external CUSE TPM
-+ */
-+static void tpm_passthrough_shutdown(TPMPassthruState *tpm_pt)
-+{
-+ ptm_res res;
-+
-+ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+ if (ioctl(tpm_pt->tpm_fd, PTM_SHUTDOWN, &res) < 0) {
-+ error_report("tpm_cuse: Could not cleanly shut down "
-+ "the CUSE TPM: %s",
-+ strerror(errno));
-+ }
-+ }
-+}
-+
-+/*
-+ * Probe for the CUSE TPM by sending an ioctl() requesting its
-+ * capability flags.
-+ */
-+static int tpm_passthrough_cuse_probe(TPMPassthruState *tpm_pt)
-+{
-+ int rc = 0;
-+
-+ if (ioctl(tpm_pt->tpm_fd, PTM_GET_CAPABILITY, &tpm_pt->cuse_cap) < 0) {
-+ error_report("Error: CUSE TPM was requested, but probing failed");
-+ rc = -1;
-+ }
-+
-+ return rc;
-+}
-+
-+static int tpm_passthrough_cuse_check_caps(TPMPassthruState *tpm_pt)
-+{
-+ int rc = 0;
-+ ptm_cap caps = 0;
-+ const char *tpm = NULL;
-+
-+ /* check for min. required capabilities */
-+ switch (tpm_pt->tpm_version) {
-+ case TPM_VERSION_1_2:
-+ caps = PTM_CAP_INIT | PTM_CAP_SHUTDOWN | PTM_CAP_GET_TPMESTABLISHED |
-+ PTM_CAP_SET_LOCALITY;
-+ tpm = "1.2";
-+ break;
-+ case TPM_VERSION_2_0:
-+ caps = PTM_CAP_INIT | PTM_CAP_SHUTDOWN | PTM_CAP_GET_TPMESTABLISHED |
-+ PTM_CAP_SET_LOCALITY | PTM_CAP_RESET_TPMESTABLISHED;
-+ tpm = "2";
-+ break;
-+ case TPM_VERSION_UNSPEC:
-+ error_report("tpm_cuse: %s: TPM version has not been set",
-+ __func__);
-+ return -1;
-+ }
-+
-+ if (!TPM_CUSE_IMPLEMENTS_ALL(tpm_pt, caps)) {
-+ error_report("tpm_cuse: TPM does not implement minimum set of required "
-+ "capabilities for TPM %s (0x%x)", tpm, (int)caps);
-+ rc = -1;
-+ }
-+
-+ return rc;
-+}
-+
-+/*
-+ * Initialize the external CUSE TPM
-+ */
-+static int tpm_passthrough_cuse_init(TPMPassthruState *tpm_pt)
-+{
-+ int rc = 0;
-+ ptm_init init = {
-+ .u.req.init_flags = PTM_INIT_FLAG_DELETE_VOLATILE,
-+ };
-+
-+ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+ if (ioctl(tpm_pt->tpm_fd, PTM_INIT, &init) < 0) {
-+ error_report("tpm_cuse: Detected CUSE TPM but could not "
-+ "send INIT: %s",
-+ strerror(errno));
-+ rc = -1;
-+ }
-+ }
-+
-+ return rc;
-+}
-+
-+/*
- * Start the TPM (thread). If it had been started before, then terminate
- * and start it again.
- */
-@@ -261,6 +385,8 @@ static int tpm_passthrough_startup_tpm(TPMBackend *tb)
- tpm_passthrough_worker_thread,
- &tpm_pt->tpm_thread_params);
-
-+ tpm_passthrough_cuse_init(tpm_pt);
-+
- return 0;
- }
-
-@@ -291,14 +417,43 @@ static int tpm_passthrough_init(TPMBackend *tb, TPMState *s,
-
- static bool tpm_passthrough_get_tpm_established_flag(TPMBackend *tb)
- {
-+ TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-+ ptm_est est;
-+
-+ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+ if (ioctl(tpm_pt->tpm_fd, PTM_GET_TPMESTABLISHED, &est) < 0) {
-+ error_report("tpm_cuse: Could not get the TPM established "
-+ "flag from the CUSE TPM: %s",
-+ strerror(errno));
-+ return false;
-+ }
-+ return (est.u.resp.bit != 0);
-+ }
- return false;
- }
-
- static int tpm_passthrough_reset_tpm_established_flag(TPMBackend *tb,
- uint8_t locty)
- {
-+ TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-+ int rc = 0;
-+ ptm_reset_est ptmreset_est;
-+
- /* only a TPM 2.0 will support this */
-- return 0;
-+ if (tpm_pt->tpm_version == TPM_VERSION_2_0) {
-+ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+ ptmreset_est.u.req.loc = tpm_pt->cur_locty_number;
-+
-+ if (ioctl(tpm_pt->tpm_fd, PTM_RESET_TPMESTABLISHED,
-+ &ptmreset_est) < 0) {
-+ error_report("tpm_cuse: Could not reset the establishment bit "
-+ "failed: %s",
-+ strerror(errno));
-+ rc = -1;
-+ }
-+ }
-+ }
-+ return rc;
- }
-
- static bool tpm_passthrough_get_startup_error(TPMBackend *tb)
-@@ -329,7 +484,8 @@ static void tpm_passthrough_deliver_request(TPMBackend *tb)
- static void tpm_passthrough_cancel_cmd(TPMBackend *tb)
- {
- TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-- int n;
-+ ptm_res res;
-+ static bool error_printed;
-
- /*
- * As of Linux 3.7 the tpm_tis driver does not properly cancel
-@@ -338,17 +494,34 @@ static void tpm_passthrough_cancel_cmd(TPMBackend *tb)
- * command, e.g., a command executed on the host.
- */
- if (tpm_pt->tpm_executing) {
-- if (tpm_pt->cancel_fd >= 0) {
-- n = write(tpm_pt->cancel_fd, "-", 1);
-- if (n != 1) {
-- error_report("Canceling TPM command failed: %s",
-- strerror(errno));
-- } else {
-- tpm_pt->tpm_op_canceled = true;
-+ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+ if (TPM_CUSE_IMPLEMENTS_ALL(tpm_pt, PTM_CAP_CANCEL_TPM_CMD)) {
-+ if (ioctl(tpm_pt->tpm_fd, PTM_CANCEL_TPM_CMD, &res) < 0) {
-+ error_report("tpm_cuse: Could not cancel command on "
-+ "CUSE TPM: %s",
-+ strerror(errno));
-+ } else if (res != TPM_SUCCESS) {
-+ if (!error_printed) {
-+ error_report("TPM error code from command "
-+ "cancellation of CUSE TPM: 0x%x", res);
-+ error_printed = true;
-+ }
-+ } else {
-+ tpm_pt->tpm_op_canceled = true;
-+ }
- }
- } else {
-- error_report("Cannot cancel TPM command due to missing "
-- "TPM sysfs cancel entry");
-+ if (tpm_pt->cancel_fd >= 0) {
-+ if (write(tpm_pt->cancel_fd, "-", 1) != 1) {
-+ error_report("Canceling TPM command failed: %s",
-+ strerror(errno));
-+ } else {
-+ tpm_pt->tpm_op_canceled = true;
-+ }
-+ } else {
-+ error_report("Cannot cancel TPM command due to missing "
-+ "TPM sysfs cancel entry");
-+ }
- }
- }
- }
-@@ -378,6 +551,11 @@ static int tpm_passthrough_open_sysfs_cancel(TPMBackend *tb)
- char *dev;
- char path[PATH_MAX];
-
-+ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+ /* not needed, but so we have a fd */
-+ return qemu_open("/dev/null", O_WRONLY);
-+ }
-+
- if (tb->cancel_path) {
- fd = qemu_open(tb->cancel_path, O_WRONLY);
- if (fd < 0) {
-@@ -412,12 +590,22 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb)
- {
- TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
- const char *value;
-+ bool have_cuse = false;
-+
-+ value = qemu_opt_get(opts, "type");
-+ if (value != NULL && !strcmp("cuse-tpm", value)) {
-+ have_cuse = true;
-+ }
-
- value = qemu_opt_get(opts, "cancel-path");
- tb->cancel_path = g_strdup(value);
-
- value = qemu_opt_get(opts, "path");
- if (!value) {
-+ if (have_cuse) {
-+ error_report("Missing path to access CUSE TPM");
-+ goto err_free_parameters;
-+ }
- value = TPM_PASSTHROUGH_DEFAULT_DEVICE;
- }
-
-@@ -432,15 +620,36 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb)
- goto err_free_parameters;
- }
-
-+ tpm_pt->cur_locty_number = ~0;
-+
-+ if (have_cuse) {
-+ if (tpm_passthrough_cuse_probe(tpm_pt)) {
-+ goto err_close_tpmdev;
-+ }
-+ /* init TPM for probing */
-+ if (tpm_passthrough_cuse_init(tpm_pt)) {
-+ goto err_close_tpmdev;
-+ }
-+ }
-+
- if (tpm_util_test_tpmdev(tpm_pt->tpm_fd, &tpm_pt->tpm_version)) {
- error_report("'%s' is not a TPM device.",
- tpm_pt->tpm_dev);
- goto err_close_tpmdev;
- }
-
-+ if (have_cuse) {
-+ if (tpm_passthrough_cuse_check_caps(tpm_pt)) {
-+ goto err_close_tpmdev;
-+ }
-+ }
-+
-+
- return 0;
-
- err_close_tpmdev:
-+ tpm_passthrough_shutdown(tpm_pt);
-+
- qemu_close(tpm_pt->tpm_fd);
- tpm_pt->tpm_fd = -1;
-
-@@ -491,6 +700,8 @@ static void tpm_passthrough_destroy(TPMBackend *tb)
-
- tpm_backend_thread_end(&tpm_pt->tbt);
-
-+ tpm_passthrough_shutdown(tpm_pt);
-+
- qemu_close(tpm_pt->tpm_fd);
- qemu_close(tpm_pt->cancel_fd);
-
-@@ -564,3 +775,44 @@ static void tpm_passthrough_register(void)
- }
-
- type_init(tpm_passthrough_register)
-+
-+/* CUSE TPM */
-+static const char *tpm_passthrough_cuse_create_desc(void)
-+{
-+ return "CUSE TPM backend driver";
-+}
-+
-+static const TPMDriverOps tpm_cuse_driver = {
-+ .type = TPM_TYPE_CUSE_TPM,
-+ .opts = tpm_passthrough_cmdline_opts,
-+ .desc = tpm_passthrough_cuse_create_desc,
-+ .create = tpm_passthrough_create,
-+ .destroy = tpm_passthrough_destroy,
-+ .init = tpm_passthrough_init,
-+ .startup_tpm = tpm_passthrough_startup_tpm,
-+ .realloc_buffer = tpm_passthrough_realloc_buffer,
-+ .reset = tpm_passthrough_reset,
-+ .had_startup_error = tpm_passthrough_get_startup_error,
-+ .deliver_request = tpm_passthrough_deliver_request,
-+ .cancel_cmd = tpm_passthrough_cancel_cmd,
-+ .get_tpm_established_flag = tpm_passthrough_get_tpm_established_flag,
-+ .reset_tpm_established_flag = tpm_passthrough_reset_tpm_established_flag,
-+ .get_tpm_version = tpm_passthrough_get_tpm_version,
-+};
-+
-+static const TypeInfo tpm_cuse_info = {
-+ .name = TYPE_TPM_CUSE,
-+ .parent = TYPE_TPM_BACKEND,
-+ .instance_size = sizeof(TPMPassthruState),
-+ .class_init = tpm_passthrough_class_init,
-+ .instance_init = tpm_passthrough_inst_init,
-+ .instance_finalize = tpm_passthrough_inst_finalize,
-+};
-+
-+static void tpm_cuse_register(void)
-+{
-+ type_register_static(&tpm_cuse_info);
-+ tpm_register_driver(&tpm_cuse_driver);
-+}
-+
-+type_init(tpm_cuse_register)
-diff --git a/qapi-schema.json b/qapi-schema.json
-index 5658723b37..53120d0f63 100644
---- a/qapi-schema.json
-+++ b/qapi-schema.json
-@@ -3522,10 +3522,12 @@
- # An enumeration of TPM types
- #
- # @passthrough: TPM passthrough type
-+# @cuse-tpm: CUSE TPM type
-+# Since: 2.6
- #
- # Since: 1.5
- ##
--{ 'enum': 'TpmType', 'data': [ 'passthrough' ] }
-+{ 'enum': 'TpmType', 'data': [ 'passthrough', 'cuse-tpm' ] }
-
- ##
- # @query-tpm-types:
-@@ -3554,6 +3556,17 @@
- '*cancel-path' : 'str'} }
-
- ##
-+# @TPMCuseOptions:
-+#
-+# Information about the CUSE TPM type
-+#
-+# @path: string describing the path used for accessing the TPM device
-+#
-+# Since: 2.6
-+##
-+{ 'struct': 'TPMCuseOptions', 'data': { 'path' : 'str'}}
-+
-+##
- # @TpmTypeOptions:
- #
- # A union referencing different TPM backend types' configuration options
-@@ -3563,7 +3576,8 @@
- # Since: 1.5
- ##
- { 'union': 'TpmTypeOptions',
-- 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
-+ 'data': { 'passthrough' : 'TPMPassthroughOptions',
-+ 'cuse-tpm' : 'TPMCuseOptions' } }
-
- ##
- # @TpmInfo:
-diff --git a/qemu-options.hx b/qemu-options.hx
-index a71aaf8ea8..e0f1d8e676 100644
---- a/qemu-options.hx
-+++ b/qemu-options.hx
-@@ -2763,7 +2763,10 @@ DEF("tpmdev", HAS_ARG, QEMU_OPTION_tpmdev, \
- "-tpmdev passthrough,id=id[,path=path][,cancel-path=path]\n"
- " use path to provide path to a character device; default is /dev/tpm0\n"
- " use cancel-path to provide path to TPM's cancel sysfs entry; if\n"
-- " not provided it will be searched for in /sys/class/misc/tpm?/device\n",
-+ " not provided it will be searched for in /sys/class/misc/tpm?/device\n"
-+ "-tpmdev cuse-tpm,id=id,path=path\n"
-+ " use path to provide path to a character device to talk to the\n"
-+ " TPM emulator providing a CUSE interface\n",
- QEMU_ARCH_ALL)
- STEXI
-
-@@ -2772,8 +2775,8 @@ The general form of a TPM device option is:
-
- @item -tpmdev @var{backend} ,id=@var{id} [,@var{options}]
- @findex -tpmdev
--Backend type must be:
--@option{passthrough}.
-+Backend type must be either one of the following:
-+@option{passthrough}, @option{cuse-tpm}.
-
- The specific backend type will determine the applicable options.
- The @code{-tpmdev} option creates the TPM backend and requires a
-@@ -2823,6 +2826,18 @@ To create a passthrough TPM use the following two options:
- Note that the @code{-tpmdev} id is @code{tpm0} and is referenced by
- @code{tpmdev=tpm0} in the device option.
-
-+@item -tpmdev cuse-tpm, id=@var{id}, path=@var{path}
-+
-+(Linux-host only) Enable access to a TPM emulator with a CUSE interface.
-+
-+@option{path} specifies the path to the CUSE TPM character device.
-+
-+To create a backend device accessing the CUSE TPM emulator using /dev/vtpm
-+use the following two options:
-+@example
-+-tpmdev cuse-tpm,id=tpm0,path=/dev/vtpm -device tpm-tis,tpmdev=tpm0
-+@end example
-+
- @end table
-
- ETEXI
-diff --git a/tpm.c b/tpm.c
-index 9a7c7114d3..5ec2373286 100644
---- a/tpm.c
-+++ b/tpm.c
-@@ -25,7 +25,7 @@ static QLIST_HEAD(, TPMBackend) tpm_backends =
-
-
- #define TPM_MAX_MODELS 1
--#define TPM_MAX_DRIVERS 1
-+#define TPM_MAX_DRIVERS 2
-
- static TPMDriverOps const *be_drivers[TPM_MAX_DRIVERS] = {
- NULL,
-@@ -272,6 +272,15 @@ static TPMInfo *qmp_query_tpm_inst(TPMBackend *drv)
- tpo->has_cancel_path = true;
- }
- break;
-+ case TPM_TYPE_CUSE_TPM:
-+ res->options->type = TPM_TYPE_OPTIONS_KIND_CUSE_TPM;
-+ tpo = g_new0(TPMPassthroughOptions, 1);
-+ res->options->u.passthrough.data = tpo;
-+ if (drv->path) {
-+ tpo->path = g_strdup(drv->path);
-+ tpo->has_path = true;
-+ }
-+ break;
- case TPM_TYPE__MAX:
- break;
- }
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
new file mode 100644
index 0000000..f90cae6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
@@ -0,0 +1,67 @@
+From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00 2001
+From: Victor Kamensky <kamensky@cisco.com>
+Date: Fri, 23 Mar 2018 18:26:45 +0000
+Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of
+ DISAS_EXIT
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In OE project 4.15 linux kernel boot hang was observed under
+single cpu aarch64 qemu. Kernel code was in a loop waiting for
+vtimer arrival, spinning in TC generated blocks, while interrupt
+was pending unprocessed. This happened because when qemu tried to
+handle vtimer interrupt target had interrupts disabled, as
+result flag indicating TCG exit, cpu->icount_decr.u16.high,
+was cleared but arm_cpu_exec_interrupt function did not call
+arm_cpu_do_interrupt to process interrupt. Later when target
+reenabled interrupts, it happened without exit into main loop, so
+following code that waited for result of interrupt execution
+run in infinite loop.
+
+To solve the problem instructions that operate on CPU sys state
+(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
+should be considered as DISAS_EXIT variant, and should be
+forced to exit back to main loop so qemu will have a chance
+processing pending CPU state updates, including pending
+interrupts.
+
+This change brings consistency with how DISAS_UPDATE is treated
+in aarch32 case.
+
+CC: Peter Maydell <peter.maydell@linaro.org>
+CC: Alex Bennée <alex.bennee@linaro.org>
+CC: qemu-stable@nongnu.org
+Suggested-by: Peter Maydell <peter.maydell@linaro.org>
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
+Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
+Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
+Upstream-Status: Backport
+---
+ target/arm/translate-a64.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
+index 31ff047..327513e 100644
+--- a/target/arm/translate-a64.c
++++ b/target/arm/translate-a64.c
+@@ -13378,12 +13378,12 @@ static void aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
+ case DISAS_UPDATE:
+ gen_a64_set_pc_im(dc->pc);
+ /* fall through */
+- case DISAS_JUMP:
+- tcg_gen_lookup_and_goto_ptr();
+- break;
+ case DISAS_EXIT:
+ tcg_gen_exit_tb(0);
+ break;
++ case DISAS_JUMP:
++ tcg_gen_lookup_and_goto_ptr();
++ break;
+ case DISAS_NORETURN:
+ case DISAS_SWI:
+ break;
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0002-Introduce-condition-to-notify-waiters-of-completed-c.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0002-Introduce-condition-to-notify-waiters-of-completed-c.patch
deleted file mode 100644
index c88c98e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0002-Introduce-condition-to-notify-waiters-of-completed-c.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From b5ffd3aa4e9bd4edb09cc84c46f78da72697a946 Mon Sep 17 00:00:00 2001
-From: Stefan Berger <stefanb@linux.vnet.ibm.com>
-Date: Sat, 31 Dec 2016 11:23:32 -0500
-Subject: [PATCH 2/4] Introduce condition to notify waiters of completed
- command
-
-Introduce a lock and a condition to notify anyone waiting for the completion
-of the execution of a TPM command by the backend (thread). The backend
-uses the condition to signal anyone waiting for command completion.
-We need to place the condition in two locations: one is invoked by the
-backend thread, the other by the bottom half thread.
-We will use the signalling to wait for command completion before VM
-suspend.
-
-Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
-
-Upstream-Status: Pending [https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg00252.html]
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
----
- hw/tpm/tpm_int.h | 3 +++
- hw/tpm/tpm_tis.c | 14 ++++++++++++++
- 2 files changed, 17 insertions(+)
-
-diff --git a/hw/tpm/tpm_int.h b/hw/tpm/tpm_int.h
-index 6b2c9c953a..70be1ad8d9 100644
---- a/hw/tpm/tpm_int.h
-+++ b/hw/tpm/tpm_int.h
-@@ -30,6 +30,9 @@ struct TPMState {
- char *backend;
- TPMBackend *be_driver;
- TPMVersion be_tpm_version;
-+
-+ QemuMutex state_lock;
-+ QemuCond cmd_complete;
- };
-
- #define TPM(obj) OBJECT_CHECK(TPMState, (obj), TYPE_TPM_TIS)
-diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
-index 381e7266ea..14d9e83ea2 100644
---- a/hw/tpm/tpm_tis.c
-+++ b/hw/tpm/tpm_tis.c
-@@ -368,6 +368,8 @@ static void tpm_tis_receive_bh(void *opaque)
- TPMTISEmuState *tis = &s->s.tis;
- uint8_t locty = s->locty_number;
-
-+ qemu_mutex_lock(&s->state_lock);
-+
- tpm_tis_sts_set(&tis->loc[locty],
- TPM_TIS_STS_VALID | TPM_TIS_STS_DATA_AVAILABLE);
- tis->loc[locty].state = TPM_TIS_STATE_COMPLETION;
-@@ -384,6 +386,10 @@ static void tpm_tis_receive_bh(void *opaque)
- tpm_tis_raise_irq(s, locty,
- TPM_TIS_INT_DATA_AVAILABLE | TPM_TIS_INT_STS_VALID);
- #endif
-+
-+ /* notify of completed command */
-+ qemu_cond_signal(&s->cmd_complete);
-+ qemu_mutex_unlock(&s->state_lock);
- }
-
- /*
-@@ -403,6 +409,11 @@ static void tpm_tis_receive_cb(TPMState *s, uint8_t locty,
- }
- }
-
-+ qemu_mutex_lock(&s->state_lock);
-+ /* notify of completed command */
-+ qemu_cond_signal(&s->cmd_complete);
-+ qemu_mutex_unlock(&s->state_lock);
-+
- qemu_bh_schedule(tis->bh);
- }
-
-@@ -1072,6 +1083,9 @@ static void tpm_tis_initfn(Object *obj)
- memory_region_init_io(&s->mmio, OBJECT(s), &tpm_tis_memory_ops,
- s, "tpm-tis-mmio",
- TPM_TIS_NUM_LOCALITIES << TPM_TIS_LOCALITY_SHIFT);
-+
-+ qemu_mutex_init(&s->state_lock);
-+ qemu_cond_init(&s->cmd_complete);
- }
-
- static void tpm_tis_class_init(ObjectClass *klass, void *data)
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0003-Introduce-condition-in-TPM-backend-for-notification.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0003-Introduce-condition-in-TPM-backend-for-notification.patch
deleted file mode 100644
index e58f019..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0003-Introduce-condition-in-TPM-backend-for-notification.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 732a8e046948fd62b32cd1dd76a6798eb1caf4d6 Mon Sep 17 00:00:00 2001
-From: Stefan Berger <stefanb@linux.vnet.ibm.com>
-Date: Sat, 31 Dec 2016 11:23:32 -0500
-Subject: [PATCH 3/4] Introduce condition in TPM backend for notification
-
-TPM backends will suspend independently of the frontends. Also
-here we need to be able to wait for the TPM command to have been
-completely processed.
-
-Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
-
-Upstream-Status: Pending [https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg00252.html]
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
----
- hw/tpm/tpm_passthrough.c | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
-diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
-index 050f2ba850..44739ebad2 100644
---- a/hw/tpm/tpm_passthrough.c
-+++ b/hw/tpm/tpm_passthrough.c
-@@ -75,6 +75,10 @@ struct TPMPassthruState {
- TPMVersion tpm_version;
- ptm_cap cuse_cap; /* capabilities of the CUSE TPM */
- uint8_t cur_locty_number; /* last set locality */
-+
-+ QemuMutex state_lock;
-+ QemuCond cmd_complete; /* singnaled once tpm_busy is false */
-+ bool tpm_busy;
- };
-
- typedef struct TPMPassthruState TPMPassthruState;
-@@ -274,6 +278,11 @@ static void tpm_passthrough_worker_thread(gpointer data,
- thr_parms->recv_data_callback(thr_parms->tpm_state,
- thr_parms->tpm_state->locty_number,
- selftest_done);
-+ /* result delivered */
-+ qemu_mutex_lock(&tpm_pt->state_lock);
-+ tpm_pt->tpm_busy = false;
-+ qemu_cond_signal(&tpm_pt->cmd_complete);
-+ qemu_mutex_unlock(&tpm_pt->state_lock);
- break;
- case TPM_BACKEND_CMD_INIT:
- case TPM_BACKEND_CMD_END:
-@@ -401,6 +410,7 @@ static void tpm_passthrough_reset(TPMBackend *tb)
- tpm_backend_thread_end(&tpm_pt->tbt);
-
- tpm_pt->had_startup_error = false;
-+ tpm_pt->tpm_busy = false;
- }
-
- static int tpm_passthrough_init(TPMBackend *tb, TPMState *s,
-@@ -478,6 +488,11 @@ static void tpm_passthrough_deliver_request(TPMBackend *tb)
- {
- TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-
-+ /* TPM considered busy once TPM Request scheduled for processing */
-+ qemu_mutex_lock(&tpm_pt->state_lock);
-+ tpm_pt->tpm_busy = true;
-+ qemu_mutex_unlock(&tpm_pt->state_lock);
-+
- tpm_backend_thread_deliver_request(&tpm_pt->tbt);
- }
-
-@@ -746,6 +761,11 @@ static const TPMDriverOps tpm_passthrough_driver = {
-
- static void tpm_passthrough_inst_init(Object *obj)
- {
-+ TPMBackend *tb = TPM_BACKEND(obj);
-+ TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-+
-+ qemu_mutex_init(&tpm_pt->state_lock);
-+ qemu_cond_init(&tpm_pt->cmd_complete);
- }
-
- static void tpm_passthrough_inst_finalize(Object *obj)
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch
deleted file mode 100644
index f1dbaff..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch
+++ /dev/null
@@ -1,719 +0,0 @@
-From 5e9dd9063f514447ea4f54046793f4f01c297ed4 Mon Sep 17 00:00:00 2001
-From: Stefan Berger <stefanb@linux.vnet.ibm.com>
-Date: Sat, 31 Dec 2016 11:23:32 -0500
-Subject: [PATCH 4/4] Add support for VM suspend/resume for TPM TIS
-
-Extend the TPM TIS code to support suspend/resume. In case a command
-is being processed by the external TPM when suspending, wait for the command
-to complete to catch the result. In case the bottom half did not run,
-run the one function the bottom half is supposed to run. This then
-makes the resume operation work.
-
-The passthrough backend does not support suspend/resume operation
-and is therefore blocked from suspend/resume and migration.
-
-The CUSE TPM's supported capabilities are tested and if sufficient
-capabilities are implemented, suspend/resume, snapshotting and
-migration are supported by the CUSE TPM.
-
-Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
-
-Upstream-Status: Pending [https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg00252.html]
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
----
- hw/tpm/tpm_passthrough.c | 130 +++++++++++++++++++++++--
- hw/tpm/tpm_tis.c | 137 +++++++++++++++++++++++++-
- hw/tpm/tpm_tis.h | 2 +
- hw/tpm/tpm_util.c | 223 +++++++++++++++++++++++++++++++++++++++++++
- hw/tpm/tpm_util.h | 7 ++
- include/sysemu/tpm_backend.h | 12 +++
- 6 files changed, 503 insertions(+), 8 deletions(-)
-
-diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
-index 44739ebad2..bc8072d0bc 100644
---- a/hw/tpm/tpm_passthrough.c
-+++ b/hw/tpm/tpm_passthrough.c
-@@ -34,6 +34,8 @@
- #include "tpm_tis.h"
- #include "tpm_util.h"
- #include "tpm_ioctl.h"
-+#include "migration/migration.h"
-+#include "qapi/error.h"
-
- #define DEBUG_TPM 0
-
-@@ -49,6 +51,7 @@
- #define TYPE_TPM_CUSE "tpm-cuse"
-
- static const TPMDriverOps tpm_passthrough_driver;
-+static const VMStateDescription vmstate_tpm_cuse;
-
- /* data structures */
- typedef struct TPMPassthruThreadParams {
-@@ -79,6 +82,10 @@ struct TPMPassthruState {
- QemuMutex state_lock;
- QemuCond cmd_complete; /* singnaled once tpm_busy is false */
- bool tpm_busy;
-+
-+ Error *migration_blocker;
-+
-+ TPMBlobBuffers tpm_blobs;
- };
-
- typedef struct TPMPassthruState TPMPassthruState;
-@@ -306,6 +313,10 @@ static void tpm_passthrough_shutdown(TPMPassthruState *tpm_pt)
- strerror(errno));
- }
- }
-+ if (tpm_pt->migration_blocker) {
-+ migrate_del_blocker(tpm_pt->migration_blocker);
-+ error_free(tpm_pt->migration_blocker);
-+ }
- }
-
- /*
-@@ -360,12 +371,14 @@ static int tpm_passthrough_cuse_check_caps(TPMPassthruState *tpm_pt)
- /*
- * Initialize the external CUSE TPM
- */
--static int tpm_passthrough_cuse_init(TPMPassthruState *tpm_pt)
-+static int tpm_passthrough_cuse_init(TPMPassthruState *tpm_pt,
-+ bool is_resume)
- {
- int rc = 0;
-- ptm_init init = {
-- .u.req.init_flags = PTM_INIT_FLAG_DELETE_VOLATILE,
-- };
-+ ptm_init init;
-+ if (is_resume) {
-+ init.u.req.init_flags = PTM_INIT_FLAG_DELETE_VOLATILE;
-+ }
-
- if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
- if (ioctl(tpm_pt->tpm_fd, PTM_INIT, &init) < 0) {
-@@ -394,7 +407,7 @@ static int tpm_passthrough_startup_tpm(TPMBackend *tb)
- tpm_passthrough_worker_thread,
- &tpm_pt->tpm_thread_params);
-
-- tpm_passthrough_cuse_init(tpm_pt);
-+ tpm_passthrough_cuse_init(tpm_pt, false);
-
- return 0;
- }
-@@ -466,6 +479,32 @@ static int tpm_passthrough_reset_tpm_established_flag(TPMBackend *tb,
- return rc;
- }
-
-+static int tpm_cuse_get_state_blobs(TPMBackend *tb,
-+ bool decrypted_blobs,
-+ TPMBlobBuffers *tpm_blobs)
-+{
-+ TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-+
-+ assert(TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt));
-+
-+ return tpm_util_cuse_get_state_blobs(tpm_pt->tpm_fd, decrypted_blobs,
-+ tpm_blobs);
-+}
-+
-+static int tpm_cuse_set_state_blobs(TPMBackend *tb,
-+ TPMBlobBuffers *tpm_blobs)
-+{
-+ TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-+
-+ assert(TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt));
-+
-+ if (tpm_util_cuse_set_state_blobs(tpm_pt->tpm_fd, tpm_blobs)) {
-+ return 1;
-+ }
-+
-+ return tpm_passthrough_cuse_init(tpm_pt, true);
-+}
-+
- static bool tpm_passthrough_get_startup_error(TPMBackend *tb)
- {
- TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-@@ -488,7 +527,7 @@ static void tpm_passthrough_deliver_request(TPMBackend *tb)
- {
- TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-
-- /* TPM considered busy once TPM Request scheduled for processing */
-+ /* TPM considered busy once TPM request scheduled for processing */
- qemu_mutex_lock(&tpm_pt->state_lock);
- tpm_pt->tpm_busy = true;
- qemu_mutex_unlock(&tpm_pt->state_lock);
-@@ -601,6 +640,25 @@ static int tpm_passthrough_open_sysfs_cancel(TPMBackend *tb)
- return fd;
- }
-
-+static void tpm_passthrough_block_migration(TPMPassthruState *tpm_pt)
-+{
-+ ptm_cap caps;
-+
-+ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+ caps = PTM_CAP_GET_STATEBLOB | PTM_CAP_SET_STATEBLOB |
-+ PTM_CAP_STOP;
-+ if (!TPM_CUSE_IMPLEMENTS_ALL(tpm_pt, caps)) {
-+ error_setg(&tpm_pt->migration_blocker,
-+ "Migration disabled: CUSE TPM lacks necessary capabilities");
-+ migrate_add_blocker(tpm_pt->migration_blocker);
-+ }
-+ } else {
-+ error_setg(&tpm_pt->migration_blocker,
-+ "Migration disabled: Passthrough TPM does not support migration");
-+ migrate_add_blocker(tpm_pt->migration_blocker);
-+ }
-+}
-+
- static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb)
- {
- TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-@@ -642,7 +700,7 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb)
- goto err_close_tpmdev;
- }
- /* init TPM for probing */
-- if (tpm_passthrough_cuse_init(tpm_pt)) {
-+ if (tpm_passthrough_cuse_init(tpm_pt, false)) {
- goto err_close_tpmdev;
- }
- }
-@@ -659,6 +717,7 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb)
- }
- }
-
-+ tpm_passthrough_block_migration(tpm_pt);
-
- return 0;
-
-@@ -766,10 +825,13 @@ static void tpm_passthrough_inst_init(Object *obj)
-
- qemu_mutex_init(&tpm_pt->state_lock);
- qemu_cond_init(&tpm_pt->cmd_complete);
-+
-+ vmstate_register(NULL, -1, &vmstate_tpm_cuse, obj);
- }
-
- static void tpm_passthrough_inst_finalize(Object *obj)
- {
-+ vmstate_unregister(NULL, &vmstate_tpm_cuse, obj);
- }
-
- static void tpm_passthrough_class_init(ObjectClass *klass, void *data)
-@@ -802,6 +864,60 @@ static const char *tpm_passthrough_cuse_create_desc(void)
- return "CUSE TPM backend driver";
- }
-
-+static void tpm_cuse_pre_save(void *opaque)
-+{
-+ TPMPassthruState *tpm_pt = opaque;
-+ TPMBackend *tb = &tpm_pt->parent;
-+
-+ qemu_mutex_lock(&tpm_pt->state_lock);
-+ /* wait for TPM to finish processing */
-+ if (tpm_pt->tpm_busy) {
-+ qemu_cond_wait(&tpm_pt->cmd_complete, &tpm_pt->state_lock);
-+ }
-+ qemu_mutex_unlock(&tpm_pt->state_lock);
-+
-+ /* get the decrypted state blobs from the TPM */
-+ tpm_cuse_get_state_blobs(tb, TRUE, &tpm_pt->tpm_blobs);
-+}
-+
-+static int tpm_cuse_post_load(void *opaque,
-+ int version_id __attribute__((unused)))
-+{
-+ TPMPassthruState *tpm_pt = opaque;
-+ TPMBackend *tb = &tpm_pt->parent;
-+
-+ return tpm_cuse_set_state_blobs(tb, &tpm_pt->tpm_blobs);
-+}
-+
-+static const VMStateDescription vmstate_tpm_cuse = {
-+ .name = "cuse-tpm",
-+ .version_id = 1,
-+ .minimum_version_id = 0,
-+ .minimum_version_id_old = 0,
-+ .pre_save = tpm_cuse_pre_save,
-+ .post_load = tpm_cuse_post_load,
-+ .fields = (VMStateField[]) {
-+ VMSTATE_UINT32(tpm_blobs.permanent_flags, TPMPassthruState),
-+ VMSTATE_UINT32(tpm_blobs.permanent.size, TPMPassthruState),
-+ VMSTATE_VBUFFER_ALLOC_UINT32(tpm_blobs.permanent.buffer,
-+ TPMPassthruState, 1, NULL,
-+ tpm_blobs.permanent.size),
-+
-+ VMSTATE_UINT32(tpm_blobs.volatil_flags, TPMPassthruState),
-+ VMSTATE_UINT32(tpm_blobs.volatil.size, TPMPassthruState),
-+ VMSTATE_VBUFFER_ALLOC_UINT32(tpm_blobs.volatil.buffer,
-+ TPMPassthruState, 1, NULL,
-+ tpm_blobs.volatil.size),
-+
-+ VMSTATE_UINT32(tpm_blobs.savestate_flags, TPMPassthruState),
-+ VMSTATE_UINT32(tpm_blobs.savestate.size, TPMPassthruState),
-+ VMSTATE_VBUFFER_ALLOC_UINT32(tpm_blobs.savestate.buffer,
-+ TPMPassthruState, 1, NULL,
-+ tpm_blobs.savestate.size),
-+ VMSTATE_END_OF_LIST()
-+ }
-+};
-+
- static const TPMDriverOps tpm_cuse_driver = {
- .type = TPM_TYPE_CUSE_TPM,
- .opts = tpm_passthrough_cmdline_opts,
-diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
-index 14d9e83ea2..9b660cf737 100644
---- a/hw/tpm/tpm_tis.c
-+++ b/hw/tpm/tpm_tis.c
-@@ -368,6 +368,8 @@ static void tpm_tis_receive_bh(void *opaque)
- TPMTISEmuState *tis = &s->s.tis;
- uint8_t locty = s->locty_number;
-
-+ tis->bh_scheduled = false;
-+
- qemu_mutex_lock(&s->state_lock);
-
- tpm_tis_sts_set(&tis->loc[locty],
-@@ -415,6 +417,8 @@ static void tpm_tis_receive_cb(TPMState *s, uint8_t locty,
- qemu_mutex_unlock(&s->state_lock);
-
- qemu_bh_schedule(tis->bh);
-+
-+ tis->bh_scheduled = true;
- }
-
- /*
-@@ -1030,9 +1034,140 @@ static void tpm_tis_reset(DeviceState *dev)
- tpm_tis_do_startup_tpm(s);
- }
-
-+
-+/* persistent state handling */
-+
-+static void tpm_tis_pre_save(void *opaque)
-+{
-+ TPMState *s = opaque;
-+ TPMTISEmuState *tis = &s->s.tis;
-+ uint8_t locty = tis->active_locty;
-+
-+ DPRINTF("tpm_tis: suspend: locty = %d : r_offset = %d, w_offset = %d\n",
-+ locty, tis->loc[0].r_offset, tis->loc[0].w_offset);
-+#ifdef DEBUG_TIS
-+ tpm_tis_dump_state(opaque, 0);
-+#endif
-+
-+ qemu_mutex_lock(&s->state_lock);
-+
-+ /* wait for outstanding request to complete */
-+ if (TPM_TIS_IS_VALID_LOCTY(locty) &&
-+ tis->loc[locty].state == TPM_TIS_STATE_EXECUTION) {
-+ /*
-+ * If we get here when the bh is scheduled but did not run,
-+ * we won't get notified...
-+ */
-+ if (!tis->bh_scheduled) {
-+ /* backend thread to notify us */
-+ qemu_cond_wait(&s->cmd_complete, &s->state_lock);
-+ }
-+ if (tis->loc[locty].state == TPM_TIS_STATE_EXECUTION) {
-+ /* bottom half did not run - run its function */
-+ qemu_mutex_unlock(&s->state_lock);
-+ tpm_tis_receive_bh(opaque);
-+ qemu_mutex_lock(&s->state_lock);
-+ }
-+ }
-+
-+ qemu_mutex_unlock(&s->state_lock);
-+
-+ /* copy current active read or write buffer into the buffer
-+ written to disk */
-+ if (TPM_TIS_IS_VALID_LOCTY(locty)) {
-+ switch (tis->loc[locty].state) {
-+ case TPM_TIS_STATE_RECEPTION:
-+ memcpy(tis->buf,
-+ tis->loc[locty].w_buffer.buffer,
-+ MIN(sizeof(tis->buf),
-+ tis->loc[locty].w_buffer.size));
-+ tis->offset = tis->loc[locty].w_offset;
-+ break;
-+ case TPM_TIS_STATE_COMPLETION:
-+ memcpy(tis->buf,
-+ tis->loc[locty].r_buffer.buffer,
-+ MIN(sizeof(tis->buf),
-+ tis->loc[locty].r_buffer.size));
-+ tis->offset = tis->loc[locty].r_offset;
-+ break;
-+ default:
-+ /* leak nothing */
-+ memset(tis->buf, 0x0, sizeof(tis->buf));
-+ break;
-+ }
-+ }
-+}
-+
-+static int tpm_tis_post_load(void *opaque,
-+ int version_id __attribute__((unused)))
-+{
-+ TPMState *s = opaque;
-+ TPMTISEmuState *tis = &s->s.tis;
-+
-+ uint8_t locty = tis->active_locty;
-+
-+ if (TPM_TIS_IS_VALID_LOCTY(locty)) {
-+ switch (tis->loc[locty].state) {
-+ case TPM_TIS_STATE_RECEPTION:
-+ memcpy(tis->loc[locty].w_buffer.buffer,
-+ tis->buf,
-+ MIN(sizeof(tis->buf),
-+ tis->loc[locty].w_buffer.size));
-+ tis->loc[locty].w_offset = tis->offset;
-+ break;
-+ case TPM_TIS_STATE_COMPLETION:
-+ memcpy(tis->loc[locty].r_buffer.buffer,
-+ tis->buf,
-+ MIN(sizeof(tis->buf),
-+ tis->loc[locty].r_buffer.size));
-+ tis->loc[locty].r_offset = tis->offset;
-+ break;
-+ default:
-+ break;
-+ }
-+ }
-+
-+ DPRINTF("tpm_tis: resume : locty = %d : r_offset = %d, w_offset = %d\n",
-+ locty, tis->loc[0].r_offset, tis->loc[0].w_offset);
-+
-+ return 0;
-+}
-+
-+static const VMStateDescription vmstate_locty = {
-+ .name = "loc",
-+ .version_id = 1,
-+ .minimum_version_id = 0,
-+ .minimum_version_id_old = 0,
-+ .fields = (VMStateField[]) {
-+ VMSTATE_UINT32(state, TPMLocality),
-+ VMSTATE_UINT32(inte, TPMLocality),
-+ VMSTATE_UINT32(ints, TPMLocality),
-+ VMSTATE_UINT8(access, TPMLocality),
-+ VMSTATE_UINT32(sts, TPMLocality),
-+ VMSTATE_UINT32(iface_id, TPMLocality),
-+ VMSTATE_END_OF_LIST(),
-+ }
-+};
-+
- static const VMStateDescription vmstate_tpm_tis = {
- .name = "tpm",
-- .unmigratable = 1,
-+ .version_id = 1,
-+ .minimum_version_id = 0,
-+ .minimum_version_id_old = 0,
-+ .pre_save = tpm_tis_pre_save,
-+ .post_load = tpm_tis_post_load,
-+ .fields = (VMStateField[]) {
-+ VMSTATE_UINT32(s.tis.offset, TPMState),
-+ VMSTATE_BUFFER(s.tis.buf, TPMState),
-+ VMSTATE_UINT8(s.tis.active_locty, TPMState),
-+ VMSTATE_UINT8(s.tis.aborting_locty, TPMState),
-+ VMSTATE_UINT8(s.tis.next_locty, TPMState),
-+
-+ VMSTATE_STRUCT_ARRAY(s.tis.loc, TPMState, TPM_TIS_NUM_LOCALITIES, 1,
-+ vmstate_locty, TPMLocality),
-+
-+ VMSTATE_END_OF_LIST()
-+ }
- };
-
- static Property tpm_tis_properties[] = {
-diff --git a/hw/tpm/tpm_tis.h b/hw/tpm/tpm_tis.h
-index a1df41fa21..b7fc0ea1a9 100644
---- a/hw/tpm/tpm_tis.h
-+++ b/hw/tpm/tpm_tis.h
-@@ -54,6 +54,8 @@ typedef struct TPMLocality {
-
- typedef struct TPMTISEmuState {
- QEMUBH *bh;
-+ bool bh_scheduled; /* bh scheduled but did not run yet */
-+
- uint32_t offset;
- uint8_t buf[TPM_TIS_BUFFER_MAX];
-
-diff --git a/hw/tpm/tpm_util.c b/hw/tpm/tpm_util.c
-index 7b35429725..b6ff74d946 100644
---- a/hw/tpm/tpm_util.c
-+++ b/hw/tpm/tpm_util.c
-@@ -22,6 +22,17 @@
- #include "qemu/osdep.h"
- #include "tpm_util.h"
- #include "tpm_int.h"
-+#include "tpm_ioctl.h"
-+#include "qemu/error-report.h"
-+
-+#define DEBUG_TPM 0
-+
-+#define DPRINTF(fmt, ...) do { \
-+ if (DEBUG_TPM) { \
-+ fprintf(stderr, fmt, ## __VA_ARGS__); \
-+ } \
-+} while (0)
-+
-
- /*
- * A basic test of a TPM device. We expect a well formatted response header
-@@ -125,3 +136,215 @@ int tpm_util_test_tpmdev(int tpm_fd, TPMVersion *tpm_version)
-
- return 1;
- }
-+
-+static void tpm_sized_buffer_reset(TPMSizedBuffer *tsb)
-+{
-+ g_free(tsb->buffer);
-+ tsb->buffer = NULL;
-+ tsb->size = 0;
-+}
-+
-+/*
-+ * Transfer a TPM state blob from the TPM into a provided buffer.
-+ *
-+ * @fd: file descriptor to talk to the CUSE TPM
-+ * @type: the type of blob to transfer
-+ * @decrypted_blob: whether we request to receive decrypted blobs
-+ * @tsb: the TPMSizeBuffer to fill with the blob
-+ * @flags: the flags to return to the caller
-+ */
-+static int tpm_util_cuse_get_state_blob(int fd,
-+ uint8_t type,
-+ bool decrypted_blob,
-+ TPMSizedBuffer *tsb,
-+ uint32_t *flags)
-+{
-+ ptm_getstate pgs;
-+ uint16_t offset = 0;
-+ ptm_res res;
-+ ssize_t n;
-+ size_t to_read;
-+
-+ tpm_sized_buffer_reset(tsb);
-+
-+ pgs.u.req.state_flags = (decrypted_blob) ? PTM_STATE_FLAG_DECRYPTED : 0;
-+ pgs.u.req.type = type;
-+ pgs.u.req.offset = offset;
-+
-+ if (ioctl(fd, PTM_GET_STATEBLOB, &pgs) < 0) {
-+ error_report("CUSE TPM PTM_GET_STATEBLOB ioctl failed: %s",
-+ strerror(errno));
-+ goto err_exit;
-+ }
-+ res = pgs.u.resp.tpm_result;
-+ if (res != 0 && (res & 0x800) == 0) {
-+ error_report("Getting the stateblob (type %d) failed with a TPM "
-+ "error 0x%x", type, res);
-+ goto err_exit;
-+ }
-+
-+ *flags = pgs.u.resp.state_flags;
-+
-+ tsb->buffer = g_malloc(pgs.u.resp.totlength);
-+ memcpy(tsb->buffer, pgs.u.resp.data, pgs.u.resp.length);
-+ tsb->size = pgs.u.resp.length;
-+
-+ /* if there are bytes left to get use read() interface */
-+ while (tsb->size < pgs.u.resp.totlength) {
-+ to_read = pgs.u.resp.totlength - tsb->size;
-+ if (unlikely(to_read > SSIZE_MAX)) {
-+ to_read = SSIZE_MAX;
-+ }
-+
-+ n = read(fd, &tsb->buffer[tsb->size], to_read);
-+ if (n != to_read) {
-+ error_report("Could not read stateblob (type %d) : %s",
-+ type, strerror(errno));
-+ goto err_exit;
-+ }
-+ tsb->size += to_read;
-+ }
-+
-+ DPRINTF("tpm_util: got state blob type %d, %d bytes, flags 0x%08x, "
-+ "decrypted=%d\n", type, tsb->size, *flags, decrypted_blob);
-+
-+ return 0;
-+
-+err_exit:
-+ return 1;
-+}
-+
-+int tpm_util_cuse_get_state_blobs(int tpm_fd,
-+ bool decrypted_blobs,
-+ TPMBlobBuffers *tpm_blobs)
-+{
-+ if (tpm_util_cuse_get_state_blob(tpm_fd, PTM_BLOB_TYPE_PERMANENT,
-+ decrypted_blobs,
-+ &tpm_blobs->permanent,
-+ &tpm_blobs->permanent_flags) ||
-+ tpm_util_cuse_get_state_blob(tpm_fd, PTM_BLOB_TYPE_VOLATILE,
-+ decrypted_blobs,
-+ &tpm_blobs->volatil,
-+ &tpm_blobs->volatil_flags) ||
-+ tpm_util_cuse_get_state_blob(tpm_fd, PTM_BLOB_TYPE_SAVESTATE,
-+ decrypted_blobs,
-+ &tpm_blobs->savestate,
-+ &tpm_blobs->savestate_flags)) {
-+ goto err_exit;
-+ }
-+
-+ return 0;
-+
-+ err_exit:
-+ tpm_sized_buffer_reset(&tpm_blobs->volatil);
-+ tpm_sized_buffer_reset(&tpm_blobs->permanent);
-+ tpm_sized_buffer_reset(&tpm_blobs->savestate);
-+
-+ return 1;
-+}
-+
-+static int tpm_util_cuse_do_set_stateblob_ioctl(int fd,
-+ uint32_t flags,
-+ uint32_t type,
-+ uint32_t length)
-+{
-+ ptm_setstate pss;
-+
-+ pss.u.req.state_flags = flags;
-+ pss.u.req.type = type;
-+ pss.u.req.length = length;
-+
-+ if (ioctl(fd, PTM_SET_STATEBLOB, &pss) < 0) {
-+ error_report("CUSE TPM PTM_SET_STATEBLOB ioctl failed: %s",
-+ strerror(errno));
-+ return 1;
-+ }
-+
-+ if (pss.u.resp.tpm_result != 0) {
-+ error_report("Setting the stateblob (type %d) failed with a TPM "
-+ "error 0x%x", type, pss.u.resp.tpm_result);
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-+
-+
-+/*
-+ * Transfer a TPM state blob to the CUSE TPM.
-+ *
-+ * @fd: file descriptor to talk to the CUSE TPM
-+ * @type: the type of TPM state blob to transfer
-+ * @tsb: TPMSizeBuffer containing the TPM state blob
-+ * @flags: Flags describing the (encryption) state of the TPM state blob
-+ */
-+static int tpm_util_cuse_set_state_blob(int fd,
-+ uint32_t type,
-+ TPMSizedBuffer *tsb,
-+ uint32_t flags)
-+{
-+ uint32_t offset = 0;
-+ ssize_t n;
-+ size_t to_write;
-+
-+ /* initiate the transfer to the CUSE TPM */
-+ if (tpm_util_cuse_do_set_stateblob_ioctl(fd, flags, type, 0)) {
-+ return 1;
-+ }
-+
-+ /* use the write() interface for transferring the state blob */
-+ while (offset < tsb->size) {
-+ to_write = tsb->size - offset;
-+ if (unlikely(to_write > SSIZE_MAX)) {
-+ to_write = SSIZE_MAX;
-+ }
-+
-+ n = write(fd, &tsb->buffer[offset], to_write);
-+ if (n != to_write) {
-+ error_report("Writing the stateblob (type %d) failed: %s",
-+ type, strerror(errno));
-+ goto err_exit;
-+ }
-+ offset += to_write;
-+ }
-+
-+ /* inidicate that the transfer is finished */
-+ if (tpm_util_cuse_do_set_stateblob_ioctl(fd, flags, type, 0)) {
-+ goto err_exit;
-+ }
-+
-+ DPRINTF("tpm_util: set the state blob type %d, %d bytes, flags 0x%08x\n",
-+ type, tsb->size, flags);
-+
-+ return 0;
-+
-+err_exit:
-+ return 1;
-+}
-+
-+int tpm_util_cuse_set_state_blobs(int tpm_fd,
-+ TPMBlobBuffers *tpm_blobs)
-+{
-+ ptm_res res;
-+
-+ if (ioctl(tpm_fd, PTM_STOP, &res) < 0) {
-+ error_report("tpm_passthrough: Could not stop "
-+ "the CUSE TPM: %s (%i)",
-+ strerror(errno), errno);
-+ return 1;
-+ }
-+
-+ if (tpm_util_cuse_set_state_blob(tpm_fd, PTM_BLOB_TYPE_PERMANENT,
-+ &tpm_blobs->permanent,
-+ tpm_blobs->permanent_flags) ||
-+ tpm_util_cuse_set_state_blob(tpm_fd, PTM_BLOB_TYPE_VOLATILE,
-+ &tpm_blobs->volatil,
-+ tpm_blobs->volatil_flags) ||
-+ tpm_util_cuse_set_state_blob(tpm_fd, PTM_BLOB_TYPE_SAVESTATE,
-+ &tpm_blobs->savestate,
-+ tpm_blobs->savestate_flags)) {
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-diff --git a/hw/tpm/tpm_util.h b/hw/tpm/tpm_util.h
-index df76245e6e..c24071d812 100644
---- a/hw/tpm/tpm_util.h
-+++ b/hw/tpm/tpm_util.h
-@@ -26,4 +26,11 @@
-
- int tpm_util_test_tpmdev(int tpm_fd, TPMVersion *tpm_version);
-
-+int tpm_util_cuse_get_state_blobs(int tpm_fd,
-+ bool decrypted_blobs,
-+ TPMBlobBuffers *tpm_blobs);
-+
-+int tpm_util_cuse_set_state_blobs(int tpm_fd,
-+ TPMBlobBuffers *tpm_blobs);
-+
- #endif /* TPM_TPM_UTIL_H */
-diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h
-index b58f52d39f..3403821b9d 100644
---- a/include/sysemu/tpm_backend.h
-+++ b/include/sysemu/tpm_backend.h
-@@ -62,6 +62,18 @@ typedef struct TPMSizedBuffer {
- uint8_t *buffer;
- } TPMSizedBuffer;
-
-+/* blobs from the TPM; part of VM state when migrating */
-+typedef struct TPMBlobBuffers {
-+ uint32_t permanent_flags;
-+ TPMSizedBuffer permanent;
-+
-+ uint32_t volatil_flags;
-+ TPMSizedBuffer volatil;
-+
-+ uint32_t savestate_flags;
-+ TPMSizedBuffer savestate;
-+} TPMBlobBuffers;
-+
- struct TPMDriverOps {
- enum TpmType type;
- const QemuOptDesc *opts;
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13672.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13672.patch
deleted file mode 100644
index ce0b1ee..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13672.patch
+++ /dev/null
@@ -1,504 +0,0 @@
-From 3d90c6254863693a6b13d918d2b8682e08bbc681 Mon Sep 17 00:00:00 2001
-From: Gerd Hoffmann <kraxel@redhat.com>
-Date: Mon, 28 Aug 2017 14:29:06 +0200
-Subject: [PATCH] vga: stop passing pointers to vga_draw_line* functions
-
-Instead pass around the address (aka offset into vga memory).
-Add vga_read_* helper functions which apply vbe_size_mask to
-the address, to make sure the address stays within the valid
-range, similar to the cirrus blitter fixes (commits ffaf857778
-and 026aeffcb4).
-
-Impact: DoS for privileged guest users. qemu crashes with
-a segfault, when hitting the guard page after vga memory
-allocation, while reading vga memory for display updates.
-
-Fixes: CVE-2017-13672
-Cc: P J P <ppandit@redhat.com>
-Reported-by: David Buchanan <d@vidbuchanan.co.uk>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-Message-id: 20170828122906.18993-1-kraxel@redhat.com
-
-Upstream-Status: Backport
-[https://git.qemu.org/?p=qemu.git;a=commit;h=3d90c6254863693a6b13d918d2b8682e08bbc681]
-
-CVE: CVE-2017-13672
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- hw/display/vga-helpers.h | 202 ++++++++++++++++++++++++++---------------------
- hw/display/vga.c | 5 +-
- hw/display/vga_int.h | 1 +
- 3 files changed, 114 insertions(+), 94 deletions(-)
-
-diff --git a/hw/display/vga-helpers.h b/hw/display/vga-helpers.h
-index 94f6de2..5a752b3 100644
---- a/hw/display/vga-helpers.h
-+++ b/hw/display/vga-helpers.h
-@@ -95,20 +95,46 @@ static void vga_draw_glyph9(uint8_t *d, int linesize,
- } while (--h);
- }
-
-+static inline uint8_t vga_read_byte(VGACommonState *vga, uint32_t addr)
-+{
-+ return vga->vram_ptr[addr & vga->vbe_size_mask];
-+}
-+
-+static inline uint16_t vga_read_word_le(VGACommonState *vga, uint32_t addr)
-+{
-+ uint32_t offset = addr & vga->vbe_size_mask & ~1;
-+ uint16_t *ptr = (uint16_t *)(vga->vram_ptr + offset);
-+ return lduw_le_p(ptr);
-+}
-+
-+static inline uint16_t vga_read_word_be(VGACommonState *vga, uint32_t addr)
-+{
-+ uint32_t offset = addr & vga->vbe_size_mask & ~1;
-+ uint16_t *ptr = (uint16_t *)(vga->vram_ptr + offset);
-+ return lduw_be_p(ptr);
-+}
-+
-+static inline uint32_t vga_read_dword_le(VGACommonState *vga, uint32_t addr)
-+{
-+ uint32_t offset = addr & vga->vbe_size_mask & ~3;
-+ uint32_t *ptr = (uint32_t *)(vga->vram_ptr + offset);
-+ return ldl_le_p(ptr);
-+}
-+
- /*
- * 4 color mode
- */
--static void vga_draw_line2(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line2(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- uint32_t plane_mask, *palette, data, v;
- int x;
-
-- palette = s1->last_palette;
-- plane_mask = mask16[s1->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
-+ palette = vga->last_palette;
-+ plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
- width >>= 3;
- for(x = 0; x < width; x++) {
-- data = ((uint32_t *)s)[0];
-+ data = vga_read_dword_le(vga, addr);
- data &= plane_mask;
- v = expand2[GET_PLANE(data, 0)];
- v |= expand2[GET_PLANE(data, 2)] << 2;
-@@ -124,7 +150,7 @@ static void vga_draw_line2(VGACommonState *s1, uint8_t *d,
- ((uint32_t *)d)[6] = palette[(v >> 4) & 0xf];
- ((uint32_t *)d)[7] = palette[(v >> 0) & 0xf];
- d += 32;
-- s += 4;
-+ addr += 4;
- }
- }
-
-@@ -134,17 +160,17 @@ static void vga_draw_line2(VGACommonState *s1, uint8_t *d,
- /*
- * 4 color mode, dup2 horizontal
- */
--static void vga_draw_line2d2(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line2d2(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- uint32_t plane_mask, *palette, data, v;
- int x;
-
-- palette = s1->last_palette;
-- plane_mask = mask16[s1->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
-+ palette = vga->last_palette;
-+ plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
- width >>= 3;
- for(x = 0; x < width; x++) {
-- data = ((uint32_t *)s)[0];
-+ data = vga_read_dword_le(vga, addr);
- data &= plane_mask;
- v = expand2[GET_PLANE(data, 0)];
- v |= expand2[GET_PLANE(data, 2)] << 2;
-@@ -160,24 +186,24 @@ static void vga_draw_line2d2(VGACommonState *s1, uint8_t *d,
- PUT_PIXEL2(d, 6, palette[(v >> 4) & 0xf]);
- PUT_PIXEL2(d, 7, palette[(v >> 0) & 0xf]);
- d += 64;
-- s += 4;
-+ addr += 4;
- }
- }
-
- /*
- * 16 color mode
- */
--static void vga_draw_line4(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line4(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- uint32_t plane_mask, data, v, *palette;
- int x;
-
-- palette = s1->last_palette;
-- plane_mask = mask16[s1->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
-+ palette = vga->last_palette;
-+ plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
- width >>= 3;
- for(x = 0; x < width; x++) {
-- data = ((uint32_t *)s)[0];
-+ data = vga_read_dword_le(vga, addr);
- data &= plane_mask;
- v = expand4[GET_PLANE(data, 0)];
- v |= expand4[GET_PLANE(data, 1)] << 1;
-@@ -192,24 +218,24 @@ static void vga_draw_line4(VGACommonState *s1, uint8_t *d,
- ((uint32_t *)d)[6] = palette[(v >> 4) & 0xf];
- ((uint32_t *)d)[7] = palette[(v >> 0) & 0xf];
- d += 32;
-- s += 4;
-+ addr += 4;
- }
- }
-
- /*
- * 16 color mode, dup2 horizontal
- */
--static void vga_draw_line4d2(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line4d2(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- uint32_t plane_mask, data, v, *palette;
- int x;
-
-- palette = s1->last_palette;
-- plane_mask = mask16[s1->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
-+ palette = vga->last_palette;
-+ plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
- width >>= 3;
- for(x = 0; x < width; x++) {
-- data = ((uint32_t *)s)[0];
-+ data = vga_read_dword_le(vga, addr);
- data &= plane_mask;
- v = expand4[GET_PLANE(data, 0)];
- v |= expand4[GET_PLANE(data, 1)] << 1;
-@@ -224,7 +250,7 @@ static void vga_draw_line4d2(VGACommonState *s1, uint8_t *d,
- PUT_PIXEL2(d, 6, palette[(v >> 4) & 0xf]);
- PUT_PIXEL2(d, 7, palette[(v >> 0) & 0xf]);
- d += 64;
-- s += 4;
-+ addr += 4;
- }
- }
-
-@@ -233,21 +259,21 @@ static void vga_draw_line4d2(VGACommonState *s1, uint8_t *d,
- *
- * XXX: add plane_mask support (never used in standard VGA modes)
- */
--static void vga_draw_line8d2(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line8d2(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- uint32_t *palette;
- int x;
-
-- palette = s1->last_palette;
-+ palette = vga->last_palette;
- width >>= 3;
- for(x = 0; x < width; x++) {
-- PUT_PIXEL2(d, 0, palette[s[0]]);
-- PUT_PIXEL2(d, 1, palette[s[1]]);
-- PUT_PIXEL2(d, 2, palette[s[2]]);
-- PUT_PIXEL2(d, 3, palette[s[3]]);
-+ PUT_PIXEL2(d, 0, palette[vga_read_byte(vga, addr + 0)]);
-+ PUT_PIXEL2(d, 1, palette[vga_read_byte(vga, addr + 1)]);
-+ PUT_PIXEL2(d, 2, palette[vga_read_byte(vga, addr + 2)]);
-+ PUT_PIXEL2(d, 3, palette[vga_read_byte(vga, addr + 3)]);
- d += 32;
-- s += 4;
-+ addr += 4;
- }
- }
-
-@@ -256,63 +282,63 @@ static void vga_draw_line8d2(VGACommonState *s1, uint8_t *d,
- *
- * XXX: add plane_mask support (never used in standard VGA modes)
- */
--static void vga_draw_line8(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line8(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- uint32_t *palette;
- int x;
-
-- palette = s1->last_palette;
-+ palette = vga->last_palette;
- width >>= 3;
- for(x = 0; x < width; x++) {
-- ((uint32_t *)d)[0] = palette[s[0]];
-- ((uint32_t *)d)[1] = palette[s[1]];
-- ((uint32_t *)d)[2] = palette[s[2]];
-- ((uint32_t *)d)[3] = palette[s[3]];
-- ((uint32_t *)d)[4] = palette[s[4]];
-- ((uint32_t *)d)[5] = palette[s[5]];
-- ((uint32_t *)d)[6] = palette[s[6]];
-- ((uint32_t *)d)[7] = palette[s[7]];
-+ ((uint32_t *)d)[0] = palette[vga_read_byte(vga, addr + 0)];
-+ ((uint32_t *)d)[1] = palette[vga_read_byte(vga, addr + 1)];
-+ ((uint32_t *)d)[2] = palette[vga_read_byte(vga, addr + 2)];
-+ ((uint32_t *)d)[3] = palette[vga_read_byte(vga, addr + 3)];
-+ ((uint32_t *)d)[4] = palette[vga_read_byte(vga, addr + 4)];
-+ ((uint32_t *)d)[5] = palette[vga_read_byte(vga, addr + 5)];
-+ ((uint32_t *)d)[6] = palette[vga_read_byte(vga, addr + 6)];
-+ ((uint32_t *)d)[7] = palette[vga_read_byte(vga, addr + 7)];
- d += 32;
-- s += 8;
-+ addr += 8;
- }
- }
-
- /*
- * 15 bit color
- */
--static void vga_draw_line15_le(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line15_le(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- int w;
- uint32_t v, r, g, b;
-
- w = width;
- do {
-- v = lduw_le_p((void *)s);
-+ v = vga_read_word_le(vga, addr);
- r = (v >> 7) & 0xf8;
- g = (v >> 2) & 0xf8;
- b = (v << 3) & 0xf8;
- ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
-- s += 2;
-+ addr += 2;
- d += 4;
- } while (--w != 0);
- }
-
--static void vga_draw_line15_be(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line15_be(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- int w;
- uint32_t v, r, g, b;
-
- w = width;
- do {
-- v = lduw_be_p((void *)s);
-+ v = vga_read_word_be(vga, addr);
- r = (v >> 7) & 0xf8;
- g = (v >> 2) & 0xf8;
- b = (v << 3) & 0xf8;
- ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
-- s += 2;
-+ addr += 2;
- d += 4;
- } while (--w != 0);
- }
-@@ -320,38 +346,38 @@ static void vga_draw_line15_be(VGACommonState *s1, uint8_t *d,
- /*
- * 16 bit color
- */
--static void vga_draw_line16_le(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line16_le(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- int w;
- uint32_t v, r, g, b;
-
- w = width;
- do {
-- v = lduw_le_p((void *)s);
-+ v = vga_read_word_le(vga, addr);
- r = (v >> 8) & 0xf8;
- g = (v >> 3) & 0xfc;
- b = (v << 3) & 0xf8;
- ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
-- s += 2;
-+ addr += 2;
- d += 4;
- } while (--w != 0);
- }
-
--static void vga_draw_line16_be(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line16_be(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- int w;
- uint32_t v, r, g, b;
-
- w = width;
- do {
-- v = lduw_be_p((void *)s);
-+ v = vga_read_word_be(vga, addr);
- r = (v >> 8) & 0xf8;
- g = (v >> 3) & 0xfc;
- b = (v << 3) & 0xf8;
- ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
-- s += 2;
-+ addr += 2;
- d += 4;
- } while (--w != 0);
- }
-@@ -359,36 +385,36 @@ static void vga_draw_line16_be(VGACommonState *s1, uint8_t *d,
- /*
- * 24 bit color
- */
--static void vga_draw_line24_le(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line24_le(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- int w;
- uint32_t r, g, b;
-
- w = width;
- do {
-- b = s[0];
-- g = s[1];
-- r = s[2];
-+ b = vga_read_byte(vga, addr + 0);
-+ g = vga_read_byte(vga, addr + 1);
-+ r = vga_read_byte(vga, addr + 2);
- ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
-- s += 3;
-+ addr += 3;
- d += 4;
- } while (--w != 0);
- }
-
--static void vga_draw_line24_be(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line24_be(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- int w;
- uint32_t r, g, b;
-
- w = width;
- do {
-- r = s[0];
-- g = s[1];
-- b = s[2];
-+ r = vga_read_byte(vga, addr + 0);
-+ g = vga_read_byte(vga, addr + 1);
-+ b = vga_read_byte(vga, addr + 2);
- ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
-- s += 3;
-+ addr += 3;
- d += 4;
- } while (--w != 0);
- }
-@@ -396,44 +422,36 @@ static void vga_draw_line24_be(VGACommonState *s1, uint8_t *d,
- /*
- * 32 bit color
- */
--static void vga_draw_line32_le(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line32_le(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
--#ifndef HOST_WORDS_BIGENDIAN
-- memcpy(d, s, width * 4);
--#else
- int w;
- uint32_t r, g, b;
-
- w = width;
- do {
-- b = s[0];
-- g = s[1];
-- r = s[2];
-+ b = vga_read_byte(vga, addr + 0);
-+ g = vga_read_byte(vga, addr + 1);
-+ r = vga_read_byte(vga, addr + 2);
- ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
-- s += 4;
-+ addr += 4;
- d += 4;
- } while (--w != 0);
--#endif
- }
-
--static void vga_draw_line32_be(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line32_be(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
--#ifdef HOST_WORDS_BIGENDIAN
-- memcpy(d, s, width * 4);
--#else
- int w;
- uint32_t r, g, b;
-
- w = width;
- do {
-- r = s[1];
-- g = s[2];
-- b = s[3];
-+ r = vga_read_byte(vga, addr + 1);
-+ g = vga_read_byte(vga, addr + 2);
-+ b = vga_read_byte(vga, addr + 3);
- ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
-- s += 4;
-+ addr += 4;
- d += 4;
- } while (--w != 0);
--#endif
- }
-diff --git a/hw/display/vga.c b/hw/display/vga.c
-index ad7a465..6fc8c87 100644
---- a/hw/display/vga.c
-+++ b/hw/display/vga.c
-@@ -1005,7 +1005,7 @@ void vga_mem_writeb(VGACommonState *s, hwaddr addr, uint32_t val)
- }
-
- typedef void vga_draw_line_func(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width);
-+ uint32_t srcaddr, int width);
-
- #include "vga-helpers.h"
-
-@@ -1666,7 +1666,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
- if (y_start < 0)
- y_start = y;
- if (!(is_buffer_shared(surface))) {
-- vga_draw_line(s, d, s->vram_ptr + addr, width);
-+ vga_draw_line(s, d, addr, width);
- if (s->cursor_draw_line)
- s->cursor_draw_line(s, d, y);
- }
-@@ -2170,6 +2170,7 @@ void vga_common_init(VGACommonState *s, Object *obj, bool global_vmstate)
- if (!s->vbe_size) {
- s->vbe_size = s->vram_size;
- }
-+ s->vbe_size_mask = s->vbe_size - 1;
-
- s->is_vbe_vmstate = 1;
- memory_region_init_ram_nomigrate(&s->vram, obj, "vga.vram", s->vram_size,
-diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h
-index dd6c958..ad34a1f 100644
---- a/hw/display/vga_int.h
-+++ b/hw/display/vga_int.h
-@@ -94,6 +94,7 @@ typedef struct VGACommonState {
- uint32_t vram_size;
- uint32_t vram_size_mb; /* property */
- uint32_t vbe_size;
-+ uint32_t vbe_size_mask;
- uint32_t latch;
- bool has_chain4_alias;
- MemoryRegion chain4_alias;
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13673.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13673.patch
deleted file mode 100644
index 3d0695f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13673.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From e65294157d4b69393b3f819c99f4f647452b48e3 Mon Sep 17 00:00:00 2001
-From: Gerd Hoffmann <kraxel@redhat.com>
-Date: Mon, 28 Aug 2017 14:33:07 +0200
-Subject: [PATCH] vga: fix display update region calculation (split screen)
-
-vga display update mis-calculated the region for the dirty bitmap
-snapshot in case split screen mode is used. This can trigger an
-assert in cpu_physical_memory_snapshot_get_dirty().
-
-Impact: DoS for privileged guest users.
-
-Fixes: CVE-2017-13673
-Fixes: fec5e8c92becad223df9d972770522f64aafdb72
-Cc: P J P <ppandit@redhat.com>
-Reported-by: David Buchanan <d@vidbuchanan.co.uk>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-Message-id: 20170828123307.15392-1-kraxel@redhat.com
-
-Upstream-Status: Backport
-[https://git.qemu.org/?p=qemu.git;a=commit;h=e65294157d4b69393b3f819c99f4f647452b48e3]
-
-CVE: CVE-2017-13673
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- hw/display/vga.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/hw/display/vga.c b/hw/display/vga.c
-index 3433102..ad7a465 100644
---- a/hw/display/vga.c
-+++ b/hw/display/vga.c
-@@ -1628,9 +1628,15 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
- y1 = 0;
-
- if (!full_update) {
-+ ram_addr_t region_start = addr1;
-+ ram_addr_t region_end = addr1 + line_offset * height;
- vga_sync_dirty_bitmap(s);
-- snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
-- line_offset * height,
-+ if (s->line_compare < height) {
-+ /* split screen mode */
-+ region_start = 0;
-+ }
-+ snap = memory_region_snapshot_and_clear_dirty(&s->vram, region_start,
-+ region_end - region_start,
- DIRTY_MEMORY_VGA);
- }
-
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13711.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13711.patch
deleted file mode 100644
index 352f73f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13711.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 1201d308519f1e915866d7583d5136d03cc1d384 Mon Sep 17 00:00:00 2001
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Date: Fri, 25 Aug 2017 01:35:53 +0200
-Subject: [PATCH] slirp: fix clearing ifq_so from pending packets
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The if_fastq and if_batchq contain not only packets, but queues of packets
-for the same socket. When sofree frees a socket, it thus has to clear ifq_so
-from all the packets from the queues, not only the first.
-
-Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
-Cc: qemu-stable@nongnu.org
-Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-
-Upstream-Status: Backport
-[https://git.qemu.org/?p=qemu.git;a=commit;h=1201d308519f1e915866d7583d5136d03cc1d384]
-
-CVE: CVE-2017-13711
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- slirp/socket.c | 39 +++++++++++++++++++++++----------------
- 1 file changed, 23 insertions(+), 16 deletions(-)
-
-diff --git a/slirp/socket.c b/slirp/socket.c
-index ecec029..cb7b5b6 100644
---- a/slirp/socket.c
-+++ b/slirp/socket.c
-@@ -60,29 +60,36 @@ socreate(Slirp *slirp)
- }
-
- /*
-+ * Remove references to so from the given message queue.
-+ */
-+static void
-+soqfree(struct socket *so, struct quehead *qh)
-+{
-+ struct mbuf *ifq;
-+
-+ for (ifq = (struct mbuf *) qh->qh_link;
-+ (struct quehead *) ifq != qh;
-+ ifq = ifq->ifq_next) {
-+ if (ifq->ifq_so == so) {
-+ struct mbuf *ifm;
-+ ifq->ifq_so = NULL;
-+ for (ifm = ifq->ifs_next; ifm != ifq; ifm = ifm->ifs_next) {
-+ ifm->ifq_so = NULL;
-+ }
-+ }
-+ }
-+}
-+
-+/*
- * remque and free a socket, clobber cache
- */
- void
- sofree(struct socket *so)
- {
- Slirp *slirp = so->slirp;
-- struct mbuf *ifm;
-
-- for (ifm = (struct mbuf *) slirp->if_fastq.qh_link;
-- (struct quehead *) ifm != &slirp->if_fastq;
-- ifm = ifm->ifq_next) {
-- if (ifm->ifq_so == so) {
-- ifm->ifq_so = NULL;
-- }
-- }
--
-- for (ifm = (struct mbuf *) slirp->if_batchq.qh_link;
-- (struct quehead *) ifm != &slirp->if_batchq;
-- ifm = ifm->ifq_next) {
-- if (ifm->ifq_so == so) {
-- ifm->ifq_so = NULL;
-- }
-- }
-+ soqfree(so, &slirp->if_fastq);
-+ soqfree(so, &slirp->if_batchq);
-
- if (so->so_emu==EMU_RSH && so->extra) {
- sofree(so->extra);
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-14167.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-14167.patch
deleted file mode 100644
index 969ad87..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-14167.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From ed4f86e8b6eff8e600c69adee68c7cd34dd2cccb Mon Sep 17 00:00:00 2001
-From: Prasad J Pandit <pjp@fedoraproject.org>
-Date: Thu, 7 Sep 2017 12:02:56 +0530
-Subject: [PATCH] multiboot: validate multiboot header address values
-
-While loading kernel via multiboot-v1 image, (flags & 0x00010000)
-indicates that multiboot header contains valid addresses to load
-the kernel image. These addresses are used to compute kernel
-size and kernel text offset in the OS image. Validate these
-address values to avoid an OOB access issue.
-
-This is CVE-2017-14167.
-
-Reported-by: Thomas Garnier <thgarnie@google.com>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-Message-Id: <20170907063256.7418-1-ppandit@redhat.com>
-Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-
-Upstream-Status: Backport
-[https://git.qemu.org/?p=qemu.git;a=commit;h=ed4f86e8b6eff8e600c69adee68c7cd34dd2cccb]
-
-CVE: CVE-2017-14167
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- hw/i386/multiboot.c | 19 +++++++++++++++++++
- 1 file changed, 19 insertions(+)
-
-diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c
-index 6001f4c..c7b70c9 100644
---- a/hw/i386/multiboot.c
-+++ b/hw/i386/multiboot.c
-@@ -221,15 +221,34 @@ int load_multiboot(FWCfgState *fw_cfg,
- uint32_t mh_header_addr = ldl_p(header+i+12);
- uint32_t mh_load_end_addr = ldl_p(header+i+20);
- uint32_t mh_bss_end_addr = ldl_p(header+i+24);
-+
- mh_load_addr = ldl_p(header+i+16);
-+ if (mh_header_addr < mh_load_addr) {
-+ fprintf(stderr, "invalid mh_load_addr address\n");
-+ exit(1);
-+ }
-+
- uint32_t mb_kernel_text_offset = i - (mh_header_addr - mh_load_addr);
- uint32_t mb_load_size = 0;
- mh_entry_addr = ldl_p(header+i+28);
-
- if (mh_load_end_addr) {
-+ if (mh_bss_end_addr < mh_load_addr) {
-+ fprintf(stderr, "invalid mh_bss_end_addr address\n");
-+ exit(1);
-+ }
- mb_kernel_size = mh_bss_end_addr - mh_load_addr;
-+
-+ if (mh_load_end_addr < mh_load_addr) {
-+ fprintf(stderr, "invalid mh_load_end_addr address\n");
-+ exit(1);
-+ }
- mb_load_size = mh_load_end_addr - mh_load_addr;
- } else {
-+ if (kernel_file_size < mb_kernel_text_offset) {
-+ fprintf(stderr, "invalid kernel_file_size\n");
-+ exit(1);
-+ }
- mb_kernel_size = kernel_file_size - mb_kernel_text_offset;
- mb_load_size = mb_kernel_size;
- }
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
index 9bbbc6f..d6a3522 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
@@ -28,12 +28,12 @@
hw/intc/apic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/hw/intc/apic.c b/hw/intc/apic.c
-index 45887d99..c5ae4087 100644
---- a/hw/intc/apic.c
-+++ b/hw/intc/apic.c
-@@ -587,7 +587,7 @@ int apic_accept_pic_intr(DeviceState *dev)
- APICCommonState *s = APIC_COMMON(dev);
+Index: qemu-2.11.1/hw/intc/apic.c
+===================================================================
+--- qemu-2.11.1.orig/hw/intc/apic.c
++++ qemu-2.11.1/hw/intc/apic.c
+@@ -591,7 +591,7 @@ int apic_accept_pic_intr(DeviceState *de
+ APICCommonState *s = APIC(dev);
uint32_t lvt0;
- if (!s)
@@ -41,6 +41,3 @@
return -1;
lvt0 = s->lvt[APIC_LVT_LINT0];
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
new file mode 100644
index 0000000..6e6bf95
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
@@ -0,0 +1,242 @@
+From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@xilinx.com>
+Date: Thu, 21 Dec 2017 11:35:16 -0800
+Subject: [PATCH] chardev: connect socket to a spawned command
+
+The command is started in a shell (sh -c) with stdin connect to QEMU
+via a Unix domain stream socket. QEMU then exchanges data via its own
+end of the socket, just like it normally does.
+
+"-chardev socket" supports some ways of connecting via protocols like
+telnet, but that is only a subset of the functionality supported by
+tools socat. To use socat instead, for example to connect via a socks
+proxy, use:
+
+ -chardev 'socket,id=socat,cmd=exec socat FD:0 SOCKS4A:socks-proxy.localdomain:example.com:9999,,socksuser=nobody' \
+ -device usb-serial,chardev=socat
+
+Beware that commas in the command must be escaped as double commas.
+
+Or interactively in the console:
+ (qemu) chardev-add socket,id=cat,cmd=cat
+ (qemu) device_add usb-serial,chardev=cat
+ ^ac
+ # cat >/dev/ttyUSB0
+ hello
+ hello
+
+Another usage is starting swtpm from inside QEMU. swtpm will
+automatically shut down once it looses the connection to the parent
+QEMU, so there is no risk of lingering processes:
+
+ -chardev 'socket,id=chrtpm0,cmd=exec swtpm socket --terminate --ctrl type=unixio,,clientfd=0 --tpmstate dir=... --log file=swtpm.log' \
+ -tpmdev emulator,id=tpm0,chardev=chrtpm0 \
+ -device tpm-tis,tpmdev=tpm0
+
+The patch was discussed upstream, but QEMU developers believe that the
+code calling QEMU should be responsible for managing additional
+processes. In OE-core, that would imply enhancing runqemu and
+oeqa. This patch is a simpler solution.
+
+Because it is not going upstream, the patch was written so that it is
+as simple as possible.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
+---
+ chardev/char-socket.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++---
+ chardev/char.c | 3 ++
+ qapi/char.json | 5 +++
+ 3 files changed, 90 insertions(+), 4 deletions(-)
+
+diff --git a/chardev/char-socket.c b/chardev/char-socket.c
+index 53eda8ef00..f566107c35 100644
+--- a/chardev/char-socket.c
++++ b/chardev/char-socket.c
+@@ -852,6 +852,68 @@ static gboolean socket_reconnect_timeout(gpointer opaque)
+ return false;
+ }
+
++#ifndef _WIN32
++static void chardev_open_socket_cmd(Chardev *chr,
++ const char *cmd,
++ Error **errp)
++{
++ int fds[2] = { -1, -1 };
++ QIOChannelSocket *sioc = NULL;
++ pid_t pid = -1;
++ const char *argv[] = { "/bin/sh", "-c", cmd, NULL };
++
++ /*
++ * We need a Unix domain socket for commands like swtpm and a single
++ * connection, therefore we cannot use qio_channel_command_new_spawn()
++ * without patching it first. Duplicating the functionality is easier.
++ */
++ if (socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, fds)) {
++ error_setg_errno(errp, errno, "Error creating socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC)");
++ goto error;
++ }
++
++ pid = qemu_fork(errp);
++ if (pid < 0) {
++ goto error;
++ }
++
++ if (!pid) {
++ /* child */
++ dup2(fds[1], STDIN_FILENO);
++ execv(argv[0], (char * const *)argv);
++ _exit(1);
++ }
++
++ /*
++ * Hand over our end of the socket pair to the qio channel.
++ *
++ * We don't reap the child because it is expected to keep
++ * running. We also don't support the "reconnect" option for the
++ * same reason.
++ */
++ sioc = qio_channel_socket_new_fd(fds[0], errp);
++ if (!sioc) {
++ goto error;
++ }
++ fds[0] = -1;
++
++ g_free(chr->filename);
++ chr->filename = g_strdup_printf("cmd:%s", cmd);
++ tcp_chr_new_client(chr, sioc);
++
++ error:
++ if (fds[0] >= 0) {
++ close(fds[0]);
++ }
++ if (fds[1] >= 0) {
++ close(fds[1]);
++ }
++ if (sioc) {
++ object_unref(OBJECT(sioc));
++ }
++}
++#endif
++
+ static void qmp_chardev_open_socket(Chardev *chr,
+ ChardevBackend *backend,
+ bool *be_opened,
+@@ -859,6 +921,9 @@
+ {
+ SocketChardev *s = SOCKET_CHARDEV(chr);
+ ChardevSocket *sock = backend->u.socket.data;
++#ifndef _WIN32
++ const char *cmd = sock->cmd;
++#endif
+ bool do_nodelay = sock->has_nodelay ? sock->nodelay : false;
+ bool is_listen = sock->has_server ? sock->server : true;
+ bool is_telnet = sock->has_telnet ? sock->telnet : false;
+@@ -925,7 +990,14 @@
+ } else if (reconnect > 0) {
+ s->reconnect_time = reconnect;
+ }
+-
++#ifndef _WIN32
++ if (cmd) {
++ chardev_open_socket_cmd(chr, cmd, errp);
++
++ /* everything ready (or failed permanently) before we return */
++ *be_opened = true;
++ } else
++#endif
+ if (s->reconnect_time) {
+ sioc = qio_channel_socket_new();
+ tcp_chr_set_client_ioc_name(chr, sioc);
+@@ -985,10 +1057,26 @@
+ const char *host = qemu_opt_get(opts, "host");
+ const char *port = qemu_opt_get(opts, "port");
+ const char *tls_creds = qemu_opt_get(opts, "tls-creds");
++#ifndef _WIN32
++ const char *cmd = qemu_opt_get(opts, "cmd");
++#endif
+ SocketAddressLegacy *addr;
+ ChardevSocket *sock;
+
+ backend->type = CHARDEV_BACKEND_KIND_SOCKET;
++#ifndef _WIN32
++ if (cmd) {
++ /*
++ * Here we have to ensure that no options are set which are incompatible with
++ * spawning a command, otherwise unmodified code that doesn't know about
++ * command spawning (like socket_reconnect_timeout()) might get called.
++ */
++ if (path || is_listen || is_telnet || is_tn3270 || reconnect || host || port || tls_creds) {
++ error_setg(errp, "chardev: socket: cmd does not support any additional options");
++ return;
++ }
++ } else
++#endif
+ if (!path) {
+ if (!host) {
+ error_setg(errp, "chardev: socket: no host given");
+@@ -1021,13 +1109,24 @@
+ sock->has_reconnect = true;
+ sock->reconnect = reconnect;
+ sock->tls_creds = g_strdup(tls_creds);
++#ifndef _WIN32
++ sock->cmd = g_strdup(cmd);
++#endif
+
+ addr = g_new0(SocketAddressLegacy, 1);
++#ifndef _WIN32
++ if (path || cmd) {
++#else
+ if (path) {
++#endif
+ UnixSocketAddress *q_unix;
+ addr->type = SOCKET_ADDRESS_LEGACY_KIND_UNIX;
+ q_unix = addr->u.q_unix.data = g_new0(UnixSocketAddress, 1);
++#ifndef _WIN32
++ q_unix->path = cmd ? g_strdup_printf("cmd:%s", cmd) : g_strdup(path);
++#else
+ q_unix->path = g_strdup(path);
++#endif
+ } else {
+ addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
+ addr->u.inet.data = g_new(InetSocketAddress, 1);
+diff --git a/chardev/char.c b/chardev/char.c
+index 2ae4f465ec..5d52cd5de5 100644
+--- a/chardev/char.c
++++ b/chardev/char.c
+@@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
+ },{
+ .name = "path",
+ .type = QEMU_OPT_STRING,
++ },{
++ .name = "cmd",
++ .type = QEMU_OPT_STRING,
+ },{
+ .name = "host",
+ .type = QEMU_OPT_STRING,
+diff --git a/qapi/char.json b/qapi/char.json
+index ae19dcd1ed..6de0f29bcd 100644
+--- a/qapi/char.json
++++ b/qapi/char.json
+@@ -241,6 +241,10 @@
+ #
+ # @addr: socket address to listen on (server=true)
+ # or connect to (server=false)
++# @cmd: command to run via "sh -c" with stdin as one end of
++# a AF_UNIX SOCK_DSTREAM socket pair. The other end
++# is used by the chardev. Either an addr or a cmd can
++# be specified, but not both.
+ # @tls-creds: the ID of the TLS credentials object (since 2.6)
+ # @server: create server socket (default: true)
+ # @wait: wait for incoming connection on server
+@@ -258,6 +262,7 @@
+ # Since: 1.4
+ ##
+ { 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddressLegacy',
++ '*cmd' : 'str',
+ '*tls-creds' : 'str',
+ '*server' : 'bool',
+ '*wait' : 'bool',
+--
+2.14.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/check-PS2Queue-pointers-in-post_load-routine.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/check-PS2Queue-pointers-in-post_load-routine.patch
new file mode 100644
index 0000000..f8d7f66
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/check-PS2Queue-pointers-in-post_load-routine.patch
@@ -0,0 +1,63 @@
+From ee9a17d0e12143971a9676227cce953c0dbe52fb Mon Sep 17 00:00:00 2001
+From: Prasad J Pandit <pjp@fedoraproject.org>
+Date: Thu, 16 Nov 2017 13:21:55 +0530
+Subject: [PATCH] ps2: check PS2Queue pointers in post_load routine
+
+During Qemu guest migration, a destination process invokes ps2
+post_load function. In that, if 'rptr' and 'count' values were
+invalid, it could lead to OOB access or infinite loop issue.
+Add check to avoid it.
+
+Reported-by: Cyrille Chatras <cyrille.chatras@orange.com>
+Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
+Message-id: 20171116075155.22378-1-ppandit@redhat.com
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+
+CVE: CVE-2017-16845
+Upstream-Status: Backport
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ hw/input/ps2.c | 21 +++++++++------------
+ 1 file changed, 9 insertions(+), 12 deletions(-)
+
+diff --git a/hw/input/ps2.c b/hw/input/ps2.c
+index f388a23..de171a2 100644
+--- a/hw/input/ps2.c
++++ b/hw/input/ps2.c
+@@ -1225,24 +1225,21 @@ static void ps2_common_reset(PS2State *s)
+ static void ps2_common_post_load(PS2State *s)
+ {
+ PS2Queue *q = &s->queue;
+- int size;
+- int i;
+- int tmp_data[PS2_QUEUE_SIZE];
++ uint8_t i, size;
++ uint8_t tmp_data[PS2_QUEUE_SIZE];
+
+ /* set the useful data buffer queue size, < PS2_QUEUE_SIZE */
+- size = q->count > PS2_QUEUE_SIZE ? 0 : q->count;
++ size = (q->count < 0 || q->count > PS2_QUEUE_SIZE) ? 0 : q->count;
+
+ /* move the queue elements to the start of data array */
+- if (size > 0) {
+- for (i = 0; i < size; i++) {
+- /* move the queue elements to the temporary buffer */
+- tmp_data[i] = q->data[q->rptr];
+- if (++q->rptr == 256) {
+- q->rptr = 0;
+- }
++ for (i = 0; i < size; i++) {
++ if (q->rptr < 0 || q->rptr >= sizeof(q->data)) {
++ q->rptr = 0;
+ }
+- memcpy(q->data, tmp_data, size);
++ tmp_data[i] = q->data[q->rptr++];
+ }
++ memcpy(q->data, tmp_data, size);
++
+ /* reset rptr/wptr/count */
+ q->rptr = 0;
+ q->wptr = size;
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/disable-grabs.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
index 123833f..7711789 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
@@ -24,11 +24,11 @@
ui/sdl.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
-diff --git a/ui/sdl.c b/ui/sdl.c
-index 39a42d6..9b8abe5 100644
---- a/ui/sdl.c
-+++ b/ui/sdl.c
-@@ -59,6 +59,10 @@ static SDL_Cursor *guest_sprite = NULL;
+Index: qemu-2.11.1/ui/sdl.c
+===================================================================
+--- qemu-2.11.1.orig/ui/sdl.c
++++ qemu-2.11.1/ui/sdl.c
+@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
static int scaling_active = 0;
static Notifier mouse_mode_notifier;
static int idle_counter;
@@ -37,10 +37,10 @@
+#endif
+static doing_grabs = True;
- static void sdl_update(DisplayChangeListener *dcl,
- int x, int y, int w, int h)
-@@ -384,14 +388,16 @@ static void sdl_grab_start(void)
- }
+ #define SDL_REFRESH_INTERVAL_BUSY 10
+ #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
+@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
+ }
} else
sdl_hide_cursor();
- SDL_WM_GrabInput(SDL_GRAB_ON);
@@ -58,7 +58,7 @@
gui_grab = 0;
sdl_show_cursor();
sdl_update_caption();
-@@ -909,6 +915,8 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
+@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
* This requires SDL >= 1.2.14. */
setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
@@ -67,6 +67,3 @@
flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
if (SDL_Init (flags)) {
fprintf(stderr, "Could not initialize SDL(%s) - exiting\n",
---
-1.8.3.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch
deleted file mode 100644
index f593cf9..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-[PATCH] exclude some arm EABI obsolete syscalls
-
-Upstream-Status: Pending
-
-some syscalls are obsolete and no longer available for EABI, exclude them to
-fix the below error:
- In file included from qemu-seccomp.c:16:0:
- qemu-seccomp.c:28:7: error: '__NR_select' undeclared here (not in a function)
- { SCMP_SYS(select), 252 },
- ^
- qemu-seccomp.c:36:7: error: '__NR_mmap' undeclared here (not in a function)
- { SCMP_SYS(mmap), 247 },
- ^
- qemu-seccomp.c:57:7: error: '__NR_getrlimit' undeclared here (not in a function)
- { SCMP_SYS(getrlimit), 245 },
- ^
- qemu-seccomp.c:96:7: error: '__NR_time' undeclared here (not in a function)
- { SCMP_SYS(time), 245 },
- ^
- qemu-seccomp.c:185:7: error: '__NR_alarm' undeclared here (not in a function)
- { SCMP_SYS(alarm), 241 },
-
-please refer source files:
- arch/arm/include/uapi/asm/unistd.h
-or kernel header:
- /usr/include/asm/unistd.h
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- qemu-seccomp.c | 13 ++++++++-----
- 1 file changed, 8 insertions(+), 5 deletions(-)
-
-diff --git a/qemu-seccomp.c b/qemu-seccomp.c
-index df75d9c..0e577f8 100644
---- a/qemu-seccomp.c
-+++ b/qemu-seccomp.c
-@@ -35,15 +35,21 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
- { SCMP_SYS(timer_settime), 255 },
- { SCMP_SYS(timer_gettime), 254 },
- { SCMP_SYS(futex), 253 },
-+#if !defined(__ARM_EABI__)
- { SCMP_SYS(select), 252 },
-+ { SCMP_SYS(time), 245 },
-+ { SCMP_SYS(alarm), 241 },
-+ { SCMP_SYS(getrlimit), 245 },
-+ { SCMP_SYS(mmap), 247 },
-+ { SCMP_SYS(socketcall), 250 },
-+ { SCMP_SYS(ipc), 245 },
-+#endif
- { SCMP_SYS(recvfrom), 251 },
- { SCMP_SYS(sendto), 250 },
-- { SCMP_SYS(socketcall), 250 },
- { SCMP_SYS(read), 249 },
- { SCMP_SYS(io_submit), 249 },
- { SCMP_SYS(brk), 248 },
- { SCMP_SYS(clone), 247 },
-- { SCMP_SYS(mmap), 247 },
- { SCMP_SYS(mprotect), 246 },
- { SCMP_SYS(execve), 245 },
- { SCMP_SYS(open), 245 },
-@@ -58,7 +64,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
- { SCMP_SYS(bind), 245 },
- { SCMP_SYS(listen), 245 },
- { SCMP_SYS(semget), 245 },
-- { SCMP_SYS(ipc), 245 },
- { SCMP_SYS(gettimeofday), 245 },
- { SCMP_SYS(readlink), 245 },
- { SCMP_SYS(access), 245 },
-@@ -104,7 +109,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
- { SCMP_SYS(times), 245 },
- { SCMP_SYS(exit), 245 },
- { SCMP_SYS(clock_gettime), 245 },
-- { SCMP_SYS(time), 245 },
- { SCMP_SYS(restart_syscall), 245 },
- { SCMP_SYS(pwrite64), 245 },
- { SCMP_SYS(nanosleep), 245 },
-@@ -194,7 +198,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
- { SCMP_SYS(lstat64), 241 },
- { SCMP_SYS(sendfile64), 241 },
- { SCMP_SYS(ugetrlimit), 241 },
-- { SCMP_SYS(alarm), 241 },
- { SCMP_SYS(rt_sigsuspend), 241 },
- { SCMP_SYS(rt_sigqueueinfo), 241 },
- { SCMP_SYS(rt_tgsigqueueinfo), 241 },
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/glibc-2.25.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/glibc-2.25.patch
deleted file mode 100644
index a6908bd..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/glibc-2.25.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From: Christopher Covington
-Date: Wed, 28 Dec 2016 15:04:33 -0500
-Subject: [Qemu-devel] [PATCH v3] build: include sys/sysmacros.h for major() and minor()a
-
-The definition of the major() and minor() macros are moving within glibc to
-<sys/sysmacros.h>. Include this header when it is available to avoid the
-following sorts of build-stopping messages:
-
-qga/commands-posix.c: In function ‘dev_major_minor’:
-qga/commands-posix.c:656:13: error: In the GNU C Library, "major" is defined
- by <sys/sysmacros.h>. For historical compatibility, it is
- currently defined by <sys/types.h> as well, but we plan to
- remove this soon. To use "major", include <sys/sysmacros.h>
- directly. If you did not intend to use a system-defined macro
- "major", you should undefine it after including <sys/types.h>. [-Werror]
- *devmajor = major(st.st_rdev);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~
-
-qga/commands-posix.c:657:13: error: In the GNU C Library, "minor" is defined
- by <sys/sysmacros.h>. For historical compatibility, it is
- currently defined by <sys/types.h> as well, but we plan to
- remove this soon. To use "minor", include <sys/sysmacros.h>
- directly. If you did not intend to use a system-defined macro
- "minor", you should undefine it after including <sys/types.h>. [-Werror]
- *devminor = minor(st.st_rdev);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The additional include allows the build to complete on Fedora 26 (Rawhide)
-with glibc version 2.24.90.
-
-Signed-off-by: Christopher Covington <address@hidden>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-Upstream-Status: Submitted https://lists.gnu.org/archive/html/qemu-devel/2016-12/msg03548.html
-
-diff -uNr qemu-2.8.0.orig/configure qemu-2.8.0/configure
---- qemu-2.8.0.orig/configure 2017-02-21 19:05:13.180094708 +0100
-+++ qemu-2.8.0/configure 2017-02-21 19:08:53.114087084 +0100
-@@ -4727,6 +4727,20 @@
- then
- fi
-
- ##########################################
-+# check for sysmacros.h
-+
-+have_sysmacros=no
-+cat > $TMPC << EOF
-+#include <sys/sysmacros.h>
-+int main(void) {
-+ return makedev(0, 0);
-+}
-+EOF
-+if compile_prog "" "" ; then
-+ have_sysmacros=yes
-+fi
-+
-+##########################################
- # End of CC checks
- # After here, no more $cc or $ld runs
-
-diff -uNr qemu-2.8.0.orig/configure qemu-2.8.0/configure
---- qemu-2.8.0.orig/configure 2017-02-21 19:05:13.180094708 +0100
-+++ qemu-2.8.0/configure 2017-02-21 19:08:53.114087084 +0100
-@@ -5695,6 +5709,10 @@
- echo "CONFIG_AF_VSOCK=y" >> $config_host_mak
- fi
-
-+if test "$have_sysmacros" = "yes" ; then
-+ echo "CONFIG_SYSMACROS=y" >> $config_host_mak
-+fi
-+
- # Hold two types of flag:
- # CONFIG_THREAD_SETNAME_BYTHREAD - we've got a way of setting the name on
- # a thread we have a handle to
-diff -uNr qemu-2.8.0.orig/include/sysemu/os-posix.h qemu-2.8.0/include/sysemu/os-posix.h
---- qemu-2.8.0.orig/include/sysemu/os-posix.h 2016-12-20 21:16:48.000000000 +0100
-+++ qemu-2.8.0/include/sysemu/os-posix.h 2017-02-21 19:07:18.009090381 +0100
-@@ -34,6 +34,10 @@
- #include <netdb.h>
- #include <sys/un.h>
-
-+#ifdef CONFIG_SYSMACROS
-+#include <sys/sysmacros.h>
-+#endif
-+
- void os_set_line_buffering(void);
- void os_set_proc_name(const char *s);
- void os_setup_signal_handling(void);
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
new file mode 100644
index 0000000..d2c5225
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
@@ -0,0 +1,35 @@
+From 4fa4aae4176ef6d8f4d4b8323d061e2433918a26 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@xilinx.com>
+Date: Wed, 17 Jan 2018 10:51:49 -0800
+Subject: [PATCH] linux-user: Fix webkitgtk hangs on 32-bit x86 target
+
+Since commit "linux-user: Tidy and enforce reserved_va initialization"
+(18e80c55bb6ec17c05ec0ba717ec83933c2bfc07) the Yocto webkitgtk build
+hangs when cross compiling for 32-bit x86 on a 64-bit x86 machine using
+musl.
+
+To fix the issue reduce the MAX_RESERVED_VA macro to be a closer match
+to what it was before the problematic commit.
+
+Upstream-Status: Submitted http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg04185.html
+Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
+---
+ linux-user/main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/linux-user/main.c b/linux-user/main.c
+index 450eb3ce65..c7cc0a184e 100644
+--- a/linux-user/main.c
++++ b/linux-user/main.c
+@@ -77,7 +77,7 @@ do { \
+ (TARGET_LONG_BITS == 32 || defined(TARGET_ABI32))
+ /* There are a number of places where we assign reserved_va to a variable
+ of type abi_ulong and expect it to fit. Avoid the last page. */
+-# define MAX_RESERVED_VA (0xfffffffful & TARGET_PAGE_MASK)
++# define MAX_RESERVED_VA (0x7ffffffful & TARGET_PAGE_MASK)
+ # else
+ # define MAX_RESERVED_VA (1ul << TARGET_VIRT_ADDR_SPACE_BITS)
+ # endif
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/ppc_locking.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/ppc_locking.patch
deleted file mode 100644
index 6f72243..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/ppc_locking.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-I've tracked down what I think is a problem causing qemu-system-ppc
-to hang whilst booting images.
-
-I believe the decrementer timer stops receiving interrupts so
-tasks in our images hang indefinitely as the timer stopped.
-
-It can be summed up with this line of debug:
-
-ppc_set_irq: 0x55b4e0d562f0 n_IRQ 8 level 1 => pending 00000100req 00000004
-
-It should normally read:
-
-ppc_set_irq: 0x55b4e0d562f0 n_IRQ 8 level 1 => pending 00000100req 00000002
-
-The question is why CPU_INTERRUPT_EXITTB ends up being set when the
-lines above this log message clearly sets CPU_INTERRUPT_HARD (via
-cpu_interrupt() ).
-
-I note in cpu.h:
-
- /* updates protected by BQL */
- uint32_t interrupt_request;
-
-(for struct CPUState)
-
-The ppc code does "cs->interrupt_request |= CPU_INTERRUPT_EXITTB" in 5
-places, 3 in excp_helper.c and 2 in helper_regs.h. In all cases,
-g_assert(qemu_mutex_iothread_locked()); fails. If I do something like:
-
-if (!qemu_mutex_iothread_locked()) {
- qemu_mutex_lock_iothread();
- cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
- qemu_mutex_unlock_iothread();
-} else {
- cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-}
-
-in these call sites then I can no longer lock qemu up with my test
-case.
-
-I suspect the _HARD setting gets overwritten which stops the
-decrementer interrupts being delivered.
-
-Upstream-Status: Submitted [Issue discussed on qemu mailing list 2017/11/20]
-RP 2017/11/20
-
-Index: qemu-2.10.1/target/ppc/excp_helper.c
-===================================================================
---- qemu-2.10.1.orig/target/ppc/excp_helper.c
-+++ qemu-2.10.1/target/ppc/excp_helper.c
-@@ -207,7 +207,9 @@ static inline void powerpc_excp(PowerPCC
- "Entering checkstop state\n");
- }
- cs->halted = 1;
-- cs->interrupt_request |= CPU_INTERRUPT_EXITTB;
-+ qemu_mutex_lock_iothread();
-+ cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-+ qemu_mutex_unlock_iothread();
- }
- if (env->msr_mask & MSR_HVB) {
- /* ISA specifies HV, but can be delivered to guest with HV clear
-@@ -940,7 +942,9 @@ void helper_store_msr(CPUPPCState *env,
-
- if (excp != 0) {
- CPUState *cs = CPU(ppc_env_get_cpu(env));
-- cs->interrupt_request |= CPU_INTERRUPT_EXITTB;
-+ qemu_mutex_lock_iothread();
-+ cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-+ qemu_mutex_unlock_iothread();
- raise_exception(env, excp);
- }
- }
-@@ -995,7 +999,9 @@ static inline void do_rfi(CPUPPCState *e
- /* No need to raise an exception here,
- * as rfi is always the last insn of a TB
- */
-- cs->interrupt_request |= CPU_INTERRUPT_EXITTB;
-+ qemu_mutex_lock_iothread();
-+ cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-+ qemu_mutex_unlock_iothread();
-
- /* Reset the reservation */
- env->reserve_addr = -1;
-Index: qemu-2.10.1/target/ppc/helper_regs.h
-===================================================================
---- qemu-2.10.1.orig/target/ppc/helper_regs.h
-+++ qemu-2.10.1/target/ppc/helper_regs.h
-@@ -114,11 +114,15 @@ static inline int hreg_store_msr(CPUPPCS
- }
- if (((value >> MSR_IR) & 1) != msr_ir ||
- ((value >> MSR_DR) & 1) != msr_dr) {
-- cs->interrupt_request |= CPU_INTERRUPT_EXITTB;
-+ qemu_mutex_lock_iothread();
-+ cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-+ qemu_mutex_unlock_iothread();
- }
- if ((env->mmu_model & POWERPC_MMU_BOOKE) &&
- ((value >> MSR_GS) & 1) != msr_gs) {
-- cs->interrupt_request |= CPU_INTERRUPT_EXITTB;
-+ qemu_mutex_lock_iothread();
-+ cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-+ qemu_mutex_unlock_iothread();
- }
- if (unlikely((env->flags & POWERPC_FLAG_TGPR) &&
- ((value ^ env->msr) & (1 << MSR_TGPR)))) {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.10.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.10.0.bb
deleted file mode 100644
index bdf6c21..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.10.0.bb
+++ /dev/null
@@ -1,63 +0,0 @@
-require qemu.inc
-
-inherit ptest
-
-RDEPENDS_${PN}-ptest = "bash make"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
- file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
-
-SRC_URI = "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
- file://powerpc_rom.bin \
- file://disable-grabs.patch \
- file://exclude-some-arm-EABI-obsolete-syscalls.patch \
- file://wacom.patch \
- file://add-ptest-in-makefile-v10.patch \
- file://run-ptest \
- file://qemu-enlarge-env-entry-size.patch \
- file://no-valgrind.patch \
- file://pathlimit.patch \
- file://qemu-2.5.0-cflags.patch \
- file://glibc-2.25.patch \
- file://0001-Provide-support-for-the-CUSE-TPM.patch \
- file://0002-Introduce-condition-to-notify-waiters-of-completed-c.patch \
- file://0003-Introduce-condition-in-TPM-backend-for-notification.patch \
- file://0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch \
- file://apic-fixup-fallthrough-to-PIC.patch \
- file://CVE-2017-13711.patch \
- file://CVE-2017-13673.patch \
- file://CVE-2017-13672.patch \
- file://CVE-2017-14167.patch \
- file://ppc_locking.patch \
- file://memfd.patch \
- "
-UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
-
-
-SRC_URI_append_class-native = " \
- file://fix-libcap-header-issue-on-some-distro.patch \
- file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
- "
-
-SRC_URI[md5sum] = "ca73441de73a9b52c6c49c97190d2185"
-SRC_URI[sha256sum] = "7e9f39e1306e6dcc595494e91c1464d4b03f55ddd2053183e0e1b69f7f776d48"
-
-COMPATIBLE_HOST_mipsarchn32 = "null"
-COMPATIBLE_HOST_mipsarchn64 = "null"
-
-do_install_append() {
- # Prevent QA warnings about installed ${localstatedir}/run
- if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
- install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu
-}
-
-do_compile_ptest() {
- make buildtest-TESTS
-}
-
-do_install_ptest() {
- cp -rL ${B}/tests ${D}${PTEST_PATH}
- find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {}
-
- cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.11.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.11.1.bb
new file mode 100644
index 0000000..ab82c5f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.11.1.bb
@@ -0,0 +1,59 @@
+require qemu.inc
+
+inherit ptest
+
+RDEPENDS_${PN}-ptest = "bash make"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
+ file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
+
+SRC_URI = "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
+ file://powerpc_rom.bin \
+ file://disable-grabs.patch \
+ file://wacom.patch \
+ file://add-ptest-in-makefile-v10.patch \
+ file://run-ptest \
+ file://qemu-enlarge-env-entry-size.patch \
+ file://no-valgrind.patch \
+ file://pathlimit.patch \
+ file://qemu-2.5.0-cflags.patch \
+ file://chardev-connect-socket-to-a-spawned-command.patch \
+ file://apic-fixup-fallthrough-to-PIC.patch \
+ file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
+ file://memfd.patch \
+ file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
+ file://check-PS2Queue-pointers-in-post_load-routine.patch \
+ "
+UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
+
+
+SRC_URI_append_class-native = " \
+ file://fix-libcap-header-issue-on-some-distro.patch \
+ file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
+ "
+
+SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
+SRC_URI[sha256sum] = "d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb"
+
+COMPATIBLE_HOST_mipsarchn32 = "null"
+COMPATIBLE_HOST_mipsarchn64 = "null"
+
+do_install_append() {
+ # Prevent QA warnings about installed ${localstatedir}/run
+ if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
+ install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu
+}
+
+do_compile_ptest() {
+ make buildtest-TESTS
+}
+
+do_install_ptest() {
+ cp -rL ${B}/tests ${D}${PTEST_PATH}
+ find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {}
+
+ cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests
+ # Don't check the file genreated by configure
+ sed -i -e '/wildcard config-host.mak/d' \
+ -e '$ {/endif/d}' ${D}${PTEST_PATH}/tests/Makefile.include
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt/aclocal.patch b/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt/aclocal.patch
deleted file mode 100644
index daf4429..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt/aclocal.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-Upstream-Status: Pending
-
-Add the aclocal.m4 as acinclude.m4
-
-Index: quilt-0.47/acinclude.m4
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ quilt-0.47/acinclude.m4 2006-10-10 17:05:56.000000000 +0100
-@@ -0,0 +1,119 @@
-+dnl Allow configure to specify a specific binary
-+dnl 1: Environment variable
-+dnl 2: binary name
-+dnl 3: optional list of alternative binary names
-+dnl 4: optional list of additional search directories
-+AC_DEFUN([QUILT_COMPAT_PROG_PATH],[
-+ m4_define([internal_$2_cmd],[esyscmd(ls compat/$2.in 2>/dev/null)])
-+
-+ AC_ARG_WITH($2, AC_HELP_STRING(
-+ [--with-$2], [name of the $2 executable to use]
-+ m4_if(internal_$2_cmd,[],[],[ (use --without-$2
-+ to use an internal mechanism)])),
-+ [
-+ if test x"$withval" = xnone; then
-+ AC_MSG_ERROR([Invalid configure argument. use --without-$2])
-+ fi
-+ if test x"$withval" != xno; then
-+ AC_MSG_CHECKING(for $2)
-+ $1="$withval"
-+ if test -e "$$1"; then
-+ if test ! -f "$$1" -a ! -h "$$1" || test ! -x "$$1"; then
-+ AC_MSG_ERROR([$$1 is not an executable file])
-+ fi
-+ fi
-+ AC_MSG_RESULT([$$1])
-+ if test ! -e "$$1"; then
-+ AC_MSG_WARN([$$1 does not exist])
-+ fi
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ fi
-+ ],[
-+ m4_if([$3],[],[
-+ AC_PATH_PROG($1,$2,,$PATH:$4)
-+ ],[
-+ AC_PATH_PROGS($1,$3,,$PATH:$4)
-+ if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ fi
-+ ])
-+ m4_if([$4],[],[],[
-+ if test -n "$$1"; then
-+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+ for dir in "$4"; do
-+ if test "`dirname $$1`" = "$dir"; then
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ break
-+ fi
-+ done
-+ IFS="$as_save_IFS"
-+ fi
-+ ])
-+ ])
-+ if test -z "$$1"; then
-+ m4_if(internal_$2_cmd,[],[
-+ AC_MSG_ERROR([Please specify the location of $2 with the option '--with-$2'])
-+ ],[
-+ AC_MSG_WARN([Using internal $2 mechanism. Use option '--with-$2' to override])
-+ COMPAT_PROGRAMS="$COMPAT_PROGRAMS $2"
-+ $1=$2
-+ INTERNAL_$1=1
-+ ])
-+ fi
-+ AC_SUBST($1)
-+])
-+
-+dnl Allow configure to specify a specific binary
-+dnl This variant is for optional binaries.
-+dnl 1: Environment variable
-+dnl 2: binary name
-+dnl 3: optional list of alternative binary names
-+dnl 4: optional list of additional search directories
-+AC_DEFUN([QUILT_COMPAT_PROG_PATH_OPT],[
-+ AC_ARG_WITH($2, AC_HELP_STRING(
-+ [--with-$2], [name of the $2 executable to use]),
-+ [
-+ if test x"$withval" != xno; then
-+ AC_MSG_CHECKING(for $2)
-+ $1="$withval"
-+ if test -e "$$1"; then
-+ if test ! -f "$$1" -a ! -h "$$1" || test ! -x "$$1"; then
-+ AC_MSG_ERROR([$$1 is not an executable file])
-+ fi
-+ fi
-+ AC_MSG_RESULT([$$1])
-+ if test ! -e "$$1"; then
-+ AC_MSG_WARN([$$1 does not exist])
-+ fi
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ fi
-+ ],[
-+ m4_if([$3],[],[
-+ AC_PATH_PROG($1,$2,,$PATH:$4)
-+ ],[
-+ AC_PATH_PROGS($1,$3,,$PATH:$4)
-+ if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ fi
-+ ])
-+ m4_if([$4],[],[],[
-+ if test -n "$$1"; then
-+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+ for dir in "$4"; do
-+ if test "`dirname $$1`" = "$dir"; then
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ break
-+ fi
-+ done
-+ IFS="$as_save_IFS"
-+ fi
-+ ])
-+ if test -z "$$1"; then
-+ AC_MSG_WARN([$2 not found, some optional functionalities will be missing])
-+ fi
-+ ])
-+ if test -z "$$1"; then
-+ $1=$2
-+ fi
-+ AC_SUBST($1)
-+])
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt_0.65.bb b/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt_0.65.bb
index 12859f0..5bf818d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt_0.65.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt_0.65.bb
@@ -1,6 +1,8 @@
require quilt.inc
inherit gettext
+
+SRC_URI += "file://gnu_patch_test_fix_target.patch"
+
+EXTRA_AUTORECONF += "--exclude=aclocal"
+
RDEPENDS_${PN} += "patch diffstat bzip2 util-linux"
-SRC_URI += "file://aclocal.patch \
- file://gnu_patch_test_fix_target.patch \
- "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch
deleted file mode 100644
index b809332..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 36cf0ff26ece53e529e8b4f2d2f09acd8794b055 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 24 Mar 2017 15:35:47 +0200
-Subject: [PATCH] Add PYTHON_ABI when searching for python libraries.
-
-It has a value of 'm' when using Python3, and so without it
-configure will not find the libraries.
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 9c58467c1..a506ec819 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -642,7 +642,7 @@ AS_IF([test "$enable_python" = yes],[
- ])
- CPPFLAGS="$save_CPPFLAGS"
- save_LIBS="$LIBS"
-- AC_SEARCH_LIBS([Py_Main],[python${PYTHON_VERSION} python],[
-+ AC_SEARCH_LIBS([Py_Main],[python${PYTHON_VERSION}${PYTHON_ABI} python],[
- WITH_PYTHON_LIB="$ac_res"
- ],[AC_MSG_ERROR([missing python library])
- ])
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
index 1f61aca..5604cb9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
@@ -1,10 +1,10 @@
-From d82691b8d58201dd03e30585daacd8ffd1556ae2 Mon Sep 17 00:00:00 2001
+From c82c19dc583843b1a975f2e3f2e151656a6f377c Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 27 Feb 2017 09:43:30 +0200
-Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
+Subject: [PATCH 06/14] Do not hardcode "lib/rpm" as the installation path for
default configuration and macros.
-Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/263]
+Upstream-Status: Denied [https://github.com/rpm-software-management/rpm/pull/263]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
@@ -14,10 +14,10 @@
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 4f3be8770..92ffd3d68 100644
+index 7155d9f00..21b95ae5f 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -875,7 +875,7 @@ else
+@@ -1047,7 +1047,7 @@ else
usrprefix=$prefix
fi
@@ -27,10 +27,10 @@
AC_SUBST(OBJDUMP)
diff --git a/macros.in b/macros.in
-index c6d5a6b03..84ae25275 100644
+index d08624856..68a972f1e 100644
--- a/macros.in
+++ b/macros.in
-@@ -877,7 +877,7 @@ package or when debugging this package.\
+@@ -954,7 +954,7 @@ package or when debugging this package.\
%_sharedstatedir %{_prefix}/com
%_localstatedir %{_prefix}/var
%_lib lib
@@ -40,7 +40,7 @@
%_infodir %{_datadir}/info
%_mandir %{_datadir}/man
diff --git a/rpm.am b/rpm.am
-index 1f43ad8a0..6854ff6ba 100644
+index 51225892d..e0c834d37 100644
--- a/rpm.am
+++ b/rpm.am
@@ -1,10 +1,10 @@
@@ -55,7 +55,7 @@
+rpmconfigdir = $(libdir)/rpm
# Libtool version (current-revision-age) for all our libraries
- rpm_version_info = 7:0:0
+ rpm_version_info = 8:1:0
--
-2.11.0
+2.15.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
index a38675f..bf24d43 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
@@ -6,6 +6,9 @@
We add lots of native stuff into it and scriptlets rely on that.
+Also need to remove the xx test later in the function since the
+value could now be used un-initialised.
+
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
@@ -25,6 +28,13 @@
free(ipath);
}
---
-2.11.0
-
+@@ -206,9 +206,7 @@ static void doScriptExec(ARGV_const_t ar
+ /* XXX Don't mtrace into children. */
+ unsetenv("MALLOC_CHECK_");
+
+- if (xx == 0) {
+ xx = execv(argv[0], argv);
+- }
+ }
+ _exit(127); /* exit 127 for compatibility with bash(1) */
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch
new file mode 100644
index 0000000..6f440c6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch
@@ -0,0 +1,148 @@
+From 9c3e5de3240554c8ea1b29d52eeadee4840fefac Mon Sep 17 00:00:00 2001
+From: Kir Kolyshkin <kolyshkin@gmail.com>
+Date: Tue, 29 May 2018 17:37:05 -0700
+Subject: [PATCH 1/3] Factor out and unify setting CLOEXEC
+
+Commit 7a7c31f5 ("Set FD_CLOEXEC on opened files before exec from
+lua script is called") copied the code that sets CLOEXEC flag on all
+possible file descriptors from lib/rpmscript.c to luaext/lposix.c,
+essentially creating two copies of the same code (modulo comments
+and the unused assignment).
+
+This commit moves the functionality into its own function, without
+any code modifications, using the version from luaext/lposix.c.
+
+Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
+Upstream-Status: Accepted [https://github.com/rpm-software-management/rpm/pull/444]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ lib/rpmscript.c | 18 ++----------------
+ luaext/lposix.c | 13 ++-----------
+ rpmio/rpmio.c | 16 ++++++++++++++++
+ rpmio/rpmio_internal.h | 6 ++++++
+ 4 files changed, 26 insertions(+), 27 deletions(-)
+
+diff --git a/lib/rpmscript.c b/lib/rpmscript.c
+index 747385a5b..b4ccd3246 100644
+--- a/lib/rpmscript.c
++++ b/lib/rpmscript.c
+@@ -3,7 +3,6 @@
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <errno.h>
+-#include <unistd.h>
+
+ #include <rpm/rpmfileutil.h>
+ #include <rpm/rpmmacro.h>
+@@ -14,6 +13,7 @@
+
+ #include "rpmio/rpmlua.h"
+ #include "lib/rpmscript.h"
++#include "rpmio/rpmio_internal.h"
+
+ #include "lib/rpmplugins.h" /* rpm plugins hooks */
+
+@@ -170,26 +170,12 @@ static const char * const SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr
+ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes,
+ FD_t scriptFd, FD_t out)
+ {
+- int flag;
+- int fdno;
+ int xx;
+- int open_max;
+
+ /* SIGPIPE is ignored in rpm, reset to default for the scriptlet */
+ (void) signal(SIGPIPE, SIG_DFL);
+
+- /* XXX Force FD_CLOEXEC on all inherited fdno's. */
+- open_max = sysconf(_SC_OPEN_MAX);
+- if (open_max == -1) {
+- open_max = 1024;
+- }
+- for (fdno = 3; fdno < open_max; fdno++) {
+- flag = fcntl(fdno, F_GETFD);
+- if (flag == -1 || (flag & FD_CLOEXEC))
+- continue;
+- xx = fcntl(fdno, F_SETFD, FD_CLOEXEC);
+- /* XXX W2DO? debug msg for inheirited fdno w/o FD_CLOEXEC */
+- }
++ rpmSetCloseOnExec();
+
+ if (scriptFd != NULL) {
+ int sfdno = Fileno(scriptFd);
+diff --git a/luaext/lposix.c b/luaext/lposix.c
+index 0a7c26c71..5d7ad3c87 100644
+--- a/luaext/lposix.c
++++ b/luaext/lposix.c
+@@ -27,6 +27,7 @@
+ #include <unistd.h>
+ #include <utime.h>
+ #include <rpm/rpmutil.h>
++#include "rpmio/rpmio_internal.h"
+
+ #define MYNAME "posix"
+ #define MYVERSION MYNAME " library for " LUA_VERSION " / Nov 2003"
+@@ -335,21 +336,11 @@ static int Pexec(lua_State *L) /** exec(path,[args]) */
+ const char *path = luaL_checkstring(L, 1);
+ int i,n=lua_gettop(L);
+ char **argv;
+- int flag, fdno, open_max;
+
+ if (!have_forked)
+ return luaL_error(L, "exec not permitted in this context");
+
+- open_max = sysconf(_SC_OPEN_MAX);
+- if (open_max == -1) {
+- open_max = 1024;
+- }
+- for (fdno = 3; fdno < open_max; fdno++) {
+- flag = fcntl(fdno, F_GETFD);
+- if (flag == -1 || (flag & FD_CLOEXEC))
+- continue;
+- fcntl(fdno, F_SETFD, FD_CLOEXEC);
+- }
++ rpmSetCloseOnExec();
+
+ argv = malloc((n+1)*sizeof(char*));
+ if (argv==NULL) return luaL_error(L,"not enough memory");
+diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
+index c7cbc32aa..ea111d2ec 100644
+--- a/rpmio/rpmio.c
++++ b/rpmio/rpmio.c
+@@ -1759,3 +1759,19 @@ DIGEST_CTX fdDupDigest(FD_t fd, int id)
+
+ return ctx;
+ }
++
++void rpmSetCloseOnExec(void)
++{
++ int flag, fdno, open_max;
++
++ open_max = sysconf(_SC_OPEN_MAX);
++ if (open_max == -1) {
++ open_max = 1024;
++ }
++ for (fdno = 3; fdno < open_max; fdno++) {
++ flag = fcntl(fdno, F_GETFD);
++ if (flag == -1 || (flag & FD_CLOEXEC))
++ continue;
++ fcntl(fdno, F_SETFD, FD_CLOEXEC);
++ }
++}
+diff --git a/rpmio/rpmio_internal.h b/rpmio/rpmio_internal.h
+index fbed183b0..370cbdc75 100644
+--- a/rpmio/rpmio_internal.h
++++ b/rpmio/rpmio_internal.h
+@@ -41,6 +41,12 @@ DIGEST_CTX fdDupDigest(FD_t fd, int id);
+ int rpmioSlurp(const char * fn,
+ uint8_t ** bp, ssize_t * blenp);
+
++/**
++ * Set close-on-exec flag for all opened file descriptors, except
++ * stdin/stdout/stderr.
++ */
++void rpmSetCloseOnExec(void);
++
+ #ifdef __cplusplus
+ }
+ #endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
index edf9ec0..0b1d629 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
@@ -1,24 +1,21 @@
-From 211c2d11200e6657132c52e7ac68f8c118231262 Mon Sep 17 00:00:00 2001
+From d076de030deb9cafd9b2e82be5d506cebdefad0b Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 27 Feb 2017 14:43:21 +0200
-Subject: [PATCH] Fix build with musl C library.
+Subject: [PATCH 1/9] Fix build with musl C library.
-Upstream-Status: Inappropriate [problem already solved in master branch]
+Upstream-Status: Pending
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
- configure.ac | 3 ++-
- misc/Makefile.am | 3 +--
- misc/rpmxprogname.c | 3 +--
- 3 files changed, 4 insertions(+), 5 deletions(-)
+ configure.ac | 3 ++-
+ rpmio/digest_nss.c | 1 +
+ 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
-index 92ffd3d68..9c58467c1 100644
+index c04a2e8d1..c9d9ac16d 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -229,6 +229,7 @@ AC_SEARCH_LIBS(dlopen, [dl])
+@@ -255,6 +255,7 @@ AC_SEARCH_LIBS(dlopen, [dl])
# Check for libelf library. Prefer external, otherwise none.
WITH_LIBELF_LIB=
AC_CHECK_HEADER([libelf.h])
@@ -26,7 +23,7 @@
AC_CHECK_HEADERS([gelf.h], [
AC_CHECK_LIB(elf, gelf_getvernaux, [
AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).])
-@@ -237,7 +238,7 @@ AC_CHECK_HEADERS([gelf.h], [
+@@ -263,7 +264,7 @@ AC_CHECK_HEADERS([gelf.h], [
])
])
AC_SUBST(WITH_LIBELF_LIB)
@@ -35,40 +32,17 @@
AC_CHECK_HEADERS([dwarf.h], [
WITH_LIBDWARF=yes
-diff --git a/misc/Makefile.am b/misc/Makefile.am
-index 8bf0093d9..b9db3d31a 100644
---- a/misc/Makefile.am
-+++ b/misc/Makefile.am
-@@ -5,10 +5,9 @@ AM_CPPFLAGS += -I$(top_srcdir)/misc
+diff --git a/rpmio/digest_nss.c b/rpmio/digest_nss.c
+index 992d9acf6..e11920e3e 100644
+--- a/rpmio/digest_nss.c
++++ b/rpmio/digest_nss.c
+@@ -1,5 +1,6 @@
+ #include "system.h"
- EXTRA_DIST = \
- fnmatch.c fnmatch.h \
-- rpmxprogname.c rpmxprogname.h \
- stpcpy.c stpncpy.c
-
- noinst_LTLIBRARIES = libmisc.la
-
--libmisc_la_SOURCES = fts.c fts.h
-+libmisc_la_SOURCES = fts.c fts.h rpmxprogname.c rpmxprogname.h
- libmisc_la_LIBADD = @LTLIBOBJS@
-diff --git a/misc/rpmxprogname.c b/misc/rpmxprogname.c
-index f89600613..e94625ea8 100644
---- a/misc/rpmxprogname.c
-+++ b/misc/rpmxprogname.c
-@@ -13,7 +13,7 @@ char *_rpmxgetprogname(void)
- {
- const char *empty = "";
-
-- if (_rpmxprognam != NULL) /* never return NULL string */
-+ if (_rpmxprogname != NULL) /* never return NULL string */
- return _rpmxprogname;
- else
- return empty;
-@@ -30,4 +30,3 @@ void _rpmxsetprogname(const char *pn)
- }
- }
-
--#endif /* _RPMXPROGNAME_H */
++#include <signal.h>
+ #include <pthread.h>
+ #include <nss.h>
+ #include <sechash.h>
--
-2.11.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch
deleted file mode 100644
index 9648cac..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From d42ece6fa15b98d7f9221b90b85b78631df2c0a0 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 14 Feb 2017 13:51:19 +0200
-Subject: [PATCH] When nice value cannot be reset, issue a notice instead of a
- warning
-
-Otherwise build logs on the autobuilder get very clutter, as it
-doesn't allow the nice value to be reset for some reason.
-
-Upstream-Status: Inappropriate [oe specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- lib/rpmscript.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/rpmscript.c b/lib/rpmscript.c
-index 5e1e99906..3975aead8 100644
---- a/lib/rpmscript.c
-+++ b/lib/rpmscript.c
-@@ -347,7 +347,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
- int ret;
- ret = setpriority(PRIO_PROCESS, 0, 0);
- if (ret == -1) {
-- rpmlog(RPMLOG_WARNING, _("Unable to reset nice value: %s"),
-+ rpmlog(RPMLOG_NOTICE, _("Unable to reset nice value: %s\n"),
- strerror(errno));
- }
-
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-configure.ac-add-option-for-dbus.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-configure.ac-add-option-for-dbus.patch
new file mode 100644
index 0000000..dc71d9b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-configure.ac-add-option-for-dbus.patch
@@ -0,0 +1,42 @@
+From dfb422c744fdc1838afc40b8e1f161bb46093d92 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Sun, 8 Apr 2018 12:06:42 +0800
+Subject: [PATCH] configure.ac: add option for dbus
+
+Add option for dbus so that users could choose to build with dbus
+or with no dbus.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ configure.ac | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4db15c7909..493f393d31 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -976,12 +976,15 @@ AS_IF([test "$enable_plugins" = yes],[
+ ])
+ AM_CONDITIONAL(ENABLE_PLUGINS,[test "$enable_plugins" = yes])
+
+-with_dbus=no
+-AS_IF([test "$enable_plugins" != no],[
++AC_ARG_WITH([dbus], [AS_HELP_STRING([--with-dbus], [build with dbus support])],
++ [],
++ [with_dbus=yes])
++
++AS_IF([test "$with_dbus" != no],[
+ PKG_CHECK_MODULES([DBUS],
+ [dbus-1 >= 1.3],
+- [AC_DEFINE(DBUS, 1, [Build with dbus support?]) with_dbus=yes],
+- [with_dbus=no])
++ [AC_DEFINE(DBUS, 1, [Build with dbus support?])],
++ [AC_MSG_ERROR([dbus not present (--without-dbus to disable)])])
+ AC_SUBST(DBUS_CFLAGS)
+ AC_SUBST(DBUS_LIBS)
+ ])
+--
+2.11.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch
new file mode 100644
index 0000000..a27f8e6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch
@@ -0,0 +1,100 @@
+From 5e6f05cd8dad6c1ee6bd1e6e43f176976c9c3416 Mon Sep 17 00:00:00 2001
+From: Kir Kolyshkin <kolyshkin@gmail.com>
+Date: Tue, 29 May 2018 17:52:56 -0700
+Subject: [PATCH 2/3] Optimize rpmSetCloseOnExec
+
+In case maximum number of open files limit is set too high, both
+luaext/Pexec() and lib/doScriptExec() spend way too much time
+trying to set FD_CLOEXEC flag for all those file descriptors,
+resulting in severe increase of time it takes to execute say
+rpm or dnf.
+
+This becomes increasingly noticeable when running with e.g. under
+Docker, the reason being:
+
+> $ docker run fedora ulimit -n
+> 1048576
+
+One obvious fix is to use procfs to get the actual list of opened fds
+and iterate over it. My quick-n-dirty benchmark shows the /proc approach
+is about 10x faster than iterating through a list of just 1024 fds,
+so it's an improvement even for default ulimit values.
+
+Note that the old method is still used in case /proc is not available.
+
+While at it,
+
+ 1. fix the function by making sure we modify (rather than set)
+ the existing flags. As the only known flag is FD_CLOEXEC,
+ this change is currently purely aesthetical, but in case
+ other flags will appear it will become a real bug fix.
+
+ 2. get rid of magic number 3; use STDERR_FILENO
+
+Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
+
+Fixes #444
+
+Upstream-Status: Accepted [https://github.com/rpm-software-management/rpm/pull/444]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ rpmio/rpmio.c | 43 ++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 34 insertions(+), 9 deletions(-)
+
+diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
+index ea111d2ec..55351c221 100644
+--- a/rpmio/rpmio.c
++++ b/rpmio/rpmio.c
+@@ -1760,18 +1760,43 @@ DIGEST_CTX fdDupDigest(FD_t fd, int id)
+ return ctx;
+ }
+
++static void set_cloexec(int fd)
++{
++ int flags = fcntl(fd, F_GETFD);
++
++ if (flags == -1 || (flags & FD_CLOEXEC))
++ return;
++
++ fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
++}
++
+ void rpmSetCloseOnExec(void)
+ {
+- int flag, fdno, open_max;
++ const int min_fd = STDERR_FILENO; /* don't touch stdin/out/err */
++ int fd;
++
++ DIR *dir = opendir("/proc/self/fd");
++ if (dir == NULL) { /* /proc not available */
++ /* iterate over all possible fds, might be slow */
++ int open_max = sysconf(_SC_OPEN_MAX);
++ if (open_max == -1)
++ open_max = 1024;
+
+- open_max = sysconf(_SC_OPEN_MAX);
+- if (open_max == -1) {
+- open_max = 1024;
++ for (fd = min_fd + 1; fd < open_max; fd++)
++ set_cloexec(fd);
++
++ return;
+ }
+- for (fdno = 3; fdno < open_max; fdno++) {
+- flag = fcntl(fdno, F_GETFD);
+- if (flag == -1 || (flag & FD_CLOEXEC))
+- continue;
+- fcntl(fdno, F_SETFD, FD_CLOEXEC);
++
++ /* iterate over fds obtained from /proc */
++ struct dirent *entry;
++ while ((entry = readdir(dir)) != NULL) {
++ fd = atoi(entry->d_name);
++ if (fd > min_fd)
++ set_cloexec(fd);
+ }
++
++ closedir(dir);
++
++ return;
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0003-rpmSetCloseOnExec-use-getrlimit.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0003-rpmSetCloseOnExec-use-getrlimit.patch
new file mode 100644
index 0000000..389b41b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0003-rpmSetCloseOnExec-use-getrlimit.patch
@@ -0,0 +1,53 @@
+From 307e28b4cb08b05bc044482058eeebc9f59bb9a9 Mon Sep 17 00:00:00 2001
+From: Kir Kolyshkin <kolyshkin@gmail.com>
+Date: Tue, 29 May 2018 18:09:27 -0700
+Subject: [PATCH 3/3] rpmSetCloseOnExec: use getrlimit()
+
+In case /proc is not available to get the actual list of opened fds,
+we fall back to iterating through the list of all possible fds.
+
+It is possible that during the course of the program execution the limit
+on number of open file descriptors might be lowered, so using the
+current limit, as returned by sysconf(_SC_OPEN_MAX), might omit some
+fds. Therefore, it is better to use rlim_max from the structure
+filled in by gertlimit(RLIMIT_NOFILE) to make sure we're checking
+all fds.
+
+This slows down the function, but only in the case /proc is not
+available, which should be rare in practice.
+
+Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
+Upstream-Status: Accepted [https://github.com/rpm-software-management/rpm/pull/444]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ rpmio/rpmio.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
+index 55351c221..e051c9863 100644
+--- a/rpmio/rpmio.c
++++ b/rpmio/rpmio.c
+@@ -10,6 +10,7 @@
+ #include <sys/personality.h>
+ #endif
+ #include <sys/utsname.h>
++#include <sys/resource.h>
+
+ #include <rpm/rpmlog.h>
+ #include <rpm/rpmmacro.h>
+@@ -1778,7 +1779,14 @@ void rpmSetCloseOnExec(void)
+ DIR *dir = opendir("/proc/self/fd");
+ if (dir == NULL) { /* /proc not available */
+ /* iterate over all possible fds, might be slow */
+- int open_max = sysconf(_SC_OPEN_MAX);
++ struct rlimit rl;
++ int open_max;
++
++ if (getrlimit(RLIMIT_NOFILE, &rl) == 0 && rl.rlim_max != RLIM_INFINITY)
++ open_max = rl.rlim_max;
++ else
++ open_max = sysconf(_SC_OPEN_MAX);
++
+ if (open_max == -1)
+ open_max = 1024;
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
index 64a5651..8989dce 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
@@ -1,7 +1,7 @@
-From ec305795a302d226343e69031ff2024dfcde69c0 Mon Sep 17 00:00:00 2001
+From 8ce9fbab2990609bdace457e146160334e931c89 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 8 Jun 2017 17:08:09 +0300
-Subject: [PATCH 3/3] build/pack.c: remove static local variables from
+Subject: [PATCH 14/15] build/pack.c: remove static local variables from
buildHost() and getBuildTime()
Their use is causing difficult to diagnoze data races when building multiple
@@ -11,8 +11,8 @@
Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
build/build.c | 54 ++++++++++++++++++++++++++++--
build/pack.c | 84 +++++++++--------------------------------------
@@ -20,7 +20,7 @@
3 files changed, 74 insertions(+), 72 deletions(-)
diff --git a/build/build.c b/build/build.c
-index 5f99c8db7..09a1311c5 100644
+index 81152e53e..6001f9e52 100644
--- a/build/build.c
+++ b/build/build.c
@@ -6,6 +6,8 @@
@@ -83,7 +83,7 @@
/**
*/
static rpmRC doRmSource(rpmSpec spec)
-@@ -203,6 +249,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
+@@ -201,6 +247,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
rpmRC rc = RPMRC_OK;
int test = (what & RPMBUILD_NOBUILD);
char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) : NULL;
@@ -93,7 +93,7 @@
if (rpmExpandNumeric("%{?source_date_epoch_from_changelog}") &&
getenv("SOURCE_DATE_EPOCH") == NULL) {
-@@ -271,11 +320,11 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
+@@ -269,11 +318,11 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
goto exit;
if (((what & RPMBUILD_PACKAGESOURCE) && !test) &&
@@ -107,7 +107,7 @@
goto exit;
if ((what & RPMBUILD_CLEAN) &&
-@@ -295,6 +344,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
+@@ -293,6 +342,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
(void) unlink(spec->specFile);
exit:
@@ -116,7 +116,7 @@
spec->rootDir = NULL;
if (rc != RPMRC_OK && rpmlogGetNrecs() > 0) {
diff --git a/build/pack.c b/build/pack.c
-index ed5b9ab4e..62427065a 100644
+index df15876ff..17a4b0905 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -6,8 +6,6 @@
@@ -128,7 +128,7 @@
#include <sys/wait.h>
#include <rpm/rpmlib.h> /* RPMSIGTAG*, rpmReadPackageFile */
-@@ -151,57 +149,6 @@ exit:
+@@ -152,57 +150,6 @@ exit:
return rc;
}
@@ -186,9 +186,9 @@
static rpmRC processScriptFiles(rpmSpec spec, Package pkg)
{
struct TriggerFileEntry *p;
-@@ -308,7 +255,8 @@ static int haveRichDep(Package pkg)
- }
-
+@@ -476,7 +423,8 @@ exit:
+ * order to how the RPM format is laid on disk.
+ */
static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
- const char *fileName, char **cookie)
+ const char *fileName, char **cookie,
@@ -196,7 +196,7 @@
{
FD_t fd = NULL;
char * rpmio_flags = NULL;
-@@ -397,7 +345,7 @@ static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
+@@ -500,7 +448,7 @@ static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
/* Create and add the cookie */
if (cookie) {
@@ -204,8 +204,8 @@
+ rasprintf(cookie, "%s %d", buildHost, buildTime);
headerPutString(pkg->header, RPMTAG_COOKIE, *cookie);
}
-
-@@ -546,7 +494,7 @@ static rpmRC checkPackages(char *pkgcheck)
+
+@@ -641,7 +589,7 @@ static rpmRC checkPackages(char *pkgcheck)
return RPMRC_OK;
}
@@ -214,7 +214,7 @@
{
const char *errorString;
rpmRC rc = RPMRC_OK;
-@@ -565,8 +513,8 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
+@@ -660,8 +608,8 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
headerCopyTags(spec->packages->header, pkg->header, copyTags);
headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION);
@@ -225,7 +225,7 @@
if (spec->sourcePkgId != NULL) {
headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
-@@ -604,7 +552,7 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
+@@ -699,7 +647,7 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
free(binRpm);
}
@@ -234,7 +234,7 @@
if (rc == RPMRC_OK) {
/* Do check each written package if enabled */
char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL);
-@@ -624,7 +572,7 @@ struct binaryPackageTaskData
+@@ -719,7 +667,7 @@ struct binaryPackageTaskData
struct binaryPackageTaskData *next;
};
@@ -243,7 +243,7 @@
{
struct binaryPackageTaskData *tasks = NULL;
struct binaryPackageTaskData *task = NULL;
-@@ -636,7 +584,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
+@@ -731,7 +679,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
if (pkg == spec->packages) {
// the first package needs to be processed ahead of others, as they copy
// changelog data from it, and so otherwise data races would happen
@@ -252,7 +252,7 @@
rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
tasks = task;
}
-@@ -653,7 +601,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
+@@ -748,7 +696,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
if (task != tasks)
#pragma omp task
{
@@ -261,7 +261,7 @@
rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
}
}
-@@ -671,11 +619,11 @@ static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
+@@ -766,11 +714,11 @@ static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
}
}
@@ -275,7 +275,7 @@
for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
if (task->result == RPMRC_OK) {
-@@ -702,22 +650,22 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
+@@ -797,7 +745,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
return RPMRC_OK;
}
@@ -284,6 +284,7 @@
{
Package sourcePkg = spec->sourcePackage;
rpmRC rc;
+@@ -805,8 +753,8 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
/* Add some cruft */
headerPutString(sourcePkg->header, RPMTAG_RPMVERSION, VERSION);
@@ -291,9 +292,10 @@
- headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1);
+ headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost);
+ headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
+ headerPutUint32(sourcePkg->header, RPMTAG_SOURCEPACKAGE, &one, 1);
/* XXX this should be %_srpmdir */
- { char *fn = rpmGetPath("%{_srcrpmdir}/", spec->sourceRpmName,NULL);
+@@ -814,7 +762,7 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
char *pkgcheck = rpmExpand("%{?_build_pkgcheck_srpm} ", fn, NULL);
spec->sourcePkgId = NULL;
@@ -303,10 +305,10 @@
/* Do check SRPM package if enabled */
if (rc == RPMRC_OK && pkgcheck[0] != ' ') {
diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
-index 8351a6a34..797337ca7 100644
+index 439b7d3b5..07e8338ad 100644
--- a/build/rpmbuild_internal.h
+++ b/build/rpmbuild_internal.h
-@@ -408,19 +408,23 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags);
+@@ -427,19 +427,23 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags);
* @param spec spec file control structure
* @param cookie build identifier "cookie" or NULL
* @param cheating was build shortcircuited?
@@ -333,5 +335,5 @@
RPM_GNUC_INTERNAL
int addLangTag(rpmSpec spec, Header h, rpmTagVal tag,
--
-2.11.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
index c910a47..4ac5c38 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
@@ -1,7 +1,7 @@
-From d65d6e8760afbd7f70b22a1f3297a037bc475fea Mon Sep 17 00:00:00 2001
+From 5141d50d7b3d3c209a22c53deedb4ceef014401d Mon Sep 17 00:00:00 2001
From: Peter Kjellerstedt <pkj@axis.com>
Date: Mon, 15 May 2017 10:21:08 +0200
-Subject: [PATCH 11/13] Do not require that ELF binaries are executable to be
+Subject: [PATCH 09/15] Do not require that ELF binaries are executable to be
identifiable
There is nothing that requires, e.g., a DSO to be executable, but it
@@ -14,19 +14,20 @@
Upstream-Status: Inappropriate
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+
---
fileattrs/elf.attr | 1 -
1 file changed, 1 deletion(-)
diff --git a/fileattrs/elf.attr b/fileattrs/elf.attr
-index 595b33e09..bac52649d 100644
+index 5805dd0ee..3516f309d 100644
--- a/fileattrs/elf.attr
+++ b/fileattrs/elf.attr
@@ -1,4 +1,3 @@
%__elf_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
%__elf_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
- %__elf_magic ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*$
+ %__elf_magic ^(setuid,? )?(setgid,? )?(sticky )?ELF (32|64)-bit.*$
-%__elf_flags exeonly
--
-2.12.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0012-Use-conditional-to-access-_docdir-in-macros.in.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0012-Use-conditional-to-access-_docdir-in-macros.in.patch
deleted file mode 100644
index 996da90..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0012-Use-conditional-to-access-_docdir-in-macros.in.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 77808db4036dc4a012c47aca36255549ed764a6a Mon Sep 17 00:00:00 2001
-From: Peter Kjellerstedt <pkj@axis.com>
-Date: Tue, 16 May 2017 10:58:18 +0200
-Subject: [PATCH 12/13] Use conditional to access %{_docdir} in macros.in
-
-This avoids the following warning:
-
-warning: Ignoring invalid regex %{_docdir}
-
-when runing `rpmdeps -R <file>`, since %{_docdir} is only defined when
-parsing a spec file (in parseSpec()).
-
-Upstream-Status: Accepted [https://github.com/rpm-software-management/rpm/pull/216]
-Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
----
- macros.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/macros.in b/macros.in
-index 84ae25275..cca67a500 100644
---- a/macros.in
-+++ b/macros.in
-@@ -200,8 +200,8 @@ package or when debugging this package.\
- # Their purpouse is to set up global filtering for all packages. If you need
- # to set up specific filtering for your package use %__requires_exclude_from
- # and %__provides_exclude_from instead.
--%__global_requires_exclude_from %{_docdir}
--%__global_provides_exclude_from %{_docdir}
-+%__global_requires_exclude_from %{?_docdir:%{_docdir}}
-+%__global_provides_exclude_from %{?_docdir:%{_docdir}}
-
- # The path to the gzip executable (legacy, use %{__gzip} instead).
- %_gzipbin %{__gzip}
---
-2.12.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0013-Add-a-new-option-alldeps-to-rpmdeps.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0013-Add-a-new-option-alldeps-to-rpmdeps.patch
deleted file mode 100644
index faaf629..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0013-Add-a-new-option-alldeps-to-rpmdeps.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-From 3bf20a6116ae3e1a5a3a6907bee7e881b17efb2f Mon Sep 17 00:00:00 2001
-From: Peter Kjellerstedt <pkj@axis.com>
-Date: Mon, 15 May 2017 11:23:26 +0200
-Subject: [PATCH 13/13] Add a new option --alldeps to rpmdeps
-
-This will send the output from rpmfcPrint() to stdout. This is an
-alternative to using the --rpmfcdebug option, which will send the same
-output to stderr. The two options have totally different use cases
-though. While --alldeps is used when the output from rpmfcPrint() is
-what is wanted, --rpmfcdebug can be used together with the other
-output options, e.g., --requires, without affecting their output.
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/220]
-Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
----
- build/rpmfc.c | 27 ++++++++++++++-------------
- build/rpmfc.h | 1 -
- tools/rpmdeps.c | 44 +++++++++++++++++++++++++-------------------
- 3 files changed, 39 insertions(+), 33 deletions(-)
-
-diff --git a/build/rpmfc.c b/build/rpmfc.c
-index c8e2f876a..44f1cdc9a 100644
---- a/build/rpmfc.c
-+++ b/build/rpmfc.c
-@@ -732,7 +732,6 @@ static rpm_color_t rpmfcColor(const char * fmstr)
-
- void rpmfcPrint(const char * msg, rpmfc fc, FILE * fp)
- {
-- rpm_color_t fcolor;
- int ndx;
- int dx;
- int fx;
-@@ -744,21 +743,23 @@ void rpmfcPrint(const char * msg, rpmfc fc, FILE * fp)
-
- if (fc)
- for (fx = 0; fx < fc->nfiles; fx++) {
-- rpmsid cx = fc->fcdictx[fx] + 1; /* id's are one off */
-- fcolor = fc->fcolor[fx];
-- ARGV_t fattrs = fc->fattrs[fx];
--
- fprintf(fp, "%3d %s", fx, fc->fn[fx]);
-- if (fcolor != RPMFC_BLACK)
-+ if (_rpmfc_debug) {
-+ rpmsid cx = fc->fcdictx[fx] + 1; /* id's are one off */
-+ rpm_color_t fcolor = fc->fcolor[fx];
-+ ARGV_t fattrs = fc->fattrs[fx];
-+
-+ if (fcolor != RPMFC_BLACK)
- fprintf(fp, "\t0x%x", fc->fcolor[fx]);
-- else
-+ else
- fprintf(fp, "\t%s", rpmstrPoolStr(fc->cdict, cx));
-- if (fattrs) {
-- char *attrs = argvJoin(fattrs, ",");
-- fprintf(fp, " [%s]", attrs);
-- free(attrs);
-- } else {
-- fprintf(fp, " [none]");
-+ if (fattrs) {
-+ char *attrs = argvJoin(fattrs, ",");
-+ fprintf(fp, " [%s]", attrs);
-+ free(attrs);
-+ } else {
-+ fprintf(fp, " [none]");
-+ }
- }
- fprintf(fp, "\n");
-
-diff --git a/build/rpmfc.h b/build/rpmfc.h
-index dae8ea5b1..3d87b31cf 100644
---- a/build/rpmfc.h
-+++ b/build/rpmfc.h
-@@ -45,7 +45,6 @@ typedef const struct rpmfcTokens_s * rpmfcToken;
-
- /** \ingroup rpmfc
- * Print results of file classification.
-- * @todo Remove debugging routine.
- * @param msg message prefix (NULL for none)
- * @param fc file classifier
- * @param fp output file handle (NULL for stderr)
-diff --git a/tools/rpmdeps.c b/tools/rpmdeps.c
-index a414b6343..f260a38c4 100644
---- a/tools/rpmdeps.c
-+++ b/tools/rpmdeps.c
-@@ -23,6 +23,8 @@ static int print_conflicts;
-
- static int print_obsoletes;
-
-+static int print_alldeps;
-+
- static void rpmdsPrint(const char * msg, rpmds ds, FILE * fp)
- {
- if (fp == NULL) fp = stderr;
-@@ -57,6 +59,8 @@ static struct poptOption optionsTable[] = {
- NULL, NULL },
- { "obsoletes", '\0', POPT_ARG_VAL, &print_obsoletes, -1,
- NULL, NULL },
-+ { "alldeps", '\0', POPT_ARG_VAL, &print_alldeps, -1,
-+ NULL, NULL },
-
- POPT_AUTOALIAS
- POPT_AUTOHELP
-@@ -100,25 +104,27 @@ main(int argc, char *argv[])
- if (rpmfcClassify(fc, av, NULL) || rpmfcApply(fc))
- goto exit;
-
-- if (_rpmfc_debug)
-- rpmfcPrint(buf, fc, NULL);
--
-- if (print_provides)
-- rpmdsPrint(NULL, rpmfcProvides(fc), stdout);
-- if (print_requires)
-- rpmdsPrint(NULL, rpmfcRequires(fc), stdout);
-- if (print_recommends)
-- rpmdsPrint(NULL, rpmfcRecommends(fc), stdout);
-- if (print_suggests)
-- rpmdsPrint(NULL, rpmfcSuggests(fc), stdout);
-- if (print_supplements)
-- rpmdsPrint(NULL, rpmfcSupplements(fc), stdout);
-- if (print_enhances)
-- rpmdsPrint(NULL, rpmfcEnhances(fc), stdout);
-- if (print_conflicts)
-- rpmdsPrint(NULL, rpmfcConflicts(fc), stdout);
-- if (print_obsoletes)
-- rpmdsPrint(NULL, rpmfcObsoletes(fc), stdout);
-+ if (print_alldeps || _rpmfc_debug)
-+ rpmfcPrint(NULL, fc, print_alldeps ? stdout : NULL);
-+
-+ if (!print_alldeps) {
-+ if (print_provides)
-+ rpmdsPrint(NULL, rpmfcProvides(fc), stdout);
-+ if (print_requires)
-+ rpmdsPrint(NULL, rpmfcRequires(fc), stdout);
-+ if (print_recommends)
-+ rpmdsPrint(NULL, rpmfcRecommends(fc), stdout);
-+ if (print_suggests)
-+ rpmdsPrint(NULL, rpmfcSuggests(fc), stdout);
-+ if (print_supplements)
-+ rpmdsPrint(NULL, rpmfcSupplements(fc), stdout);
-+ if (print_enhances)
-+ rpmdsPrint(NULL, rpmfcEnhances(fc), stdout);
-+ if (print_conflicts)
-+ rpmdsPrint(NULL, rpmfcConflicts(fc), stdout);
-+ if (print_obsoletes)
-+ rpmdsPrint(NULL, rpmfcObsoletes(fc), stdout);
-+ }
-
- ec = 0;
-
---
-2.12.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_4.14.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_4.14.1.bb
new file mode 100644
index 0000000..6012922
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_4.14.1.bb
@@ -0,0 +1,138 @@
+SUMMARY = "The RPM package management system"
+DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
+package management system capable of installing, uninstalling, \
+verifying, querying, and updating software packages. Each software \
+package consists of an archive of files along with information about \
+the package like its version, a description, etc."
+
+SUMMARY_${PN}-dev = "Development files for manipulating RPM packages"
+DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
+development files will simplify the process of writing programs that \
+manipulate RPM packages and databases. These files are intended to \
+simplify the process of creating graphical package managers or any \
+other tools that need an intimate knowledge of RPM packages in order \
+to function."
+
+SUMMARY_python3-rpm = "Python bindings for apps which will manupulate RPM packages"
+DESCRIPTION_python3-rpm = "The python3-rpm package contains a module that permits applications \
+written in the Python programming language to use the interface \
+supplied by the RPM Package Manager libraries."
+
+HOMEPAGE = "http://www.rpm.org"
+
+# libraries are also LGPL - how to express this?
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a"
+
+SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
+ file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
+ file://0001-Do-not-read-config-files-from-HOME.patch \
+ file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
+ file://0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch \
+ file://0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch \
+ file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \
+ file://0001-Fix-build-with-musl-C-library.patch \
+ file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
+ file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
+ file://0001-Split-binary-package-building-into-a-separate-functi.patch \
+ file://0002-Run-binary-package-creation-via-thread-pools.patch \
+ file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
+ file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
+ file://0001-perl-disable-auto-reqs.patch \
+ file://0001-configure.ac-add-option-for-dbus.patch \
+ file://0001-Factor-out-and-unify-setting-CLOEXEC.patch \
+ file://0002-Optimize-rpmSetCloseOnExec.patch \
+ file://0003-rpmSetCloseOnExec-use-getrlimit.patch \
+ "
+
+PE = "1"
+SRCREV = "bfee1410af51c1cc9724791fb8d985260a62102b"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "nss libarchive db file popt xz bzip2 dbus elfutils python3"
+DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native"
+
+inherit autotools gettext pkgconfig python3native
+export PYTHON_ABI
+
+# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe
+EXTRA_AUTORECONF_append = " --exclude=gnu-configize"
+
+EXTRA_OECONF_append = " --without-lua --enable-python"
+EXTRA_OECONF_append_libc-musl = " --disable-nls"
+
+# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs
+#
+# --localstatedir prevents rpm from writing its database to native sysroot when building images
+#
+# Disable dbus for native, so that rpm doesn't attempt to inhibit shutdown via session dbus even when plugins support is enabled.
+# Also disable plugins by default for native.
+EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --without-dbus --disable-plugins"
+
+BBCLASSEXTEND = "native nativesdk"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils"
+
+# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in
+# libmagic also has sysroot path contamination, so override it
+do_install_append_class-native() {
+ tools="\
+ ${bindir}/rpm \
+ ${bindir}/rpm2archive \
+ ${bindir}/rpm2cpio \
+ ${bindir}/rpmbuild \
+ ${bindir}/rpmdb \
+ ${bindir}/rpmgraph \
+ ${bindir}/rpmkeys \
+ ${bindir}/rpmsign \
+ ${bindir}/rpmspec \
+ ${libdir}/rpm/rpmdeps \
+ "
+
+ for tool in $tools; do
+ create_wrapper ${D}$tool \
+ RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
+ RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
+ MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
+ RPM_NO_CHROOT_FOR_SCRIPTS=1
+ done
+}
+
+# Rpm's make install creates var/tmp which clashes with base-files packaging
+do_install_append_class-target() {
+ rm -rf ${D}/var
+}
+
+do_install_append () {
+ sed -i -e 's:${HOSTTOOLS_DIR}/::g' \
+ ${D}/${libdir}/rpm/macros
+
+ sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
+ ${D}${libdir}/rpm/pythondistdeps.py \
+ ${D}${libdir}/rpm/python-macro-helper
+}
+
+FILES_${PN} += "${libdir}/rpm-plugins/*.so \
+ "
+
+FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \
+ "
+
+PACKAGES += "python3-rpm"
+PROVIDES += "python3-rpm"
+FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*"
+
+# rpm 5.x was packaging the rpm build tools separately
+RPROVIDES_${PN} += "rpm-build"
+
+RDEPENDS_${PN} = "bash perl python3-core"
+
+PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess"
+
+# Do not specify a sysroot when compiling on a target.
+rpm_package_preprocess () {
+ sed -i -e 's:--sysroot[^ ]*::g' \
+ ${PKGD}/${libdir}/rpm/macros
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_git.bb
deleted file mode 100644
index 7866314..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_git.bb
+++ /dev/null
@@ -1,138 +0,0 @@
-SUMMARY = "The RPM package management system"
-DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
-package management system capable of installing, uninstalling, \
-verifying, querying, and updating software packages. Each software \
-package consists of an archive of files along with information about \
-the package like its version, a description, etc."
-
-SUMMARY_${PN}-dev = "Development files for manipulating RPM packages"
-DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
-development files will simplify the process of writing programs that \
-manipulate RPM packages and databases. These files are intended to \
-simplify the process of creating graphical package managers or any \
-other tools that need an intimate knowledge of RPM packages in order \
-to function."
-
-SUMMARY_python3-rpm = "Python bindings for apps which will manupulate RPM packages"
-DESCRIPTION_python3-rpm = "The python3-rpm package contains a module that permits applications \
-written in the Python programming language to use the interface \
-supplied by the RPM Package Manager libraries."
-
-HOMEPAGE = "http://www.rpm.org"
-
-# libraries are also LGPL - how to express this?
-LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f5259151d26ff18e78023450a5ac8d96"
-
-SRC_URI = "git://github.com/rpm-software-management/rpm \
- file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
- file://0001-Do-not-read-config-files-from-HOME.patch \
- file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
- file://0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch \
- file://0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch \
- file://0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch \
- file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \
- file://0001-Fix-build-with-musl-C-library.patch \
- file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
- file://0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch \
- file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
- file://0012-Use-conditional-to-access-_docdir-in-macros.in.patch \
- file://0013-Add-a-new-option-alldeps-to-rpmdeps.patch \
- file://0001-Split-binary-package-building-into-a-separate-functi.patch \
- file://0002-Run-binary-package-creation-via-thread-pools.patch \
- file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
- file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
- file://0001-perl-disable-auto-reqs.patch \
- "
-UPSTREAM_VERSION_UNKNOWN = "1"
-
-PV = "4.13.90+git${SRCPV}"
-PE = "1"
-SRCREV = "a8e51b3bb05c6acb1d9b2e3d34f859ddda1677be"
-
-S = "${WORKDIR}/git"
-
-DEPENDS = "nss libarchive db file popt xz bzip2 dbus elfutils python3"
-DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native"
-
-inherit autotools gettext pkgconfig python3native
-export PYTHON_ABI
-
-# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe
-EXTRA_AUTORECONF_append = " --exclude=gnu-configize"
-
-EXTRA_OECONF_append = " --without-lua --enable-python"
-EXTRA_OECONF_append_libc-musl = " --disable-nls"
-
-# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs
-#
-# --localstatedir prevents rpm from writing its database to native sysroot when building images
-#
-# Also disable plugins, so that rpm doesn't attempt to inhibit shutdown via session dbus
-EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
-
-BBCLASSEXTEND = "native nativesdk"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils"
-
-# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in
-# libmagic also has sysroot path contamination, so override it
-do_install_append_class-native() {
- tools="\
- ${bindir}/rpm \
- ${bindir}/rpm2archive \
- ${bindir}/rpm2cpio \
- ${bindir}/rpmbuild \
- ${bindir}/rpmdb \
- ${bindir}/rpmgraph \
- ${bindir}/rpmkeys \
- ${bindir}/rpmsign \
- ${bindir}/rpmspec \
- ${libdir}/rpm/rpmdeps \
- "
-
- for tool in $tools; do
- create_wrapper ${D}$tool \
- RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
- RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
- MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
- RPM_NO_CHROOT_FOR_SCRIPTS=1
- done
-}
-
-# Rpm's make install creates var/tmp which clashes with base-files packaging
-do_install_append_class-target() {
- rm -rf ${D}/var
-}
-
-do_install_append () {
- sed -i -e 's:${HOSTTOOLS_DIR}/::g' \
- ${D}/${libdir}/rpm/macros
-
- sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
- ${D}${libdir}/rpm/pythondistdeps.py
-}
-
-FILES_${PN} += "${libdir}/rpm-plugins/*.so \
- "
-
-FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \
- "
-
-PACKAGES += "python3-rpm"
-PROVIDES += "python3-rpm"
-FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*"
-
-# rpm 5.x was packaging the rpm build tools separately
-RPROVIDES_${PN} += "rpm-build"
-
-RDEPENDS_${PN} = "bash perl python3-core"
-
-PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess"
-
-# Do not specify a sysroot when compiling on a target.
-rpm_package_preprocess () {
- sed -i -e 's:--sysroot[^ ]*::g' \
- ${PKGD}/${libdir}/rpm/macros
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb
deleted file mode 100644
index 1031984..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-require rsync.inc
-
-SRC_URI += "file://makefile-no-rebuild.patch"
-
-SRC_URI[md5sum] = "0f758d7e000c0f7f7d3792610fad70cb"
-SRC_URI[sha256sum] = "ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2"
-
-# GPLv2+ (<< 3.0.0), GPLv3+ (>= 3.0.0)
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-PACKAGECONFIG ??= "acl attr \
- ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
-"
-PACKAGECONFIG[acl] = "--enable-acl-support,--disable-acl-support,acl,"
-PACKAGECONFIG[attr] = "--enable-xattr-support,--disable-xattr-support,attr,"
-
-# By default, if crosscompiling, rsync disables a number of
-# capabilities, hardlinking symlinks and special files (i.e. devices)
-CACHED_CONFIGUREVARS += "rsync_cv_can_hardlink_special=yes rsync_cv_can_hardlink_symlink=yes"
-
-# rsync 3.0 uses configure.sh instead of configure, and
-# makefile checks the existence of configure.sh
-do_configure_prepend () {
- rm -f ${S}/configure ${S}/configure.sh
-}
-
-do_configure_append () {
- cp -f ${S}/configure ${S}/configure.sh
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.3.bb
new file mode 100644
index 0000000..84a0258
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.3.bb
@@ -0,0 +1,32 @@
+require rsync.inc
+
+SRC_URI += "file://makefile-no-rebuild.patch"
+
+SRC_URI[md5sum] = "1581a588fde9d89f6bc6201e8129afaf"
+SRC_URI[sha256sum] = "55cc554efec5fdaad70de921cd5a5eeb6c29a95524c715f3bbf849235b0800c0"
+
+# GPLv2+ (<< 3.0.0), GPLv3+ (>= 3.0.0)
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+PACKAGECONFIG ??= "acl attr \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+"
+PACKAGECONFIG[acl] = "--enable-acl-support,--disable-acl-support,acl,"
+PACKAGECONFIG[attr] = "--enable-xattr-support,--disable-xattr-support,attr,"
+
+# By default, if crosscompiling, rsync disables a number of
+# capabilities, hardlinking symlinks and special files (i.e. devices)
+CACHED_CONFIGUREVARS += "rsync_cv_can_hardlink_special=yes rsync_cv_can_hardlink_symlink=yes"
+
+# rsync 3.0 uses configure.sh instead of configure, and
+# makefile checks the existence of configure.sh
+do_configure_prepend () {
+ rm -f ${S}/configure ${S}/configure.sh
+}
+
+do_configure_append () {
+ cp -f ${S}/configure ${S}/configure.sh
+}
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby.inc b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby.inc
index d719898..fd3911b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby.inc
@@ -8,13 +8,13 @@
SECTION = "devel/ruby"
LICENSE = "Ruby | BSD | GPLv2"
LIC_FILES_CHKSUM = "\
- file://COPYING;md5=8a960b08d972f43f91ae84a6f00dcbfb \
+ file://COPYING;md5=340948e1882e579731841bf49cdc22c1 \
file://BSDL;md5=19aaf65c88a40b508d17ae4be539c4b5\
file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263\
- file://LEGAL;md5=daf349ad59dd19bd8c919171bff3c5d6 \
+ file://LEGAL;md5=8f871f3f03732c018a5fa9b185958231 \
"
-DEPENDS = "ruby-native zlib openssl tcl libyaml db gdbm readline"
+DEPENDS = "ruby-native zlib openssl tcl libyaml gdbm readline"
DEPENDS_class-native = "openssl-native libyaml-native"
SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
index b0114ba..4cf579f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
@@ -10,19 +10,16 @@
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/Makefile.in b/Makefile.in
-index 7da2488..5b4aea1 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -75,7 +75,7 @@ EXTLIBS =
- LIBS = @LIBS@ $(EXTLIBS)
+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@
+ ENABLE_SHARED = @ENABLE_SHARED@
LDSHARED = @LIBRUBY_LDSHARED@
-DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG)
+DLDFLAGS = @LIBRUBY_DLDFLAGS@ @LDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG)
SOLIBS = @SOLIBS@
+ ENABLE_DEBUG_ENV = @ENABLE_DEBUG_ENV@
MAINLIBS = @MAINLIBS@
- ARCHMINIOBJS = @MINIOBJS@
---
-2.8.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/extmk.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/extmk.patch
index a5b2184..404b9af 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/extmk.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/extmk.patch
@@ -2,13 +2,15 @@
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
-@@ -354,8 +354,8 @@
- $ruby = '$(topdir)/miniruby' + EXEEXT
+@@ -413,8 +413,8 @@ def $mflags.defined?(var)
end
- $ruby << " -I'$(topdir)'"
-+$ruby << " -I'$(top_srcdir)/lib'"
+ $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
- $ruby << " -I./- -I'$(top_srcdir)/ext' -rpurelib.rb"
+- $ruby << "-I'$(top_srcdir)/lib'"
+ $ruby << "-I'$(extout)/$(arch)'" << "-I'$(extout)/common'" if $extout
ENV["RUBYLIB"] = "-"
+ end
+--
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-14064.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-14064.patch
deleted file mode 100644
index 88e693c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-14064.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 8f782fd8e181d9cfe9387ded43a5ca9692266b85 Mon Sep 17 00:00:00 2001
-From: Florian Frank <flori@ping.de>
-Date: Thu, 2 Mar 2017 12:12:33 +0100
-Subject: [PATCH] Fix arbitrary heap exposure problem
-
-Upstream-Status: Backport
-CVE: CVE-2017-14064
-
-Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
----
- ext/json/generator/generator.c | 12 ++++++------
- ext/json/generator/generator.h | 1 -
- 2 files changed, 6 insertions(+), 7 deletions(-)
-
-diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c
-index ef85bb7..c88818c 100644
---- a/ext/json/generator/generator.c
-+++ b/ext/json/generator/generator.c
-@@ -308,7 +308,7 @@ static char *fstrndup(const char *ptr, unsigned long len) {
- char *result;
- if (len <= 0) return NULL;
- result = ALLOC_N(char, len);
-- memccpy(result, ptr, 0, len);
-+ memcpy(result, ptr, len);
- return result;
- }
-
-@@ -1062,7 +1062,7 @@ static VALUE cState_indent_set(VALUE self, VALUE indent)
- }
- } else {
- if (state->indent) ruby_xfree(state->indent);
-- state->indent = strdup(RSTRING_PTR(indent));
-+ state->indent = fstrndup(RSTRING_PTR(indent), len);
- state->indent_len = len;
- }
- return Qnil;
-@@ -1100,7 +1100,7 @@ static VALUE cState_space_set(VALUE self, VALUE space)
- }
- } else {
- if (state->space) ruby_xfree(state->space);
-- state->space = strdup(RSTRING_PTR(space));
-+ state->space = fstrndup(RSTRING_PTR(space), len);
- state->space_len = len;
- }
- return Qnil;
-@@ -1136,7 +1136,7 @@ static VALUE cState_space_before_set(VALUE self, VALUE space_before)
- }
- } else {
- if (state->space_before) ruby_xfree(state->space_before);
-- state->space_before = strdup(RSTRING_PTR(space_before));
-+ state->space_before = fstrndup(RSTRING_PTR(space_before), len);
- state->space_before_len = len;
- }
- return Qnil;
-@@ -1173,7 +1173,7 @@ static VALUE cState_object_nl_set(VALUE self, VALUE object_nl)
- }
- } else {
- if (state->object_nl) ruby_xfree(state->object_nl);
-- state->object_nl = strdup(RSTRING_PTR(object_nl));
-+ state->object_nl = fstrndup(RSTRING_PTR(object_nl), len);
- state->object_nl_len = len;
- }
- return Qnil;
-@@ -1208,7 +1208,7 @@ static VALUE cState_array_nl_set(VALUE self, VALUE array_nl)
- }
- } else {
- if (state->array_nl) ruby_xfree(state->array_nl);
-- state->array_nl = strdup(RSTRING_PTR(array_nl));
-+ state->array_nl = fstrndup(RSTRING_PTR(array_nl), len);
- state->array_nl_len = len;
- }
- return Qnil;
-diff --git a/ext/json/generator/generator.h b/ext/json/generator/generator.h
-index 900b4d5..c367a62 100644
---- a/ext/json/generator/generator.h
-+++ b/ext/json/generator/generator.h
-@@ -1,7 +1,6 @@
- #ifndef _GENERATOR_H_
- #define _GENERATOR_H_
-
--#include <string.h>
- #include <math.h>
- #include <ctype.h>
-
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9224.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9224.patch
deleted file mode 100644
index 848139b..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9224.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 690313a061f7a4fa614ec5cc8368b4f2284e059b Mon Sep 17 00:00:00 2001
-From: "K.Kosako" <kosako@sofnec.co.jp>
-Date: Tue, 23 May 2017 10:28:58 +0900
-Subject: [PATCH] fix #57 : DATA_ENSURE() check must be before data access
-
----
- regexec.c | 5 -----
- 1 file changed, 5 deletions(-)
-
---- end of original header
-
-CVE: CVE-2017-9224
-
-Context modified so that patch applies for version 2.4.1.
-
-Upstream-Status: Pending
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
-
-diff --git a/regexec.c b/regexec.c
-index 35fef11..d4e577d 100644
---- a/regexec.c
-+++ b/regexec.c
-@@ -1473,14 +1473,9 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
- NEXT;
-
- CASE(OP_EXACT1) MOP_IN(OP_EXACT1);
--#if 0
- DATA_ENSURE(1);
- if (*p != *s) goto fail;
- p++; s++;
--#endif
-- if (*p != *s++) goto fail;
-- DATA_ENSURE(0);
-- p++;
- MOP_OUT;
- break;
-
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9226.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9226.patch
index 0f2a430..89437bb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9226.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9226.patch
@@ -20,22 +20,13 @@
--- ruby-2.4.1.orig/regparse.c
+++ ruby-2.4.1/regparse.c
-@@ -3644,7 +3644,7 @@ fetch_token(OnigToken* tok, UChar** src,
- if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) {
- prev = p;
- num = scan_unsigned_octal_number(&p, end, (c == '0' ? 2:3), enc);
-- if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
-+ if (num < 0 || 0xff < num) return ONIGERR_TOO_BIG_NUMBER;
- if (p == prev) { /* can't read nothing. */
- num = 0; /* but, it's not error */
- }
@@ -4450,6 +4450,9 @@ next_state_val(CClassNode* cc, CClassNod
switch (*state) {
case CCS_VALUE:
if (*type == CCV_SB) {
-+ if (*vs > 0xff)
++ if (*from > 0xff)
+ return ONIGERR_INVALID_CODE_POINT_VALUE;
+
- BITSET_SET_BIT_CHKDUP(cc->bs, (int )(*vs));
+ BITSET_SET_BIT_CHKDUP(cc->bs, (int )(*from));
if (IS_NOT_NULL(asc_cc))
- BITSET_SET_BIT(asc_cc->bs, (int )(*vs));
+ BITSET_SET_BIT(asc_cc->bs, (int )(*from));
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9227.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9227.patch
deleted file mode 100644
index 85e7ccb..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9227.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 9690d3ab1f9bcd2db8cbe1fe3ee4a5da606b8814 Mon Sep 17 00:00:00 2001
-From: "K.Kosako" <kosako@sofnec.co.jp>
-Date: Tue, 23 May 2017 16:15:35 +0900
-Subject: [PATCH] fix #58 : access to invalid address by reg->dmin value
-
----
- regexec.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- end of original header
-
-CVE: CVE-2017-9227
-
-Upstream-Status: Inappropriate [not author]
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
-diff --git a/regexec.c b/regexec.c
-index d4e577d..2fa0f3d 100644
---- a/regexec.c
-+++ b/regexec.c
-@@ -3154,6 +3154,8 @@ forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
- }
- else {
- UChar *q = p + reg->dmin;
-+
-+ if (q >= end) return 0; /* fail */
- while (p < q) p += enclen(reg->enc, p, end);
- }
- }
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9229.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9229.patch
deleted file mode 100644
index 6e765bf..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9229.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From b690371bbf97794b4a1d3f295d4fb9a8b05d402d Mon Sep 17 00:00:00 2001
-From: "K.Kosako" <kosako@sofnec.co.jp>
-Date: Wed, 24 May 2017 10:27:04 +0900
-Subject: [PATCH] fix #59 : access to invalid address by reg->dmax value
-
----
- regexec.c | 27 +++++++++++++++++----------
- 1 file changed, 17 insertions(+), 10 deletions(-)
-
---- end of original header
-
-CVE: CVE-2017-9229
-
-Upstream-Status: Inappropriate [not author]
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
-diff --git a/regexec.c b/regexec.c
-index 49bcc50..c0626ef 100644
---- a/regexec.c
-+++ b/regexec.c
-@@ -3756,18 +3756,25 @@ forward_search_range(regex_t* reg, const
- }
- else {
- if (reg->dmax != ONIG_INFINITE_DISTANCE) {
-- *low = p - reg->dmax;
-- if (*low > s) {
-- *low = onigenc_get_right_adjust_char_head_with_prev(reg->enc, s,
-- *low, end, (const UChar** )low_prev);
-- if (low_prev && IS_NULL(*low_prev))
-- *low_prev = onigenc_get_prev_char_head(reg->enc,
-- (pprev ? pprev : s), *low, end);
-+ if (p - str < reg->dmax) {
-+ *low = (UChar* )str;
-+ if (low_prev)
-+ *low_prev = onigenc_get_prev_char_head(reg->enc, str, *low, end);
- }
- else {
-- if (low_prev)
-- *low_prev = onigenc_get_prev_char_head(reg->enc,
-- (pprev ? pprev : str), *low, end);
-+ *low = p - reg->dmax;
-+ if (*low > s) {
-+ *low = onigenc_get_right_adjust_char_head_with_prev(reg->enc, s,
-+ *low, end, (const UChar** )low_prev);
-+ if (low_prev && IS_NULL(*low_prev))
-+ *low_prev = onigenc_get_prev_char_head(reg->enc,
-+ (pprev ? pprev : s), *low, end);
-+ }
-+ else {
-+ if (low_prev)
-+ *low_prev = onigenc_get_prev_char_head(reg->enc,
-+ (pprev ? pprev : str), *low, end);
-+ }
- }
- }
- }
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.1.bb
deleted file mode 100644
index 7d27ac8..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.1.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-require ruby.inc
-
-SRC_URI += " \
- file://ruby-CVE-2017-9224.patch \
- file://ruby-CVE-2017-9226.patch \
- file://ruby-CVE-2017-9227.patch \
- file://ruby-CVE-2017-9228.patch \
- file://ruby-CVE-2017-9229.patch \
- file://ruby-CVE-2017-14064.patch \
- "
-
-SRC_URI[md5sum] = "782bca562e474dd25956dd0017d92677"
-SRC_URI[sha256sum] = "a330e10d5cb5e53b3a0078326c5731888bb55e32c4abfeb27d9e7f8e5d000250"
-
-# it's unknown to configure script, but then passed to extconf.rb
-# maybe it's not really needed as we're hardcoding the result with
-# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch
-UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
-
-PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind"
-PACKAGECONFIG[gpm] = "--with-gmp=yes, --with-gmp=no, gmp"
-PACKAGECONFIG[ipv6] = ",--enable-wide-getaddrinfo,"
-
-EXTRA_AUTORECONF += "--exclude=aclocal"
-
-EXTRA_OECONF = "\
- --disable-versioned-paths \
- --disable-rpath \
- --disable-dtrace \
- --enable-shared \
- --enable-load-relative \
-"
-
-do_install() {
- oe_runmake 'DESTDIR=${D}' install
-}
-
-PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc"
-
-SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library"
-RDEPENDS_${PN}-ri-docs = "${PN}"
-FILES_${PN}-ri-docs += "${datadir}/ri"
-
-SUMMARY_${PN}-rdoc = "RDoc documentation generator from Ruby source"
-RDEPENDS_${PN}-rdoc = "${PN}"
-FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc"
-
-FILES_${PN} += "${datadir}/rubygems"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.5.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.5.0.bb
new file mode 100644
index 0000000..1ac7f2a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.5.0.bb
@@ -0,0 +1,49 @@
+require ruby.inc
+
+SRC_URI += " \
+ file://ruby-CVE-2017-9226.patch \
+ file://ruby-CVE-2017-9228.patch \
+ "
+
+SRC_URI[md5sum] = "f4711f856fe14de222b9da3d3b8efa89"
+SRC_URI[sha256sum] = "46e6f3630f1888eb653b15fa811d77b5b1df6fd7a3af436b343cfe4f4503f2ab"
+
+# it's unknown to configure script, but then passed to extconf.rb
+# maybe it's not really needed as we're hardcoding the result with
+# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch
+UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+
+PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind"
+PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp"
+PACKAGECONFIG[ipv6] = ",--enable-wide-getaddrinfo,"
+
+EXTRA_AUTORECONF += "--exclude=aclocal"
+
+EXTRA_OECONF = "\
+ --disable-versioned-paths \
+ --disable-rpath \
+ --disable-dtrace \
+ --enable-shared \
+ --enable-load-relative \
+"
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+}
+
+PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc"
+
+SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library"
+RDEPENDS_${PN}-ri-docs = "${PN}"
+FILES_${PN}-ri-docs += "${datadir}/ri"
+
+SUMMARY_${PN}-rdoc = "RDoc documentation generator from Ruby source"
+RDEPENDS_${PN}-rdoc = "${PN}"
+FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc"
+
+FILES_${PN} += "${datadir}/rubygems"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
index 50c0a1a..307feb7 100755
--- a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
+++ b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
@@ -43,7 +43,7 @@
fi
}
-if [ -z "$pi_dir" ]; then
+if ! [ -d $pi_dir ]; then
remove_rcsd_link
exit 0
fi
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
index 31c98ec..85b3fc8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
@@ -1,6 +1,6 @@
SUMMARY = "Runs postinstall scripts on first boot of the target device"
SECTION = "devel"
-PR = "r9"
+PR = "r10"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
index d545146..0ce7b4e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
@@ -23,7 +23,7 @@
===================================================================
--- squashfs-tools.orig/mksquashfs.c
+++ squashfs-tools/mksquashfs.c
-@@ -1286,6 +1286,10 @@ void write_dir(squashfs_inode *inode, st
+@@ -1261,6 +1261,10 @@ void write_dir(squashfs_inode *inode, st
dir_size + 3, directory_block, directory_offset, NULL, NULL,
dir, 0);
@@ -50,9 +50,9 @@
===================================================================
--- squashfs-tools.orig/unsquashfs.c
+++ squashfs-tools/unsquashfs.c
-@@ -38,6 +38,10 @@
- #include <limits.h>
- #include <ctype.h>
+@@ -42,6 +42,10 @@
+ #include <sys/sysmacros.h>
+ #endif
+#ifndef FNM_EXTMATCH
+#define FNM_EXTMATCH 0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
index 0f99170..a8baca5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
@@ -16,7 +16,7 @@
file://squashfs-tools-4.3-sysmacros.patch;striplevel=2 \
file://fix-compat.patch \
"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
SRC_URI[lzma.md5sum] = "29d5ffd03a5a3e51aef6a74e9eafb759"
SRC_URI[lzma.sha256sum] = "c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e0880aa0fa1e"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
index 97bcc90..a12f4c3 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
@@ -14,23 +14,23 @@
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
-index 61d6425..6387c24 100644
+index 5f0aec4..8eaacc6 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -41,7 +41,7 @@ AC_COPYRIGHT([Copyright (C) 1999-]copyright_year[ The strace developers.])
+@@ -42,7 +42,7 @@ AC_COPYRIGHT([Copyright (c) 1999-]copyright_year[ The strace developers.])
AC_CONFIG_SRCDIR([strace.c])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_HEADERS([config.h])
--AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules parallel-tests])
-+AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules serial-tests])
- AM_EXTRA_RECURSIVE_TARGETS([check-valgrind])
+-AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules parallel-tests 1.13])
++AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules serial-tests 1.13])
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
+
diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 5aa7f89..a55a355 100644
+index b4ba22a..5836438 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
-@@ -379,3 +379,21 @@ clean-local-check:
+@@ -408,3 +408,21 @@ BUILT_SOURCES = ksysent.h
CLEANFILES = ksysent.h
include ../scno.am
@@ -52,6 +52,3 @@
+ sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \
+ done
+ for i in net scm_rights-fd rt_sigaction; do sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/$$i.test; done
---
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.18.bb b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.18.bb
deleted file mode 100644
index 5b2891a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.18.bb
+++ /dev/null
@@ -1,59 +0,0 @@
-SUMMARY = "System call tracing tool"
-HOMEPAGE = "http://strace.sourceforge.net"
-SECTION = "console/utils"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f132b4d2adfccc63da4139a609367711"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
- file://disable-git-version-gen.patch \
- file://more-robust-test-for-m32-mx32-compile-support.patch \
- file://update-gawk-paths.patch \
- file://Makefile-ptest.patch \
- file://run-ptest \
- file://0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch \
- file://mips-SIGEMT.patch \
- file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
- file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \
- "
-
-SRC_URI[md5sum] = "3579b3266bb096cebaefbe2cdb1a3a78"
-SRC_URI[sha256sum] = "89ad887c1e6226bdbca8da31d589cadea4be0744b142eb47b768086c937fca08"
-
-inherit autotools ptest bluetooth
-
-RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed"
-
-PACKAGECONFIG_class-target ??= "\
- ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
-"
-
-PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,${BLUEZ}"
-PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
-
-TESTDIR = "tests"
-
-do_install_append() {
- # We don't ship strace-graph here because it needs perl
- rm ${D}${bindir}/strace-graph
-}
-
-do_compile_ptest() {
- oe_runmake -C ${TESTDIR} buildtest-TESTS
-}
-
-do_install_ptest() {
- oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
- sed -i -e '/^src/s/strace.*[1-9]/ptest/' \
- -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
- -e 's|${DEBUG_PREFIX_MAP}||g' \
- -e 's:${HOSTTOOLS_DIR}/::g' \
- -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
- -e 's:${RECIPE_SYSROOT}::g' \
- -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
- -e '/^DEB_CHANGELOGTIME/d' \
- -e '/^RPM_CHANGELOGTIME/d' \
- ${D}/${PTEST_PATH}/${TESTDIR}/Makefile
-}
-
-BBCLASSEXTEND = "native"
-TOOLCHAIN = "gcc"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.20.bb b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.20.bb
new file mode 100644
index 0000000..869c12f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.20.bb
@@ -0,0 +1,59 @@
+SUMMARY = "System call tracing tool"
+HOMEPAGE = "http://strace.io"
+SECTION = "console/utils"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f132b4d2adfccc63da4139a609367711"
+
+SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
+ file://disable-git-version-gen.patch \
+ file://more-robust-test-for-m32-mx32-compile-support.patch \
+ file://update-gawk-paths.patch \
+ file://Makefile-ptest.patch \
+ file://run-ptest \
+ file://0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch \
+ file://mips-SIGEMT.patch \
+ file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
+ file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \
+ "
+
+SRC_URI[md5sum] = "f2271ab0fac49ebee9cbd7f3469227cb"
+SRC_URI[sha256sum] = "5bf3148dd17306a42566f7da17368fdd781afa147db05ea63a4ca2b50f58c523"
+
+inherit autotools ptest bluetooth
+
+RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed"
+
+PACKAGECONFIG_class-target ??= "\
+ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
+"
+
+PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,${BLUEZ}"
+PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
+
+TESTDIR = "tests"
+
+do_install_append() {
+ # We don't ship strace-graph here because it needs perl
+ rm ${D}${bindir}/strace-graph
+}
+
+do_compile_ptest() {
+ oe_runmake -C ${TESTDIR} buildtest-TESTS
+}
+
+do_install_ptest() {
+ oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
+ sed -i -e '/^src/s/strace.*[1-9]/ptest/' \
+ -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ -e '/^DEB_CHANGELOGTIME/d' \
+ -e '/^RPM_CHANGELOGTIME/d' \
+ ${D}/${PTEST_PATH}/${TESTDIR}/Makefile
+}
+
+BBCLASSEXTEND = "native"
+TOOLCHAIN = "gcc"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion/CVE-2017-9800.patch b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion/CVE-2017-9800.patch
deleted file mode 100644
index 0599c2b..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion/CVE-2017-9800.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-------------------------------------------------------------------------
-r1804691 | danielsh | 2017-08-10 11:14:13 -0700 (Thu, 10 Aug 2017) | 18 lines
-
-Fix CVE-2017-9800.
-
-See: https://subversion.apache.org/security/CVE-2017-0800-advisory.txt
-
-* subversion/libsvn_ra_svn/client.c
- (svn_ctype.h): Include.
- (find_tunnel_agent): Pass a "--" end-of-options guard to ssh.
- Expect the 'hostinfo' parameter to be URI-decoded.
- (is_valid_hostinfo): New.
- (ra_svn_open): Validate the hostname before using it.
-
-* subversion/libsvn_subr/config_file.c
- (svn_config_ensure): Update the example configuration likewise.
-
-Patch by: philip
-Review by: danielsh
- stsp
- astieger (earlier version)
-
-Upstream-Status: Backport
-http://svn.apache.org/viewvc?view=revision&sortby=rev&revision=1804691
-
-CVE: CVE-2017-9800
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
-Index: subversion/libsvn_subr/config_file.c
-===================================================================
---- subversion/libsvn_subr/config_file.c (revision 1804690)
-+++ subversion/libsvn_subr/config_file.c (revision 1804691)
-@@ -1448,12 +1448,12 @@
- "### passed to the tunnel agent as <user>@<hostname>.) If the" NL
- "### built-in ssh scheme were not predefined, it could be defined" NL
- "### as:" NL
-- "# ssh = $SVN_SSH ssh -q" NL
-+ "# ssh = $SVN_SSH ssh -q --" NL
- "### If you wanted to define a new 'rsh' scheme, to be used with" NL
- "### 'svn+rsh:' URLs, you could do so as follows:" NL
-- "# rsh = rsh" NL
-+ "# rsh = rsh --" NL
- "### Or, if you wanted to specify a full path and arguments:" NL
-- "# rsh = /path/to/rsh -l myusername" NL
-+ "# rsh = /path/to/rsh -l myusername --" NL
- "### On Windows, if you are specifying a full path to a command," NL
- "### use a forward slash (/) or a paired backslash (\\\\) as the" NL
- "### path separator. A single backslash will be treated as an" NL
-Index: subversion/libsvn_ra_svn/client.c
-===================================================================
---- subversion/libsvn_ra_svn/client.c (revision 1804690)
-+++ subversion/libsvn_ra_svn/client.c (revision 1804691)
-@@ -46,6 +46,7 @@
- #include "svn_props.h"
- #include "svn_mergeinfo.h"
- #include "svn_version.h"
-+#include "svn_ctype.h"
-
- #include "svn_private_config.h"
-
-@@ -398,7 +399,7 @@
- * versions have it too. If the user is using some other ssh
- * implementation that doesn't accept it, they can override it
- * in the [tunnels] section of the config. */
-- val = "$SVN_SSH ssh -q";
-+ val = "$SVN_SSH ssh -q --";
- }
-
- if (!val || !*val)
-@@ -443,7 +444,7 @@
- for (n = 0; cmd_argv[n] != NULL; n++)
- argv[n] = cmd_argv[n];
-
-- argv[n++] = svn_path_uri_decode(hostinfo, pool);
-+ argv[n++] = hostinfo;
- argv[n++] = "svnserve";
- argv[n++] = "-t";
- argv[n] = NULL;
-@@ -811,7 +812,33 @@
- }
-
-
-+/* A simple whitelist to ensure the following are valid:
-+ * user@server
-+ * [::1]:22
-+ * server-name
-+ * server_name
-+ * 127.0.0.1
-+ * with an extra restriction that a leading '-' is invalid.
-+ */
-+static svn_boolean_t
-+is_valid_hostinfo(const char *hostinfo)
-+{
-+ const char *p = hostinfo;
-
-+ if (p[0] == '-')
-+ return FALSE;
-+
-+ while (*p)
-+ {
-+ if (!svn_ctype_isalnum(*p) && !strchr(":.-_[]@", *p))
-+ return FALSE;
-+
-+ ++p;
-+ }
-+
-+ return TRUE;
-+}
-+
- static svn_error_t *ra_svn_open(svn_ra_session_t *session,
- const char **corrected_url,
- const char *url,
-@@ -844,8 +871,18 @@
- || (callbacks->check_tunnel_func && callbacks->open_tunnel_func
- && !callbacks->check_tunnel_func(callbacks->tunnel_baton,
- tunnel))))
-- SVN_ERR(find_tunnel_agent(tunnel, uri.hostinfo, &tunnel_argv, config,
-- result_pool));
-+ {
-+ const char *decoded_hostinfo;
-+
-+ decoded_hostinfo = svn_path_uri_decode(uri.hostinfo, result_pool);
-+
-+ if (!is_valid_hostinfo(decoded_hostinfo))
-+ return svn_error_createf(SVN_ERR_BAD_URL, NULL, _("Invalid host '%s'"),
-+ uri.hostinfo);
-+
-+ SVN_ERR(find_tunnel_agent(tunnel, decoded_hostinfo, &tunnel_argv,
-+ config, result_pool));
-+ }
- else
- tunnel_argv = NULL;
-
-
-------------------------------------------------------------------------
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.6.bb
deleted file mode 100644
index 532edeb..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.6.bb
+++ /dev/null
@@ -1,56 +0,0 @@
-SUMMARY = "Subversion (svn) version control system client"
-SECTION = "console/network"
-DEPENDS = "apr-util serf sqlite3 file"
-DEPENDS_append_class-native = " file-replacement-native"
-RDEPENDS_${PN} = "serf"
-LICENSE = "Apache-2"
-HOMEPAGE = "http://subversion.tigris.org"
-
-BBCLASSEXTEND = "native"
-
-inherit gettext pkgconfig
-
-SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://disable_macos.patch \
- file://serf.m4-Regex-modified-to-allow-D-in-paths.patch \
- file://0001-Fix-libtool-name-in-configure.ac.patch \
- file://serfmacro.patch \
- file://CVE-2017-9800.patch;striplevel=0 \
- "
-
-SRC_URI[md5sum] = "f27e00338d4a9f7f9aec9d4a3f8b418b"
-SRC_URI[sha256sum] = "dbcbc51fb634082f009121f2cb64350ce32146612787ffb0f7ced351aacaae19"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=af81ae49ba359e70626c05e9bf313709"
-
-PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl"
-PACKAGECONFIG[gnome-keyring] = "--with-gnome-keyring,--without-gnome-keyring,glib-2.0 gnome-keyring"
-
-EXTRA_OECONF = " \
- --without-berkeley-db --without-apxs \
- --without-swig --with-apr=${STAGING_BINDIR_CROSS} \
- --with-apr-util=${STAGING_BINDIR_CROSS} \
- --disable-keychain \
- ac_cv_path_RUBY=none"
-
-inherit autotools
-
-export LDFLAGS += " -L${STAGING_LIBDIR} "
-CPPFLAGS += "-P"
-BUILD_CPPFLAGS += "-P"
-
-acpaths = "-I build/ -I build/ac-macros/"
-
-do_configure_prepend () {
- rm -f ${S}/libtool
- rm -f ${S}/build/libtool.m4 ${S}/build/ltmain.sh ${S}/build/ltoptions.m4 ${S}/build/ltsugar.m4 ${S}/build/ltversion.m4 ${S}/build/lt~obsolete.m4
- rm -f ${S}/aclocal.m4
- sed -i -e 's:with_sasl="/usr/local":with_sasl="${STAGING_DIR}":' ${S}/build/ac-macros/sasl.m4
-}
-
-#| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_local/libsvn_ra_local-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| /usr/bin/ld: cannot find -lsvn_delta-1| collect2: ld returned 1 exit status| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_svn/libsvn_ra_svn-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_serf/libsvn_ra_serf-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
-#| x86_64-linux-libtool: install: error: relink `libsvn_ra_serf-1.la' with the above command before installing it
-#| x86_64-linux-libtool: install: warning: `../../subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
-#| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/subversion-1.8.9/build-outputs.mk:1090: recipe for target 'install-serf-lib' failed
-#| make: *** [install-serf-lib] Error 1
-PARALLEL_MAKEINST = ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.7.bb
new file mode 100644
index 0000000..57735f7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.7.bb
@@ -0,0 +1,55 @@
+SUMMARY = "Subversion (svn) version control system client"
+SECTION = "console/network"
+DEPENDS = "apr-util serf sqlite3 file"
+DEPENDS_append_class-native = " file-replacement-native"
+RDEPENDS_${PN} = "serf"
+LICENSE = "Apache-2"
+HOMEPAGE = "http://subversion.tigris.org"
+
+BBCLASSEXTEND = "native"
+
+inherit gettext pkgconfig
+
+SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://disable_macos.patch \
+ file://serf.m4-Regex-modified-to-allow-D-in-paths.patch \
+ file://0001-Fix-libtool-name-in-configure.ac.patch \
+ file://serfmacro.patch \
+ "
+
+SRC_URI[md5sum] = "05b0c677681073920f938c1f322e0be2"
+SRC_URI[sha256sum] = "c3b118333ce12e501d509e66bb0a47bcc34d053990acab45559431ac3e491623"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=af81ae49ba359e70626c05e9bf313709"
+
+PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl"
+PACKAGECONFIG[gnome-keyring] = "--with-gnome-keyring,--without-gnome-keyring,glib-2.0 gnome-keyring"
+
+EXTRA_OECONF = " \
+ --without-berkeley-db --without-apxs \
+ --without-swig --with-apr=${STAGING_BINDIR_CROSS} \
+ --with-apr-util=${STAGING_BINDIR_CROSS} \
+ --disable-keychain \
+ ac_cv_path_RUBY=none"
+
+inherit autotools
+
+export LDFLAGS += " -L${STAGING_LIBDIR} "
+CPPFLAGS += "-P"
+BUILD_CPPFLAGS += "-P"
+
+acpaths = "-I build/ -I build/ac-macros/"
+
+do_configure_prepend () {
+ rm -f ${S}/libtool
+ rm -f ${S}/build/libtool.m4 ${S}/build/ltmain.sh ${S}/build/ltoptions.m4 ${S}/build/ltsugar.m4 ${S}/build/ltversion.m4 ${S}/build/lt~obsolete.m4
+ rm -f ${S}/aclocal.m4
+ sed -i -e 's:with_sasl="/usr/local":with_sasl="${STAGING_DIR}":' ${S}/build/ac-macros/sasl.m4
+}
+
+#| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_local/libsvn_ra_local-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| /usr/bin/ld: cannot find -lsvn_delta-1| collect2: ld returned 1 exit status| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_svn/libsvn_ra_svn-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_serf/libsvn_ra_serf-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
+#| x86_64-linux-libtool: install: error: relink `libsvn_ra_serf-1.la' with the above command before installing it
+#| x86_64-linux-libtool: install: warning: `../../subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
+#| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/subversion-1.8.9/build-outputs.mk:1090: recipe for target 'install-serf-lib' failed
+#| make: *** [install-serf-lib] Error 1
+PARALLEL_MAKEINST = ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/swig/swig.inc b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig.inc
index 8cb6fbd..bf61b02 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/swig/swig.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig.inc
@@ -11,7 +11,7 @@
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
-inherit autotools python3native
+inherit autotools python3native pkgconfig
EXTRA_OECONF = " \
--with-python3=${PYTHON} \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/swig/swig/0001-Add-Node-7.x-aka-V8-5.2-support.patch b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig/0001-Add-Node-7.x-aka-V8-5.2-support.patch
new file mode 100644
index 0000000..885c395
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig/0001-Add-Node-7.x-aka-V8-5.2-support.patch
@@ -0,0 +1,330 @@
+From 1a5aadcd66e85c63d228bfd811a521d617c22a38 Mon Sep 17 00:00:00 2001
+From: Patrick Schneider <patrick.schneider@meetnow.eu>
+Date: Thu, 13 Apr 2017 15:02:53 +0200
+Subject: [PATCH] Add Node 7.x aka V8 5.2+ support
+
+* Use WeakCallbackInfo instead of WeakCallbackData
+* Use GetPrivate instead of GetHiddenValue
+* Adopted new signature for SetWeak to support destructor calling
+* SetAccessor deprecation fixed
+* Proper version checks where applicable
+
+Upstream-Status: Submitted [https://github.com/swig/swig/pull/968]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+---
+ Lib/javascript/v8/javascriptcode.swg | 27 +++++++++++++++++-----
+ Lib/javascript/v8/javascripthelpers.swg | 29 +++++++++++++++++++++---
+ Lib/javascript/v8/javascriptinit.swg | 16 +++++++++++--
+ Lib/javascript/v8/javascriptrun.swg | 40 ++++++++++++++++++++++++++++-----
+ 4 files changed, 95 insertions(+), 17 deletions(-)
+
+diff --git a/Lib/javascript/v8/javascriptcode.swg b/Lib/javascript/v8/javascriptcode.swg
+index fb7d55c..b8c5089 100644
+--- a/Lib/javascript/v8/javascriptcode.swg
++++ b/Lib/javascript/v8/javascriptcode.swg
+@@ -133,10 +133,13 @@ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Value> object, v
+ SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Object> *object, SWIGV8_Proxy *proxy) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
+ v8::Local<v8::Object> object = data.GetValue();
+ SWIGV8_Proxy *proxy = data.GetParameter();
++#else
++ static void $jswrapper(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
++ SWIGV8_Proxy *proxy = data.GetParameter();
+ #endif
+
+ if(proxy->swigCMemOwn && proxy->swigCObject) {
+@@ -147,7 +150,9 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+ }
+ delete proxy;
+
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ object.Clear();
++#endif
+
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
+ object.Dispose();
+@@ -155,7 +160,7 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+ object.Dispose(isolate);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x032100)
+ object->Dispose(isolate);
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ object->Dispose();
+ #endif
+ }
+@@ -177,10 +182,13 @@ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Value> object, v
+ SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ static void $jswrapper(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
+ v8::Local<v8::Object> object = data.GetValue();
+ SWIGV8_Proxy *proxy = data.GetParameter();
++#else
++static void $jswrapper(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
++ SWIGV8_Proxy *proxy = data.GetParameter();
+ #endif
+
+ if(proxy->swigCMemOwn && proxy->swigCObject) {
+@@ -197,7 +205,7 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+ object->Dispose(isolate);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ object->Dispose();
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ object.Clear();
+ #endif
+ }
+@@ -211,7 +219,11 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+ * ----------------------------------------------------------------------------- */
+ %fragment("js_getter", "templates")
+ %{
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ static SwigV8ReturnValue $jswrapper(v8::Local<v8::String> property, const SwigV8PropertyCallbackInfo &info) {
++#else
++static SwigV8ReturnValue $jswrapper(v8::Local<v8::Name> property, const SwigV8PropertyCallbackInfo &info) {
++#endif
+ SWIGV8_HANDLESCOPE();
+
+ v8::Handle<v8::Value> jsresult;
+@@ -233,8 +245,11 @@ fail:
+ * ----------------------------------------------------------------------------- */
+ %fragment("js_setter", "templates")
+ %{
+-static void $jswrapper(v8::Local<v8::String> property, v8::Local<v8::Value> value,
+- const SwigV8PropertyCallbackInfoVoid &info) {
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
++static void $jswrapper(v8::Local<v8::String> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid &info) {
++#else
++static void $jswrapper(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid &info) {
++#endif
+ SWIGV8_HANDLESCOPE();
+
+ $jslocals
+diff --git a/Lib/javascript/v8/javascripthelpers.swg b/Lib/javascript/v8/javascripthelpers.swg
+index 091467d..7461079 100644
+--- a/Lib/javascript/v8/javascripthelpers.swg
++++ b/Lib/javascript/v8/javascripthelpers.swg
+@@ -6,11 +6,16 @@ typedef v8::InvocationCallback SwigV8FunctionCallback;
+ typedef v8::AccessorGetter SwigV8AccessorGetterCallback;
+ typedef v8::AccessorSetter SwigV8AccessorSetterCallback;
+ typedef v8::AccessorInfo SwigV8PropertyCallbackInfoVoid;
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ typedef v8::FunctionCallback SwigV8FunctionCallback;
+ typedef v8::AccessorGetterCallback SwigV8AccessorGetterCallback;
+ typedef v8::AccessorSetterCallback SwigV8AccessorSetterCallback;
+ typedef v8::PropertyCallbackInfo<void> SwigV8PropertyCallbackInfoVoid;
++#else
++typedef v8::FunctionCallback SwigV8FunctionCallback;
++typedef v8::AccessorNameGetterCallback SwigV8AccessorGetterCallback;
++typedef v8::AccessorNameSetterCallback SwigV8AccessorSetterCallback;
++typedef v8::PropertyCallbackInfo<void> SwigV8PropertyCallbackInfoVoid;
+ #endif
+
+ /**
+@@ -65,18 +70,36 @@ SWIGRUNTIME void SWIGV8_AddStaticFunction(v8::Handle<v8::Object> obj, const char
+ */
+ SWIGRUNTIME void SWIGV8_AddStaticVariable(v8::Handle<v8::Object> obj, const char* symbol,
+ SwigV8AccessorGetterCallback getter, SwigV8AccessorSetterCallback setter) {
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ obj->SetAccessor(SWIGV8_SYMBOL_NEW(symbol), getter, setter);
++#else
++ obj->SetAccessor(SWIGV8_CURRENT_CONTEXT(), SWIGV8_SYMBOL_NEW(symbol), getter, setter);
++#endif
+ }
+
+-SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::String> property, v8::Local<v8::Value> value,
+- const SwigV8PropertyCallbackInfoVoid& info)
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
++SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::String> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid& info)
++#else
++SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid& info)
++#endif
+ {
+ char buffer[256];
+ char msg[512];
+ int res;
+
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ property->WriteUtf8(buffer, 256);
+ res = sprintf(msg, "Tried to write read-only variable: %s.", buffer);
++#else
++ v8::Local<v8::String> sproperty;
++ if (property->ToString(SWIGV8_CURRENT_CONTEXT()).ToLocal(&sproperty)) {
++ sproperty->WriteUtf8(buffer, 256);
++ res = sprintf(msg, "Tried to write read-only variable: %s.", buffer);
++ }
++ else {
++ res = -1;
++ }
++#endif
+
+ if(res<0) {
+ SWIG_exception(SWIG_ERROR, "Tried to write read-only variable.");
+diff --git a/Lib/javascript/v8/javascriptinit.swg b/Lib/javascript/v8/javascriptinit.swg
+index 34befa7..86008d9 100644
+--- a/Lib/javascript/v8/javascriptinit.swg
++++ b/Lib/javascript/v8/javascriptinit.swg
+@@ -7,15 +7,27 @@ SWIG_V8_SetModule(void *, swig_module_info *swig_module) {
+ v8::Local<v8::Object> global_obj = SWIGV8_CURRENT_CONTEXT()->Global();
+ v8::Local<v8::External> mod = SWIGV8_EXTERNAL_NEW(swig_module);
+ assert(!mod.IsEmpty());
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ global_obj->SetHiddenValue(SWIGV8_STRING_NEW("swig_module_info_data"), mod);
++#else
++ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("swig_module_info_data"));
++ global_obj->SetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey, mod);
++#endif
+ }
+
+ SWIGRUNTIME swig_module_info *
+ SWIG_V8_GetModule(void *) {
+ v8::Local<v8::Object> global_obj = SWIGV8_CURRENT_CONTEXT()->Global();
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ v8::Local<v8::Value> moduleinfo = global_obj->GetHiddenValue(SWIGV8_STRING_NEW("swig_module_info_data"));
++#else
++ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("swig_module_info_data"));
++ v8::Local<v8::Value> moduleinfo;
++ if (!global_obj->GetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey).ToLocal(&moduleinfo))
++ return 0;
++#endif
+
+- if (moduleinfo.IsEmpty())
++ if (moduleinfo.IsEmpty() || moduleinfo->IsNull() || moduleinfo->IsUndefined())
+ {
+ // It's not yet loaded
+ return 0;
+@@ -23,7 +35,7 @@ SWIG_V8_GetModule(void *) {
+
+ v8::Local<v8::External> moduleinfo_extern = v8::Local<v8::External>::Cast(moduleinfo);
+
+- if (moduleinfo_extern.IsEmpty())
++ if (moduleinfo_extern.IsEmpty() || moduleinfo_extern->IsNull() || moduleinfo_extern->IsUndefined())
+ {
+ // Something's not right
+ return 0;
+diff --git a/Lib/javascript/v8/javascriptrun.swg b/Lib/javascript/v8/javascriptrun.swg
+index 5ac52a5..30002c0 100644
+--- a/Lib/javascript/v8/javascriptrun.swg
++++ b/Lib/javascript/v8/javascriptrun.swg
+@@ -193,8 +193,10 @@ public:
+ void (*dtor) (v8::Isolate *isolate, v8::Persistent< v8::Value> object, void *parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ void (*dtor) (v8::Isolate *isolate, v8::Persistent< v8::Object > *object, SWIGV8_Proxy *proxy);
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ void (*dtor) (const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data);
++#else
++ void (*dtor) (const v8::WeakCallbackInfo<SWIGV8_Proxy> &data);
+ #endif
+ };
+
+@@ -241,9 +243,12 @@ SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(v8::Isolate *, v8::Persistent< v8::Val
+ SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(v8::Isolate *, v8::Persistent< v8::Object > *object, SWIGV8_Proxy *proxy) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
+ SWIGV8_Proxy *proxy = data.GetParameter();
++#else
++SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
++ SWIGV8_Proxy *proxy = data.GetParameter();
+ #endif
+
+ delete proxy;
+@@ -312,12 +317,18 @@ SWIGRUNTIME void SWIGV8_SetPrivateData(v8::Handle<v8::Object> obj, void *ptr, sw
+ } else {
+ cdata->handle.MakeWeak(cdata, SWIGV8_Proxy_DefaultDtor);
+ }
+-#else
++#elifif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) {
+ cdata->handle.SetWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor);
+ } else {
+ cdata->handle.SetWeak(cdata, SWIGV8_Proxy_DefaultDtor);
+ }
++#else
++ if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) {
++ cdata->handle.SetWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor, v8::WeakCallbackType::kParameter);
++ } else {
++ cdata->handle.SetWeak(cdata, SWIGV8_Proxy_DefaultDtor, v8::WeakCallbackType::kParameter);
++ }
+ #endif
+
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
+@@ -470,7 +481,14 @@ int SwigV8Packed_Check(v8::Handle<v8::Value> valRef) {
+
+ v8::Handle<v8::Object> objRef = valRef->ToObject();
+ if(objRef->InternalFieldCount() < 1) return false;
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ v8::Handle<v8::Value> flag = objRef->GetHiddenValue(SWIGV8_STRING_NEW("__swig__packed_data__"));
++#else
++ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("__swig__packed_data__"));
++ v8::Local<v8::Value> flag;
++ if (!objRef->GetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey).ToLocal(&flag))
++ return false;
++#endif
+ return (flag->IsBoolean() && flag->BooleanValue());
+ }
+
+@@ -519,10 +537,13 @@ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(v8::Isolate *isolate, v8::Persist
+ SwigV8PackedData *cdata = static_cast<SwigV8PackedData *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(v8::Isolate *isolate, v8::Persistent<v8::Object> *object, SwigV8PackedData *cdata) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackData<v8::Object, SwigV8PackedData> &data) {
+ v8::Local<v8::Object> object = data.GetValue();
+ SwigV8PackedData *cdata = data.GetParameter();
++#else
++SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackInfo<SwigV8PackedData> &data) {
++ SwigV8PackedData *cdata = data.GetParameter();
+ #endif
+
+ delete cdata;
+@@ -537,7 +558,7 @@ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackData<v8::Ob
+ object->Dispose(isolate);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ object->Dispose();
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ object.Clear();
+ #endif
+ }
+@@ -550,7 +571,12 @@ v8::Handle<v8::Value> SWIGV8_NewPackedObj(void *data, size_t size, swig_type_inf
+ // v8::Handle<v8::Object> obj = SWIGV8_OBJECT_NEW();
+ v8::Local<v8::Object> obj = SWIGV8_OBJECT_NEW();
+
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ obj->SetHiddenValue(SWIGV8_STRING_NEW("__swig__packed_data__"), SWIGV8_BOOLEAN_NEW(true));
++#else
++ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("__swig__packed_data__"));
++ obj->SetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey, SWIGV8_BOOLEAN_NEW(true));
++#endif
+
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031511)
+ obj->SetPointerInInternalField(0, cdata);
+@@ -573,9 +599,11 @@ v8::Handle<v8::Value> SWIGV8_NewPackedObj(void *data, size_t size, swig_type_inf
+ cdata->handle.MakeWeak(v8::Isolate::GetCurrent(), cdata, _wrap_SwigV8PackedData_delete);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ cdata->handle.MakeWeak(cdata, _wrap_SwigV8PackedData_delete);
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ cdata->handle.SetWeak(cdata, _wrap_SwigV8PackedData_delete);
+ // v8::V8::SetWeak(&cdata->handle, cdata, _wrap_SwigV8PackedData_delete);
++#else
++ cdata->handle.SetWeak(cdata, _wrap_SwigV8PackedData_delete, v8::WeakCallbackType::kParameter);
+ #endif
+
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
+--
+2.9.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/swig/swig_3.0.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig_3.0.12.bb
index d5caa67..15f7348 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/swig/swig_3.0.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig_3.0.12.bb
@@ -2,6 +2,7 @@
SRC_URI += "file://0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch \
file://0001-configure-use-pkg-config-for-pcre-detection.patch \
+ file://0001-Add-Node-7.x-aka-V8-5.2-support.patch \
"
SRC_URI[md5sum] = "82133dfa7bba75ff9ad98a7046be687c"
SRC_URI[sha256sum] = "7cf9f447ae7ed1c51722efc45e7f14418d15d7a1e143ac9f09a668999f4fc94d"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch b/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch
index c0714b5..6ba96ae 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch
@@ -20,15 +20,12 @@
com32/Makefile | 1 +
1 file changed, 1 insertion(+)
-diff --git a/com32/Makefile b/com32/Makefile
-index 9a1721b..f172db2 100644
---- a/com32/Makefile
-+++ b/com32/Makefile
-@@ -21,3 +21,4 @@ rosh: lib libutil
- samples: libutil elflink/ldlinux
- sysdump: libupload gpllib
+Index: syslinux-6.03/com32/Makefile
+===================================================================
+--- syslinux-6.03.orig/com32/Makefile
++++ syslinux-6.03/com32/Makefile
+@@ -22,3 +22,4 @@ samples: libutil elflink/ldlinux
+ sysdump: lib libutil libupload gpllib
+ lua/src: cmenu modules
gpllib: lib
+libupload: lib
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch
deleted file mode 100644
index 5aa0463..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From d379126d56d0b6e935b2d97ca71579e6cc54d1bb Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Tue, 18 Jul 2017 13:37:27 +0300
-Subject: [PATCH] parse-util: Don't use xlocale.h
-
-glibc 2.26 no longer contains the non-standard xlocale.h
-(http://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27)
-
-This change shouldn't break anything as xlocale.h was a subset of
-locale.h.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Submitted [https://github.com/systemd/systemd-bootchart/pull/35]
----
- src/parse-util.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/src/parse-util.c b/src/parse-util.c
-index 5635a68..1b2169c 100644
---- a/src/parse-util.c
-+++ b/src/parse-util.c
-@@ -21,7 +21,6 @@
- #include <locale.h>
- #include <stdlib.h>
- #include <string.h>
--#include <xlocale.h>
-
- #include "macro.h"
- #include "parse-util.h"
---
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
new file mode 100644
index 0000000..f392cea
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
@@ -0,0 +1,36 @@
+From 45b401a947af944c20b3c451a35dfe53bca5ef3b Mon Sep 17 00:00:00 2001
+From: Tim Orling <timothy.t.orling@linux.intel.com>
+Date: Thu, 28 Dec 2017 21:24:57 -0800
+Subject: [PATCH 1/3] comparison_fn_t is glibc specific, use raw signature in
+ function pointer
+
+Make it work with musl where comparison_fn_t is not provided
+
+Reuse the approach from systemd:
+systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
+
+Based on work by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+---
+Upstream-Status: Pending
+
+ src/util.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util.h b/src/util.h
+index 561f9e7..e9cfd81 100644
+--- a/src/util.h
++++ b/src/util.h
+@@ -57,7 +57,7 @@ extern char **saved_argv;
+ * Normal qsort requires base to be nonnull. Here were require
+ * that only if nmemb > 0.
+ */
+-static inline void qsort_safe(void *base, size_t nmemb, size_t size, comparison_fn_t compar) {
++static inline void qsort_safe(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) {
+ if (nmemb <= 1)
+ return;
+
+--
+2.13.6
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch
new file mode 100644
index 0000000..196272f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch
@@ -0,0 +1,423 @@
+From 6f9454184a02310802b1ed3e40287958b524a495 Mon Sep 17 00:00:00 2001
+From: Tim Orling <timothy.t.orling@linux.intel.com>
+Date: Thu, 28 Dec 2017 21:39:51 -0800
+Subject: [PATCH 2/3] musl does not provide printf.h
+
+Reuse the approach from systemd:
+systemd/0001-add-fallback-parse_printf_format-implementation.patch
+
+Original patch author: Emil Renner Berthing <systemd@esmil.dk>
+Includes work by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+---
+Upstream-Status: Pending
+
+ Makefile.am | 4 +
+ configure.ac | 3 +
+ src/log.c | 1 +
+ src/parse-printf-format.c | 273 ++++++++++++++++++++++++++++++++++++++++++++++
+ src/parse-printf-format.h | 57 ++++++++++
+ src/stdio-util.h | 1 -
+ 6 files changed, 338 insertions(+), 1 deletion(-)
+ create mode 100644 src/parse-printf-format.c
+ create mode 100644 src/parse-printf-format.h
+
+diff --git a/Makefile.am b/Makefile.am
+index 9bbc8fa..b887d16 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -169,6 +169,10 @@ libutils_la_SOURCES = \
+ src/util.c \
+ src/util.h
+
++if !HAVE_PRINTF_H
++libutils_la_SOURCES += src/parse-printf-format.c
++endif
++
+ libutils_la_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(LIBSYSTEMD_CFLAGS)
+diff --git a/configure.ac b/configure.ac
+index 7f74bac..062e310 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -73,6 +73,9 @@ AS_IF([test "x$with_libsystemd" != xno],
+ )]
+ )
+
++AC_CHECK_HEADERS([printf.h], [], [])
++AM_CONDITIONAL(HAVE_PRINTF_H, [test "x$ac_cv_header_print_h" = xyes])
++
+ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
+ -pipe \
+ -Wall \
+diff --git a/src/log.c b/src/log.c
+index 15dec83..aecf231 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -28,6 +28,7 @@
+ #include <sys/uio.h>
+ #include <unistd.h>
+
++#include "parse-printf-format.h"
+ #include "sd-messages.h"
+
+ #include "fd-util.h"
+diff --git a/src/parse-printf-format.c b/src/parse-printf-format.c
+new file mode 100644
+index 0000000..49437e5
+--- /dev/null
++++ b/src/parse-printf-format.c
+@@ -0,0 +1,273 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++/***
++ This file is part of systemd.
++
++ Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
++
++ With parts from the musl C library
++ Copyright 2005-2014 Rich Felker, et al.
++
++ systemd is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ systemd is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with systemd; If not, see <http://www.gnu.org/licenses/>.
++***/
++
++#include <stddef.h>
++#include <string.h>
++
++#include "parse-printf-format.h"
++
++static const char *consume_nonarg(const char *fmt)
++{
++ do {
++ if (*fmt == '\0')
++ return fmt;
++ } while (*fmt++ != '%');
++ return fmt;
++}
++
++static const char *consume_num(const char *fmt)
++{
++ for (;*fmt >= '0' && *fmt <= '9'; fmt++)
++ /* do nothing */;
++ return fmt;
++}
++
++static const char *consume_argn(const char *fmt, size_t *arg)
++{
++ const char *p = fmt;
++ size_t val = 0;
++
++ if (*p < '1' || *p > '9')
++ return fmt;
++ do {
++ val = 10*val + (*p++ - '0');
++ } while (*p >= '0' && *p <= '9');
++
++ if (*p != '$')
++ return fmt;
++ *arg = val;
++ return p+1;
++}
++
++static const char *consume_flags(const char *fmt)
++{
++ while (1) {
++ switch (*fmt) {
++ case '#':
++ case '0':
++ case '-':
++ case ' ':
++ case '+':
++ case '\'':
++ case 'I':
++ fmt++;
++ continue;
++ }
++ return fmt;
++ }
++}
++
++enum state {
++ BARE,
++ LPRE,
++ LLPRE,
++ HPRE,
++ HHPRE,
++ BIGLPRE,
++ ZTPRE,
++ JPRE,
++ STOP
++};
++
++enum type {
++ NONE,
++ PTR,
++ INT,
++ UINT,
++ ULLONG,
++ LONG,
++ ULONG,
++ SHORT,
++ USHORT,
++ CHAR,
++ UCHAR,
++ LLONG,
++ SIZET,
++ IMAX,
++ UMAX,
++ PDIFF,
++ UIPTR,
++ DBL,
++ LDBL,
++ MAXTYPE
++};
++
++static const short pa_types[MAXTYPE] = {
++ [NONE] = PA_INT,
++ [PTR] = PA_POINTER,
++ [INT] = PA_INT,
++ [UINT] = PA_INT,
++ [ULLONG] = PA_INT | PA_FLAG_LONG_LONG,
++ [LONG] = PA_INT | PA_FLAG_LONG,
++ [ULONG] = PA_INT | PA_FLAG_LONG,
++ [SHORT] = PA_INT | PA_FLAG_SHORT,
++ [USHORT] = PA_INT | PA_FLAG_SHORT,
++ [CHAR] = PA_CHAR,
++ [UCHAR] = PA_CHAR,
++ [LLONG] = PA_INT | PA_FLAG_LONG_LONG,
++ [SIZET] = PA_INT | PA_FLAG_LONG,
++ [IMAX] = PA_INT | PA_FLAG_LONG_LONG,
++ [UMAX] = PA_INT | PA_FLAG_LONG_LONG,
++ [PDIFF] = PA_INT | PA_FLAG_LONG_LONG,
++ [UIPTR] = PA_INT | PA_FLAG_LONG,
++ [DBL] = PA_DOUBLE,
++ [LDBL] = PA_DOUBLE | PA_FLAG_LONG_DOUBLE
++};
++
++#define S(x) [(x)-'A']
++#define E(x) (STOP + (x))
++
++static const unsigned char states[]['z'-'A'+1] = {
++ { /* 0: bare types */
++ S('d') = E(INT), S('i') = E(INT),
++ S('o') = E(UINT),S('u') = E(UINT),S('x') = E(UINT), S('X') = E(UINT),
++ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL),
++ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL),
++ S('c') = E(CHAR),S('C') = E(INT),
++ S('s') = E(PTR), S('S') = E(PTR), S('p') = E(UIPTR),S('n') = E(PTR),
++ S('m') = E(NONE),
++ S('l') = LPRE, S('h') = HPRE, S('L') = BIGLPRE,
++ S('z') = ZTPRE, S('j') = JPRE, S('t') = ZTPRE
++ }, { /* 1: l-prefixed */
++ S('d') = E(LONG), S('i') = E(LONG),
++ S('o') = E(ULONG),S('u') = E(ULONG),S('x') = E(ULONG),S('X') = E(ULONG),
++ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL),
++ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL),
++ S('c') = E(INT), S('s') = E(PTR), S('n') = E(PTR),
++ S('l') = LLPRE
++ }, { /* 2: ll-prefixed */
++ S('d') = E(LLONG), S('i') = E(LLONG),
++ S('o') = E(ULLONG),S('u') = E(ULLONG),
++ S('x') = E(ULLONG),S('X') = E(ULLONG),
++ S('n') = E(PTR)
++ }, { /* 3: h-prefixed */
++ S('d') = E(SHORT), S('i') = E(SHORT),
++ S('o') = E(USHORT),S('u') = E(USHORT),
++ S('x') = E(USHORT),S('X') = E(USHORT),
++ S('n') = E(PTR),
++ S('h') = HHPRE
++ }, { /* 4: hh-prefixed */
++ S('d') = E(CHAR), S('i') = E(CHAR),
++ S('o') = E(UCHAR),S('u') = E(UCHAR),
++ S('x') = E(UCHAR),S('X') = E(UCHAR),
++ S('n') = E(PTR)
++ }, { /* 5: L-prefixed */
++ S('e') = E(LDBL),S('f') = E(LDBL),S('g') = E(LDBL), S('a') = E(LDBL),
++ S('E') = E(LDBL),S('F') = E(LDBL),S('G') = E(LDBL), S('A') = E(LDBL),
++ S('n') = E(PTR)
++ }, { /* 6: z- or t-prefixed (assumed to be same size) */
++ S('d') = E(PDIFF),S('i') = E(PDIFF),
++ S('o') = E(SIZET),S('u') = E(SIZET),
++ S('x') = E(SIZET),S('X') = E(SIZET),
++ S('n') = E(PTR)
++ }, { /* 7: j-prefixed */
++ S('d') = E(IMAX), S('i') = E(IMAX),
++ S('o') = E(UMAX), S('u') = E(UMAX),
++ S('x') = E(UMAX), S('X') = E(UMAX),
++ S('n') = E(PTR)
++ }
++};
++
++size_t parse_printf_format(const char *fmt, size_t n, int *types)
++{
++ size_t i = 0;
++ size_t last = 0;
++
++ memset(types, 0, n);
++
++ while (1) {
++ size_t arg;
++ unsigned int state;
++
++ fmt = consume_nonarg(fmt);
++ if (*fmt == '\0')
++ break;
++ if (*fmt == '%') {
++ fmt++;
++ continue;
++ }
++ arg = 0;
++ fmt = consume_argn(fmt, &arg);
++ /* flags */
++ fmt = consume_flags(fmt);
++ /* width */
++ if (*fmt == '*') {
++ size_t warg = 0;
++ fmt = consume_argn(fmt+1, &warg);
++ if (warg == 0)
++ warg = ++i;
++ if (warg > last)
++ last = warg;
++ if (warg <= n && types[warg-1] == NONE)
++ types[warg-1] = INT;
++ } else
++ fmt = consume_num(fmt);
++ /* precision */
++ if (*fmt == '.') {
++ fmt++;
++ if (*fmt == '*') {
++ size_t parg = 0;
++ fmt = consume_argn(fmt+1, &parg);
++ if (parg == 0)
++ parg = ++i;
++ if (parg > last)
++ last = parg;
++ if (parg <= n && types[parg-1] == NONE)
++ types[parg-1] = INT;
++ } else {
++ if (*fmt == '-')
++ fmt++;
++ fmt = consume_num(fmt);
++ }
++ }
++ /* length modifier and conversion specifier */
++ state = BARE;
++ do {
++ unsigned char c = *fmt++;
++
++ if (c < 'A' || c > 'z')
++ continue;
++ state = states[state]S(c);
++ if (state == 0)
++ continue;
++ } while (state < STOP);
++
++ if (state == E(NONE))
++ continue;
++
++ if (arg == 0)
++ arg = ++i;
++ if (arg > last)
++ last = arg;
++ if (arg <= n)
++ types[arg-1] = state - STOP;
++ }
++
++ if (last > n)
++ last = n;
++ for (i = 0; i < last; i++)
++ types[i] = pa_types[types[i]];
++
++ return last;
++}
+diff --git a/src/parse-printf-format.h b/src/parse-printf-format.h
+new file mode 100644
+index 0000000..4371177
+--- /dev/null
++++ b/src/parse-printf-format.h
+@@ -0,0 +1,57 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++/***
++ This file is part of systemd.
++
++ Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
++
++ With parts from the GNU C Library
++ Copyright 1991-2014 Free Software Foundation, Inc.
++
++ systemd is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ systemd is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with systemd; If not, see <http://www.gnu.org/licenses/>.
++***/
++
++#pragma once
++
++#include "config.h"
++
++#ifdef HAVE_PRINTF_H
++#include <printf.h>
++#else
++
++#include <stddef.h>
++
++enum { /* C type: */
++ PA_INT, /* int */
++ PA_CHAR, /* int, cast to char */
++ PA_WCHAR, /* wide char */
++ PA_STRING, /* const char *, a '\0'-terminated string */
++ PA_WSTRING, /* const wchar_t *, wide character string */
++ PA_POINTER, /* void * */
++ PA_FLOAT, /* float */
++ PA_DOUBLE, /* double */
++ PA_LAST
++};
++
++/* Flag bits that can be set in a type returned by `parse_printf_format'. */
++#define PA_FLAG_MASK 0xff00
++#define PA_FLAG_LONG_LONG (1 << 8)
++#define PA_FLAG_LONG_DOUBLE PA_FLAG_LONG_LONG
++#define PA_FLAG_LONG (1 << 9)
++#define PA_FLAG_SHORT (1 << 10)
++#define PA_FLAG_PTR (1 << 11)
++
++size_t parse_printf_format(const char *fmt, size_t n, int *types);
++
++#endif /* HAVE_PRINTF_H */
+diff --git a/src/stdio-util.h b/src/stdio-util.h
+index 0a67557..21cc515 100644
+--- a/src/stdio-util.h
++++ b/src/stdio-util.h
+@@ -19,7 +19,6 @@
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+
+-#include <printf.h>
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+--
+2.13.6
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch
new file mode 100644
index 0000000..7670d95
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch
@@ -0,0 +1,33 @@
+From 79396449d264bde58b4daa3ef6dd99f0f0652429 Mon Sep 17 00:00:00 2001
+From: Tim Orling <timothy.t.orling@linux.intel.com>
+Date: Thu, 28 Dec 2017 22:10:58 -0800
+Subject: [PATCH 3/3] musl does not provide canonicalize_file_name
+
+Reuse the approach from systemd:
+systemd/0007-check-for-missing-canonicalize_file_name.patch
+
+Based on work by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+---
+Upstream-Status: Pending
+
+ src/path-util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/path-util.c b/src/path-util.c
+index 2fb6366..12e2e17 100644
+--- a/src/path-util.c
++++ b/src/path-util.c
+@@ -63,7 +63,7 @@ char **path_strv_resolve(char **l, const char *prefix) {
+ t = *s;
+
+ errno = 0;
+- u = canonicalize_file_name(t);
++ u = realpath(t, NULL);
+ if (!u) {
+ if (errno == ENOENT) {
+ if (prefix) {
+--
+2.13.6
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb
deleted file mode 100644
index 4da000e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-LICENSE = "LGPLv2.1 & GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
- file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe"
-
-SRC_URI = "git://github.com/systemd/systemd-bootchart.git;protocol=https \
- file://0001-parse-util-Don-t-use-xlocale.h.patch \
-"
-
-# Modify these as desired
-PV = "231+git${SRCPV}"
-SRCREV = "9ee2ffc1dc6c8209725e625954bbd89f96cb7139"
-
-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
-
-REQUIRED_DISTRO_FEATURES = "systemd"
-
-SYSTEMD_SERVICE_${PN} = "systemd-bootchart.service"
-
-do_configure_prepend() {
- # intltool.m4 is a soft link to /usr/share/aclocal/m4, delete it and use the one in our sysroot
- rm -f ${S}/m4/intltool.m4
-}
-
-FILES_${PN} += "${systemd_unitdir}/systemd-bootchart"
-
-EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
- --with-rootlibdir=${base_libdir}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_233.bb b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_233.bb
new file mode 100644
index 0000000..1ae21b1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_233.bb
@@ -0,0 +1,37 @@
+LICENSE = "LGPLv2.1 & GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
+ file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "git://github.com/systemd/systemd-bootchart.git;protocol=https \
+"
+
+SRC_URI_append_libc-musl = " \
+ file://0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch \
+ file://0002-musl-does-not-provide-printf-h.patch \
+ file://0003-musl-does-not-provide-canonicalize_file_name.patch \
+ "
+
+
+# Modify these as desired
+PV = "233+git${SRCPV}"
+SRCREV = "fe1c5e41e6bdb78043dad8fa863fc2df66d1dadf"
+
+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
+
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+SYSTEMD_SERVICE_${PN} = "systemd-bootchart.service"
+
+do_configure_prepend() {
+ # intltool.m4 is a soft link to /usr/share/aclocal/m4, delete it and use the one in our sysroot
+ rm -f ${S}/m4/intltool.m4
+}
+
+FILES_${PN} += "${systemd_unitdir}/systemd-bootchart"
+
+EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
+ --with-rootlibdir=${base_libdir}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch
index 5d70456..b66f41a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch
@@ -1,14 +1,16 @@
Upstream-Status: Inappropriate [poky-specific fix]
---- a/Makefile.inc
-+++ b/Makefile.inc
-@@ -57,6 +57,9 @@
- ifeq ($(NO_UUID),)
- LIBS += -luuid
+Index: agent/Makefile.inc
+===================================================================
+--- agent.orig/Makefile.inc
++++ agent/Makefile.inc
+@@ -88,6 +88,9 @@ ifneq ($(OPSYS),Windows)
+ ifneq ($(CC),g++)
+ OPTS += -Wmissing-prototypes
endif
+ ifneq ($(RANLIB),)
+ RANLIB += $@
+ endif
endif
- ifneq ($(OPSYS),Windows)
+ # Compiler flags definition
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
index 9db26dc..ba14c42 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
@@ -16,7 +16,6 @@
file://tcf-agent.init \
file://tcf-agent.service \
"
-UPSTREAM_VERSION_UNKNOWN = "1"
DEPENDS = "util-linux openssl"
RDEPENDS_${PN} = "bash"
@@ -31,7 +30,7 @@
INITSCRIPT_PARAMS = "start 99 3 5 . stop 20 0 1 2 6 ."
# mangling needed for make
-MAKE_ARCH = "`echo ${TARGET_ARCH} | sed s,i.86,i686, | sed s,aarch64,a64,`"
+MAKE_ARCH = "`echo ${TARGET_ARCH} | sed s,i.86,i686, | sed s,aarch64.*,a64,`"
MAKE_OS = "`echo ${TARGET_OS} | sed s,^linux.*,GNU/Linux,`"
EXTRA_OEMAKE = "MACHINE=${MAKE_ARCH} OPSYS=${MAKE_OS} 'CC=${CC}' 'AR=${AR}'"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch
index 96276ea..d1fc9b9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch
@@ -11,7 +11,7 @@
+ # following line added by CW for Debian GNU/Linux
+ TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\${TCL_LIB_FILE}.0"
+
- SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
+ SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
Index: unix/tcl.m4
@@ -25,7 +25,7 @@
+ # following line added by CW for Debian GNU/Linux
+ TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\${TCL_LIB_FILE}.0"
+
- SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
+ SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
Index: unix/Makefile.in
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.7.bb
deleted file mode 100644
index dac73be..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.7.bb
+++ /dev/null
@@ -1,101 +0,0 @@
-SUMMARY = "Tool Command Language"
-HOMEPAGE = "http://tcl.sourceforge.net"
-SECTION = "devel/tcltk"
-
-# http://www.tcl.tk/software/tcltk/license.html
-LICENSE = "tcl & BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://../license.terms;md5=058f6229798281bbcac4239c788cfa38 \
- file://../compat/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
- file://../library/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
- file://../macosx/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
- file://../tests/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
- file://../win/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
-"
-
-DEPENDS = "tcl-native zlib"
-
-BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \
- file://tcl-add-soname.patch"
-SRC_URI = "${BASE_SRC_URI} \
- file://fix_non_native_build_issue.patch \
- file://fix_issue_with_old_distro_glibc.patch \
- file://no_packages.patch \
- file://tcl-remove-hardcoded-install-path.patch \
- file://alter-includedir.patch \
- file://run-ptest \
-"
-SRC_URI[md5sum] = "5673aaf45b5de5d8dd80bb3daaeb8838"
-SRC_URI[sha256sum] = "7c6b8f84e37332423cfe5bae503440d88450da8cc1243496249faa5268026ba5"
-
-SRC_URI_class-native = "${BASE_SRC_URI}"
-
-S = "${WORKDIR}/${BPN}${PV}/unix"
-
-VER = "${PV}"
-
-inherit autotools ptest binconfig
-
-EXTRA_OECONF = "--enable-threads --disable-rpath --libdir=${libdir}"
-
-do_compile_prepend() {
- echo > ${S}/../compat/fixstrtod.c
-}
-
-do_install() {
- autotools_do_install
- oe_runmake 'DESTDIR=${D}' install-private-headers
- ln -sf ./tclsh${VER} ${D}${bindir}/tclsh
- ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER}
- sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh
- sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh
- install -d ${D}${bindir_crossscripts}
- install -m 0755 tclConfig.sh ${D}${bindir_crossscripts}
- install -m 0755 tclConfig.sh ${D}${libdir}
- for dir in compat generic unix; do
- install -d ${D}${includedir}/${BPN}${VER}/$dir
- install -m 0644 ${S}/../$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/
- done
-}
-
-SYSROOT_DIRS += "${bindir_crossscripts}"
-
-PACKAGES =+ "tcl-lib"
-FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
-FILES_${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8"
-FILES_${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh"
-
-# isn't getting picked up by shlibs code
-RDEPENDS_${PN} += "tcl-lib"
-RDEPENDS_${PN}_class-native = ""
-RDEPENDS_${PN}-ptest += "libgcc"
-
-BBCLASSEXTEND = "native nativesdk"
-
-do_compile_ptest() {
- oe_runmake tcltest
-}
-
-do_install_ptest() {
- cp ${B}/tcltest ${D}${PTEST_PATH}
- cp -r ${S}/../library ${D}${PTEST_PATH}
- cp -r ${S}/../tests ${D}${PTEST_PATH}
-}
-
-# Fix some paths that might be used by Tcl extensions
-BINCONFIG_GLOB = "*Config.sh"
-
-# Fix the path in sstate
-SSTATE_SCAN_FILES += "*Config.sh"
-
-# Cleanup host path from ${libdir}/tclConfig.sh and remove the
-# ${bindir_crossscripts}/tclConfig.sh from target
-PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess"
-tcl_package_preprocess() {
- sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \
- -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \
- -e "s;${STAGING_INCDIR};${includedir};g" \
- -e "s;--sysroot=${RECIPE_SYSROOT};;g" \
- ${PKGD}${libdir}/tclConfig.sh
-
- rm -f ${PKGD}${bindir_crossscripts}/tclConfig.sh
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.8.bb
new file mode 100644
index 0000000..4be2e89
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.8.bb
@@ -0,0 +1,101 @@
+SUMMARY = "Tool Command Language"
+HOMEPAGE = "http://tcl.sourceforge.net"
+SECTION = "devel/tcltk"
+
+# http://www.tcl.tk/software/tcltk/license.html
+LICENSE = "tcl & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://../license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+ file://../compat/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+ file://../library/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+ file://../macosx/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+ file://../tests/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+ file://../win/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+"
+
+DEPENDS = "tcl-native zlib"
+
+BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \
+ file://tcl-add-soname.patch"
+SRC_URI = "${BASE_SRC_URI} \
+ file://fix_non_native_build_issue.patch \
+ file://fix_issue_with_old_distro_glibc.patch \
+ file://no_packages.patch \
+ file://tcl-remove-hardcoded-install-path.patch \
+ file://alter-includedir.patch \
+ file://run-ptest \
+"
+SRC_URI[md5sum] = "81656d3367af032e0ae6157eff134f89"
+SRC_URI[sha256sum] = "c43cb0c1518ce42b00e7c8f6eaddd5195c53a98f94adc717234a65cbcfd3f96a"
+
+SRC_URI_class-native = "${BASE_SRC_URI}"
+
+S = "${WORKDIR}/${BPN}${PV}/unix"
+
+VER = "${PV}"
+
+inherit autotools ptest binconfig
+
+EXTRA_OECONF = "--enable-threads --disable-rpath --libdir=${libdir}"
+
+do_compile_prepend() {
+ echo > ${S}/../compat/fixstrtod.c
+}
+
+do_install() {
+ autotools_do_install
+ oe_runmake 'DESTDIR=${D}' install-private-headers
+ ln -sf ./tclsh${VER} ${D}${bindir}/tclsh
+ ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER}
+ sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh
+ sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh
+ install -d ${D}${bindir_crossscripts}
+ install -m 0755 tclConfig.sh ${D}${bindir_crossscripts}
+ install -m 0755 tclConfig.sh ${D}${libdir}
+ for dir in compat generic unix; do
+ install -d ${D}${includedir}/${BPN}${VER}/$dir
+ install -m 0644 ${S}/../$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/
+ done
+}
+
+SYSROOT_DIRS += "${bindir_crossscripts}"
+
+PACKAGES =+ "tcl-lib"
+FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
+FILES_${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8"
+FILES_${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh"
+
+# isn't getting picked up by shlibs code
+RDEPENDS_${PN} += "tcl-lib"
+RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}-ptest += "libgcc"
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_compile_ptest() {
+ oe_runmake tcltest
+}
+
+do_install_ptest() {
+ cp ${B}/tcltest ${D}${PTEST_PATH}
+ cp -r ${S}/../library ${D}${PTEST_PATH}
+ cp -r ${S}/../tests ${D}${PTEST_PATH}
+}
+
+# Fix some paths that might be used by Tcl extensions
+BINCONFIG_GLOB = "*Config.sh"
+
+# Fix the path in sstate
+SSTATE_SCAN_FILES += "*Config.sh"
+
+# Cleanup host path from ${libdir}/tclConfig.sh and remove the
+# ${bindir_crossscripts}/tclConfig.sh from target
+PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess"
+tcl_package_preprocess() {
+ sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \
+ -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \
+ -e "s;${STAGING_INCDIR};${includedir};g" \
+ -e "s;--sysroot=${RECIPE_SYSROOT};;g" \
+ ${PKGD}${libdir}/tclConfig.sh
+
+ rm -f ${PKGD}${bindir_crossscripts}/tclConfig.sh
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc
index 1261c02..b22faad 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc
@@ -34,6 +34,8 @@
chmod +x ${B}/vapigen-wrapper
}
+EXTRA_OECONF += " --disable-graphviz"
+
# Vapigen wrapper needs to be available system-wide, because it will be used
# to build vapi files from all other packages with vala support
do_install_append_class-target() {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch
new file mode 100644
index 0000000..9b27b7f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch
@@ -0,0 +1,32 @@
+From b6ca3876e233c724fd460c1579abc4ab63c8d01e Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 4 Oct 2017 15:23:08 +0300
+Subject: [PATCH] Disable valadoc
+
+Valadoc is a documentation generator for Vala sources, which was
+recently merged into the main vala source tree. Unsurprisingly,
+it's broken in cross-compile environment in multiple ways,
+so let's fix it some other time.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Makefile.am | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index e5dc0cc..813b3fc 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -13,8 +13,6 @@ SUBDIRS = \
+ doc \
+ gobject-introspection \
+ vapigen \
+- libvaladoc \
+- valadoc \
+ $(NULL)
+
+ if ENABLE_UNVERSIONED
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/disable-graphviz.patch b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/disable-graphviz.patch
new file mode 100644
index 0000000..15d186d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/disable-graphviz.patch
@@ -0,0 +1,223 @@
+From eb716dc856c20b3da146a4e83e9800bd1f53c739 Mon Sep 17 00:00:00 2001
+From: Rico Tzschichholz <ricotz@ubuntu.com>
+Date: Wed, 6 Sep 2017 18:52:55 +0200
+Subject: [PATCH] libvaladoc: Allow disabling the graphviz dependency of
+ valadoc
+
+https://bugzilla.gnome.org/show_bug.cgi?id=787375
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+Upstream-Status: Submitted [bugzilla link above]
+---
+ configure.ac | 60 +++++++++++++++++++----------------
+ libvaladoc/Makefile.am | 25 +++++++++++----
+ libvaladoc/html/basicdoclet.vala | 8 +++++
+ libvaladoc/html/htmlmarkupwriter.vala | 4 +++
+ 4 files changed, 63 insertions(+), 34 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c73d5d6b1..291e503d5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -98,34 +98,38 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
+ AC_SUBST(GMODULE_CFLAGS)
+ AC_SUBST(GMODULE_LIBS)
+
+-PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
+-AC_MSG_CHECKING([for CGRAPH])
+-cgraph_tmp_LIBADD="$LIBADD"
+-cgraph_tmp_CFLAGS="$CFLAGS"
+-LIBADD="$LIBADD $LIBGVC_LIBS"
+-CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
+-AC_RUN_IFELSE(
+- [AC_LANG_SOURCE([
+- #include <gvc.h>
+-
+- int main(void) {
+- #ifdef WITH_CGRAPH
+- return 0;
+- #else
+- return -1;
+- #endif
+- }
+- ])], [
+- AC_MSG_RESULT([yes])
+- VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
+- have_cgraph=yes
+- ], [
+- AC_MSG_RESULT([no])
+- have_cgraph=no
+- ]
+-)
+-LIBADD="$cgraph_tmp_LIBADD"
+-CFLAGS="$cgraph_tmp_CFLAGS"
++AC_ARG_ENABLE(graphviz, AS_HELP_STRING([--disable-graphviz], [Disable graphviz usage for valadoc]), enable_graphviz=$enableval, enable_graphviz=yes)
++if test x$enable_graphviz = xyes; then
++ PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
++ AC_MSG_CHECKING([for CGRAPH])
++ VALAFLAGS="$VALAFLAGS -D HAVE_GRAPHVIZ"
++ cgraph_tmp_LIBADD="$LIBADD"
++ cgraph_tmp_CFLAGS="$CFLAGS"
++ LIBADD="$LIBADD $LIBGVC_LIBS"
++ CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
++ AC_RUN_IFELSE(
++ [AC_LANG_SOURCE([
++ #include <gvc.h>
++ int main(void) {
++ #ifdef WITH_CGRAPH
++ return 0;
++ #else
++ return -1;
++ #endif
++ }
++ ])], [
++ AC_MSG_RESULT([yes])
++ VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
++ have_cgraph=yes
++ ], [
++ AC_MSG_RESULT([no])
++ have_cgraph=no
++ ]
++ )
++ LIBADD="$cgraph_tmp_LIBADD"
++ CFLAGS="$cgraph_tmp_CFLAGS"
++fi
++AM_CONDITIONAL(ENABLE_GRAPHVIZ, test x$enable_graphviz = xyes)
+ AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
+
+ AC_PATH_PROG([XSLTPROC], [xsltproc], :)
+diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am
+index 89245d86b..7c07498b9 100644
+--- a/libvaladoc/Makefile.am
++++ b/libvaladoc/Makefile.am
+@@ -127,10 +127,6 @@ libvaladoc_la_VALASOURCES = \
+ content/tablerow.vala \
+ content/taglet.vala \
+ content/text.vala \
+- charts/chart.vala \
+- charts/chartfactory.vala \
+- charts/hierarchychart.vala \
+- charts/simplechartfactory.vala \
+ parser/manyrule.vala \
+ parser/oneofrule.vala \
+ parser/optionalrule.vala \
+@@ -158,13 +154,24 @@ libvaladoc_la_VALASOURCES = \
+ highlighter/codetoken.vala \
+ highlighter/highlighter.vala \
+ html/basicdoclet.vala \
+- html/htmlchartfactory.vala \
+ html/linkhelper.vala \
+ html/cssclassresolver.vala \
+ html/htmlmarkupwriter.vala \
+ html/htmlrenderer.vala \
+ $(NULL)
+
++if ENABLE_GRAPHVIZ
++libvaladoc_la_VALASOURCES += \
++ charts/chart.vala \
++ charts/chartfactory.vala \
++ charts/hierarchychart.vala \
++ charts/simplechartfactory.vala \
++ html/htmlchartfactory.vala \
++ $(NULL)
++
++LIBGVC_PKG = --vapidir $(top_srcdir)/vapi --pkg libgvc
++endif
++
+ libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \
+ libvaladoc.vala.stamp \
+ $(libvaladoc_la_VALASOURCES:.vala=.c) \
+@@ -182,8 +189,8 @@ libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
+ --library valadoc \
+ --vapi valadoc@PACKAGE_SUFFIX@.vapi \
+ --vapidir $(top_srcdir)/vapi --pkg gmodule-2.0 \
+- --vapidir $(top_srcdir)/vapi --pkg libgvc \
+ --vapidir $(top_srcdir)/gee --pkg gee \
++ $(LIBGVC_PKG) \
+ --pkg config \
+ $(filter %.vala %.c,$^)
+ touch $@
+@@ -209,6 +216,9 @@ nodist_pkgconfig_DATA = valadoc@PACKAGE_SUFFIX@.pc
+
+ valadoc@PACKAGE_SUFFIX@.pc: valadoc.pc
+ cp $< $@
++if !ENABLE_GRAPHVIZ
++ sed -i "s/libgvc //g" $@
++endif
+
+ vapidir = $(datadir)/vala/vapi
+ dist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.vapi
+@@ -216,6 +226,9 @@ nodist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.deps
+
+ valadoc@PACKAGE_SUFFIX@.deps: valadoc.deps
+ cp $< $@
++if !ENABLE_GRAPHVIZ
++ sed -i "s/libgvc//g" $@
++endif
+
+ EXTRA_DIST = \
+ $(libvaladoc_la_VALASOURCES) \
+diff --git a/libvaladoc/html/basicdoclet.vala b/libvaladoc/html/basicdoclet.vala
+index cc9ea4ed7..432c3818f 100644
+--- a/libvaladoc/html/basicdoclet.vala
++++ b/libvaladoc/html/basicdoclet.vala
+@@ -46,7 +46,11 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ protected HtmlRenderer _renderer;
+ protected Html.MarkupWriter writer;
+ protected Html.CssClassResolver cssresolver;
++#if HAVE_GRAPHVIZ
+ protected Charts.Factory image_factory;
++#else
++ protected void* image_factory;
++#endif
+ protected ErrorReporter reporter;
+ protected string package_list_link = "../index.html";
+
+@@ -120,7 +124,9 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ this.linker = new LinkHelper ();
+
+ _renderer = new HtmlRenderer (settings, this.linker, this.cssresolver);
++#if HAVE_GRAPHVIZ
+ this.image_factory = new SimpleChartFactory (settings, linker);
++#endif
+ }
+
+
+@@ -1025,6 +1031,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ }
+
+ protected void write_image_block (Api.Node element) {
++#if HAVE_GRAPHVIZ
+ if (element is Class || element is Interface || element is Struct) {
+ unowned string format = (settings.use_svg_images ? "svg" : "png");
+ var chart = new Charts.Hierarchy (image_factory, element);
+@@ -1044,6 +1051,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ this.get_img_path_html (element, format)});
+ writer.add_usemap (chart);
+ }
++#endif
+ }
+
+ public void write_namespace_content (Namespace node, Api.Node? parent) {
+diff --git a/libvaladoc/html/htmlmarkupwriter.vala b/libvaladoc/html/htmlmarkupwriter.vala
+index 15ed9efd1..fe0d705d4 100644
+--- a/libvaladoc/html/htmlmarkupwriter.vala
++++ b/libvaladoc/html/htmlmarkupwriter.vala
+@@ -43,12 +43,16 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
+ }, xml_declaration);
+ }
+
++#if HAVE_GRAPHVIZ
+ public MarkupWriter add_usemap (Charts.Chart chart) {
+ string? buf = (string?) chart.write_buffer ("cmapx");
+ if (buf != null) {
+ raw_text ("\n");
+ raw_text ((!) buf);
+ }
++#else
++ public MarkupWriter add_usemap (void* chart) {
++#endif
+
+ return this;
+ }
+--
+2.14.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.36.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.36.4.bb
deleted file mode 100644
index 51000d9..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.36.4.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \
- file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
-"
-
-SRC_URI[md5sum] = "3c19014093f1a3d995357253b463082c"
-SRC_URI[sha256sum] = "e9f23ce711c1a72ce664d10946fbc5953f01b0b7f2a3562e7a01e362d86de059"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.38.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.38.8.bb
new file mode 100644
index 0000000..e2baf65
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.38.8.bb
@@ -0,0 +1,10 @@
+require ${BPN}.inc
+
+SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \
+ file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
+ file://disable-graphviz.patch \
+ file://0001-Disable-valadoc.patch \
+"
+
+SRC_URI[md5sum] = "37edd0467d056fd9e3937d0bbceda80b"
+SRC_URI[sha256sum] = "2fa746b51cd66e43577d1da06a80b708c2875cadaafee77e9700ea35cf23882c"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch
deleted file mode 100644
index e9112da..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From f96cf1f4eaa72860ab8b5e18ad10fdc704d78c5f Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 15 Dec 2015 15:01:34 +0200
-Subject: [PATCH 2/5] remove rpath
-
-Upstream-Status: Inappropriate [embedded config]
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
----
- none/tests/Makefile.am | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am
-index 54f2a7e..25b0f49 100644
---- a/none/tests/Makefile.am
-+++ b/none/tests/Makefile.am
-@@ -326,7 +326,6 @@ threadederrno_CFLAGS += --std=c99
- endif
- tls_SOURCES = tls.c tls2.c
- tls_DEPENDENCIES = tls.so tls2.so
--tls_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests
- tls_LDADD = tls.so tls2.so -lpthread
- tls_so_SOURCES = tls_so.c
- tls_so_DEPENDENCIES = tls2.so
-@@ -334,7 +333,7 @@ if VGCONF_OS_IS_DARWIN
- tls_so_LDFLAGS = -dynamic -dynamiclib -all_load -fpic
- tls_so_LDADD = `pwd`/tls2.so
- else
-- tls_so_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests -shared -fPIC
-+ tls_so_LDFLAGS = -shared -fPIC
- tls_so_LDADD = tls2.so
- endif
- tls_so_CFLAGS = $(AM_CFLAGS) -fPIC
---
-2.6.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/mask-CPUID-support-in-HWCAP-on-aarch64.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/mask-CPUID-support-in-HWCAP-on-aarch64.patch
new file mode 100644
index 0000000..89a95b8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/mask-CPUID-support-in-HWCAP-on-aarch64.patch
@@ -0,0 +1,36 @@
+Fix runtime Valgrind failure
+
+This patch is derived from
+https://bugzilla.redhat.com/show_bug.cgi?id=1464211
+
+At runtime it will fails like this:
+
+ARM64 front end: branch_etc
+disInstr(arm64): unhandled instruction 0xD5380001
+disInstr(arm64): 1101'0101 0011'1000 0000'0000 0000'0001 ==2082==
+valgrind: Unrecognised instruction at address 0x4014e64.
+
+This patch is a workaround by masking all HWCAP
+
+Upstream-Status: Pending
+
+Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
+
+Index: valgrind-3.13.0/coregrind/m_initimg/initimg-linux.c
+===================================================================
+
+--- valgrind-3.13.0.orig/coregrind/m_initimg/initimg-linux.c 2018-03-04 22:22:17.698572675 -0800
++++ valgrind-3.13.0/coregrind/m_initimg/initimg-linux.c 2018-03-04 22:23:25.727815624 -0800
+@@ -703,6 +703,12 @@
+ (and anything above) are not supported by Valgrind. */
+ auxv->u.a_val &= VKI_HWCAP_S390_TE - 1;
+ }
++# elif defined(VGP_arm64_linux)
++ {
++ /* Linux 4.11 started populating this for arm64, but we
++ currently don't support any. */
++ auxv->u.a_val = 0;
++ }
+ # endif
+ break;
+ # if defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb
index bf3cfd7..d3af35e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb
@@ -16,7 +16,6 @@
file://fixed-perl-path.patch \
file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
file://run-ptest \
- file://0002-remove-rpath.patch \
file://0004-Fix-out-of-tree-builds.patch \
file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \
file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \
@@ -37,6 +36,7 @@
file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \
file://link-gz-tests.patch \
file://ppc-headers.patch \
+ file://mask-CPUID-support-in-HWCAP-on-aarch64.patch \
"
SRC_URI[md5sum] = "817dd08f1e8a66336b9ff206400a5369"
SRC_URI[sha256sum] = "d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b"
@@ -86,6 +86,8 @@
do_configure_prepend () {
rm -rf ${S}/config.h
+ sed -i -e 's:$(abs_top_builddir):$(pkglibdir)/ptest:g' ${S}/none/tests/Makefile.am
+ sed -i -e 's:$(top_builddir):$(pkglibdir)/ptest:g' ${S}/memcheck/tests/Makefile.am
}
do_install_append () {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb
deleted file mode 100644
index 021c058..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-# zisofs-tools-native OE build file
-# Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-SUMMARY = "Utilities for creating compressed CD-ROM filesystems"
-HOMEPAGE = "http://freecode.com/projects/zisofs-tools"
-SECTION = "console/utils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-DEPENDS = "zlib-native"
-
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/zisofs-tools/zisofs-tools-${PV}.tar.bz2/2d0ed8c9a1f60b45f949b136f9be1f6c/zisofs-tools-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "2d0ed8c9a1f60b45f949b136f9be1f6c"
-SRC_URI[sha256sum] = "ae4e53e4914934d41660248fb59d3c8761f1f1fd180d5ec993c17ddb3afd04f3"
-
-inherit native
-
-do_install() {
- oe_runmake install INSTALLROOT=${D} bindir=${bindir}
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/acpica/acpica_20170303.bb b/import-layers/yocto-poky/meta/recipes-extended/acpica/acpica_20170303.bb
index 868505b..51ae77b 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/acpica/acpica_20170303.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/acpica/acpica_20170303.bb
@@ -17,7 +17,6 @@
DEPENDS = "bison flex"
SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz \
- file://no-werror.patch \
file://rename-yy_scan_string-manually.patch \
file://manipulate-fds-instead-of-FILE.patch;striplevel=2 \
file://0001-Linux-add-support-for-X32-ABI-compilation.patch \
@@ -49,7 +48,6 @@
PROVIDES = "iasl"
RPROVIDES_${PN} += "iasl"
RREPLACES_${PN} += "iasl"
-RCONFLIGHTS_${PN} += "iasl"
+RCONFLICTS_${PN} += "iasl"
-NATIVE_INSTALL_WORKS = "1"
BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/acpica/files/no-werror.patch b/import-layers/yocto-poky/meta/recipes-extended/acpica/files/no-werror.patch
deleted file mode 100644
index a6e7b54..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/acpica/files/no-werror.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Description: remove -Werror flag
-Forwarded: not-needed
-Author: Fathi Boudra <fathi.boudra@linaro.org>
-Upstream-Status: Pending
----
- generate/unix/iasl/Makefile | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
---- a/generate/unix/iasl/Makefile
-+++ b/generate/unix/iasl/Makefile
-@@ -266,19 +266,19 @@ $(OBJDIR)/prparser.y.h: $(OBJDIR)/prpars
- # by the utilities above and they are not necessarily ANSI C, etc.
- #
- $(OBJDIR)/aslcompilerlex.o : $(OBJDIR)/aslcompilerlex.c
-- $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
-+ $(CC) -c $(CFLAGS) -Wall -o$@ $<
-
- $(OBJDIR)/aslcompilerparse.o : $(OBJDIR)/aslcompilerparse.c
-- $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
-+ $(CC) -c $(CFLAGS) -Wall -o$@ $<
-
- $(OBJDIR)/dtparserlex.o : $(OBJDIR)/dtparserlex.c
-- $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
-+ $(CC) -c $(CFLAGS) -Wall -o$@ $<
-
- $(OBJDIR)/dtparserparse.o : $(OBJDIR)/dtparserparse.c
-- $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
-+ $(CC) -c $(CFLAGS) -Wall -o$@ $<
-
- $(OBJDIR)/prparserlex.o : $(OBJDIR)/prparserlex.c
-- $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
-+ $(CC) -c $(CFLAGS) -Wall -o$@ $<
diff --git a/import-layers/yocto-poky/meta/recipes-extended/at/at/makefile-fix-parallel.patch b/import-layers/yocto-poky/meta/recipes-extended/at/at/makefile-fix-parallel.patch
index 932a4c0..d6056dc 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/at/at/makefile-fix-parallel.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/at/at/makefile-fix-parallel.patch
@@ -15,13 +15,13 @@
Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
-diff --git a/Makefile.in b/Makefile.in
-index 2a9b918..aa7c04a 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -75,7 +75,9 @@ at: $(ATOBJECTS)
+Index: at-3.1.20/Makefile.in
+===================================================================
+--- at-3.1.20.orig/Makefile.in
++++ at-3.1.20/Makefile.in
+@@ -76,7 +76,9 @@ at: $(ATOBJECTS)
atd: $(RUNOBJECTS)
- $(CC) $(LDFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB)
+ $(CC) $(LDFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB) $(SELINUXLIB)
-y.tab.c y.tab.h: parsetime.y
+y.tab.h: y.tab.c
@@ -30,6 +30,3 @@
$(YACC) -d parsetime.y
lex.yy.c: parsetime.l
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/at/at_3.1.20.bb b/import-layers/yocto-poky/meta/recipes-extended/at/at_3.1.20.bb
index 9b537ee..8fe3b43 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/at/at_3.1.20.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/at/at_3.1.20.bb
@@ -5,7 +5,7 @@
SECTION = "base"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
-DEPENDS = "flex flex-native \
+DEPENDS = "flex flex-native bison-native \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash.inc b/import-layers/yocto-poky/meta/recipes-extended/bash/bash.inc
index f4e1f7a..9c2b065 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/bash/bash.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash.inc
@@ -6,7 +6,7 @@
inherit autotools gettext texinfo update-alternatives ptest
-EXTRA_AUTORECONF += "--exclude=autoheader"
+EXTRA_AUTORECONF += "--exclude=autoheader --exclude=aclocal"
EXTRA_OECONF = "--enable-job-control --without-bash-malloc"
# If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
@@ -25,7 +25,7 @@
RDEPENDS_${PN}_class-nativesdk = ""
RDEPENDS_${PN}-ptest += "make"
-DEPENDS_append_libc-glibc = " glibc-locale"
+DEPENDS_append_libc-glibc = " virtual/libc-locale"
RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-fr-fr locale-base-de-de"
USERADD_PACKAGES = "${PN}-ptest"
@@ -33,12 +33,6 @@
CACHED_CONFIGUREVARS += "headersdir=${includedir}/${PN}"
-do_configure_prepend () {
- if [ ! -e ${S}/acinclude.m4 ]; then
- cat ${S}/aclocal.m4 > ${S}/acinclude.m4
- fi
-}
-
do_compile_ptest () {
oe_runmake buildtest
}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/execute_cmd.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/execute_cmd.patch
index 81f8f0a..9970b4d 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/execute_cmd.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/execute_cmd.patch
@@ -1,8 +1,10 @@
Upstream-Status: Inappropriate [embedded specific]
---- execute_cmd.c.orig Fri Jun 3 13:34:42 2011
-+++ execute_cmd.c Fri Jun 3 13:36:41 2011
-@@ -2202,7 +2202,11 @@
+Index: execute_cmd.c
+===================================================================
+--- execute_cmd.c.orig
++++ execute_cmd.c
+@@ -2459,7 +2459,11 @@ execute_pipeline (command, asynchronous,
/* If the `lastpipe' option is set with shopt, and job control is not
enabled, execute the last element of non-async pipelines in the
current shell environment. */
@@ -13,5 +15,5 @@
+#endif
+ asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
{
- lstdin = move_to_high_fd (0, 0, 255);
+ lstdin = move_to_high_fd (0, 1, -1);
if (lstdin > 0)
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/pathexp-dep.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/pathexp-dep.patch
new file mode 100644
index 0000000..e05bbda
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/pathexp-dep.patch
@@ -0,0 +1,13 @@
+pathexp includes libintl.h but doesn't depend on it, thus a build race can occur.
+
+Upstream-Status: Submitted (https://savannah.gnu.org/patch/index.php?9503)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/Makefile.in b/Makefile.in
+index c7b62bc0..241cbf12 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -1281,2 +1281,3 @@ nojobs.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+ y.tab.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
++pathexp.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+ pcomplete.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.4.12.bb b/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.4.12.bb
new file mode 100644
index 0000000..9382a77
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.4.12.bb
@@ -0,0 +1,24 @@
+require bash.inc
+
+# GPLv2+ (< 4.0), GPLv3+ (>= 4.0)
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
+ file://execute_cmd.patch;striplevel=0 \
+ file://mkbuiltins_have_stringize.patch \
+ file://build-tests.patch \
+ file://test-output.patch \
+ file://fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch \
+ file://run-ptest \
+ file://fix-run-builtins.patch \
+ file://0001-help-fix-printf-format-security-warning.patch \
+ file://bash-memleak-bug-fix-for-builtin-command-read.patch \
+ file://pathexp-dep.patch \
+ "
+
+SRC_URI[tarball.md5sum] = "7c112970cbdcadfc331e10eeb5f6aa41"
+SRC_URI[tarball.sha256sum] = "57d8432be54541531a496fd4904fdc08c12542f43605a9202594fa5d5f9f2331"
+
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.4.bb b/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.4.bb
deleted file mode 100644
index e544d07..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.4.bb
+++ /dev/null
@@ -1,59 +0,0 @@
-require bash.inc
-
-# GPLv2+ (< 4.0), GPLv3+ (>= 4.0)
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
- ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-001;apply=yes;striplevel=0;name=patch001 \
- ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-002;apply=yes;striplevel=0;name=patch002 \
- ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-003;apply=yes;striplevel=0;name=patch003 \
- ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-004;apply=yes;striplevel=0;name=patch004 \
- ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-005;apply=yes;striplevel=0;name=patch005 \
- ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-006;apply=yes;striplevel=0;name=patch006 \
- ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-007;apply=yes;striplevel=0;name=patch007 \
- ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-008;apply=yes;striplevel=0;name=patch008 \
- ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-009;apply=yes;striplevel=0;name=patch009 \
- ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-010;apply=yes;striplevel=0;name=patch010 \
- ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-011;apply=yes;striplevel=0;name=patch011 \
- ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-012;apply=yes;striplevel=0;name=patch012 \
- file://execute_cmd.patch;striplevel=0 \
- file://mkbuiltins_have_stringize.patch \
- file://build-tests.patch \
- file://test-output.patch \
- file://fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch \
- file://run-ptest \
- file://fix-run-builtins.patch \
- file://0001-help-fix-printf-format-security-warning.patch \
- file://bash-memleak-bug-fix-for-builtin-command-read.patch \
- "
-
-SRC_URI[tarball.md5sum] = "148888a7c95ac23705559b6f477dfe25"
-SRC_URI[tarball.sha256sum] = "d86b3392c1202e8ff5a423b302e6284db7f8f435ea9f39b5b1b20fd3ac36dfcb"
-
-SRC_URI[patch001.md5sum] = "817d01a6c0af6f79308a8b7b649e53d8"
-SRC_URI[patch001.sha256sum] = "3e28d91531752df9a8cb167ad07cc542abaf944de9353fe8c6a535c9f1f17f0f"
-SRC_URI[patch002.md5sum] = "765e14cff12c7284009772e8e24f2fe0"
-SRC_URI[patch002.sha256sum] = "7020a0183e17a7233e665b979c78c184ea369cfaf3e8b4b11f5547ecb7c13c53"
-SRC_URI[patch003.md5sum] = "49e7da93bf07f510a2eb6bb43ac3e5a2"
-SRC_URI[patch003.sha256sum] = "51df5a9192fdefe0ddca4bdf290932f74be03ffd0503a3d112e4199905e718b2"
-SRC_URI[patch004.md5sum] = "4557d674ab5831a5fa98052ab19edaf4"
-SRC_URI[patch004.sha256sum] = "ad080a30a4ac6c1273373617f29628cc320a35c8cd06913894794293dc52c8b3"
-SRC_URI[patch005.md5sum] = "cce96dd77cdd1d293beec10848f6cbb5"
-SRC_URI[patch005.sha256sum] = "221e4b725b770ad0bb6924df3f8d04f89eeca4558f6e4c777dfa93e967090529"
-SRC_URI[patch006.md5sum] = "d3379f8d8abce5c6ee338f931ad008d5"
-SRC_URI[patch006.sha256sum] = "6a8e2e2a6180d0f1ce39dcd651622fb6d2fd05db7c459f64ae42d667f1e344b8"
-SRC_URI[patch007.md5sum] = "ec38c76ca439ca7f9c178e9baede84fc"
-SRC_URI[patch007.sha256sum] = "de1ccc07b7bfc9e25243ad854f3bbb5d3ebf9155b0477df16aaf00a7b0d5edaf"
-SRC_URI[patch008.md5sum] = "e0ba18c1e3b94f905da9b5bf9d38b58b"
-SRC_URI[patch008.sha256sum] = "86144700465933636d7b945e89b77df95d3620034725be161ca0ca5a42e239ba"
-SRC_URI[patch009.md5sum] = "e952d4f44e612048930c559d90eb99bb"
-SRC_URI[patch009.sha256sum] = "0b6bdd1a18a0d20e330cc3bc71e048864e4a13652e29dc0ebf3918bea729343c"
-SRC_URI[patch010.md5sum] = "57b5b35955d68f9a09dbef6b86d2c782"
-SRC_URI[patch010.sha256sum] = "8465c6f2c56afe559402265b39d9e94368954930f9aa7f3dfa6d36dd66868e06"
-SRC_URI[patch011.md5sum] = "cc896e1fa696b93ded568e557e2392d5"
-SRC_URI[patch011.sha256sum] = "dd56426ef7d7295e1107c0b3d06c192eb9298f4023c202ca2ba6266c613d170d"
-SRC_URI[patch012.md5sum] = "fa47fbfa56fb7e9e5367f19a9df5fc9e"
-SRC_URI[patch012.sha256sum] = "fac271d2bf6372c9903e3b353cb9eda044d7fe36b5aab52f21f3f21cd6a2063e"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch b/import-layers/yocto-poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
index 5379eb6..db013cf 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
@@ -10,12 +10,12 @@
ppdc/Makefile | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
-Index: cups-2.0.0/ppdc/Makefile
+Index: cups-2.2.6/ppdc/Makefile
===================================================================
---- cups-2.0.0.orig/ppdc/Makefile
-+++ cups-2.0.0/ppdc/Makefile
-@@ -242,8 +242,8 @@ genstrings: genstrings.o libcupsppdc.a
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
+--- cups-2.2.6.orig/ppdc/Makefile
++++ cups-2.2.6/ppdc/Makefile
+@@ -228,8 +228,8 @@ genstrings: genstrings.o libcupsppdc.a
+ $(LD_CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
libcupsppdc.a ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) \
$(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
- echo Generating localization strings...
@@ -25,8 +25,8 @@
#
-@@ -260,9 +260,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cu
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
+@@ -246,9 +246,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cu
+ $(LD_CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
$(COMMONLIBS) $(LIBZ)
- echo Testing PPD compiler...
@@ -38,8 +38,8 @@
#
-@@ -288,17 +288,17 @@ ppdi-static: ppdc-static ppdi.o libcups
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdi-static ppdi.o libcupsppdc.a \
+@@ -274,17 +274,17 @@ ppdi-static: ppdc-static ppdi.o libcups
+ $(LD_CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdi-static ppdi.o libcupsppdc.a \
../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
$(COMMONLIBS) $(LIBZ)
- echo Testing PPD importer...
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.2.4.bb b/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.2.4.bb
deleted file mode 100644
index ed94b67..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.2.4.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require cups.inc
-
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f212b4338db0da8cb892e94bf2949460"
-
-SRC_URI[md5sum] = "d26e5a0a574a69fe1d01079b2931fc49"
-SRC_URI[sha256sum] = "596d4db72651c335469ae5f37b0da72ac9f97d73e30838d787065f559dea98cc"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.2.6.bb b/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.2.6.bb
new file mode 100644
index 0000000..3aa934b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.2.6.bb
@@ -0,0 +1,6 @@
+require cups.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f212b4338db0da8cb892e94bf2949460"
+
+SRC_URI[md5sum] = "e91c26d8d97b5a1630a962f530f02192"
+SRC_URI[sha256sum] = "40385778c2b3bdf55030d1c999734e22774c79e3425d91339ce677825620169b"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils.inc b/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils.inc
index 7c5be50..c9e3130 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils.inc
@@ -10,3 +10,4 @@
ALTERNATIVE_${PN} = "diff cmp"
ALTERNATIVE_PRIORITY = "100"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch b/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch
index bf66267..de38104 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch
@@ -5,11 +5,12 @@
Upstream-Status: Inappropriate
(default automake behavior incompatible with ptest)
-diff -ruN a/configure.ac b/configure.ac
---- a/configure.ac 2014-05-28 18:19:13.513980977 +0200
-+++ b/configure.ac 2014-05-28 18:19:21.129660215 +0200
-@@ -2,7 +2,7 @@
- AC_INIT(ethtool, 3.14, netdev@vger.kernel.org)
+Index: ethtool-4.13/configure.ac
+===================================================================
+--- ethtool-4.13.orig/configure.ac
++++ ethtool-4.13/configure.ac
+@@ -2,7 +2,7 @@ dnl Process this file with autoconf to p
+ AC_INIT(ethtool, 4.13, netdev@vger.kernel.org)
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR([ethtool.c])
-AM_INIT_AUTOMAKE([gnu])
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.11.bb b/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.11.bb
deleted file mode 100644
index befe9b9..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.11.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Display or change ethernet card settings"
-DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces."
-HOMEPAGE = "http://www.kernel.org/pub/software/network/ethtool/"
-SECTION = "console/network"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://ethtool.c;beginline=4;endline=17;md5=c19b30548c582577fc6b443626fc1216"
-
-SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \
- file://run-ptest \
- file://avoid_parallel_tests.patch \
- "
-
-SRC_URI[md5sum] = "8f1072679888c9335e49b17efb798b4c"
-SRC_URI[sha256sum] = "af2fd9692f3159d3ab1e41e6f9b7d8db2a4693f1cb22348c88ba89f70f0e6503"
-
-inherit autotools ptest
-RDEPENDS_${PN}-ptest += "make"
-
-do_compile_ptest() {
- oe_runmake buildtest-TESTS
-}
-
-do_install_ptest () {
- cp ${B}/Makefile ${D}${PTEST_PATH}
- install ${B}/test-cmdline ${D}${PTEST_PATH}
- install ${B}/test-features ${D}${PTEST_PATH}
- install ${B}/ethtool ${D}${PTEST_PATH}/ethtool
- sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.13.bb b/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.13.bb
new file mode 100644
index 0000000..c862a57
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.13.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Display or change ethernet card settings"
+DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces."
+HOMEPAGE = "http://www.kernel.org/pub/software/network/ethtool/"
+SECTION = "console/network"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://ethtool.c;beginline=4;endline=17;md5=c19b30548c582577fc6b443626fc1216"
+
+SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \
+ file://run-ptest \
+ file://avoid_parallel_tests.patch \
+ "
+
+SRC_URI[md5sum] = "2ba44eb0ca96752392e9bf8dc83ba302"
+SRC_URI[sha256sum] = "d311c4b557c44c5248ac5436b9e19c391a60d8e4830b6a7f41be16d89c0556de"
+
+inherit autotools ptest
+RDEPENDS_${PN}-ptest += "make"
+
+do_compile_ptest() {
+ oe_runmake buildtest-TESTS
+}
+
+do_install_ptest () {
+ cp ${B}/Makefile ${D}${PTEST_PATH}
+ install ${B}/test-cmdline ${D}${PTEST_PATH}
+ install ${B}/test-features ${D}${PTEST_PATH}
+ install ${B}/ethtool ${D}${PTEST_PATH}/ethtool
+ sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-4.1.4/test-arrayind1-Remove-hashbang-line.patch b/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-4.1.4/test-arrayind1-Remove-hashbang-line.patch
deleted file mode 100644
index d4262ed..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-4.1.4/test-arrayind1-Remove-hashbang-line.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From a3a3f26078223c47871c7b53e5c015ad163ae045 Mon Sep 17 00:00:00 2001
-From: Fabio Berton <fabio.berton@ossystems.com.br>
-Date: Thu, 3 Nov 2016 14:50:52 -0200
-Subject: [PATCH] test/arrayind1: Remove hashbang line
-Organization: O.S. Systems Software LTDA.
-
-Remove "#!/usr/local/bin/awk -f" as none of the other awk scripts in the
-test suite have a hashbang.
-
-Upstream-Status: Submitted [1]
-
-[1] https://lists.gnu.org/archive/html/bug-gawk/2016-11/msg00003.html
-
-Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
----
- test/arrayind1.awk | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/test/arrayind1.awk b/test/arrayind1.awk
-index 5d4a6f3..59e8b4e 100755
---- a/test/arrayind1.awk
-+++ b/test/arrayind1.awk
-@@ -1,4 +1,3 @@
--#!/usr/local/bin/awk -f
- # this script renums pedigrees with metafounders
- # so that they are added *before*regular animals
- # mf are ascertained because they are not in the 1st column
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-4.1.4/run-ptest b/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk/run-ptest
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-4.1.4/run-ptest
rename to import-layers/yocto-poky/meta/recipes-extended/gawk/gawk/run-ptest
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk_4.1.4.bb b/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk_4.1.4.bb
deleted file mode 100644
index 995d37d..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk_4.1.4.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "GNU awk text processing utility"
-DESCRIPTION = "The GNU version of awk, a text processing utility. \
-Awk interprets a special-purpose programming language to do \
-quick and easy text pattern matching and reformatting jobs."
-HOMEPAGE = "https://www.gnu.org/software/gawk/"
-BUGTRACKER = "bug-gawk@gnu.org"
-SECTION = "console/utils"
-
-# gawk <= 3.1.5: GPLv2
-# gawk >= 3.1.6: GPLv3
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-DEPENDS += "readline"
-
-PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
-
-SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
- file://run-ptest \
- file://test-arrayind1-Remove-hashbang-line.patch \
-"
-
-SRC_URI[md5sum] = "f20c94ca51b6ebfc9bffb90f95c8ffbb"
-SRC_URI[sha256sum] = "8c03080e2b5a56263e8783f6f1f306398d4591be18254041f3f547efef944d35"
-
-inherit autotools gettext texinfo update-alternatives
-
-FILES_${PN} += "${datadir}/awk"
-FILES_${PN}-dev += "${libdir}/${BPN}/*.la"
-
-ALTERNATIVE_${PN} = "awk"
-ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
-ALTERNATIVE_PRIORITY = "100"
-
-do_install_append() {
- # remove the link since we don't package it
- rm ${D}${bindir}/awk
-}
-
-inherit ptest
-
-do_install_ptest() {
- mkdir ${D}${PTEST_PATH}/test
- for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests inclib.awk; \
- do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \
- done
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk_4.2.0.bb b/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk_4.2.0.bb
new file mode 100644
index 0000000..27f79a2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk_4.2.0.bb
@@ -0,0 +1,48 @@
+SUMMARY = "GNU awk text processing utility"
+DESCRIPTION = "The GNU version of awk, a text processing utility. \
+Awk interprets a special-purpose programming language to do \
+quick and easy text pattern matching and reformatting jobs."
+HOMEPAGE = "https://www.gnu.org/software/gawk/"
+BUGTRACKER = "bug-gawk@gnu.org"
+SECTION = "console/utils"
+
+# gawk <= 3.1.5: GPLv2
+# gawk >= 3.1.6: GPLv3
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+DEPENDS += "readline"
+
+PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
+
+SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
+ file://run-ptest \
+"
+
+SRC_URI[md5sum] = "0b598c31bc703d66082bd958d4189980"
+SRC_URI[sha256sum] = "c88046c6e8396ee548bcb941e16def809b7b55b60a1044b5dd254094f347c7d9"
+
+inherit autotools gettext texinfo update-alternatives
+
+FILES_${PN} += "${datadir}/awk"
+FILES_${PN}-dev += "${libdir}/${BPN}/*.la"
+
+ALTERNATIVE_${PN} = "awk"
+ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
+ALTERNATIVE_PRIORITY = "100"
+
+do_install_append() {
+ # remove the link since we don't package it
+ rm ${D}${bindir}/awk
+}
+
+inherit ptest
+
+do_install_ptest() {
+ mkdir ${D}${PTEST_PATH}/test
+ for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests inclib.awk; \
+ do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \
+ done
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-7977.patch b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-7977.patch
deleted file mode 100644
index b7eed12..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-7977.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 8abd22010eb4db0fb1b10e430d5f5d83e015ef70 Mon Sep 17 00:00:00 2001
-From: Chris Liddell <chris.liddell@artifex.com>
-Date: Mon, 3 Oct 2016 01:46:28 +0100
-Subject: [PATCH] Bug 697169: Be rigorous with SAFER permissions
-
-Once we've opened our input file from the command line, enforce the SAFER
-rules.
-
-Upstream-Status: Backport
-CVE: CVE-2016-7977
-
-Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
----
- psi/zfile.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/psi/zfile.c b/psi/zfile.c
-index b6caea2..2c6c958 100644
---- a/psi/zfile.c
-+++ b/psi/zfile.c
-@@ -1081,6 +1081,9 @@ lib_file_open(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx
- gs_main_instance *minst = get_minst_from_memory(mem);
- int code;
-
-+ if (i_ctx_p && starting_arg_file)
-+ i_ctx_p->starting_arg_file = false;
-+
- /* when starting arg files (@ files) iodev_default is not yet set */
- if (iodev == 0)
- iodev = (gx_io_device *)gx_io_device_table[0];
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch
index e28a949..b4c14ea 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch
@@ -12,11 +12,12 @@
# Summary: Generate arch.h for ppc32
#
-diff -Nru ghostscript-8.64.orig/base/lib.mak ghostscript-8.64/base/lib.mak
---- ghostscript-8.64.orig/base/lib.mak 2010-02-10 10:30:02.000000000 +0800
-+++ ghostscript-8.64/base/lib.mak 2010-02-10 10:56:21.000000000 +0800
-@@ -67,8 +67,8 @@
- stdpre_h=$(GLSRC)stdpre.h $(stdpn_h)
+Index: ghostscript-9.21/base/lib.mak
+===================================================================
+--- ghostscript-9.21.orig/base/lib.mak
++++ ghostscript-9.21/base/lib.mak
+@@ -73,8 +73,8 @@ arch_h=$(GLGEN)arch.h
+ stdpre_h=$(GLSRC)stdpre.h
stdint__h=$(GLSRC)stdint_.h $(std_h)
-$(GLGEN)arch.h : $(GENARCH_XE)
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.21.bb b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
index bf985c4..50ec7e2 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
@@ -32,7 +32,6 @@
file://ghostscript-9.02-genarch.patch \
file://objarch.h \
file://cups-no-gcrypt.patch \
- file://CVE-2016-7977.patch \
file://CVE-2017-7207.patch \
file://CVE-2017-5951.patch \
file://CVE-2017-7975.patch \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/go-examples/go-helloworld_0.1.bb b/import-layers/yocto-poky/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
index 222fc9d..ab70ea9 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
@@ -7,6 +7,7 @@
SRC_URI = "git://${GO_IMPORT}"
SRCREV = "46695d81d1fae905a270fb7db8a4d11a334562fe"
+UPSTREAM_CHECK_COMMITS = "1"
GO_IMPORT = "github.com/golang/example"
GO_INSTALL = "${GO_IMPORT}/hello"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gperf/gperf.inc b/import-layers/yocto-poky/meta/recipes-extended/gperf/gperf.inc
deleted file mode 100644
index a8ce230..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/gperf/gperf.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION = "GNU gperf is a perfect hash function generator"
-HOMEPAGE = "http://www.gnu.org/software/gperf"
-SUMMARY = "Generate a perfect hash function from a set of keywords"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://src/main.cc;beginline=8;endline=19;md5=dec8f611845d047387ed56b5b85fa99b"
-
-SRC_URI = "${GNU_MIRROR}/gperf/gperf-${PV}.tar.gz"
-
-inherit autotools
-
-# autoreconf couldn't find acinclude.m4 when stepping into subdirectory. Instead of
-# duplicating acinclude.m4 in every subdirectory, use absolute include path to aclocal
-EXTRA_AUTORECONF += " -I ${S}"
-
-do_configure_prepend() {
- if [ ! -e ${S}/acinclude.m4 ]; then
- cat ${S}/aclocal.m4 > ${S}/acinclude.m4
- fi
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gperf/gperf_3.1.bb b/import-layers/yocto-poky/meta/recipes-extended/gperf/gperf_3.1.bb
index 942820b..f61b2a3 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/gperf/gperf_3.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/gperf/gperf_3.1.bb
@@ -1,5 +1,18 @@
-require gperf.inc
+DESCRIPTION = "GNU gperf is a perfect hash function generator"
+HOMEPAGE = "http://www.gnu.org/software/gperf"
+SUMMARY = "Generate a perfect hash function from a set of keywords"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://src/main.cc;beginline=8;endline=19;md5=dec8f611845d047387ed56b5b85fa99b"
-
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz"
SRC_URI[md5sum] = "9e251c0a618ad0824b51117d5d9db87e"
SRC_URI[sha256sum] = "588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2"
+
+inherit autotools
+
+# The nested configures don't find the parent aclocal.m4 out of the box, so tell
+# it where to look explicitly (mirroring the behaviour of upstream's Makefile.devel).
+EXTRA_AUTORECONF += " -I ${S} --exclude=aclocal"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/grep/grep_3.1.bb b/import-layers/yocto-poky/meta/recipes-extended/grep/grep_3.1.bb
index 05b6b93..71810dc 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/grep/grep_3.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/grep/grep_3.1.bb
@@ -14,8 +14,6 @@
inherit autotools gettext texinfo pkgconfig
-EXTRA_OECONF = "--disable-perl-regexp"
-
# Fix "Argument list too long" error when len(TMPDIR) = 410
acpaths = "-I ./m4"
@@ -36,6 +34,9 @@
inherit update-alternatives
+PACKAGECONFIG ??= "pcre"
+PACKAGECONFIG[pcre] = "--enable-perl-regexp,--disable-perl-regexp,libpcre"
+
ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE_${PN} = "grep egrep fgrep"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gzip/files/0001-gzip-port-zdiff-zless-to-Busybox.patch b/import-layers/yocto-poky/meta/recipes-extended/gzip/files/0001-gzip-port-zdiff-zless-to-Busybox.patch
deleted file mode 100644
index 20d5a19..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/gzip/files/0001-gzip-port-zdiff-zless-to-Busybox.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 5f712621829ed81a758077431226a86df37fbc3b Mon Sep 17 00:00:00 2001
-From: Denys Zagorui <denys.zagorui@globallogic.com>
-Date: Thu, 8 Jun 2017 16:05:50 +0300
-Subject: [PATCH] gzip: port zdiff, zless to Busybox
-
-Problem reported by Denys Zagorui (Bug#26088).
-* tests/zdiff: Check that diff uses POSIX-format output.
-* zless.in (less_version): Don't exit merely because 'less -V'
-fails; instead, assume 'less' is compatible with an old version of
-the original 'less'. Busybox 'less -V' fails, but apparently its
-'less' works anyway somehow.
-
-Signed-off-by: Denys Zagorui <denys.zagorui@globallogic.com>
-
-Upstream-Status: Accepted
----
- tests/zdiff | 4 +++-
- zless.in | 2 +-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/tests/zdiff b/tests/zdiff
-index 0bb7c7d..9cd4fd4 100755
---- a/tests/zdiff
-+++ b/tests/zdiff
-@@ -22,7 +22,6 @@
-
- echo a > a || framework_failure_
- echo b > b || framework_failure_
--gzip a b || framework_failure_
-
- cat <<EOF > exp
- 1c1
-@@ -31,7 +30,10 @@ cat <<EOF > exp
- > b
- EOF
-
-+diff a b | diff exp - || skip_ "diff output format is incompatible with POSIX"
-+
- fail=0
-+gzip a b || fail=1
- zdiff a.gz b.gz > out 2>&1
- test $? = 1 || fail=1
-
-diff --git a/zless.in b/zless.in
-index e634af6..9759ae6 100644
---- a/zless.in
-+++ b/zless.in
-@@ -47,7 +47,7 @@ if test "${LESSMETACHARS+set}" != set; then
- export LESSMETACHARS
- fi
-
--less_version=`less -V` || exit
-+less_version=`less -V 2>/dev/null`
- case $less_version in
- less' '45[1-9]* | \
- less' '4[6-9][0-9]* | \
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.8/wrong-path-fix.patch b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.8/wrong-path-fix.patch
deleted file mode 100644
index 4dc1000..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.8/wrong-path-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-fix MakeMaker issues with using wrong SHELL/GREP
-
-A set of substitution is being processed to all target scripts with sed by
-replacing some key words with the detected values at configure time, this
-is exactly not compliant with cross compling, and will cause missing path
-errors at run time like:
-"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory"
-
-Fixed by removing unneeded substitution and using real runtime paths
-instead.
-
-Signed-off-by: Ming Liu <ming.liu@windriver.com>
-
-Upstream-Status: Pending
-
-Index: gzip-1.8/Makefile.am
-===================================================================
---- gzip-1.8.orig/Makefile.am
-+++ gzip-1.8/Makefile.am
-@@ -81,8 +81,7 @@ gzip.doc.gz: gzip.doc $(bin_PROGRAMS)
- SUFFIXES = .in
- .in:
- $(AM_V_GEN)sed \
-- -e 's|/bin/sh|$(SHELL)|g' \
-- -e 's|[@]GREP@|$(GREP)|g' \
-+ -e 's|[@]GREP@|$(base_bindir)/grep|g' \
- -e 's|[@]VERSION@|$(VERSION)|g' \
- $(srcdir)/$@.in >$@-t \
- && chmod a+x $@-t \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.9/wrong-path-fix.patch b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.9/wrong-path-fix.patch
new file mode 100644
index 0000000..7c37bc8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.9/wrong-path-fix.patch
@@ -0,0 +1,36 @@
+fix MakeMaker issues with using wrong SHELL/GREP
+
+A set of substitution is being processed to all target scripts with sed by
+replacing some key words with the detected values at configure time, this
+is exactly not compliant with cross compling, and will cause missing path
+errors at run time like:
+"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory"
+
+Fixed by removing unneeded substitution and using real runtime paths
+instead.
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+
+Upstream-Status: Pending
+
+---
+ Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index d4ecc3f..e4657d2 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -82,8 +82,7 @@ SUFFIXES = .in
+ .in:
+ $(AM_V_GEN)rm -f $@-t $@ \
+ && sed \
+- -e 's|/bin/sh|$(SHELL)|g' \
+- -e 's|[@]GREP@|$(GREP)|g' \
++ -e 's|[@]GREP@|$(base_bindir)/grep|g' \
+ -e 's|[@]VERSION@|$(VERSION)|g' \
+ $(srcdir)/$@.in >$@-t \
+ && chmod a=rx $@-t \
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.8.bb b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.8.bb
deleted file mode 100644
index d093207..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.8.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-require gzip.inc
-
-LICENSE = "GPLv3+"
-
-SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz \
- file://0001-gzip-port-zdiff-zless-to-Busybox.patch \
- file://run-ptest"
-SRC_URI_append_class-target = " file://wrong-path-fix.patch"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e"
-
-PROVIDES_append_class-native = " gzip-replacement-native"
-
-BBCLASSEXTEND = "native"
-
-inherit ptest
-
-do_install_ptest() {
- mkdir -p ${D}${PTEST_PATH}/src/build-aux
- cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/src/build-aux/
- mkdir -p ${D}${PTEST_PATH}/src/tests
- cp -r ${S}/tests/* ${D}${PTEST_PATH}/src/tests
- sed -e 's/^abs_srcdir = ..*/abs_srcdir = \.\./' \
- -e 's/^top_srcdir = ..*/top_srcdir = \.\./' \
- -e 's/^GREP = ..*/GREP = grep/' \
- -e 's/^AWK = ..*/AWK = awk/' \
- -e 's/^srcdir = ..*/srcdir = \./' \
- -e 's/^Makefile: ..*/Makefile: /' \
- -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
- -e 's|${DEBUG_PREFIX_MAP}||g' \
- -e 's:${HOSTTOOLS_DIR}/::g' \
- -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
- ${B}/tests/Makefile > ${D}${PTEST_PATH}/src/tests/Makefile
-}
-
-SRC_URI[md5sum] = "732553152814b22dc35aa0267df5286c"
-SRC_URI[sha256sum] = "1ff7aedb3d66a0d73f442f6261e4b3860df6fd6c94025c2cb31a202c9c60fe0e"
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.9.bb b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.9.bb
new file mode 100644
index 0000000..a8eeba1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.9.bb
@@ -0,0 +1,38 @@
+require gzip.inc
+
+LICENSE = "GPLv3+"
+
+SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz \
+ file://run-ptest"
+SRC_URI_append_class-target = " file://wrong-path-fix.patch"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e"
+
+PROVIDES_append_class-native = " gzip-replacement-native"
+
+BBCLASSEXTEND = "native"
+
+inherit ptest
+
+do_install_ptest() {
+ mkdir -p ${D}${PTEST_PATH}/src/build-aux
+ cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/src/build-aux/
+ mkdir -p ${D}${PTEST_PATH}/src/tests
+ cp -r ${S}/tests/* ${D}${PTEST_PATH}/src/tests
+ sed -e 's/^abs_srcdir = ..*/abs_srcdir = \.\./' \
+ -e 's/^top_srcdir = ..*/top_srcdir = \.\./' \
+ -e 's/^GREP = ..*/GREP = grep/' \
+ -e 's/^AWK = ..*/AWK = awk/' \
+ -e 's/^srcdir = ..*/srcdir = \./' \
+ -e 's/^Makefile: ..*/Makefile: /' \
+ -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ ${B}/tests/Makefile > ${D}${PTEST_PATH}/src/tests/Makefile
+}
+
+SRC_URI[md5sum] = "929d6a6b832f75b28e3eeeafb30c1d9b"
+SRC_URI[sha256sum] = "5d2d3a3432ef32f24cdb060d278834507b481a75adeca18850c73592f778f6ad"
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm/wiper.sh-fix-stat-path.patch b/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm/wiper.sh-fix-stat-path.patch
new file mode 100644
index 0000000..4af1b61
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm/wiper.sh-fix-stat-path.patch
@@ -0,0 +1,38 @@
+From e233006ee212109d2a1401dac37a9a851cc493d8 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Thu, 14 Dec 2017 15:23:47 +0800
+Subject: [PATCH] wiper.sh: fix stat path
+
+Fix the stat path for OE.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ wiper/wiper.sh | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/wiper/wiper.sh b/wiper/wiper.sh
+index 79eddc8..9ef2840 100755
+--- a/wiper/wiper.sh
++++ b/wiper/wiper.sh
+@@ -97,7 +97,6 @@ function find_prog(){
+ hash -r ## Refresh bash's cached PATH entries
+ HDPARM=`find_prog /sbin/hdparm` || exit 1
+ FIND=`find_prog /usr/bin/find` || exit 1
+-STAT=`find_prog /usr/bin/stat` || exit 1
+ GAWK=`find_prog /usr/bin/gawk` || exit 1
+ BLKID=`find_prog /sbin/blkid` || exit 1
+ GREP=`find_prog /bin/grep` || exit 1
+@@ -105,7 +104,7 @@ ID=`find_prog /usr/bin/id` || exit 1
+ LS=`find_prog /bin/ls` || exit 1
+ DF=`find_prog /bin/df` || exit 1
+ RM=`find_prog /bin/rm` || exit 1
+-STAT=`find_prog /usr/bin/stat` || exit 1
++STAT=`find_prog /bin/stat` || exit 1
+
+ [ $verbose -gt 1 ] && HDPARM="$HDPARM --verbose"
+
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.52.bb b/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.52.bb
deleted file mode 100644
index 49fdc94..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.52.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "Utility for viewing/manipulating IDE disk drive/driver parameters"
-HOMEPAGE = "http://sourceforge.net/projects/hdparm/"
-DESCRIPTION = "hdparm is a Linux shell utility for viewing \
-and manipulating various IDE drive and driver parameters."
-SECTION = "console/utils"
-
-LICENSE = "BSD & GPLv2"
-LICENSE_${PN} = "BSD"
-LICENSE_${PN}-dbg = "BSD"
-LICENSE_wiper = "GPLv2"
-
-LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=495d03e50dc6c89d6a30107ab0df5b03 \
- file://debian/copyright;md5=a82d7ba3ade9e8ec902749db98c592f3 \
- file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \
- file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09"
-
-
-PACKAGES =+ "wiper"
-
-FILES_wiper = "${bindir}/wiper.sh"
-
-RDEPENDS_wiper = "bash gawk stat"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/${BP}.tar.gz"
-
-SRC_URI[md5sum] = "410539d0bf3cc247181594581edbfb53"
-SRC_URI[sha256sum] = "c3429cd423e271fa565bf584598fd751dd2e773bb7199a592b06b5a61cec4fb6"
-
-EXTRA_OEMAKE = 'STRIP="echo" LDFLAGS="${LDFLAGS}"'
-
-inherit update-alternatives
-
-ALTERNATIVE_${PN} = "hdparm"
-ALTERNATIVE_LINK_NAME[hdparm] = "${base_sbindir}/hdparm"
-ALTERNATIVE_PRIORITY = "100"
-
-do_install () {
- install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir}
- oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install
- cp ${S}/wiper/wiper.sh ${D}/${bindir}
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.53.bb b/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.53.bb
new file mode 100644
index 0000000..4c3ec5c4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.53.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Utility for viewing/manipulating IDE disk drive/driver parameters"
+HOMEPAGE = "http://sourceforge.net/projects/hdparm/"
+DESCRIPTION = "hdparm is a Linux shell utility for viewing \
+and manipulating various IDE drive and driver parameters."
+SECTION = "console/utils"
+
+LICENSE = "BSD & GPLv2"
+LICENSE_${PN} = "BSD"
+LICENSE_${PN}-dbg = "BSD"
+LICENSE_wiper = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=495d03e50dc6c89d6a30107ab0df5b03 \
+ file://debian/copyright;md5=a82d7ba3ade9e8ec902749db98c592f3 \
+ file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \
+ file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09"
+
+
+PACKAGES =+ "wiper"
+
+FILES_wiper = "${bindir}/wiper.sh"
+
+RDEPENDS_wiper = "bash gawk coreutils"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/${BP}.tar.gz \
+ file://wiper.sh-fix-stat-path.patch \
+ "
+
+SRC_URI[md5sum] = "1e54b52e0c8cb79389d4d47eacba411d"
+SRC_URI[sha256sum] = "2673f591df6916c6a1faec07069a7eb1cb8ee307615a615d808192fb0c0265e5"
+
+EXTRA_OEMAKE = 'STRIP="echo" LDFLAGS="${LDFLAGS}"'
+
+inherit update-alternatives
+
+ALTERNATIVE_${PN} = "hdparm"
+ALTERNATIVE_LINK_NAME[hdparm] = "${base_sbindir}/hdparm"
+ALTERNATIVE_PRIORITY = "100"
+
+do_install () {
+ install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir}
+ oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install
+ cp ${S}/wiper/wiper.sh ${D}/${bindir}
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch b/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
deleted file mode 100644
index f1f85a6..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-[PATCH] fix build with musl
-
-Define additional TCOPTS if not there
-u_initX types are in sys/types.h be explicit about it
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
-diff -Naur iptables-1.6.0-origin/extensions/libxt_TCPOPTSTRIP.c iptables-1.6.0/extensions/libxt_TCPOPTSTRIP.c
---- iptables-1.6.0-origin/extensions/libxt_TCPOPTSTRIP.c 2015-12-09 14:55:06.000000000 +0200
-+++ iptables-1.6.0/extensions/libxt_TCPOPTSTRIP.c 2015-12-29 14:44:32.585327077 +0200
-@@ -12,6 +12,21 @@
- #ifndef TCPOPT_MD5SIG
- # define TCPOPT_MD5SIG 19
- #endif
-+#ifndef TCPOPT_MAXSEG
-+#define TCPOPT_MAXSEG 2
-+#endif
-+#ifndef TCPOPT_WINDOW
-+#define TCPOPT_WINDOW 3
-+#endif
-+#ifndef TCPOPT_SACK_PERMITTED
-+#define TCPOPT_SACK_PERMITTED 4
-+#endif
-+#ifndef TCPOPT_SACK
-+#define TCPOPT_SACK 5
-+#endif
-+#ifndef TCPOPT_TIMESTAMP
-+#define TCPOPT_TIMESTAMP 8
-+#endif
-
- enum {
- O_STRIP_OPTION = 0,
-diff -Naur iptables-1.6.0-origin/include/linux/netfilter_ipv4/ip_tables.h iptables-1.6.0/include/linux/netfilter_ipv4/ip_tables.h
---- iptables-1.6.0-origin/include/linux/netfilter_ipv4/ip_tables.h 2015-12-09 14:55:06.000000000 +0200
-+++ iptables-1.6.0/include/linux/netfilter_ipv4/ip_tables.h 2015-12-29 14:40:21.250469195 +0200
-@@ -15,6 +15,7 @@
- #ifndef _IPTABLES_H
- #define _IPTABLES_H
-
-+#include <sys/types.h>
- #include <linux/types.h>
-
- #include <linux/netfilter_ipv4.h>
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch b/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch
deleted file mode 100644
index 24ee29e..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 19593491f43b70c1a71c3b9b8f4ff4fd14500014 Mon Sep 17 00:00:00 2001
-From: Bruce Ashfield <bruce.ashfield@windriver.com>
-Date: Fri, 23 Mar 2012 14:27:20 -0400
-Subject: [PATCH] types.h: add defines that are required for if_packet.h
-
-The iptables local linux/types.h overrides the kernel/sysroot
-types.h. As such, we need to provide some defines that are required
-to build against 3.2+ kernel headers.
-
-ifndef protection is provided for the defines to ensure that
-configuration that already have these defines are still buildable.
-
-This commit is temporary until a new version of iptables can be
-used that contains the defines.
-
-This is similar to the commit in the iptables git repository:
-
- https://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commit;h=dbe77cc974cee656eae37e75039dd1a410a4535b
-
-Upstream-Status: Backport
-
-Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
----
- include/linux/types.h | 10 ++++++++++
- 1 files changed, 10 insertions(+), 0 deletions(-)
-
-diff --git a/include/linux/types.h b/include/linux/types.h
-index 8b483c8..ebf6432 100644
---- a/include/linux/types.h
-+++ b/include/linux/types.h
-@@ -34,5 +34,15 @@ typedef __u64 __bitwise __be64;
- typedef __u16 __bitwise __sum16;
- typedef __u32 __bitwise __wsum;
-
-+#ifndef __aligned_u64
-+#define __aligned_u64 __u64 __attribute__((aligned(8)))
-+#endif
-+#ifndef __aligned_be64
-+#define __aligned_be64 __be64 __attribute__((aligned(8)))
-+#endif
-+#ifndef __aligned_le64
-+#define __aligned_le64 __le64 __attribute__((aligned(8)))
-+#endif
-+
- #endif /* __ASSEMBLY__ */
- #endif /* _LINUX_TYPES_H */
---
-1.7.0.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables_1.6.1.bb b/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables_1.6.1.bb
deleted file mode 100644
index b37c55a..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables_1.6.1.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "Tools for managing kernel packet filtering capabilities"
-DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \
-filtering code in Linux."
-HOMEPAGE = "http://www.netfilter.org/"
-BUGTRACKER = "http://bugzilla.netfilter.org/"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\
- file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc"
-
-RRECOMMENDS_${PN} = "kernel-module-x-tables \
- kernel-module-ip-tables \
- kernel-module-iptable-filter \
- kernel-module-iptable-nat \
- kernel-module-nf-defrag-ipv4 \
- kernel-module-nf-conntrack \
- kernel-module-nf-conntrack-ipv4 \
- kernel-module-nf-nat \
- kernel-module-ipt-masquerade"
-FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables"
-
-SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
- file://types.h-add-defines-that-are-required-for-if_packet.patch \
- file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
- file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \
- file://0001-fix-build-with-musl.patch \
-"
-
-SRC_URI[md5sum] = "ab38a33806b6182c6f53d6afb4619add"
-SRC_URI[sha256sum] = "0fc2d7bd5d7be11311726466789d4c65fb4c8e096c9182b56ce97440864f0cf5"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \
- "
-PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
-
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-# libnfnetlink recipe is in meta-networking layer
-PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack"
-
-# libnftnl recipe is in meta-networking layer(previously known as libnftables)
-PACKAGECONFIG[libnftnl] = "--enable-nftables,--disable-nftables,libnftnl"
-
-do_configure_prepend() {
- # Remove some libtool m4 files
- # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive.
- rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables_1.6.2.bb b/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables_1.6.2.bb
new file mode 100644
index 0000000..38a83d2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables_1.6.2.bb
@@ -0,0 +1,47 @@
+SUMMARY = "Tools for managing kernel packet filtering capabilities"
+DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \
+filtering code in Linux."
+HOMEPAGE = "http://www.netfilter.org/"
+BUGTRACKER = "http://bugzilla.netfilter.org/"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\
+ file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc"
+
+RRECOMMENDS_${PN} = "kernel-module-x-tables \
+ kernel-module-ip-tables \
+ kernel-module-iptable-filter \
+ kernel-module-iptable-nat \
+ kernel-module-nf-defrag-ipv4 \
+ kernel-module-nf-conntrack \
+ kernel-module-nf-conntrack-ipv4 \
+ kernel-module-nf-nat \
+ kernel-module-ipt-masquerade"
+FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables"
+
+SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
+ file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
+ file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \
+"
+
+SRC_URI[md5sum] = "7d2b7847e4aa8832a18437b8a4c1873d"
+SRC_URI[sha256sum] = "55d02dfa46263343a401f297d44190f2a3e5113c8933946f094ed40237053733"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \
+ "
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+# libnfnetlink recipe is in meta-networking layer
+PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack"
+
+# libnftnl recipe is in meta-networking layer(previously known as libnftables)
+PACKAGECONFIG[libnftnl] = "--enable-nftables,--disable-nftables,libnftnl"
+
+do_configure_prepend() {
+ # Remove some libtool m4 files
+ # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive.
+ rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch b/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch
new file mode 100644
index 0000000..ce8cfeb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch
@@ -0,0 +1,95 @@
+From c6c5966d9fae27bc2f0a34ab59b999555111bd2d Mon Sep 17 00:00:00 2001
+From: Aric Belsito <lluixhi@gmail.com>
+Date: Sun, 29 Oct 2017 23:17:03 +0100
+Subject: [PATCH] Fix build on MUSL
+
+Add missing AI_IDN and NI_IDN declarations.
+
+Bug: https://bugs.gentoo.org/503914
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ arping.c | 7 +++++++
+ ping.h | 11 +++++++++++
+ tracepath.c | 8 ++++++++
+ traceroute6.c | 4 ++++
+ 4 files changed, 30 insertions(+)
+
+diff --git a/arping.c b/arping.c
+index 1a3f40b..531d29d 100644
+--- a/arping.c
++++ b/arping.c
+@@ -45,6 +45,13 @@ struct sysfs_devattr_values;
+ #ifdef USE_IDN
+ #include <idna.h>
+ #include <locale.h>
++
++#ifndef AI_IDN
++#define AI_IDN 0x0040
++#endif
++#ifndef AI_CANONIDN
++#define AI_CANONIDN 0x0080
++#endif
+ #endif
+
+ #include "SNAPSHOT.h"
+diff --git a/ping.h b/ping.h
+index 749f3ff..227315f 100644
+--- a/ping.h
++++ b/ping.h
+@@ -38,6 +38,17 @@
+ #include <locale.h>
+ #include <idna.h>
+ #include <stringprep.h>
++
++#ifndef AI_IDN
++#define AI_IDN 0x0040
++#endif
++#ifndef AI_CANONIDN
++#define AI_CANONIDN 0x0080
++#endif
++#ifndef NI_IDN
++#define NI_IDN 32
++#endif
++
+ #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN)
+ #define getnameinfo_flags NI_IDN
+ #else
+diff --git a/tracepath.c b/tracepath.c
+index 74a829d..dcec5b9 100644
+--- a/tracepath.c
++++ b/tracepath.c
+@@ -30,6 +30,14 @@
+ #ifdef USE_IDN
+ #include <idna.h>
+ #include <locale.h>
++
++#ifndef AI_IDN
++#define AI_IDN 0x0040
++#endif
++#ifndef NI_IDN
++#define NI_IDN 32
++#endif
++
+ #define getnameinfo_flags NI_IDN
+ #else
+ #define getnameinfo_flags 0
+diff --git a/traceroute6.c b/traceroute6.c
+index 48fc5c5..8d1eebf 100644
+--- a/traceroute6.c
++++ b/traceroute6.c
+@@ -251,6 +251,10 @@
+ #include <idna.h>
+ #include <locale.h>
+
++#ifndef NI_IDN
++#define NI_IDN 32
++#endif
++
+ #define getnameinfo_flags NI_IDN
+ #else
+ #define getnameinfo_flags 0
+--
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch b/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch
deleted file mode 100644
index 20ef07e..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From be0bb81d72fea4d20da74f4f2236aa145684f332 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 6 Jan 2016 14:14:22 -0800
-Subject: [PATCH] Fix header inclusion for musl
-
-Fix errors e.g.
-
-In file included from tracepath.c:17:0:
-/usr/include/linux/errqueue.h:33:18:
-error: array type has incomplete element type 'struct timespec'
- struct timespec ts[3];
- ^
-tracepath.c: In function 'main':
-tracepath.c:329:16: error: 'INT_MAX' undeclared (first use in this
-function)
- overhead, INT_MAX);
- ^
-tracepath.c:329:16: note: each undeclared identifier is reported only
-once for each function it appears in
-Makefile:131: recipe for target 'tracepath.o' failed
-make: *** [tracepath.o] Error 1
-
-ping_common.c: In function 'main_loop':
-ping_common.c:756:15: error: 'HZ' undeclared (first use in this
-function)
- if (1000 % HZ == 0 ? next <= 1000 / HZ : (next < INT_MAX / HZ &&
-next * HZ <= 1000)) {
-
-protocols/timed.h is not needed and is absent in musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- clockdiff.c | 1 -
- ping_common.c | 1 +
- tracepath.c | 2 ++
- tracepath6.c | 1 +
- 4 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/clockdiff.c b/clockdiff.c
-index 7c1ea1b..1d6341e 100644
---- a/clockdiff.c
-+++ b/clockdiff.c
-@@ -14,7 +14,6 @@
- #include <netinet/ip.h>
- #include <netinet/ip_icmp.h>
- #define TSPTYPES
--#include <protocols/timed.h>
- #include <fcntl.h>
- #include <netdb.h>
- #include <arpa/inet.h>
-diff --git a/ping_common.c b/ping_common.c
-index 7f82851..3ce699d 100644
---- a/ping_common.c
-+++ b/ping_common.c
-@@ -2,6 +2,7 @@
- #include <ctype.h>
- #include <sched.h>
- #include <math.h>
-+#include <asm-generic/param.h>
-
- int options;
-
-diff --git a/tracepath.c b/tracepath.c
-index 89e6d16..c9d6ddd 100644
---- a/tracepath.c
-+++ b/tracepath.c
-@@ -12,6 +12,8 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-+#include <limits.h>
-+#include <time.h>
- #include <sys/socket.h>
- #include <linux/types.h>
- #include <linux/errqueue.h>
-diff --git a/tracepath6.c b/tracepath6.c
-index 126fadf..9d5745c 100644
---- a/tracepath6.c
-+++ b/tracepath6.c
-@@ -12,6 +12,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-+#include <limits.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netinet/icmp6.h>
---
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch b/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch
deleted file mode 100644
index 6da01dc..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 000629f74908a2a95f6104444c77ad93cf40d62d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 13 Jan 2016 08:50:50 +0000
-Subject: [PATCH] Intialize struct elements by name
-
-makes it portable across glibc and musl
-
-Fixes errors
-
-| ping.c: In function 'send_probe':
-| ping.c:735:19: warning: initialization makes integer from pointer
-without a cast [-Wint-conversion]
-| &iov, 1, &cmsg, 0, 0 };
-| ^
-| ping.c:735:19: note: (near initialization for 'm.__pad1')
-| ping.c:735:19: error: initializer element is not computable at load
-time
-| ping.c:735:19: note: (near initialization for 'm.__pad1')
-| make: *** [ping.o] Error 1
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- ping.c | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/ping.c b/ping.c
-index 4989760..e67f381 100644
---- a/ping.c
-+++ b/ping.c
-@@ -731,8 +731,15 @@ int send_probe()
-
- do {
- static struct iovec iov = {outpack, 0};
-- static struct msghdr m = { &whereto, sizeof(whereto),
-- &iov, 1, &cmsg, 0, 0 };
-+ static struct msghdr m = {
-+ .msg_name = &whereto,
-+ .msg_namelen = sizeof(whereto),
-+ .msg_iov = &iov,
-+ .msg_iovlen = 1,
-+ .msg_control = &cmsg,
-+ .msg_controllen = 0,
-+ .msg_flags= 0,
-+ };
- m.msg_controllen = cmsg_len;
- iov.iov_len = cc;
-
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/arping-fix-arping-hang-if-SIGALRM-is-blocked.patch b/import-layers/yocto-poky/meta/recipes-extended/iputils/files/arping-fix-arping-hang-if-SIGALRM-is-blocked.patch
deleted file mode 100644
index 7b56276..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/arping-fix-arping-hang-if-SIGALRM-is-blocked.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-arping: fix arping hang if SIGALRM is blocked
-
-Unblock SIGALRM so that the previously called alarm() can prevent
-recvfrom() from blocking forever in case the inherited procmask is
-blocking SIGALRM and no packet is received.
-
-Upstream-Status: Backport
-
-Reported-by: Rui Prior <rprior@dcc.fc.up.pt>
-RH-Bugzilla: #1085971
-Signed-off-by: Jan Synacek <jsynacek@redhat.com>
-Signed-off-by: Zhenbo Gao <zhenbo.gao@windriver.com>
-
-diff --git a/arping.c.orig b/arping.c
-index 35408c1..2098159 100644
---- a/arping.c.orig
-+++ b/arping.c
-@@ -1215,16 +1215,22 @@ main(int argc, char **argv)
- socklen_t alen = sizeof(from);
- int cc;
-
-+ sigemptyset(&sset);
-+ sigaddset(&sset, SIGALRM);
-+ sigaddset(&sset, SIGINT);
-+ /* Unblock SIGALRM so that the previously called alarm()
-+ * can prevent recvfrom from blocking forever in case the
-+ * inherited procmask is blocking SIGALRM and no packet
-+ * is received. */
-+ sigprocmask(SIG_UNBLOCK, &sset, &osset);
-+
- if ((cc = recvfrom(s, packet, sizeof(packet), 0,
- (struct sockaddr *)&from, &alen)) < 0) {
- perror("arping: recvfrom");
- continue;
- }
-
-- sigemptyset(&sset);
-- sigaddset(&sset, SIGALRM);
-- sigaddset(&sset, SIGINT);
-- sigprocmask(SIG_BLOCK, &sset, &osset);
-+ sigprocmask(SIG_BLOCK, &sset, NULL);
- recv_pack(packet, cc, (struct sockaddr_ll *)&from);
- sigprocmask(SIG_SETMASK, &osset, NULL);
- }
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/debian/targets.diff b/import-layers/yocto-poky/meta/recipes-extended/iputils/files/debian/targets.diff
deleted file mode 100644
index 2cb5576..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/debian/targets.diff
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Inappropriate [disable feature]
-
-Index: iputils-s20121221/Makefile
-===================================================================
---- iputils-s20121221.orig/Makefile
-+++ iputils-s20121221/Makefile
-@@ -106,7 +106,7 @@ endif
- endif
-
- # -------------------------------------
--IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
-+IPV4_TARGETS=tracepath ping clockdiff arping
- IPV6_TARGETS=tracepath6 traceroute6 ping6
- TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff b/import-layers/yocto-poky/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff
deleted file mode 100644
index d3b1886..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff
+++ /dev/null
@@ -1,31 +0,0 @@
-Upstream-Status: Pending [from other distro Debian]
-
-Index: iputils-s20121221/tracepath.c
-===================================================================
---- iputils-s20121221.orig/tracepath.c
-+++ iputils-s20121221/tracepath.c
-@@ -370,9 +370,9 @@ main(int argc, char **argv)
- }
- #endif
-
-- he = gethostbyname(p);
-+ he = gethostbyname2(argv[0], AF_INET);
- if (he == NULL) {
-- herror("gethostbyname");
-+ herror("gethostbyname2");
- exit(1);
- }
-
-Index: iputils-s20121221/ping.c
-===================================================================
---- iputils-s20121221.orig/ping.c
-+++ iputils-s20121221/ping.c
-@@ -279,7 +279,7 @@ main(int argc, char **argv)
- #else
- idn = target;
- #endif
-- hp = gethostbyname(idn);
-+ hp = gethostbyname2(idn, AF_INET);
- if (!hp) {
- fprintf(stderr, "ping: unknown host %s\n", target);
- exit(2);
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch b/import-layers/yocto-poky/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch
deleted file mode 100644
index 92bf946..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Fix nsgmls path issue
-
-Upstream-Status: Pending
-
-Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
-
-Index: iputils-s20101006/doc/Makefile
-===================================================================
---- iputils-s20101006.orig/doc/Makefile 2011-09-13 20:42:27.000000000 +0800
-+++ iputils-s20101006/doc/Makefile 2011-09-13 21:01:52.000000000 +0800
-@@ -27,10 +27,15 @@
- # docbook2man produces utterly ugly output and I did not find
- # any way to customize this but hacking backend perl script a little.
- # Well, hence...
-+# nsgmls seems append path to search directory according to the sysid path.
-+# e.g. if input ../index.db, it would search $search_directory/../ rather than
-+# $search_directory, which leads searching failure. Fixing nsgmls probably
-+# introduce some side effects, so use this ugly hack: running nsgmls in current
-+# directory, and running docbook2man in tmp directory.
-
- $(MANFILES): index.db
- @-mkdir tmp.db2man
-- @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
-+ @set -e; nsgmls $< >tmp.db2man/output; cd tmp.db2man; cat output | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
- @-rm -rf tmp.db2man
-
- clean:
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/iputils_s20151218.bb b/import-layers/yocto-poky/meta/recipes-extended/iputils/iputils_s20151218.bb
deleted file mode 100644
index 46de6fc..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iputils/iputils_s20151218.bb
+++ /dev/null
@@ -1,72 +0,0 @@
-SUMMARY = "Network monitoring tools"
-DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
-tracepath, tracepath6, ping, ping6 and arping."
-HOMEPAGE = "http://www.skbuff.net/iputils"
-SECTION = "console/network"
-
-LICENSE = "BSD & GPLv2+"
-
-LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f00766dd278d82 \
- file://tracepath.c;beginline=1;endline=10;md5=0ecea2bf60bff2f3d840096d87647f3d \
- file://arping.c;beginline=1;endline=11;md5=fe84301b5c2655c950f8b92a057fafa6 \
- file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 "
-
-DEPENDS = "gnutls libcap libgcrypt"
-
-
-SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \
- file://debian/use_gethostbyname2.diff \
- file://debian/targets.diff \
- file://nsgmls-path-fix.patch \
- file://0001-Fix-header-inclusion-for-musl.patch \
- file://0001-Intialize-struct-elements-by-name.patch \
- file://arping-fix-arping-hang-if-SIGALRM-is-blocked.patch \
- "
-
-SRC_URI[md5sum] = "8aaa7395f27dff9f57ae016d4bc753ce"
-SRC_URI[sha256sum] = "549f58d71951e52b46595829134d4e330642f522f50026917fadc349a54825a1"
-
-UPSTREAM_CHECK_REGEX = "iputils-(?P<pver>s\d+).tar"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-do_compile () {
- oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" all
-}
-
-do_install () {
- install -m 0755 -d ${D}${base_bindir}
- # SUID root programs
- install -m 4555 ping ${D}${base_bindir}/ping
- install -m 4555 ping6 ${D}${base_bindir}/ping6
- install -m 4555 traceroute6 ${D}${base_bindir}/
- install -m 4555 clockdiff ${D}${base_bindir}/
- # Other programgs
- for i in arping tracepath tracepath6; do
- install -m 0755 $i ${D}${base_bindir}/
- done
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-
-ALTERNATIVE_${PN}-ping = "ping"
-ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
-
-ALTERNATIVE_${PN}-ping6 = "ping6"
-ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
-
-PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff"
-
-ALLOW_EMPTY_${PN} = "1"
-RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff"
-
-FILES_${PN} = ""
-FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
-FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
-FILES_${PN}-arping = "${base_bindir}/arping"
-FILES_${PN}-tracepath = "${base_bindir}/tracepath"
-FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6"
-FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6"
-FILES_${PN}-clockdiff = "${base_bindir}/clockdiff"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/iputils_s20161105.bb b/import-layers/yocto-poky/meta/recipes-extended/iputils/iputils_s20161105.bb
new file mode 100644
index 0000000..0125739
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/iputils/iputils_s20161105.bb
@@ -0,0 +1,62 @@
+SUMMARY = "Network monitoring tools"
+DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
+tracepath, tracepath6, ping, ping6 and arping."
+HOMEPAGE = "https://github.com/iputils/iputils"
+SECTION = "console/network"
+
+LICENSE = "BSD & GPLv2+"
+
+LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f00766dd278d82 \
+ file://tracepath.c;beginline=1;endline=10;md5=0ecea2bf60bff2f3d840096d87647f3d \
+ file://arping.c;beginline=1;endline=11;md5=fe84301b5c2655c950f8b92a057fafa6 \
+ file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 "
+
+DEPENDS = "gnutls libcap libgcrypt"
+
+SRC_URI = "git://github.com/iputils/iputils \
+ file://0001-Fix-build-on-MUSL.patch \
+ "
+S = "${WORKDIR}/git"
+SRCREV = "bffc0e957b98d626ab4cea218c89251201425442"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>s\d+)"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[libidn] = "USE_IDN=yes,USE_IDN=no,libidn"
+
+do_compile () {
+ oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" ${PACKAGECONFIG_CONFARGS} all
+}
+
+do_install () {
+ install -m 0755 -d ${D}${base_bindir}
+ # SUID root programs
+ install -m 4555 ping ${D}${base_bindir}/ping
+ install -m 4555 traceroute6 ${D}${base_bindir}/
+ install -m 4555 clockdiff ${D}${base_bindir}/
+ # Other programgs
+ for i in arping tracepath; do
+ install -m 0755 $i ${D}${base_bindir}/
+ done
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN}-ping = "ping"
+ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
+
+PACKAGES += "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff"
+
+ALLOW_EMPTY_${PN} = "1"
+RDEPENDS_${PN} += "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff"
+
+FILES_${PN} = ""
+FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
+FILES_${PN}-arping = "${base_bindir}/arping"
+FILES_${PN}-tracepath = "${base_bindir}/tracepath"
+FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6"
+FILES_${PN}-clockdiff = "${base_bindir}/clockdiff"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/less/less_487.bb b/import-layers/yocto-poky/meta/recipes-extended/less/less_487.bb
deleted file mode 100644
index 23ae484..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/less/less_487.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "Text file viewer similar to more"
-DESCRIPTION = "Less is a program similar to more, i.e. a terminal \
-based program for viewing text files and the output from other \
-programs. Less offers many features beyond those that more does."
-HOMEPAGE = "http://www.greenwoodsoftware.com/"
-SECTION = "console/utils"
-
-# (GPLv2+ (<< 418), GPLv3+ (>= 418)) | less
-# Including email author giving permissing to use BSD
-#
-# From: Mark Nudelman <markn@greenwoodsoftware.com>
-# To: Elizabeth Flanagan <elizabeth.flanagan@intel.com
-# Date: 12/19/11
-#
-# Hi Elizabeth,
-# Using a generic BSD license for less is fine with me.
-# Thanks,
-#
-# --Mark
-#
-
-LICENSE = "GPLv3+ | BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://LICENSE;md5=2ef3e4b8dafc85612bc5254b8081e234"
-DEPENDS = "ncurses"
-
-SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \
- "
-
-SRC_URI[md5sum] = "dcc8bf183a83b362d37fe9ef8df1fb60"
-SRC_URI[sha256sum] = "f3dc8455cb0b2b66e0c6b816c00197a71bf6d1787078adeee0bcf2aea4b12706"
-
-UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html"
-
-inherit autotools update-alternatives
-
-do_install () {
- oe_runmake 'bindir=${D}${bindir}' 'mandir=${D}${mandir}' install
-}
-
-ALTERNATIVE_${PN} = "less"
-ALTERNATIVE_PRIORITY = "100"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/less/less_529.bb b/import-layers/yocto-poky/meta/recipes-extended/less/less_529.bb
new file mode 100644
index 0000000..c86f754
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/less/less_529.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Text file viewer similar to more"
+DESCRIPTION = "Less is a program similar to more, i.e. a terminal \
+based program for viewing text files and the output from other \
+programs. Less offers many features beyond those that more does."
+HOMEPAGE = "http://www.greenwoodsoftware.com/"
+SECTION = "console/utils"
+
+# (GPLv2+ (<< 418), GPLv3+ (>= 418)) | less
+# Including email author giving permissing to use BSD
+#
+# From: Mark Nudelman <markn@greenwoodsoftware.com>
+# To: Elizabeth Flanagan <elizabeth.flanagan@intel.com
+# Date: 12/19/11
+#
+# Hi Elizabeth,
+# Using a generic BSD license for less is fine with me.
+# Thanks,
+#
+# --Mark
+#
+
+LICENSE = "GPLv3+ | BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://LICENSE;md5=2ef3e4b8dafc85612bc5254b8081e234"
+DEPENDS = "ncurses"
+
+SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \
+ "
+
+SRC_URI[md5sum] = "32018b53a1f7319ab54349baf80e6aa8"
+SRC_URI[sha256sum] = "dba42cd4c38174b7bd0d426d8a39df2be6bcc1ec18946a4642713290f6bf9a0b"
+
+UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html"
+
+inherit autotools update-alternatives
+
+do_install () {
+ oe_runmake 'bindir=${D}${bindir}' 'mandir=${D}${mandir}' install
+}
+
+ALTERNATIVE_${PN} = "less"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libaio/libaio/destdir.patch b/import-layers/yocto-poky/meta/recipes-extended/libaio/libaio/destdir.patch
index dad9601..0f90406 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/libaio/libaio/destdir.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/libaio/libaio/destdir.patch
@@ -2,16 +2,16 @@
from openembedded, added by Qing He <qing.he@intel.com>
-Index: libaio-0.3.106/Makefile
+Index: libaio-0.3.110/Makefile
===================================================================
---- libaio-0.3.106.orig/Makefile 2004-02-26 07:25:10.000000000 -0800
-+++ libaio-0.3.106/Makefile 2006-10-14 09:19:07.000000000 -0700
-@@ -15,7 +15,7 @@
+--- libaio-0.3.110.orig/Makefile
++++ libaio-0.3.110/Makefile
+@@ -15,7 +15,7 @@ all:
@$(MAKE) -C src
install:
- @$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) libdir=$(libdir)
+ @$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) includedir=$(DESTDIR)$(includedir) libdir=$(DESTDIR)$(libdir)
-
- clean:
+ check:
+ @$(MAKE) -C harness check
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch b/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch
index 5683d3c..db91317 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch
@@ -9,12 +9,12 @@
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/05/03
-Index: libidn-1.24/configure.ac
+Index: libidn-1.33/configure.ac
===================================================================
---- libidn-1.24.orig/configure.ac
-+++ libidn-1.24/configure.ac
-@@ -34,6 +34,10 @@ AC_SUBST(LT_CURRENT, 17)
- AC_SUBST(LT_REVISION, 7)
+--- libidn-1.33.orig/configure.ac
++++ libidn-1.33/configure.ac
+@@ -33,6 +33,10 @@ AC_SUBST(LT_CURRENT, 17)
+ AC_SUBST(LT_REVISION, 16)
AC_SUBST(LT_AGE, 6)
+# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libmnl/libmnl_1.0.4.bb b/import-layers/yocto-poky/meta/recipes-extended/libmnl/libmnl_1.0.4.bb
index b458799..23262e8 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/libmnl/libmnl_1.0.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/libmnl/libmnl_1.0.4.bb
@@ -11,3 +11,5 @@
SRC_URI[tar.sha256sum] = "171f89699f286a5854b72b91d06e8f8e3683064c5901fb09d954a9ab6f551f81"
inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libpipeline/libpipeline_1.5.0.bb b/import-layers/yocto-poky/meta/recipes-extended/libpipeline/libpipeline_1.5.0.bb
new file mode 100644
index 0000000..14cc9e5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/libpipeline/libpipeline_1.5.0.bb
@@ -0,0 +1,14 @@
+SUMMARY = "pipeline manipulation library"
+DESCRIPTION = "This is a C library for setting up and running pipelines of processes, \
+without needing to involve shell command-line parsing which is often \
+error-prone and insecure."
+HOMEPAGE = "http://libpipeline.nongnu.org/"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/libpipeline/libpipeline-${PV}.tar.gz"
+SRC_URI[md5sum] = "b7437a5020190cfa84f09c412db38902"
+SRC_URI[sha256sum] = "0d72e12e4f2afff67fd7b9df0a24d7ba42b5a7c9211ac5b3dcccc5cd8b286f2b"
+
+inherit pkgconfig autotools
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch
index a575d0e..e5cb60d 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch
@@ -1,4 +1,4 @@
-From 4d9b6ec30b78d00ead0a22eb5d047dcdba37e99c Mon Sep 17 00:00:00 2001
+From 47c6f1b4332a9e4935c48cca826786a6b8fe6f59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Neal=20Gompa=20=28=E3=83=8B=E3=83=BC=E3=83=AB=E3=83=BB?=
=?UTF-8?q?=E3=82=B3=E3=82=99=E3=83=B3=E3=83=8F=E3=82=9A=29?=
<ngompa13@gmail.com>
@@ -13,6 +13,7 @@
Upstream-Status: Denied [https://github.com/openSUSE/libsolv/pull/112]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
ext/CMakeLists.txt | 7 ++
ext/solv_xfopen.c | 10 +--
@@ -23,7 +24,7 @@
create mode 100644 ext/solv_xfopen_fallback_fopencookie.h
diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt
-index 586eda8..477a2ef 100644
+index b8917a2..fac6c32 100644
--- a/ext/CMakeLists.txt
+++ b/ext/CMakeLists.txt
@@ -4,6 +4,13 @@ SET (libsolvext_SRCS
@@ -41,11 +42,11 @@
SET (libsolvext_SRCS ${libsolvext_SRCS}
pool_fileconflicts.c repo_rpmdb.c)
diff --git a/ext/solv_xfopen.c b/ext/solv_xfopen.c
-index b0421bf..31345dd 100644
+index 2c64bb6..eb3a3ad 100644
--- a/ext/solv_xfopen.c
+++ b/ext/solv_xfopen.c
-@@ -13,6 +13,10 @@
- #include <zlib.h>
+@@ -12,6 +12,10 @@
+ #include <string.h>
#include <fcntl.h>
+#if !defined(HAVE_FUNOPEN) && !defined(HAVE_FOPENCOOKIE)
@@ -55,7 +56,7 @@
#include "solv_xfopen.h"
#include "util.h"
-@@ -39,7 +43,7 @@ static FILE *cookieopen(void *cookie, const char *mode,
+@@ -21,7 +25,7 @@ static FILE *cookieopen(void *cookie, const char *mode,
ssize_t (*cwrite)(void *, const char *, size_t),
int (*cclose)(void *))
{
@@ -64,7 +65,7 @@
if (!cookie)
return 0;
return funopen(cookie,
-@@ -48,7 +52,7 @@ static FILE *cookieopen(void *cookie, const char *mode,
+@@ -30,7 +34,7 @@ static FILE *cookieopen(void *cookie, const char *mode,
(fpos_t (*)(void *, fpos_t, int))NULL, /* seekfn */
cclose
);
@@ -73,7 +74,7 @@
cookie_io_functions_t cio;
if (!cookie)
-@@ -60,8 +64,6 @@ static FILE *cookieopen(void *cookie, const char *mode,
+@@ -42,8 +46,6 @@ static FILE *cookieopen(void *cookie, const char *mode,
cio.write = cwrite;
cio.close = cclose;
return fopencookie(cookie, *mode == 'w' ? "w" : "r", cio);
@@ -246,5 +247,5 @@
+
+#endif
--
-2.11.0
+2.4.0
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-repo_rpmdb.c-increase-MAX_HDR_CNT-and-MAX_HDR_DSIZE.patch b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-repo_rpmdb.c-increase-MAX_HDR_CNT-and-MAX_HDR_DSIZE.patch
deleted file mode 100644
index 4a4e5cb..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-repo_rpmdb.c-increase-MAX_HDR_CNT-and-MAX_HDR_DSIZE.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 1c4c935cb73ac1ccb9693df1a51ba218a22e8ca8 Mon Sep 17 00:00:00 2001
-From: Ming Liu <liu.ming50@gmail.com>
-Date: Sat, 30 Sep 2017 11:15:16 +0800
-Subject: [PATCH] repo_rpmdb.c: increase MAX_HDR_CNT and MAX_HDR_DSIZE
-
-Upstream-Status: Submitted [https://github.com/openSUSE/libsolv/pull/230]
-
-We encountered 'corrupt rpm' issues when installing extreme big RPM
-packages like the kernel-devsrc package of Yocto project.
-
-It can be fixed by increasing MAX_HDR_CNT and MAX_HDR_DSIZE per test.
-
-Signed-off-by: Ming Liu <liu.ming50@gmail.com>
----
- ext/repo_rpmdb.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c
-index c7000a9..7000835 100644
---- a/ext/repo_rpmdb.c
-+++ b/ext/repo_rpmdb.c
-@@ -170,8 +170,8 @@
- #define MAX_SIG_CNT 0x100000
- #define MAX_SIG_DSIZE 0x100000
-
--#define MAX_HDR_CNT 0x100000
--#define MAX_HDR_DSIZE 0x2000000
-+#define MAX_HDR_CNT 0x200000
-+#define MAX_HDR_DSIZE 0x4000000
-
- typedef struct rpmhead {
- int cnt;
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0002-Fixes-to-internal-fopencookie-implementation.patch b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0002-Fixes-to-internal-fopencookie-implementation.patch
index efb4e3a..93b8cc9 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0002-Fixes-to-internal-fopencookie-implementation.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0002-Fixes-to-internal-fopencookie-implementation.patch
@@ -1,4 +1,4 @@
-From 99b10cdf6a0f8a24e1670c1813b1d9563ae3f5b5 Mon Sep 17 00:00:00 2001
+From 84e12bf7ece49073c559dfd58005132a6099a964 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Neal=20Gompa=20=28=E3=83=8B=E3=83=BC=E3=83=AB=E3=83=BB?=
=?UTF-8?q?=E3=82=B3=E3=82=99=E3=83=B3=E3=83=8F=E3=82=9A=29?=
<ngompa13@gmail.com>
@@ -11,6 +11,7 @@
Upstream-Status: Denied [https://github.com/openSUSE/libsolv/pull/112]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
ext/solv_xfopen_fallback_fopencookie.c | 19 ++++++++++---------
ext/solv_xfopen_fallback_fopencookie.h | 10 +++++-----
@@ -100,5 +101,5 @@
#ifndef SOLV_XFOPEN_FALLBACK_FOPENCOOKIE_H
--
-2.11.0
+2.4.0
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_0.6.28.bb b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_0.6.28.bb
deleted file mode 100644
index 6c8f7fc..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_0.6.28.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Library for solving packages and reading repositories"
-HOMEPAGE = "https://github.com/openSUSE/libsolv"
-BUGTRACKER = "https://github.com/openSUSE/libsolv/issues"
-SECTION = "devel"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
-
-DEPENDS = "expat zlib rpm"
-
-SRC_URI = "git://github.com/openSUSE/libsolv.git \
- file://0001-repo_rpmdb.c-increase-MAX_HDR_CNT-and-MAX_HDR_DSIZE.patch \
- "
-SRC_URI_append_libc-musl = " file://0001-Add-fallback-fopencookie-implementation.patch \
- file://0002-Fixes-to-internal-fopencookie-implementation.patch \
- "
-
-SRCREV = "b8a9ddd88eb4e0ab351eb55a53186b5dc5ac0825"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
-
-S = "${WORKDIR}/git"
-
-inherit cmake
-
-EXTRA_OECMAKE = "-DLIB=${baselib} -DMULTI_SEMANTICS=ON -DENABLE_RPMMD=ON -DENABLE_RPMDB=ON -DENABLE_COMPLEX_DEPS=ON"
-
-PACKAGES =+ "${PN}-tools ${PN}ext"
-
-FILES_${PN}-dev += "${datadir}/cmake/Modules/FindLibSolv.cmake"
-FILES_${PN}-tools = "${bindir}/*"
-FILES_${PN}ext = "${libdir}/${PN}ext.so.*"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_0.6.33.bb b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_0.6.33.bb
new file mode 100644
index 0000000..0401ced
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_0.6.33.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Library for solving packages and reading repositories"
+HOMEPAGE = "https://github.com/openSUSE/libsolv"
+BUGTRACKER = "https://github.com/openSUSE/libsolv/issues"
+SECTION = "devel"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
+
+DEPENDS = "expat zlib rpm"
+
+SRC_URI = "git://github.com/openSUSE/libsolv.git \
+ "
+SRC_URI_append_libc-musl = " file://0001-Add-fallback-fopencookie-implementation.patch \
+ file://0002-Fixes-to-internal-fopencookie-implementation.patch \
+ "
+
+SRCREV = "69f1803978ba7a46a57928fa4be6430792419e4e"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+EXTRA_OECMAKE = "-DLIB=${baselib} -DMULTI_SEMANTICS=ON -DENABLE_RPMMD=ON -DENABLE_RPMDB=ON -DENABLE_COMPLEX_DEPS=ON"
+
+PACKAGES =+ "${PN}-tools ${PN}ext"
+
+FILES_${PN}-tools = "${bindir}/*"
+FILES_${PN}ext = "${libdir}/${PN}ext.so.*"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb b/import-layers/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb
index 1765346..7ec54eb 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb
@@ -22,6 +22,9 @@
DEPENDS = "popt libpam glib-2.0 python3"
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "pam"
+
inherit autotools gettext python3native python3-dir pkgconfig gtk-doc
EXTRA_OEMAKE = "PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch b/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch
index b8c7f37..f17bdce 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch
@@ -1,4 +1,4 @@
-From e7a8c925b9316a72bdc8f32789ffe56fda5c4788 Mon Sep 17 00:00:00 2001
+From 22afc5d9aaa215c3c87ba21c77d47da44ab3b113 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 26 Aug 2016 18:20:32 +0300
Subject: [PATCH] Use pkg-config for pcre dependency instead of -config script.
@@ -7,31 +7,36 @@
Upstream-Status: Pending
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
- configure.ac | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
+ configure.ac | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 1d172a1..a9236da 100644
+index 5383cec..c29a902 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -380,11 +380,12 @@ if test "$WITH_PCRE" != "no"; then
- PCRE_LIB="-L$WITH_PCRE/lib -lpcre"
- CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include"
- else
-- AC_PATH_PROG(PCRECONFIG, pcre-config)
-- if test x"$PCRECONFIG" != x; then
-- PCRE_LIB=`$PCRECONFIG --libs`
-- CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`"
-- fi
-+ PKG_CHECK_MODULES(PCREPKG, [libpcre], [
+@@ -651,10 +651,18 @@ AC_ARG_WITH([pcre],
+ )
+ AC_MSG_RESULT([$WITH_PCRE])
+
+-if test "$WITH_PCRE" != no; then
+- if test "$WITH_PCRE" != yes; then
+- PCRE_LIB="-L$WITH_PCRE/lib -lpcre"
+- CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include"
++if test "$WITH_PCRE" != "no"; then
++ PKG_CHECK_MODULES(PCREPKG, [libpcre], [
+ PCRE_LIB=${PCREPKG_LIBS}
+ CPPFLAGS="$CPPFLAGS ${PCREPKG_CFLAGS}"
-+ ], [
++ ], [
+ AC_MSG_ERROR([pcre pkgconfig not found, install the pcre-devel package or build with --without-pcre])
-+ ])
- fi
-
- if test x"$PCRE_LIB" != x; then
++ ])
++
++ if test x"$PCRE_LIB" != x; then
++ AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre])
++ AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h])
++ AC_SUBST(PCRE_LIB)
+ else
+ AC_PATH_PROG([PCRECONFIG], [pcre-config])
+ if test -n "$PCRECONFIG"; then
--
-2.9.3
+2.15.0
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.45.bb b/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.45.bb
deleted file mode 100644
index 08dda33..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.45.bb
+++ /dev/null
@@ -1,85 +0,0 @@
-SUMMARY = "Lightweight high-performance web server"
-HOMEPAGE = "http://www.lighttpd.net/"
-BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
-
-SECTION = "net"
-RDEPENDS_${PN} = "lighttpd-module-dirlisting \
- lighttpd-module-indexfile \
- lighttpd-module-staticfile"
-RRECOMMENDS_${PN} = "lighttpd-module-access \
- lighttpd-module-accesslog"
-
-SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
- file://index.html.lighttpd \
- file://lighttpd.conf \
- file://lighttpd \
- file://lighttpd.service \
- file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \
- "
-
-SRC_URI[md5sum] = "a128e1eda76899ce3fd115efae5fe631"
-SRC_URI[sha256sum] = "1c97225deea33eefba6d4158c2cef27913d47553263516bbe9d2e2760fc43a3f"
-
-PACKAGECONFIG ??= "openssl pcre zlib \
- ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
-"
-
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
-PACKAGECONFIG[mmap] = "--enable-mmap,--disable-mmap"
-PACKAGECONFIG[libev] = "--with-libev,--without-libev,libev"
-PACKAGECONFIG[mysql] = "--with-mysql,--without-mysql,mariadb"
-PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
-PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
-PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
-PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
-PACKAGECONFIG[krb5] = "--with-krb5,--without-krb5,krb5"
-PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
-PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
-PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
-PACKAGECONFIG[webdav-props] = "--with-webdav-props,--without-webdav-props,libxml2 sqlite3"
-PACKAGECONFIG[webdav-locks] = "--with-webdav-locks,--without-webdav-locks,util-linux"
-PACKAGECONFIG[gdbm] = "--with-gdbm,--without-gdbm,gdbm"
-PACKAGECONFIG[memcache] = "--with-memcached,--without-memcached,libmemcached"
-PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua5.1"
-
-EXTRA_OECONF += "--enable-lfs"
-
-inherit autotools pkgconfig update-rc.d gettext systemd
-
-INITSCRIPT_NAME = "lighttpd"
-INITSCRIPT_PARAMS = "defaults 70"
-
-SYSTEMD_SERVICE_${PN} = "lighttpd.service"
-
-do_install_append() {
- install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
- install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
- install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
- install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
-
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@SBINDIR@,${sbindir},g' \
- -e 's,@SYSCONFDIR@,${sysconfdir},g' \
- -e 's,@BASE_BINDIR@,${base_bindir},g' \
- ${D}${systemd_unitdir}/system/lighttpd.service
- #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
- ln -sf ${localstatedir}/log ${D}/www/logs
- ln -sf ${localstatedir}/tmp ${D}/www/var
-}
-
-FILES_${PN} += "${sysconfdir} /www"
-
-CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
-
-PACKAGES_DYNAMIC += "^lighttpd-module-.*"
-
-python populate_packages_prepend () {
- lighttpd_libdir = d.expand('${libdir}')
- do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb b/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb
new file mode 100644
index 0000000..3c4444c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb
@@ -0,0 +1,85 @@
+SUMMARY = "Lightweight high-performance web server"
+HOMEPAGE = "http://www.lighttpd.net/"
+BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
+
+SECTION = "net"
+RDEPENDS_${PN} = "lighttpd-module-dirlisting \
+ lighttpd-module-indexfile \
+ lighttpd-module-staticfile"
+RRECOMMENDS_${PN} = "lighttpd-module-access \
+ lighttpd-module-accesslog"
+
+SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
+ file://index.html.lighttpd \
+ file://lighttpd.conf \
+ file://lighttpd \
+ file://lighttpd.service \
+ file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \
+ "
+
+SRC_URI[md5sum] = "1e3a9eb5078f481e3a8a1d0aaac8c3c8"
+SRC_URI[sha256sum] = "0f8ad5aac7529d7b948b9d7e8cd0b4a9e177309d85d6bf6516e28e6e40d74f36"
+
+PACKAGECONFIG ??= "openssl pcre zlib \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
+"
+
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
+PACKAGECONFIG[mmap] = "--enable-mmap,--disable-mmap"
+PACKAGECONFIG[libev] = "--with-libev,--without-libev,libev"
+PACKAGECONFIG[mysql] = "--with-mysql,--without-mysql,mariadb"
+PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
+PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
+PACKAGECONFIG[krb5] = "--with-krb5,--without-krb5,krb5"
+PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre"
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
+PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
+PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
+PACKAGECONFIG[webdav-props] = "--with-webdav-props,--without-webdav-props,libxml2 sqlite3"
+PACKAGECONFIG[webdav-locks] = "--with-webdav-locks,--without-webdav-locks,util-linux"
+PACKAGECONFIG[gdbm] = "--with-gdbm,--without-gdbm,gdbm"
+PACKAGECONFIG[memcache] = "--with-memcached,--without-memcached,libmemcached"
+PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua5.1"
+
+EXTRA_OECONF += "--enable-lfs"
+
+inherit autotools pkgconfig update-rc.d gettext systemd
+
+INITSCRIPT_NAME = "lighttpd"
+INITSCRIPT_PARAMS = "defaults 70"
+
+SYSTEMD_SERVICE_${PN} = "lighttpd.service"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
+ install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
+ install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
+ install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ ${D}${systemd_unitdir}/system/lighttpd.service
+ #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
+ ln -sf ${localstatedir}/log ${D}/www/logs
+ ln -sf ${localstatedir}/tmp ${D}/www/var
+}
+
+FILES_${PN} += "${sysconfdir} /www"
+
+CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
+
+PACKAGES_DYNAMIC += "^lighttpd-module-.*"
+
+python populate_packages_prepend () {
+ lighttpd_libdir = d.expand('${libdir}')
+ do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/logrotate/logrotate_3.12.3.bb b/import-layers/yocto-poky/meta/recipes-extended/logrotate/logrotate_3.12.3.bb
deleted file mode 100644
index 620b208..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/logrotate/logrotate_3.12.3.bb
+++ /dev/null
@@ -1,85 +0,0 @@
-SUMMARY = "Rotates, compresses, removes and mails system log files"
-SECTION = "console/utils"
-HOMEPAGE = "https://github.com/logrotate/logrotate/issues"
-LICENSE = "GPLv2"
-
-# TODO: Document coreutils dependency. Why not RDEPENDS? Why not busybox?
-
-DEPENDS="coreutils popt"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-# When updating logrotate to latest upstream, SRC_URI should point to
-# a proper release tarball from https://github.com/logrotate/logrotate/releases
-# and we have to take the snapshot for now because there is no such
-# tarball available for 3.9.1.
-
-S = "${WORKDIR}/${BPN}-${PV}"
-
-UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
-UPSTREAM_CHECK_REGEX = "logrotate-(?P<pver>\d+(\.\d+)+).tar"
-
-SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz \
- file://act-as-mv-when-rotate.patch \
- file://update-the-manual.patch \
- file://disable-check-different-filesystems.patch \
- "
-
-SRC_URI[md5sum] = "a560c57fac87c45b2fc17406cdf79288"
-SRC_URI[sha256sum] = "2e6a401cac9024db2288297e3be1a8ab60e7401ba8e91225218aaf4a27e82a07"
-
-PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}"
-
-PACKAGECONFIG[acl] = ",,acl"
-PACKAGECONFIG[selinux] = ",,libselinux"
-
-CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \
- ${sysconfdir}/logrotate.conf"
-
-# If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our
-# optimization variables, so use it rather than EXTRA_CFLAGS.
-EXTRA_OEMAKE = "\
- LFS= \
- OS_NAME='${OS_NAME}' \
- 'CC=${CC}' \
- 'RPM_OPT_FLAGS=${CFLAGS}' \
- 'EXTRA_LDFLAGS=${LDFLAGS}' \
- ${@bb.utils.contains('PACKAGECONFIG', 'acl', 'WITH_ACL=yes', '', d)} \
- ${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'WITH_SELINUX=yes', '', d)} \
-"
-
-# OS_NAME in the makefile defaults to `uname -s`. The behavior for
-# freebsd/netbsd is questionable, so leave it as Linux, which only sets
-# INSTALL=install and BASEDIR=/usr.
-OS_NAME = "Linux"
-
-inherit autotools systemd
-
-SYSTEMD_SERVICE_${PN} = "\
- ${BPN}.service \
- ${BPN}.timer \
-"
-
-LOGROTATE_SYSTEMD_TIMER_BASIS ?= "daily"
-LOGROTATE_SYSTEMD_TIMER_ACCURACY ?= "12h"
-
-do_install(){
- oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir}
- mkdir -p ${D}${sysconfdir}/logrotate.d
- mkdir -p ${D}${localstatedir}/lib
- install -p -m 644 ${S}/examples/logrotate-default ${D}${sysconfdir}/logrotate.conf
- touch ${D}${localstatedir}/lib/logrotate.status
-
- if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
- install -d ${D}${systemd_system_unitdir}
- install -m 0644 ${S}/examples/logrotate.service ${D}${systemd_system_unitdir}/logrotate.service
- install -m 0644 ${S}/examples/logrotate.timer ${D}${systemd_system_unitdir}/logrotate.timer
- sed -i -e 's,OnCalendar=.*$,OnCalendar=${LOGROTATE_SYSTEMD_TIMER_BASIS},g' ${D}${systemd_system_unitdir}/logrotate.timer
- sed -i -e 's,AccuracySec=.*$,AccuracySec=${LOGROTATE_SYSTEMD_TIMER_ACCURACY},g' ${D}${systemd_system_unitdir}/logrotate.timer
- fi
-
- if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
- mkdir -p ${D}${sysconfdir}/cron.daily
- install -p -m 0755 ${S}/examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate
- fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/logrotate/logrotate_3.13.0.bb b/import-layers/yocto-poky/meta/recipes-extended/logrotate/logrotate_3.13.0.bb
new file mode 100644
index 0000000..990cf91
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/logrotate/logrotate_3.13.0.bb
@@ -0,0 +1,85 @@
+SUMMARY = "Rotates, compresses, removes and mails system log files"
+SECTION = "console/utils"
+HOMEPAGE = "https://github.com/logrotate/logrotate/issues"
+LICENSE = "GPLv2"
+
+# TODO: Document coreutils dependency. Why not RDEPENDS? Why not busybox?
+
+DEPENDS="coreutils popt"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+# When updating logrotate to latest upstream, SRC_URI should point to
+# a proper release tarball from https://github.com/logrotate/logrotate/releases
+# and we have to take the snapshot for now because there is no such
+# tarball available for 3.9.1.
+
+S = "${WORKDIR}/${BPN}-${PV}"
+
+UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
+UPSTREAM_CHECK_REGEX = "logrotate-(?P<pver>\d+(\.\d+)+).tar"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz \
+ file://act-as-mv-when-rotate.patch \
+ file://update-the-manual.patch \
+ file://disable-check-different-filesystems.patch \
+ "
+
+SRC_URI[md5sum] = "78ef24d6fddcc4df8e412dd75c551b4c"
+SRC_URI[sha256sum] = "3222ca032f99be8d7a4a8c6ad69f3dcc49b9511bfe384bd5a271ebcd9bd3e52c"
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}"
+
+PACKAGECONFIG[acl] = ",,acl"
+PACKAGECONFIG[selinux] = ",,libselinux"
+
+CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \
+ ${sysconfdir}/logrotate.conf"
+
+# If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our
+# optimization variables, so use it rather than EXTRA_CFLAGS.
+EXTRA_OEMAKE = "\
+ LFS= \
+ OS_NAME='${OS_NAME}' \
+ 'CC=${CC}' \
+ 'RPM_OPT_FLAGS=${CFLAGS}' \
+ 'EXTRA_LDFLAGS=${LDFLAGS}' \
+ ${@bb.utils.contains('PACKAGECONFIG', 'acl', 'WITH_ACL=yes', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'WITH_SELINUX=yes', '', d)} \
+"
+
+# OS_NAME in the makefile defaults to `uname -s`. The behavior for
+# freebsd/netbsd is questionable, so leave it as Linux, which only sets
+# INSTALL=install and BASEDIR=/usr.
+OS_NAME = "Linux"
+
+inherit autotools systemd
+
+SYSTEMD_SERVICE_${PN} = "\
+ ${BPN}.service \
+ ${BPN}.timer \
+"
+
+LOGROTATE_SYSTEMD_TIMER_BASIS ?= "daily"
+LOGROTATE_SYSTEMD_TIMER_ACCURACY ?= "12h"
+
+do_install(){
+ oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir}
+ mkdir -p ${D}${sysconfdir}/logrotate.d
+ mkdir -p ${D}${localstatedir}/lib
+ install -p -m 644 ${S}/examples/logrotate-default ${D}${sysconfdir}/logrotate.conf
+ touch ${D}${localstatedir}/lib/logrotate.status
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${S}/examples/logrotate.service ${D}${systemd_system_unitdir}/logrotate.service
+ install -m 0644 ${S}/examples/logrotate.timer ${D}${systemd_system_unitdir}/logrotate.timer
+ sed -i -e 's,OnCalendar=.*$,OnCalendar=${LOGROTATE_SYSTEMD_TIMER_BASIS},g' ${D}${systemd_system_unitdir}/logrotate.timer
+ sed -i -e 's,AccuracySec=.*$,AccuracySec=${LOGROTATE_SYSTEMD_TIMER_ACCURACY},g' ${D}${systemd_system_unitdir}/logrotate.timer
+ fi
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ mkdir -p ${D}${sysconfdir}/cron.daily
+ install -p -m 0755 ${S}/examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate
+ fi
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsb_4.1.bb b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsb_4.1.bb
deleted file mode 100644
index 0785610..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsb_4.1.bb
+++ /dev/null
@@ -1,135 +0,0 @@
-SUMMARY = "LSB support for OpenEmbedded"
-SECTION = "console/utils"
-HOMEPAGE = "http://prdownloads.sourceforge.net/lsb"
-LICENSE = "GPLv2+"
-PR = "r2"
-
-LSB_CORE = "lsb-core-${TARGET_ARCH}"
-LSB_CORE_x86 = "lsb-core-ia32"
-LSB_CORE_x86-64 = "lsb-core-amd64"
-RPROVIDES_${PN} += "${LSB_CORE}"
-
-# lsb_release needs getopt, lsbinitscripts
-RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_getopt} lsbinitscripts"
-
-LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar.gz \
- file://0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch \
- file://init-functions \
- file://lsb_killproc \
- file://lsb_log_message \
- file://lsb_pidofproc \
- file://lsb_start_daemon \
- "
-UPSTREAM_VERSION_UNKNOWN = "1"
-
-SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
-SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lsb/files/lsb_release/"
-UPSTREAM_CHECK_REGEX = "/lsb_release/(?P<pver>(\d+[\.\-_]*)+)/"
-
-S = "${WORKDIR}/lsb-release-1.4"
-
-CLEANBROKEN = "1"
-
-do_install() {
- oe_runmake install prefix=${D}${base_prefix} mandir=${D}${datadir}/man/ DESTDIR=${D}
-
- # these two dirs are needed by package lsb-dist-checker
- mkdir -p ${D}${sysconfdir}/opt
- mkdir -p ${D}${localstatedir}/opt
-
- mkdir -p ${D}${base_libdir}
- mkdir -p ${D}${sysconfdir}/lsb-release.d
- printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release
-
- if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ]; then
- printf "core-4.1-ia32" >> ${D}${sysconfdir}/lsb-release
- else
- printf "core-4.1-${TARGET_ARCH}" >> ${D}${sysconfdir}/lsb-release
- fi
- echo "\"" >> ${D}${sysconfdir}/lsb-release
- echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release
- echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}${sysconfdir}/lsb-release
- if [ -n "${DISTRO_CODENAME}" ]; then
- echo "DISTRIB_CODENAME=${DISTRO_CODENAME}" >> ${D}${sysconfdir}/lsb-release
- fi
- echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}${sysconfdir}/lsb-release
-
- if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ]; then
- mkdir -p ${D}${sysconfdir}/lsb-release.d
- touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
- touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-noarch
- touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ia32
- touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ia32
- elif [ "${TARGET_ARCH}" = "x86_64" ]; then
- touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
- touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-amd64
- touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-amd64
- fi
- if [ "${TARGET_ARCH}" = "powerpc" ]; then
- touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
- touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc32
- touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc32
- elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
- touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
- touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc64
- touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc64
- fi
-}
-
-do_install_append() {
- install -d ${D}${sysconfdir}/core-lsb
- for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon
- do
- install -m 0755 ${WORKDIR}/$i ${D}${sysconfdir}/core-lsb
- done
-
- install -d ${D}${nonarch_base_libdir}/lsb
- install -m 0755 ${WORKDIR}/init-functions ${D}${nonarch_base_libdir}/lsb
-
- # create links for LSB test
- if [ -e ${sbindir}/chkconfig ]; then
- if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ] ; then
- install -d ${D}${nonarch_libdir}/lsb
- fi
- ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/install_initd
- ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/remove_initd
- fi
-
- if [ "${TARGET_ARCH}" = "x86_64" ]; then
- if [ "${base_libdir}" != "${base_prefix}/lib64" ]; then
- lnr ${D}${base_libdir} ${D}${base_prefix}/lib64
- fi
- cd ${D}${base_libdir}
- ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2
- ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
- fi
- if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ]; then
- cd ${D}${base_libdir}
- ln -sf ld-linux.so.2 ld-lsb.so.2
- ln -sf ld-linux.so.2 ld-lsb.so.3
- fi
-
- if [ "${TARGET_ARCH}" = "powerpc64" ]; then
- if [ "${base_libdir}" != "${base_prefix}/lib64" ]; then
- lnr ${D}${base_libdir} ${D}${base_prefix}/lib64
- fi
- cd ${D}${base_libdir}
- ln -sf ld64.so.1 ld-lsb-ppc64.so.2
- ln -sf ld64.so.1 ld-lsb-ppc64.so.3
- fi
- if [ "${TARGET_ARCH}" = "powerpc" ]; then
- cd ${D}${base_libdir}
- ln -sf ld.so.1 ld-lsb-ppc32.so.2
- ln -sf ld.so.1 ld-lsb-ppc32.so.3
- fi
-}
-
-FILES_${PN} += "${@'${base_prefix}/lib64' if d.getVar('TARGET_ARCH') == ('x86_64' or 'powerpc64') and '${base_libdir}' != '${base_prefix}/lib64' else ''} \
- ${base_libdir} \
- ${nonarch_libdir}/lsb \
- ${nonarch_base_libdir}/lsb/* \
- "
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsb_5.0.bb b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsb_5.0.bb
new file mode 100644
index 0000000..df4812e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsb_5.0.bb
@@ -0,0 +1,134 @@
+SUMMARY = "LSB support for OpenEmbedded"
+SECTION = "console/utils"
+HOMEPAGE = "http://prdownloads.sourceforge.net/lsb"
+LICENSE = "GPLv2+"
+
+LSB_CORE = "lsb-core-${TARGET_ARCH}"
+LSB_CORE_x86 = "lsb-core-ia32"
+LSB_CORE_x86-64 = "lsb-core-amd64"
+RPROVIDES_${PN} += "${LSB_CORE}"
+
+# lsb_release needs getopt, lsbinitscripts
+RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_getopt} lsbinitscripts"
+
+LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar.gz \
+ file://0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch \
+ file://init-functions \
+ file://lsb_killproc \
+ file://lsb_log_message \
+ file://lsb_pidofproc \
+ file://lsb_start_daemon \
+ "
+UPSTREAM_VERSION_UNKNOWN = "1"
+
+SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
+SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lsb/files/lsb_release/"
+UPSTREAM_CHECK_REGEX = "/lsb_release/(?P<pver>(\d+[\.\-_]*)+)/"
+
+S = "${WORKDIR}/lsb-release-1.4"
+
+CLEANBROKEN = "1"
+
+do_install() {
+ oe_runmake install prefix=${D}${base_prefix} mandir=${D}${datadir}/man/ DESTDIR=${D}
+
+ # these two dirs are needed by package lsb-dist-checker
+ mkdir -p ${D}${sysconfdir}/opt
+ mkdir -p ${D}${localstatedir}/opt
+
+ mkdir -p ${D}${base_libdir}
+ mkdir -p ${D}${sysconfdir}/lsb-release.d
+ printf "LSB_VERSION=\"core-5.0-noarch:" > ${D}${sysconfdir}/lsb-release
+
+ if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ]; then
+ printf "core-5.0-ia32" >> ${D}${sysconfdir}/lsb-release
+ else
+ printf "core-5.0-${TARGET_ARCH}" >> ${D}${sysconfdir}/lsb-release
+ fi
+ echo "\"" >> ${D}${sysconfdir}/lsb-release
+ echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release
+ echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}${sysconfdir}/lsb-release
+ if [ -n "${DISTRO_CODENAME}" ]; then
+ echo "DISTRIB_CODENAME=${DISTRO_CODENAME}" >> ${D}${sysconfdir}/lsb-release
+ fi
+ echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}${sysconfdir}/lsb-release
+
+ if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ]; then
+ mkdir -p ${D}${sysconfdir}/lsb-release.d
+ touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
+ touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-noarch
+ touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ia32
+ touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ia32
+ elif [ "${TARGET_ARCH}" = "x86_64" ]; then
+ touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
+ touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-amd64
+ touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-amd64
+ fi
+ if [ "${TARGET_ARCH}" = "powerpc" ]; then
+ touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
+ touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc32
+ touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc32
+ elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
+ touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
+ touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc64
+ touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc64
+ fi
+}
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/core-lsb
+ for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon
+ do
+ install -m 0755 ${WORKDIR}/$i ${D}${sysconfdir}/core-lsb
+ done
+
+ install -d ${D}${nonarch_base_libdir}/lsb
+ install -m 0755 ${WORKDIR}/init-functions ${D}${nonarch_base_libdir}/lsb
+
+ # create links for LSB test
+ if [ -e ${sbindir}/chkconfig ]; then
+ if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ] ; then
+ install -d ${D}${nonarch_libdir}/lsb
+ fi
+ ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/install_initd
+ ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/remove_initd
+ fi
+
+ if [ "${TARGET_ARCH}" = "x86_64" ]; then
+ if [ "${base_libdir}" != "${base_prefix}/lib64" ]; then
+ lnr ${D}${base_libdir} ${D}${base_prefix}/lib64
+ fi
+ cd ${D}${base_libdir}
+ ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2
+ ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+ fi
+ if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ]; then
+ cd ${D}${base_libdir}
+ ln -sf ld-linux.so.2 ld-lsb.so.2
+ ln -sf ld-linux.so.2 ld-lsb.so.3
+ fi
+
+ if [ "${TARGET_ARCH}" = "powerpc64" ]; then
+ if [ "${base_libdir}" != "${base_prefix}/lib64" ]; then
+ lnr ${D}${base_libdir} ${D}${base_prefix}/lib64
+ fi
+ cd ${D}${base_libdir}
+ ln -sf ld64.so.1 ld-lsb-ppc64.so.2
+ ln -sf ld64.so.1 ld-lsb-ppc64.so.3
+ fi
+ if [ "${TARGET_ARCH}" = "powerpc" ]; then
+ cd ${D}${base_libdir}
+ ln -sf ld.so.1 ld-lsb-ppc32.so.2
+ ln -sf ld.so.1 ld-lsb-ppc32.so.3
+ fi
+}
+
+FILES_${PN} += "${@'${base_prefix}/lib64' if d.getVar('TARGET_ARCH') == ('x86_64' or 'powerpc64') and '${base_libdir}' != '${base_prefix}/lib64' else ''} \
+ ${base_libdir} \
+ ${nonarch_libdir}/lsb \
+ ${nonarch_base_libdir}/lsb/* \
+ "
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch
index 17c9002..c007645 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch
@@ -7,18 +7,15 @@
rc.d/init.d/functions | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
-index 6850046..11223f7 100644
---- a/rc.d/init.d/functions
-+++ b/rc.d/init.d/functions
-@@ -597,6 +597,6 @@ if [ "$_use_systemctl" = "1" ]; then
- fi
+Index: initscripts-9.72/rc.d/init.d/functions
+===================================================================
+--- initscripts-9.72.orig/rc.d/init.d/functions
++++ initscripts-9.72/rc.d/init.d/functions
+@@ -686,6 +686,6 @@ if [ "$_use_systemctl" = "1" ]; then
+ fi
fi
-strstr "$(cat /proc/cmdline)" "rc.debug" && set -x
+strstr "$(cat /proc/cmdline)" "rc.debug" && set -x || true
return 0
-
---
-2.1.0
-
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/functions.patch b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/functions.patch
index 9c58d90..e912daa 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/functions.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/functions.patch
@@ -1,7 +1,7 @@
-From 57468c5f4e364bdad556604dca09046e1afca929 Mon Sep 17 00:00:00 2001
+From e46b056282c8420f096d5c34d78c00f816788784 Mon Sep 17 00:00:00 2001
From: Fan Xin <fan.xin@jp.fujitsu.com>
Date: Mon, 5 Jun 2017 16:26:47 +0900
-Subject: [PATCH] Upstream-Status: Inappropriate [configuration]
+Subject: [PATCH 1/2] Upstream-Status: Inappropriate [configuration]
Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
@@ -10,23 +10,24 @@
Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
Upstream-Status: Pending
+
---
- initscripts-9.72/rc.d/init.d/functions | 2 +-
+ rc.d/init.d/functions | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/initscripts-9.72/rc.d/init.d/functions b/initscripts-9.72/rc.d/init.d/functions
-index 0f627f1..a6aa092 100644
---- a/initscripts-9.72/rc.d/init.d/functions
-+++ b/initscripts-9.72/rc.d/init.d/functions
+diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
+index 2e3da964..1a204dec 100644
+--- a/rc.d/init.d/functions
++++ b/rc.d/init.d/functions
@@ -59,7 +59,7 @@ systemctl_redirect () {
[ -z "${COLUMNS:-}" ] && COLUMNS=80
if [ -z "${CONSOLETYPE:-}" ]; then
-- if [ -c "/dev/stderr" -a -r "/dev/stderr" ]; then
-+ if [ -c "/dev/stderr" -a -r "/dev/stderr" -a -e /sbin/consoletype ]; then
+- if [ -c "/dev/stderr" ] && [ -r "/dev/stderr" ]; then
++ if [ -c "/dev/stderr" ] && [ -r "/dev/stderr" ] && [ -e /sbin/consoletype ]; then
CONSOLETYPE="$(/sbin/consoletype < /dev/stderr 2>/dev/null)"
else
CONSOLETYPE="serial"
--
-1.9.1
+2.15.1
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.72.bb b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.72.bb
deleted file mode 100644
index 2d74a6f..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.72.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "SysV init scripts which are only used in an LSB image"
-HOMEPAGE = "https://wiki.debian.org/LSBInitScripts"
-SECTION = "base"
-LICENSE = "GPLv2"
-DEPENDS = "popt glib-2.0"
-
-RPROVIDES_${PN} += "initd-functions"
-RDEPENDS_${PN} += "util-linux"
-RCONFLICTS_${PN} = "initscripts-functions"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=ebf4e8b49780ab187d51bd26aaa022c6"
-
-S="${WORKDIR}/initscripts-${PV}"
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/initscripts-${PV}.tar.gz/sha512/b6ed38f9576e9227c2ecf047e2d60e1e872f40d51d13861b0c91dddb282f10f7e6b79706a4d1435d7a57a14a0b73a1b71541cfe44c00e8e03ef96b08de19ec32/initscripts-${PV}.tar.gz \
- file://functions.patch;striplevel=2 \
- file://0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch \
- "
-
-SRC_URI[md5sum] = "d6c798f40dceb117e12126d94cb25a9a"
-SRC_URI[sha256sum] = "1793677bdd1f7ee4cb00878ce43346196374f848a4c8e4559e086040fc7487db"
-
-# Since we are only taking the patched version of functions, no need to
-# configure or compile anything so do not execute these
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
-do_install(){
- install -d ${D}${sysconfdir}/init.d/
- install -m 0644 ${S}/rc.d/init.d/functions ${D}${sysconfdir}/init.d/functions
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.79.bb b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.79.bb
new file mode 100644
index 0000000..46edeed
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.79.bb
@@ -0,0 +1,32 @@
+SUMMARY = "SysV init scripts which are only used in an LSB image"
+HOMEPAGE = "https://wiki.debian.org/LSBInitScripts"
+SECTION = "base"
+LICENSE = "GPLv2"
+DEPENDS = "popt glib-2.0"
+
+RPROVIDES_${PN} += "initd-functions"
+RDEPENDS_${PN} += "util-linux"
+RCONFLICTS_${PN} = "initscripts-functions"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=ebf4e8b49780ab187d51bd26aaa022c6"
+
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/fedora-sysv/initscripts \
+ file://functions.patch \
+ file://0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch \
+ "
+SRCREV = "a51c1b4f7dcf55b568b2ee4c2b18078849943469"
+UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)"
+
+SRC_URI[md5sum] = "d6c798f40dceb117e12126d94cb25a9a"
+SRC_URI[sha256sum] = "1793677bdd1f7ee4cb00878ce43346196374f848a4c8e4559e086040fc7487db"
+
+# Since we are only taking the patched version of functions, no need to
+# configure or compile anything so do not execute these
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install(){
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 0644 ${S}/rc.d/init.d/functions ${D}${sysconfdir}/init.d/functions
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
index 0eb2793..073e247 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
@@ -60,7 +60,7 @@
PACKAGES_DIR="/var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb"
-BASE_PACKAGES_DIR="${PACKAGES_DIR}/base/${LSB_RELEASE}/binary"
+BASE_PACKAGES_DIR="${PACKAGES_DIR}/base/released-all/binary"
RUNTIME_BASE_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/released-all/binary/runtime"
RUNTIME_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/${LSB_RELEASE}/binary/runtime"
APP_PACKAGES_DIR="${PACKAGES_DIR}/app-battery/${LSB_RELEASE}/${LSB_ARCH}"
@@ -98,7 +98,7 @@
fi
# Official download server list. You can replace them with your own server.
-SERVER_IPADDR="140.211.169.23"
+SERVER_IPADDR="140.211.169.28"
SERVER_NAME="ftp.linuxfoundation.org"
if ! `grep -F -q "${SERVER_NAME}" /etc/hosts`; then
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/packages_list b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/packages_list
index 959f931..1a6c116 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/packages_list
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/packages_list
@@ -1,7 +1,7 @@
LSB_RELEASE="released-5.0"
LSB_ARCH="lsbarch"
-BASE_PACKAGES_LIST="lsb-setup-4.1.0-1.noarch.rpm"
+BASE_PACKAGES_LIST="lsb-setup-5.0.0-2.noarch.rpm"
RUNTIME_BASE_PACKAGES_LIST="lsb-dist-checker-5.0.0.1-1.targetarch.rpm \
lsb-tet3-lite-3.7-27.lsb5.targetarch.rpm \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/session b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/session
index 3abcca7..4d47e40 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/session
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/session
@@ -2,7 +2,7 @@
VERBOSE_LEVEL: 1
ARCHITECTURE: targetarch
USE_INTERNET: 1
-STD_VERSION: LSB 4.1
+STD_VERSION: LSB 5.0
STD_PROFILE: no
[cmdchk]
RUN: 1
@@ -126,15 +126,6 @@
AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/python
AUTOREPLY_RESULTS_DIR: /opt/lsb/test/python/results
-[qt4-azov]
-RUN: 1
-VERSION: local|*
-
-[qt4-azov|local|*]
-AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt4-azov
-AUTOREPLY_X11_FONT_PATH: [default]
-AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt4-azov/results
-
[xml2-azov]
RUN: 1
VERSION: local|*
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest_1.0.bb b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest_1.0.bb
index 36f52fd..a90c023 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest_1.0.bb
@@ -10,14 +10,13 @@
file://packages_list \
file://session \
"
-RDEPENDS_${PN} = "rpm"
+RDEPENDS_${PN} = "lsb rpm"
S = "${WORKDIR}"
do_install() {
- install -d ${D}${bindir}
- install -m 0755 ${S}/LSB_Test.sh ${D}${bindir}
install -d ${D}/opt/lsb-test
+ install -m 0755 ${S}/LSB_Test.sh ${D}/opt/lsb-test/LSB_Test.sh
install -m 0644 ${S}/packages_list ${D}/opt/lsb-test/packages_list
install -m 0644 ${S}/session ${D}/opt/lsb-test/session
if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-add-_GNU_SOURCE-to-pec_listener.c.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-add-_GNU_SOURCE-to-pec_listener.c.patch
deleted file mode 100644
index 7ec66f8..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-add-_GNU_SOURCE-to-pec_listener.c.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From ae10245c15a617bd57337981bb42eb36629f9b59 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Wed, 8 Feb 2017 15:53:31 +0800
-Subject: [PATCH 01/26] add _GNU_SOURCE to pec_listener.c
-
-In previous patch 0007-replace-SIGCLD-with-SIGCHLD.patch made by Khem Raj
-contains two aspects:
-
- 1. replace SIGCLD with SIGCHLD
- 2. add _GNU_SOURCE to pec_listener.c
-
-The replace SIGCLD with SIGCHLD have been integrated upstream, so make a
-another patch to add _GNU_SOURCE to pec_listener.c comply with Khem Raj's
-previous patch.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
-Upstream-Status: Pending
-
-%% original patch: 0001-add-_GNU_SOURCE-to-pec_listener.c.patch
----
- testcases/kernel/connectors/pec/pec_listener.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/testcases/kernel/connectors/pec/pec_listener.c b/testcases/kernel/connectors/pec/pec_listener.c
-index d11e4dc..b8b5e0d 100644
---- a/testcases/kernel/connectors/pec/pec_listener.c
-+++ b/testcases/kernel/connectors/pec/pec_listener.c
-@@ -20,6 +20,7 @@
- /* */
- /******************************************************************************/
-
-+#define _GNU_SOURCE
- #include <sys/socket.h>
- #include <sys/poll.h>
- #include <sys/types.h>
---
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch
new file mode 100644
index 0000000..da62687
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch
@@ -0,0 +1,31 @@
+From 4ace68a6ba501907a0741dba5f5f155e06a74c35 Mon Sep 17 00:00:00 2001
+From: Petr Vorel <pvorel@suse.cz>
+Date: Wed, 7 Feb 2018 11:09:49 +0100
+Subject: [PATCH] configure: Fix default value of --without-numa switch in help
+
+The default value is no.
+
+Fixes: 39a85a1f1 ("configure: add knob to control numa support")
+
+Signed-off-by: Petr Vorel <pvorel@suse.cz>
+Upstream-Status: Accepted
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index b39a31d..d66ea00 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -86,7 +86,7 @@ fi
+ # Numa
+ AC_ARG_WITH([numa],
+ AC_HELP_STRING([--without-numa],
+- [without numa support (default=yes)]),
++ [without numa support (default=no)]),
+ [with_numa=no],
+ [with_numa=yes]
+ )
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-configure-add-knob-to-control-numa-support.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-configure-add-knob-to-control-numa-support.patch
new file mode 100644
index 0000000..8aaa287
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-configure-add-knob-to-control-numa-support.patch
@@ -0,0 +1,50 @@
+From 39a85a1f1e6624f554215ba4b6843d3689a8415e Mon Sep 17 00:00:00 2001
+From: Anders Roxell <anders.roxell@linaro.org>
+Date: Mon, 5 Feb 2018 11:56:04 +0100
+Subject: [PATCH] configure: add knob to control numa support
+
+Allow to disable numa from the top level.
+
+Based on patch:
+http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-extended/ltp?id=4c7873552e13dfdba96afca7562c398d2966ca71
+
+Reported-by: Roy Li <rongqing.li@windriver.com>
+Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
+Signed-off-by: Petr Vorel <pvorel@suse.cz>
+Upstream-Status: Accepted
+---
+ configure.ac | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 5c8d4ea..b39a31d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -83,6 +83,14 @@ else
+ AC_SUBST([WITH_EXPECT],["no"])
+ fi
+
++# Numa
++AC_ARG_WITH([numa],
++ AC_HELP_STRING([--without-numa],
++ [without numa support (default=yes)]),
++ [with_numa=no],
++ [with_numa=yes]
++)
++
+ # Perl
+ AC_ARG_WITH([perl],
+ [AC_HELP_STRING([--with-perl],
+@@ -157,7 +165,9 @@ LTP_CHECK_SELINUX
+ LTP_CHECK_SIGNAL
+ LTP_CHECK_SYSCALL_EVENTFD
+ LTP_CHECK_SYSCALL_MODIFY_LDT
++if test "x$with_numa" = xyes; then
+ LTP_CHECK_SYSCALL_NUMA
++fi
+ LTP_CHECK_SYSCALL_QUOTACTL
+ LTP_CHECK_SYSCALL_SIGNALFD
+ LTP_CHECK_SYSCALL_UNSHARE
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch
deleted file mode 100644
index 9865020..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 867ad5d5d64b9b27ee32148027532db0a00f6433 Mon Sep 17 00:00:00 2001
-From: "Roy.Li" <rongqing.li@windriver.com>
-Date: Thu, 7 Jan 2016 17:33:26 +0000
-Subject: [PATCH 02/32] Add knob to control whether numa support should be
- checked
-
-otherwise undeterministic dependency will be generated
-during build depending upong numa being staged or not
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
----
- m4/ltp-numa.m4 | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/m4/ltp-numa.m4 b/m4/ltp-numa.m4
-index 60ae07b..ed7078d 100644
---- a/m4/ltp-numa.m4
-+++ b/m4/ltp-numa.m4
-@@ -24,7 +24,13 @@ dnl ----------------------------
- dnl
- AC_DEFUN([LTP_CHECK_SYSCALL_NUMA],
- [dnl
--AC_CHECK_HEADERS([linux/mempolicy.h numa.h numaif.h],[
-+AC_MSG_CHECKING([for numa])
-+AC_ARG_WITH(
-+ [numa],
-+ AC_HELP_STRING([--without-numa],
-+ [without numa support]),
-+ [],
-+ [AC_CHECK_HEADERS([linux/mempolicy.h numa.h numaif.h],[
- LTP_SYSCALL_NUMA_HEADERS=yes
- AC_CHECK_LIB(numa,numa_alloc_onnode,[have_numa_alloc_onnode="yes"])
- if test "x$have_numa_alloc_onnode" = "xyes"; then
-@@ -48,3 +54,5 @@ if test "x$have_mpol_constants" = "xyes"; then
- AC_DEFINE(HAVE_MPOL_CONSTANTS,1,[define to 1 if you have all constants required to use mbind tests])
- fi
- )])
-+AC_MSG_RESULT([$with_numa])
-+])
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
index cf74463..84ab37e 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
@@ -22,10 +22,10 @@
testcases/realtime/stress/pi-tests/Makefile | 5 +++++
8 files changed, 35 insertions(+), 2 deletions(-)
-diff --git a/Makefile b/Makefile
-index 297f8e7..906b280 100644
---- a/Makefile
-+++ b/Makefile
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
@@ -49,6 +49,11 @@ SKIP_IDCHECK ?= 0
UCLINUX ?= 0
export UCLINUX
@@ -38,11 +38,11 @@
# CLEAN_TARGETS: Targets which exist solely in clean.
# COMMON_TARGETS: Targets which exist in all, clean, and install.
# INSTALL_TARGETS: Targets which exist in clean and install (contains
-diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
-index 50a12fa..4f1987f 100644
---- a/testcases/kernel/Makefile
-+++ b/testcases/kernel/Makefile
-@@ -47,13 +47,16 @@ SUBDIRS += connectors \
+Index: git/testcases/kernel/Makefile
+===================================================================
+--- git.orig/testcases/kernel/Makefile
++++ git/testcases/kernel/Makefile
+@@ -48,13 +48,16 @@ SUBDIRS += connectors \
logging \
mem \
numa \
@@ -60,10 +60,10 @@
ifeq ($(WITH_POWER_MANAGEMENT_TESTSUITE),yes)
SUBDIRS += power_management
endif
-diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile
-index 6245ed0..aa4eb7f 100644
---- a/testcases/kernel/sched/Makefile
-+++ b/testcases/kernel/sched/Makefile
+Index: git/testcases/kernel/sched/Makefile
+===================================================================
+--- git.orig/testcases/kernel/sched/Makefile
++++ git/testcases/kernel/sched/Makefile
@@ -23,5 +23,7 @@
top_srcdir ?= ../../..
@@ -73,11 +73,11 @@
+ FILTER_OUT_DIRS += process_stress
+endif
include $(top_srcdir)/include/mk/generic_trunk_target.mk
-diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
-index 8acb395..b749126 100644
---- a/testcases/kernel/syscalls/Makefile
-+++ b/testcases/kernel/syscalls/Makefile
-@@ -28,5 +28,10 @@ ifeq ($(UCLINUX),1)
+Index: git/testcases/kernel/syscalls/Makefile
+===================================================================
+--- git.orig/testcases/kernel/syscalls/Makefile
++++ git/testcases/kernel/syscalls/Makefile
+@@ -28,6 +28,11 @@ ifeq ($(UCLINUX),1)
FILTER_OUT_DIRS += capget capset chmod chown clone fork getcontext llseek \
mincore mprotect nftw profil remap_file_pages sbrk
endif
@@ -87,12 +87,13 @@
+ ustat
+endif
- include $(top_srcdir)/include/mk/generic_trunk_target.mk
-diff --git a/testcases/network/nfsv4/acl/Makefile b/testcases/network/nfsv4/acl/Makefile
-index 8bc78c2..c36cf50 100644
---- a/testcases/network/nfsv4/acl/Makefile
-+++ b/testcases/network/nfsv4/acl/Makefile
-@@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre.mk
+ ifeq ($(UCLIBC),1)
+ FILTER_OUT_DIRS += profil
+Index: git/testcases/network/nfsv4/acl/Makefile
+===================================================================
+--- git.orig/testcases/network/nfsv4/acl/Makefile
++++ git/testcases/network/nfsv4/acl/Makefile
+@@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre
LDLIBS += $(ACL_LIBS)
@@ -101,10 +102,10 @@
+endif
+
include $(top_srcdir)/include/mk/generic_leaf_target.mk
-diff --git a/testcases/network/rpc/basic_tests/Makefile b/testcases/network/rpc/basic_tests/Makefile
-index 3160813..9bdf5d0 100644
---- a/testcases/network/rpc/basic_tests/Makefile
-+++ b/testcases/network/rpc/basic_tests/Makefile
+Index: git/testcases/network/rpc/basic_tests/Makefile
+===================================================================
+--- git.orig/testcases/network/rpc/basic_tests/Makefile
++++ git/testcases/network/rpc/basic_tests/Makefile
@@ -23,4 +23,9 @@
top_srcdir ?= ../../../..
@@ -115,11 +116,11 @@
+endif
+
include $(top_srcdir)/include/mk/generic_trunk_target.mk
-diff --git a/testcases/realtime/func/pi-tests/Makefile b/testcases/realtime/func/pi-tests/Makefile
-index 7a7a57a..5808866 100644
---- a/testcases/realtime/func/pi-tests/Makefile
-+++ b/testcases/realtime/func/pi-tests/Makefile
-@@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre.mk
+Index: git/testcases/realtime/func/pi-tests/Makefile
+===================================================================
+--- git.orig/testcases/realtime/func/pi-tests/Makefile
++++ git/testcases/realtime/func/pi-tests/Makefile
+@@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre
include $(abs_srcdir)/../../config.mk
MAKE_TARGETS := testpi-0 testpi-1 testpi-2 testpi-4 testpi-5 testpi-6 testpi-7 sbrk_mutex
@@ -129,10 +130,10 @@
+
include $(top_srcdir)/include/mk/generic_leaf_target.mk
-diff --git a/testcases/realtime/stress/pi-tests/Makefile b/testcases/realtime/stress/pi-tests/Makefile
-index 5edc3b4..aa5987a 100644
---- a/testcases/realtime/stress/pi-tests/Makefile
-+++ b/testcases/realtime/stress/pi-tests/Makefile
+Index: git/testcases/realtime/stress/pi-tests/Makefile
+===================================================================
+--- git.orig/testcases/realtime/stress/pi-tests/Makefile
++++ git/testcases/realtime/stress/pi-tests/Makefile
@@ -24,4 +24,9 @@ top_srcdir ?= ../../../..
include $(top_srcdir)/include/mk/env_pre.mk
@@ -143,6 +144,3 @@
+endif
+
include $(top_srcdir)/include/mk/generic_leaf_target.mk
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch
deleted file mode 100644
index 25f6ba7..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-From dc1905b6d972f9176b40da270c83d8fb4d1751b5 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Wed, 8 Feb 2017 16:12:34 +0800
-Subject: [PATCH 2/5] Rename sigset variable to sigset1
-
-sigset API from signal.h is shadowed by this name conflict
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
-
-Upstream-Status: Pending
----
- testcases/kernel/mem/shmt/shmt04.c | 10 +++++-----
- testcases/kernel/mem/shmt/shmt06.c | 10 +++++-----
- testcases/kernel/syscalls/sigprocmask/sigprocmask01.c | 10 +++++-----
- 3 files changed, 15 insertions(+), 15 deletions(-)
-
-diff --git a/testcases/kernel/mem/shmt/shmt04.c b/testcases/kernel/mem/shmt/shmt04.c
-index b2682da..3f35fad 100644
---- a/testcases/kernel/mem/shmt/shmt04.c
-+++ b/testcases/kernel/mem/shmt/shmt04.c
-@@ -56,7 +56,7 @@ int TST_TOTAL = 2; /* Total number of test cases. */
- /**************/
-
- key_t key;
--sigset_t set;
-+sigset_t set1;
-
- #define SIZE 16*1024
-
-@@ -71,9 +71,9 @@ int main(void)
-
- key = (key_t) getpid();
-
-- sigemptyset(&set);
-- sigaddset(&set, SIGUSR1);
-- sigprocmask(SIG_BLOCK, &set, NULL);
-+ sigemptyset(&set1);
-+ sigaddset(&set1, SIGUSR1);
-+ sigprocmask(SIG_BLOCK, &set1, NULL);
-
- pid = fork();
- switch (pid) {
-@@ -148,7 +148,7 @@ int child(void)
- char *cp;
- int sig;
-
-- sigwait(&set, &sig);
-+ sigwait(&set1, &sig);
- chld_pid = getpid();
- /*--------------------------------------------------------*/
-
-diff --git a/testcases/kernel/mem/shmt/shmt06.c b/testcases/kernel/mem/shmt/shmt06.c
-index dd69de7..56fb1da 100644
---- a/testcases/kernel/mem/shmt/shmt06.c
-+++ b/testcases/kernel/mem/shmt/shmt06.c
-@@ -57,7 +57,7 @@ int TST_TOTAL = 2; /* Total number of test cases. */
- /**************/
-
- key_t key;
--sigset_t set;
-+sigset_t set1;
-
- int child();
- static int rm_shm(int);
-@@ -70,9 +70,9 @@ int main(void)
-
- key = (key_t) getpid();
-
-- sigemptyset(&set);
-- sigaddset(&set, SIGUSR1);
-- sigprocmask(SIG_BLOCK, &set, NULL);
-+ sigemptyset(&set1);
-+ sigaddset(&set1, SIGUSR1);
-+ sigprocmask(SIG_BLOCK, &set1, NULL);
-
- pid = fork();
- switch (pid) {
-@@ -147,7 +147,7 @@ int child(void)
- char *cp;
- int sig;
-
-- sigwait(&set, &sig);
-+ sigwait(&set1, &sig);
- chld_pid = getpid();
-
- if ((shmid = shmget(key, SIZE, 0)) < 0) {
-diff --git a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
-index 232d25a..06d902f 100644
---- a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
-+++ b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
-@@ -91,7 +91,7 @@ int TST_TOTAL = 1;
- int sig_catch = 0; /* variable to blocked/unblocked signals */
-
- struct sigaction sa_new; /* struct to hold signal info */
--sigset_t set; /* signal set to hold signal lists */
-+sigset_t set1; /* signal set to hold signal lists */
- sigset_t sigset2;
-
- int main(int ac, char **av)
-@@ -112,7 +112,7 @@ int main(int ac, char **av)
- * so that, signal will not be delivered to
- * the test process.
- */
-- TEST(sigprocmask(SIG_BLOCK, &set, 0));
-+ TEST(sigprocmask(SIG_BLOCK, &set1, 0));
-
- /* Get the process id of test process */
- my_pid = getpid();
-@@ -165,7 +165,7 @@ int main(int ac, char **av)
- */
- errno = 0;
- if (sigprocmask(SIG_UNBLOCK,
-- &set, 0) == -1) {
-+ &set1, 0) == -1) {
- tst_brkm(TFAIL, cleanup,
- "sigprocmask() failed "
- "to unblock signal, "
-@@ -212,7 +212,7 @@ void setup(void)
- * Initialise the signal sets with the list that
- * excludes/includes all system-defined signals.
- */
-- if (sigemptyset(&set) == -1) {
-+ if (sigemptyset(&set1) == -1) {
- tst_brkm(TFAIL, cleanup,
- "sigemptyset() failed, errno=%d : %s",
- errno, strerror(errno));
-@@ -235,7 +235,7 @@ void setup(void)
- * Add specified signal (SIGINT) to the signal set
- * which excludes system-defined signals.
- */
-- if (sigaddset(&set, SIGINT) == -1) {
-+ if (sigaddset(&set1, SIGINT) == -1) {
- tst_brkm(TFAIL, cleanup,
- "sigaddset() failed, errno=%d : %s",
- errno, strerror(errno));
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
index 3e79c9f..462976d 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
@@ -18,10 +18,10 @@
testcases/kernel/syscalls/mremap/mremap03.c | 2 ++
3 files changed, 7 insertions(+), 1 deletion(-)
-diff --git a/testcases/kernel/syscalls/mremap/mremap01.c b/testcases/kernel/syscalls/mremap/mremap01.c
-index d63d1e4..24ca174 100644
---- a/testcases/kernel/syscalls/mremap/mremap01.c
-+++ b/testcases/kernel/syscalls/mremap/mremap01.c
+Index: git/testcases/kernel/syscalls/mremap/mremap01.c
+===================================================================
+--- git.orig/testcases/kernel/syscalls/mremap/mremap01.c
++++ git/testcases/kernel/syscalls/mremap/mremap01.c
@@ -76,10 +76,12 @@
*/
#include <unistd.h>
@@ -35,11 +35,11 @@
+#undef _GNU_SOURCE
#include "test.h"
-
-diff --git a/testcases/kernel/syscalls/mremap/mremap02.c b/testcases/kernel/syscalls/mremap/mremap02.c
-index 5a51b9a..a530a6b 100644
---- a/testcases/kernel/syscalls/mremap/mremap02.c
-+++ b/testcases/kernel/syscalls/mremap/mremap02.c
+ #include "safe_macros.h"
+Index: git/testcases/kernel/syscalls/mremap/mremap02.c
+===================================================================
+--- git.orig/testcases/kernel/syscalls/mremap/mremap02.c
++++ git/testcases/kernel/syscalls/mremap/mremap02.c
@@ -75,9 +75,11 @@
#include <errno.h>
#include <unistd.h>
@@ -52,10 +52,10 @@
#include "test.h"
-diff --git a/testcases/kernel/syscalls/mremap/mremap03.c b/testcases/kernel/syscalls/mremap/mremap03.c
-index 12e3829..9b39f8b 100644
---- a/testcases/kernel/syscalls/mremap/mremap03.c
-+++ b/testcases/kernel/syscalls/mremap/mremap03.c
+Index: git/testcases/kernel/syscalls/mremap/mremap03.c
+===================================================================
+--- git.orig/testcases/kernel/syscalls/mremap/mremap03.c
++++ git/testcases/kernel/syscalls/mremap/mremap03.c
@@ -76,9 +76,11 @@
#include <errno.h>
#include <unistd.h>
@@ -68,6 +68,3 @@
#include "test.h"
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0025-mc_gethost-include-sys-types.h.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0025-mc_gethost-include-sys-types.h.patch
deleted file mode 100644
index afcba63..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0025-mc_gethost-include-sys-types.h.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 9d14edfc12eefac900dd54729a88b3ccf91c1c43 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:18:15 +0000
-Subject: [PATCH 25/32] mc_gethost: include sys/types.h
-
-Fix build on musl
-error: unknown type name 'u_char'
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- testcases/network/multicast/mc_gethost/mc_gethost.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/testcases/network/multicast/mc_gethost/mc_gethost.c b/testcases/network/multicast/mc_gethost/mc_gethost.c
-index 5b9a790..c799e2a 100644
---- a/testcases/network/multicast/mc_gethost/mc_gethost.c
-+++ b/testcases/network/multicast/mc_gethost/mc_gethost.c
-@@ -6,6 +6,7 @@
-
- #include <sys/param.h>
- #include <sys/socket.h>
-+#include <sys/types.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <arpa/nameser.h>
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch
deleted file mode 100644
index adf6f27..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 1471012164ba8f26046d4b1ce5531a0d92805ef5 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Wed, 8 Feb 2017 16:21:16 +0800
-Subject: [PATCH 4/5] sysconf01: Use _SC_2_C_VERSION conditionally
-
-_SC_2_C_VERSION is not available on musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
-
-Upstream-Status: Pending
----
- testcases/kernel/syscalls/sysconf/sysconf01.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/testcases/kernel/syscalls/sysconf/sysconf01.c b/testcases/kernel/syscalls/sysconf/sysconf01.c
-index 583deef..de93695 100644
---- a/testcases/kernel/syscalls/sysconf/sysconf01.c
-+++ b/testcases/kernel/syscalls/sysconf/sysconf01.c
-@@ -103,7 +103,9 @@ int main(void)
- test_sysconf(_SC_2_C_BIND);
- test_sysconf(_SC_2_C_DEV);
- #ifdef _SC_2_C_VERSION
-+#ifdef __GLIBC__
- test_sysconf(_SC_2_C_VERSION);
-+#endif
- #else
- tst_resm(TCONF, "_SC_2_C_VERSION not defined");
- #endif
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
deleted file mode 100644
index efa6d06..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 00ba7cdd0608b1507027428f9f87b1cb9747372b Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Thu, 9 Feb 2017 15:54:53 +0800
-Subject: [PATCH] lib: Use PTHREAD_MUTEX_RECURSIVE in place of
- PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP for non-glibc
-
-e.g. musl does not implement the _NP mutex types
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
-
-Upstream-Status: Pending
----
- lib/tst_res.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/lib/tst_res.c b/lib/tst_res.c
-index 61daaeb..435224f 100644
---- a/lib/tst_res.c
-+++ b/lib/tst_res.c
-@@ -79,7 +79,11 @@ int TEST_ERRNO;
- assert(strlen(buf) > 0); \
- } while (0)
-
-+#ifdef __GLIBC__
- static pthread_mutex_t tmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
-+#else
-+static pthread_mutex_t tmutex = { PTHREAD_MUTEX_RECURSIVE };
-+#endif
-
- static void check_env(void);
- static void tst_condense(int tnum, int ttype, const char *tmesg);
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch
deleted file mode 100644
index 868e1cf..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 5e3dea669e5b0b769f322d54a3bb9f320b5327da Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 22 Mar 2016 15:47:14 +0000
-Subject: [PATCH 26/26] shmat1: Cover GNU specific code under __USE_GNU
-
-on x86, we use uc_mcontext element from sigcontext
-which is marked gnu-specific in glibc, this patch
-adds this condition around the code
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- testcases/kernel/mem/mtest06/shmat1.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/testcases/kernel/mem/mtest06/shmat1.c b/testcases/kernel/mem/mtest06/shmat1.c
-index 0d6d7a4..bee69f6 100644
---- a/testcases/kernel/mem/mtest06/shmat1.c
-+++ b/testcases/kernel/mem/mtest06/shmat1.c
-@@ -111,7 +111,7 @@ int done_shmat = 0; /* disallow read and writes before shmat */
- static void sig_handler(int signal, /* signal number, set to handle SIGALRM */
- int code, struct ucontext *ut)
- { /* contains pointer to sigcontext structure */
--#ifdef __i386__
-+#if defined(__i386__) && defined(__USE_GNU)
- unsigned long except; /* exception type. */
- int ret = 0; /* exit code from signal handler. */
- struct sigcontext *scp = /* pointer to sigcontext structure */
-@@ -122,7 +122,7 @@ static void sig_handler(int signal, /* signal number, set to handle SIGALRM
- fprintf(stdout, "Test ended, success\n");
- exit(0);
- }
--#ifdef __i386__
-+#if defined(__i386__) && defined(__USE_GNU)
- else {
- except = scp->trapno;
- fprintf(stderr, "signal caught - [%d] ", signal);
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0037-ltp-fix-PAGE_SIZE-redefinition-and-O_CREAT-undeclear.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0037-ltp-fix-PAGE_SIZE-redefinition-and-O_CREAT-undeclear.patch
deleted file mode 100644
index c8738ae..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0037-ltp-fix-PAGE_SIZE-redefinition-and-O_CREAT-undeclear.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From a9d5595d2fa2ab252f1cabf63f4b65c3efbafeb9 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Thu, 10 Aug 2017 15:27:03 +0800
-Subject: [PATCH] ltp: fix PAGE_SIZE redefinition and O_CREAT undeclear when
- build with musl
-
-error 1:
-
-|stack_clash.c:50:22: error: expected identifier or '(' before numeric constant
-| static unsigned long PAGE_SIZE;
-
-This is because the musl libc already contain PAGE_SIZE definition in limits.c,
-we can check it here:
-
- https://git.musl-libc.org/cgit/musl/tree/include/limits.h#n43
-
-error 2:
-
-|ck01.c:157:22: error: 'O_CREAT' undeclared (first use in this function); did you mean 'S_IREAD'?
-| fd = open(filename, O_CREAT | O_TRUNC | O_RDWR, 0644);
-| ^~~~~~~
-| S_IREAD
-
-This is because the musl libc put those in fcntl.h, so we should include that
-file.
-
-Upstream-Status: Submitted [ https://github.com/linux-test-project/ltp/pull/194 ]
-
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- testcases/cve/stack_clash.c | 12 ++++++------
- testcases/kernel/syscalls/flock/flock01.c | 1 +
- testcases/kernel/syscalls/flock/flock02.c | 1 +
- 3 files changed, 8 insertions(+), 6 deletions(-)
-
-diff --git a/testcases/cve/stack_clash.c b/testcases/cve/stack_clash.c
-index 2ef1a82..7c45991 100644
---- a/testcases/cve/stack_clash.c
-+++ b/testcases/cve/stack_clash.c
-@@ -47,7 +47,7 @@
- #include "tst_test.h"
- #include "tst_safe_stdio.h"
-
--static unsigned long PAGE_SIZE;
-+static unsigned long PAGE_SIZE_tst;
- static unsigned long PAGE_MASK;
- static unsigned long GAP_PAGES = 256;
- static unsigned long THRESHOLD;
-@@ -66,7 +66,7 @@ void exhaust_stack_into_sigsegv(void)
- exhaust_stack_into_sigsegv();
- }
-
--#define MAPPED_LEN PAGE_SIZE
-+#define MAPPED_LEN PAGE_SIZE_tst
- static unsigned long mapped_addr;
-
- void segv_handler(int sig, siginfo_t *info, void *data LTP_ATTRIBUTE_UNUSED)
-@@ -150,7 +150,7 @@ void do_child(void)
- stack_t signal_stack;
- struct sigaction segv_sig = {.sa_sigaction = segv_handler, .sa_flags = SA_ONSTACK|SA_SIGINFO};
- void *map;
-- unsigned long gap = GAP_PAGES * PAGE_SIZE;
-+ unsigned long gap = GAP_PAGES * PAGE_SIZE_tst;
- struct rlimit rlimit;
-
- rlimit.rlim_cur = rlimit.rlim_max = RLIM_INFINITY;
-@@ -200,8 +200,8 @@ void setup(void)
- {
- char buf[4096], *p;
-
-- PAGE_SIZE = sysconf(_SC_PAGESIZE);
-- PAGE_MASK = ~(PAGE_SIZE - 1);
-+ PAGE_SIZE_tst = sysconf(_SC_PAGESIZE);
-+ PAGE_MASK = ~(PAGE_SIZE_tst - 1);
-
- buf[4095] = '\0';
- SAFE_FILE_SCANF("/proc/cmdline", "%4095[^\n]", buf);
-@@ -214,7 +214,7 @@ void setup(void)
- tst_res(TINFO, "stack_guard_gap = %ld", GAP_PAGES);
- }
-
-- THRESHOLD = (GAP_PAGES - 1) * PAGE_SIZE;
-+ THRESHOLD = (GAP_PAGES - 1) * PAGE_SIZE_tst;
-
- {
- volatile int *a = alloca(128);
-diff --git a/testcases/kernel/syscalls/flock/flock01.c b/testcases/kernel/syscalls/flock/flock01.c
-index 3e17be4..06d89e3 100644
---- a/testcases/kernel/syscalls/flock/flock01.c
-+++ b/testcases/kernel/syscalls/flock/flock01.c
-@@ -69,6 +69,7 @@
- #include <stdio.h>
- #include <sys/wait.h>
- #include <sys/file.h>
-+#include <fcntl.h>
- #include "test.h"
-
- void setup(void);
-diff --git a/testcases/kernel/syscalls/flock/flock02.c b/testcases/kernel/syscalls/flock/flock02.c
-index 414df68..9ddf729 100644
---- a/testcases/kernel/syscalls/flock/flock02.c
-+++ b/testcases/kernel/syscalls/flock/flock02.c
-@@ -75,6 +75,7 @@
- #include <sys/types.h>
- #include <sys/file.h>
- #include <sys/wait.h>
-+#include <fcntl.h>
- #include <errno.h>
- #include <stdio.h>
- #include "test.h"
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0038-commands-gdb01-replace-stdin-with-dev-null.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0038-commands-gdb01-replace-stdin-with-dev-null.patch
deleted file mode 100644
index f7c0a4b..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0038-commands-gdb01-replace-stdin-with-dev-null.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 2f6ab8f694b26b7f2566624f6d1f23788d6ab8a0 Mon Sep 17 00:00:00 2001
-From: Jan Stancek <jstancek@redhat.com>
-Date: Mon, 11 Sep 2017 12:57:58 +0200
-Subject: [PATCH] commands/gdb01: replace stdin with /dev/null
-
-If this testcase runs as background process, gdb can receive
-SIGTTOU and then testcase gets stuck.
-
-Signed-off-by: Jan Stancek <jstancek@redhat.com>
-
-Upstream-Status: Backport
-[https://github.com/linux-test-project/ltp/commit/2f6ab8f694b26b7f2566624f6d1f23788d6ab8a0]
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- testcases/commands/gdb/gdb01.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/testcases/commands/gdb/gdb01.sh b/testcases/commands/gdb/gdb01.sh
-index 07ae36f..e3a5b51 100755
---- a/testcases/commands/gdb/gdb01.sh
-+++ b/testcases/commands/gdb/gdb01.sh
-@@ -29,7 +29,7 @@ TST_NEEDS_CMDS="gdb /bin/cat"
-
- simple_test()
- {
-- gdb /bin/cat -ex "run /etc/passwd" -ex quit
-+ gdb /bin/cat -ex "run /etc/passwd" -ex quit < /dev/null
- RC=$?
- if [ $RC -eq 0 ] ; then
- tst_res TPASS "gdb attached to process and completed run"
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch
new file mode 100644
index 0000000..e7c927e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch
@@ -0,0 +1,252 @@
+From 04da9478887e705ea38e4f097492da20e651686c Mon Sep 17 00:00:00 2001
+From: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
+Date: Wed, 13 Sep 2017 15:48:42 +0800
+Subject: [PATCH] commands/ar01: Fix for test in deterministic mode
+
+If binutils was configured with --enable-deterministic-archives,
+ar will run in deterministic mode by default, and use zero for
+timestamps and uids/gids, which makes the test case abnormal.
+
+Fix this by add the "U" modifier when deterministic mode is default.
+
+Signed-off-by: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
+Signed-off-by: Fei Jie <feij.fnst@cn.fujitsu.com>
+
+Upstream-Status: Backport
+[http://lists.linux.it/pipermail/ltp/2017-September/005668.html]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ testcases/commands/ar/ar01 | 92 ++++++++++++++++++++++++++--------------------
+ 1 file changed, 52 insertions(+), 40 deletions(-)
+
+diff --git a/testcases/commands/ar/ar01 b/testcases/commands/ar/ar01
+index ddab2e0..d688f76 100644
+--- a/testcases/commands/ar/ar01
++++ b/testcases/commands/ar/ar01
+@@ -23,14 +23,26 @@
+ # This is a basic ar command test.
+ #
+ TST_CNT=17
++TST_SETUP=setup
+ TST_TESTFUNC=test
+ TST_NEEDS_TMPDIR=1
+ . tst_test.sh
+
++setup()
++{
++ ar --help | grep "use zero for timestamps and uids/gids (default)" \
++ >/dev/null
++ if [ $? -eq 0 ]; then
++ MOD="U"
++ else
++ MOD=""
++ fi
++}
++
+ test1()
+ {
+- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
+- ROD ar -ra file1.in lib.a $TST_DATAROOT/file2.in
++ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
++ ROD ar -ra"$MOD" file1.in lib.a $TST_DATAROOT/file2.in
+ ROD ar -t lib.a \> ar.out
+
+ printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -47,9 +59,9 @@ test1()
+
+ test2()
+ {
+- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+- $TST_DATAROOT/file3.in $TST_DATAROOT/file4.in
+- ROD ar -ma file1.in lib.a file4.in
++ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++ $TST_DATAROOT/file3.in $TST_DATAROOT/file4.in
++ ROD ar -ma"$MOD" file1.in lib.a file4.in
+ ROD ar -t lib.a \> ar.out
+
+ printf "file1.in\nfile4.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -66,8 +78,8 @@ test2()
+
+ test3()
+ {
+- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
+- ROD ar -rb file3.in lib.a $TST_DATAROOT/file2.in
++ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
++ ROD ar -rb"$MOD" file3.in lib.a $TST_DATAROOT/file2.in
+ ROD ar -t lib.a \> ar.out
+
+ printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -84,9 +96,9 @@ test3()
+
+ test4()
+ {
+- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
+- $TST_DATAROOT/file2.in
+- ROD ar -mb file3.in lib.a file2.in
++ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
++ $TST_DATAROOT/file2.in
++ ROD ar -mb"$MOD" file3.in lib.a file2.in
+ ROD ar -t lib.a \> ar.out
+
+ printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -103,7 +115,7 @@ test4()
+
+ test5()
+ {
+- ROD ar -cr lib.a $TST_DATAROOT/file1.in \> ar.out
++ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in \> ar.out
+
+ if [ -s ar.out ]; then
+ tst_res TFAIL "ar produced output unexpectedly (-c)"
+@@ -117,7 +129,7 @@ test5()
+
+ test6()
+ {
+- ROD ar -qc lib.a $TST_DATAROOT/file1.in \> ar.out
++ ROD ar -qc"$MOD" lib.a $TST_DATAROOT/file1.in \> ar.out
+
+ if [ -s ar.out ]; then
+ tst_res TFAIL "ar produced output unexpectedly (-qc)"
+@@ -131,9 +143,9 @@ test6()
+
+ test7()
+ {
+- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+- $TST_DATAROOT/file3.in
+- ROD ar -d lib.a file1.in file2.in
++ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++ $TST_DATAROOT/file3.in
++ ROD ar -d"$MOD" lib.a file1.in file2.in
+ ROD ar -t lib.a \> ar.out
+
+ printf "file3.in\n" > ar.exp
+@@ -150,9 +162,9 @@ test7()
+
+ test8()
+ {
+- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+- $TST_DATAROOT/file3.in
+- ROD ar -d lib.a
++ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++ $TST_DATAROOT/file3.in
++ ROD ar -d"$MOD" lib.a
+ ROD ar -t lib.a \> ar.out
+
+ printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -169,8 +181,8 @@ test8()
+
+ test9()
+ {
+- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
+- ROD ar -ri file3.in lib.a $TST_DATAROOT/file2.in
++ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
++ ROD ar -ri"$MOD" file3.in lib.a $TST_DATAROOT/file2.in
+ ROD ar -t lib.a \> ar.out
+
+ printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -187,9 +199,9 @@ test9()
+
+ test10()
+ {
+- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
+- $TST_DATAROOT/file2.in
+- ROD ar -mi file3.in lib.a file2.in
++ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
++ $TST_DATAROOT/file2.in
++ ROD ar -mi"$MOD" file3.in lib.a file2.in
+ ROD ar -t lib.a \> ar.out
+
+ printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -206,9 +218,9 @@ test10()
+
+ test11()
+ {
+- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
+- $TST_DATAROOT/file2.in
+- ROD ar -m lib.a file3.in
++ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
++ $TST_DATAROOT/file2.in
++ ROD ar -m"$MOD" lib.a file3.in
+ ROD ar -t lib.a \> ar.out
+
+ printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -225,9 +237,9 @@ test11()
+
+ test12()
+ {
+- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+- $TST_DATAROOT/file3.in
+- ROD ar -p lib.a \> ar.out
++ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++ $TST_DATAROOT/file3.in
++ ROD ar -p"$MOD" lib.a \> ar.out
+
+ printf "This is file one\nThis is file two\nThis is file three\n" > ar.exp
+
+@@ -244,9 +256,9 @@ test12()
+ test13()
+ {
+
+- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+- $TST_DATAROOT/file3.in
+- ROD ar -q lib.a $TST_DATAROOT/file4.in
++ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++ $TST_DATAROOT/file3.in
++ ROD ar -q"$MOD" lib.a $TST_DATAROOT/file4.in
+ ROD ar -t lib.a \> ar.out
+
+ printf "file1.in\nfile2.in\nfile3.in\nfile4.in\n" > ar.exp
+@@ -264,14 +276,14 @@ test13()
+ test14()
+ {
+ ROD touch file0.in
+- ROD ar -cr lib.a file0.in $TST_DATAROOT/file1.in
++ ROD ar -cr"$MOD" lib.a file0.in $TST_DATAROOT/file1.in
+
+ file0_mtime1=$(ar -tv lib.a | grep file0.in)
+ file1_mtime1=$(ar -tv lib.a | grep file1.in)
+
+ touch -c -t $(date --date='next day' +"%Y%m%d%H%M") file0.in
+
+- ROD ar -ru lib.a file0.in $TST_DATAROOT/file1.in
++ ROD ar -ru"$MOD" lib.a file0.in $TST_DATAROOT/file1.in
+
+ file0_mtime2=$(ar -tv lib.a | grep file0.in)
+ file1_mtime2=$(ar -tv lib.a | grep file1.in)
+@@ -293,7 +305,7 @@ test14()
+
+ test15()
+ {
+- ROD ar -cr lib.a $TST_DATAROOT/file1.in
++ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in
+ ROD ar -tv lib.a \> ar.out
+
+ if grep -q '[rwx-]\{9\} [0-9].*/[0-9].*\s*[0-9].*.*file1.in' ar.out; then
+@@ -308,9 +320,9 @@ test15()
+
+ test16()
+ {
+- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+- $TST_DATAROOT/file3.in
+- ROD ar -xv lib.a \> ar.out
++ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++ $TST_DATAROOT/file3.in
++ ROD ar -xv"$MOD" lib.a \> ar.out
+
+ printf "x - file1.in\nx - file2.in\nx - file3.in\n" > ar.exp
+
+@@ -332,8 +344,8 @@ test16()
+
+ test17()
+ {
+- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in
+- ROD ar -xv lib.a file2.in \> ar.out
++ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in
++ ROD ar -xv"$MOD" lib.a file2.in \> ar.out
+
+ printf "x - file2.in\n" > ar.exp
+
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch
new file mode 100644
index 0000000..5096a85
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch
@@ -0,0 +1,40 @@
+From 67af7dbe8bdf29f9ed980d8d29feeae32a0a7a1d Mon Sep 17 00:00:00 2001
+From: Li Wang <liwang@redhat.com>
+Date: Tue, 23 Jan 2018 17:46:35 +0800
+Subject: [PATCH] safe_macros: make is_fuse() return zero if fs_type is NULL
+
+This commmit 28507e514c(safe_mount: Do not try mount() syscall for FUSE fs)
+involves FUSE fs check in safe_mount(), but we'd better guarantee the "fs_type"
+is legal to check in is_fuse() function otherwise system will kill the program.
+
+ cmdline="fanotify06"
+ contacts=""
+ analysis=exit
+ <<<test_output>>>
+ tst_test.c:980: INFO: Timeout per run is 0h 10m 00s
+ tst_test.c:1025: BROK: Test killed by SIGSEGV!
+
+Signed-off-by: Li Wang <liwang@redhat.com>
+Acked-by: Jan Stancek <jstancek@redhat.com>
+Upstream-Status: Accepted [https://github.com/linux-test-project/ltp/commit/67af7dbe8bdf29f9ed980d8d29feeae32a0a7a1d]
+---
+ lib/safe_macros.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/lib/safe_macros.c b/lib/safe_macros.c
+index c48e436dc..abdeca013 100644
+--- a/lib/safe_macros.c
++++ b/lib/safe_macros.c
+@@ -708,6 +708,9 @@ static int is_fuse(const char *fs_type)
+ {
+ unsigned int i;
+
++ if (!fs_type)
++ return 0;
++
+ for (i = 0; i < ARRAY_SIZE(fuse_fs_types); i++) {
+ if (!strcmp(fuse_fs_types[i], fs_type))
+ return 1;
+--
+2.11.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp_20170516.bb b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp_20170516.bb
deleted file mode 100644
index 653cbfd..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp_20170516.bb
+++ /dev/null
@@ -1,123 +0,0 @@
-SUMMARY = "Linux Test Project"
-DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features."
-HOMEPAGE = "http://ltp.sourceforge.net"
-SECTION = "console/utils"
-LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause"
-LIC_FILES_CHKSUM = "\
- file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
- file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \
- file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
- file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
- file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947 \
- file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
- file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \
-"
-
-DEPENDS = "attr libaio libcap acl openssl zip-native"
-DEPENDS_append_libc-musl = " fts "
-EXTRA_OEMAKE_append_libc-musl = " LIBC=musl "
-CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
-CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__"
-SRCREV = "18916a2e6d8c997b7b29dcfa9550d5a15b22ed22"
-
-SRC_URI = "git://github.com/linux-test-project/ltp.git \
- file://0001-add-_GNU_SOURCE-to-pec_listener.c.patch \
- file://0002-Add-knob-to-control-whether-numa-support-should-be-c.patch \
- file://0003-Add-knob-to-control-tirpc-support.patch \
- file://0004-build-Add-option-to-select-libc-implementation.patch \
- file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \
- file://0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch \
- file://0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \
- file://0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch \
- file://0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch \
- file://0011-Rename-sigset-variable-to-sigset1.patch \
- file://0018-guard-mallocopt-with-__GLIBC__.patch \
- file://0020-getdents-define-getdents-getdents64-only-for-glibc.patch \
- file://0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch \
- file://0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch \
- file://0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch \
- file://0025-mc_gethost-include-sys-types.h.patch \
- file://0026-crash01-Define-_GNU_SOURCE.patch \
- file://0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch \
- file://0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch \
- file://0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch \
- file://0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch \
- file://0034-periodic_output.patch \
- file://0035-fix-test_proc_kill-hang.patch \
- file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
- file://0037-ltp-fix-PAGE_SIZE-redefinition-and-O_CREAT-undeclear.patch \
- file://0038-commands-gdb01-replace-stdin-with-dev-null.patch \
- "
-
-S = "${WORKDIR}/git"
-
-inherit autotools-brokensep
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-export prefix = "/opt/ltp"
-export exec_prefix = "/opt/ltp"
-
-PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl,"
-EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4"
-EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite "
-# ltp network/rpc test cases ftbfs when libtirpc is found
-EXTRA_OECONF += " --without-tirpc "
-
-do_install(){
- install -d ${D}/opt/ltp/
- oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install
-
- # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run
- # as it lacks dependency on some perl moudle such as LWP::Simple
- # And this script previously works as a tool for analyzing failures from LTP
- # runs on the OSDL's Scaleable Test Platform (STP) and it mainly accesses
- # http://khack.osdl.org to retrieve ltp test results run on
- # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible
- rm -rf ${D}/opt/ltp/bin/STPfailure_report.pl
-
- # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual
- cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
-}
-
-RDEPENDS_${PN} = "\
- acl \
- at \
- attr \
- bash \
- cpio \
- cronie \
- curl \
- e2fsprogs-mke2fs \
- expect \
- gawk \
- gzip \
- iproute2 \
- ldd \
- libaio \
- logrotate \
- perl \
- python-core \
- unzip \
- util-linux \
- which \
-"
-
-FILES_${PN}-staticdev += "/opt/ltp/lib/libmem.a /opt/ltp/testcases/data/nm01/lib.a"
-
-FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/*"
-
-# Avoid generated binaries stripping. Otherwise some of the ltp tests such as ldd01 & nm01 fails
-INHIBIT_PACKAGE_STRIP = "1"
-INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
-# However, test_arch_stripped is already stripped, so...
-INSANE_SKIP_${PN} += "already-stripped"
-
-# Avoid file dependency scans, as LTP checks for things that may or may not
-# exist on the running system. For instance it has specific checks for
-# csh and ksh which are not typically part of OpenEmbedded systems (but
-# can be added via additional layers.)
-SKIP_FILEDEPS_${PN} = '1'
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp_20180118.bb b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp_20180118.bb
new file mode 100644
index 0000000..14fb41b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp_20180118.bb
@@ -0,0 +1,116 @@
+SUMMARY = "Linux Test Project"
+DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features."
+HOMEPAGE = "http://ltp.sourceforge.net"
+SECTION = "console/utils"
+LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause"
+LIC_FILES_CHKSUM = "\
+ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+ file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \
+ file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
+ file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
+ file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947 \
+ file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
+ file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \
+"
+
+DEPENDS = "attr libaio libcap acl openssl zip-native"
+DEPENDS_append_libc-musl = " fts "
+EXTRA_OEMAKE_append_libc-musl = " LIBC=musl "
+CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
+CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__"
+SRCREV = "731cd34e682d297b207668be8b1d15320a9ac1b1"
+
+SRC_URI = "git://github.com/linux-test-project/ltp.git \
+ file://0001-configure-add-knob-to-control-numa-support.patch \
+ file://0001-configure-Fix-default-value-of-without-numa-switch-i.patch \
+ file://0003-Add-knob-to-control-tirpc-support.patch \
+ file://0004-build-Add-option-to-select-libc-implementation.patch \
+ file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \
+ file://0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch \
+ file://0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \
+ file://0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch \
+ file://0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch \
+ file://0018-guard-mallocopt-with-__GLIBC__.patch \
+ file://0020-getdents-define-getdents-getdents64-only-for-glibc.patch \
+ file://0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch \
+ file://0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch \
+ file://0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch \
+ file://0026-crash01-Define-_GNU_SOURCE.patch \
+ file://0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch \
+ file://0034-periodic_output.patch \
+ file://0035-fix-test_proc_kill-hang.patch \
+ file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
+ file://0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch \
+ file://0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch \
+ "
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+export prefix = "/opt/ltp"
+export exec_prefix = "/opt/ltp"
+
+PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl,"
+EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4"
+EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite "
+# ltp network/rpc test cases ftbfs when libtirpc is found
+EXTRA_OECONF += " --without-tirpc "
+
+do_install(){
+ install -d ${D}/opt/ltp/
+ oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install
+
+ # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run
+ # as it lacks dependency on some perl moudle such as LWP::Simple
+ # And this script previously works as a tool for analyzing failures from LTP
+ # runs on the OSDL's Scaleable Test Platform (STP) and it mainly accesses
+ # http://khack.osdl.org to retrieve ltp test results run on
+ # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible
+ rm -rf ${D}/opt/ltp/bin/STPfailure_report.pl
+
+ # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual
+ cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
+}
+
+RDEPENDS_${PN} = "\
+ acl \
+ at \
+ attr \
+ bash \
+ cpio \
+ cronie \
+ curl \
+ e2fsprogs-mke2fs \
+ expect \
+ gawk \
+ gzip \
+ iproute2 \
+ ldd \
+ libaio \
+ logrotate \
+ perl \
+ python-core \
+ procps \
+ unzip \
+ util-linux \
+ which \
+ tar \
+"
+
+FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/* /opt/ltp/testcases/data/nm01/lib.a /opt/ltp/lib/libmem.a"
+
+# Avoid stripping some generated binaries otherwise some of the ltp tests such as ldd01 & nm01 fail
+INHIBIT_PACKAGE_STRIP_FILES = "/opt/ltp/testcases/bin/nm01 /opt/ltp/testcases/bin/ldd01"
+INSANE_SKIP_${PN} += "already-stripped staticdev"
+
+# Avoid file dependency scans, as LTP checks for things that may or may not
+# exist on the running system. For instance it has specific checks for
+# csh and ksh which are not typically part of OpenEmbedded systems (but
+# can be added via additional layers.)
+SKIP_FILEDEPS_${PN} = '1'
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man-db/man-db_2.8.1.bb b/import-layers/yocto-poky/meta/recipes-extended/man-db/man-db_2.8.1.bb
new file mode 100644
index 0000000..8328a67
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/man-db/man-db_2.8.1.bb
@@ -0,0 +1,43 @@
+SUMMARY = "An implementation of the standard Unix documentation system accessed using the man command"
+HOMEPAGE = "http://man-db.nongnu.org/"
+LICENSE = "LGPLv2.1 & GPLv2"
+LIC_FILES_CHKSUM = "file://docs/COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+ file://docs/COPYING;md5=eb723b61539feef013de476e68b5c50a"
+
+SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/man-db/man-db-${PV}.tar.xz"
+SRC_URI[md5sum] = "51842978e06686286421f9498d1009b7"
+SRC_URI[sha256sum] = "a6aec641ca3d9942b054cc0e9c3f05cb46a3a992bc0006795755e2fed1357f3e"
+
+DEPENDS = "libpipeline gdbm groff-native"
+
+# | /usr/src/debug/man-db/2.8.0-r0/man-db-2.8.0/src/whatis.c:939: undefined reference to `_nl_msg_cat_cntr'
+USE_NLS_libc-musl = "no"
+
+inherit gettext pkgconfig autotools
+
+EXTRA_OECONF = "--with-pager=less --disable-cache-owner"
+
+do_install_append_libc-musl() {
+ rm -f ${D}${libdir}/charset.alias
+}
+
+FILES_${PN} += "${prefix}/lib/tmpfiles.d"
+
+FILES_${PN}-dev += "${libdir}/man-db/libman.so ${libdir}/${BPN}/libmandb.so"
+
+RDEPENDS_${PN} += "groff"
+RRECOMMENDS_${PN} += "less"
+RPROVIDES_${PN} += " man"
+
+def compress_pkg(d):
+ if bb.utils.contains("INHERIT", "compress_doc", True, False, d):
+ compress = d.getVar("DOC_COMPRESS")
+ if compress == "gz":
+ return "gzip"
+ elif compress == "bz2":
+ return "bzip2"
+ elif compress == "xz":
+ return "xz"
+ return ""
+
+RDEPENDS_${PN} += "${@compress_pkg(d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.11.bb b/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.11.bb
deleted file mode 100644
index a3077a9..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.11.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Linux man-pages"
-DESCRIPTION = "The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs"
-SECTION = "console/utils"
-HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages"
-LICENSE = "GPLv2+"
-
-LIC_FILES_CHKSUM = "file://README;md5=8f2a3d43057d458e5066714980567a60"
-SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz"
-
-SRC_URI[md5sum] = "408300ed09d1ad5938070158b21da1d1"
-SRC_URI[sha256sum] = "e6db91a24e68c7c765b7b8e60f1591ed1049bc2dc3143db779eae4838b89d195"
-
-RDEPENDS_${PN} = "man"
-
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
-do_install() {
- oe_runmake install DESTDIR=${D}
-}
-
-# Only deliveres man-pages so FILES_${PN} gets everything
-FILES_${PN}-doc = ""
-FILES_${PN} = "${mandir}/*"
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "passwd.5 getspnam.3"
-ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
-ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.14.bb b/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.14.bb
new file mode 100644
index 0000000..f8bd090
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.14.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Linux man-pages"
+DESCRIPTION = "The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs"
+SECTION = "console/utils"
+HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages"
+LICENSE = "GPLv2+"
+
+LIC_FILES_CHKSUM = "file://README;md5=794f701617cc03fe50c53257660d8ec4"
+SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz"
+
+SRC_URI[md5sum] = "82bd2d05c4d0dba5e7a90d39c9555197"
+SRC_URI[sha256sum] = "aeebc6b09a11e7f7bbc98f3984fe8b8b2bde9d2f5f9dcbd4348a9e0d93704238"
+
+RDEPENDS_${PN} = "man"
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install() {
+ oe_runmake install DESTDIR=${D}
+}
+
+# Only deliveres man-pages so FILES_${PN} gets everything
+FILES_${PN}-doc = ""
+FILES_${PN} = "${mandir}/*"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "passwd.5 getspnam.3"
+ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
+ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/configure_sed.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/configure_sed.patch
deleted file mode 100644
index d49e683..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/configure_sed.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-man: replace ',' with '#'
-
-Sometimes, the parameters of CC/BUILD_CC contains the ',', which
-cause the sed command failed, so replace the ',' with '#'
-
-Upstream-Status: Pending
-
-Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- configure | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 9f62cf9..9a565ae 100755
---- a/configure
-+++ b/configure
-@@ -1321,9 +1321,9 @@ do
- echo "Creating $infile from $infile.in"
- sed -e '
- s,@version@,$version,
--s,@CC@,$CC,
-+s#@CC@#$CC#
- s,@EXEEXT@,$EXEEXT,
--s,@BUILD_CC@,$BUILD_CC,
-+s#@BUILD_CC@#$BUILD_CC#
- s,@INSTALL@,$INSTALL,
- s,@DEFS@,$DEFS,
- s,@LIBS@,$LIBS,
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch
deleted file mode 100644
index 6f834bd..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -u -r man-1.5g.old/configure man-1.5g/configure
---- man-1.5g.old/configure Wed Apr 7 04:16:05 1999
-+++ man-1.5g/configure Mon May 15 15:22:44 2000
-@@ -791,7 +791,7 @@
- read mode
- if test "$mode" != ""; then man_mode=$mode; fi
- fi
-- man_install_flags="-m $man_mode -o $man_user -g $man_group"
-+ man_install_flags=""
- fi
-
- # What sections do we anticipate?
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5h1-gencat.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5h1-gencat.patch
deleted file mode 100644
index 044b14c..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5h1-gencat.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- gencat/genlib.c 2006-08-02 20:11:44.000000000 +0200
-+++ gencat/genlib.c.oden 2008-12-21 19:18:50.000000000 +0100
-@@ -47,6 +47,7 @@ up-to-date. Many thanks.
- 01/14/91 4 nazgul Off by one on number specified entries
- */
-
-+#undef _GNU_SOURCE
- #include <stdio.h>
- #include <stdlib.h>
- #ifdef SYSV
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5h1-make.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5h1-make.patch
deleted file mode 100644
index 8631eb2..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5h1-make.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5g/man/Makefile.in.mike Fri Apr 9 13:35:54 1999
-+++ man-1.5g/man/Makefile.in Fri Apr 9 13:36:45 1999
-@@ -1,8 +1,8 @@
- # only executed from a subdir
- MAN1 = man whatis apropos
--MAN5 = man.conf
-+MAN5 = man.config
- MAN8 = makewhatis
--ALL = man.1 whatis.1 apropos.1 man.conf.5
-+ALL = man.1 whatis.1 apropos.1 man.config.5
- MAYBE8 = makewhatis
-
- .SUFFIXES: .man .1 .5 .8
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-initial.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-initial.patch
deleted file mode 100644
index fe56c07..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-initial.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5i2/src/makewhatis.sh.initial Tue Jul 3 15:38:39 2001
-+++ man-1.5i2/src/makewhatis.sh Tue Jul 3 15:39:39 2001
-@@ -81,8 +81,10 @@
- continue;;
- -s) setsections=1
- continue;;
-- -u) findarg="-newer /var/cache/man/whatis"
-- update=1
-+ -u) if [ -e /var/cache/man/whatis ]; then
-+ findarg="-newer /var/cache/man/whatis"
-+ update=1
-+ fi
- continue;;
- -v) verbose=1
- continue;;
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-newline.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-newline.patch
deleted file mode 100644
index 611df5d..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-newline.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- src/man.c 2008-12-21 19:17:31.000000000 +0100
-+++ src/man.c.oden 2008-12-21 19:17:38.000000000 +0100
-@@ -391,7 +391,7 @@ again:
- beg++;
-
- end = beg;
-- while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0')
-+ while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0' && (end-buf)<BUFSIZE)
- end++; /* note that buf is NUL-terminated */
- *end = '\0';
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-overflow.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-overflow.patch
deleted file mode 100644
index 52d2881..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-overflow.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5i2/src/man.c.overflow Mon Jun 25 00:01:45 2001
-+++ man-1.5i2/src/man.c Mon Jun 25 00:01:45 2001
-@@ -381,6 +381,9 @@
- strcat(name, "/");
- strcat(name, beg);
- }
-+ /* If this is too long, bad things have already happened. *
-+ * we should quit IMMEDIATELY. */
-+ if(strlen(name)>sizeof(ultname)) _exit(1);
-
- goto again;
- }
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-i18n.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-i18n.patch
deleted file mode 100644
index 2ae09c0..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-i18n.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5j/msgs/inst.sh.i18n Wed Apr 25 10:40:50 2001
-+++ man-1.5j/msgs/inst.sh Wed Apr 25 10:41:17 2001
-@@ -27,8 +27,7 @@
- for j in $M; do
- if [ -f $j ]; then
- i=`echo $j | sed -e 's/mess.//; s/.cat//'`
-- dest=`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
-- dest=${PREFIX}$dest
-+ dest=${PREFIX}/`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
- echo "mkdir -p `dirname $dest`"
- mkdir -p `dirname $dest`;
- echo "install -c -m 644 $j $dest"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-nocache.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-nocache.patch
deleted file mode 100644
index 751dddd..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-nocache.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5j/src/man.conf.in.nocache Thu Nov 22 15:07:12 2001
-+++ man-1.5j/src/man.conf.in Thu Nov 22 15:07:12 2001
-@@ -81,6 +81,9 @@
- #
- #NOCACHE
- #
-+# NOCACHE keeps man from creating cache pages
-+NOCACHE
-+#
- # Useful paths - note that COL should not be defined when
- # NROFF is defined as "groff -Tascii" or "groff -Tlatin1";
- # not only is it superfluous, but it actually damages the output.
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-utf8.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-utf8.patch
deleted file mode 100644
index 33d3e4c..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-utf8.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5j/configure.utf8 Thu Nov 22 15:02:35 2001
-+++ man-1.5j/configure Thu Nov 22 15:03:15 2001
-@@ -408,9 +408,9 @@
- Fgawk=/bin/gawk
- Fawk=/bin/gawk
- Fmawk=missing
-- troff=""
-- nroff=""
-- jnroff=""
-+ troff=/usr/bin/troff
-+ nroff=/usr/bin/nroff
-+ jnroff=/usr/bin/nroff
- eqn=""
- neqn=""
- jneqn=""
-@@ -453,6 +453,8 @@
- done
- done
- Fgroff=/usr/bin/groff
-+ Fnroff=/usr/bin/nroff
-+ Fjnroff=/usr/bin/nroff
- Fgeqn=/usr/bin/geqn
- Fgtbl=/usr/bin/gtbl
- Fcol=/usr/bin/col
-@@ -485,25 +487,25 @@
- then
- if test $Fnroff = "missing"
- then
-- nroff="nroff -Tlatin1 -mandoc"
-+ nroff="nroff -Tutf8 -mandoc"
- else
-- nroff="$Fnroff -Tlatin1 -mandoc"
-+ nroff="$Fnroff -Tutf8 -mandoc"
- fi
- troff="troff -mandoc"
- echo "Warning: could not find groff"
- else
- if test $Fnroff = "missing"
- then
-- nroff="$Fgroff -Tlatin1 -mandoc"
-+ nroff="$Fgroff -Tutf8 -mandoc"
- else
-- nroff="$Fnroff -Tlatin1 -mandoc"
-+ nroff="$Fnroff -Tutf8 -mandoc"
- fi
- troff="$Fgroff -Tps -mandoc"
-- jnroff="$Fgroff -Tnippon -mandocj"
-+ jnroff="$Fjnroff -Tutf8 -mandocj"
- fi
- eqn="$Fgeqn -Tps"
-- neqn="$Fgeqn -Tlatin1"
-- jneqn="$Fgeqn -Tnippon"
-+ neqn="$Fgeqn -Tutf8"
-+ jneqn="$Fgeqn -Tutf8"
- tbl="$Fgtbl"
- col="$Fcol"
- vgrind="$Fvgrind"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-confpath.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-confpath.patch
deleted file mode 100644
index b5746c2..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-confpath.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- configure 2006-05-01 19:56:14.000000000 +0200
-+++ configure.oden 2008-12-21 19:16:50.000000000 +0100
-@@ -198,7 +198,7 @@
- confdir="${confprefix}/share/misc"
- fi
- fi
--conffilename="man.conf"
-+conffilename="man.config"
-
- if test "$RANDOM" = "$RANDOM"; then
- # Plain old Bourne shell.
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-nonascii.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-nonascii.patch
deleted file mode 100644
index d662d9b..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-nonascii.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- ./src/apropos.sh.nonascii 2001-11-23 00:30:42.000000000 +0100
-+++ ./src/apropos.sh 2002-08-13 15:44:53.000000000 +0200
-@@ -18,9 +18,9 @@
-
- # When man pages in your favorite locale look to grep like binary files
- # (and you use GNU grep) you may want to add the 'a' option to *grepopt1.
--aproposgrepopt1='i'
-+aproposgrepopt1='ia'
- aproposgrepopt2=''
--whatisgrepopt1='iw'
-+whatisgrepopt1='iwa'
- whatisgrepopt2='^'
- grepopt1=$%apropos_or_whatis%grepopt1
- grepopt2=$%apropos_or_whatis%grepopt2
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-sofix.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-sofix.patch
deleted file mode 100644
index 50b9252..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-sofix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5j/src/man.c.sofix Thu Nov 22 14:51:44 2001
-+++ man-1.5j/src/man.c Thu Nov 22 14:52:44 2001
-@@ -300,7 +300,7 @@
-
- if (strlen(name0) >= sizeof(ultname))
- return name0;
-- strcpy(ultname, name0);
-+ strncpy(ultname, name0, BUFSIZE-32);
- name = ultname;
-
- again:
-@@ -332,7 +332,7 @@
- * .so files - we could glob for all possible extensions,
- * for now: only try .gz
- */
-- else if (fp == NULL && get_expander(".gz") &&
-+ if (fp == NULL && get_expander(".gz") &&
- strlen(name)+strlen(".gz") < BUFSIZE) {
- strcat(name, ".gz");
- fp = fopen (name, "r");
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch
deleted file mode 100644
index 0512999..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- ./configure.ad 2003-12-11 19:17:10.000000000 +0100
-+++ ./configure 2003-12-11 19:17:27.000000000 +0100
-@@ -26,7 +26,7 @@
- # (Indeed, -r may cause the terminal to get into funny states.
- # Very inconvenient. For viewing pages in strange locales, set LC_*.)
- #
--DEFAULTLESSOPT="-is"
-+DEFAULTLESSOPT="-isr"
- #
- # Note that not creating any cat directories (/var/cache/man or so)
- # and not making man suid or sgid is recommended.
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch
deleted file mode 100644
index bc97f56..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- ./configure.less 2003-12-11 19:18:15.000000000 +0100
-+++ ./configure 2003-12-11 19:20:03.000000000 +0100
-@@ -401,18 +401,13 @@
-
- if test "$ans" = "false"
- then
-- for i in more less cmp cat awk gawk mawk
-- do
-- eval F$i="missing"
-- for j in $DEFPATH
-- do
-- if test -f $j/$i
-- then
-- eval F$i=$j/$i
-- break
-- fi
-- done
-- done
-+ Fmore=/bin/more
-+ Fless=/usr/bin/less
-+ Fcmp=/usr/bin/cmp
-+ Fcat=/bin/cat
-+ Fgawk=/bin/gawk
-+ Fawk=/bin/gawk
-+ Fmawk=missing
- troff=""
- nroff=""
- jnroff=""
-@@ -457,6 +452,19 @@
- fi
- done
- done
-+ Fgroff=/usr/bin/groff
-+ Fgeqn=/usr/bin/geqn
-+ Fgtbl=/usr/bin/gtbl
-+ Fcol=/usr/bin/col
-+ Fgrefer=/usr/bin/grefer
-+ Fgpic=/usr/bin/gpic
-+ Fmore=/bin/more
-+ Fless=/usr/bin/less
-+ Fcmp=/usr/bin/cmp
-+ Fcat=/bin/cat
-+ Fgawk=/bin/gawk
-+
-+
- for i in eqn tbl refer pic
- do
- if test `eval echo \\$Fg$i` = "missing"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch
deleted file mode 100644
index c85ff1d..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5m2/configure.color 2006-09-16 18:27:37.000000000 +0200
-+++ man-1.5m2/configure 2006-09-16 18:28:44.000000000 +0200
-@@ -539,6 +539,8 @@
- troff="$troff -c"
- nroff="$nroff -c"
- jnroff="$jnroff -c"
-+else
-+ troff="$troff -c"
- fi
-
- if [ x$default = x ]; then
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch
deleted file mode 100644
index 8af78ea..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5m2/src/util.c_sigpipe 2006-12-09 13:43:21.000000000 +0100
-+++ man-1.5m2/src/util.c 2006-12-09 13:53:13.000000000 +0100
-@@ -116,11 +116,14 @@
- static int
- system1 (const char *command) {
- void (*prev_handler)(int) = signal (SIGINT,catch_int);
-+ signal (SIGPIPE,SIG_IGN);
- int ret = system(command);
-
- /* child terminated with signal? */
- if (WIFSIGNALED(ret) &&
-- (WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT))
-+ (WTERMSIG(ret) == SIGINT ||
-+ WTERMSIG(ret) == SIGPIPE ||
-+ WTERMSIG(ret) == SIGQUIT))
- exit(1);
-
- /* or we caught an interrupt? */
-@@ -128,6 +131,7 @@
- exit(1);
-
- signal(SIGINT,prev_handler);
-+ signal(SIGPIPE,SIG_DFL);
- return ret;
- }
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch
deleted file mode 100644
index e321325..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -Naur man-1.6e.orig/src/apropos.sh man-1.6e/src/apropos.sh
---- man-1.6e.orig/src/apropos.sh 2007-05-18 13:49:31.000000000 -0300
-+++ man-1.6e/src/apropos.sh 2007-05-18 14:24:33.000000000 -0300
-@@ -60,16 +60,56 @@
- esac
- done
-
-+# list of languages to look for
-+LANG_LIST=`echo $LANGUAGE:$LC_ALL:$LC_MESSAGES:$LANG | tr ':' ' '`
-+DIR_LIST=""
-+for d in /var/cache/man $manpath /usr/lib
-+do
-+ for l in $LANG_LIST
-+ do
-+ if [ -d $d/$l ]
-+ then
-+ # check that the path is not already in the list
-+ if ! echo "$DIR_LIST" | grep " $d/$l\b" > /dev/null
-+ then
-+ DIR_LIST="$DIR_LIST $d/$l"
-+ fi
-+ fi
-+ done
-+ DIR_LIST="$DIR_LIST $d"
-+ # check that the path is not already in the list
-+ if ! echo "$DIR_LIST" | grep " $d\b" > /dev/null
-+ then
-+ DIR_LIST="$DIR_LIST $d/$l"
-+ fi
-+done
-+
- while [ "$1" != "" ]
- do
- found=0
-- for d in /var/cache/man $manpath /usr/lib
-+ # in order not to display lines in more than one language for
-+ # a same man page; we check that a given man page name
-+ # hasn't already been displayed
-+ BAZ=""
-+ for d in $DIR_LIST
- do
- if [ -f $d/whatis ]
- then
-- if grep -"$grepopt1" "$grepopt2""$1" $d/whatis
-+ if FOO=`grep -"$grepopt1" "$grepopt2""$1" $d/whatis`
- then
-- found=1
-+ # the LC_ALL=C is needed in case the text is
-+ # in a different encoding than the locale
-+ BAR=`echo -e "$FOO" | LC_ALL=C sed 's/ - .*$//' | tr ' []' '_' | sort -u`
-+ for i in $BAR
-+ do
-+ if ! echo "$BAZ" | grep "$i" > /dev/null
-+ then
-+ BAZ="$BAZ $i"
-+ i="^`echo $i | sed 's:_\+:\\\(\[_ \]\\\|\\\[\\\|\\\]\\\)\\\+:g'`"
-+ echo -e "$FOO" | grep "$i"
-+ found=1
-+ fi
-+ done
- # Some people are satisfied with a single occurrence
- # But it is better to give all
- # break
-diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh
---- man-1.6e.orig/src/makewhatis.sh 2007-05-18 13:49:31.000000000 -0300
-+++ man-1.6e/src/makewhatis.sh 2007-05-18 13:50:07.000000000 -0300
-@@ -41,12 +41,32 @@
-
- program=`basename $0`
-
-+# this allows to define language specific values fro NAME, DESCRIPTION
-+# if not defined, using those default values
-+if [ -z "$MAN_NAME" ]
-+then
-+ MAN_NAME="ИМЕ|NOM|JMÉNO|NAVN|ΟΝΟΜΑ|NOMBRE|NIME|IZENA|NIMI|IME|\
-+NÉV|NOME|名前|이름|NAAM|NAZWA|NUME|ИМЯ|MENO|НАЗВА|名称|名稱"
-+fi
-+if [ -z "$MAN_DESCRIPTION" ]
-+then
-+ MAN_DESCRIPTION="ОПИСАНИЕ|DESCRIPCIÓ|POPIS|BESKRIVELSE|BESCHREIBUNG|\
-+ΠΕΡΙΓΡΑΦΗ|DESCRIPCIÓN|KIRJELDUS|AZALPENA|KUVAUS|OPIS|LEÍRÁS|DESCRIZIONE|\
-+説明|설명|BESCHRIJVING|DESCRIÇÃO|DESCRIERE|ОПИС|描述"
-+fi
-+# make them into awk regexp
-+MAN_NAME="^(${MAN_NAME})";
-+MAN_DESCRIPTION="^(${MAN_DESCRIPTION})";
-+
- # In case both /usr/man and /usr/share/man exist, the former is local
- # and should be first.
- # It is a bug to add /var/cache/man to DEFCATPATH.
- dm=
- for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man
- do
-+ if [ -n "$LANG" -a -d "$d/$LANG" ]; then
-+ if [ x$dm = x ]; then dm="$d/$LANG"; else dm=$dm:"$d/$LANG"; fi
-+ fi
- if [ -d $d ]; then
- if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi
- fi
-@@ -55,6 +75,9 @@
- dc=
- for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man
- do
-+ if [ -n "$LANG" -a -d "$d/$LANG" ]; then
-+ if [ x$dc = x ]; then dm="$d/$LANG"; else dm=$dc:"$d/$LANG"; fi
-+ fi
- if [ -d $d ]; then
- if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi
- fi
-@@ -194,7 +217,7 @@
- section=$i
- curdir=$mandir/${pages}$i
- export section verbose curdir
-- find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK '
-+ find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | LC_ALL=C $AWK -v MAN_NAME="$MAN_NAME" -v MAN_DESCRIPTION="$MAN_DESCRIPTION" '
-
- function readline() {
- if (use_zcat || use_bzcat) {
-@@ -261,13 +284,7 @@
- gsub(/.\b/, "");
- if (($1 ~ /^\.[Ss][Hh]/ &&
- ($2 ~ /[Nn][Aa][Mm][Ee]/ ||
-- $2 ~ /^JMÉNO/ || $2 ~ /^NAVN/ || $2 ~ /^NUME/ ||
-- $2 ~ /^BEZEICHNUNG/ || $2 ~ /^NOMBRE/ ||
-- $2 ~ /^NIMI/ || $2 ~ /^NOM/ || $2 ~ /^IME/ ||
-- $2 ~ /^N[ÉE]V/ || $2 ~ /^NAMA/ || $2 ~ /^̾Á°/ ||
-- $2 ~ /^̾¾Î/ || $2 ~ /^À̸§/ || $2 ~ /^NAZWA/ ||
-- $2 ~ /^îáú÷áîéå/ || $2 ~ /^Ãû³Æ/ || $2 ~ /^¦WºÙ/ ||
-- $2 ~ /^NOME/ || $2 ~ /^NAAM/ || $2 ~ /^ÈÌÅ/)) ||
-+ $2 ~ MAN_NAME )) ||
- (pages == "cat" && $1 ~ /^NAME/)) {
- if (!insh) {
- insh = 1;
-@@ -278,6 +295,7 @@
- if ($1 ~ /^\.[Ss][HhYS]/ ||
- (pages == "cat" &&
- ($1 ~ /^S[yYeE]/ || $1 ~ /^DESCRIPTION/ ||
-+ $1 ~ MAN_DESCRIPTION ||
- $1 ~ /^COMMAND/ || $1 ~ /^OVERVIEW/ ||
- $1 ~ /^STRUCTURES/ || $1 ~ /^INTRODUCTION/ ||
- $0 ~ /^[^ ]/))) {
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-mandirs.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-mandirs.patch
deleted file mode 100644
index b240064..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-mandirs.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.6e.orig/src/man.conf.in 2005-08-20 20:26:06.000000000 -0300
-+++ man-1.6e/src/man.conf.in 2007-05-18 10:30:29.000000000 -0300
-@@ -36,11 +36,12 @@
- #
- # Every automatically generated MANPATH includes these fields
- #
--MANPATH /usr/man
- MANPATH /usr/share/man
-+MANPATH /usr/X11R6/man
- MANPATH /usr/local/man
- MANPATH /usr/local/share/man
--MANPATH /usr/X11R6/man
-+MANPATH /usr/kerberos/man
-+MANPATH /usr/man
- #
- # Uncomment if you want to include one of these by default
- #
-@@ -67,6 +68,9 @@
- MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man
- MANPATH_MAP /usr/bin/X11 /usr/X11R6/man
- MANPATH_MAP /usr/bin/mh /usr/share/man
-+MANPATH_MAP /usr/kerberos/bin /usr/kerberos/man
-+MANPATH_MAP /usr/kerberos/sbin /usr/kerberos/man
-+
- #
- # NOAUTOPATH keeps man from automatically adding directories that look like
- # manual page directories to the path.
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-new_sections.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-new_sections.patch
deleted file mode 100644
index fb9773c..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-new_sections.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.6e.orig/configure 2006-05-01 14:56:14.000000000 -0300
-+++ man-1.6e/configure 2007-05-18 14:35:43.000000000 -0300
-@@ -960,7 +960,7 @@
-
- # What sections do we anticipate?
-
--tmpsections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o"
-+tmpsections="1 1p 8 2 3 3p 3pm 4 5 6 7 9 0p tcl n l p o"
-
- if [ x$default = x ]; then
- echo ""
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch
deleted file mode 100644
index 1d1cb0c..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: man-1.6f/src/makewhatis.sh
-===================================================================
---- man-1.6f.orig/src/makewhatis.sh 2010-12-29 13:42:34.000000000 -0800
-+++ man-1.6f/src/makewhatis.sh 2010-12-29 13:42:35.667428347 -0800
-@@ -124,7 +124,7 @@
- continue;;
- -s) setsections=1
- continue;;
-- -u) findarg="-ctime 0"
-+ -u) findarg="-newer /var/cache/man/whatis"
- update=1
- continue;;
- -v) verbose=1
-@@ -165,14 +165,7 @@
- # first truncate all the whatis files that will be created new,
- # then only update - we might visit the same directory twice
- if [ x$update = x ]; then
-- for pages in man cat
-- do
-- eval path="\$$pages"path
-- for mandir in $path
-- do
-- cp /dev/null $mandir/whatis
-- done
-- done
-+ cp /dev/null /var/cache/man/whatis
- fi
-
- for pages in man cat
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-security.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-security.patch
deleted file mode 100644
index 312a882..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-security.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh
---- man-1.6e.orig/src/makewhatis.sh 2006-07-19 01:58:08.000000000 -0300
-+++ man-1.6e/src/makewhatis.sh 2007-05-18 10:18:31.000000000 -0300
-@@ -45,7 +45,7 @@
- # and should be first.
- # It is a bug to add /var/cache/man to DEFCATPATH.
- dm=
--for d in /usr/man /usr/share/man /usr/X11R6/man /usr/local/man
-+for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man
- do
- if [ -d $d ]; then
- if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi
-@@ -53,7 +53,7 @@
- done
- DEFMANPATH=$dm
- dc=
--for d in /usr/man/preformat /usr/man /usr/share/man/preformat /usr/share/man
-+for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man
- do
- if [ -d $d ]; then
- if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi
-@@ -76,12 +76,12 @@
- # We try here to be careful (and avoid preconstructed symlinks)
- # in case makewhatis is run as root, by creating a subdirectory of /tmp.
-
--TMPFILEDIR=/tmp/whatis.tmp.dir.$$
--rm -rf $TMPFILEDIR
--if ! mkdir -m 0700 $TMPFILEDIR; then
-- echo Could not create $TMPFILEDIR
-- exit 1;
-+TMPFILEDIR=`mktemp -d /tmp/makewhatisXXXXXX`
-+if [ $? -ne 0 ]; then
-+ echo "$0: Can't create temp file, exiting..."
-+ exit 1
- fi
-+chmod 0700 $TMPFILEDIR
- TMPFILE=$TMPFILEDIR/w
-
- # make sure TMPFILEDIR is deleted if program is killed or terminates
-diff -Naur man-1.6e.orig/src/man.c man-1.6e/src/man.c
---- man-1.6e.orig/src/man.c 2006-05-01 17:34:22.000000000 -0300
-+++ man-1.6e/src/man.c 2007-05-18 10:11:33.000000000 -0300
-@@ -1234,7 +1234,6 @@
- #endif
-
-
--#if 0
- {
- /* There are no known cases of buffer overflow caused by
- excessively long environment variables. In case you find one,
-@@ -1257,7 +1256,6 @@
- MAN_ICONV_PATH, MAN_ICONV_OPT, MAN_ICONV_INPUT_CHARSET,
- MAN_ICONV_OUTPUT_CHARSET, NLSPATH, PATH */
- }
--#endif
-
-
- #ifndef __FreeBSD__
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch
deleted file mode 100644
index 568f742..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -Naur man-1.6e.orig/catopen/catopen.c man-1.6e/catopen/catopen.c
---- man-1.6e.orig/catopen/catopen.c 2005-08-20 20:26:06.000000000 -0300
-+++ man-1.6e/catopen/catopen.c 2007-05-18 11:31:05.000000000 -0300
-@@ -9,22 +9,63 @@
- extern char *index (const char *, int); /* not always in <string.h> */
- extern char *my_malloc(int); /* in util.c */
-
-+/* if the program has sgid/suid privileges then getenv doesn't return
-+ * NLSPATH; so we set here a good default value.
-+ */
- #ifndef DEFAULT_NLSPATH
- # if __GLIBC__ >= 2
--# define DEFAULT_NLSPATH "/usr/share/locale/%L/%N"
-+# define DEFAULT_NLSPATH "/usr/share/locale/%L/%N:/usr/share/locale/%l_%t/%N:/usr/share/locale/%l/%N"
- # else
- # define DEFAULT_NLSPATH "/usr/lib/locale/%N/%L"
- # endif
- #endif
-
--static nl_catd my_catopenpath(char *name, char *path);
-+static nl_catd my_catopenpath(char *name, char *path, char *lang);
-
- static /* this source included in gripes.c */
- nl_catd
- my_catopen(char *name, int oflag) {
-- nl_catd fd;
-+ nl_catd fd = (nl_catd) -1;
-+
-+ /* using first the my_catopenpath, which looks with LANGUAGE
-+ * and only if it fails ressort to catopen, it gives better i18n
-+ */
-+ {
-+ char *nlspath, *lang, *s;
-
-- fd = catopen(name, oflag);
-+ /*
-+ * "If NLSPATH does not exist in the environment, or if a
-+ * message catalog cannot be opened in any of the paths specified
-+ * by NLSPATH, then an implementation defined default path is used"
-+ */
-+ nlspath = getenv("NLSPATH");
-+ if (!nlspath)
-+ nlspath = DEFAULT_NLSPATH;
-+
-+ lang = getenv("LANGUAGE");
-+ if (!lang)
-+ lang = getenv("LC_ALL");
-+ if (!lang)
-+ lang = getenv("LC_MESSAGES");
-+ if (!lang)
-+ lang = getenv("LANG");
-+ if (!lang)
-+ lang = "";
-+
-+ while(*lang && (fd == (nl_catd) -1)) {
-+ s = index(lang, ':');
-+ if (s) *s = 0;
-+ fd = my_catopenpath(name, nlspath, lang);
-+ if (s) lang=s+1;
-+ else lang = "";
-+ }
-+ if (fd == (nl_catd) -1)
-+ fd = my_catopenpath(name, nlspath, "en");
-+ }
-+
-+ /* still not found, use the system catopen */
-+ if (fd == (nl_catd) -1)
-+ fd = catopen(name, oflag);
-
- if (fd == (nl_catd) -1 && oflag) {
- oflag = 0;
-@@ -32,8 +73,6 @@
- }
-
- if (fd == (nl_catd) -1) {
-- char *nlspath;
--
- /* The libc catopen fails - let us see if we can do better */
- /* The quotes below are from X/Open, XPG 1987, Vol. 3. */
-
-@@ -58,17 +97,6 @@
- #endif
- }
-
-- /*
-- * "If NLSPATH does not exist in the environment, or if a
-- * message catalog cannot be opened in any of the paths specified
-- * by NLSPATH, then an implementation defined default path is used"
-- */
--
-- nlspath = getenv("NLSPATH");
-- if (nlspath)
-- fd = my_catopenpath(name, nlspath);
-- if (fd == (nl_catd) -1)
-- fd = my_catopenpath(name, DEFAULT_NLSPATH);
- }
- return fd;
- }
-@@ -90,15 +118,13 @@
- *
- */
- static nl_catd
--my_catopenpath(char *name, char *nlspath) {
-- int fd;
-+my_catopenpath(char *name, char *nlspath, char *lang) {
- nl_catd cfd = (nl_catd) -1;
-- char *path0, *path, *s, *file, *lang, *lang_l, *lang_t, *lang_c;
-+ char *path0, *path, *s, *file, *lang_l, *lang_t, *lang_c;
- int langsz, namesz, sz, lang_l_sz, lang_t_sz, lang_c_sz;
-
- namesz = strlen(name);
-
-- lang = getenv("LANG");
- if (!lang)
- lang = "";
- langsz = strlen(lang);
-@@ -194,14 +220,9 @@
- path = s+1;
- } else
- path = 0;
-- fd = open(file, O_RDONLY);
-- if (fd != -1) {
-- /* we found the right catalog - but we don't know the
-- type of nl_catd, so close it again and ask libc */
-- close(fd);
-- cfd = catopen(file, 0);
-- break;
-- }
-+ cfd = catopen(file, 0);
-+ if (cfd != (nl_catd) -1)
-+ break;
- }
-
- free(path0);
-diff -Naur man-1.6e.orig/src/manpath.c man-1.6e/src/manpath.c
---- man-1.6e.orig/src/manpath.c 2006-08-03 18:18:33.000000000 -0300
-+++ man-1.6e/src/manpath.c 2007-05-18 11:02:48.000000000 -0300
-@@ -282,13 +282,14 @@
- /* We cannot use "lang = setlocale(LC_MESSAGES, NULL)" or so:
- the return value of setlocale is an opaque string. */
- /* POSIX prescribes the order: LC_ALL, LC_MESSAGES, LANG */
-- if((lang = getenv("LC_ALL")) != NULL)
-+ /* LANGUAGE is GNU/Linux and overrules all */
-+ if((lang = getenv("LANGUAGE")) != NULL)
- split2(dir, lang, add_to_mandirlist_x, perrs);
-- if((lang = getenv("LC_MESSAGES")) != NULL)
-+ else if((lang = getenv("LC_ALL")) != NULL)
- split2(dir, lang, add_to_mandirlist_x, perrs);
-- if((lang = getenv("LANG")) != NULL)
-+ else if((lang = getenv("LC_MESSAGES")) != NULL)
- split2(dir, lang, add_to_mandirlist_x, perrs);
-- if((lang = getenv("LANGUAGE")) != NULL)
-+ else if((lang = getenv("LANG")) != NULL)
- split2(dir, lang, add_to_mandirlist_x, perrs);
- add_to_mandirlist_x(dir, 0, perrs);
- }
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-whatis2.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-whatis2.patch
deleted file mode 100644
index fc4ed31..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-whatis2.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: man-1.6f/src/makewhatis.sh
-===================================================================
---- man-1.6f.orig/src/makewhatis.sh 2010-12-29 13:51:45.000000000 -0800
-+++ man-1.6f/src/makewhatis.sh 2010-12-29 13:59:35.399799412 -0800
-@@ -164,10 +164,15 @@
- fi
- catpath=`echo ${catpath} | tr : ' '`
-
-+#WHATIS_DIR=$DESTDIR/var/cache/man/`echo $here|sed -e 's!.*/man/!!g'`
-+WHATIS_DIR=$DESTDIR/var/cache/man/$LANG
-+[[ -d $WHATIS_DIR ]] || mkdir -p $WHATIS_DIR/
-+
- # first truncate all the whatis files that will be created new,
- # then only update - we might visit the same directory twice
- if [ x$update = x ]; then
-- cp /dev/null /var/cache/man/whatis
-+ mkdir -p $WHATIS_DIR/
-+ /bin/echo -n > $WHATIS_DIR/whatis
- fi
-
- for pages in man cat
-@@ -180,13 +185,7 @@
- echo "about to enter $mandir" > /dev/stderr
- fi
-
-- # kludge for Slackware's /usr/man/preformat
-- if [ $mandir = /usr/man/preformat ]
-- then
-- mandir1=/usr/man
-- else
-- mandir1=$mandir
-- fi
-+ mandir1=$WHATIS_DIR
-
- # if $mandir is on a readonly partition, and the whatis file
- # is not a symlink, then let's skip trying to update it
-@@ -207,11 +206,6 @@
- fi
- fi
-
-- if [ -s ${mandir}/whatis -a $pages = man -a x$update = x ]; then
-- if [ x$verbose != x ]; then
-- echo skipping $mandir - we did it already > /dev/stderr
-- fi
-- else
- here=`pwd`
- cd $mandir
- for i in $sections
-@@ -447,7 +447,6 @@
-
- chmod 644 ${mandir1}/whatis
- rm $TMPFILE
-- fi
- done
- done
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-compile-warnings.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-compile-warnings.patch
deleted file mode 100644
index 4631d2d..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-compile-warnings.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-Fix a build error when building man.config.5 (a remnant of a long
-ago previous patch). Optimized the manpages Makefile for parallel
-builds. Also, fix compile warnings in a couple other files.
-
-Upstream-Status: Pending
-
-Signed-off-by: Bill Randle <william.c.randle@intel.com>
-
---- man-1.6g/man/Makefile.in.orig 2016-03-28 17:31:08.723949180 -0700
-+++ man-1.6g/man/Makefile.in 2016-03-28 17:46:12.866910386 -0700
-@@ -5,6 +5,13 @@
- ALL = man.1 whatis.1 apropos.1 man.config.5
- MAYBE8 = makewhatis
-
-+SUBDIRS := $(shell echo @languages@)
-+
-+.PHONY: subdirs $(SUBDIRS)
-+
-+man.config.man: man.conf.man
-+ @cp $< $@
-+
- .SUFFIXES: .man .1 .5 .8
-
- .man.1:
-@@ -19,11 +26,11 @@
- INSTALL = @INSTALL@ -c -m 644
-
- # Where to put the manual pages.
--mandir = $(DESTDIR)$(PREFIX)@mandir@$(SLANG)
-+mandir := $(DESTDIR)$(PREFIX)@mandir@$(SLANG)
-
- all: $(ALL)
- for i in $(MAYBE8); \
-- do if test -f $$i.man; then make -f ../Makefile $$i.8; fi; done
-+ do if test -f $$i.man; then $(MAKE) -f ../Makefile $$i.8; fi; done
-
- install: $(ALL)
- mkdir -p $(mandir)/man1 $(mandir)/man5 $(mandir)/man8
-@@ -38,24 +45,27 @@
- rm -f core *.in *.@man1ext@ *.@man5ext@ *.@man8ext@ *~
-
- spotless:
-+ rm -f man.config.man
-
- subdirs:
-- @for i in @languages@; do if test -d $$i; then echo; \
-- echo "==== Making the `cat $$i.txt` man pages. ===="; \
-- cd $$i; make -f ../Makefile; cd ..; \
-- else echo "==== No $$i man pages found. ===="; fi; done
-+subdirs: $(SUBDIRS)
-+$(SUBDIRS):
-+ if test -d $@; then echo; \
-+ echo "==== Making the `cat $@.txt` man pages. ===="; \
-+ $(MAKE) -C $@ -f ../Makefile all; \
-+ else echo "==== No $@ man pages found. ===="; fi
-
- installsubdirs:
- @for i in @languages@; do if test -d $$i; then echo; \
- echo "==== Installing the `cat $$i.txt` man pages. ===="; \
- cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \
-- export SLANG; make -f ../Makefile install; cd ..; \
-+ export SLANG; $(MAKE) -f ../Makefile install; cd ..; \
- else echo "==== No $$i man pages found. ===="; fi; done
-
- cleansubdirs:
-- @for i in ??; do cd $$i; make -f ../Makefile clean; cd ..; done
-+ @for i in ??; do $(MAKE) -C $$i -f ../Makefile clean; done
- rm -f core *~
-
- spotlesssubdirs:
-- for i in ??; do cd $$i; make -f ../Makefile spotless; cd ..; done
-+ for i in ??; do $(MAKE) -C $$i -f ../Makefile spotless; done
- rm -f Makefile
-
---- man-1.6g/src/gripes.c.orig 2006-11-21 11:53:44.000000000 -0800
-+++ man-1.6g/src/gripes.c 2016-03-30 16:32:31.601103487 -0700
-@@ -7,8 +7,6 @@
-
- extern char *msg[];
-
--static char *mantexts = "man"; /* e.g. /usr/lib/locale/%L/man.cat */
--
- #ifdef NONLS
-
- static char *
-@@ -30,6 +28,8 @@
- #include <nl_types.h>
- #include "../catopen/catopen.c"
-
-+static char *mantexts = "man"; /* e.g. /usr/lib/locale/%L/man.cat */
-+
- nl_catd catfd = (nl_catd) -1;
- int cat_is_open = 0;
-
---- man-1.6g/src/manfile.c.orig 2005-08-20 16:26:06.000000000 -0700
-+++ man-1.6g/src/manfile.c 2016-03-29 09:10:21.527841285 -0700
-@@ -299,7 +299,7 @@
- const char *((*tocat)(const char *man_filename, const char *ext,
- int flags))) {
- char **sl;
-- struct manpage *res;
-+ struct manpage *res = 0;
-
- standards = (flags & (FHS | FSSTND | DO_HP | DO_IRIX));
- to_cat_filename = tocat;
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-configure.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-configure.patch
deleted file mode 100644
index 106cc98..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-configure.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Use BUILD_CC and target include files for configuration tests.
-If cross-compiling, force pathnames for helper programs, since
-autodiscovery by the configure script will not work.
-
-Upstream-Status: Pending
-
-Signed-off-by: Bill Randle <william.c.randle at intel.com>
-
---- man-1.6g/configure.orig 2016-03-28 17:46:12.734910976 -0700
-+++ man-1.6g/configure 2016-03-30 21:47:45.110572908 -0700
-@@ -216,7 +216,8 @@
- INCLUDEDIR=${INCLUDEDIR-/usr/include}
-
- rm -f conftest conftest.c
--compile="$CC $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1"
-+# since we are interested in target feature support, use that sysroot
-+compile="$BUILD_CC -isystem/${PKG_CONFIG_SYSROOT_DIR}/usr/include $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1"
-
- # Check for various header files.
-
-@@ -455,19 +456,23 @@
- fi
- done
- done
-- Fgroff=/usr/bin/groff
-- Fnroff=/usr/bin/nroff
-- Fjnroff=/usr/bin/nroff
-- Fgeqn=/usr/bin/geqn
-- Fgtbl=/usr/bin/gtbl
-- Fcol=/usr/bin/col
-- Fgrefer=/usr/bin/grefer
-- Fgpic=/usr/bin/gpic
-- Fmore=/bin/more
-- Fless=/usr/bin/less
-- Fcmp=/usr/bin/cmp
-- Fcat=/bin/cat
-- Fgawk=/bin/gawk
-+ if [ $BUILD_CC != $CC ]; then
-+ # cross compiling => target fs not available, so force defaults
-+ Fgroff=/usr/bin/groff
-+ Fnroff=/usr/bin/nroff
-+ Fjnroff=/usr/bin/nroff
-+ Fgeqn=/usr/bin/eqn
-+ Fgneqn=/usr/bin/neqn
-+ Fgtbl=/usr/bin/tbl
-+ Fcol=/usr/bin/col
-+ Fgrefer=/usr/bin/refer
-+ Fgpic=/usr/bin/pic
-+ Fmore=/bin/more
-+ Fless=/usr/bin/less
-+ Fcmp=/usr/bin/cmp
-+ Fcat=/bin/cat
-+ Fgawk=/usr/bin/gawk
-+ fi
-
-
- for i in eqn tbl refer pic
-@@ -507,8 +512,8 @@
- jnroff="$Fjnroff -Tutf8 -mandocj"
- fi
- eqn="$Fgeqn -Tps"
-- neqn="$Fgeqn -Tutf8"
-- jneqn="$Fgeqn -Tutf8"
-+ neqn="$Fgneqn -Tutf8"
-+ jneqn="$Fgneqn -Tutf8"
- tbl="$Fgtbl"
- col="$Fcol"
- vgrind="$Fvgrind"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-parallel.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-parallel.patch
deleted file mode 100644
index 72a88b8..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-parallel.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-The Makefile for man has a rule to create two generated targets with
-a program run from the shell. Because the rule was run twice, with
-parallel make, the generated files were being overwritten at the same
-time they were being compiled. This patch forces the rule to be run
-only once.
-
-Upstream-Status: Pending
-
-Signed-off-by: Bill Randle <william.c.randle at intel.com>
-
---- man-1.6g/src/Makefile.in.orig 2010-12-31 12:28:46.000000000 -0800
-+++ man-1.6g/src/Makefile.in 2016-03-28 09:09:16.845458798 -0700
-@@ -43,8 +43,10 @@
- makemsg:
- $(BUILD_CC) -o makemsg makemsg.c
-
--msg.c gripedefs.h: ../msgs/mess.en makemsg
-+msg.c gripedefs.h: genfiles-stamp
-+genfiles-stamp: ../msgs/mess.en makemsg
- ./makemsg ../msgs/mess.en gripedefs.h msg.c
-+ touch genfiles-stamp
-
- # glob.c does not have prototypes
- glob.o: glob.c ndir.h
-@@ -117,4 +119,4 @@
-
- spotless: clean
- rm -f Makefile config.status paths.h version.h man.conf
-- rm -f gripedefs.h msg.c mess.*.cat
-+ rm -f gripedefs.h msg.c mess.*.cat genfiles-stamp
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-whatis3.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-whatis3.patch
deleted file mode 100644
index 6334456..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-whatis3.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Do not use absolute path for awk while getting the path of awk
-when running makewhatis.
-This can avoid errors if path of awk changes.
-
-Upstream-Status: Submitted [man-1.6g]
-
-Signed-off-by: Jian Liu <jian.liu@windriver.com>
-
-diff -Nur man-1.6g.orig/src/makewhatis.sh man-1.6g/src/makewhatis.sh
---- man-1.6g.orig/src/makewhatis.sh 2015-02-25 16:13:12.657611419 +0800
-+++ man-1.6g/src/makewhatis.sh 2015-02-25 16:14:49.334694815 +0800
-@@ -67,7 +67,7 @@
- # but that leads to problems and bugs.
-
- # AWK=/usr/bin/gawk
--AWK=@awk@
-+AWK=`which awk`
-
- # Find a place for our temporary files. If security is not a concern, use
- # TMPFILE=/tmp/whatis$$; TMPFILEDIR=none
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man.1.gz b/import-layers/yocto-poky/meta/recipes-extended/man/man/man.1.gz
deleted file mode 100644
index c368045..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man.1.gz
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man.7.gz b/import-layers/yocto-poky/meta/recipes-extended/man/man/man.7.gz
deleted file mode 100644
index e85af82..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man.7.gz
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man.conf b/import-layers/yocto-poky/meta/recipes-extended/man/man/man.conf
deleted file mode 100644
index fc10be2..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man.conf
+++ /dev/null
@@ -1,141 +0,0 @@
-#
-# Generated automatically from man.conf.in by the
-# configure script.
-#
-# man.conf from man-1.5p
-#
-# For more information about this file, see the man pages man(1)
-# and man.conf(5).
-#
-# This file is read by man to configure the default manpath (also used
-# when MANPATH contains an empty substring), to find out where the cat
-# pages corresponding to given man pages should be stored,
-# and to map each PATH element to a manpath element.
-# It may also record the pathname of the man binary. [This is unused.]
-# The format is:
-#
-# MANBIN pathname
-# MANPATH manpath_element [corresponding_catdir]
-# MANPATH_MAP path_element manpath_element
-#
-# If no catdir is given, it is assumed to be equal to the mandir
-# (so that this dir has both man1 etc. and cat1 etc. subdirs).
-# This is the traditional Unix setup.
-# Certain versions of the FSSTND recommend putting formatted versions
-# of /usr/.../man/manx/page.x into /var/catman/.../catx/page.x.
-# The keyword FSSTND will cause this behaviour.
-# Certain versions of the FHS recommend putting formatted versions of
-# /usr/.../share/man/[locale/]manx/page.x into
-# /var/cache/man/.../[locale/]catx/page.x.
-# The keyword FHS will cause this behaviour (and overrides FSSTND).
-# Explicitly given catdirs override.
-#
-# FSSTND
-FHS
-#
-# This file is also read by man in order to find how to call nroff, less, etc.,
-# and to determine the correspondence between extensions and decompressors.
-#
-# MANBIN /usr/local/bin/man
-#
-# Every automatically generated MANPATH includes these fields
-#
-MANPATH /usr/man
-MANPATH /usr/share/man
-MANPATH /usr/local/man
-MANPATH /usr/local/share/man
-MANPATH /usr/X11R6/man
-#
-# Uncomment if you want to include one of these by default
-#
-# MANPATH /opt/*/man
-# MANPATH /usr/lib/*/man
-# MANPATH /usr/share/*/man
-# MANPATH /usr/kerberos/man
-#
-# Set up PATH to MANPATH mapping
-#
-# If people ask for "man foo" and have "/dir/bin/foo" in their PATH
-# and the docs are found in "/dir/man", then no mapping is required.
-#
-# The below mappings are superfluous when the right hand side is
-# in the mandatory manpath already, but will keep man from statting
-# lots of other nearby files and directories.
-#
-MANPATH_MAP /bin /usr/share/man
-MANPATH_MAP /sbin /usr/share/man
-MANPATH_MAP /usr/bin /usr/share/man
-MANPATH_MAP /usr/sbin /usr/share/man
-MANPATH_MAP /usr/local/bin /usr/local/share/man
-MANPATH_MAP /usr/local/sbin /usr/local/share/man
-MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man
-MANPATH_MAP /usr/bin/X11 /usr/X11R6/man
-MANPATH_MAP /usr/bin/mh /usr/share/man
-#
-# NOAUTOPATH keeps man from automatically adding directories that look like
-# manual page directories to the path.
-#
-#NOAUTOPATH
-#
-# NOCACHE keeps man from creating cache pages ("cat pages")
-# (generally one enables/disable cat page creation by creating/deleting
-# the directory they would live in - man never does mkdir)
-#
-#NOCACHE
-#
-# Useful paths - note that COL should not be defined when
-# NROFF is defined as "groff -Tascii" or "groff -Tlatin1";
-# not only is it superfluous, but it actually damages the output.
-# For use with utf-8, NROFF should be "nroff -mandoc" without -T option.
-# (Maybe - but today I need -Tlatin1 to prevent double conversion to utf8.)
-#
-# If you have a new troff (version 1.18.1?) and its colored output
-# causes problems, add the -c option to TROFF, NROFF, JNROFF.
-#
-TROFF /usr/bin/groff -Tps -mandoc
-NROFF /usr/bin/nroff -Tlatin1 -mandoc
-JNROFF /usr/bin/groff -Tnippon -mandocj
-EQN /usr/bin/eqn -Tps
-NEQN /usr/bin/eqn -Tlatin1
-JNEQN /usr/bin/eqn -Tnippon
-TBL /usr/bin/tbl
-# COL /usr/bin/col
-REFER /usr/bin/refer
-PIC /usr/bin/pic
-VGRIND
-GRAP
-PAGER /usr/bin/less -isR
-CAT /bin/cat
-#
-# The command "man -a xyzzy" will show all man pages for xyzzy.
-# When CMP is defined man will try to avoid showing the same
-# text twice. (But compressed pages compare unequal.)
-#
-CMP /usr/bin/cmp -s
-#
-# Compress cat pages
-#
-COMPRESS /bin/bzip2
-COMPRESS_EXT .bz2
-#
-# Default manual sections (and order) to search if -S is not specified
-# and the MANSECT environment variable is not set.
-#
-MANSECT 1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o
-#
-# Default options to use when man is invoked without options
-# This is mainly for the benefit of those that think -a should be the default
-# Note that some systems have /usr/man/allman, causing pages to be shown twice.
-#
-#MANDEFOPTIONS -a
-#
-# Decompress with given decompressor when input file has given extension
-# The command given must act as a filter.
-#
-.gz /bin/gunzip -c
-.bz2 /usr/bin/bunzip2 -c
-.xz /usr/bin/unxz -c
-.z
-.Z /bin/zcat
-.F
-.Y
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/manpath.5.gz b/import-layers/yocto-poky/meta/recipes-extended/man/man/manpath.5.gz
deleted file mode 100644
index c012ff8..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/manpath.5.gz
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man_1.6g.bb b/import-layers/yocto-poky/meta/recipes-extended/man/man_1.6g.bb
deleted file mode 100644
index ff603f8..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man_1.6g.bb
+++ /dev/null
@@ -1,86 +0,0 @@
-SUMMARY = "Online documentation tools"
-DESCRIPTION = "A set of documentation tools: man, apropos and whatis"
-SECTION = "console/utils"
-HOMEPAGE = "http://primates.ximian.com/~flucifredi/man"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
-
-PR = "r1"
-
-DEPENDS = "groff less"
-
-def compress_pkg(d):
- if "compress_doc" in (d.getVar("INHERIT") or "").split():
- compress = d.getVar("DOC_COMPRESS")
- if compress == "gz":
- return "gzip"
- elif compress == "bz2":
- return "bzip2"
- elif compress == "xz":
- return "xz"
- return ""
-
-RDEPENDS_${PN} += "${@compress_pkg(d)}"
-
-SRC_URI = "http://pkgs.fedoraproject.org/lookaside/pkgs/man2html/${BP}.tar.gz/ba154d5796928b841c9c69f0ae376660/${BP}.tar.gz \
- file://man-1.5k-confpath.patch;striplevel=0 \
- file://man-1.5h1-make.patch \
- file://man-1.5k-nonascii.patch \
- file://man-1.6e-security.patch \
- file://man-1.6e-mandirs.patch \
- file://man-1.5m2-bug11621.patch \
- file://man-1.5k-sofix.patch \
- file://man-1.5m2-buildroot.patch \
- file://man-1.6e-ro_usr.patch \
- file://man-1.5i2-newline.patch;striplevel=0 \
- file://man-1.5j-utf8.patch \
- file://man-1.5i2-overflow.patch \
- file://man-1.5j-nocache.patch \
- file://man-1.5i2-initial.patch \
- file://man-1.5h1-gencat.patch;striplevel=0 \
- file://man-1.5g-nonrootbuild.patch \
- file://man-1.5j-i18n.patch \
- file://man-1.6e-whatis2.patch \
- file://man-1.6e-use_i18n_vars_in_a_std_way.patch \
- file://man-1.5m2-no-color-for-printing.patch \
- file://man-1.5m2-sigpipe.patch \
- file://man-1.6e-i18n_whatis.patch \
- file://man-1.6e-new_sections.patch \
- file://man.1.gz;unpack=false \
- file://man.7.gz;unpack=false \
- file://man.conf \
- file://manpath.5.gz;unpack=false \
- file://man-1.6g-whatis3.patch \
- file://configure_sed.patch \
- file://man-1.6g-parallel.patch \
- file://man-1.6g-compile-warnings.patch \
- file://man-1.6g-configure.patch \
-"
-
-SRC_URI[md5sum] = "ba154d5796928b841c9c69f0ae376660"
-SRC_URI[sha256sum] = "ccdcb8c3f4e0080923d7e818f0e4a202db26c46415eaef361387c20995b8959f"
-
-CFLAGS += "-DSYSV"
-
-do_configure () {
- ${S}/configure -default -confdir /etc +sgid +fhs +lang all
-}
-
-
-do_install() {
- oe_runmake install DESTDIR=${D}
-}
-
-do_install_append(){
- mkdir -p ${D}${sysconfdir}
- mkdir -p ${D}${datadir}/man/man5
- mkdir -p ${D}${datadir}/man/man7
- cp ${WORKDIR}/man.conf ${D}${sysconfdir}/man.config
- cp ${WORKDIR}/man.1.gz ${D}${datadir}/man/man1/
- cp ${WORKDIR}/man.7.gz ${D}${datadir}/man/man7/
- cp ${WORKDIR}/manpath.5.gz ${D}${datadir}/man/man5/
-}
-
-
-RDEPENDS_${PN} = "less groff"
-FILES_${PN} += "${datadir}/locale ${sysconfdir}/man.config"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mc/files/0002-Ticket-3697-tty_init-unify-curses-initialization.patch b/import-layers/yocto-poky/meta/recipes-extended/mc/files/0002-Ticket-3697-tty_init-unify-curses-initialization.patch
deleted file mode 100644
index c54d4d0..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/mc/files/0002-Ticket-3697-tty_init-unify-curses-initialization.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 4d46a108629beb66a293672db7b44f863b6598ba Mon Sep 17 00:00:00 2001
-From: Thomas Dickey <dickey@his.com>
-Date: Fri, 14 Apr 2017 14:06:13 +0300
-Subject: [PATCH] Ticket #3697: (tty_init): unify curses initialization
-
-...for various curses implementations.
-
-Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
-
-Upstream-Status: Backport [https://github.com/MidnightCommander/mc.git]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-
----
- lib/tty/tty-ncurses.c | 26 +++++++++-----------------
- 1 file changed, 9 insertions(+), 17 deletions(-)
-
-diff --git a/lib/tty/tty-ncurses.c b/lib/tty/tty-ncurses.c
-index a7a11f3..8e69b39 100644
---- a/lib/tty/tty-ncurses.c
-+++ b/lib/tty/tty-ncurses.c
-@@ -179,6 +179,8 @@ mc_tty_normalize_lines_char (const char *ch)
- void
- tty_init (gboolean mouse_enable, gboolean is_xterm)
- {
-+ struct termios mode;
-+
- initscr ();
-
- #ifdef HAVE_ESCDELAY
-@@ -194,25 +196,15 @@ tty_init (gboolean mouse_enable, gboolean is_xterm)
- ESCDELAY = 200;
- #endif /* HAVE_ESCDELAY */
-
--#ifdef NCURSES_VERSION
-+ tcgetattr (STDIN_FILENO, &mode);
- /* use Ctrl-g to generate SIGINT */
-- cur_term->Nttyb.c_cc[VINTR] = CTRL ('g'); /* ^g */
-+ mode.c_cc[VINTR] = CTRL ('g'); /* ^g */
- /* disable SIGQUIT to allow use Ctrl-\ key */
-- cur_term->Nttyb.c_cc[VQUIT] = NULL_VALUE;
-- tcsetattr (cur_term->Filedes, TCSANOW, &cur_term->Nttyb);
--#else
-- /* other curses implementation (bsd curses, ...) */
-- {
-- struct termios mode;
--
-- tcgetattr (STDIN_FILENO, &mode);
-- /* use Ctrl-g to generate SIGINT */
-- mode.c_cc[VINTR] = CTRL ('g'); /* ^g */
-- /* disable SIGQUIT to allow use Ctrl-\ key */
-- mode.c_cc[VQUIT] = NULL_VALUE;
-- tcsetattr (STDIN_FILENO, TCSANOW, &mode);
-- }
--#endif /* NCURSES_VERSION */
-+ mode.c_cc[VQUIT] = NULL_VALUE;
-+ tcsetattr (STDIN_FILENO, TCSANOW, &mode);
-+
-+ /* curses remembers the "in-program" modes after this call */
-+ def_prog_mode ();
-
- tty_start_interrupt_key ();
-
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.19.bb b/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.19.bb
deleted file mode 100644
index b3a156c..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.19.bb
+++ /dev/null
@@ -1,50 +0,0 @@
-SUMMARY = "Midnight Commander is an ncurses based file manager"
-HOMEPAGE = "http://www.midnight-commander.org/"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=270bbafe360e73f9840bd7981621f9c2"
-SECTION = "console/utils"
-DEPENDS = "ncurses glib-2.0 util-linux"
-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://0002-Ticket-3697-tty_init-unify-curses-initialization.patch \
- "
-SRC_URI[md5sum] = "ef423f5b6f80a1a5a5fc53b8324cab70"
-SRC_URI[sha256sum] = "d0dddfae7149fac903f74ef55cfcb2a198e0f7004346c7bded43669d61ba436f"
-
-inherit autotools gettext pkgconfig
-
-#
-# Both Samba (smb) and sftp require package delivered from meta-openembedded
-#
-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"
-
-CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
-
-do_install_append () {
- sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
-
- rm ${D}${libexecdir}/mc/extfs.d/s3+ ${D}${libexecdir}/mc/extfs.d/uc1541
-}
-
-PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers ${BPN}-fish"
-
-SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts"
-FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \
- ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \
- ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \
- ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \
- ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \
- ${libexecdir}/mc/extfs.d/uzip"
-RDEPENDS_${BPN}-helpers-perl = "perl"
-
-SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts"
-FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*"
-
-SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts"
-FILES_${BPN}-fish = "${libexecdir}/mc/fish"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.20.bb b/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.20.bb
new file mode 100644
index 0000000..70d1b5e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.20.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Midnight Commander is an ncurses based file manager"
+HOMEPAGE = "http://www.midnight-commander.org/"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=270bbafe360e73f9840bd7981621f9c2"
+SECTION = "console/utils"
+DEPENDS = "ncurses glib-2.0 util-linux"
+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 \
+ "
+SRC_URI[md5sum] = "dcfc7aa613c62291a0f71f6b698d8267"
+SRC_URI[sha256sum] = "2d85daaa6ab26e524946df4823ac2f69802bc16bc967781b5e28d5b86fc3b979"
+
+inherit autotools gettext pkgconfig
+
+#
+# Both Samba (smb) and sftp require package delivered from meta-openembedded
+#
+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"
+
+CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
+
+do_install_append () {
+ sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
+
+ rm ${D}${libexecdir}/mc/extfs.d/s3+ ${D}${libexecdir}/mc/extfs.d/uc1541
+}
+
+PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers ${BPN}-fish"
+
+SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts"
+FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \
+ ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \
+ ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \
+ ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \
+ ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \
+ ${libexecdir}/mc/extfs.d/uzip"
+RDEPENDS_${BPN}-helpers-perl = "perl"
+
+SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts"
+FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*"
+
+SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts"
+FILES_${BPN}-fish = "${libexecdir}/mc/fish"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/gcc-4.9.patch b/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/gcc-4.9.patch
index 54bf1d7..df21399 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/gcc-4.9.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/gcc-4.9.patch
@@ -7,13 +7,13 @@
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
-Index: mdadm-3.3/super-intel.c
+Index: mdadm-4.0/super-intel.c
===================================================================
---- mdadm-3.3.orig/super-intel.c 2014-05-02 15:08:21.154319651 -0700
-+++ mdadm-3.3/super-intel.c 2014-05-02 15:09:31.470985794 -0700
-@@ -5060,7 +5060,7 @@
- spare->cache_size = mpb->cache_size,
- spare->pwr_cycle_count = __cpu_to_le32(1),
+--- mdadm-4.0.orig/super-intel.c
++++ mdadm-4.0/super-intel.c
+@@ -5725,7 +5725,7 @@ static int write_super_imsm_spares(struc
+ spare->cache_size = mpb->cache_size;
+ spare->pwr_cycle_count = __cpu_to_le32(1);
- snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH,
+ (void)snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH,
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch b/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
index c656d07..00e6657 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
@@ -5,13 +5,13 @@
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
-Index: mdadm-3.3.4/monitor.c
+Index: mdadm-4.0/monitor.c
===================================================================
---- mdadm-3.3.4.orig/monitor.c
-+++ mdadm-3.3.4/monitor.c
-@@ -257,9 +257,12 @@ static int read_and_act(struct active_ar
- mdi->curr_state = read_dev_state(mdi->state_fd);
- }
+--- mdadm-4.0.orig/monitor.c
++++ mdadm-4.0/monitor.c
+@@ -445,9 +445,12 @@ static int read_and_act(struct active_ar
+ if (FD_ISSET(mdi->bb_fd, fds))
+ check_for_cleared_bb(a, mdi);
}
-
gettimeofday(&tv, NULL);
diff --git a/import-layers/yocto-poky/meta/recipes-extended/minicom/minicom_2.7.1.bb b/import-layers/yocto-poky/meta/recipes-extended/minicom/minicom_2.7.1.bb
index 1a31a87..e6afe2b 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/minicom/minicom_2.7.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/minicom/minicom_2.7.1.bb
@@ -27,3 +27,4 @@
for d in doc extras man lib src; do make -C $d DESTDIR=${D} install; done
}
+RRECOMMENDS_${PN} += "lrzsz"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch b/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch
index 12eed17..78daf6c 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch
@@ -11,10 +11,10 @@
statistics.c | 68 +++++++++-
2 files changed, 465 insertions(+), 14 deletions(-)
-diff --git a/netstat.c b/netstat.c
-index 1fb9e0c..5d1a4a1 100644
---- a/netstat.c
-+++ b/netstat.c
+Index: net-tools-1.60/netstat.c
+===================================================================
+--- net-tools-1.60.orig/netstat.c
++++ net-tools-1.60/netstat.c
@@ -58,6 +58,7 @@
*
*990420 {1.38} Tuan Hoang removed a useless assignment from igmp_do_one()
@@ -23,7 +23,7 @@
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
-@@ -105,7 +106,7 @@
+@@ -106,7 +107,7 @@
#endif
/* prototypes for statistics.c */
@@ -32,7 +32,7 @@
void inittab(void);
void parsesnmp6(int, int, int);
void inittab6(void);
-@@ -118,6 +119,28 @@ typedef enum {
+@@ -119,6 +120,28 @@ typedef enum {
SS_DISCONNECTING /* in process of disconnecting */
} socket_state;
@@ -61,7 +61,7 @@
#define SO_ACCEPTCON (1<<16) /* performed a listen */
#define SO_WAITDATA (1<<17) /* wait data to read */
#define SO_NOSPACE (1<<18) /* no space to write */
-@@ -148,6 +171,7 @@ int flag_opt = 0;
+@@ -149,6 +172,7 @@ int flag_opt = 0;
int flag_raw = 0;
int flag_tcp = 0;
int flag_udp = 0;
@@ -69,7 +69,7 @@
int flag_igmp= 0;
int flag_rom = 0;
int flag_exp = 1;
-@@ -990,6 +1014,365 @@ static int udp_info(void)
+@@ -995,6 +1019,365 @@ static int udp_info(void)
udp_do_one);
}
@@ -435,7 +435,7 @@
static void raw_do_one(int lnr, const char *line)
{
char buffer[8192], local_addr[64], rem_addr[64];
-@@ -1549,7 +1932,7 @@ static void usage(void)
+@@ -1558,7 +1941,7 @@ static void usage(void)
fprintf(stderr, _(" -F, --fib display Forwarding Information Base (default)\n"));
fprintf(stderr, _(" -C, --cache display routing cache instead of FIB\n\n"));
@@ -444,7 +444,7 @@
fprintf(stderr, _(" <AF>=Use '-6|-4' or '-A <af>' or '--<af>'; default: %s\n"), DFLT_AF);
fprintf(stderr, _(" List of possible address families (which support routing):\n"));
print_aflist(1); /* 1 = routeable */
-@@ -1574,6 +1957,7 @@ int main
+@@ -1583,6 +1966,7 @@ int main
{"protocol", 1, 0, 'A'},
{"tcp", 0, 0, 't'},
{"udp", 0, 0, 'u'},
@@ -452,7 +452,7 @@
{"raw", 0, 0, 'w'},
{"unix", 0, 0, 'x'},
{"listening", 0, 0, 'l'},
-@@ -1604,7 +1988,7 @@ int main
+@@ -1613,7 +1997,7 @@ int main
getroute_init(); /* Set up AF routing support */
afname[0] = '\0';
@@ -461,7 +461,7 @@
switch (i) {
case -1:
break;
-@@ -1696,10 +2080,12 @@ int main
+@@ -1705,10 +2089,12 @@ int main
case 't':
flag_tcp++;
break;
@@ -475,7 +475,7 @@
case 'w':
flag_raw++;
break;
-@@ -1717,13 +2103,13 @@ int main
+@@ -1726,13 +2112,13 @@ int main
if (flag_int + flag_rou + flag_mas + flag_sta > 1)
usage();
@@ -493,7 +493,7 @@
+ flag_ax25 + flag_netrom + flag_igmp + flag_x25;
if (flag_mas) {
-@@ -1751,7 +2137,7 @@ int main
+@@ -1760,7 +2146,7 @@ int main
char buf[256];
if (!afname[0]) {
inittab();
@@ -502,7 +502,7 @@
} else {
safe_strncpy(buf, afname, sizeof(buf));
tmp1 = buf;
-@@ -1804,7 +2190,7 @@ int main
+@@ -1815,7 +2201,7 @@ int main
return (i);
}
for (;;) {
@@ -511,7 +511,7 @@
#if HAVE_AFINET
prg_cache_load();
printf(_("Active Internet connections ")); /* xxx */
-@@ -1843,6 +2229,11 @@ int main
+@@ -1854,6 +2240,11 @@ int main
if (i)
return (i);
}
@@ -523,10 +523,10 @@
if (!flag_arg || flag_raw) {
i = raw_info();
if (i)
-diff --git a/statistics.c b/statistics.c
-index 03600d7..eb8d7dc 100644
---- a/statistics.c
-+++ b/statistics.c
+Index: net-tools-1.60/statistics.c
+===================================================================
+--- net-tools-1.60.orig/statistics.c
++++ net-tools-1.60/statistics.c
@@ -21,7 +21,7 @@
#define UFWARN(x)
#endif
@@ -537,7 +537,7 @@
enum State {
number = 0, opt_number, i_forward, i_inp_icmp, i_outp_icmp, i_rto_alg,
@@ -297,6 +297,27 @@ struct entry Tcpexttab[] =
- { "TCPRenoRecoveryFail", N_("%u classic Reno fast retransmits failed"), opt_number },
+ { "TCPRenoRecoveryFail", N_("%llu classic Reno fast retransmits failed"), opt_number },
};
+struct entry Sctptab[] =
@@ -616,7 +616,7 @@
f = proc_fopen("/proc/net/snmp");
if (!f) {
perror(_("cannot open /proc/net/snmp"));
-@@ -530,6 +580,16 @@ void parsesnmp(int flag_raw, int flag_tcp, int flag_udp)
+@@ -530,6 +580,16 @@ void parsesnmp(int flag_raw, int flag_tc
fclose(f);
}
@@ -633,6 +633,3 @@
return;
}
---
-1.8.5.2.233.g932f7e4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/newt/files/cross_ar.patch b/import-layers/yocto-poky/meta/recipes-extended/newt/files/cross_ar.patch
index 03007aa..86cc0be 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/newt/files/cross_ar.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/newt/files/cross_ar.patch
@@ -18,18 +18,19 @@
configure.ac | 4 ++++
2 files changed, 6 insertions(+), 1 deletion(-)
-diff --git a/Makefile.in b/Makefile.in
---- a/Makefile.in
-+++ b/Makefile.in
+Index: newt-0.52.20/Makefile.in
+===================================================================
+--- newt-0.52.20.orig/Makefile.in
++++ newt-0.52.20/Makefile.in
@@ -7,6 +7,7 @@ CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
- CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@
+ CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@
GNU_LD = @GNU_LD@
+AR = @AR@
VERSION = @VERSION@
TAG = r$(subst .,-,$(VERSION))
-@@ -109,7 +110,7 @@ whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNEWTSH)
+@@ -109,7 +110,7 @@ whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNE
$(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.$(SOEXT) $(WHIPTCLOBJS) -L. -lnewt $(LIBTCL) -lpopt $(LIBS)
$(LIBNEWT): $(LIBOBJS)
@@ -38,10 +39,10 @@
newt.o $(SHAREDDIR)/newt.o: newt.c Makefile
-diff --git a/configure.ac b/configure.ac
-index 92e6da8..cd83d57 100644
---- a/configure.ac
-+++ b/configure.ac
+Index: newt-0.52.20/configure.ac
+===================================================================
+--- newt-0.52.20.orig/configure.ac
++++ newt-0.52.20/configure.ac
@@ -15,6 +15,10 @@ AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_GREP
@@ -51,8 +52,5 @@
+AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
+AC_PROG_AR
- # Are we using GNU ld?
- AC_MSG_CHECKING([for GNU ld])
---
-1.8.1.2
-
+ AC_CHECK_SIZEOF([long])
+ AC_CHECK_SIZEOF([long long])
diff --git a/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb b/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
index fdede59..9002fbc 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
@@ -89,7 +89,6 @@
mktemp \
ncurses \
net-tools \
- pax \
popt \
procps \
psmisc \
@@ -140,19 +139,13 @@
bzip2 \
cronie \
dbus \
- dbus-glib \
elfutils \
gzip \
less \
- libcap \
- libevent \
logrotate \
nfs-utils \
pciutils \
- libpcre \
rpcbind \
- sysfsutils \
tcp-wrappers \
tzdata \
"
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb b/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
index 5baaf35..53d100c 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
@@ -14,12 +14,15 @@
# libglu needs virtual/libgl, which requires opengl in DISTRO_FEATURES
REQUIRED_DISTRO_FEATURES += "opengl"
+# libpam, pam-plugin-wheel requires pam in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES += "pam"
+
#
# We will skip parsing this packagegeoup for non-glibc systems
#
python __anonymous () {
if d.getVar('TCLIBC') != "glibc":
- raise bb.parse.SkipPackage("incompatible with %s C library" %
+ raise bb.parse.SkipRecipe("incompatible with %s C library" %
d.getVar('TCLIBC'))
}
@@ -68,7 +71,6 @@
mc-helpers-perl \
mdadm \
minicom \
- neon \
parted \
quota \
screen \
@@ -159,7 +161,6 @@
mktemp \
msmtp \
patch \
- pax \
procps \
psmisc \
sed \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/libpam-xtests.patch b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/libpam-xtests.patch
index be68745..7edf66f 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/libpam-xtests.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/libpam-xtests.patch
@@ -3,18 +3,20 @@
Upstream-Status: Pending
Signed-off-by: Kang Kai <kai.kang@windriver.com>
---- Linux-PAM-1.1.4/xtests/Makefile.am.orig 2011-07-19 17:00:09.619980001 +0800
-+++ Linux-PAM-1.1.4/xtests/Makefile.am 2011-07-19 16:54:00.229979998 +0800
-@@ -7,7 +7,7 @@
- AM_LDFLAGS = -L$(top_builddir)/libpam -lpam \
- -L$(top_builddir)/libpam_misc -lpam_misc
+Index: Linux-PAM-1.3.0/xtests/Makefile.am
+===================================================================
+--- Linux-PAM-1.3.0.orig/xtests/Makefile.am
++++ Linux-PAM-1.3.0/xtests/Makefile.am
+@@ -7,7 +7,7 @@ AM_CFLAGS = -DLIBPAM_COMPILE -I$(top_src
+ LDADD = $(top_builddir)/libpam/libpam.la \
+ $(top_builddir)/libpam_misc/libpam_misc.la
-CLEANFILES = *~ $(XTESTS)
+CLEANFILES = *~
EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \
tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd \
-@@ -51,3 +51,18 @@
+@@ -51,3 +51,18 @@ EXTRA_PROGRAMS = $(XTESTS)
xtests: $(XTESTS) run-xtests.sh
"$(srcdir)"/run-xtests.sh "$(srcdir)" ${XTESTS} ${NOSRCTESTS}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch
index f1834f6..9b8d4c2 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch
@@ -5,12 +5,13 @@
Signed-off-by: Ming Liu <ming.liu@windriver.com>
===================================================================
-diff -urpN a/modules/pam_securetty/Makefile.am b/modules/pam_securetty/Makefile.am
---- a/modules/pam_securetty/Makefile.am 2013-07-05 11:08:23.224483237 +0800
-+++ b/modules/pam_securetty/Makefile.am 2013-07-05 11:15:21.304486456 +0800
+Index: Linux-PAM-1.3.0/modules/pam_securetty/Makefile.am
+===================================================================
+--- Linux-PAM-1.3.0.orig/modules/pam_securetty/Makefile.am
++++ Linux-PAM-1.3.0/modules/pam_securetty/Makefile.am
@@ -24,6 +24,10 @@ endif
securelib_LTLIBRARIES = pam_securetty.la
- pam_securetty_la_LIBADD = -L$(top_builddir)/libpam -lpam
+ pam_securetty_la_LIBADD = $(top_builddir)/libpam/libpam.la
+pam_securetty_la_SOURCES = \
+ pam_securetty.c \
@@ -19,9 +20,10 @@
if ENABLE_REGENERATE_MAN
noinst_DATA = README
README: pam_securetty.8.xml
-diff -urpN a/modules/pam_securetty/pam_securetty.c b/modules/pam_securetty/pam_securetty.c
---- a/modules/pam_securetty/pam_securetty.c 2013-07-05 11:07:50.064483568 +0800
-+++ b/modules/pam_securetty/pam_securetty.c 2013-07-05 11:12:23.994483344 +0800
+Index: Linux-PAM-1.3.0/modules/pam_securetty/pam_securetty.c
+===================================================================
+--- Linux-PAM-1.3.0.orig/modules/pam_securetty/pam_securetty.c
++++ Linux-PAM-1.3.0/modules/pam_securetty/pam_securetty.c
@@ -1,7 +1,5 @@
/* pam_securetty module */
@@ -104,9 +106,10 @@
if (retval && !(ctrl & PAM_NOCONSOLE_ARG)) {
FILE *cmdlinefile;
-diff -urpN a/modules/pam_securetty/tty_secure.c b/modules/pam_securetty/tty_secure.c
---- a/modules/pam_securetty/tty_secure.c 1970-01-01 08:30:00.000000000 +0830
-+++ b/modules/pam_securetty/tty_secure.c 2013-07-05 11:14:21.534482900 +0800
+Index: Linux-PAM-1.3.0/modules/pam_securetty/tty_secure.c
+===================================================================
+--- /dev/null
++++ Linux-PAM-1.3.0/modules/pam_securetty/tty_secure.c
@@ -0,0 +1,90 @@
+/*
+ * A function to determine if a particular line is in /etc/securetty
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam_1.3.0.bb b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam_1.3.0.bb
index 8f7753d..92ab72a 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam_1.3.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam_1.3.0.bb
@@ -151,11 +151,8 @@
fi
}
-python do_pam_sanity () {
- if not bb.utils.contains('DISTRO_FEATURES', 'pam', True, False, d):
- bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly")
-}
-addtask pam_sanity before do_configure
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "pam"
BBCLASSEXTEND = "nativesdk native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/parted/files/no_check.patch b/import-layers/yocto-poky/meta/recipes-extended/parted/files/no_check.patch
index 58d8db4..e6a26d1 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/parted/files/no_check.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/parted/files/no_check.patch
@@ -5,12 +5,12 @@
RP - 4/11/08
-Index: parted-1.9.0/configure.ac
+Index: parted-3.2/configure.ac
===================================================================
---- parted-1.9.0.orig/configure.ac 2009-07-23 18:52:08.000000000 +0100
-+++ parted-1.9.0/configure.ac 2010-02-02 14:13:56.013905093 +0000
-@@ -477,7 +477,7 @@
- AM_CONDITIONAL([BUILD_LINUX], [test "$OS" = linux])
+--- parted-3.2.orig/configure.ac
++++ parted-3.2/configure.ac
+@@ -555,7 +555,7 @@ AC_CHECK_HEADER([execinfo.h], [
+ AM_CONDITIONAL([COMPILE_FOR_S390], [test "$host_cpu" = s390 || test "$host_cpu" = s390x])
dnl check for "check", unit testing library/header
-PKG_CHECK_MODULES([CHECK], [check >= 0.9.3], have_check=yes, have_check=no)
diff --git a/import-layers/yocto-poky/meta/recipes-extended/parted/files/syscalls.patch b/import-layers/yocto-poky/meta/recipes-extended/parted/files/syscalls.patch
index e9bbe9a..93205a0 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/parted/files/syscalls.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/parted/files/syscalls.patch
@@ -4,10 +4,10 @@
libparted/arch/linux.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
-Index: parted-1.9.0/libparted/arch/linux.c
+Index: parted-3.2/libparted/arch/linux.c
===================================================================
---- parted-1.9.0.orig/libparted/arch/linux.c 2009-07-23 18:52:08.000000000 +0100
-+++ parted-1.9.0/libparted/arch/linux.c 2010-02-02 14:14:16.523904768 +0000
+--- parted-3.2.orig/libparted/arch/linux.c
++++ parted-3.2/libparted/arch/linux.c
@@ -17,6 +17,8 @@
#define PROC_DEVICES_BUFSIZ 16384
@@ -16,8 +16,8 @@
+
#include <config.h>
#include <arch/linux.h>
-
-@@ -1477,12 +1479,14 @@
+ #include <linux/blkpg.h>
+@@ -1696,12 +1698,14 @@ linux_refresh_close (PedDevice* dev)
#if SIZEOF_OFF_T < 8
@@ -32,7 +32,7 @@
loff_t
llseek (unsigned int fd, loff_t offset, unsigned int whence)
-@@ -1490,11 +1494,20 @@
+@@ -1709,11 +1713,20 @@ llseek (unsigned int fd, loff_t offset,
loff_t result;
int retval;
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-Add-a-comment-for-fallthrough.patch b/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-Add-a-comment-for-fallthrough.patch
deleted file mode 100644
index b76f85a..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-Add-a-comment-for-fallthrough.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From e67bb3debe582f0e77770b714bd012bb1082fc41 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 19 Apr 2017 11:32:00 -0700
-Subject: [PATCH] Add a comment for fallthrough
-
-Fixes warnings with gcc7 e.g.
-
-../../../../../../../workspace/sources/pax/src/options.c: In function 'tar_options':
-../../../../../../../workspace/sources/pax/src/options.c:725:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
- if (opt_add ("write_opt=nodir") < 0)
- ^
-../../../../../../../workspace/sources/pax/src/options.c:730:2: note: here
- case 'O':
- ^~~~
-cc1: all warnings being treated as errors
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/options.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/options.c b/src/options.c
-index c663b4e..b80819a 100644
---- a/src/options.c
-+++ b/src/options.c
-@@ -724,6 +724,7 @@ tar_options (int argc, char **argv)
- case 'o':
- if (opt_add ("write_opt=nodir") < 0)
- tar_usage ();
-+ /* fallthru */
- case 'O':
- Oflag = 1;
- break;
---
-2.12.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch b/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch
deleted file mode 100644
index 61bf2de..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch
+++ /dev/null
@@ -1,1287 +0,0 @@
-From 47c4db8d37248d968fac7ee4a71ca64398890723 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 6 Jan 2016 11:57:21 -0800
-Subject: [PATCH] Fix build with musl
-
-Remove BSDisms
-Remove fts, and link to libfts thats provided externally
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Inappropriate[musl specific]
-
- lib/Makefile.am | 4 +-
- lib/fts.c | 1025 -------------------------------------------------------
- lib/fts.h | 131 -------
- lib/vis.h | 13 +-
- src/Makefile.am | 2 +-
- src/extern.h | 2 -
- src/file_subs.c | 2 +-
- src/tables.c | 2 +-
- 8 files changed, 14 insertions(+), 1167 deletions(-)
- delete mode 100644 lib/fts.c
- delete mode 100644 lib/fts.h
-
-diff --git a/lib/Makefile.am b/lib/Makefile.am
-index 56d0859..7f5045a 100644
---- a/lib/Makefile.am
-+++ b/lib/Makefile.am
-@@ -8,8 +8,8 @@ AUTOMAKE_OPTIONS = 1.7 gnits
- CLEANFILES = *~
-
- noinst_LIBRARIES = libbsdfunc.a
--noinst_HEADERS = vis.h bsdfunc.h fts.h
-+noinst_HEADERS = vis.h bsdfunc.h
-
- AM_CFLAGS = @EXTRA_CFLAGS@
-
--libbsdfunc_a_SOURCES = vis.c strlcpy.c strmode.c fts.c
-+libbsdfunc_a_SOURCES = vis.c strlcpy.c strmode.c
-diff --git a/lib/fts.c b/lib/fts.c
-deleted file mode 100644
-index 45e90ca..0000000
---- a/lib/fts.c
-+++ /dev/null
-@@ -1,1025 +0,0 @@
--/*-
-- * Copyright (c) 1990, 1993, 1994
-- * The Regents of the University of California. All rights reserved.
-- *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- * notice, this list of conditions and the following disclaimer.
-- * 2. Redistributions in binary form must reproduce the above copyright
-- * notice, this list of conditions and the following disclaimer in the
-- * documentation and/or other materials provided with the distribution.
-- * 4. Neither the name of the University nor the names of its contributors
-- * may be used to endorse or promote products derived from this software
-- * without specific prior written permission.
-- *
-- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-- */
--
--#ifdef HAVE_CONFIG_H
--#include <config.h>
--#endif
--
--#include <sys/stat.h>
--#include <fcntl.h>
--#include <dirent.h>
--#include <errno.h>
--#include <fts.h>
--#include <stdlib.h>
--#include <string.h>
--#include <unistd.h>
--
--/* Largest alignment size needed, minus one.
-- Usually long double is the worst case. */
--#ifndef ALIGNBYTES
--#define ALIGNBYTES (__alignof__ (long double) - 1)
--#endif
--/* Align P to that size. */
--#ifndef ALIGN
--#define ALIGN(p) (((unsigned long int) (p) + ALIGNBYTES) & ~ALIGNBYTES)
--#endif
--
--
--static FTSENT *fts_alloc (FTS *, const char *, int);
--static FTSENT *fts_build (FTS *, int);
--static void fts_lfree (FTSENT *);
--static void fts_load (FTS *, FTSENT *);
--static size_t fts_maxarglen (char * const *);
--static void fts_padjust (FTS *, FTSENT *);
--static int fts_palloc (FTS *, size_t);
--static FTSENT *fts_sort (FTS *, FTSENT *, int);
--static u_short fts_stat (FTS *, FTSENT *, int);
--static int fts_safe_changedir (FTS *, FTSENT *, int, const char *);
--
--#ifndef MAX
--#define MAX(a, b) (a > b ? a : b)
--#endif
--
--#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
--
--#define CLR(opt) (sp->fts_options &= ~(opt))
--#define ISSET(opt) (sp->fts_options & (opt))
--#define SET(opt) (sp->fts_options |= (opt))
--
--#define FCHDIR(sp, fd) (!ISSET(FTS_NOCHDIR) && fchdir(fd))
--
--#define BREAD 3 /* fts_read */
--
--FTS *
--fts_open(argv, koptions, compar)
-- char * const *argv;
-- register int koptions;
-- int (*compar) (const FTSENT **, const FTSENT **);
--{
-- register FTS *sp;
-- register FTSENT *p, *root;
-- register int nitems;
-- FTSENT *parent, *tmp;
-- int len;
--
--tmp = NULL; /* stop compiler whinging */
-- /* Options check. */
-- if (koptions & ~FTS_OPTIONMASK) {
-- errno = EINVAL;
-- return (NULL);
-- }
--
-- /* Allocate/initialize the stream */
-- if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
-- return (NULL);
-- memset(sp, 0, sizeof(FTS));
-- sp->fts_compar = (int (*) (const void *, const void *)) compar;
-- sp->fts_options = koptions;
--
-- /* Logical walks turn on NOCHDIR; symbolic links are too hard. */
-- if (ISSET(FTS_LOGICAL))
-- SET(FTS_NOCHDIR);
--
-- /*
-- * Start out with 1K of path space, and enough, in any case,
-- * to hold the user's paths.
-- */
--#ifndef MAXPATHLEN
--#define MAXPATHLEN 1024
--#endif
-- if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
-- goto mem1;
--
-- /* Allocate/initialize root's parent. */
-- if ((parent = fts_alloc(sp, "", 0)) == NULL)
-- goto mem2;
-- parent->fts_level = FTS_ROOTPARENTLEVEL;
--
-- /* Allocate/initialize root(s). */
-- for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) {
-- /* Don't allow zero-length paths. */
-- if ((len = strlen(*argv)) == 0) {
-- errno = ENOENT;
-- goto mem3;
-- }
--
-- p = fts_alloc(sp, *argv, len);
-- p->fts_level = FTS_ROOTLEVEL;
-- p->fts_parent = parent;
-- p->fts_accpath = p->fts_name;
-- p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW));
--
-- /* Command-line "." and ".." are real directories. */
-- if (p->fts_info == FTS_DOT)
-- p->fts_info = FTS_D;
--
-- /*
-- * If comparison routine supplied, traverse in sorted
-- * order; otherwise traverse in the order specified.
-- */
-- if (compar) {
-- p->fts_link = root;
-- root = p;
-- } else {
-- p->fts_link = NULL;
-- if (root == NULL)
-- tmp = root = p;
-- else {
-- tmp->fts_link = p;
-- tmp = p;
-- }
-- }
-- }
-- if (compar && nitems > 1)
-- root = fts_sort(sp, root, nitems);
--
-- /*
-- * Allocate a dummy pointer and make fts_read think that we've just
-- * finished the node before the root(s); set p->fts_info to FTS_INIT
-- * so that everything about the "current" node is ignored.
-- */
-- if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
-- goto mem3;
-- sp->fts_cur->fts_link = root;
-- sp->fts_cur->fts_info = FTS_INIT;
--
-- /*
-- * If using chdir(2), grab a file descriptor pointing to dot to ensure
-- * that we can get back here; this could be avoided for some paths,
-- * but almost certainly not worth the effort. Slashes, symbolic links,
-- * and ".." are all fairly nasty problems. Note, if we can't get the
-- * descriptor we run anyway, just more slowly.
-- */
-- if (!ISSET(FTS_NOCHDIR)
-- && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)
-- SET(FTS_NOCHDIR);
--
-- return (sp);
--
--mem3: fts_lfree(root);
-- free(parent);
--mem2: free(sp->fts_path);
--mem1: free(sp);
-- return (NULL);
--}
--
--static void
--fts_load(sp, p)
-- FTS *sp;
-- register FTSENT *p;
--{
-- register int len;
-- register char *cp;
--
-- /*
-- * Load the stream structure for the next traversal. Since we don't
-- * actually enter the directory until after the preorder visit, set
-- * the fts_accpath field specially so the chdir gets done to the right
-- * place and the user can access the first node. From fts_open it's
-- * known that the path will fit.
-- */
-- len = p->fts_pathlen = p->fts_namelen;
-- memmove(sp->fts_path, p->fts_name, len + 1);
-- if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) {
-- len = strlen(++cp);
-- memmove(p->fts_name, cp, len + 1);
-- p->fts_namelen = len;
-- }
-- p->fts_accpath = p->fts_path = sp->fts_path;
-- sp->fts_dev = p->fts_dev;
--}
--
--int
--fts_close(sp)
-- FTS *sp;
--{
-- register FTSENT *freep, *p;
-- int saved_errno;
--
-- /*
-- * This still works if we haven't read anything -- the dummy structure
-- * points to the root list, so we step through to the end of the root
-- * list which has a valid parent pointer.
-- */
-- if (sp->fts_cur) {
-- for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
-- freep = p;
-- p = p->fts_link != NULL ? p->fts_link : p->fts_parent;
-- free(freep);
-- }
-- free(p);
-- }
--
-- /* Free up child linked list, sort array, path buffer. */
-- if (sp->fts_child)
-- fts_lfree(sp->fts_child);
-- if (sp->fts_array)
-- free(sp->fts_array);
-- free(sp->fts_path);
--
-- /* Return to original directory, save errno if necessary. */
-- if (!ISSET(FTS_NOCHDIR)) {
-- saved_errno = fchdir(sp->fts_rfd) ? errno : 0;
-- (void)close(sp->fts_rfd);
--
-- /* Set errno and return. */
-- if (saved_errno != 0) {
-- /* Free up the stream pointer. */
-- free(sp);
-- errno = saved_errno;
-- return (-1);
-- }
-- }
--
-- /* Free up the stream pointer. */
-- free(sp);
-- return (0);
--}
--
--/*
-- * Special case of "/" at the end of the path so that slashes aren't
-- * appended which would cause paths to be written as "....//foo".
-- */
--#define NAPPEND(p) \
-- (p->fts_path[p->fts_pathlen - 1] == '/' \
-- ? p->fts_pathlen - 1 : p->fts_pathlen)
--
--FTSENT *
--fts_read(sp)
-- register FTS *sp;
--{
-- register FTSENT *p, *tmp;
-- register int instr;
-- register char *t;
-- int saved_errno;
--
-- /* If finished or unrecoverable error, return NULL. */
-- if (sp->fts_cur == NULL || ISSET(FTS_STOP))
-- return (NULL);
--
-- /* Set current node pointer. */
-- p = sp->fts_cur;
--
-- /* Save and zero out user instructions. */
-- instr = p->fts_instr;
-- p->fts_instr = FTS_NOINSTR;
--
-- /* Any type of file may be re-visited; re-stat and re-turn. */
-- if (instr == FTS_AGAIN) {
-- p->fts_info = fts_stat(sp, p, 0);
-- return (p);
-- }
--
-- /*
-- * Following a symlink -- SLNONE test allows application to see
-- * SLNONE and recover. If indirecting through a symlink, have
-- * keep a pointer to current location. If unable to get that
-- * pointer, follow fails.
-- */
-- if (instr == FTS_FOLLOW &&
-- (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
-- p->fts_info = fts_stat(sp, p, 1);
-- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
-- if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) {
-- p->fts_errno = errno;
-- p->fts_info = FTS_ERR;
-- } else
-- p->fts_flags |= FTS_SYMFOLLOW;
-- }
-- return (p);
-- }
--
-- /* Directory in pre-order. */
-- if (p->fts_info == FTS_D) {
-- /* If skipped or crossed mount point, do post-order visit. */
-- if (instr == FTS_SKIP ||
-- (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) {
-- if (p->fts_flags & FTS_SYMFOLLOW)
-- (void)close(p->fts_symfd);
-- if (sp->fts_child) {
-- fts_lfree(sp->fts_child);
-- sp->fts_child = NULL;
-- }
-- p->fts_info = FTS_DP;
-- return (p);
-- }
--
-- /* Rebuild if only read the names and now traversing. */
-- if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) {
-- CLR(FTS_NAMEONLY);
-- fts_lfree(sp->fts_child);
-- sp->fts_child = NULL;
-- }
--
-- /*
-- * Cd to the subdirectory.
-- *
-- * If have already read and now fail to chdir, whack the list
-- * to make the names come out right, and set the parent errno
-- * so the application will eventually get an error condition.
-- * Set the FTS_DONTCHDIR flag so that when we logically change
-- * directories back to the parent we don't do a chdir.
-- *
-- * If haven't read do so. If the read fails, fts_build sets
-- * FTS_STOP or the fts_info field of the node.
-- */
-- if (sp->fts_child != NULL) {
-- if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) {
-- p->fts_errno = errno;
-- p->fts_flags |= FTS_DONTCHDIR;
-- for (p = sp->fts_child; p != NULL;
-- p = p->fts_link)
-- p->fts_accpath =
-- p->fts_parent->fts_accpath;
-- }
-- } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
-- if (ISSET(FTS_STOP))
-- return (NULL);
-- return (p);
-- }
-- p = sp->fts_child;
-- sp->fts_child = NULL;
-- goto name;
-- }
--
-- /* Move to the next node on this level. */
--next: tmp = p;
-- if ((p = p->fts_link) != NULL) {
-- free(tmp);
--
-- /*
-- * If reached the top, return to the original directory (or
-- * the root of the tree), and load the paths for the next root.
-- */
-- if (p->fts_level == FTS_ROOTLEVEL) {
-- if (FCHDIR(sp, sp->fts_rfd)) {
-- SET(FTS_STOP);
-- return (NULL);
-- }
-- fts_load(sp, p);
-- return (sp->fts_cur = p);
-- }
--
-- /*
-- * User may have called fts_set on the node. If skipped,
-- * ignore. If followed, get a file descriptor so we can
-- * get back if necessary.
-- */
-- if (p->fts_instr == FTS_SKIP)
-- goto next;
-- if (p->fts_instr == FTS_FOLLOW) {
-- p->fts_info = fts_stat(sp, p, 1);
-- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
-- if ((p->fts_symfd =
-- open(".", O_RDONLY, 0)) < 0) {
-- p->fts_errno = errno;
-- p->fts_info = FTS_ERR;
-- } else
-- p->fts_flags |= FTS_SYMFOLLOW;
-- }
-- p->fts_instr = FTS_NOINSTR;
-- }
--
--name: t = sp->fts_path + NAPPEND(p->fts_parent);
-- *t++ = '/';
-- memmove(t, p->fts_name, p->fts_namelen + 1);
-- return (sp->fts_cur = p);
-- }
--
-- /* Move up to the parent node. */
-- p = tmp->fts_parent;
-- free(tmp);
--
-- if (p->fts_level == FTS_ROOTPARENTLEVEL) {
-- /*
-- * Done; free everything up and set errno to 0 so the user
-- * can distinguish between error and EOF.
-- */
-- free(p);
-- errno = 0;
-- return (sp->fts_cur = NULL);
-- }
--
-- /* NUL terminate the pathname. */
-- sp->fts_path[p->fts_pathlen] = '\0';
--
-- /*
-- * Return to the parent directory. If at a root node or came through
-- * a symlink, go back through the file descriptor. Otherwise, cd up
-- * one directory.
-- */
-- if (p->fts_level == FTS_ROOTLEVEL) {
-- if (FCHDIR(sp, sp->fts_rfd)) {
-- SET(FTS_STOP);
-- return (NULL);
-- }
-- } else if (p->fts_flags & FTS_SYMFOLLOW) {
-- if (FCHDIR(sp, p->fts_symfd)) {
-- saved_errno = errno;
-- (void)close(p->fts_symfd);
-- errno = saved_errno;
-- SET(FTS_STOP);
-- return (NULL);
-- }
-- (void)close(p->fts_symfd);
-- } else if (!(p->fts_flags & FTS_DONTCHDIR) &&
-- fts_safe_changedir(sp, p->fts_parent, -1, "..")) {
-- SET(FTS_STOP);
-- return (NULL);
-- }
-- p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
-- return (sp->fts_cur = p);
--}
--
--/*
-- * Fts_set takes the stream as an argument although it's not used in this
-- * implementation; it would be necessary if anyone wanted to add global
-- * semantics to fts using fts_set. An error return is allowed for similar
-- * reasons.
-- */
--/* ARGSUSED */
--int
--fts_set(sp, p, instr)
-- FTS __attribute__((__unused__)) *sp;
-- FTSENT *p;
-- int instr;
--{
--sp = NULL; /* stop compiler whinging */
-- if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
-- instr != FTS_NOINSTR && instr != FTS_SKIP) {
-- errno = EINVAL;
-- return (1);
-- }
-- p->fts_instr = instr;
-- return (0);
--}
--
--/*
-- * This is the tricky part -- do not casually change *anything* in here. The
-- * idea is to build the linked list of entries that are used by fts_children
-- * and fts_read. There are lots of special cases.
-- *
-- * The real slowdown in walking the tree is the stat calls. If FTS_NOSTAT is
-- * set and it's a physical walk (so that symbolic links can't be directories),
-- * we can do things quickly. First, if it's a 4.4BSD file system, the type
-- * of the file is in the directory entry. Otherwise, we assume that the number
-- * of subdirectories in a node is equal to the number of links to the parent.
-- * The former skips all stat calls. The latter skips stat calls in any leaf
-- * directories and for any files after the subdirectories in the directory have
-- * been found, cutting the stat calls by about 2/3.
-- */
--static FTSENT *
--fts_build(sp, type)
-- register FTS *sp;
-- int type;
--{
-- register struct dirent *dp;
-- register FTSENT *p, *head;
-- register int nitems;
-- FTSENT *cur, *tail;
-- DIR *dirp;
-- void *oldaddr;
-- int cderrno, descend, len, level, nlinks, saved_errno,
-- nostat, doadjust;
-- size_t maxlen;
-- char *cp;
--
-- /* Set current node pointer. */
-- cur = sp->fts_cur;
--
-- /*
-- * Open the directory for reading. If this fails, we're done.
-- * If being called from fts_read, set the fts_info field.
-- */
-- if ((dirp = opendir(cur->fts_accpath)) == NULL) {
-- if (type == BREAD) {
-- cur->fts_info = FTS_DNR;
-- cur->fts_errno = errno;
-- }
-- return (NULL);
-- }
--
-- /*
-- * Nlinks is the number of possible entries of type directory in the
-- * directory if we're cheating on stat calls, 0 if we're not doing
-- * any stat calls at all, -1 if we're doing stats on everything.
-- */
-- nlinks = -1;
-- nostat = 0;
--
-- /*
-- * If we're going to need to stat anything or we want to descend
-- * and stay in the directory, chdir. If this fails we keep going,
-- * but set a flag so we don't chdir after the post-order visit.
-- * We won't be able to stat anything, but we can still return the
-- * names themselves. Note, that since fts_read won't be able to
-- * chdir into the directory, it will have to return different path
-- * names than before, i.e. "a/b" instead of "b". Since the node
-- * has already been visited in pre-order, have to wait until the
-- * post-order visit to return the error. There is a special case
-- * here, if there was nothing to stat then it's not an error to
-- * not be able to stat. This is all fairly nasty. If a program
-- * needed sorted entries or stat information, they had better be
-- * checking FTS_NS on the returned nodes.
-- */
-- cderrno = 0;
-- if (nlinks || type == BREAD) {
-- if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) {
-- if (nlinks && type == BREAD)
-- cur->fts_errno = errno;
-- cur->fts_flags |= FTS_DONTCHDIR;
-- descend = 0;
-- cderrno = errno;
-- (void)closedir(dirp);
-- dirp = NULL;
-- } else
-- descend = 1;
-- } else
-- descend = 0;
--
-- /*
-- * Figure out the max file name length that can be stored in the
-- * current path -- the inner loop allocates more path as necessary.
-- * We really wouldn't have to do the maxlen calculations here, we
-- * could do them in fts_read before returning the path, but it's a
-- * lot easier here since the length is part of the dirent structure.
-- *
-- * If not changing directories set a pointer so that can just append
-- * each new name into the path.
-- */
-- len = NAPPEND(cur);
-- if (ISSET(FTS_NOCHDIR)) {
-- cp = sp->fts_path + len;
-- *cp++ = '/';
-- } else {
-- /* GCC, you're too verbose. */
-- cp = NULL;
-- }
-- len++;
-- maxlen = sp->fts_pathlen - len;
--
-- level = cur->fts_level + 1;
--
-- /* Read the directory, attaching each entry to the `link' pointer. */
-- doadjust = 0;
-- for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) {
-- if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
-- continue;
--
-- if ((p = fts_alloc(sp, dp->d_name, (int)_D_EXACT_NAMLEN (dp))) == NULL)
-- goto mem1;
-- if (_D_EXACT_NAMLEN (dp) >= maxlen) {/* include space for NUL */
-- oldaddr = sp->fts_path;
-- if (fts_palloc(sp, _D_EXACT_NAMLEN (dp) + len + 1)) {
-- /*
-- * No more memory for path or structures. Save
-- * errno, free up the current structure and the
-- * structures already allocated.
-- */
--mem1: saved_errno = errno;
-- if (p)
-- free(p);
-- fts_lfree(head);
-- (void)closedir(dirp);
-- cur->fts_info = FTS_ERR;
-- SET(FTS_STOP);
-- errno = saved_errno;
-- return (NULL);
-- }
-- /* Did realloc() change the pointer? */
-- if (oldaddr != sp->fts_path) {
-- doadjust = 1;
-- if (ISSET(FTS_NOCHDIR))
-- cp = sp->fts_path + len;
-- }
-- maxlen = sp->fts_pathlen - len;
-- }
--
-- if (len + _D_EXACT_NAMLEN (dp) >= 0x10000) {
-- /*
-- * In an FTSENT, fts_pathlen is a u_short so it is
-- * possible to wraparound here. If we do, free up
-- * the current structure and the structures already
-- * allocated, then error out with ENAMETOOLONG.
-- */
-- free(p);
-- fts_lfree(head);
-- (void)closedir(dirp);
-- cur->fts_info = FTS_ERR;
-- SET(FTS_STOP);
-- errno = ENAMETOOLONG;
-- return (NULL);
-- }
-- p->fts_level = level;
-- p->fts_parent = sp->fts_cur;
-- p->fts_pathlen = len + _D_EXACT_NAMLEN (dp);
--
--#if defined FTS_WHITEOUT && 0
-- if (dp->d_type == DT_WHT)
-- p->fts_flags |= FTS_ISW;
--#endif
--
-- if (cderrno) {
-- if (nlinks) {
-- p->fts_info = FTS_NS;
-- p->fts_errno = cderrno;
-- } else
-- p->fts_info = FTS_NSOK;
-- p->fts_accpath = cur->fts_accpath;
-- } else if (nlinks == 0
--#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE
-- || (nostat &&
-- dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
--#endif
-- ) {
-- p->fts_accpath =
-- ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name;
-- p->fts_info = FTS_NSOK;
-- } else {
-- /* Build a file name for fts_stat to stat. */
-- if (ISSET(FTS_NOCHDIR)) {
-- p->fts_accpath = p->fts_path;
-- memmove(cp, p->fts_name, p->fts_namelen + 1);
-- } else
-- p->fts_accpath = p->fts_name;
-- /* Stat it. */
-- p->fts_info = fts_stat(sp, p, 0);
--
-- /* Decrement link count if applicable. */
-- if (nlinks > 0 && (p->fts_info == FTS_D ||
-- p->fts_info == FTS_DC || p->fts_info == FTS_DOT))
-- --nlinks;
-- }
--
-- /* We walk in directory order so "ls -f" doesn't get upset. */
-- p->fts_link = NULL;
-- if (head == NULL)
-- head = tail = p;
-- else {
-- tail->fts_link = p;
-- tail = p;
-- }
-- ++nitems;
-- }
-- if (dirp)
-- (void)closedir(dirp);
--
-- /*
-- * If realloc() changed the address of the path, adjust the
-- * addresses for the rest of the tree and the dir list.
-- */
-- if (doadjust)
-- fts_padjust(sp, head);
--
-- /*
-- * If not changing directories, reset the path back to original
-- * state.
-- */
-- if (ISSET(FTS_NOCHDIR)) {
-- if (len == sp->fts_pathlen || nitems == 0)
-- --cp;
-- *cp = '\0';
-- }
--
-- /*
-- * If descended after called from fts_children or after called from
-- * fts_read and nothing found, get back. At the root level we use
-- * the saved fd; if one of fts_open()'s arguments is a relative path
-- * to an empty directory, we wind up here with no other way back. If
-- * can't get back, we're done.
-- */
-- if (descend && nitems == 0 &&
-- (cur->fts_level == FTS_ROOTLEVEL ?
-- FCHDIR(sp, sp->fts_rfd) :
-- fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) {
-- cur->fts_info = FTS_ERR;
-- SET(FTS_STOP);
-- return (NULL);
-- }
--
-- /* If didn't find anything, return NULL. */
-- if (!nitems) {
-- if (type == BREAD)
-- cur->fts_info = FTS_DP;
-- return (NULL);
-- }
--
-- /* Sort the entries. */
-- if (sp->fts_compar && nitems > 1)
-- head = fts_sort(sp, head, nitems);
-- return (head);
--}
--
--static u_short
--fts_stat(sp, p, follow)
-- FTS *sp;
-- register FTSENT *p;
-- int follow;
--{
-- register FTSENT *t;
-- register dev_t dev;
-- register ino_t ino;
-- struct stat *sbp;
-- int saved_errno;
--
-- /* If user needs stat info, stat buffer already allocated. */
-- sbp = p->fts_statp;
--
--#if defined FTS_WHITEOUT && 0
-- /* check for whiteout */
-- if (p->fts_flags & FTS_ISW) {
-- if (sbp != &sb) {
-- memset(sbp, '\0', sizeof (*sbp));
-- sbp->st_mode = S_IFWHT;
-- }
-- return (FTS_W);
-- }
--#endif
--
-- /*
-- * If doing a logical walk, or application requested FTS_FOLLOW, do
-- * a stat(2). If that fails, check for a non-existent symlink. If
-- * fail, set the errno from the stat call.
-- */
-- if (ISSET(FTS_LOGICAL) || follow) {
-- if (stat(p->fts_accpath, sbp)) {
-- saved_errno = errno;
-- if (!lstat(p->fts_accpath, sbp)) {
-- errno = 0;
-- return (FTS_SLNONE);
-- }
-- p->fts_errno = saved_errno;
-- goto err;
-- }
-- } else if (lstat(p->fts_accpath, sbp)) {
-- p->fts_errno = errno;
--err: memset(sbp, 0, sizeof(struct stat));
-- return (FTS_NS);
-- }
--
-- if (S_ISDIR(sbp->st_mode)) {
-- /*
-- * Set the device/inode. Used to find cycles and check for
-- * crossing mount points. Also remember the link count, used
-- * in fts_build to limit the number of stat calls. It is
-- * understood that these fields are only referenced if fts_info
-- * is set to FTS_D.
-- */
-- dev = p->fts_dev = sbp->st_dev;
-- ino = p->fts_ino = sbp->st_ino;
-- p->fts_nlink = sbp->st_nlink;
--
-- if (ISDOT(p->fts_name))
-- return (FTS_DOT);
--
-- /*
-- * Cycle detection is done by brute force when the directory
-- * is first encountered. If the tree gets deep enough or the
-- * number of symbolic links to directories is high enough,
-- * something faster might be worthwhile.
-- */
-- for (t = p->fts_parent;
-- t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
-- if (ino == t->fts_ino && dev == t->fts_dev) {
-- p->fts_cycle = t;
-- return (FTS_DC);
-- }
-- return (FTS_D);
-- }
-- if (S_ISLNK(sbp->st_mode))
-- return (FTS_SL);
-- if (S_ISREG(sbp->st_mode))
-- return (FTS_F);
-- return (FTS_DEFAULT);
--}
--
--static FTSENT *
--fts_sort(sp, head, nitems)
-- FTS *sp;
-- FTSENT *head;
-- register int nitems;
--{
-- register FTSENT **ap, *p;
--
-- /*
-- * Construct an array of pointers to the structures and call qsort(3).
-- * Reassemble the array in the order returned by qsort. If unable to
-- * sort for memory reasons, return the directory entries in their
-- * current order. Allocate enough space for the current needs plus
-- * 40 so don't realloc one entry at a time.
-- */
-- if (nitems > sp->fts_nitems) {
-- struct _ftsent **a;
--
-- sp->fts_nitems = nitems + 40;
-- if ((a = realloc(sp->fts_array,
-- (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
-- free(sp->fts_array);
-- sp->fts_array = NULL;
-- sp->fts_nitems = 0;
-- return (head);
-- }
-- sp->fts_array = a;
-- }
-- for (ap = sp->fts_array, p = head; p; p = p->fts_link)
-- *ap++ = p;
-- qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
-- for (head = *(ap = sp->fts_array); --nitems; ++ap)
-- ap[0]->fts_link = ap[1];
-- ap[0]->fts_link = NULL;
-- return (head);
--}
--
--static FTSENT *
--fts_alloc(sp, name, namelen)
-- FTS *sp;
-- const char *name;
-- register int namelen;
--{
-- register FTSENT *p;
-- size_t len;
--
-- /*
-- * The file name is a variable length array and no stat structure is
-- * necessary if the user has set the nostat bit. Allocate the FTSENT
-- * structure, the file name and the stat structure in one chunk, but
-- * be careful that the stat structure is reasonably aligned. Since the
-- * fts_name field is declared to be of size 1, the fts_name pointer is
-- * namelen + 2 before the first possible address of the stat structure.
-- */
-- len = sizeof(FTSENT) + namelen;
-- len += sizeof(struct stat) + ALIGNBYTES;
-- if ((p = malloc(len)) == NULL)
-- return (NULL);
--
-- /* Copy the name and guarantee NUL termination. */
-- memmove(p->fts_name, name, namelen);
-- p->fts_name[namelen] = '\0';
--
-- p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2);
-- p->fts_namelen = namelen;
-- p->fts_path = sp->fts_path;
-- p->fts_errno = 0;
-- p->fts_flags = 0;
-- p->fts_instr = FTS_NOINSTR;
-- p->fts_number = 0;
-- p->fts_pointer = NULL;
-- return (p);
--}
--
--static void
--fts_lfree(head)
-- register FTSENT *head;
--{
-- register FTSENT *p;
--
-- /* Free a linked list of structures. */
-- while ((p = head)) {
-- head = head->fts_link;
-- free(p);
-- }
--}
--
--/*
-- * Allow essentially unlimited paths; find, rm, ls should all work on any tree.
-- * Most systems will allow creation of paths much longer than MAXPATHLEN, even
-- * though the kernel won't resolve them. Add the size (not just what's needed)
-- * plus 256 bytes so don't realloc the path 2 bytes at a time.
-- */
--static int
--fts_palloc(sp, more)
-- FTS *sp;
-- size_t more;
--{
-- char *p;
--
-- sp->fts_pathlen += more + 256;
-- /*
-- * Check for possible wraparound. In an FTS, fts_pathlen is
-- * a signed int but in an FTSENT it is an unsigned short.
-- * We limit fts_pathlen to USHRT_MAX to be safe in both cases.
-- */
-- if (sp->fts_pathlen < 0 || sp->fts_pathlen >= 0x10000) {
-- if (sp->fts_path) {
-- free(sp->fts_path);
-- sp->fts_path = NULL;
-- }
-- sp->fts_path = NULL;
-- errno = ENAMETOOLONG;
-- return (1);
-- }
-- p = realloc(sp->fts_path, sp->fts_pathlen);
-- if (p == NULL) {
-- free(sp->fts_path);
-- sp->fts_path = NULL;
-- return 1;
-- }
-- sp->fts_path = p;
-- return 0;
--}
--
--/*
-- * When the path is realloc'd, have to fix all of the pointers in structures
-- * already returned.
-- */
--static void
--fts_padjust(sp, head)
-- FTS *sp;
-- FTSENT *head;
--{
-- FTSENT *p;
-- char *addr = sp->fts_path;
--
--#define ADJUST(p) do { \
-- if ((p)->fts_accpath != (p)->fts_name) { \
-- (p)->fts_accpath = \
-- (char *)addr + ((p)->fts_accpath - (p)->fts_path); \
-- } \
-- (p)->fts_path = addr; \
--} while (0)
-- /* Adjust the current set of children. */
-- for (p = sp->fts_child; p; p = p->fts_link)
-- ADJUST(p);
--
-- /* Adjust the rest of the tree, including the current level. */
-- for (p = head; p->fts_level >= FTS_ROOTLEVEL;) {
-- ADJUST(p);
-- p = p->fts_link ? p->fts_link : p->fts_parent;
-- }
--}
--
--static size_t
--fts_maxarglen(argv)
-- char * const *argv;
--{
-- size_t len, max;
--
-- for (max = 0; *argv; ++argv)
-- if ((len = strlen(*argv)) > max)
-- max = len;
-- return (max + 1);
--}
--
--/*
-- * Change to dir specified by fd or p->fts_accpath without getting
-- * tricked by someone changing the world out from underneath us.
-- * Assumes p->fts_dev and p->fts_ino are filled in.
-- */
--static int
--fts_safe_changedir(sp, p, fd, path)
-- FTS *sp;
-- FTSENT *p;
-- int fd;
-- const char *path;
--{
-- int ret, oerrno, newfd;
-- struct stat sb;
--
-- newfd = fd;
-- if (ISSET(FTS_NOCHDIR))
-- return (0);
-- if (fd < 0 && (newfd = open(path, O_RDONLY, 0)) < 0)
-- return (-1);
-- if (fstat(newfd, &sb)) {
-- ret = -1;
-- goto bail;
-- }
-- if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) {
-- errno = ENOENT; /* disinformation */
-- ret = -1;
-- goto bail;
-- }
-- ret = fchdir(newfd);
--bail:
-- oerrno = errno;
-- if (fd < 0)
-- (void)close(newfd);
-- errno = oerrno;
-- return (ret);
--}
-diff --git a/lib/fts.h b/lib/fts.h
-deleted file mode 100644
-index 58846b9..0000000
---- a/lib/fts.h
-+++ /dev/null
-@@ -1,131 +0,0 @@
--/*
-- * Copyright (c) 1989, 1993
-- * The Regents of the University of California. All rights reserved.
-- *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- * notice, this list of conditions and the following disclaimer.
-- * 2. Redistributions in binary form must reproduce the above copyright
-- * notice, this list of conditions and the following disclaimer in the
-- * documentation and/or other materials provided with the distribution.
-- * 4. Neither the name of the University nor the names of its contributors
-- * may be used to endorse or promote products derived from this software
-- * without specific prior written permission.
-- *
-- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-- *
-- * @(#)fts.h 8.3 (Berkeley) 8/14/94
-- */
--
--#ifndef _FTS_H
--#define _FTS_H 1
--
--#include <features.h>
--#include <sys/types.h>
--
--typedef struct {
-- struct _ftsent *fts_cur; /* current node */
-- struct _ftsent *fts_child; /* linked list of children */
-- struct _ftsent **fts_array; /* sort array */
-- dev_t fts_dev; /* starting device # */
-- char *fts_path; /* path for this descent */
-- int fts_rfd; /* fd for root */
-- int fts_pathlen; /* sizeof(path) */
-- int fts_nitems; /* elements in the sort array */
-- int (*fts_compar) (const void *, const void *); /* compare fn */
--
--#define FTS_COMFOLLOW 0x0001 /* follow command line symlinks */
--#define FTS_LOGICAL 0x0002 /* logical walk */
--#define FTS_NOCHDIR 0x0004 /* don't change directories */
--#define FTS_NOSTAT 0x0008 /* don't get stat info */
--#define FTS_PHYSICAL 0x0010 /* physical walk */
--#define FTS_SEEDOT 0x0020 /* return dot and dot-dot */
--#define FTS_XDEV 0x0040 /* don't cross devices */
--#define FTS_WHITEOUT 0x0080 /* return whiteout information */
--#define FTS_OPTIONMASK 0x00ff /* valid user option mask */
--
--#define FTS_NAMEONLY 0x0100 /* (private) child names only */
--#define FTS_STOP 0x0200 /* (private) unrecoverable error */
-- int fts_options; /* fts_open options, global flags */
--} FTS;
--
--typedef struct _ftsent {
-- struct _ftsent *fts_cycle; /* cycle node */
-- struct _ftsent *fts_parent; /* parent directory */
-- struct _ftsent *fts_link; /* next file in directory */
-- long fts_number; /* local numeric value */
-- void *fts_pointer; /* local address value */
-- char *fts_accpath; /* access path */
-- char *fts_path; /* root path */
-- int fts_errno; /* errno for this node */
-- int fts_symfd; /* fd for symlink */
-- u_short fts_pathlen; /* strlen(fts_path) */
-- u_short fts_namelen; /* strlen(fts_name) */
--
-- ino_t fts_ino; /* inode */
-- dev_t fts_dev; /* device */
-- nlink_t fts_nlink; /* link count */
--
--#define FTS_ROOTPARENTLEVEL -1
--#define FTS_ROOTLEVEL 0
-- short fts_level; /* depth (-1 to N) */
--
--#define FTS_D 1 /* preorder directory */
--#define FTS_DC 2 /* directory that causes cycles */
--#define FTS_DEFAULT 3 /* none of the above */
--#define FTS_DNR 4 /* unreadable directory */
--#define FTS_DOT 5 /* dot or dot-dot */
--#define FTS_DP 6 /* postorder directory */
--#define FTS_ERR 7 /* error; errno is set */
--#define FTS_F 8 /* regular file */
--#define FTS_INIT 9 /* initialized only */
--#define FTS_NS 10 /* stat(2) failed */
--#define FTS_NSOK 11 /* no stat(2) requested */
--#define FTS_SL 12 /* symbolic link */
--#define FTS_SLNONE 13 /* symbolic link without target */
--#define FTS_W 14 /* whiteout object */
-- u_short fts_info; /* user flags for FTSENT structure */
--
--#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */
--#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */
-- u_short fts_flags; /* private flags for FTSENT structure */
--
--#define FTS_AGAIN 1 /* read node again */
--#define FTS_FOLLOW 2 /* follow symbolic link */
--#define FTS_NOINSTR 3 /* no instructions */
--#define FTS_SKIP 4 /* discard node */
-- u_short fts_instr; /* fts_set() instructions */
--
-- struct stat *fts_statp; /* stat(2) information */
-- char fts_name[1]; /* file name */
--} FTSENT;
--
--__BEGIN_DECLS
--
--#define fts_children pax_fts_children
--#define fts_close pax_fts_close
--#define fts_open pax_fts_open
--#define fts_read pax_fts_read
--#define fts_set pax_fts_set
--
--FTSENT *fts_children (FTS *, int);
--int fts_close (FTS *);
--FTS *fts_open (char * const *, int,
-- int (*)(const FTSENT **, const FTSENT **));
--FTSENT *fts_read (FTS *);
--int fts_set (FTS *, FTSENT *, int) __THROW;
--__END_DECLS
--
--#endif /* fts.h */
-diff --git a/lib/vis.h b/lib/vis.h
-index d34d342..71fa5f4 100644
---- a/lib/vis.h
-+++ b/lib/vis.h
-@@ -73,14 +73,19 @@
- */
- #define UNVIS_END 1 /* no more characters */
-
--#include <sys/cdefs.h>
-+#ifndef __P
-+#define __P(x) x
-+#endif
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
- char *vis __P((char *, int, int, int));
- int strvis __P((char *, const char *, int));
- int strvisx __P((char *, const char *, size_t, int));
- int strunvis __P((char *, const char *));
- int unvis __P((char *, char, int *, int));
--__END_DECLS
--
-+#ifdef __cplusplus
-+}
-+#endif
- #endif /* !_VIS_H_ */
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 5ef52a3..227cdef 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -22,4 +22,4 @@ pax_SOURCES = ar_io.c ar_subs.c buf_subs.c cache.c cpio.c\
- file_subs.c ftree.c gen_subs.c getoldopt.c options.c\
- pat_rep.c pax.c sel_subs.c tables.c tar.c tty_subs.c
-
--pax_LDADD = $(top_builddir)/lib/libbsdfunc.a
-+pax_LDADD = $(top_builddir)/lib/libbsdfunc.a -lfts
-diff --git a/src/extern.h b/src/extern.h
-index 361fa81..3ed365d 100644
---- a/src/extern.h
-+++ b/src/extern.h
-@@ -37,8 +37,6 @@
- * External references from each source file
- */
-
--#include <sys/cdefs.h>
--
- /*
- * ar_io.c
- */
-diff --git a/src/file_subs.c b/src/file_subs.c
-index 5590ff1..15bc339 100644
---- a/src/file_subs.c
-+++ b/src/file_subs.c
-@@ -52,7 +52,7 @@
- #include "extern.h"
-
- static int
--mk_link __P((register char *,register struct stat *,register char *, int));
-+mk_link (register char *,register struct stat *,register char *, int);
-
- /*
- * routines that deal with file operations such as: creating, removing;
-diff --git a/src/tables.c b/src/tables.c
-index 2275bf7..8fddca4 100644
---- a/src/tables.c
-+++ b/src/tables.c
-@@ -39,7 +39,7 @@
- #include <sys/time.h>
- #include <sys/stat.h>
- #include <sys/param.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <stdio.h>
- #include <string.h>
- #include <unistd.h>
---
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-include-sys-sysmacros.h-for-major-minor-definitions.patch b/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-include-sys-sysmacros.h-for-major-minor-definitions.patch
deleted file mode 100644
index 1d969bc..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-include-sys-sysmacros.h-for-major-minor-definitions.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 7f4f379f8343c0ce92aa30f3f9037288a089a902 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 18 Dec 2016 08:24:56 +0000
-Subject: [PATCH] include <sys/sysmacros.h> for major/minor definitions
-
-glibc 2.25 will error out if the applications are expecting
-this to come from sys/types.h, it is being removed from
-there.
-
-Fixes
-
-error: In the GNU C Library, "minor" is defined
-| by <sys/sysmacros.h>. For historical compatibility, it is
-| currently defined by <sys/types.h> as well, but we plan to
-| remove this soon. To use "minor", include <sys/sysmacros.h>
-| directly. If you did not intend to use a system-defined macro
-| "minor", you should undefine it after including <sys/types.h>. [-Werror]
-| ul_oct ((u_long) MINOR (arcn->sb.st_rdev), hd->devminor,
-| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/cpio.c | 2 +-
- src/gen_subs.c | 2 +-
- src/tar.c | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-Index: pax-3.4/src/cpio.c
-===================================================================
---- pax-3.4.orig/src/cpio.c
-+++ pax-3.4/src/cpio.c
-@@ -36,6 +36,7 @@
- #include "config.h"
- #endif
-
-+#include <sys/sysmacros.h>
- #include <sys/types.h>
- #include <sys/time.h>
- #include <sys/stat.h>
-Index: pax-3.4/src/gen_subs.c
-===================================================================
---- pax-3.4.orig/src/gen_subs.c
-+++ pax-3.4/src/gen_subs.c
-@@ -37,6 +37,7 @@
- #include "config.h"
- #endif
-
-+#include <sys/sysmacros.h>
- #include <sys/types.h>
- #include <sys/time.h>
- #include <sys/stat.h>
-Index: pax-3.4/src/tar.c
-===================================================================
---- pax-3.4.orig/src/tar.c
-+++ pax-3.4/src/tar.c
-@@ -37,6 +37,7 @@
- #include "config.h"
- #endif
-
-+#include <sys/sysmacros.h>
- #include <sys/types.h>
- #include <sys/time.h>
- #include <sys/stat.h>
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch b/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch
deleted file mode 100644
index 58ac9ce..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b1f50320332c9c90fa33ab136ef0ec2d12cda461 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 6 Jan 2016 12:30:52 -0800
-Subject: [PATCH] use strtoll instead of strtoq
-
-Use LLONG_MAX instead of LONG_LONG_MAX
-LONG_LONG_MAX is GNU specific
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/options.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/options.c b/src/options.c
-index da8b4cf..c663b4e 100644
---- a/src/options.c
-+++ b/src/options.c
-@@ -1547,8 +1547,8 @@ str_offt (char *val)
-
- #if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
- || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
-- num = strtoq (val, &expr, 0);
-- if ((num == LONG_LONG_MAX) || (num <= 0) || (expr == val))
-+ num = strtoll (val, &expr, 0);
-+ if ((num == LLONG_MAX) || (num <= 0) || (expr == val))
- #else
- num = strtol (val, &expr, 0);
- if ((num == LONG_MAX) || (num <= 0) || (expr == val))
---
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch b/import-layers/yocto-poky/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch
deleted file mode 100644
index 88779c3..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Upstream-Status: Pending
-
-This patch fixes this compiler error with gcc 4.6.0
-
-Nitin A Kamble <nitin.a.kamble@intel.com> 2011/05/08
-
-| fts.c: In function 'pax_fts_set':
-| fts.c:469:7: error: parameter 'sp' set but not used [-Werror=unused-but-set-parameter]
-| cc1: all warnings being treated as errors
-|
-| make[2]: *** [fts.o] Error 1
-
-Index: pax-3.4/lib/fts.c
-===================================================================
---- pax-3.4.orig/lib/fts.c
-+++ pax-3.4/lib/fts.c
-@@ -466,7 +466,7 @@ name: t = sp->fts_path + NAPPEND(p->fts
- /* ARGSUSED */
- int
- fts_set(sp, p, instr)
-- FTS *sp;
-+ FTS __attribute__((__unused__)) *sp;
- FTSENT *p;
- int instr;
- {
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch b/import-layers/yocto-poky/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch
deleted file mode 100644
index 7adbd02..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch
+++ /dev/null
@@ -1,185 +0,0 @@
-Upstream-Status: Pending
-
-Author: H.J. Lu <hjl.tools@gmail.com>
-Date: Tue Dec 6 10:34:53 2011 -0800
-
- Fix pax-3.4 build for x32
-
- off_t is 8byte for x32. We need to check both _FILE_OFFSET_BITS and
- size of off_t to see if file offset is 64bit. This patch adds
- AC_CHECK_SIZEOF(off_t) and checks SIZEOF_OFF_T == 8.
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/06
-
-Index: pax-3.4/configure.in
-===================================================================
---- pax-3.4.orig/configure.in
-+++ pax-3.4/configure.in
-@@ -33,4 +33,7 @@ dnl Checks for header files.
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
-
-+AC_CHECK_SIZEOF(off_t)
-+AC_CHECK_SIZEOF(long)
-+
- AC_OUTPUT([Makefile lib/Makefile src/Makefile])
-Index: pax-3.4/src/ar_io.c
-===================================================================
---- pax-3.4.orig/src/ar_io.c
-+++ pax-3.4/src/ar_io.c
-@@ -378,7 +378,8 @@ ar_close(void)
- * could have written anything yet.
- */
- if (frmt == NULL) {
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- (void)fprintf(listf, "%s: unknown format, %qu bytes skipped.\n",
- #else
- (void)fprintf(listf, "%s: unknown format, %lu bytes skipped.\n",
-@@ -391,7 +392,8 @@ ar_close(void)
-
- if (strcmp(NM_CPIO, argv0) == 0)
- (void)fprintf(listf,
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- "%qu blocks\n",
- #else
- "%lu blocks\n",
-@@ -399,7 +401,8 @@ ar_close(void)
- (rdcnt ? rdcnt : wrcnt) / 5120);
- else if (strcmp(NM_TAR, argv0) != 0)
- (void)fprintf(listf,
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- "%s: %s vol %d, %lu files, %qu bytes read, %qu bytes written.\n",
- #else
- "%s: %s vol %d, %lu files, %lu bytes read, %lu bytes written.\n",
-Index: pax-3.4/src/cpio.c
-===================================================================
---- pax-3.4.orig/src/cpio.c
-+++ pax-3.4/src/cpio.c
-@@ -218,7 +218,8 @@ rd_ln_nm (ARCHD *arcn)
- */
- if ((arcn->sb.st_size == 0) ||
- (arcn->sb.st_size >= (off_t) sizeof(arcn->ln_name))) {
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- paxwarn (1, "Cpio link name length is invalid: %qu",
- arcn->sb.st_size);
- #else
-Index: pax-3.4/src/gen_subs.c
-===================================================================
---- pax-3.4.orig/src/gen_subs.c
-+++ pax-3.4/src/gen_subs.c
-@@ -133,7 +133,8 @@ ls_list (ARCHD *arcn, time_t now, FILE *
- * print device id's for devices, or sizes for other nodes
- */
- if ((arcn->type == PAX_CHR) || (arcn->type == PAX_BLK))
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- (void) fprintf (fp, "%4lu,%4lu ", (unsigned long) MAJOR (sbp->st_rdev),
- (unsigned long) MINOR (sbp->st_rdev));
- #else
-@@ -142,7 +143,8 @@ ls_list (ARCHD *arcn, time_t now, FILE *
- #endif
- else
- {
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- (void) fprintf (fp, "%9qu ", sbp->st_size);
- #else
- (void) fprintf (fp, "%9lu ", sbp->st_size);
-@@ -334,7 +336,8 @@ ul_asc (u_long val, char *str, int len,
- return (0);
- }
-
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- /*
- * asc_uqd()
- * convert hex/octal character string into a u_quad_t. We do not have to
-Index: pax-3.4/src/options.c
-===================================================================
---- pax-3.4.orig/src/options.c
-+++ pax-3.4/src/options.c
-@@ -1545,7 +1545,8 @@ str_offt (char *val)
- char *expr;
- off_t num, t;
-
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- num = strtoq (val, &expr, 0);
- if ((num == LONG_LONG_MAX) || (num <= 0) || (expr == val))
- #else
-Index: pax-3.4/src/tar.c
-===================================================================
---- pax-3.4.orig/src/tar.c
-+++ pax-3.4/src/tar.c
-@@ -58,7 +58,8 @@
- static unsigned long tar_chksm (char *, int);
- static char *name_split (char *, int);
- static int ul_oct (u_long, char *, int, int);
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- static int uqd_oct (u_quad_t, char *, int, int);
- #endif
-
-@@ -196,7 +197,8 @@ ul_oct (u_long val, register char *str,
- return (0);
- }
-
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- /*
- * uqd_oct()
- * convert an u_quad_t to an octal string. one of many oddball field
-@@ -427,7 +429,8 @@ tar_rd (ARCHD *arcn, char *buf)
- 0xfff);
- arcn->sb.st_uid = (uid_t) asc_ul (hd->uid, sizeof (hd->uid), OCT);
- arcn->sb.st_gid = (gid_t) asc_ul (hd->gid, sizeof (hd->gid), OCT);
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT);
- #else
- arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT);
-@@ -659,7 +662,8 @@ tar_wr (register ARCHD * arcn)
- * data follows this file, so set the pad
- */
- hd->linkflag = AREGTYPE;
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size,
- sizeof (hd->size), 1))
- #else
-@@ -834,7 +838,8 @@ ustar_rd (ARCHD *arcn, char *buf)
- */
- arcn->sb.st_mode = (mode_t) (asc_ul (hd->mode, sizeof (hd->mode), OCT) &
- 0xfff);
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT);
- #else
- arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT);
-@@ -1081,7 +1086,8 @@ ustar_wr (register ARCHD * arcn)
- else
- hd->typeflag = REGTYPE;
- arcn->pad = TAR_PAD (arcn->sb.st_size);
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size,
- sizeof (hd->size), 3))
- {
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pax/pax_3.4.bb b/import-layers/yocto-poky/meta/recipes-extended/pax/pax_3.4.bb
deleted file mode 100644
index 6df9a81..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pax/pax_3.4.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Portable Archive eXchange"
-DESCRIPTION = "pax (Portable Archive eXchange) is the POSIX standard archive tool"
-HOMEPAGE = "http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/bin/pax/"
-BUGTRACKER = "http://www.openbsd.org/query-pr.html"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4b0b674dfdc56daa3832d4069b820ea0 \
- file://src/pax.h;endline=40;md5=309d3e241c1d82069228e5a51e9b8d60 \
- file://src/cpio.h;endline=40;md5=c3b4bbff6133a83387968617bbae8ac4 \
- file://lib/vis.h;endline=40;md5=b283f759abd4a5ad7e014b80f51fc053"
-
-SECTION = "base"
-PR = "r2"
-
-DEPENDS_append_libc-musl = " fts "
-
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.bz2/fbd9023b590b45ac3ade95870702a0d6/${BP}.tar.bz2 \
- file://fix_for_compile_with_gcc-4.6.0.patch \
- file://pax-3.4_fix_for_x32.patch \
- file://0001-include-sys-sysmacros.h-for-major-minor-definitions.patch \
- file://0001-Add-a-comment-for-fallthrough.patch \
- "
-
-SRC_URI_append_libc-musl = " file://0001-Fix-build-with-musl.patch \
- file://0001-use-strtoll-instead-of-strtoq.patch \
- "
-
-SRC_URI[md5sum] = "fbd9023b590b45ac3ade95870702a0d6"
-SRC_URI[sha256sum] = "ac3c06048e02828077cf7757d3d142241429238893b91d529af29a2e8cc5623b"
-
-inherit autotools
diff --git a/import-layers/yocto-poky/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb b/import-layers/yocto-poky/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb
index 170e7ec..644d820 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb
@@ -10,7 +10,7 @@
S = "${WORKDIR}/Convert-ASN1-${PV}"
-inherit cpan
+inherit cpan ptest-perl
EXTRA_PERLFLAGS = "-I ${PERLHOSTLIB}"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/perl/libtimedate-perl_2.30.bb b/import-layers/yocto-poky/meta/recipes-extended/perl/libtimedate-perl_2.30.bb
index 427613c..8e1461c 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/perl/libtimedate-perl_2.30.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/perl/libtimedate-perl_2.30.bb
@@ -9,7 +9,7 @@
S = "${WORKDIR}/TimeDate-${PV}"
-inherit cpan
+inherit cpan ptest-perl
BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb b/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb
index 3498a28..fa9f995 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb
@@ -6,18 +6,22 @@
SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-1.0+"
-PR = "r3"
-LIC_FILES_CHKSUM = "file://META.yml;beginline=22;endline=22;md5=9ca1a4a941496e7feedac72c4fb8b137"
+SRCNAME = "XML-NamespaceSupport"
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-${PV}.tar.gz"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c9d8a117e7620b5adf8d69c29613ceab"
+
+SRC_URI = "${CPAN_MIRROR}/authors/id/P/PE/PERIGRIN/${SRCNAME}-${PV}.tar.gz"
SRC_URI[md5sum] = "a8916c6d095bcf073e1108af02e78c97"
SRC_URI[sha256sum] = "47e995859f8dd0413aa3f22d350c4a62da652e854267aa0586ae544ae2bae5ef"
+UPSTREAM_CHECK_REGEX = "XML\-NamespaceSupport\-(?P<pver>(\d+\.\d+))(?!_\d+).tar"
-S = "${WORKDIR}/XML-NamespaceSupport-${PV}"
+S = "${WORKDIR}/${SRCNAME}-${PV}"
-inherit cpan
+inherit cpan ptest-perl
+
+RDEPENDS_${PN}-ptest += "perl-module-test-more"
BBCLASSEXTEND="native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb b/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb
index cd3a580..b3e01e9 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb
@@ -19,6 +19,6 @@
S = "${WORKDIR}/XML-SAX-Base-${PV}"
-inherit cpan
+inherit cpan ptest-perl
BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb b/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb
index ad31b9c..cdcbebf 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb
@@ -23,6 +23,11 @@
S = "${WORKDIR}/XML-SAX-${PV}"
-inherit cpan
+inherit cpan ptest-perl
+
+do_install_ptest() {
+ cp -r ${B}/testfiles ${D}${PTEST_PATH}
+ chown -R root:root ${D}${PTEST_PATH}/testfiles
+}
BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz.inc b/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz.inc
deleted file mode 100644
index 978f905..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz.inc
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "A parallel implementation of gzip"
-DESCRIPTION = "pigz, which stands for parallel implementation of gzip, is a \
-fully functional replacement for gzip that exploits multiple processors and \
-multiple cores to the hilt when compressing data. pigz was written by Mark \
-Adler, and uses the zlib and pthread libraries."
-HOMEPAGE = "http://zlib.net/pigz/"
-SECTION = "console/utils"
-LICENSE = "Zlib & Apache-2.0"
-
-PROVIDES_class-native += "gzip-native"
-
-DEPENDS = "zlib"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-inherit update-alternatives
-
-do_install_class-target() {
- # Install files into /bin (FHS), which is typical place for gzip
- install -d ${D}${base_bindir}
- install ${B}/pigz ${D}${base_bindir}/pigz
- ln -nsf pigz ${D}${base_bindir}/unpigz
- ln -nsf pigz ${D}${base_bindir}/pigzcat
-}
-
-do_install() {
- install -d ${D}${bindir}
- install ${B}/pigz ${D}${bindir}/gzip
- ln -nsf gzip ${D}${bindir}/gunzip
- ln -nsf gzip ${D}${bindir}/zcat
-}
-
-ALTERNATIVE_PRIORITY = "80"
-ALTERNATIVE_${PN} = "gunzip gzip zcat"
-ALTERNATIVE_${PN}_class-nativesdk = ""
-ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
-ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
-ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
-ALTERNATIVE_TARGET = "${base_bindir}/pigz"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz_2.3.4.bb b/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz_2.3.4.bb
deleted file mode 100644
index f4832df..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz_2.3.4.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require pigz.inc
-LIC_FILES_CHKSUM = "file://pigz.c;beginline=7;endline=21;md5=a21d4075cb00ab4ca17fce5e7534ca95"
-
-UPSTREAM_CHECK_URI = "http://zlib.net/${BPN}/"
-UPSTREAM_CHECK_REGEX = "pigz-(?P<pver>.*)\.tar"
-SRC_URI = "https://github.com/madler/pigz/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz"
-SRC_URI[md5sum] = "c109057050b15edf3eb9bb4d0805235e"
-SRC_URI[sha256sum] = "763f2fdb203aa0b7b640e63385e38e5dd4e5aaa041bc8e42aa96f2ef156b06e8"
-
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz_2.4.bb b/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz_2.4.bb
new file mode 100644
index 0000000..6e6da9c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz_2.4.bb
@@ -0,0 +1,30 @@
+SUMMARY = "A parallel implementation of gzip"
+DESCRIPTION = "pigz, which stands for parallel implementation of gzip, is a \
+fully functional replacement for gzip that exploits multiple processors and \
+multiple cores to the hilt when compressing data. pigz was written by Mark \
+Adler, and uses the zlib and pthread libraries."
+HOMEPAGE = "http://zlib.net/pigz/"
+SECTION = "console/utils"
+LICENSE = "Zlib & Apache-2.0"
+LIC_FILES_CHKSUM = "file://pigz.c;md5=9ae6dee8ceba9610596ed0ada493d142;beginline=7;endline=21"
+
+SRC_URI = "http://zlib.net/${BPN}/fossils/${BP}.tar.gz"
+SRC_URI[md5sum] = "def2f6e19d9d8231445adc1349d346df"
+SRC_URI[sha256sum] = "a4f816222a7b4269bd232680590b579ccc72591f1bb5adafcd7208ca77e14f73"
+# Point this at the homepage in case /fossils/ isn't updated
+UPSTREAM_CHECK_URI = "http://zlib.net/${BPN}/"
+UPSTREAM_CHECK_REGEX = "pigz-(?P<pver>.*)\.tar"
+
+DEPENDS = "zlib"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+do_install() {
+ # Install files into /bin (FHS), which is typical place for gzip
+ install -d ${D}${base_bindir}
+ install ${B}/pigz ${D}${base_bindir}/pigz
+ ln -nsf pigz ${D}${base_bindir}/unpigz
+ ln -nsf pigz ${D}${base_bindir}/pigzcat
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/procps/procps_3.3.12.bb b/import-layers/yocto-poky/meta/recipes-extended/procps/procps_3.3.12.bb
index adabd75..ecf215f 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/procps/procps_3.3.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/procps/procps_3.3.12.bb
@@ -1,7 +1,7 @@
SUMMARY = "System and process monitoring utilities"
DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \
the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill."
-HOMEPAGE = "https://gitorious.org/procps"
+HOMEPAGE = "https://gitlab.com/procps-ng/procps"
SECTION = "base"
LICENSE = "GPLv2+ & LGPLv2+"
LIC_FILES_CHKSUM="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
@@ -23,8 +23,6 @@
EXTRA_OECONF = "--enable-skill --disable-modern-top"
-CPPFLAGS += "-I${S}"
-
do_install_append () {
install -d ${D}${base_bindir}
[ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done
@@ -44,7 +42,7 @@
CONFFILES_${PN} = "${sysconfdir}/sysctl.conf"
-bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime"
+bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime w"
base_bindir_progs += "kill pidof ps watch"
base_sbindir_progs += "sysctl"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch b/import-layers/yocto-poky/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch
deleted file mode 100644
index e57d60f..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 3638cc55b4d08851faba46635d737b24d016665b Mon Sep 17 00:00:00 2001
-From: Brad Jorsch <anomie@users.sourceforge.net>
-Date: Fri, 28 Feb 2014 21:55:02 +1100
-Subject: [PATCH] Typo in fuser makes -M on all the time
-
-Brad found that fuser had the -M option on all the time.
-A simple but significant typo caused this, thanks the the patch.
-
-Bug-Debian: http://bugs.debian.org/740275
-
-Upstream-Status: Backport
-
-Signed-off-by: Craig Small <csmall@enc.com.au>
----
- ChangeLog | 4 ++++
- src/fuser.c | 2 +-
- 2 files changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index fd1cccf..e5f784c 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,7 @@
-+Changes in 22.22
-+================
-+ * Fixed typo in fuser which has -M on Debian #740275
-+
- Changes in 22.21
- ================
- * Missing comma in fuser(1) added Debian #702391
-diff --git a/src/fuser.c b/src/fuser.c
-index b485f65..389b302 100644
---- a/src/fuser.c
-+++ b/src/fuser.c
-@@ -1174,7 +1174,7 @@ int main(int argc, char *argv[])
- usage(_("No process specification given"));
-
- /* Check if -M flag was used and if so check mounts */
-- if (opts * OPT_ISMOUNTPOINT) {
-+ if (opts & OPT_ISMOUNTPOINT) {
- check_mountpoints(&mounts, &names_head, &names_tail);
- }
-
---
-1.8.4.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch b/import-layers/yocto-poky/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch
deleted file mode 100644
index c8afcac..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From aa66afecd8ba9cc4139f25ab15ec315173413a7d Mon Sep 17 00:00:00 2001
-From: Paul Barker <paul@paulbarker.me.uk>
-Date: Wed, 20 Aug 2014 10:31:37 +0000
-Subject: [PATCH] Include <limits.h> for PATH_MAX
-
-When building against musl libc, PATH_MAX is defined in <limits.h>.
-
-Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
-
-Upstream-Status: Accepted (Should be in next release after 22.21)
----
- src/pstree.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/pstree.c b/src/pstree.c
-index 071e6c4..0d28260 100644
---- a/src/pstree.c
-+++ b/src/pstree.c
-@@ -41,6 +41,7 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/ioctl.h>
-+#include <limits.h>
-
- #include "i18n.h"
- #include "comm.h"
---
-2.0.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc.inc b/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc.inc
index 66a784b..82ef947 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc.inc
@@ -16,6 +16,15 @@
inherit autotools gettext
+# Upstream has a custom autogen.sh which invokes po/update-potfiles as they
+# don't ship a po/POTFILES.in (which is silly). Without that file gettext
+# doesn't believe po/ is a gettext directory and won't generate po/Makefile.
+EXTRA_AUTORECONF_remove = "--exclude=autopoint"
+do_configure_prepend() {
+ ( cd ${S} && po/update-potfiles )
+}
+
+
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch b/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch
new file mode 100644
index 0000000..4d44495
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch
@@ -0,0 +1,30 @@
+From 285877b7761d74736aca2687ed9bef2f78b82c33 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
+ there
+
+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
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -79,7 +79,7 @@ EXTRA_DIST = src/signames.c README.md
+ CLEANFILES = src/signames.h
+
+ src/signames.h: src/signames.c Makefile
+- 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/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc_22.21.bb b/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc_22.21.bb
deleted file mode 100644
index 1c6473e..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc_22.21.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require psmisc.inc
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
-
-SRC_URI[md5sum] = "935c0fd6eb208288262b385fa656f1bf"
-SRC_URI[sha256sum] = "97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz \
- file://0001-Typo-in-fuser-makes-M-on-all-the-time.patch \
- file://0002-Include-limits.h-for-PATH_MAX.patch \
- file://0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch \
- "
diff --git a/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc_23.0.bb b/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc_23.0.bb
new file mode 100644
index 0000000..2b07f49
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc_23.0.bb
@@ -0,0 +1,10 @@
+require psmisc.inc
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+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 = "67b1da268f4c0ce6859980e3dfcfaec5b2448e80"
+S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch
deleted file mode 100644
index 6add470..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 776757a23e9930588950c7fcbc7827ec7a3e51c4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.com>
-Date: Mon, 4 Jan 2016 15:48:19 +0100
-Subject: [PATCH] Do not accidentaly override commandline passed CFLAGS.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Backport
-
-Signed-off-by: Tomáš Chvátal <tchvatal@suse.com>
-Signed-off-by: Jan Kara <jack@suse.cz>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 3ba1386..1552c15 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -53,7 +53,7 @@ AS_IF([test "x${prefix}" = "xNONE"], [
- # ================
- # Check for cflags
- # ================
--CFLAGS="-D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
-+CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
- AC_ARG_ENABLE([werror],
- [AS_HELP_STRING([--enable-werror], [Treat all warnings as errors, useful for development])],
- [enable_werror="$enableval"],
---
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch
deleted file mode 100644
index a79e477..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 39fd30ce57e3c34c3649866bf9345a71f0b78667 Mon Sep 17 00:00:00 2001
-From: Jan Kara <jack@suse.cz>
-Date: Mon, 4 Jan 2016 15:10:53 +0100
-Subject: [PATCH] Fix build with disabled ldap
-
-Upstream-Status: Backport
-
-Reported-by: Tomas Chvatal <tchvatal@suse.com>
-Signed-off-by: Jan Kara <jack@suse.cz>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- warnquota.c | 36 ++++++++++++++++++------------------
- 1 file changed, 18 insertions(+), 18 deletions(-)
-
-diff --git a/warnquota.c b/warnquota.c
-index 3734f0e..e9868c1 100644
---- a/warnquota.c
-+++ b/warnquota.c
-@@ -109,13 +109,13 @@ struct configparams {
- char *user_signature;
- char *group_message;
- char *group_signature;
-+ time_t cc_before;
-+#ifdef USE_LDAP_MAIL_LOOKUP
- int use_ldap_mail; /* 0 */
-+ int ldap_is_setup; /* 0 */
- int ldap_starttls; /* 0 */
- int ldap_tls; /* LDAP_OPT_X_TLS_NEVER */
- int ldap_vers; /* LDAP_VERSION3 */
-- time_t cc_before;
--#ifdef USE_LDAP_MAIL_LOOKUP
-- int ldap_is_setup; /* 0 */
- char ldap_host[CNF_BUFFER];
- int ldap_port;
- char ldap_uri[CNF_BUFFER];
-@@ -729,13 +729,13 @@ static int readconfigfile(const char *filename, struct configparams *config)
- }
- maildev[0] = 0;
- config->user_signature = config->user_message = config->group_signature = config->group_message = NULL;
-+ config->cc_before = -1;
-+
-+#ifdef USE_LDAP_MAIL_LOOKUP
- config->use_ldap_mail = 0;
- config->ldap_starttls = 0;
- config->ldap_tls = LDAP_OPT_X_TLS_NEVER;
- config->ldap_vers = LDAP_VERSION3;
-- config->cc_before = -1;
--
--#ifdef USE_LDAP_MAIL_LOOKUP
- config->ldap_port = config->ldap_is_setup = 0;
- config->ldap_host[0] = 0;
- config->ldap_uri[0] = 0;
-@@ -820,6 +820,18 @@ static int readconfigfile(const char *filename, struct configparams *config)
- create_eoln(config->group_signature);
- verify_format(config->group_signature, "GROUP_SIGNATURE");
- }
-+ else if (!strcmp(var, "CC_BEFORE")) {
-+ int num;
-+ char unit[10];
-+
-+ if (sscanf(value, "%d%s", &num, unit) != 2)
-+ goto cc_parse_err;
-+ if (str2timeunits(num, unit, &config->cc_before) < 0) {
-+cc_parse_err:
-+ die(1, _("Cannot parse time at CC_BEFORE variable (line %d).\n"), line);
-+ }
-+ }
-+#ifdef USE_LDAP_MAIL_LOOKUP
- else if (!strcmp(var, "LDAP_MAIL")) {
- if(strcasecmp(value, "true") == 0)
- config->use_ldap_mail = 1;
-@@ -846,18 +858,6 @@ static int readconfigfile(const char *filename, struct configparams *config)
- else
- config->ldap_starttls = 0;
- }
-- else if (!strcmp(var, "CC_BEFORE")) {
-- int num;
-- char unit[10];
--
-- if (sscanf(value, "%d%s", &num, unit) != 2)
-- goto cc_parse_err;
-- if (str2timeunits(num, unit, &config->cc_before) < 0) {
--cc_parse_err:
-- die(1, _("Cannot parse time at CC_BEFORE variable (line %d).\n"), line);
-- }
-- }
--#ifdef USE_LDAP_MAIL_LOOKUP
- else if (!strcmp(var, "LDAP_HOST"))
- sstrncpy(config->ldap_host, value, CNF_BUFFER);
- else if (!strcmp(var, "LDAP_PORT"))
---
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch
deleted file mode 100644
index 6fb2daf..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From feca6d2e55d992bbe176ee8faa734c105eb1b2e1 Mon Sep 17 00:00:00 2001
-From: Theodore Ts'o <tytso@mit.edu>
-Date: Tue, 29 Mar 2016 20:48:05 -0400
-Subject: [PATCH] Use NGROUPS_MAX instead of NGROUPS
-
-NGRROUPS_MAX is what is defined by SuSv3; NGROUPS is not guaranteed by
-any standard, but is just an ancient BSD'ism. Since Android's bionic
-libc has the former but not the latter, let's use NGROUPS_MAX instead.
-
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Jan Kara <jack@suse.cz>
----
- quota.c | 5 +++--
- quotaops.c | 5 +++--
- 2 files changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/quota.c b/quota.c
-index 049dac4..e195ead 100644
---- a/quota.c
-+++ b/quota.c
-@@ -48,6 +48,7 @@
- #include <errno.h>
- #include <string.h>
- #include <unistd.h>
-+#include <limits.h>
- #ifdef RPC
- #include <rpc/rpc.h>
- #include "rquota.h"
-@@ -296,7 +297,7 @@ static int showquotas(int type, qid_t id, int mntcnt, char **mnt)
- int main(int argc, char **argv)
- {
- int ngroups;
-- gid_t gidset[NGROUPS], *gidsetp;
-+ gid_t gidset[NGROUPS_MAX], *gidsetp;
- int i, ret;
- struct option long_opts[] = {
- { "help", 0, NULL, 'h' },
-@@ -405,7 +406,7 @@ int main(int argc, char **argv)
- ret |= showquotas(USRQUOTA, getuid(), argc, argv);
- if (flags & FL_GROUP) {
- ngroups = sysconf(_SC_NGROUPS_MAX);
-- if (ngroups > NGROUPS) {
-+ if (ngroups > NGROUPS_MAX) {
- gidsetp = malloc(ngroups * sizeof(gid_t));
- if (!gidsetp)
- die(1, _("Gid set allocation (%d): %s\n"), ngroups, strerror(errno));
-diff --git a/quotaops.c b/quotaops.c
-index 136aec3..590dc1b 100644
---- a/quotaops.c
-+++ b/quotaops.c
-@@ -51,6 +51,7 @@
- #include <unistd.h>
- #include <time.h>
- #include <ctype.h>
-+#include <limits.h>
-
- #if defined(RPC)
- #include "rquota.h"
-@@ -97,7 +98,7 @@ struct dquot *getprivs(qid_t id, struct quota_handle **handles, int quiet)
- #if defined(BSD_BEHAVIOUR)
- int j, ngroups;
- uid_t euid;
-- gid_t gidset[NGROUPS], *gidsetp;
-+ gid_t gidset[NGROUPS_MAX], *gidsetp;
- #endif
-
- for (i = 0; handles[i]; i++) {
-@@ -115,7 +116,7 @@ struct dquot *getprivs(qid_t id, struct quota_handle **handles, int quiet)
- if (geteuid() == 0)
- break;
- ngroups = sysconf(_SC_NGROUPS_MAX);
-- if (ngroups > NGROUPS) {
-+ if (ngroups > NGROUPS_MAX) {
- gidsetp = malloc(ngroups * sizeof(gid_t));
- if (!gidsetp) {
- gid2group(id, name);
---
-2.6.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch
deleted file mode 100644
index 6cea548..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From f30e1ada8326463cc0af048afa058bc2f1dc9370 Mon Sep 17 00:00:00 2001
-From: Theodore Ts'o <tytso@mit.edu>
-Date: Tue, 29 Mar 2016 20:48:04 -0400
-Subject: [PATCH] Allow building on systems that do not have rpc header files
-
-Android's bionic C library doesn't have Sun RPC support.
-
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Jan Kara <jack@suse.cz>
----
- Makefile.am | 30 ++++++++++++++++--------------
- quotaops.c | 2 ++
- setquota.c | 2 ++
- 3 files changed, 20 insertions(+), 14 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 6d7ea0e..82db99f 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,7 +1,5 @@
- ACLOCAL_AMFLAGS = -I m4
-
--BUILT_SOURCES = rquota.h rquota.c rquota_clnt.c
--
- docdir = $(datadir)/doc/@PACKAGE@
- doc_DATA = \
- README.mailserver \
-@@ -12,11 +10,6 @@ doc_DATA = \
- doc/quotas.preformated \
- doc/quotas-1.eps
-
--rpcsvcdir = $(includedir)/rpcsvc
--rpcsvc_DATA = \
-- rquota.h \
-- rquota.x
--
- sysconf_DATA = \
- warnquota.conf \
- quotatab \
-@@ -35,15 +28,12 @@ man_MANS = \
- quota.1 \
- quot.8 \
- repquota.8 \
-- rpc.rquotad.8 \
- rquota.3 \
- setquota.8 \
- warnquota.conf.5 \
- warnquota.8 \
- xqmstats.8
-
--CLEANFILES = rquota.c rquota.h rquota_clnt.c
--
- SUBDIRS = po
-
- EXTRA_DIST = \
-@@ -55,9 +45,15 @@ EXTRA_DIST = \
- Changelog \
- ldap-scripts
-
--noinst_LIBRARIES = \
-- libquota.a \
-- librpcclient.a
-+noinst_LIBRARIES = libquota.a
-+
-+if WITH_RPC
-+rpcsvcdir = $(includedir)/rpcsvc
-+rpcsvc_DATA = \
-+ rquota.h \
-+ rquota.x
-+
-+noinst_LIBRARIES += librpcclient.a
-
- librpcclient_a_SOURCES = \
- rquota.c \
-@@ -67,8 +63,10 @@ librpcclient_a_SOURCES = \
- rquota_clnt.c
- librpcclient_a_CFLAGS = -Wno-unused
-
--if WITH_RPC
- RPCLIBS = librpcclient.a
-+BUILT_SOURCES = rquota.h rquota.c rquota_clnt.c
-+CLEANFILES = rquota.c rquota.h rquota_clnt.c
-+man_MANS += rpc.rquotad.8
- endif
-
- libquota_a_SOURCES = \
-@@ -217,6 +215,7 @@ convertquota_LDADD = \
- libquota.a \
- $(RPCLIBS)
-
-+if WITH_RPC
- rpc_rquotad_SOURCES = \
- rquota_server.c \
- rquota_svc.c \
-@@ -225,6 +224,7 @@ rpc_rquotad_LDADD = \
- libquota.a \
- $(WRAP_LIBS) \
- $(RPCLIBS)
-+endif
-
- quota_nld_SOURCES = quota_nld.c
- quota_nld_CFLAGS = \
-@@ -236,6 +236,7 @@ quota_nld_LDADD = \
- $(DBUS_LIBS) \
- $(LIBNL3_LIBS)
-
-+if WITH_RPC
- # ------------------
- # Rpcgen conversions
- # ------------------
-@@ -250,6 +251,7 @@ quota_nld_LDADD = \
- rquota_clnt.c: rquota.x
- @rm -f $@
- @$(RPCGEN) -l -o $@ $<
-+endif
-
- # --------
- # Quotaoff
-diff --git a/quotaops.c b/quotaops.c
-index 47ef9a7..136aec3 100644
---- a/quotaops.c
-+++ b/quotaops.c
-@@ -34,7 +34,9 @@
-
- #include "config.h"
-
-+#if defined(RPC)
- #include <rpc/rpc.h>
-+#endif
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/file.h>
-diff --git a/setquota.c b/setquota.c
-index 51d7b3c..8ecd9c3 100644
---- a/setquota.c
-+++ b/setquota.c
-@@ -7,7 +7,9 @@
-
- #include "config.h"
-
-+#if defined(RPC)
- #include <rpc/rpc.h>
-+#endif
- #include <sys/types.h>
- #include <errno.h>
- #include <stdio.h>
---
-2.6.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch
deleted file mode 100644
index 1455384..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From c7a76237e7a51a69d0236ebfc191e462f805cf4e Mon Sep 17 00:00:00 2001
-From: Lars Wendler <polynomial-c@gentoo.org>
-Date: Mon, 15 Feb 2016 14:42:14 +0100
-Subject: [PATCH] Don't build rpc.rquotad when --disable-rpc was requested.
-
-This fixes a buch of undefined references:
-
-x86_64-pc-linux-gnu-gcc -march=native -mtune=native -O2 -pipe -D_GNU_SOURCE -Wa
-ll -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -pie -Wl,-O1 -Wl,--hash-st
-yle=gnu -Wl,--sort-common -Wl,--as-needed -o rpc.rquotad rquota_server.o rquota_
-svc.o svc_socket.o libquota.a
-rquota_svc.o: In function `rquotaprog_2':
-rquota_svc.c:(.text+0x1d3): undefined reference to `xdr_setquota_rslt'
-rquota_svc.c:(.text+0x1da): undefined reference to `xdr_ext_setquota_args'
-rquota_svc.c:(.text+0x2b2): undefined reference to `xdr_setquota_rslt'
-rquota_svc.c:(.text+0x2b9): undefined reference to `xdr_ext_setquota_args'
-rquota_svc.c:(.text+0x2ff): undefined reference to `xdr_getquota_rslt'
-rquota_svc.c:(.text+0x306): undefined reference to `xdr_ext_getquota_args'
-rquota_svc.c:(.text+0x31a): undefined reference to `xdr_getquota_rslt'
-rquota_svc.c:(.text+0x321): undefined reference to `xdr_ext_getquota_args'
-rquota_svc.o: In function `rquotaprog_1':
-rquota_svc.c:(.text+0x3f3): undefined reference to `xdr_setquota_rslt'
-rquota_svc.c:(.text+0x3fa): undefined reference to `xdr_setquota_args'
-rquota_svc.c:(.text+0x4d2): undefined reference to `xdr_setquota_rslt'
-rquota_svc.c:(.text+0x4d9): undefined reference to `xdr_setquota_args'
-rquota_svc.c:(.text+0x51f): undefined reference to `xdr_getquota_rslt'
-rquota_svc.c:(.text+0x526): undefined reference to `xdr_getquota_args'
-rquota_svc.c:(.text+0x53a): undefined reference to `xdr_getquota_rslt'
-rquota_svc.c:(.text+0x541): undefined reference to `xdr_getquota_args'
-collect2: error: ld returned 1 exit status
-Makefile:901: recipe for target 'rpc.rquotad' failed
-
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
-Signed-off-by: Jan Kara <jack@suse.cz>
----
- Makefile.am | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 77f8400..6d7ea0e 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -116,8 +116,11 @@ sbin_PROGRAMS = \
- xqmstats \
- edquota \
- setquota \
-- convertquota \
-+ convertquota
-+if WITH_RPC
-+sbin_PROGRAMS += \
- rpc.rquotad
-+endif
- if WITH_NETLINK
- sbin_PROGRAMS += \
- quota_nld
---
-2.6.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch
deleted file mode 100644
index bdb4cea..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From c4b56ee58b9b76d2598535cf6109a27b22e60abe Mon Sep 17 00:00:00 2001
-From: Jan Kara <jack@suse.cz>
-Date: Wed, 30 Mar 2016 10:21:13 +0200
-Subject: [PATCH] Fix warnings due to missing stdlib.h
-
-When compiling without RPC, we do not get stdlib.h automatically
-included via other includes and thus miss some function definitions.
-Include stdlib.h explicitely.
-
-Signed-off-by: Jan Kara <jack@suse.cz>
----
- quotaops.c | 1 +
- setquota.c | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/quotaops.c b/quotaops.c
-index 590dc1b..56cf622 100644
---- a/quotaops.c
-+++ b/quotaops.c
-@@ -52,6 +52,7 @@
- #include <time.h>
- #include <ctype.h>
- #include <limits.h>
-+#include <stdlib.h>
-
- #if defined(RPC)
- #include "rquota.h"
-diff --git a/setquota.c b/setquota.c
-index 8ecd9c3..421631e 100644
---- a/setquota.c
-+++ b/setquota.c
-@@ -17,6 +17,7 @@
- #include <getopt.h>
- #include <time.h>
- #include <ctype.h>
-+#include <stdlib.h>
-
- #if defined(RPC)
- #include "rquota.h"
---
-2.6.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch
index 9ca2ffc..4687ca0 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch
@@ -1,20 +1,32 @@
-Replace getrpcbynumber_r with getrpcbynumber
+From a3808fd165847298d025971eb3c7be7d11caba9d Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Wed, 8 Nov 2017 11:56:55 +0200
+Subject: [PATCH] Replace getrpcbynumber_r with getrpcbynumber
+
musl and uclibc dont implement it
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: quota-tools/svc_socket.c
-===================================================================
---- quota-tools.orig/svc_socket.c
-+++ quota-tools/svc_socket.c
-@@ -55,7 +55,8 @@ static int svc_socket (u_long number, in
- addr.sin_family = AF_INET;
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ svc_socket.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/svc_socket.c b/svc_socket.c
+index 8a44604..5bdaaa0 100644
+--- a/svc_socket.c
++++ b/svc_socket.c
+@@ -36,7 +36,8 @@ static int get_service_port(u_long number, const char *proto)
+ struct servent servbuf, *servp = NULL;
+ int ret;
- if (!port) {
-- ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof(rpcdata), &rpcp);
-+ rpcp = getrpcbynumber(number);
-+ ret = 0;
- if (ret == 0 && rpcp != NULL) {
- /* First try name */
- ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata,
+- ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof(rpcdata), &rpcp);
++ rpcp = getrpcbynumber(number);
++ ret = 0;
+ if (ret == 0 && rpcp != NULL) {
+ /* First try name */
+ ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata,
+--
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota_4.03.bb b/import-layers/yocto-poky/meta/recipes-extended/quota/quota_4.03.bb
deleted file mode 100644
index 28b3854..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota_4.03.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem"
-SECTION = "base"
-HOMEPAGE = "http://sourceforge.net/projects/linuxquota/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136"
-LICENSE = "BSD & GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://quota.c;beginline=1;endline=33;md5=331c7d77744bfe0ad24027f0651028ec \
- file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \
- file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \
- file://0001-Fix-build-with-disabled-ldap.patch \
- file://0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch \
- file://fcntl.patch \
- file://remove_non_posix_types.patch \
- file://0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch \
- file://0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch \
- file://0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch \
- file://0004-Fix-warnings-due-to-missing-stdlib.h.patch \
- "
-SRC_URI_append_libc-musl = " file://replace_getrpcbynumber_r.patch"
-
-SRC_URI[md5sum] = "6b09f9c93515c25a528be5754cdfb6f5"
-SRC_URI[sha256sum] = "9c6c4d9ae7bf30506dd2aa3d8056c4ff2f8d087930d7c721616f5c093bdc674b"
-
-CVE_PRODUCT = "linux_diskquota"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/linuxquota/files/quota-tools/"
-UPSTREAM_CHECK_REGEX = "/quota-tools/(?P<pver>(\d+[\.\-_]*)+)/"
-
-DEPENDS = "gettext-native e2fsprogs libnl dbus"
-
-inherit autotools-brokensep gettext pkgconfig
-
-CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-I${STAGING_INCDIR}/tirpc', '', d)}"
-LDFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-ltirpc', '', d)}"
-ASNEEDED = ""
-
-PACKAGECONFIG ??= "tcp-wrappers rpc bsd"
-PACKAGECONFIG_libc-musl = "tcp-wrappers rpc"
-
-PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
-PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc"
-PACKAGECONFIG[bsd] = "--enable-bsd_behaviour=yes,--enable-bsd_behaviour=no,"
-PACKAGECONFIG[ldapmail] = "--enable-ldapmail,--disable-ldapmail,openldap"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota_4.04.bb b/import-layers/yocto-poky/meta/recipes-extended/quota/quota_4.04.bb
new file mode 100644
index 0000000..93f3762
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/quota/quota_4.04.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem"
+SECTION = "base"
+HOMEPAGE = "http://sourceforge.net/projects/linuxquota/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136"
+LICENSE = "BSD & GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://quota.c;beginline=1;endline=33;md5=331c7d77744bfe0ad24027f0651028ec \
+ file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \
+ file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \
+ file://fcntl.patch \
+ file://remove_non_posix_types.patch \
+ "
+SRC_URI_append_libc-musl = " file://replace_getrpcbynumber_r.patch"
+
+SRC_URI[md5sum] = "f46f3b0b5141f032f25684005dac49d3"
+SRC_URI[sha256sum] = "735be1887e7f51f54165e778ae43fc859c04e44d88834ecb2f470e91d4ef8edf"
+
+CVE_PRODUCT = "linux_diskquota"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/linuxquota/files/quota-tools/"
+UPSTREAM_CHECK_REGEX = "/quota-tools/(?P<pver>(\d+[\.\-_]*)+)/"
+
+DEPENDS = "gettext-native e2fsprogs libnl dbus"
+
+inherit autotools-brokensep gettext pkgconfig
+
+CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-I${STAGING_INCDIR}/tirpc', '', d)}"
+LDFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-ltirpc', '', d)}"
+ASNEEDED = ""
+
+PACKAGECONFIG ??= "tcp-wrappers rpc bsd"
+PACKAGECONFIG_libc-musl = "tcp-wrappers rpc"
+
+PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
+PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc"
+PACKAGECONFIG[bsd] = "--enable-bsd_behaviour=yes,--enable-bsd_behaviour=no,"
+PACKAGECONFIG[ldapmail] = "--enable-ldapmail,--disable-ldapmail,openldap"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch b/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch
new file mode 100644
index 0000000..4c23ee0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch
@@ -0,0 +1,30 @@
+From c49a7ea639eb700823e174fd605bbbe183e229aa Mon Sep 17 00:00:00 2001
+From: Steve Dickson <steved@redhat.com>
+Date: Wed, 17 May 2017 10:52:25 -0400
+Subject: [PATCH] pmapproc_dump: Fixed typo in memory leak patch
+
+commit 7ea36eee introduce a typo that caused
+NIS (aka ypbind) to fail.
+
+Signed-off-by: Steve Dickson <steved@redhat.com>
+
+Upstream-Status: Backport
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ src/pmap_svc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: rpcbind-0.2.4/src/pmap_svc.c
+===================================================================
+--- rpcbind-0.2.4.orig/src/pmap_svc.c
++++ rpcbind-0.2.4/src/pmap_svc.c
+@@ -384,7 +384,7 @@ pmapproc_dump(struct svc_req *rqstp /*__
+ }
+
+ done:
+- if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)NULL)) {
++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_void, (char *)NULL)) {
+ if (debugging) {
+ /*(void) xlog(LOG_DEBUG, "unable to free arguments\n");*/
+ if (doabort) {
diff --git a/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch b/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch
new file mode 100644
index 0000000..9a000d0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch
@@ -0,0 +1,100 @@
+From 7c7590ad536c0e24bef790cb1e65702fc54db566 Mon Sep 17 00:00:00 2001
+From: Steve Dickson <steved@redhat.com>
+Date: Tue, 30 May 2017 11:27:22 -0400
+Subject: [PATCH] rpcbproc_callit_com: Stop freeing a static pointer
+
+commit 7ea36ee introduced a svc_freeargs() call
+that ended up freeing static pointer.
+
+It turns out the allocations for the rmt_args
+is not necessary . The xdr routines (xdr_bytes) will
+handle the memory management and the largest
+possible message size is UDPMSGSIZE (due to UDP only)
+which is smaller than RPC_BUF_MAX
+
+Signed-off-by: Steve Dickson <steved@redhat.com>
+
+Upstream-Status: Backport
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ src/rpcb_svc_com.c | 39 ++++++---------------------------------
+ 1 file changed, 6 insertions(+), 33 deletions(-)
+
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index cb63afd..1fc2229 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -612,9 +612,9 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
+ struct netconfig *nconf;
+ struct netbuf *caller;
+ struct r_rmtcall_args a;
+- char *buf_alloc = NULL, *outbufp;
++ char *outbufp;
+ char *outbuf_alloc = NULL;
+- char buf[RPC_BUF_MAX], outbuf[RPC_BUF_MAX];
++ char outbuf[RPC_BUF_MAX];
+ struct netbuf *na = (struct netbuf *) NULL;
+ struct rpc_msg call_msg;
+ int outlen;
+@@ -635,36 +635,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
+ }
+ if (si.si_socktype != SOCK_DGRAM)
+ return; /* Only datagram type accepted */
+- sendsz = __rpc_get_t_size(si.si_af, si.si_proto, UDPMSGSIZE);
+- if (sendsz == 0) { /* data transfer not supported */
+- if (reply_type == RPCBPROC_INDIRECT)
+- svcerr_systemerr(transp);
+- return;
+- }
+- /*
+- * Should be multiple of 4 for XDR.
+- */
+- sendsz = ((sendsz + 3) / 4) * 4;
+- if (sendsz > RPC_BUF_MAX) {
+-#ifdef notyet
+- buf_alloc = alloca(sendsz); /* not in IDR2? */
+-#else
+- buf_alloc = malloc(sendsz);
+-#endif /* notyet */
+- if (buf_alloc == NULL) {
+- if (debugging)
+- xlog(LOG_DEBUG,
+- "rpcbproc_callit_com: No Memory!\n");
+- if (reply_type == RPCBPROC_INDIRECT)
+- svcerr_systemerr(transp);
+- return;
+- }
+- a.rmt_args.args = buf_alloc;
+- } else {
+- a.rmt_args.args = buf;
+- }
++ sendsz = UDPMSGSIZE;
+
+ call_msg.rm_xid = 0; /* For error checking purposes */
++ memset(&a, 0, sizeof(a)); /* Zero out the input buffer */
+ if (!svc_getargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) {
+ if (reply_type == RPCBPROC_INDIRECT)
+ svcerr_decode(transp);
+@@ -704,7 +678,8 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
+ if (rbl == (rpcblist_ptr)NULL) {
+ #ifdef RPCBIND_DEBUG
+ if (debugging)
+- xlog(LOG_DEBUG, "not found\n");
++ xlog(LOG_DEBUG, "prog %lu vers %lu: not found\n",
++ a.rmt_prog, a.rmt_vers);
+ #endif
+ if (reply_type == RPCBPROC_INDIRECT)
+ svcerr_noprog(transp);
+@@ -937,8 +912,6 @@ out:
+ }
+ if (local_uaddr)
+ free(local_uaddr);
+- if (buf_alloc)
+- free(buf_alloc);
+ if (outbuf_alloc)
+ free(outbuf_alloc);
+ if (na) {
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind_0.2.4.bb b/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind_0.2.4.bb
index 60e46ed..dcdee6c 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind_0.2.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind_0.2.4.bb
@@ -16,6 +16,8 @@
file://rpcbind.socket \
file://rpcbind.service \
file://0001-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch \
+ file://pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch \
+ file://rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch \
"
SRC_URI[md5sum] = "cf10cd41ed8228fc54c316191c1f07fe"
SRC_URI[sha256sum] = "074a9a530dc7c11e0d905aa59bcb0847c009313f02e98d3d798aa9568f414c66"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch b/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch
index e8db12c..1274b27 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch
@@ -9,7 +9,8 @@
We rarely use "yes;" to name build dir, so s/yes/yes;/g
could fix the issue
-Upstream-Status: Pending
+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>
---
diff --git a/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch b/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch
index b5d71cc..a01dc24 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch
@@ -15,19 +15,16 @@
src/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/src/Makefile.in b/src/Makefile.in
-index e791e79..d4f7c0b 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -113,7 +113,7 @@ term.h: term.c term.sh
-
- kmapdef.c: term.h
+Index: screen-4.6.1/Makefile.in
+===================================================================
+--- screen-4.6.1.orig/Makefile.in
++++ screen-4.6.1/Makefile.in
+@@ -133,7 +133,7 @@ kmapdef.c: term.h
+ tty.c: tty.sh
+ sh $(srcdir)/tty.sh tty.c
-comm.h: comm.c comm.sh config.h
+comm.h: comm.c comm.sh config.h term.h
AWK=$(AWK) CC="$(CC) $(CFLAGS)" srcdir=${srcdir} sh $(srcdir)/comm.sh
- docs:
---
-2.4.1
-
+ osdef.h: osdef.sh config.h osdef.h.in
diff --git a/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.6.1.bb b/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.6.1.bb
deleted file mode 100644
index bcd83a2..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.6.1.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Multiplexing terminal manager"
-DESCRIPTION = "Screen is a full-screen window manager \
-that multiplexes a physical terminal between several \
-processes, typically interactive shells."
-HOMEPAGE = "http://www.gnu.org/software/screen/"
-BUGTRACKER = "https://savannah.gnu.org/bugs/?func=additem&group=screen"
-
-SECTION = "console/utils"
-
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://screen.h;endline=26;md5=3971142989289a8198a544220703c2bf"
-
-DEPENDS = "ncurses \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-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 \
- "
-
-SRC_URI[md5sum] = "132c893aabfaf2020074790215c8cacd"
-SRC_URI[sha256sum] = "aba9af66cb626155d6abce4703f45cce0e30a5114a368bd6387c966cbbbb7c64"
-
-inherit autotools texinfo
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[utempter] = "ac_cv_header_utempter_h=yes,ac_cv_header_utempter_h=no,libutempter,"
-
-EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
-
-do_install_append () {
- if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
- install -D -m 644 ${WORKDIR}/screen.pam ${D}/${sysconfdir}/pam.d/screen
- fi
-}
-
-pkg_postinst_${PN} () {
- grep -q "^${bindir}/screen$" $D${sysconfdir}/shells || echo ${bindir}/screen >> $D${sysconfdir}/shells
-}
-
-pkg_postrm_${PN} () {
- printf "$(grep -v "^${bindir}/screen$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.6.2.bb b/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.6.2.bb
new file mode 100644
index 0000000..7a33c31
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.6.2.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Multiplexing terminal manager"
+DESCRIPTION = "Screen is a full-screen window manager \
+that multiplexes a physical terminal between several \
+processes, typically interactive shells."
+HOMEPAGE = "http://www.gnu.org/software/screen/"
+BUGTRACKER = "https://savannah.gnu.org/bugs/?func=additem&group=screen"
+
+SECTION = "console/utils"
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://screen.h;endline=26;md5=3971142989289a8198a544220703c2bf"
+
+DEPENDS = "ncurses \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+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 \
+ "
+
+SRC_URI[md5sum] = "a0f529d3333b128dfaa324d978ba73a8"
+SRC_URI[sha256sum] = "1b6922520e6a0ce5e28768d620b0f640a6631397f95ccb043b70b91bb503fa3a"
+
+inherit autotools texinfo
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[utempter] = "ac_cv_header_utempter_h=yes,ac_cv_header_utempter_h=no,libutempter,"
+
+EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
+
+do_install_append () {
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+ install -D -m 644 ${WORKDIR}/screen.pam ${D}/${sysconfdir}/pam.d/screen
+ fi
+}
+
+pkg_postinst_${PN} () {
+ grep -q "^${bindir}/screen$" $D${sysconfdir}/shells || echo ${bindir}/screen >> $D${sysconfdir}/shells
+}
+
+pkg_postrm_${PN} () {
+ printf "$(grep -v "^${bindir}/screen$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sed/sed_4.2.2.bb b/import-layers/yocto-poky/meta/recipes-extended/sed/sed_4.2.2.bb
index e31bec2..f10e365 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/sed/sed_4.2.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/sed/sed_4.2.2.bb
@@ -42,6 +42,12 @@
do_install_ptest() {
oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
+ sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ -i ${D}${PTEST_PATH}/${TESTDIR}/Makefile
}
RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sed', '', d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/shadow/shadow.inc b/import-layers/yocto-poky/meta/recipes-extended/shadow/shadow.inc
index cc18964..673207f 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/shadow/shadow.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/shadow/shadow.inc
@@ -6,8 +6,7 @@
LIC_FILES_CHKSUM = "file://COPYING;md5=ed80ff1c2b40843cf5768e5229cf16e5 \
file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661"
-DEPENDS_class-native = ""
-DEPENDS_class-nativesdk = ""
+DEPENDS = "virtual/crypt"
SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.xz \
file://shadow-4.1.3-dots-in-usernames.patch \
@@ -190,7 +189,7 @@
ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8"
PACKAGE_WRITE_DEPS += "shadow-native"
-pkg_postinst_${PN} () {
+pkg_postinst_${PN}_class-target () {
if [ "x$D" != "x" ]; then
rootarg="--root $D"
else
diff --git a/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.3.1a.bb b/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.3.1a.bb
deleted file mode 100644
index 0585c14..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.3.1a.bb
+++ /dev/null
@@ -1,81 +0,0 @@
-SUMMARY = "The shared library for the S-Lang extension language"
-
-DESCRIPTION = "S-Lang is an interpreted language and a programming library. The \
-S-Lang language was designed so that it can be easily embedded into \
-a program to provide the program with a powerful extension language. \
-The S-Lang library, provided in this package, provides the S-Lang \
-extension language. S-Lang's syntax resembles C, which makes it easy \
-to recode S-Lang procedures in C if you need to."
-
-HOMEPAGE = "http://www.jedsoft.org/slang/"
-SECTION = "libs"
-DEPENDS = "ncurses virtual/libiconv"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
-
-SRC_URI = "http://www.jedsoft.org/releases/${BPN}/${BP}.tar.bz2 \
- file://no-x.patch \
- file://dont-link-to-host.patch \
- file://test-add-output-in-the-format-result-testname.patch \
- file://terminfo_fixes.patch \
- file://run-ptest \
- "
-
-SRC_URI[md5sum] = "c5235313042ed0e71ec708f7b85ec241"
-SRC_URI[sha256sum] = "54f0c3007fde918039c058965dffdfd6c5aec0bad0f4227192cc486021f08c36"
-
-UPSTREAM_CHECK_URI = "http://www.jedsoft.org/releases/slang/"
-PREMIRRORS_append = "\n http://www.jedsoft.org/releases/slang/.* http://www.jedsoft.org/releases/slang/old/ \n"
-
-inherit autotools-brokensep ptest
-CLEANBROKEN = "1"
-
-EXTRA_OECONF = "--without-onig"
-# There's no way to turn off rpaths and slang will -rpath to the default search
-# path. Unset RPATH to stop this.
-EXTRA_OEMAKE = "RPATH=''"
-
-PACKAGECONFIG ??= "pcre"
-PACKAGECONFIG[pcre] = "--with-pcre=${STAGING_DIR_HOST}${prefix},--without-pcre,pcre"
-PACKAGECONFIG[png] = "--with-png=${STAGING_DIR_HOST}${prefix},--without-png,libpng"
-PACKAGECONFIG[zlib] = "--with-z=${STAGING_DIR_HOST}${prefix},--without-z,zlib"
-
-do_configure_prepend() {
- cd ${S}/autoconf
- # slang keeps configure.ac and rest of autoconf files in autoconf/ directory
- # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac}
- # to be present. Resulting files land in autoconf/autoconf/ so we need to move them.
- gnu-configize --force && mv autoconf/config.* .
- # For the same reason we also need to run autoconf manually.
- autoconf && mv configure ..
- cd ${B}
-}
-
-do_compile_ptest() {
- oe_runmake -C src static
- oe_runmake -C src/test sltest
-}
-
-do_install_ptest() {
- mkdir ${D}${PTEST_PATH}/test
- for f in Makefile sltest runtests.sh *.sl *.inc; do
- cp ${S}/src/test/$f ${D}${PTEST_PATH}/test/
- done
- sed -e 's/\ \$(TEST_PGM)\.c\ assoc\.c\ list\.c\ \$(SLANGLIB)\/libslang\.a//' \
- -e '/\$(CC).*(TEST_PGM)/d' \
- -i ${D}${PTEST_PATH}/test/Makefile
-
- cp ${S}/slsh/lib/require.sl ${D}${PTEST_PATH}/test/
- sed -i 's/\.\.\/\.\.\/slsh\/lib\/require\.sl/require\.sl/' ${D}${PTEST_PATH}/test/req.sl
-
- cp ${S}/doc/text/slangfun.txt ${D}${PTEST_PATH}/test/
- sed -i 's/\.\.\/\.\.\/doc\/text\/slangfun\.txt/slangfun\.txt/' ${D}${PTEST_PATH}/test/docfun.sl
-}
-
-FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/"
-
-PARALLEL_MAKE = ""
-PARALLEL_MAKEINST = ""
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.3.2.bb b/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.3.2.bb
new file mode 100644
index 0000000..87fd41a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.3.2.bb
@@ -0,0 +1,81 @@
+SUMMARY = "The shared library for the S-Lang extension language"
+
+DESCRIPTION = "S-Lang is an interpreted language and a programming library. The \
+S-Lang language was designed so that it can be easily embedded into \
+a program to provide the program with a powerful extension language. \
+The S-Lang library, provided in this package, provides the S-Lang \
+extension language. S-Lang's syntax resembles C, which makes it easy \
+to recode S-Lang procedures in C if you need to."
+
+HOMEPAGE = "http://www.jedsoft.org/slang/"
+SECTION = "libs"
+DEPENDS = "ncurses virtual/libiconv"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
+
+SRC_URI = "http://www.jedsoft.org/releases/${BPN}/${BP}.tar.bz2 \
+ file://no-x.patch \
+ file://dont-link-to-host.patch \
+ file://test-add-output-in-the-format-result-testname.patch \
+ file://terminfo_fixes.patch \
+ file://run-ptest \
+ "
+
+SRC_URI[md5sum] = "c2d5a7aa0246627da490be4e399c87cb"
+SRC_URI[sha256sum] = "fc9e3b0fc4f67c3c1f6d43c90c16a5c42d117b8e28457c5b46831b8b5d3ae31a"
+
+UPSTREAM_CHECK_URI = "http://www.jedsoft.org/releases/slang/"
+PREMIRRORS_append = "\n http://www.jedsoft.org/releases/slang/.* http://www.jedsoft.org/releases/slang/old/ \n"
+
+inherit autotools-brokensep ptest
+CLEANBROKEN = "1"
+
+EXTRA_OECONF = "--without-onig"
+# There's no way to turn off rpaths and slang will -rpath to the default search
+# path. Unset RPATH to stop this.
+EXTRA_OEMAKE = "RPATH=''"
+
+PACKAGECONFIG ??= "pcre"
+PACKAGECONFIG[pcre] = "--with-pcre=${STAGING_DIR_HOST}${prefix},--without-pcre,pcre"
+PACKAGECONFIG[png] = "--with-png=${STAGING_DIR_HOST}${prefix},--without-png,libpng"
+PACKAGECONFIG[zlib] = "--with-z=${STAGING_DIR_HOST}${prefix},--without-z,zlib"
+
+do_configure_prepend() {
+ cd ${S}/autoconf
+ # slang keeps configure.ac and rest of autoconf files in autoconf/ directory
+ # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac}
+ # to be present. Resulting files land in autoconf/autoconf/ so we need to move them.
+ gnu-configize --force && mv autoconf/config.* .
+ # For the same reason we also need to run autoconf manually.
+ autoconf && mv configure ..
+ cd ${B}
+}
+
+do_compile_ptest() {
+ oe_runmake -C src static
+ oe_runmake -C src/test sltest
+}
+
+do_install_ptest() {
+ mkdir ${D}${PTEST_PATH}/test
+ for f in Makefile sltest runtests.sh *.sl *.inc; do
+ cp ${S}/src/test/$f ${D}${PTEST_PATH}/test/
+ done
+ sed -e 's/\ \$(TEST_PGM)\.c\ assoc\.c\ list\.c\ \$(SLANGLIB)\/libslang\.a//' \
+ -e '/\$(CC).*(TEST_PGM)/d' \
+ -i ${D}${PTEST_PATH}/test/Makefile
+
+ cp ${S}/slsh/lib/require.sl ${D}${PTEST_PATH}/test/
+ sed -i 's/\.\.\/\.\.\/slsh\/lib\/require\.sl/require\.sl/' ${D}${PTEST_PATH}/test/req.sl
+
+ cp ${S}/doc/text/slangfun.txt ${D}${PTEST_PATH}/test/
+ sed -i 's/\.\.\/\.\.\/doc\/text\/slangfun\.txt/slangfun\.txt/' ${D}${PTEST_PATH}/test/docfun.sl
+}
+
+FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/"
+
+PARALLEL_MAKE = ""
+PARALLEL_MAKEINST = ""
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch b/import-layers/yocto-poky/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch
deleted file mode 100644
index 032995d..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-This patch fixies the wrong return code of stat -h.
-
-Upstream-Status: Pending
-Signed-off-by: Zhangle Yang <zhangle.yang@windriver.com>
-
---- stat-3.3/stat.c.orig 2013-08-22 10:49:45.000000000 +0800
-+++ stat-3.3/stat.c 2013-08-22 10:50:31.000000000 +0800
-@@ -845,7 +845,7 @@
- fprintf(stderr, "\t\t%%S - Security ID in SE-Linux\n");
- fprintf(stderr, "\t\t%%C - Security context in SE-Linux\n");
- fprintf(stderr, "\t\t%%d - Free file nodes in file system\n");
-- exit(1);
-+ exit(0);
- }
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/stat/stat-3.3/fix-security-format.patch b/import-layers/yocto-poky/meta/recipes-extended/stat/stat-3.3/fix-security-format.patch
deleted file mode 100644
index 0c01ed0..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/stat/stat-3.3/fix-security-format.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-stat: Fixing security formatting issues
-
-Fix security formatting issues related to printf without NULL argument
-
-stat.c: In function 'print_human_access':
-stat.c:292:13: error: format not a string literal and no format arguments [-Werror=format-security]
- printf (access);
- ^
-stat.c: In function 'print_human_time':
-stat.c:299:57: error: format not a string literal and no format arguments [-Werror=format-security]
- if (strftime(str, 40, "%c", localtime(t)) > 0) printf(str);
- ^
-stat.c: In function 'print_it':
-stat.c:613:6: error: format not a string literal and no format arguments [-Werror=format-security]
- printf(b);
- ^
-stat.c:642:6: error: format not a string literal and no format arguments [-Werror=format-security]
- printf(b);
- ^
-
-[YOCTO #9550]
-[https://bugzilla.yoctoproject.org/show_bug.cgi?id=9550]
-
-Upstream-Status: Pending
-
-Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@intel.com>
-
-diff --git a/stat.c b/stat.c
-index 1ed07a9..2be6f62 100644
---- a/stat.c
-+++ b/stat.c
-@@ -289,15 +289,15 @@ void print_human_access(struct stat *statbuf)
- default:
- access[0] = '?';
- }
-- printf (access);
-+ fputs(access,stdout);
- }
-
- void print_human_time(time_t *t)
- {
- char str[40];
-
-- if (strftime(str, 40, "%c", localtime(t)) > 0) printf(str);
-- else printf("Cannot calculate human readable time, sorry");
-+ if (strftime(str, 40, "%c", localtime(t)) > 0) fputs(str,stdout);
-+ else fputs("Cannot calculate human readable time, sorry",stdout);
- }
-
- /* print statfs info */
-@@ -610,7 +610,7 @@ void print_it(char *masterformat, char *filename,
- {
- strcpy (pformat, "%");
- *m++ = '\0';
-- printf(b);
-+ fputs(b,stdout);
-
- /* copy all format specifiers to our format string */
- while (isdigit(*m) || strchr("#0-+. I", *m))
-@@ -639,7 +639,7 @@ void print_it(char *masterformat, char *filename,
- }
- else
- {
-- printf(b);
-+ fputs(b,stdout);
- b = NULL;
- }
- }
diff --git a/import-layers/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb b/import-layers/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb
deleted file mode 100644
index 8ac8e89..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Command line file status display utility"
-HOMEPAGE = "http://www.ibiblio.org/pub/Linux/utils/file/"
-DESCRIPTION = "Displays all information about a file that the stat() call provides and all information about a filesystem that statfs() provides."
-SECTION = "console/utils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=39886b077fd072e876e5c4c16310b631 \
- file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-SRC_URI = "http://www.ibiblio.org/pub/Linux/utils/file/${BP}.tar.gz \
- file://fix-security-format.patch \
- file://fix-error-return.patch"
-
-SRC_URI[md5sum] = "37e247e8e400ad9205f1b0500b728fd3"
-SRC_URI[sha256sum] = "7071f0384a423a938dd542c1f08547a02824f6359acd3ef3f944b2c4c2d1ee09"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-do_install() {
- install -d ${D}${base_bindir} ${D}${mandir}/man1
- install -m 755 stat ${D}${base_bindir}/stat.stat
- install -m 644 stat.1 ${D}${mandir}/man1
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_${PN} = "stat"
-ALTERNATIVE_PRIORITY[stat] = "200"
-ALTERNATIVE_LINK_NAME[stat] = "${base_bindir}/stat"
-ALTERNATIVE_TARGET[stat] = "${base_bindir}/stat.stat"
-
-ALTERNATIVE_${PN}-doc = "stat.1"
-ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
-
-BBCLASSEXTEND = "native"
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo.inc b/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo.inc
index 80ec0ae..362bd3a 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo.inc
@@ -4,8 +4,8 @@
BUGTRACKER = "http://www.sudo.ws/bugs/"
SECTION = "admin"
LICENSE = "ISC & BSD & Zlib"
-LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=652fb4334c13b511597d7940ef8b3323 \
- file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=cfe41112f96c19a074934d128f45c693 \
+LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=7765a3d787cb4fed3ccc3c9cee030af9 \
+ file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=805782a8466975716f8376b2be9aedde \
file://lib/util/reallocarray.c;beginline=3;endline=16;md5=85b0905b795d4d58bf2e00635649eec6 \
file://lib/util/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \
file://lib/util/getcwd.c;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.20p2.bb b/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.20p2.bb
deleted file mode 100644
index 4f24b3c..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.20p2.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-require sudo.inc
-
-SRC_URI = "http://ftp.sudo.ws/sudo/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 \
- "
-
-PAM_SRC_URI = "file://sudo.pam"
-
-SRC_URI[md5sum] = "03da8e711caca6fd93e57751bfb74adc"
-SRC_URI[sha256sum] = "bd42ae1059e935f795c69ea97b3de09fe9410a58a74b5d5e6836eb5067a445d9"
-
-DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
-
-EXTRA_OECONF += " \
- ac_cv_type_rsize_t=no \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \
- "
-
-do_install_append () {
- if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
- install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
- fi
-
- chmod 4111 ${D}${bindir}/sudo
- chmod 0440 ${D}${sysconfdir}/sudoers
-
- # Explicitly remove the ${localstatedir}/run directory to avoid QA error
- rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo
-}
-
-FILES_${PN} += "${libdir}/tmpfiles.d"
-FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} ${libexecdir}/${BPN}/*.la \
- ${libexecdir}/lib*${SOLIBSDEV} ${libexecdir}/*.la"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.22.bb b/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.22.bb
new file mode 100644
index 0000000..9150178
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.22.bb
@@ -0,0 +1,36 @@
+require sudo.inc
+
+SRC_URI = "http://ftp.sudo.ws/sudo/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 \
+ "
+
+PAM_SRC_URI = "file://sudo.pam"
+
+SRC_URI[md5sum] = "24abdea48db4c5abcd410167c801cc8c"
+SRC_URI[sha256sum] = "7256cb27c20883b14360eddbd17f98922073d104b214cf65aeacf1d9c9b9fd02"
+
+DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
+
+EXTRA_OECONF += " \
+ ac_cv_type_rsize_t=no \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \
+ "
+
+do_install_append () {
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+ install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
+ fi
+
+ chmod 4111 ${D}${bindir}/sudo
+ chmod 0440 ${D}${sysconfdir}/sudoers
+
+ # Explicitly remove the ${localstatedir}/run directory to avoid QA error
+ rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo
+}
+
+FILES_${PN} += "${libdir}/tmpfiles.d"
+FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} ${libexecdir}/${BPN}/*.la \
+ ${libexecdir}/lib*${SOLIBSDEV} ${libexecdir}/*.la"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sysklogd/files/no-strip-install.patch b/import-layers/yocto-poky/meta/recipes-extended/sysklogd/files/no-strip-install.patch
index 00fba71..d426c83 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/sysklogd/files/no-strip-install.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/sysklogd/files/no-strip-install.patch
@@ -1,10 +1,10 @@
Upstream-Status: Inappropriate [configuration]
-Index: sysklogd-1.5/Makefile
+Index: sysklogd-1.5.1/Makefile
===================================================================
---- sysklogd-1.5.orig/Makefile 2009-06-09 13:02:41.000000000 +0200
-+++ sysklogd-1.5/Makefile 2009-06-09 13:03:06.000000000 +0200
-@@ -127,8 +127,8 @@
+--- sysklogd-1.5.1.orig/Makefile
++++ sysklogd-1.5.1/Makefile
+@@ -127,8 +127,8 @@ clobber: clean
rm -f syslogd klogd ksym syslog_tst oops_test TAGS tsyslogd tklogd
install_exec: syslogd klogd
@@ -14,4 +14,4 @@
+ ${INSTALL} -m 500 klogd ${BINDIR}/klogd
install_man:
- ${INSTALL} -m ${MAN_PERMS} sysklogd.8 ${MANDIR}/man8/sysklogd.8
+ ${INSTALL} -o ${MAN_USER} -g ${MAN_GROUP} -m ${MAN_PERMS} sysklogd.8 ${MANDIR}/man8/sysklogd.8
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch
index c126523..1b63299 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch
@@ -21,10 +21,10 @@
sa_common.c | 1 +
3 files changed, 3 insertions(+)
-diff --git a/common.c b/common.c
-index a23155b..ad86446 100644
---- a/common.c
-+++ b/common.c
+Index: sysstat-11.7.1/common.c
+===================================================================
+--- sysstat-11.7.1.orig/common.c
++++ sysstat-11.7.1/common.c
@@ -20,6 +20,7 @@
*/
@@ -32,11 +32,11 @@
+#include <limits.h>
#include <string.h>
#include <stdlib.h>
- #include <time.h>
-diff --git a/ioconf.c b/ioconf.c
-index 7d88c5d..6d67691 100644
---- a/ioconf.c
-+++ b/ioconf.c
+ #include <stdarg.h>
+Index: sysstat-11.7.1/ioconf.c
+===================================================================
+--- sysstat-11.7.1.orig/ioconf.c
++++ sysstat-11.7.1/ioconf.c
@@ -27,6 +27,7 @@
#include <errno.h>
#include <dirent.h>
@@ -45,10 +45,10 @@
#include "ioconf.h"
#include "common.h"
-diff --git a/sa_common.c b/sa_common.c
-index b7351d9..c9e3299 100644
---- a/sa_common.c
-+++ b/sa_common.c
+Index: sysstat-11.7.1/sa_common.c
+===================================================================
+--- sysstat-11.7.1.orig/sa_common.c
++++ sysstat-11.7.1/sa_common.c
@@ -20,6 +20,7 @@
*/
@@ -56,7 +56,4 @@
+#include <limits.h>
#include <string.h>
#include <stdlib.h>
- #include <time.h>
---
-2.5.2
-
+ #include <stdint.h>
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.5.7.bb b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.5.7.bb
deleted file mode 100644
index 72af931..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.5.7.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require sysstat.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb"
-
-SRC_URI += "file://0001-Include-needed-headers-explicitly.patch"
-
-SRC_URI[md5sum] = "8f4a5d0de29f1056153e25e7a9c518d2"
-SRC_URI[sha256sum] = "4a38efaa0ca85ee5484d046bd427012979264fef17f07fd7855860e592819482"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.7.1.bb b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.7.1.bb
new file mode 100644
index 0000000..86738e7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.7.1.bb
@@ -0,0 +1,8 @@
+require sysstat.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb"
+
+SRC_URI += "file://0001-Include-needed-headers-explicitly.patch"
+
+SRC_URI[md5sum] = "bdcda7c9048c7c22fb1f30f75285d13d"
+SRC_URI[sha256sum] = "303a595b1af0330b183a0f1febfccf89f183b9575ae0562b91fdb876f3ef1feb"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tar/tar/CVE-2016-6321.patch b/import-layers/yocto-poky/meta/recipes-extended/tar/tar/CVE-2016-6321.patch
deleted file mode 100644
index 6d35bcc..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/tar/tar/CVE-2016-6321.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 7340f67b9860ea0531c1450e5aa261c50f67165d Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
-Date: Sat, 29 Oct 2016 21:04:40 -0700
-Subject: [PATCH] When extracting, skip ".." members
-
-* NEWS: Document this.
-* src/extract.c (extract_archive): Skip members whose names
-contain "..".
-
-CVE: CVE-2016-6321
-Upstream-Status: Backport
-
-Cherry picked from commit: 7340f67 When extracting, skip ".." members
-
-Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
----
- NEWS | 8 +++++++-
- src/extract.c | 8 ++++++++
- 2 files changed, 15 insertions(+), 1 deletion(-)
-
-diff --git a/NEWS b/NEWS
-index 501164a..fc97cfc 100644
---- a/NEWS
-+++ b/NEWS
-@@ -1,6 +1,12 @@
--GNU tar NEWS - User visible changes. 2016-05-16
-+GNU tar NEWS - User visible changes. 2016-10-29
- Please send GNU tar bug reports to <bug-tar@gnu.org>
-
-+* Member names containing '..' components are now skipped when extracting.
-+
-+This fixes tar's behavior to match its documentation, and is a bit
-+safer when extracting untrusted archives over old files (an unsafe
-+practice that the tar manual has long recommended against).
-+
-
- version 1.29 - Sergey Poznyakoff, 2016-05-16
-
-diff --git a/src/extract.c b/src/extract.c
-index f982433..7904148 100644
---- a/src/extract.c
-+++ b/src/extract.c
-@@ -1629,12 +1629,20 @@ extract_archive (void)
- {
- char typeflag;
- tar_extractor_t fun;
-+ bool skip_dotdot_name;
-
- fatal_exit_hook = extract_finish;
-
- set_next_block_after (current_header);
-
-+ skip_dotdot_name = (!absolute_names_option
-+ && contains_dot_dot (current_stat_info.orig_file_name));
-+ if (skip_dotdot_name)
-+ ERROR ((0, 0, _("%s: Member name contains '..'"),
-+ quotearg_colon (current_stat_info.orig_file_name)));
-+
- if (!current_stat_info.file_name[0]
-+ || skip_dotdot_name
- || (interactive_option
- && !confirm ("extract", current_stat_info.file_name)))
- {
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tar/tar/musl_dirent.patch b/import-layers/yocto-poky/meta/recipes-extended/tar/tar/musl_dirent.patch
index b0dc16c..2d98ed1 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/tar/tar/musl_dirent.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/tar/tar/musl_dirent.patch
@@ -14,6 +14,6 @@
- linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
+ linux*-gnu*|linux*-musl*)
+ gl_cv_struct_dirent_d_ino="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;;
# If we don't know, assume the worst.
- *) gl_cv_struct_dirent_d_ino="guessing no" ;;
- esac
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.29.bb b/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.29.bb
deleted file mode 100644
index f22d9c9..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.29.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require tar.inc
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[acl] = "--with-posix-acls, --without-posix-acls, acl,"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI += "file://remove-gets.patch \
- file://musl_dirent.patch \
- file://CVE-2016-6321.patch \
- "
-SRC_URI[md5sum] = "955cd533955acb1804b83fd70218da51"
-SRC_URI[sha256sum] = "236b11190c0a3a6885bdb8d61424f2b36a5872869aa3f7f695dea4b4843ae2f2"
-
-do_install_append_libc-musl() {
- rm -f ${D}${libdir}/charset.alias
- rmdir ${D}${libdir}
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.30.bb b/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.30.bb
new file mode 100644
index 0000000..e743a6d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.30.bb
@@ -0,0 +1,18 @@
+require tar.inc
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[acl] = "--with-posix-acls, --without-posix-acls, acl,"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI += "file://remove-gets.patch \
+ file://musl_dirent.patch \
+ "
+SRC_URI[md5sum] = "8404e4c1fc5a3000228ab2b8ad674a65"
+SRC_URI[sha256sum] = "87592b86cb037c554375f5868bdd3cc57748aef38d6cb741c81065f0beac63b7"
+
+do_install_append_libc-musl() {
+ rm -f ${D}${libdir}/charset.alias
+ rmdir ${D}${libdir}
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch b/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch
new file mode 100644
index 0000000..9d1e05d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch
@@ -0,0 +1,65 @@
+From 7f8878ac1aaf4a19992d39379797c151301bedb1 Mon Sep 17 00:00:00 2001
+From: Oleksiy Obitotskyy <oobitots@cisco.com>
+Date: Mon, 5 Feb 2018 08:29:10 -0800
+Subject: [PATCH] Fix build with clang
+
+Fix "error: non-void function 'fix_options' should return a value".
+Add function prototype to tcpd.c and miscd.c.
+
+Upstream-Status: Pending
+
+Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
+---
+ v2 - add function prototypes
+
+ fix_options.c | 2 +-
+ miscd.c | 4 ++++
+ tcpd.c | 4 ++++
+ 3 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/fix_options.c b/fix_options.c
+index b5e81b8..9958ff4 100644
+--- a/fix_options.c
++++ b/fix_options.c
+@@ -29,7 +29,7 @@ static char sccsid[] = "@(#) fix_options.c 1.6 97/04/08 02:29:19";
+
+ /* fix_options - get rid of IP-level socket options */
+
+-fix_options(request)
++void fix_options(request)
+ struct request_info *request;
+ {
+ #ifdef IP_OPTIONS
+diff --git a/miscd.c b/miscd.c
+index 1ab835c..723b83a 100644
+--- a/miscd.c
++++ b/miscd.c
+@@ -40,6 +40,10 @@ static char sccsid[] = "@(#) miscd.c 1.10 96/02/11 17:01:30";
+ #include "patchlevel.h"
+ #include "tcpd.h"
+
++#ifdef KILL_IP_OPTIONS
++void fix_options(struct request_info *);
++#endif
++
+ int allow_severity = SEVERITY; /* run-time adjustable */
+ int deny_severity = LOG_WARNING; /* ditto */
+
+diff --git a/tcpd.c b/tcpd.c
+index d865b9c..a179891 100644
+--- a/tcpd.c
++++ b/tcpd.c
+@@ -38,6 +38,10 @@ static char sccsid[] = "@(#) tcpd.c 1.10 96/02/11 17:01:32";
+ #include "patchlevel.h"
+ #include "tcpd.h"
+
++#ifdef KILL_IP_OPTIONS
++void fix_options(struct request_info *);
++#endif
++
+ int allow_severity = SEVERITY; /* run-time adjustable */
+ int deny_severity = LOG_WARNING; /* ditto */
+
+--
+2.10.3.dirty
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch b/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch
index e8289e4..d473fb6 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch
@@ -1,9 +1,10 @@
Upstream-Status: Backport
-diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
---- tcp_wrappers_7.6.orig/Makefile 2003-08-21 01:43:39.000000000 +0200
-+++ tcp_wrappers_7.6/Makefile 2003-08-21 01:43:35.000000000 +0200
-@@ -45,7 +45,7 @@
+Index: tcp_wrappers_7.6/Makefile
+===================================================================
+--- tcp_wrappers_7.6.orig/Makefile
++++ tcp_wrappers_7.6/Makefile
+@@ -45,7 +45,7 @@ what:
#
# SysV.4 Solaris 2.x OSF AIX
#REAL_DAEMON_DIR=/usr/sbin
@@ -12,7 +13,7 @@
# BSD 4.4
#REAL_DAEMON_DIR=/usr/libexec
#
-@@ -512,6 +519,7 @@
+@@ -513,6 +513,7 @@ VSYSLOG = -Dvsyslog=myvsyslog
# (examples: allow, deny, banners, twist and spawn).
#
#STYLE = -DPROCESS_OPTIONS # Enable language extensions.
@@ -20,7 +21,7 @@
################################################################
# Optional: Changing the default disposition of logfile records
-@@ -535,6 +543,7 @@
+@@ -536,6 +537,7 @@ VSYSLOG = -Dvsyslog=myvsyslog
# The LOG_XXX names below are taken from the /usr/include/syslog.h file.
FACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use
@@ -28,7 +29,7 @@
# The syslog priority at which successful connections are logged.
-@@ -631,6 +640,7 @@
+@@ -632,6 +634,7 @@ TABLES = -DHOSTS_DENY=\"/etc/hosts.deny\
# lookups altogether, see the next section.
PARANOID= -DPARANOID
@@ -36,7 +37,7 @@
########################################
# Optional: turning off hostname lookups
-@@ -644,6 +654,7 @@
+@@ -645,6 +648,7 @@ PARANOID= -DPARANOID
# mode (see previous section) and comment out the following definition.
HOSTNAME= -DALWAYS_HOSTNAME
@@ -44,7 +45,7 @@
#############################################
# Optional: Turning on host ADDRESS checking
-@@ -670,6 +681,7 @@
+@@ -671,6 +675,7 @@ HOSTNAME= -DALWAYS_HOSTNAME
# Solaris 2.x, and Linux. See your system documentation for details.
#
# KILL_OPT= -DKILL_IP_OPTIONS
@@ -52,7 +53,7 @@
## End configuration options
############################
-@@ -677,9 +689,10 @@
+@@ -678,9 +683,10 @@ HOSTNAME= -DALWAYS_HOSTNAME
# Protection against weird shells or weird make programs.
SHELL = /bin/sh
@@ -65,7 +66,7 @@
$(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
-DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
-DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
-@@ -712,10 +725,11 @@
+@@ -713,11 +719,12 @@ all other: config-check tcpd tcpdmatch t
config-check:
@set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; }
@@ -81,3 +82,4 @@
+ @if [ ! -d shared ]; then mkdir shared; fi
$(LIB): $(LIB_OBJ)
+ rm -f $(LIB)
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
index 1effef1..3ece8c3 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
@@ -45,6 +45,7 @@
file://safe_finger.8 \
file://makefile-fix-parallel.patch \
file://musl-decls.patch \
+ file://0001-Fix-build-with-clang.patch \
"
SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.3.bb b/import-layers/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.3.bb
deleted file mode 100644
index f58df92..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.3.bb
+++ /dev/null
@@ -1,88 +0,0 @@
-SUMMARY = "Documentation system for on-line information and printed output"
-DESCRIPTION = "Texinfo is a documentation system that can produce both \
-online information and printed output from a single source file. The \
-GNU Project uses the Texinfo file format for most of its documentation."
-HOMEPAGE = "http://www.gnu.org/software/texinfo/"
-SECTION = "console/utils"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-PROVIDES_append_class-native = " texinfo-replacement-native"
-
-def compress_pkg(d):
- if bb.data.inherits_class('compress_doc', d):
- compress = d.getVar("DOC_COMPRESS")
- if compress == "gz":
- return "gzip"
- elif compress == "bz2":
- return "bzip2"
- elif compress == "xz":
- return "xz"
- return ""
-
-RDEPENDS_info += "${@compress_pkg(d)}"
-
-DEPENDS = "zlib ncurses texinfo-replacement-native"
-DEPENDS_class-native = "zlib-native ncurses-native"
-
-TARGET_PATCH = "file://use_host_makedoc.patch"
-TARGET_PATCH_class-native = ""
-
-SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \
- file://texinfo-4.12-zlib.patch \
- file://disable-native-tools.patch \
- file://link-zip.patch \
- file://dont-depend-on-help2man.patch \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- ${TARGET_PATCH} \
- "
-
-SRC_URI[md5sum] = "9b08daca9bf8eccae9b0f884aba41f9e"
-SRC_URI[sha256sum] = "300a6ba4958c2dd4a6d5ce60f0a335daf7e379f5374f276f6ba31a221f02f606"
-
-tex_texinfo = "texmf/tex/texinfo"
-
-inherit gettext autotools
-
-do_configure_prepend () {
- # autotools_do_configure updates po/Makefile.in.in, we also need
- # update po_document.
- cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_document/
-}
-
-do_compile_prepend() {
- if [ -d tools ];then
- oe_runmake -C tools/gnulib/lib
- fi
-}
-
-do_install_append() {
- mkdir -p ${D}${datadir}/${tex_texinfo}
- install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo}
- sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2any ${D}${bindir}/pod2texi
-}
-
-do_install_append_class-native() {
- install -m 755 info/makedoc ${D}${bindir}
-}
-
-PACKAGES += "info info-doc"
-
-FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info"
-FILES_info-doc = "${infodir}/info.info* ${infodir}/dir ${infodir}/info-*.info* \
- ${mandir}/man1/info.1* ${mandir}/man5/info.5* \
- ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*"
-
-FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo"
-RDEPENDS_${PN} = "perl"
-FILES_${PN}-doc = "${infodir}/texinfo* \
- ${datadir}/${tex_texinfo} \
- ${mandir}/man1 ${mandir}/man5"
-
-# Lie about providing the Locale::gettext_xs module. It is not actually built,
-# but the code will test for it and if not found use Locale::gettext_pp instead.
-# However, this causes a file dependency on perl(Locale::gettext_xs) to be
-# generated, which must be satisfied.
-RPROVIDES_${PN} += "perl(Locale::gettext_xs)"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.5.bb b/import-layers/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.5.bb
new file mode 100644
index 0000000..f966457
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.5.bb
@@ -0,0 +1,90 @@
+SUMMARY = "Documentation system for on-line information and printed output"
+DESCRIPTION = "Texinfo is a documentation system that can produce both \
+online information and printed output from a single source file. The \
+GNU Project uses the Texinfo file format for most of its documentation."
+HOMEPAGE = "http://www.gnu.org/software/texinfo/"
+SECTION = "console/utils"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+PROVIDES_append_class-native = " texinfo-replacement-native"
+
+def compress_pkg(d):
+ if bb.data.inherits_class('compress_doc', d):
+ compress = d.getVar("DOC_COMPRESS")
+ if compress == "gz":
+ return "gzip"
+ elif compress == "bz2":
+ return "bzip2"
+ elif compress == "xz":
+ return "xz"
+ return ""
+
+RDEPENDS_info += "${@compress_pkg(d)}"
+
+DEPENDS = "zlib ncurses texinfo-replacement-native"
+DEPENDS_class-native = "zlib-native ncurses-native"
+
+TARGET_PATCH = "file://use_host_makedoc.patch"
+TARGET_PATCH_class-native = ""
+
+SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \
+ file://texinfo-4.12-zlib.patch \
+ file://disable-native-tools.patch \
+ file://link-zip.patch \
+ file://dont-depend-on-help2man.patch \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+ ${TARGET_PATCH} \
+ "
+
+SRC_URI[md5sum] = "94e8f7149876793030e5518dd8d6e956"
+SRC_URI[sha256sum] = "d34272e4042c46186ddcd66bd5d980c0ca14ff734444686ccf8131f6ec8b1427"
+
+tex_texinfo = "texmf/tex/texinfo"
+
+inherit gettext autotools
+
+EXTRA_AUTORECONF += "-I ${S}/gnulib/m4"
+
+do_configure_prepend () {
+ # autotools_do_configure updates po/Makefile.in.in, we also need
+ # update po_document.
+ cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_document/
+}
+
+do_compile_prepend() {
+ if [ -d tools ];then
+ oe_runmake -C tools/gnulib/lib
+ fi
+}
+
+do_install_append() {
+ mkdir -p ${D}${datadir}/${tex_texinfo}
+ install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo}
+ sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2any ${D}${bindir}/pod2texi
+}
+
+do_install_append_class-native() {
+ install -m 755 info/makedoc ${D}${bindir}
+}
+
+PACKAGES += "info info-doc"
+
+FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info"
+FILES_info-doc = "${infodir}/info.info* ${infodir}/dir ${infodir}/info-*.info* \
+ ${mandir}/man1/info.1* ${mandir}/man5/info.5* \
+ ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*"
+
+FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo"
+RDEPENDS_${PN} = "perl"
+FILES_${PN}-doc = "${infodir}/texinfo* \
+ ${datadir}/${tex_texinfo} \
+ ${mandir}/man1 ${mandir}/man5"
+
+# Lie about providing the Locale::gettext_xs module. It is not actually built,
+# but the code will test for it and if not found use Locale::gettext_pp instead.
+# However, this causes a file dependency on perl(Locale::gettext_xs) to be
+# generated, which must be satisfied.
+RPROVIDES_${PN} += "perl(Locale::gettext_xs)"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/time/time-1.7/debian.patch b/import-layers/yocto-poky/meta/recipes-extended/time/time-1.7/debian.patch
deleted file mode 100644
index 23ea0e3..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/time/time-1.7/debian.patch
+++ /dev/null
@@ -1,1301 +0,0 @@
-Upstream-Status: Backport
-
---- time-1.7.orig/configure.in
-+++ time-1.7/configure.in
-@@ -1,11 +1,8 @@
- dnl Process this file with autoconf to produce a configure script.
- AC_INIT(time.c)
--VERSION=1.7
--AC_SUBST(VERSION)
--PACKAGE=time
--AC_SUBST(PACKAGE)
-+AM_INIT_AUTOMAKE(time, 1.7)
-
--AC_ARG_PROGRAM
-+AM_MAINTAINER_MODE
-
- dnl Checks for programs.
- AC_PROG_CC
-@@ -15,7 +12,7 @@
- dnl Checks for header files.
- AC_HEADER_STDC
- AC_HEADER_SYS_WAIT
--AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h)
-+AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h sys/resource.h)
-
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
---- time-1.7.orig/version.texi
-+++ time-1.7/version.texi
-@@ -1,3 +1,3 @@
--@set UPDATED 12 June 1996
-+@set UPDATED 9 May 2002
- @set EDITION 1.7
- @set VERSION 1.7
---- time-1.7.orig/time.c
-+++ time-1.7/time.c
-@@ -147,6 +147,10 @@
- NULL
- };
-
-+
-+/* If true, do not show the exit message */
-+static boolean quiet;
-+
- /* If true, show an English description next to each statistic. */
- static boolean verbose;
-
-@@ -172,6 +176,7 @@
- {"help", no_argument, NULL, 'h'},
- {"output-file", required_argument, NULL, 'o'},
- {"portability", no_argument, NULL, 'p'},
-+ {"quiet", no_argument,NULL, 'q'},
- {"verbose", no_argument, NULL, 'v'},
- {"version", no_argument, NULL, 'V'},
- {NULL, no_argument, NULL, 0}
-@@ -333,7 +338,8 @@
- else if (WIFSIGNALED (resp->waitstatus))
- fprintf (fp, "Command terminated by signal %d\n",
- WTERMSIG (resp->waitstatus));
-- else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus))
-+ else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus)
-+ && !quiet)
- fprintf (fp, "Command exited with non-zero status %d\n",
- WEXITSTATUS (resp->waitstatus));
-
-@@ -523,6 +529,7 @@
- char *format; /* Format found in environment. */
-
- /* Initialize the option flags. */
-+ quiet = false;
- verbose = false;
- outfile = NULL;
- outfp = stderr;
-@@ -536,7 +543,7 @@
- if (format)
- output_format = format;
-
-- while ((optc = getopt_long (argc, argv, "+af:o:pvV", longopts, (int *) 0))
-+ while ((optc = getopt_long (argc, argv, "+af:o:pqvV", longopts, (int *) 0))
- != EOF)
- {
- switch (optc)
-@@ -555,6 +562,9 @@
- case 'p':
- output_format = posix_format;
- break;
-+ case 'q':
-+ quiet = true;
-+ break;
- case 'v':
- verbose = true;
- break;
-@@ -642,9 +652,9 @@
- fflush (outfp);
-
- if (WIFSTOPPED (res.waitstatus))
-- exit (WSTOPSIG (res.waitstatus));
-+ exit (WSTOPSIG (res.waitstatus) + 128);
- else if (WIFSIGNALED (res.waitstatus))
-- exit (WTERMSIG (res.waitstatus));
-+ exit (WTERMSIG (res.waitstatus) + 128);
- else if (WIFEXITED (res.waitstatus))
- exit (WEXITSTATUS (res.waitstatus));
- }
-@@ -657,7 +667,7 @@
- fprintf (stream, "\
- Usage: %s [-apvV] [-f format] [-o file] [--append] [--verbose]\n\
- [--portability] [--format=format] [--output=file] [--version]\n\
-- [--help] command [arg...]\n",
-+ [--quiet] [--help] command [arg...]\n",
- program_name);
- exit (status);
- }
---- time-1.7.orig/resuse.h
-+++ time-1.7/resuse.h
-@@ -36,19 +36,8 @@
- # include <sys/rusage.h>
- #else
- # define TV_MSEC tv_usec / 1000
--# if HAVE_WAIT3
-+# if HAVE_SYS_RESOURCE_H
- # include <sys/resource.h>
--# else
--/* Process resource usage structure. */
--struct rusage
--{
-- struct timeval ru_utime; /* User time used. */
-- struct timeval ru_stime; /* System time used. */
-- int ru_maxrss, ru_ixrss, ru_idrss, ru_isrss,
-- ru_minflt, ru_majflt, ru_nswap, ru_inblock,
-- ru_oublock, ru_msgsnd, ru_msgrcv, ru_nsignals,
-- ru_nvcsw, ru_nivcsw;
--};
- # endif
- #endif
-
---- time-1.7.orig/time.texi
-+++ time-1.7/time.texi
-@@ -11,6 +11,12 @@
- @finalout
- @end iftex
-
-+@dircategory Individual utilities
-+@direntry
-+* time: (time). Run programs and summarize
-+ system resource usage.
-+@end direntry
-+
- @ifinfo
- This file documents the the GNU @code{time} command for running programs
- and summarizing the system resources they use.
-@@ -185,6 +191,10 @@
- sys %S
- @end example
-
-+@item -q
-+@itemx --quiet
-+Suppress non-zero error code from the executed program.
-+
- @item -v
- @itemx --verbose
- @cindex format
---- time-1.7.orig/time.info
-+++ time-1.7/time.info
-@@ -1,5 +1,10 @@
--This is Info file ./time.info, produced by Makeinfo-1.55 from the input
--file time.texi.
-+This is time.info, produced by makeinfo version 4.1 from time.texi.
-+
-+INFO-DIR-SECTION Individual utilities
-+START-INFO-DIR-ENTRY
-+* time: (time). Run programs and summarize
-+ system resource usage.
-+END-INFO-DIR-ENTRY
-
- This file documents the the GNU `time' command for running programs
- and summarizing the system resources they use.
-@@ -31,7 +36,7 @@
-
- * Resource Measurement:: Measuring program resource use.
-
-- -- The Detailed Node Listing --
-+ --- The Detailed Node Listing ---
-
- Measuring Program Resource Use
-
-@@ -58,14 +63,14 @@
- The `time' command runs another program, then displays information
- about the resources used by that program, collected by the system while
- the program was running. You can select which information is reported
--and the format in which it is shown (*note Setting Format::.), or have
-+and the format in which it is shown (*note Setting Format::), or have
- `time' save the information in a file instead of displaying it on the
--screen (*note Redirecting::.).
-+screen (*note Redirecting::).
-
- The resources that `time' can report on fall into the general
- categories of time, memory, and I/O and IPC calls. Some systems do not
- provide much information about program resource use; `time' reports
--unavailable information as zero values (*note Accuracy::.).
-+unavailable information as zero values (*note Accuracy::).
-
- The format of the `time' command is:
-
-@@ -132,6 +137,10 @@
- user %U
- sys %S
-
-+`-q'
-+`--quiet'
-+ Suppress non-zero error code from the executed program.
-+
- `-v'
- `--verbose'
- Use the built-in verbose format, which displays each available
-@@ -174,7 +183,7 @@
- The resource specifiers, which are a superset of those recognized by
- the `tcsh' builtin `time' command, are listed below. Not all resources
- are measured by all versions of Unix, so some of the values might be
--reported as zero (*note Accuracy::.).
-+reported as zero (*note Accuracy::).
-
- * Menu:
-
-@@ -308,11 +317,11 @@
- `-o FILE'
- `--output=FILE'
- Write the resource use statistics to FILE. By default, this
-- *overwrites* the file, destroying the file's previous contents.
-+ _overwrites_ the file, destroying the file's previous contents.
-
- `-a'
- `--append'
-- *Append* the resource use information to the output file instead
-+ _Append_ the resource use information to the output file instead
- of overwriting it. This option is only useful with the `-o' or
- `--output' option.
-
-@@ -437,7 +446,7 @@
-
- `-a'
- `--append'
-- *Append* the resource use information to the output file instead
-+ _Append_ the resource use information to the output file instead
- of overwriting it.
-
- `-f FORMAT'
-@@ -462,17 +471,17 @@
-
-
- Tag Table:
--Node: Top934
--Node: Resource Measurement1725
--Node: Setting Format3678
--Node: Format String4907
--Node: Time Resources6214
--Node: Memory Resources6844
--Node: I/O Resources7549
--Node: Command Info8747
--Node: Redirecting8964
--Node: Examples9754
--Node: Accuracy12064
--Node: Invoking time13586
-+Node: Top1115
-+Node: Resource Measurement1908
-+Node: Setting Format3858
-+Node: Format String5164
-+Node: Time Resources6470
-+Node: Memory Resources7100
-+Node: I/O Resources7805
-+Node: Command Info9003
-+Node: Redirecting9220
-+Node: Examples10010
-+Node: Accuracy12320
-+Node: Invoking time13842
-
- End Tag Table
---- time-1.7.orig/time.html
-+++ time-1.7/time.html
-@@ -0,0 +1,1021 @@
-+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-+ "http://www.w3.org/TR/html40/loose.dtd">
-+<HTML>
-+<!-- Created on September, 1 2003 by texi2html 1.66 -->
-+<!--
-+Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
-+ Karl Berry <karl@freefriends.org>
-+ Olaf Bachmann <obachman@mathematik.uni-kl.de>
-+ and many others.
-+Maintained by: Many creative people <dev@texi2html.cvshome.org>
-+Send bugs and suggestions to <users@texi2html.cvshome.org>
-+
-+-->
-+<HEAD>
-+<TITLE>Measuring Program Resource Use</TITLE>
-+
-+<META NAME="description" CONTENT="Measuring Program Resource Use">
-+<META NAME="keywords" CONTENT="Measuring Program Resource Use">
-+<META NAME="resource-type" CONTENT="document">
-+<META NAME="distribution" CONTENT="global">
-+<META NAME="Generator" CONTENT="texi2html 1.66">
-+
-+</HEAD>
-+
-+<BODY LANG="en" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
-+
-+<A NAME="SEC_Top"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H1>Measuring Program Resource Use</H1>
-+
-+<P>
-+
-+This file documents the the GNU <CODE>time</CODE> command for running programs
-+and summarizing the system resources they use.
-+This is edition 1.7, for version 1.7.
-+</P>
-+<P>
-+
-+</P>
-+<TABLE BORDER="0" CELLSPACING="0">
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC1">1. Measuring Program Resource Use</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Measuring program resource use.</TD></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> -- The Detailed Node Listing ---
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">Measuring Program Resource Use
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
-+</TH></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC2">1.1 Setting the Output Format</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Selecting the information reported by <CODE>time</CODE>.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC3">1.2 The Format String</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">The information <CODE>time</CODE> can report.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC8">1.3 Redirecting Output</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Writing the information to a file.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC9">1.4 Examples</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Examples of using <CODE>time</CODE>.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC10">1.5 Accuracy</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Limitations on the accuracy of <CODE>time</CODE> output.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Summary of the options to the <CODE>time</CODE> command.</TD></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">The Format String
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
-+</TH></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC4">1.2.1 Time Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC5">1.2.2 Memory Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC6">1.2.3 I/O Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC7">1.2.4 Command Info</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+</TABLE>
-+<P>
-+
-+<HR SIZE=1>
-+<A NAME="SEC1"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> < </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC2"> > </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<A NAME="Resource Measurement"></A>
-+<H1> 1. Measuring Program Resource Use </H1>
-+<!--docid::SEC1::-->
-+<P>
-+
-+The <CODE>time</CODE> command runs another program, then displays information
-+about the resources used by that program, collected by the system while
-+the program was running. You can select which information is reported
-+and the format in which it is shown (see section <A HREF="time.html#SEC2">1.1 Setting the Output Format</A>), or have
-+<CODE>time</CODE> save the information in a file instead of displaying it on the
-+screen (see section <A HREF="time.html#SEC8">1.3 Redirecting Output</A>).
-+</P>
-+<P>
-+
-+The resources that <CODE>time</CODE> can report on fall into the general
-+categories of time, memory, and I/O and IPC calls. Some systems do not
-+provide much information about program resource use; <CODE>time</CODE>
-+reports unavailable information as zero values (see section <A HREF="time.html#SEC10">1.5 Accuracy</A>).
-+</P>
-+<P>
-+
-+The format of the <CODE>time</CODE> command is:
-+</P>
-+<P>
-+
-+<TABLE><tr><td> </td><td class=example><pre>time [option<small>...</small>] <VAR>command</VAR> [<VAR>arg</VAR><small>...</small>]
-+</pre></td></tr></table><P>
-+
-+<A NAME="IDX1"></A>
-+<CODE>time</CODE> runs the program <VAR>command</VAR>, with any given arguments
-+<VAR>arg</VAR><small>...</small>. When <VAR>command</VAR> finishes, <CODE>time</CODE> displays
-+information about resources used by <VAR>command</VAR>.
-+</P>
-+<P>
-+
-+Here is an example of using <CODE>time</CODE> to measure the time and other
-+resources used by running the program <CODE>grep</CODE>:
-+</P>
-+<P>
-+
-+<TABLE><tr><td> </td><td class=example><pre>eg$ time grep nobody /etc/aliases
-+nobody:/dev/null
-+etc-files:nobody
-+misc-group:nobody
-+0.07user 0.50system 0:06.69elapsed 8%CPU (0avgtext+489avgdata 324maxresident)k
-+46inputs+7outputs (43major+251minor)pagefaults 0swaps
-+</pre></td></tr></table><P>
-+
-+Mail suggestions and bug reports for GNU <CODE>time</CODE> to
-+<CODE>bug-gnu-utils@prep.ai.mit.edu</CODE>. Please include the version of
-+<CODE>time</CODE>, which you can get by running `<SAMP>time --version</SAMP>', and the
-+operating system and C compiler you used.
-+</P>
-+<P>
-+
-+<TABLE BORDER="0" CELLSPACING="0">
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC2">1.1 Setting the Output Format</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Selecting the information reported by <CODE>time</CODE>.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC3">1.2 The Format String</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">The information <CODE>time</CODE> can report.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC8">1.3 Redirecting Output</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Writing the information to a file.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC9">1.4 Examples</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Examples of using <CODE>time</CODE>.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC10">1.5 Accuracy</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Limitations on the accuracy of <CODE>time</CODE> output.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Summary of the options to the <CODE>time</CODE> command.</TD></TR>
-+</TABLE>
-+<P>
-+
-+<A NAME="Setting Format"></A>
-+<HR SIZE="6">
-+<A NAME="SEC2"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> < </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC3"> > </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.1 Setting the Output Format </H2>
-+<!--docid::SEC2::-->
-+<P>
-+
-+<CODE>time</CODE> uses a <EM>format string</EM> to determine which information to
-+display about the resources used by the command it runs. See section <A HREF="time.html#SEC3">1.2 The Format String</A>, for the interpretation of the format string contents.
-+</P>
-+<P>
-+
-+You can specify a format string with the command line options listed
-+below. If no format is specified on the command line, but the
-+<CODE>TIME</CODE> environment variable is set, its value is used as the format
-+string. Otherwise, the default format built into <CODE>time</CODE> is used:
-+</P>
-+<P>
-+
-+<TABLE><tr><td> </td><td class=example><pre>%Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k
-+%Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps
-+</pre></td></tr></table><P>
-+
-+The command line options to set the format are:
-+</P>
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>-f <VAR>format</VAR></CODE>
-+<DD><DT><CODE>--format=<VAR>format</VAR></CODE>
-+<DD>Use <VAR>format</VAR> as the format string.
-+<P>
-+
-+</P>
-+<DT><CODE>-p</CODE>
-+<DD><DT><CODE>--portability</CODE>
-+<DD>Use the following format string, for conformance with POSIX standard
-+1003.2:
-+<P>
-+
-+<TABLE><tr><td> </td><td class=example><pre>real %e
-+user %U
-+sys %S
-+</pre></td></tr></table><P>
-+
-+</P>
-+<DT><CODE>-q</CODE>
-+<DD><DT><CODE>--quiet</CODE>
-+<DD>Suppress non-zero error code from the executed program.
-+<P>
-+
-+</P>
-+<DT><CODE>-v</CODE>
-+<DD><DT><CODE>--verbose</CODE>
-+<DD><A NAME="IDX2"></A>
-+Use the built-in verbose format, which displays each available piece of
-+information on the program's resource use on its own line, with an
-+English description of its meaning.
-+</DL>
-+<P>
-+
-+<A NAME="Format String"></A>
-+<HR SIZE="6">
-+<A NAME="SEC3"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC2"> < </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC4"> > </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.2 The Format String </H2>
-+<!--docid::SEC3::-->
-+<P>
-+
-+<A NAME="IDX3"></A>
-+<A NAME="IDX4"></A>
-+The <EM>format string</EM> controls the contents of the <CODE>time</CODE> output.
-+It consists of <EM>resource specifiers</EM> and <EM>escapes</EM>, interspersed
-+with plain text.
-+</P>
-+<P>
-+
-+A backslash introduces an <EM>escape</EM>, which is translated
-+into a single printing character upon output. The valid escapes are
-+listed below. An invalid escape is output as a question mark followed
-+by a backslash.
-+</P>
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>\t</CODE>
-+<DD>a tab character
-+<P>
-+
-+</P>
-+<DT><CODE>\n</CODE>
-+<DD>a newline
-+<P>
-+
-+</P>
-+<DT><CODE>\\</CODE>
-+<DD>a literal backslash
-+</DL>
-+<P>
-+
-+<CODE>time</CODE> always prints a newline after printing the resource use
-+information, so normally format strings do not end with a newline
-+character (or `<SAMP>\n</SAMP>').
-+</P>
-+<P>
-+
-+A resource specifier consists of a percent sign followed by another
-+character. An invalid resource specifier is output as a question mark
-+followed by the invalid character. Use `<SAMP>%%</SAMP>' to output a literal
-+percent sign.
-+</P>
-+<P>
-+
-+The resource specifiers, which are a superset of those recognized by the
-+<CODE>tcsh</CODE> builtin <CODE>time</CODE> command, are listed below. Not all
-+resources are measured by all versions of Unix, so some of the values
-+might be reported as zero (see section <A HREF="time.html#SEC10">1.5 Accuracy</A>).
-+</P>
-+<P>
-+
-+<TABLE BORDER="0" CELLSPACING="0">
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC4">1.2.1 Time Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC5">1.2.2 Memory Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC6">1.2.3 I/O Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC7">1.2.4 Command Info</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+</TABLE>
-+<P>
-+
-+<A NAME="Time Resources"></A>
-+<HR SIZE="6">
-+<A NAME="SEC4"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC3"> < </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC5"> > </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H3> 1.2.1 Time Resources </H3>
-+<!--docid::SEC4::-->
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>E</CODE>
-+<DD>Elapsed real (wall clock) time used by the process, in
-+[hours:]minutes:seconds.
-+<P>
-+
-+</P>
-+<DT><CODE>e</CODE>
-+<DD>Elapsed real (wall clock) time used by the process, in
-+seconds.
-+<P>
-+
-+</P>
-+<DT><CODE>S</CODE>
-+<DD>Total number of CPU-seconds used by the system on behalf of the process
-+(in kernel mode), in seconds.
-+<P>
-+
-+</P>
-+<DT><CODE>U</CODE>
-+<DD>Total number of CPU-seconds that the process used directly (in user
-+mode), in seconds.
-+<P>
-+
-+</P>
-+<DT><CODE>P</CODE>
-+<DD>Percentage of the CPU that this job got. This is just user + system
-+times divied by the total running time.
-+</DL>
-+<P>
-+
-+<A NAME="Memory Resources"></A>
-+<HR SIZE="6">
-+<A NAME="SEC5"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC4"> < </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC6"> > </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H3> 1.2.2 Memory Resources </H3>
-+<!--docid::SEC5::-->
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>M</CODE>
-+<DD>Maximum resident set size of the process during its lifetime, in
-+Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>t</CODE>
-+<DD>Average resident set size of the process, in Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>K</CODE>
-+<DD>Average total (data+stack+text) memory use of the process, in Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>D</CODE>
-+<DD>Average size of the process's unshared data area, in Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>p</CODE>
-+<DD>Average size of the process's unshared stack, in Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>X</CODE>
-+<DD>Average size of the process's shared text, in Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>Z</CODE>
-+<DD>System's page size, in bytes. This is a per-system constant, but
-+varies between systems.
-+</DL>
-+<P>
-+
-+<A NAME="I/O Resources"></A>
-+<HR SIZE="6">
-+<A NAME="SEC6"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC5"> < </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC7"> > </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H3> 1.2.3 I/O Resources </H3>
-+<!--docid::SEC6::-->
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>F</CODE>
-+<DD>Number of major, or I/O-requiring, page faults that occurred while the
-+process was running. These are faults where the page has actually
-+migrated out of primary memory.
-+<P>
-+
-+</P>
-+<DT><CODE>R</CODE>
-+<DD>Number of minor, or recoverable, page faults. These are pages that are
-+not valid (so they fault) but which have not yet been claimed by other
-+virtual pages. Thus the data in the page is still valid but the system
-+tables must be updated.
-+<P>
-+
-+</P>
-+<DT><CODE>W</CODE>
-+<DD>Number of times the process was swapped out of main memory.
-+<P>
-+
-+</P>
-+<DT><CODE>c</CODE>
-+<DD>Number of times the process was context-switched involuntarily (because
-+the time slice expired).
-+<P>
-+
-+</P>
-+<DT><CODE>w</CODE>
-+<DD>Number of times that the program was context-switched voluntarily, for
-+instance while waiting for an I/O operation to complete.
-+<P>
-+
-+</P>
-+<DT><CODE>I</CODE>
-+<DD>Number of file system inputs by the process.
-+<P>
-+
-+</P>
-+<DT><CODE>O</CODE>
-+<DD>Number of file system outputs by the process.
-+<P>
-+
-+</P>
-+<DT><CODE>r</CODE>
-+<DD>Number of socket messages received by the process.
-+<P>
-+
-+</P>
-+<DT><CODE>s</CODE>
-+<DD>Number of socket messages sent by the process.
-+<P>
-+
-+</P>
-+<DT><CODE>k</CODE>
-+<DD>Number of signals delivered to the process.
-+</DL>
-+<P>
-+
-+<A NAME="Command Info"></A>
-+<HR SIZE="6">
-+<A NAME="SEC7"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC6"> < </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC8"> > </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H3> 1.2.4 Command Info </H3>
-+<!--docid::SEC7::-->
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>C</CODE>
-+<DD>Name and command line arguments of the command being timed.
-+<P>
-+
-+</P>
-+<DT><CODE>x</CODE>
-+<DD>Exit status of the command.
-+</DL>
-+<P>
-+
-+<A NAME="Redirecting"></A>
-+<HR SIZE="6">
-+<A NAME="SEC8"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC7"> < </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC9"> > </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.3 Redirecting Output </H2>
-+<!--docid::SEC8::-->
-+<P>
-+
-+By default, <CODE>time</CODE> writes the resource use statistics to the
-+standard error stream. The options below make it write the statistics
-+to a file instead. Doing this can be useful if the program you're
-+running writes to the standard error or you're running <CODE>time</CODE>
-+noninteractively or in the background.
-+</P>
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>-o <VAR>file</VAR></CODE>
-+<DD><DT><CODE>--output=<VAR>file</VAR></CODE>
-+<DD>Write the resource use statistics to <VAR>file</VAR>. By default, this
-+<EM>overwrites</EM> the file, destroying the file's previous contents.
-+<P>
-+
-+</P>
-+<DT><CODE>-a</CODE>
-+<DD><DT><CODE>--append</CODE>
-+<DD><EM>Append</EM> the resource use information to the output file instead
-+of overwriting it. This option is only useful with the `<SAMP>-o</SAMP>' or
-+`<SAMP>--output</SAMP>' option.
-+</DL>
-+<P>
-+
-+<A NAME="Examples"></A>
-+<HR SIZE="6">
-+<A NAME="SEC9"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC8"> < </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC10"> > </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.4 Examples </H2>
-+<!--docid::SEC9::-->
-+<P>
-+
-+Run the command `<SAMP>wc /etc/hosts</SAMP>' and show the default information:
-+</P>
-+<P>
-+
-+<TABLE><tr><td> </td><td class=example><pre>eg$ time wc /etc/hosts
-+ 35 111 1134 /etc/hosts
-+0.00user 0.01system 0:00.04elapsed 25%CPU (0avgtext+0avgdata 0maxresident)k
-+1inputs+1outputs (0major+0minor)pagefaults 0swaps
-+</pre></td></tr></table><P>
-+
-+Run the command `<SAMP>ls -Fs</SAMP>' and show just the user, system, and
-+wall-clock time:
-+</P>
-+<P>
-+
-+<TABLE><tr><td> </td><td class=example><pre>eg$ time -f "\t%E real,\t%U user,\t%S sys" ls -Fs
-+total 16
-+1 account/ 1 db/ 1 mail/ 1 run/
-+1 backups/ 1 emacs/ 1 msgs/ 1 rwho/
-+1 crash/ 1 games/ 1 preserve/ 1 spool/
-+1 cron/ 1 log/ 1 quotas/ 1 tmp/
-+ 0:00.03 real, 0.00 user, 0.01 sys
-+</pre></td></tr></table><P>
-+
-+Edit the file `<TT>.bashrc</TT>' and have <CODE>time</CODE> append the elapsed time
-+and number of signals to the file `<TT>log</TT>', reading the format string
-+from the environment variable <CODE>TIME</CODE>:
-+</P>
-+<P>
-+
-+<TABLE><tr><td> </td><td class=example><pre>eg$ export TIME="\t%E,\t%k" # If using bash or ksh
-+eg$ setenv TIME "\t%E,\t%k" # If using csh or tcsh
-+eg$ time -a -o log emacs .bashrc
-+eg$ cat log
-+ 0:16.55, 726
-+</pre></td></tr></table><P>
-+
-+Run the command `<SAMP>sleep 4</SAMP>' and show all of the information about it
-+verbosely:
-+</P>
-+<P>
-+
-+<TABLE><tr><td> </td><td class=example><pre>eg$ time -v sleep 4
-+ Command being timed: "sleep 4"
-+ User time (seconds): 0.00
-+ System time (seconds): 0.05
-+ Percent of CPU this job got: 1%
-+ Elapsed (wall clock) time (h:mm:ss or m:ss): 0:04.26
-+ Average shared text size (kbytes): 36
-+ Average unshared data size (kbytes): 24
-+ Average stack size (kbytes): 0
-+ Average total size (kbytes): 60
-+ Maximum resident set size (kbytes): 32
-+ Average resident set size (kbytes): 24
-+ Major (requiring I/O) page faults: 3
-+ Minor (reclaiming a frame) page faults: 0
-+ Voluntary context switches: 11
-+ Involuntary context switches: 0
-+ Swaps: 0
-+ File system inputs: 3
-+ File system outputs: 1
-+ Socket messages sent: 0
-+ Socket messages received: 0
-+ Signals delivered: 1
-+ Page size (bytes): 4096
-+ Exit status: 0
-+</pre></td></tr></table><P>
-+
-+<A NAME="Accuracy"></A>
-+<HR SIZE="6">
-+<A NAME="SEC10"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC9"> < </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC11"> > </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.5 Accuracy </H2>
-+<!--docid::SEC10::-->
-+<P>
-+
-+The elapsed time is not collected atomically with the execution of the
-+program; as a result, in bizarre circumstances (if the <CODE>time</CODE>
-+command gets stopped or swapped out in between when the program being
-+timed exits and when <CODE>time</CODE> calculates how long it took to run), it
-+could be much larger than the actual execution time.
-+</P>
-+<P>
-+
-+When the running time of a command is very nearly zero, some values
-+(e.g., the percentage of CPU used) may be reported as either zero (which
-+is wrong) or a question mark.
-+</P>
-+<P>
-+
-+Most information shown by <CODE>time</CODE> is derived from the <CODE>wait3</CODE>
-+system call. The numbers are only as good as those returned by
-+<CODE>wait3</CODE>. Many systems do not measure all of the resources that
-+<CODE>time</CODE> can report on; those resources are reported as zero. The
-+systems that measure most or all of the resources are based on 4.2 or
-+4.3BSD. Later BSD releases use different memory management code that
-+measures fewer resources.
-+</P>
-+<P>
-+
-+On systems that do not have a <CODE>wait3</CODE> call that returns status
-+information, the <CODE>times</CODE> system call is used instead. It provides
-+much less information than <CODE>wait3</CODE>, so on those systems <CODE>time</CODE>
-+reports most of the resources as zero.
-+</P>
-+<P>
-+
-+The `<SAMP>%I</SAMP>' and `<SAMP>%O</SAMP>' values are allegedly only "real" input
-+and output and do not include those supplied by caching devices. The
-+meaning of "real" I/O reported by `<SAMP>%I</SAMP>' and `<SAMP>%O</SAMP>' may be
-+muddled for workstations, especially diskless ones.
-+</P>
-+<P>
-+
-+<A NAME="Invoking time"></A>
-+<HR SIZE="6">
-+<A NAME="SEC11"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC10"> < </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ > ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.6 Running the <CODE>time</CODE> Command </H2>
-+<!--docid::SEC11::-->
-+<P>
-+
-+The format of the <CODE>time</CODE> command is:
-+</P>
-+<P>
-+
-+<TABLE><tr><td> </td><td class=example><pre>time [option<small>...</small>] <VAR>command</VAR> [<VAR>arg</VAR><small>...</small>]
-+</pre></td></tr></table><P>
-+
-+<A NAME="IDX5"></A>
-+<CODE>time</CODE> runs the program <VAR>command</VAR>, with any given arguments
-+<VAR>arg</VAR><small>...</small>. When <VAR>command</VAR> finishes, <CODE>time</CODE> displays
-+information about resources used by <VAR>command</VAR> (on the standard error
-+output, by default). If <VAR>command</VAR> exits with non-zero status or is
-+terminated by a signal, <CODE>time</CODE> displays a warning message and the
-+exit status or signal number.
-+</P>
-+<P>
-+
-+Options to <CODE>time</CODE> must appear on the command line before
-+<VAR>command</VAR>. Anything on the command line after <VAR>command</VAR> is
-+passed as arguments to <VAR>command</VAR>.
-+</P>
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>-o <VAR>file</VAR></CODE>
-+<DD><DT><CODE>--output=<VAR>file</VAR></CODE>
-+<DD>Write the resource use statistics to <VAR>file</VAR>.
-+<P>
-+
-+</P>
-+<DT><CODE>-a</CODE>
-+<DD><DT><CODE>--append</CODE>
-+<DD><EM>Append</EM> the resource use information to the output file instead
-+of overwriting it.
-+<P>
-+
-+</P>
-+<DT><CODE>-f <VAR>format</VAR></CODE>
-+<DD><DT><CODE>--format=<VAR>format</VAR></CODE>
-+<DD>Use <VAR>format</VAR> as the format string.
-+<P>
-+
-+</P>
-+<DT><CODE>--help</CODE>
-+<DD>Print a summary of the command line options to <CODE>time</CODE> and exit.
-+<P>
-+
-+</P>
-+<DT><CODE>-p</CODE>
-+<DD><DT><CODE>--portability</CODE>
-+<DD>Use the POSIX format.
-+<P>
-+
-+</P>
-+<DT><CODE>-v</CODE>
-+<DD><DT><CODE>--verbose</CODE>
-+<DD><A NAME="IDX6"></A>
-+Use the built-in verbose format.
-+<P>
-+
-+</P>
-+<DT><CODE>-V</CODE>
-+<DD><DT><CODE>--version</CODE>
-+<DD><A NAME="IDX7"></A>
-+Print the version number of <CODE>time</CODE> and exit.
-+</DL>
-+<P>
-+
-+<HR SIZE="6">
-+<A NAME="SEC_Contents"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H1>Table of Contents</H1>
-+<BLOCKQUOTE>
-+<A NAME="TOC1" HREF="time.html#SEC1">1. Measuring Program Resource Use</A>
-+<BR>
-+<BLOCKQUOTE>
-+<A NAME="TOC2" HREF="time.html#SEC2">1.1 Setting the Output Format</A>
-+<BR>
-+<A NAME="TOC3" HREF="time.html#SEC3">1.2 The Format String</A>
-+<BR>
-+<BLOCKQUOTE>
-+<A NAME="TOC4" HREF="time.html#SEC4">1.2.1 Time Resources</A>
-+<BR>
-+<A NAME="TOC5" HREF="time.html#SEC5">1.2.2 Memory Resources</A>
-+<BR>
-+<A NAME="TOC6" HREF="time.html#SEC6">1.2.3 I/O Resources</A>
-+<BR>
-+<A NAME="TOC7" HREF="time.html#SEC7">1.2.4 Command Info</A>
-+<BR>
-+</BLOCKQUOTE>
-+<A NAME="TOC8" HREF="time.html#SEC8">1.3 Redirecting Output</A>
-+<BR>
-+<A NAME="TOC9" HREF="time.html#SEC9">1.4 Examples</A>
-+<BR>
-+<A NAME="TOC10" HREF="time.html#SEC10">1.5 Accuracy</A>
-+<BR>
-+<A NAME="TOC11" HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A>
-+<BR>
-+</BLOCKQUOTE>
-+</BLOCKQUOTE>
-+<HR SIZE=1>
-+<A NAME="SEC_OVERVIEW"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H1>Short Table of Contents</H1>
-+<BLOCKQUOTE>
-+<A NAME="TOC1" HREF="time.html#SEC1">1. Measuring Program Resource Use</A>
-+<BR>
-+
-+</BLOCKQUOTE>
-+<HR SIZE=1>
-+<A NAME="SEC_About"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H1>About this document</H1>
-+This document was generated
-+by
-+using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
-+<P></P>
-+The buttons in the navigation panels have the following meaning:
-+<P></P>
-+<table border = "1">
-+<TR>
-+<TH> Button </TH>
-+<TH> Name </TH>
-+<TH> Go to </TH>
-+<TH> From 1.2.3 go to</TH>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ < ] </TD>
-+<TD ALIGN="CENTER">
-+Back
-+</TD>
-+<TD>
-+previous section in reading order
-+</TD>
-+<TD>
-+1.2.2
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ > ] </TD>
-+<TD ALIGN="CENTER">
-+Forward
-+</TD>
-+<TD>
-+next section in reading order
-+</TD>
-+<TD>
-+1.2.4
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ << ] </TD>
-+<TD ALIGN="CENTER">
-+FastBack
-+</TD>
-+<TD>
-+beginning of this chapter or previous chapter
-+</TD>
-+<TD>
-+1
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ Up ] </TD>
-+<TD ALIGN="CENTER">
-+Up
-+</TD>
-+<TD>
-+up section
-+</TD>
-+<TD>
-+1.2
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ >> ] </TD>
-+<TD ALIGN="CENTER">
-+FastForward
-+</TD>
-+<TD>
-+next chapter
-+</TD>
-+<TD>
-+2
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [Top] </TD>
-+<TD ALIGN="CENTER">
-+Top
-+</TD>
-+<TD>
-+cover (top) of document
-+</TD>
-+<TD>
-+
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [Contents] </TD>
-+<TD ALIGN="CENTER">
-+Contents
-+</TD>
-+<TD>
-+table of contents
-+</TD>
-+<TD>
-+
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [Index] </TD>
-+<TD ALIGN="CENTER">
-+Index
-+</TD>
-+<TD>
-+concept index
-+</TD>
-+<TD>
-+
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ ? ] </TD>
-+<TD ALIGN="CENTER">
-+About
-+</TD>
-+<TD>
-+this page
-+</TD>
-+<TD>
-+
-+</TD>
-+</TR>
-+</TABLE>
-+ <P>
-+ where the <STRONG> Example </STRONG> assumes that the current position
-+ is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of
-+ the following structure:</P>
-+ <UL>
-+ <LI> 1. Section One
-+ <UL>
-+ <LI>1.1 Subsection One-One
-+ <UL>
-+ <LI>...</LI>
-+ </UL>
-+ <LI>1.2 Subsection One-Two
-+ <UL>
-+ <LI>1.2.1 Subsubsection One-Two-One</LI>
-+ <LI>1.2.2 Subsubsection One-Two-Two</LI>
-+ <LI>1.2.3 Subsubsection One-Two-Three
-+ <STRONG><== Current Position </STRONG></LI>
-+ <LI>1.2.4 Subsubsection One-Two-Four</LI>
-+ </UL>
-+ </LI>
-+ <LI>1.3 Subsection One-Three
-+ <UL>
-+ <LI>...</LI>
-+ </UL>
-+ </LI>
-+ <LI>1.4 Subsection One-Four</LI>
-+ </UL>
-+ </LI>
-+ </UL>
-+
-+<HR SIZE=1>
-+<BR>
-+<FONT SIZE="-1">
-+This document was generated
-+by <I>root</I> on <I>September, 1 2003</I>
-+using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
-+</FONT>
-+
-+</BODY>
-+</HTML>
diff --git a/import-layers/yocto-poky/meta/recipes-extended/time/time.inc b/import-layers/yocto-poky/meta/recipes-extended/time/time.inc
deleted file mode 100644
index 6b20d7c..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/time/time.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "Tool that measures CPU resources"
-DESCRIPTION = "time measures many of the CPU resources, such as time and \
-memory, that other programs use."
-HOMEPAGE = "http://www.gnu.org/software/time/"
-SECTION = "utils"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
-
-inherit texinfo update-alternatives
-
-ALTERNATIVE_${PN} = "time"
-ALTERNATIVE_PRIORITY = "100"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/time/time_1.7.bb b/import-layers/yocto-poky/meta/recipes-extended/time/time_1.7.bb
deleted file mode 100644
index 92c5353..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/time/time_1.7.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require time.inc
-
-PR = "r2"
-
-SRC_URI = "${GNU_MIRROR}/time/time-${PV}.tar.gz \
- file://debian.patch"
-
-SRC_URI[md5sum] = "e38d2b8b34b1ca259cf7b053caac32b3"
-SRC_URI[sha256sum] = "e37ea79a253bf85a85ada2f7c632c14e481a5fd262a362f6f4fd58e68601496d"
-
-inherit autotools
diff --git a/import-layers/yocto-poky/meta/recipes-extended/time/time_1.8.bb b/import-layers/yocto-poky/meta/recipes-extended/time/time_1.8.bb
new file mode 100644
index 0000000..fb3147a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/time/time_1.8.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Tool that measures CPU resources"
+DESCRIPTION = "time measures many of the CPU resources, such as time and \
+memory, that other programs use."
+HOMEPAGE = "http://www.gnu.org/software/time/"
+SECTION = "utils"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+inherit texinfo update-alternatives
+
+ALTERNATIVE_${PN} = "time"
+ALTERNATIVE_PRIORITY = "100"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI = "${GNU_MIRROR}/time/time-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "4e00dcb8c3ab11c7cf5a0d698828ac96"
+SRC_URI[sha256sum] = "8a2f540155961a35ba9b84aec5e77e3ae36c74cecb4484db455960601b7a2e1b"
+
+inherit autotools
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tzcode/files/0001-Fix-Makefile-quoting-bug.patch b/import-layers/yocto-poky/meta/recipes-extended/tzcode/files/0001-Fix-Makefile-quoting-bug.patch
deleted file mode 100644
index e49fa09..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/tzcode/files/0001-Fix-Makefile-quoting-bug.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From b520d20b8122a783f99f088758b78d928f70ee34 Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Mon, 23 Oct 2017 11:42:45 -0700
-Subject: [PATCH] Fix Makefile quoting bug
-
-Problem with INSTALLARGS reported by Zefram in:
-https://mm.icann.org/pipermail/tz/2017-October/025360.html
-Fix similar problems too.
-* Makefile (ZIC_INSTALL, VALIDATE_ENV, CC, install)
-(INSTALL, version, INSTALLARGS, right_posix, posix_right)
-(check_public): Use apostrophes to prevent undesirable
-interpretation of names by the shell. We still do not support
-directory names containing apostrophes or newlines, but this is
-good enough.
-
-Upstream-Status: Backport
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-* NEWS: Mention this.
----
- Makefile | 64 ++++++++++++++++++++++++++++++++--------------------------------
- NEWS | 8 ++++++++
- 2 files changed, 40 insertions(+), 32 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index c92edc0..97649ca 100644
---- a/Makefile
-+++ b/Makefile
-@@ -313,7 +313,7 @@ ZFLAGS=
-
- # How to use zic to install tz binary files.
-
--ZIC_INSTALL= $(ZIC) -d $(DESTDIR)$(TZDIR) $(LEAPSECONDS)
-+ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS)
-
- # The name of a Posix-compliant 'awk' on your system.
- AWK= awk
-@@ -341,8 +341,8 @@ SGML_CATALOG_FILES= \
- VALIDATE = nsgmls
- VALIDATE_FLAGS = -s -B -wall -wno-unused-param
- VALIDATE_ENV = \
-- SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \
-- SGML_SEARCH_PATH=$(SGML_SEARCH_PATH) \
-+ SGML_CATALOG_FILES='$(SGML_CATALOG_FILES)' \
-+ SGML_SEARCH_PATH='$(SGML_SEARCH_PATH)' \
- SP_CHARSET_FIXED=YES \
- SP_ENCODING=UTF-8
-
-@@ -396,7 +396,7 @@ GZIPFLAGS= -9n
- #MAKE= make
-
- cc= cc
--CC= $(cc) -DTZDIR=\"$(TZDIR)\"
-+CC= $(cc) -DTZDIR='"$(TZDIR)"'
-
- AR= ar
-
-@@ -473,29 +473,29 @@ all: tzselect yearistype zic zdump libtz.a $(TABDATA)
- ALL: all date $(ENCHILADA)
-
- install: all $(DATA) $(REDO) $(MANS)
-- mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
-- $(DESTDIR)$(LIBDIR) \
-- $(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \
-- $(DESTDIR)$(MANDIR)/man8
-+ mkdir -p '$(DESTDIR)$(ETCDIR)' '$(DESTDIR)$(TZDIR)' \
-+ '$(DESTDIR)$(LIBDIR)' \
-+ '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \
-+ '$(DESTDIR)$(MANDIR)/man8'
- $(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES)
-- cp -f $(TABDATA) $(DESTDIR)$(TZDIR)/.
-- cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/.
-- cp libtz.a $(DESTDIR)$(LIBDIR)/.
-- $(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a
-- cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/.
-- cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/.
-- cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/.
-+ cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.'
-+ cp tzselect zic zdump '$(DESTDIR)$(ETCDIR)/.'
-+ cp libtz.a '$(DESTDIR)$(LIBDIR)/.'
-+ $(RANLIB) '$(DESTDIR)$(LIBDIR)/libtz.a'
-+ cp -f newctime.3 newtzset.3 '$(DESTDIR)$(MANDIR)/man3/.'
-+ cp -f tzfile.5 '$(DESTDIR)$(MANDIR)/man5/.'
-+ cp -f tzselect.8 zdump.8 zic.8 '$(DESTDIR)$(MANDIR)/man8/.'
-
- INSTALL: ALL install date.1
-- mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
-- cp date $(DESTDIR)$(BINDIR)/.
-- cp -f date.1 $(DESTDIR)$(MANDIR)/man1/.
-+ mkdir -p '$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1'
-+ cp date '$(DESTDIR)$(BINDIR)/.'
-+ cp -f date.1 '$(DESTDIR)$(MANDIR)/man1/.'
-
- version: $(VERSION_DEPS)
- { (type git) >/dev/null 2>&1 && \
- V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
- --abbrev=7 --dirty` || \
-- V=$(VERSION); } && \
-+ V='$(VERSION)'; } && \
- printf '%s\n' "$$V" >$@.out
- mv $@.out $@
-
-@@ -529,12 +529,12 @@ leapseconds: $(LEAP_DEPS)
- # Arguments to pass to submakes of install_data.
- # They can be overridden by later submake arguments.
- INSTALLARGS = \
-- BACKWARD=$(BACKWARD) \
-- DESTDIR=$(DESTDIR) \
-+ BACKWARD='$(BACKWARD)' \
-+ DESTDIR='$(DESTDIR)' \
- LEAPSECONDS='$(LEAPSECONDS)' \
- PACKRATDATA='$(PACKRATDATA)' \
-- TZDIR=$(TZDIR) \
-- YEARISTYPE=$(YEARISTYPE) \
-+ TZDIR='$(TZDIR)' \
-+ YEARISTYPE='$(YEARISTYPE)' \
- ZIC='$(ZIC)'
-
- # 'make install_data' installs one set of tz binary files.
-@@ -558,16 +558,16 @@ right_only:
- # You must replace all of $(TZDIR) to switch from not using leap seconds
- # to using them, or vice versa.
- right_posix: right_only
-- rm -fr $(DESTDIR)$(TZDIR)-leaps
-- ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-leaps || \
-- $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only
-- $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only
-+ rm -fr '$(DESTDIR)$(TZDIR)-leaps'
-+ ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-leaps' || \
-+ $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only
-+ $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only
-
- posix_right: posix_only
-- rm -fr $(DESTDIR)$(TZDIR)-posix
-- ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-posix || \
-- $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only
-- $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only
-+ rm -fr '$(DESTDIR)$(TZDIR)-posix'
-+ ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-posix' || \
-+ $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only
-+ $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only
-
- # This obsolescent rule is present for backwards compatibility with
- # tz releases 2014g through 2015g. It should go away eventually.
-@@ -764,7 +764,7 @@ set-timestamps.out: $(ENCHILADA)
-
- check_public:
- $(MAKE) maintainer-clean
-- $(MAKE) "CFLAGS=$(GCC_DEBUG_FLAGS)" ALL
-+ $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL
- mkdir -p public.dir
- for i in $(TDATA) tzdata.zi; do \
- $(zic) -v -d public.dir $$i 2>&1 || exit; \
-diff --git a/NEWS b/NEWS
-index bd2bec2..75ab095 100644
---- a/NEWS
-+++ b/NEWS
-@@ -1,5 +1,13 @@
- News for the tz database
-
-+Unreleased, experimental changes
-+
-+ Changes to build procedure
-+
-+ The Makefile now quotes values like BACKWARD more carefully when
-+ passing them to the shell. (Problem reported by Zefram.)
-+
-+
- Release 2017c - 2017-10-20 14:49:34 -0700
-
- Briefly:
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tzcode/files/0002-Port-zdump-to-C90-snprintf.patch b/import-layers/yocto-poky/meta/recipes-extended/tzcode/files/0002-Port-zdump-to-C90-snprintf.patch
deleted file mode 100644
index 87afe47..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/tzcode/files/0002-Port-zdump-to-C90-snprintf.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From e231da4fb2beb17c60b4b1a5c276366d6a6e433f Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Mon, 23 Oct 2017 17:58:36 -0700
-Subject: [PATCH] Port zdump to C90 + snprintf
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Problem reported by Jon Skeet in:
-https://mm.icann.org/pipermail/tz/2017-October/025362.html
-* NEWS: Mention this.
-* zdump.c (my_snprintf): New macro or function. If a macro, it is
-just snprintf. If a function, it is the same as the old snprintf
-static function, with an ATTRIBUTE_FORMAT to pacify modern GCC.
-All uses of snprintf changed to use my_snprintf. This way,
-installers don’t need to specify -DHAVE_SNPRINTF if they are using
-a pre-C99 compiler with a library that has snprintf.
-
-Upstream-Status: Backport
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- NEWS | 4 ++++
- zdump.c | 29 ++++++++++++++++-------------
- 2 files changed, 20 insertions(+), 13 deletions(-)
-
-diff --git a/NEWS b/NEWS
-index 75ab095..dea08b8 100644
---- a/NEWS
-+++ b/NEWS
-@@ -7,6 +7,10 @@ Unreleased, experimental changes
- The Makefile now quotes values like BACKWARD more carefully when
- passing them to the shell. (Problem reported by Zefram.)
-
-+ Builders no longer need to specify -DHAVE_SNPRINTF on platforms
-+ that have snprintf and use pre-C99 compilers. (Problem reported
-+ by Jon Skeet.)
-+
-
- Release 2017c - 2017-10-20 14:49:34 -0700
-
-diff --git a/zdump.c b/zdump.c
-index 8e3bf3e..d4e6084 100644
---- a/zdump.c
-+++ b/zdump.c
-@@ -795,12 +795,14 @@ show(timezone_t tz, char *zone, time_t t, bool v)
- abbrok(abbr(tmp), zone);
- }
-
--#if !HAVE_SNPRINTF
-+#if HAVE_SNPRINTF
-+# define my_snprintf snprintf
-+#else
- # include <stdarg.h>
-
- /* A substitute for snprintf that is good enough for zdump. */
--static int
--snprintf(char *s, size_t size, char const *format, ...)
-+static int ATTRIBUTE_FORMAT((printf, 3, 4))
-+my_snprintf(char *s, size_t size, char const *format, ...)
- {
- int n;
- va_list args;
-@@ -839,10 +841,10 @@ format_local_time(char *buf, size_t size, struct tm const *tm)
- {
- int ss = tm->tm_sec, mm = tm->tm_min, hh = tm->tm_hour;
- return (ss
-- ? snprintf(buf, size, "%02d:%02d:%02d", hh, mm, ss)
-+ ? my_snprintf(buf, size, "%02d:%02d:%02d", hh, mm, ss)
- : mm
-- ? snprintf(buf, size, "%02d:%02d", hh, mm)
-- : snprintf(buf, size, "%02d", hh));
-+ ? my_snprintf(buf, size, "%02d:%02d", hh, mm)
-+ : my_snprintf(buf, size, "%02d", hh));
- }
-
- /* Store into BUF, of size SIZE, a formatted UTC offset for the
-@@ -877,10 +879,10 @@ format_utc_offset(char *buf, size_t size, struct tm const *tm, time_t t)
- mm = off / 60 % 60;
- hh = off / 60 / 60;
- return (ss || 100 <= hh
-- ? snprintf(buf, size, "%c%02ld%02d%02d", sign, hh, mm, ss)
-+ ? my_snprintf(buf, size, "%c%02ld%02d%02d", sign, hh, mm, ss)
- : mm
-- ? snprintf(buf, size, "%c%02ld%02d", sign, hh, mm)
-- : snprintf(buf, size, "%c%02ld", sign, hh));
-+ ? my_snprintf(buf, size, "%c%02ld%02d", sign, hh, mm)
-+ : my_snprintf(buf, size, "%c%02ld", sign, hh));
- }
-
- /* Store into BUF (of size SIZE) a quoted string representation of P.
-@@ -983,15 +985,16 @@ istrftime(char *buf, size_t size, char const *time_fmt,
- for (abp = ab; is_alpha(*abp); abp++)
- continue;
- len = (!*abp && *ab
-- ? snprintf(b, s, "%s", ab)
-+ ? my_snprintf(b, s, "%s", ab)
- : format_quoted_string(b, s, ab));
- if (s <= len)
- return false;
- b += len, s -= len;
- }
-- formatted_len = (tm->tm_isdst
-- ? snprintf(b, s, &"\t\t%d"[show_abbr], tm->tm_isdst)
-- : 0);
-+ formatted_len
-+ = (tm->tm_isdst
-+ ? my_snprintf(b, s, &"\t\t%d"[show_abbr], tm->tm_isdst)
-+ : 0);
- }
- break;
- }
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2018c.bb b/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2018c.bb
deleted file mode 100644
index 85e9b70..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2018c.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-# note that we allow for us to use data later than our code version
-#
-SUMMARY = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
-LICENSE = "PD & BSD & BSD-3-Clause"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba"
-
-SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz;name=tzcode \
- http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata \
- "
-
-UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
-
-SRC_URI[tzcode.md5sum] = "e6e0d4b2ce3fa6906f303157bed2612e"
-SRC_URI[tzcode.sha256sum] = "31fa7fc0f94a6ff2d6bc878c0a35e8ab8b5aa0e8b01445a1d4a8f14777d0e665"
-SRC_URI[tzdata.md5sum] = "c412b1531adef1be7a645ab734f86acc"
-SRC_URI[tzdata.sha256sum] = "2825c3e4b7ef520f24d393bcc02942f9762ffd3e7fc9b23850789ed8f22933f6"
-
-S = "${WORKDIR}"
-
-inherit native
-
-EXTRA_OEMAKE += "cc='${CC}'"
-
-do_install () {
- install -d ${D}${bindir}/
- install -m 755 zic ${D}${bindir}/
- install -m 755 zdump ${D}${bindir}/
- install -m 755 tzselect ${D}${bindir}/
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2018d.bb b/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2018d.bb
new file mode 100644
index 0000000..7933a5d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2018d.bb
@@ -0,0 +1,30 @@
+# note that we allow for us to use data later than our code version
+#
+SUMMARY = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
+LICENSE = "PD & BSD & BSD-3-Clause"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba"
+
+SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz;name=tzcode \
+ http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata \
+ "
+
+UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
+
+SRC_URI[tzcode.md5sum] = "96612b4f5d7e8804fd9a0981c021be90"
+SRC_URI[tzcode.sha256sum] = "7de44e85baad748d217e3fd60706f599f9aec68bce6356b163f52b0dbd40a8d9"
+SRC_URI[tzdata.md5sum] = "871a7ef808eb42ebc551acdb3d661554"
+SRC_URI[tzdata.sha256sum] = "5106eddceb5f1ae3a91dbd3960e1b8b11ba0dc08579a31cf0724a7691b10c054"
+
+S = "${WORKDIR}"
+
+inherit native
+
+EXTRA_OEMAKE += "cc='${CC}'"
+
+do_install () {
+ install -d ${D}${bindir}/
+ install -m 755 zic ${D}${bindir}/
+ install -m 755 zdump ${D}${bindir}/
+ install -m 755 tzselect ${D}${bindir}/
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2018c.bb b/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2018c.bb
deleted file mode 100644
index ff5ec1c..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2018c.bb
+++ /dev/null
@@ -1,215 +0,0 @@
-SUMMARY = "Timezone data"
-HOMEPAGE = "http://www.iana.org/time-zones"
-SECTION = "base"
-LICENSE = "PD & BSD & BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba"
-
-DEPENDS = "tzcode-native"
-
-SRC_URI = "http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata"
-UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
-
-SRC_URI[tzdata.md5sum] = "c412b1531adef1be7a645ab734f86acc"
-SRC_URI[tzdata.sha256sum] = "2825c3e4b7ef520f24d393bcc02942f9762ffd3e7fc9b23850789ed8f22933f6"
-
-inherit allarch
-
-RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarctica \
- timezone-arctic timezone-asia timezone-atlantic \
- timezone-australia timezone-europe timezone-indian \
- timezone-iso3166.tab timezone-pacific timezone-zone.tab"
-
-S = "${WORKDIR}"
-
-DEFAULT_TIMEZONE ?= "Universal"
-INSTALL_TIMEZONE_FILE ?= "1"
-
-TZONES= "africa antarctica asia australasia europe northamerica southamerica \
- factory etcetera backward systemv \
- "
-# pacificnew
-
-do_compile () {
- for zone in ${TZONES}; do \
- ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \
- -y ${S}/yearistype.sh ${S}/${zone} ; \
- ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \
- -y ${S}/yearistype.sh ${S}/${zone} ; \
- ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \
- -y ${S}/yearistype.sh ${S}/${zone} ; \
- done
-}
-
-do_install () {
- install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo
- cp -pPR ${S}/$exec_prefix ${D}/
- # libc is removing zoneinfo files from package
- cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo
- cp -pP "${S}/zone1970.tab" ${D}${datadir}/zoneinfo
- cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo
-
- # Install default timezone
- if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then
- install -d ${D}${sysconfdir}
- if [ "${INSTALL_TIMEZONE_FILE}" = "1" ]; then
- echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
- fi
- ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
- else
- bberror "DEFAULT_TIMEZONE is set to an invalid value."
- exit 1
- fi
-
- chown -R root:root ${D}
-}
-
-pkg_postinst_${PN} () {
- etc_lt="$D${sysconfdir}/localtime"
- src="$D${sysconfdir}/timezone"
-
- if [ -e ${src} ] ; then
- tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
- fi
-
- if [ -z "${tz}" ] ; then
- exit 0
- fi
-
- if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then
- echo "You have an invalid TIMEZONE setting in ${src}"
- echo "Your ${etc_lt} has been reset to Universal; enjoy!"
- tz="Universal"
- echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}"
- if [ -L ${etc_lt} ] ; then
- rm -f "${etc_lt}"
- fi
- ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}"
- fi
-}
-
-# Packages primarily organized by directory with a major city
-# in most time zones in the base package
-
-PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \
- tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
- tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
-
-FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*"
-RPROVIDES_tzdata-africa = "tzdata-africa"
-
-FILES_tzdata-americas += "${datadir}/zoneinfo/America/* \
- ${datadir}/zoneinfo/US/* \
- ${datadir}/zoneinfo/Brazil/* \
- ${datadir}/zoneinfo/Canada/* \
- ${datadir}/zoneinfo/Mexico/* \
- ${datadir}/zoneinfo/Chile/*"
-RPROVIDES_tzdata-americas = "tzdata-americas"
-
-FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*"
-RPROVIDES_tzdata-antarctica = "tzdata-antarctica"
-
-FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*"
-RPROVIDES_tzdata-arctic = "tzdata-arctic"
-
-FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/* \
- ${datadir}/zoneinfo/Indian/* \
- ${datadir}/zoneinfo/Mideast/*"
-RPROVIDES_tzdata-asia = "tzdata-asia"
-
-FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*"
-RPROVIDES_tzdata-atlantic = "tzdata-atlantic"
-
-FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*"
-RPROVIDES_tzdata-australia = "tzdata-australia"
-
-FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*"
-RPROVIDES_tzdata-europe = "tzdata-europe"
-
-FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*"
-RPROVIDES_tzdata-pacific = "tzdata-pacific"
-
-FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*"
-RPROVIDES_tzdata-posix = "tzdata-posix"
-
-FILES_tzdata-right += "${datadir}/zoneinfo/right/*"
-RPROVIDES_tzdata-right = "tzdata-right"
-
-
-FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \
- ${datadir}/zoneinfo/Egypt \
- ${datadir}/zoneinfo/Eire \
- ${datadir}/zoneinfo/Factory \
- ${datadir}/zoneinfo/GB-Eire \
- ${datadir}/zoneinfo/Hongkong \
- ${datadir}/zoneinfo/Iceland \
- ${datadir}/zoneinfo/Iran \
- ${datadir}/zoneinfo/Israel \
- ${datadir}/zoneinfo/Jamaica \
- ${datadir}/zoneinfo/Japan \
- ${datadir}/zoneinfo/Kwajalein \
- ${datadir}/zoneinfo/Libya \
- ${datadir}/zoneinfo/Navajo \
- ${datadir}/zoneinfo/Poland \
- ${datadir}/zoneinfo/Portugal \
- ${datadir}/zoneinfo/Singapore \
- ${datadir}/zoneinfo/Turkey"
-RPROVIDES_tzdata-misc = "tzdata-misc"
-
-
-FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \
- ${datadir}/zoneinfo/America/Anchorage \
- ${datadir}/zoneinfo/America/Los_Angeles \
- ${datadir}/zoneinfo/America/Denver \
- ${datadir}/zoneinfo/America/Chicago \
- ${datadir}/zoneinfo/America/New_York \
- ${datadir}/zoneinfo/America/Caracas \
- ${datadir}/zoneinfo/America/Sao_Paulo \
- ${datadir}/zoneinfo/Europe/London \
- ${datadir}/zoneinfo/Europe/Paris \
- ${datadir}/zoneinfo/Africa/Cairo \
- ${datadir}/zoneinfo/Europe/Moscow \
- ${datadir}/zoneinfo/Asia/Dubai \
- ${datadir}/zoneinfo/Asia/Karachi \
- ${datadir}/zoneinfo/Asia/Dhaka \
- ${datadir}/zoneinfo/Asia/Bankok \
- ${datadir}/zoneinfo/Asia/Hong_Kong \
- ${datadir}/zoneinfo/Asia/Tokyo \
- ${datadir}/zoneinfo/Australia/Darwin \
- ${datadir}/zoneinfo/Australia/Adelaide \
- ${datadir}/zoneinfo/Australia/Brisbane \
- ${datadir}/zoneinfo/Australia/Sydney \
- ${datadir}/zoneinfo/Pacific/Noumea \
- ${datadir}/zoneinfo/CET \
- ${datadir}/zoneinfo/CST6CDT \
- ${datadir}/zoneinfo/EET \
- ${datadir}/zoneinfo/EST \
- ${datadir}/zoneinfo/EST5EDT \
- ${datadir}/zoneinfo/GB \
- ${datadir}/zoneinfo/GMT \
- ${datadir}/zoneinfo/GMT+0 \
- ${datadir}/zoneinfo/GMT-0 \
- ${datadir}/zoneinfo/GMT0 \
- ${datadir}/zoneinfo/Greenwich \
- ${datadir}/zoneinfo/HST \
- ${datadir}/zoneinfo/MET \
- ${datadir}/zoneinfo/MST \
- ${datadir}/zoneinfo/MST7MDT \
- ${datadir}/zoneinfo/NZ \
- ${datadir}/zoneinfo/NZ-CHAT \
- ${datadir}/zoneinfo/PRC \
- ${datadir}/zoneinfo/PST8PDT \
- ${datadir}/zoneinfo/ROC \
- ${datadir}/zoneinfo/ROK \
- ${datadir}/zoneinfo/UCT \
- ${datadir}/zoneinfo/UTC \
- ${datadir}/zoneinfo/Universal \
- ${datadir}/zoneinfo/W-SU \
- ${datadir}/zoneinfo/WET \
- ${datadir}/zoneinfo/Zulu \
- ${datadir}/zoneinfo/zone.tab \
- ${datadir}/zoneinfo/zone1970.tab \
- ${datadir}/zoneinfo/iso3166.tab \
- ${datadir}/zoneinfo/Etc/*"
-
-CONFFILES_${PN} += "${@ "${sysconfdir}/timezone" if bb.utils.to_boolean(d.getVar('INSTALL_TIMEZONE_FILE')) else "" }"
-CONFFILES_${PN} += "${sysconfdir}/localtime"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2018d.bb b/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2018d.bb
new file mode 100644
index 0000000..f7fce80
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2018d.bb
@@ -0,0 +1,215 @@
+SUMMARY = "Timezone data"
+HOMEPAGE = "http://www.iana.org/time-zones"
+SECTION = "base"
+LICENSE = "PD & BSD & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba"
+
+DEPENDS = "tzcode-native"
+
+SRC_URI = "http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata"
+UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
+
+SRC_URI[tzdata.md5sum] = "871a7ef808eb42ebc551acdb3d661554"
+SRC_URI[tzdata.sha256sum] = "5106eddceb5f1ae3a91dbd3960e1b8b11ba0dc08579a31cf0724a7691b10c054"
+
+inherit allarch
+
+RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarctica \
+ timezone-arctic timezone-asia timezone-atlantic \
+ timezone-australia timezone-europe timezone-indian \
+ timezone-iso3166.tab timezone-pacific timezone-zone.tab"
+
+S = "${WORKDIR}"
+
+DEFAULT_TIMEZONE ?= "Universal"
+INSTALL_TIMEZONE_FILE ?= "1"
+
+TZONES= "africa antarctica asia australasia europe northamerica southamerica \
+ factory etcetera backward systemv \
+ "
+# pacificnew
+
+do_compile () {
+ for zone in ${TZONES}; do \
+ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \
+ -y ${S}/yearistype.sh ${S}/${zone} ; \
+ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \
+ -y ${S}/yearistype.sh ${S}/${zone} ; \
+ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \
+ -y ${S}/yearistype.sh ${S}/${zone} ; \
+ done
+}
+
+do_install () {
+ install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo
+ cp -pPR ${S}/$exec_prefix ${D}/
+ # libc is removing zoneinfo files from package
+ cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo
+ cp -pP "${S}/zone1970.tab" ${D}${datadir}/zoneinfo
+ cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo
+
+ # Install default timezone
+ if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then
+ install -d ${D}${sysconfdir}
+ if [ "${INSTALL_TIMEZONE_FILE}" = "1" ]; then
+ echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
+ fi
+ ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
+ else
+ bberror "DEFAULT_TIMEZONE is set to an invalid value."
+ exit 1
+ fi
+
+ chown -R root:root ${D}
+}
+
+pkg_postinst_${PN} () {
+ etc_lt="$D${sysconfdir}/localtime"
+ src="$D${sysconfdir}/timezone"
+
+ if [ -e ${src} ] ; then
+ tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
+ fi
+
+ if [ -z "${tz}" ] ; then
+ exit 0
+ fi
+
+ if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then
+ echo "You have an invalid TIMEZONE setting in ${src}"
+ echo "Your ${etc_lt} has been reset to Universal; enjoy!"
+ tz="Universal"
+ echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}"
+ if [ -L ${etc_lt} ] ; then
+ rm -f "${etc_lt}"
+ fi
+ ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}"
+ fi
+}
+
+# Packages primarily organized by directory with a major city
+# in most time zones in the base package
+
+PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \
+ tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
+ tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
+
+FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*"
+RPROVIDES_tzdata-africa = "tzdata-africa"
+
+FILES_tzdata-americas += "${datadir}/zoneinfo/America/* \
+ ${datadir}/zoneinfo/US/* \
+ ${datadir}/zoneinfo/Brazil/* \
+ ${datadir}/zoneinfo/Canada/* \
+ ${datadir}/zoneinfo/Mexico/* \
+ ${datadir}/zoneinfo/Chile/*"
+RPROVIDES_tzdata-americas = "tzdata-americas"
+
+FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*"
+RPROVIDES_tzdata-antarctica = "tzdata-antarctica"
+
+FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*"
+RPROVIDES_tzdata-arctic = "tzdata-arctic"
+
+FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/* \
+ ${datadir}/zoneinfo/Indian/* \
+ ${datadir}/zoneinfo/Mideast/*"
+RPROVIDES_tzdata-asia = "tzdata-asia"
+
+FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*"
+RPROVIDES_tzdata-atlantic = "tzdata-atlantic"
+
+FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*"
+RPROVIDES_tzdata-australia = "tzdata-australia"
+
+FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*"
+RPROVIDES_tzdata-europe = "tzdata-europe"
+
+FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*"
+RPROVIDES_tzdata-pacific = "tzdata-pacific"
+
+FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*"
+RPROVIDES_tzdata-posix = "tzdata-posix"
+
+FILES_tzdata-right += "${datadir}/zoneinfo/right/*"
+RPROVIDES_tzdata-right = "tzdata-right"
+
+
+FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \
+ ${datadir}/zoneinfo/Egypt \
+ ${datadir}/zoneinfo/Eire \
+ ${datadir}/zoneinfo/Factory \
+ ${datadir}/zoneinfo/GB-Eire \
+ ${datadir}/zoneinfo/Hongkong \
+ ${datadir}/zoneinfo/Iceland \
+ ${datadir}/zoneinfo/Iran \
+ ${datadir}/zoneinfo/Israel \
+ ${datadir}/zoneinfo/Jamaica \
+ ${datadir}/zoneinfo/Japan \
+ ${datadir}/zoneinfo/Kwajalein \
+ ${datadir}/zoneinfo/Libya \
+ ${datadir}/zoneinfo/Navajo \
+ ${datadir}/zoneinfo/Poland \
+ ${datadir}/zoneinfo/Portugal \
+ ${datadir}/zoneinfo/Singapore \
+ ${datadir}/zoneinfo/Turkey"
+RPROVIDES_tzdata-misc = "tzdata-misc"
+
+
+FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \
+ ${datadir}/zoneinfo/America/Anchorage \
+ ${datadir}/zoneinfo/America/Los_Angeles \
+ ${datadir}/zoneinfo/America/Denver \
+ ${datadir}/zoneinfo/America/Chicago \
+ ${datadir}/zoneinfo/America/New_York \
+ ${datadir}/zoneinfo/America/Caracas \
+ ${datadir}/zoneinfo/America/Sao_Paulo \
+ ${datadir}/zoneinfo/Europe/London \
+ ${datadir}/zoneinfo/Europe/Paris \
+ ${datadir}/zoneinfo/Africa/Cairo \
+ ${datadir}/zoneinfo/Europe/Moscow \
+ ${datadir}/zoneinfo/Asia/Dubai \
+ ${datadir}/zoneinfo/Asia/Karachi \
+ ${datadir}/zoneinfo/Asia/Dhaka \
+ ${datadir}/zoneinfo/Asia/Bangkok \
+ ${datadir}/zoneinfo/Asia/Hong_Kong \
+ ${datadir}/zoneinfo/Asia/Tokyo \
+ ${datadir}/zoneinfo/Australia/Darwin \
+ ${datadir}/zoneinfo/Australia/Adelaide \
+ ${datadir}/zoneinfo/Australia/Brisbane \
+ ${datadir}/zoneinfo/Australia/Sydney \
+ ${datadir}/zoneinfo/Pacific/Noumea \
+ ${datadir}/zoneinfo/CET \
+ ${datadir}/zoneinfo/CST6CDT \
+ ${datadir}/zoneinfo/EET \
+ ${datadir}/zoneinfo/EST \
+ ${datadir}/zoneinfo/EST5EDT \
+ ${datadir}/zoneinfo/GB \
+ ${datadir}/zoneinfo/GMT \
+ ${datadir}/zoneinfo/GMT+0 \
+ ${datadir}/zoneinfo/GMT-0 \
+ ${datadir}/zoneinfo/GMT0 \
+ ${datadir}/zoneinfo/Greenwich \
+ ${datadir}/zoneinfo/HST \
+ ${datadir}/zoneinfo/MET \
+ ${datadir}/zoneinfo/MST \
+ ${datadir}/zoneinfo/MST7MDT \
+ ${datadir}/zoneinfo/NZ \
+ ${datadir}/zoneinfo/NZ-CHAT \
+ ${datadir}/zoneinfo/PRC \
+ ${datadir}/zoneinfo/PST8PDT \
+ ${datadir}/zoneinfo/ROC \
+ ${datadir}/zoneinfo/ROK \
+ ${datadir}/zoneinfo/UCT \
+ ${datadir}/zoneinfo/UTC \
+ ${datadir}/zoneinfo/Universal \
+ ${datadir}/zoneinfo/W-SU \
+ ${datadir}/zoneinfo/WET \
+ ${datadir}/zoneinfo/Zulu \
+ ${datadir}/zoneinfo/zone.tab \
+ ${datadir}/zoneinfo/zone1970.tab \
+ ${datadir}/zoneinfo/iso3166.tab \
+ ${datadir}/zoneinfo/Etc/*"
+
+CONFFILES_${PN} += "${@ "${sysconfdir}/timezone" if bb.utils.to_boolean(d.getVar('INSTALL_TIMEZONE_FILE')) else "" }"
+CONFFILES_${PN} += "${sysconfdir}/localtime"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch b/import-layers/yocto-poky/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch
index c989df1..ca4aaad 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch
@@ -9,9 +9,11 @@
Signed-off-by: Roy Li <rongqing.li@windriver.com>
---- a/extract.c
-+++ b/extract.c
-@@ -2232,10 +2232,17 @@
+Index: unzip60/extract.c
+===================================================================
+--- unzip60.orig/extract.c
++++ unzip60/extract.c
+@@ -2233,10 +2233,17 @@ static int test_compr_eb(__G__ eb, eb_si
if (compr_offset < 4) /* field is not compressed: */
return PK_OK; /* do nothing and signal OK */
@@ -30,5 +32,5 @@
+ ((eb_ucsize > 0L) && (eb_size <= (compr_offset + EB_CMPRHEADLEN))))
+ return IZ_EF_TRUNC; /* no/bad compressed data! */
- if (
- #ifdef INT_16BIT
+ method = makeword(eb + (EB_HEADSIZE + compr_offset));
+ if ((method == STORED) &&
diff --git a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch
new file mode 100644
index 0000000..338e0cd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch
@@ -0,0 +1,68 @@
+From c1fe14fa5bd168292cc4670034bc48b954e9dac7 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Tue, 13 Mar 2018 14:49:55 +0200
+Subject: [PATCH] watchdog: remove interdependencies of watchdog and
+ wd_keepalive services
+
+Since watchdog and watchdog-keepalive packages can't be installed
+together, remove the inter-dependencies of watchdog and wd_keepalive
+services
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ debian/watchdog.service | 9 +++------
+ debian/wd_keepalive.service | 10 +++++-----
+ 2 files changed, 8 insertions(+), 11 deletions(-)
+
+diff --git a/debian/watchdog.service b/debian/watchdog.service
+index 7a2fc36..f31d1fe 100644
+--- a/debian/watchdog.service
++++ b/debian/watchdog.service
+@@ -1,16 +1,13 @@
+ [Unit]
+ Description=watchdog daemon
+-Conflicts=wd_keepalive.service
+ After=multi-user.target
+-OnFailure=wd_keepalive.service
+
+ [Service]
+ Type=forking
+ EnvironmentFile=/etc/default/watchdog
+ ExecStartPre=/bin/sh -c '[ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module'
+-ExecStart=/bin/sh -c '[ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options'
+-ExecStopPost=/bin/sh -c '[ $run_wd_keepalive != 1 ] || false'
++ExecStart=/bin/sh -c '[ x$run_watchdog != x1 ] || exec /usr/sbin/watchdog $watchdog_options'
++PIDFile=/var/run/watchdog.pid
+
+ [Install]
+-WantedBy=default.target
+-
++WantedBy=multi-user.target
+diff --git a/debian/wd_keepalive.service b/debian/wd_keepalive.service
+index 45b018e..7f8b1dc 100644
+--- a/debian/wd_keepalive.service
++++ b/debian/wd_keepalive.service
+@@ -1,13 +1,13 @@
+ [Unit]
+ Description=watchdog keepalive daemon
+-Before=watchdog.service shutdown.target
+-Conflicts=watchdog.service shutdown.target
++After=multi-user.target
+
+ [Service]
+ Type=forking
+ EnvironmentFile=/etc/default/watchdog
+ ExecStartPre=/bin/sh -c '[ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module'
+-ExecStartPre=-/bin/systemctl reset-failed watchdog.service
+ ExecStart=/usr/sbin/wd_keepalive $watchdog_options
+-ExecStartPost=/bin/sh -c 'ln -s /var/run/wd_keepalive.pid /run/sendsigs.omit.d/wd_keepalive.pid'
+-ExecStopPost=/bin/sh -c 'rm -f /run/sendsigs.omit.d/wd_keepalive.pid'
++PIDFile=/var/run/wd_keepalive.pid
++
++[Install]
++WantedBy=multi-user.target
+--
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
index e68ad54..ec44c80 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
@@ -1,14 +1,16 @@
Signed-off-by: Diego Rondini <diego.ml@zoho.com>
Upstream-Status: Inappropriate
---- watchdog-5.13.orig/watchdog.conf 2013-02-01 12:15:44.000000000 +0100
-+++ watchdog-5.13/watchdog.conf 2014-11-13 10:59:43.233943000 +0100
-@@ -20,7 +20,7 @@
- #test-binary =
- #test-timeout =
+Index: watchdog-5.15/watchdog.conf
+===================================================================
+--- watchdog-5.15.orig/watchdog.conf
++++ watchdog-5.15/watchdog.conf
+@@ -28,7 +28,7 @@
+ #retry-timeout = 60
+ #repair-maximum = 1
-#watchdog-device = /dev/watchdog
+watchdog-device = /dev/watchdog
# Defaults compiled into the binary
- #temperature-device =
+ #temperature-sensor =
diff --git a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.15.bb b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.15.bb
index 3d0b72e..37b37ae 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.15.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.15.bb
@@ -10,6 +10,7 @@
SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \
+ file://0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch \
file://watchdog-init.patch \
file://watchdog-conf.patch \
file://wd_keepalive.init \
@@ -36,7 +37,9 @@
INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive"
INITSCRIPT_PARAMS_${PN}-keepalive = "start 15 1 2 3 4 5 . stop 85 0 6 ."
-SYSTEMD_SERVICE_${PN} = "watchdog.service wd_keepalive.service"
+SYSTEMD_PACKAGES = "${PN} ${PN}-keepalive"
+SYSTEMD_SERVICE_${PN} = "watchdog.service"
+SYSTEMD_SERVICE_${PN}-keepalive = "wd_keepalive.service"
do_install_append() {
install -d ${D}${systemd_system_unitdir}
@@ -54,6 +57,7 @@
FILES_${PN}-keepalive = " \
${sysconfdir}/init.d/wd_keepalive \
+ ${systemd_system_unitdir}/wd_keepalive.service \
${sbindir}/wd_keepalive \
"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/wget/wget.inc b/import-layers/yocto-poky/meta/recipes-extended/wget/wget.inc
index 1299edb..3cff656 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/wget/wget.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/wget/wget.inc
@@ -2,7 +2,7 @@
HOMEPAGE = "https://www.gnu.org/software/wget/"
SECTION = "console/network"
LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e"
DEPENDS = "gnutls zlib libpcre"
inherit autotools gettext texinfo update-alternatives pkgconfig
@@ -10,6 +10,9 @@
EXTRA_OECONF = "--with-ssl=gnutls --disable-rpath --disable-iri \
--without-libgnutls-prefix ac_cv_header_uuid_uuid_h=no"
+EXTRA_OEMAKE += 'TOOLCHAIN_OPTIONS="${TOOLCHAIN_OPTIONS}" \
+ DEBUG_PREFIX_MAP="${DEBUG_PREFIX_MAP}"'
+
ALTERNATIVE_${PN} = "wget"
ALTERNATIVE_${PN}_class-nativesdk = ""
ALTERNATIVE_PRIORITY = "100"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/wget/wget/0002-improve-reproducibility.patch b/import-layers/yocto-poky/meta/recipes-extended/wget/wget/0002-improve-reproducibility.patch
new file mode 100644
index 0000000..8781df2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/wget/wget/0002-improve-reproducibility.patch
@@ -0,0 +1,61 @@
+From 7f1357529d23b356b45fbb0dd7388588162e4cb8 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 10 Jan 2018 14:43:20 +0800
+Subject: [PATCH] src/Makefile.am: improve reproducibility
+
+Remove build host references from the internally
+generated file version.c. The references get compiled into
+executables, which leads to non-reproducible builds.
+The removed references (--sysroot, -fdebug-prefix-map) were
+only used as part of the `wget --version' which do not have
+side effect.
+
+...
+$ wget --version
+GNU Wget 1.14 built on linux-gnu.
+
++digest +https +ipv6 +iri +large-file +nls +ntlm +opie +ssl/openssl
+
+Wgetrc:
+ /etc/wgetrc (system)
+Locale: /usr/share/locale
+Compile: gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc"
+ -DLOCALEDIR="/usr/share/locale" -I. -I../lib -I../lib -O2 -g -pipe
+ -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
+ --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
+Link: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
+ -fstack-protector-strong --param=ssp-buffer-size=4
+ -grecord-gcc-switches -m64 -mtune=generic -lssl -lcrypto
+ /usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libz.so
+ -ldl -lz -lz -lidn -luuid -lpcre ftp-opie.o openssl.o http-ntlm.o
+ ../lib/libgnu.a
+...
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/Makefile.am | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 28c0be2..44084a3 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -87,9 +87,13 @@ version.c: $(wget_SOURCES) ../lib/libgnu.a
+ echo '#include "version.h"' >> $@
+ echo 'const char *version_string = "@VERSION@";' >> $@
+ echo 'const char *compilation_string = "'$(COMPILE)'";' \
++ | sed -e "s,$(TOOLCHAIN_OPTIONS),,g" \
++ -e "s,$(DEBUG_PREFIX_MAP),,g" \
+ | $(ESCAPEQUOTE) >> $@
+ echo 'const char *link_string = "'$(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) $(wget_LDADD)'";' \
++ | sed -e "s,$(TOOLCHAIN_OPTIONS),,g" \
++ -e "s,$(DEBUG_PREFIX_MAP),,g" \
+ | $(ESCAPEQUOTE) >> $@
+
+ css.c: $(srcdir)/css.l
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/wget/wget/CVE-2017-6508.patch b/import-layers/yocto-poky/meta/recipes-extended/wget/wget/CVE-2017-6508.patch
deleted file mode 100644
index b9c290f..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/wget/wget/CVE-2017-6508.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 4d729e322fae359a1aefaafec1144764a54e8ad4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
-Date: Mon, 6 Mar 2017 10:04:22 +0100
-Subject: [PATCH] Fix CRLF injection in Wget host part
-
-* src/url.c (url_parse): Reject control characters in host part of URL
-
-Reported-by: Orange Tsai
-
-Upstream-Status: Backport
-[http://git.savannah.gnu.org/cgit/wget.git/commit/?id=4d729e322fae359a1aefaafec1144764a54e8ad4]
-
-CVE: CVE-2017-6508
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- src/url.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/src/url.c b/src/url.c
-index 8f8ff0b..7d36b27 100644
---- a/src/url.c
-+++ b/src/url.c
-@@ -925,6 +925,17 @@ url_parse (const char *url, int *error, struct iri *iri, bool percent_encode)
- url_unescape (u->host);
- host_modified = true;
-
-+ /* check for invalid control characters in host name */
-+ for (p = u->host; *p; p++)
-+ {
-+ if (c_iscntrl(*p))
-+ {
-+ url_free(u);
-+ error_code = PE_INVALID_HOST_NAME;
-+ goto error;
-+ }
-+ }
-+
- /* Apply IDNA regardless of iri->utf8_encode status */
- if (opt.enable_iri && iri)
- {
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.19.1.bb b/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.19.1.bb
deleted file mode 100644
index 78bde95..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.19.1.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- file://CVE-2017-6508.patch \
- "
-
-SRC_URI[md5sum] = "87cea36b7161fd43e3fd51a4e8b89689"
-SRC_URI[sha256sum] = "9e4f12da38cc6167d0752d934abe27c7b1599a9af294e73829be7ac7b5b4da40"
-
-require wget.inc
diff --git a/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.19.5.bb b/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.19.5.bb
new file mode 100644
index 0000000..e37d8c7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.19.5.bb
@@ -0,0 +1,9 @@
+SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+ file://0002-improve-reproducibility.patch \
+ "
+
+SRC_URI[md5sum] = "2db6f03d655041f82eb64b8c8a1fa7da"
+SRC_URI[sha256sum] = "b39212abe1a73f2b28f4c6cb223c738559caac91d6e416a6d91d4b9d55c9faee"
+
+require wget.inc
diff --git a/import-layers/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb b/import-layers/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb
deleted file mode 100644
index 34f8d10..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "Basic desktop integration functions"
-HOMEPAGE = "https://www.freedesktop.org/wiki/Software/xdg-utils/"
-DESCRIPTION = "The xdg-utils package is a set of simple scripts that provide basic \
-desktop integration functions for any Free Desktop, such as Linux. \
-They are intended to provide a set of defacto standards. \
-The following scripts are provided at this time: \
-xdg-desktop-icon \
-xdg-desktop-menu \
-xdg-email \
-xdg-icon-resource \
-xdg-mime \
-xdg-open \
-xdg-screensaver \
-xdg-terminal \
-"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=a5367a90934098d6b05af3b746405014"
-
-SRC_URI = "http://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz \
- file://0001-Reinstate-xdg-terminal.patch \
- file://0001-Don-t-build-the-in-script-manual.patch \
- "
-
-SRC_URI[md5sum] = "2d0aec6037769a5f138ff404b1bb4b15"
-SRC_URI[sha256sum] = "b0dd63a2576e0bb16f1aa78d6ddf7d6784784a098d4df17161cd6a17c7bc4125"
-
-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
-
-# The xprop requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-DEPENDS = "xmlto-native libxslt-native"
-RDEPENDS_${PN} += "xprop"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.2.bb b/import-layers/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.2.bb
new file mode 100644
index 0000000..7339289
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.2.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Basic desktop integration functions"
+HOMEPAGE = "https://www.freedesktop.org/wiki/Software/xdg-utils/"
+DESCRIPTION = "The xdg-utils package is a set of simple scripts that provide basic \
+desktop integration functions for any Free Desktop, such as Linux. \
+They are intended to provide a set of defacto standards. \
+The following scripts are provided at this time: \
+xdg-desktop-icon \
+xdg-desktop-menu \
+xdg-email \
+xdg-icon-resource \
+xdg-mime \
+xdg-open \
+xdg-screensaver \
+xdg-terminal \
+"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a5367a90934098d6b05af3b746405014"
+
+SRC_URI = "http://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz \
+ file://0001-Reinstate-xdg-terminal.patch \
+ file://0001-Don-t-build-the-in-script-manual.patch \
+ "
+
+SRC_URI[md5sum] = "361e75eb76c94d19f6f4f330d8ee626b"
+SRC_URI[sha256sum] = "951952e2c6bb21214e0bb54e0dffa057d30f5563300225c24c16fba846258bcc"
+
+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
+
+# The xprop requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+DEPENDS = "xmlto-native libxslt-native"
+RDEPENDS_${PN} += "xprop"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.24.3.bb b/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.24.3.bb
deleted file mode 100644
index c507d23..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.24.3.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "WebKit based web browser for GNOME"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-DEPENDS = "libsoup-2.4 webkitgtk gtk+3 iso-codes avahi libnotify gcr \
- gsettings-desktop-schemas gnome-desktop3 libxml2-native \
- glib-2.0 glib-2.0-native json-glib"
-
-inherit gnomebase gsettings distro_features_check upstream-version-is-even gettext
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI += "file://0001-yelp.m4-drop-the-check-for-itstool.patch \
- file://0001-bookmarks-Check-for-return-value-of-fread.patch \
- "
-SRC_URI[archive.md5sum] = "c0221aec6a08935e6854eaa9de9451ef"
-SRC_URI[archive.sha256sum] = "fef51676310d9f37e18c9b2d778254232eb17cccd988c2d1ecf42c7b2963a154"
-
-EXTRA_OECONF += " --with-distributor-name=${DISTRO} --enable-debug=no"
-
-do_configure_prepend() {
- sed -i -e s:help::g ${S}/Makefile.am
-}
-
-FILES_${PN} += "${datadir}/dbus-1 ${datadir}/gnome-shell/search-providers"
-RDEPENDS_${PN} = "iso-codes adwaita-icon-theme"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.26.6.bb b/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.26.6.bb
new file mode 100644
index 0000000..e250f76
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.26.6.bb
@@ -0,0 +1,22 @@
+SUMMARY = "WebKit based web browser for GNOME"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+DEPENDS = "libsoup-2.4 webkitgtk gtk+3 iso-codes avahi libnotify gcr \
+ gsettings-desktop-schemas gnome-desktop3 libxml2-native \
+ glib-2.0 glib-2.0-native json-glib"
+
+GNOMEBASEBUILDCLASS = "meson"
+inherit gnomebase gsettings distro_features_check upstream-version-is-even gettext
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \
+ file://0002-help-meson.build-disable-the-use-of-yelp.patch \
+ "
+SRC_URI[archive.md5sum] = "8449968366a6f9aaff3ac228ddfc7c66"
+SRC_URI[archive.sha256sum] = "01b16aa55d312ae0f17d3136f90d8c68ac748715f119412fb1917023c6f630a8"
+
+EXTRA_OEMESON += " -Ddistributor_name=${DISTRO}"
+
+FILES_${PN} += "${datadir}/dbus-1 ${datadir}/gnome-shell/search-providers"
+RDEPENDS_${PN} = "iso-codes adwaita-icon-theme"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0001-bookmarks-Check-for-return-value-of-fread.patch b/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0001-bookmarks-Check-for-return-value-of-fread.patch
deleted file mode 100644
index ddcd394..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0001-bookmarks-Check-for-return-value-of-fread.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From aa2176be32eed2578da82f34d31148f934c11c34 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 28 Jun 2017 17:03:45 -0700
-Subject: [PATCH] bookmarks: Check for return value of fread()
-
-Fixes below compiler error
-ignoring return value of 'fread', declared with attribute warn_unused_result
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/bookmarks/ephy-bookmark.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/bookmarks/ephy-bookmark.c b/src/bookmarks/ephy-bookmark.c
-index ff0239b..8633ce4 100644
---- a/src/bookmarks/ephy-bookmark.c
-+++ b/src/bookmarks/ephy-bookmark.c
-@@ -217,7 +217,8 @@ ephy_bookmark_init (EphyBookmark *self)
- bytes = g_malloc (num_bytes);
-
- fp = fopen ("/dev/urandom", "r");
-- fread (bytes, sizeof (guint8), num_bytes, fp);
-+ if (fread (bytes, sizeof (guint8), num_bytes, fp) != num_bytes)
-+ g_warning("Unable to read data from /dev/urandom\n");
-
- self->id = g_malloc0 (ID_LEN + 1);
- for (gsize i = 0; i < num_bytes; i++) {
---
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0001-yelp.m4-drop-the-check-for-itstool.patch b/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0001-yelp.m4-drop-the-check-for-itstool.patch
deleted file mode 100644
index 2585d7f..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0001-yelp.m4-drop-the-check-for-itstool.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 30f03a256efe375a4d5c3a24bf4168ebf380e3ab Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 30 Jul 2015 15:13:23 +0300
-Subject: [PATCH] yelp.m4: drop the check for itstool
-
-It isn't used for anything during build, so there's no need to provide
-it as a recipe.
-
-Upstream-Status: Inappropriate [tarball-specific issue]
----
- m4/yelp.m4 | 6 ------
- 1 file changed, 6 deletions(-)
-
-diff --git a/m4/yelp.m4 b/m4/yelp.m4
-index 5db847f..1b6ede4 100644
---- a/m4/yelp.m4
-+++ b/m4/yelp.m4
-@@ -27,12 +27,6 @@ AC_ARG_WITH([help-dir],
- HELP_DIR="$with_help_dir"
- AC_SUBST(HELP_DIR)
-
--AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
--AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
--if test x"$ITSTOOL" = x; then
-- AC_MSG_ERROR([itstool not found])
--fi
--
- AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
- AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
- if test x"$XMLLINT" = x; then
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0002-help-meson.build-disable-the-use-of-yelp.patch b/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0002-help-meson.build-disable-the-use-of-yelp.patch
new file mode 100644
index 0000000..249517d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0002-help-meson.build-disable-the-use-of-yelp.patch
@@ -0,0 +1,34 @@
+From fc314fc3a66c92fe73e1a0cea4f49d11b29e1f45 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 31 Jan 2018 15:50:38 +0200
+Subject: [PATCH 2/2] help/meson.build: disable the use of yelp
+
+In particular this avoids calling itstool which oe-core doesn't provide.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ help/meson.build | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/help/meson.build b/help/meson.build
+index f720add..cbfeb1e 100644
+--- a/help/meson.build
++++ b/help/meson.build
+@@ -46,8 +46,8 @@ help_linguas = [
+ 'sv'
+ ]
+
+-gnome.yelp(meson.project_name(),
+- sources: help_files,
+- media: help_media,
+- languages: help_linguas,
+-)
++#gnome.yelp(meson.project_name(),
++# sources: help_files,
++# media: help_media,
++# languages: help_linguas,
++#)
+--
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gcr/gcr_3.20.0.bb b/import-layers/yocto-poky/meta/recipes-gnome/gcr/gcr_3.20.0.bb
index 4450e15..a68e0f6 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gcr/gcr_3.20.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gcr/gcr_3.20.0.bb
@@ -8,7 +8,7 @@
DEPENDS = "intltool-native gtk+3 p11-kit glib-2.0 libgcrypt \
${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'libxslt-native', '', d)}"
-inherit autotools gnomebase gtk-icon-cache gtk-doc distro_features_check upstream-version-is-even vala gobject-introspection
+inherit gnomebase gtk-icon-cache gtk-doc distro_features_check upstream-version-is-even vala gobject-introspection
# depends on gtk+3, but also x11 through gtk+-x11
REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-without-libtiff-not-having-an-effect.patch b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-without-libtiff-not-having-an-effect.patch
new file mode 100644
index 0000000..2a54d8e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-without-libtiff-not-having-an-effect.patch
@@ -0,0 +1,27 @@
+From 460befc992adb32434b0408b453be39a6866ccf8 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 10 Oct 2017 14:33:18 +0300
+Subject: [PATCH] Fix --without-libtiff not having an effect.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=788770]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 315e0cc..98e780c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -676,7 +676,7 @@ if test x$gio_can_sniff = x; then
+ AC_DEFINE(GDK_PIXBUF_USE_GIO_MIME, 1, [Define if gio can sniff image data])
+ fi
+
+-AM_CONDITIONAL(HAVE_TIFF, test "x$libtiff_found" != x)
++AM_CONDITIONAL(HAVE_TIFF, test "x$libtiff_found" != xno)
+ AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
+ AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
+ AM_CONDITIONAL(HAVE_JASPER, test "x$LIBJASPER" != x)
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-queryloaders-Make-output-more-reproducible.patch b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-queryloaders-Make-output-more-reproducible.patch
deleted file mode 100644
index aa21419..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-queryloaders-Make-output-more-reproducible.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 1049fbd887e52f94afeb03fc7942c01c143ebdfc Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Fri, 9 Jun 2017 12:01:25 +0300
-Subject: [PATCH] queryloaders: Make output more reproducible
-
-Reproducible builds are good: Sort the output by module name so that
-same input always leads to same output.
-
-This should also make gdk-pixbuf-print-mime-types output and
-gdk-pixbuf-thumbnailer.thumbnailer reproducible.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=783592
-
-Upstream-Status: Submitted
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- gdk-pixbuf/queryloaders.c | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c
-index 395674a..4ac9b28 100644
---- a/gdk-pixbuf/queryloaders.c
-+++ b/gdk-pixbuf/queryloaders.c
-@@ -346,6 +346,7 @@ int main (int argc, char **argv)
- #ifdef USE_GMODULE
- const char *path;
- GDir *dir;
-+ GList *l, *modules = NULL;
-
- path = g_getenv ("GDK_PIXBUF_MODULEDIR");
- #ifdef G_OS_WIN32
-@@ -365,12 +366,19 @@ int main (int argc, char **argv)
- gint len = strlen (dent);
- if (len > SOEXT_LEN &&
- strcmp (dent + len - SOEXT_LEN, SOEXT) == 0) {
-+ modules = g_list_prepend (modules,
-+ g_strdup (dent));
-- if (!query_module (contents, path, dent))
-- success = FALSE;
- }
- }
- g_dir_close (dir);
- }
-+
-+ modules = g_list_sort (modules, (GCompareFunc)strcmp);
-+ for (l = modules; l != NULL; l = l->next)
-+ if (!query_module (contents, path, l->data))
-+ success = FALSE;
-+
-+ g_list_free_full (modules, g_free);
- #else
- g_string_append_printf (contents, "# dynamic loading of modules not supported\n");
- #endif
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch
index 70146c6..7d0d54b 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch
@@ -1,11 +1,20 @@
+From b6a7b30522455cab39a0b9ea8463313380146e70 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Tue, 1 Apr 2014 17:23:36 +0100
+Subject: [PATCH 3/4] gdk-pixbuf: add an option so that loader errors are fatal
+
If an environment variable is specified set the return value from main() to
non-zero if the loader had errors (missing libraries, generally).
Upstream-Status: Pending
Signed-off-by: Ross Burton <ross.burton@intel.com>
+---
+ gdk-pixbuf/queryloaders.c | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c
-index a9ca015..395674a 100644
+index a81c804..350bec8 100644
--- a/gdk-pixbuf/queryloaders.c
+++ b/gdk-pixbuf/queryloaders.c
@@ -146,7 +146,7 @@ write_loader_info (GString *contents, const char *path, GdkPixbufFormat *info)
@@ -47,17 +56,18 @@
#ifdef G_OS_WIN32
gchar *libdir;
-@@ -360,7 +365,8 @@ int main (int argc, char **argv)
- gint len = strlen (dent);
- if (len > SOEXT_LEN &&
- strcmp (dent + len - SOEXT_LEN, SOEXT) == 0) {
-- query_module (contents, path, dent);
-+ if (!query_module (contents, path, dent))
-+ success = FALSE;
- }
- }
- g_dir_close (dir);
-@@ -378,7 +384,8 @@ int main (int argc, char **argv)
+@@ -370,7 +375,9 @@ int main (int argc, char **argv)
+ }
+ modules = g_list_sort (modules, (GCompareFunc)strcmp);
+ for (l = modules; l != NULL; l = l->next)
+- query_module (contents, path, l->data);
++ if (!query_module (contents, path, l->data))
++ success = FALSE;
++
+ g_list_free_full (modules, g_free);
+ #else
+ g_string_append_printf (contents, "# dynamic loading of modules not supported\n");
+@@ -385,7 +392,8 @@ int main (int argc, char **argv)
infilename = g_locale_to_utf8 (infilename,
-1, NULL, NULL, NULL);
#endif
@@ -67,7 +77,7 @@
}
g_free (cwd);
}
-@@ -394,5 +401,8 @@ int main (int argc, char **argv)
+@@ -401,5 +409,8 @@ int main (int argc, char **argv)
else
g_print ("%s\n", contents->str);
@@ -77,3 +87,6 @@
+ else
+ return 0;
}
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb
new file mode 100644
index 0000000..99c84c6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb
@@ -0,0 +1,102 @@
+SUMMARY = "Image loading library for GTK+"
+HOMEPAGE = "http://www.gtk.org/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+ file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b"
+
+SECTION = "libs"
+
+DEPENDS = "glib-2.0 gdk-pixbuf-native shared-mime-info"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+ file://hardcoded_libtool.patch \
+ file://extending-libinstall-dependencies.patch \
+ file://run-ptest \
+ file://fatal-loader.patch \
+ file://0001-Work-around-thumbnailer-cross-compile-failure.patch \
+ file://0001-Fix-without-libtiff-not-having-an-effect.patch \
+ "
+
+SRC_URI[md5sum] = "6e84e5485c17ce7c25df77fe76eb2d6a"
+SRC_URI[sha256sum] = "ae62ab87250413156ed72ef756347b10208c00e76b222d82d9ed361ed9dde2f3"
+
+inherit autotools pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package
+
+LIBV = "2.10.0"
+
+GDK_PIXBUF_LOADERS ?= "png jpeg"
+
+PACKAGECONFIG ??= "${GDK_PIXBUF_LOADERS}"
+PACKAGECONFIG_linuxstdbase = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${GDK_PIXBUF_LOADERS}"
+PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}"
+
+PACKAGECONFIG[png] = "--with-libpng,--without-libpng,libpng"
+PACKAGECONFIG[jpeg] = "--with-libjpeg,--without-libjpeg,jpeg"
+PACKAGECONFIG[tiff] = "--with-libtiff,--without-libtiff,tiff"
+PACKAGECONFIG[jpeg2000] = "--with-libjasper,--without-libjasper,jasper"
+
+PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11"
+
+PACKAGES =+ "${PN}-xlib"
+
+# For GIO image type sniffing
+RDEPENDS_${PN} = "shared-mime-info"
+
+FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}"
+ALLOW_EMPTY_${PN}-xlib = "1"
+
+FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
+
+FILES_${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer"
+
+FILES_${PN}-dev += " \
+ ${bindir}/gdk-pixbuf-csource \
+ ${bindir}/gdk-pixbuf-pixdata \
+ ${bindir}/gdk-pixbuf-print-mime-types \
+ ${includedir}/* \
+ ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \
+"
+
+PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*"
+PACKAGES_DYNAMIC_class-native = ""
+
+python populate_packages_prepend () {
+ postinst_pixbufloader = d.getVar("postinst_pixbufloader")
+
+ loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders')
+
+ packages = ' '.join(do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s'))
+ d.setVar('PIXBUF_PACKAGES', packages)
+
+ # The test suite exercises all the loaders, so ensure they are all
+ # dependencies of the ptest package.
+ d.appendVar("RDEPENDS_%s-ptest" % d.getVar('PN'), " " + packages)
+}
+
+do_install_append() {
+ # Move gdk-pixbuf-query-loaders into libdir so it is always available
+ # in multilib builds.
+ mv ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/
+}
+
+do_install_append_class-native() {
+ find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \;
+
+ create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
+
+ create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
+
+ create_wrapper ${D}/${bindir}/gdk-pixbuf-print-mime-types \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
+
+ create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \
+ GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders
+}
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.8.bb b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.8.bb
deleted file mode 100644
index 8c35904..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.8.bb
+++ /dev/null
@@ -1,102 +0,0 @@
-SUMMARY = "Image loading library for GTK+"
-HOMEPAGE = "http://www.gtk.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b"
-
-SECTION = "libs"
-
-DEPENDS = "glib-2.0 gdk-pixbuf-native shared-mime-info"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
- file://hardcoded_libtool.patch \
- file://extending-libinstall-dependencies.patch \
- file://run-ptest \
- file://fatal-loader.patch \
- file://0001-Work-around-thumbnailer-cross-compile-failure.patch \
- file://0001-queryloaders-Make-output-more-reproducible.patch \
- "
-
-SRC_URI[md5sum] = "e0aaa0061eb12667b32b27472230b962"
-SRC_URI[sha256sum] = "5d68e5283cdc0bf9bda99c3e6a1d52ad07a03364fa186b6c26cfc86fcd396a19"
-
-inherit autotools pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package
-
-LIBV = "2.10.0"
-
-GDK_PIXBUF_LOADERS ?= "png jpeg"
-
-PACKAGECONFIG ??= "${GDK_PIXBUF_LOADERS}"
-PACKAGECONFIG_linuxstdbase = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${GDK_PIXBUF_LOADERS}"
-PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}"
-
-PACKAGECONFIG[png] = "--with-libpng,--without-libpng,libpng"
-PACKAGECONFIG[jpeg] = "--with-libjpeg,--without-libjpeg,jpeg"
-PACKAGECONFIG[tiff] = "--with-libtiff,--without-libtiff,tiff"
-PACKAGECONFIG[jpeg2000] = "--with-libjasper,--without-libjasper,jasper"
-
-PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11"
-
-PACKAGES =+ "${PN}-xlib"
-
-# For GIO image type sniffing
-RDEPENDS_${PN} = "shared-mime-info"
-
-FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}"
-ALLOW_EMPTY_${PN}-xlib = "1"
-
-FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
-
-FILES_${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer"
-
-FILES_${PN}-dev += " \
- ${bindir}/gdk-pixbuf-csource \
- ${bindir}/gdk-pixbuf-pixdata \
- ${bindir}/gdk-pixbuf-print-mime-types \
- ${includedir}/* \
- ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \
-"
-
-PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*"
-PACKAGES_DYNAMIC_class-native = ""
-
-python populate_packages_prepend () {
- postinst_pixbufloader = d.getVar("postinst_pixbufloader")
-
- loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders')
-
- packages = ' '.join(do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s'))
- d.setVar('PIXBUF_PACKAGES', packages)
-
- # The test suite exercises all the loaders, so ensure they are all
- # dependencies of the ptest package.
- d.appendVar("RDEPENDS_%s-ptest" % d.getVar('PN'), " " + packages)
-}
-
-do_install_append() {
- # Move gdk-pixbuf-query-loaders into libdir so it is always available
- # in multilib builds.
- mv ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/
-}
-
-do_install_append_class-native() {
- find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \;
-
- create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \
- GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
-
- create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \
- GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
-
- create_wrapper ${D}/${bindir}/gdk-pixbuf-print-mime-types \
- GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
-
- create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
- GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \
- GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders
-}
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/0001-Disable-libseccomp-sycall-filtering-mechanism.patch b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/0001-Disable-libseccomp-sycall-filtering-mechanism.patch
new file mode 100644
index 0000000..10b0743
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/0001-Disable-libseccomp-sycall-filtering-mechanism.patch
@@ -0,0 +1,38 @@
+From 9dfada06f8d2e02d7a04f793ba6e1d4a2aa5ffb7 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 5 Oct 2017 14:54:17 +0300
+Subject: [PATCH] Disable libseccomp (sycall filtering mechanism)
+
+Upstream forgot to make it optional, and it is not currently used in Yocto
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 11 -----------
+ 1 file changed, 11 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 86bcf1f..8911f19 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -157,17 +157,6 @@ else
+ fi
+
+ SECCOMP_PKG=""
+-dnl Check for bubblewrap compatible platform
+-case $host_os in
+- linux*)
+- PKG_CHECK_MODULES(LIBSECCOMP, [libseccomp])
+- SECCOMP_PKG="libseccomp"
+- AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define to include GNU extensions])
+- AC_DEFINE_UNQUOTED(HAVE_BWRAP, 1, [Define to 1 if Bubblewrap support is available])
+- AC_DEFINE([ENABLE_SECCOMP], [1], [Define if using seccomp])
+- AC_DEFINE_UNQUOTED(INSTALL_PREFIX, "$prefix", [Path to library install prefix])
+- ;;
+-esac
+
+ dnl pkg-config dependency checks
+
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/gnome-desktop-thumbnail-don-t-assume-time_t-is-long.patch b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/gnome-desktop-thumbnail-don-t-assume-time_t-is-long.patch
new file mode 100644
index 0000000..fcc152f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/gnome-desktop-thumbnail-don-t-assume-time_t-is-long.patch
@@ -0,0 +1,61 @@
+From 9048939b76b3bd10783adb79ed0aaf6cd13895cc Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 20:39:51 -0700
+Subject: [PATCH 1/2] gnome-desktop-thumbnail: don't convert time_t to long
+
+Explicitly use strftime+strptime rather than snprintf+atol. This fixes the
+build for X32, where long's size doesn't match that of time_t.
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
+
+Modify patch described above to eliminate replacement of
+
+g_snprintf (mtime_str, 21, "%" G_GINT64_FORMAT, (gint64) mtime)
+
+which is not necessary. Retain replacement of atol().
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+---
+ libgnome-desktop/gnome-desktop-thumbnail.c | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c
+index e56c3d7..5d96bf3 100644
+--- a/libgnome-desktop/gnome-desktop-thumbnail.c
++++ b/libgnome-desktop/gnome-desktop-thumbnail.c
+@@ -120,6 +120,8 @@
+ * Since: 2.2
+ */
+
++#define _XOPEN_SOURCE
++
+ #include <config.h>
+
+ #include <glib.h>
+@@ -1319,6 +1326,7 @@ gnome_desktop_thumbnail_is_valid (GdkPixbuf *pixbuf,
+ {
+ const char *thumb_uri, *thumb_mtime_str;
+ time_t thumb_mtime;
++ struct tm tmp_mtime;
+
+ thumb_uri = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::URI");
+ if (g_strcmp0 (uri, thumb_uri) != 0)
+@@ -1327,7 +1335,11 @@ gnome_desktop_thumbnail_is_valid (GdkPixbuf *pixbuf,
+ thumb_mtime_str = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::MTime");
+ if (!thumb_mtime_str)
+ return FALSE;
+- thumb_mtime = atol (thumb_mtime_str);
++ if (!strptime (thumb_mtime_str, "%s", &tmp_mtime))
++ return FALSE;
++ thumb_mtime = mktime (&tmp_mtime);
++ if (!thumb_mtime)
++ return FALSE;
+ if (mtime != thumb_mtime)
+ return FALSE;
+
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/gnome-desktop-thumbnail-don-t-convert-time_t-to-long.patch b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/gnome-desktop-thumbnail-don-t-convert-time_t-to-long.patch
deleted file mode 100644
index 18a069f..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/gnome-desktop-thumbnail-don-t-convert-time_t-to-long.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From adfa0c8f9fec1faac4bea6a94d947ea32e585923 Mon Sep 17 00:00:00 2001
-From: Christopher Larson <chris_larson@mentor.com>
-Date: Tue, 13 Dec 2016 20:39:51 -0700
-Subject: [PATCH] gnome-desktop-thumbnail: don't convert time_t to long
-
-Explicitly use strftime+strptime rather than snprintf+atol. This fixes the
-build for X32, where long's size doesn't match that of time_t.
-
-Upstream-Status: Pending
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
----
- libgnome-desktop/gnome-desktop-thumbnail.c | 16 ++++++++++++++--
- 1 file changed, 14 insertions(+), 2 deletions(-)
-
-diff --git a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c
-index 3946309..b756333 100644
---- a/libgnome-desktop/gnome-desktop-thumbnail.c
-+++ b/libgnome-desktop/gnome-desktop-thumbnail.c
-@@ -126,6 +126,8 @@
- * Since: 2.2
- */
-
-+#define _XOPEN_SOURCE
-+
- #include <config.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-@@ -1483,6 +1485,7 @@ save_thumbnail (GdkPixbuf *pixbuf,
- char *tmp_path = NULL;
- int tmp_fd;
- char mtime_str[21];
-+ struct tm *tmp_mtime = NULL;
- gboolean ret = FALSE;
- GError *error = NULL;
- const char *width, *height;
-@@ -1502,7 +1505,11 @@ save_thumbnail (GdkPixbuf *pixbuf,
- goto out;
- close (tmp_fd);
-
-- g_snprintf (mtime_str, 21, "%ld", mtime);
-+ tmp_mtime = localtime (&mtime);
-+ if (!tmp_mtime)
-+ goto out;
-+ strftime (mtime_str, 21, "%s", tmp_mtime);
-+ free (tmp_mtime);
- width = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::Image::Width");
- height = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::Image::Height");
-
-@@ -1695,6 +1702,7 @@ gnome_desktop_thumbnail_is_valid (GdkPixbuf *pixbuf,
- {
- const char *thumb_uri, *thumb_mtime_str;
- time_t thumb_mtime;
-+ struct tm tmp_mtime;
-
- thumb_uri = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::URI");
- if (!thumb_uri)
-@@ -1705,7 +1713,11 @@ gnome_desktop_thumbnail_is_valid (GdkPixbuf *pixbuf,
- thumb_mtime_str = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::MTime");
- if (!thumb_mtime_str)
- return FALSE;
-- thumb_mtime = atol (thumb_mtime_str);
-+ if (!strptime (thumb_mtime_str, "%s", &tmp_mtime))
-+ return FALSE;
-+ thumb_mtime = mktime (&tmp_mtime);
-+ if (!thumb_mtime)
-+ return FALSE;
- if (mtime != thumb_mtime)
- return FALSE;
-
---
-2.8.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.24.2.bb b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.24.2.bb
deleted file mode 100644
index 5c1c213..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.24.2.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "GNOME library for reading .desktop files"
-SECTION = "x11/gnome"
-LICENSE = "GPLv2 & LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-BPN = "gnome-desktop"
-
-inherit gnome pkgconfig upstream-version-is-even gobject-introspection
-SRC_URI[archive.md5sum] = "af7c6a243df7a335a010bdc05b34ca93"
-SRC_URI[archive.sha256sum] = "8fa1de66a6a75963bffc79b01a60434c71237d44c51beca09c0f714a032d785e"
-
-SRC_URI += "file://gnome-desktop-thumbnail-don-t-convert-time_t-to-long.patch \
- file://0001-configure.ac-Remove-gnome-common-macro-calls.patch \
-"
-
-DEPENDS += "intltool-native gsettings-desktop-schemas gconf virtual/libx11 gtk+3 glib-2.0 startup-notification xkeyboard-config iso-codes udev"
-
-inherit distro_features_check gtk-doc
-REQUIRED_DISTRO_FEATURES = "x11"
-
-EXTRA_OECONF = "--disable-desktop-docs"
-
-PACKAGES =+ "libgnome-desktop3"
-FILES_libgnome-desktop3 = "${libdir}/lib*${SOLIBS} ${datadir}/libgnome-desktop*/pnp.ids ${datadir}/gnome/*xml"
-
-RRECOMMENDS_libgnome-desktop3 += "gsettings-desktop-schemas"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.26.2.bb b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.26.2.bb
new file mode 100644
index 0000000..879dc9a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.26.2.bb
@@ -0,0 +1,29 @@
+SUMMARY = "GNOME library for reading .desktop files"
+SECTION = "x11/gnome"
+LICENSE = "GPLv2 & LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+BPN = "gnome-desktop"
+
+inherit gnome pkgconfig upstream-version-is-even gobject-introspection
+SRC_URI[archive.md5sum] = "6cee2ecd677d87eaa0eb5ebfa7b45fb3"
+SRC_URI[archive.sha256sum] = "f7561a7a313fc474b2c390cd9696df1f5c1e1556080e43f4afe042b1060e5f2a"
+
+SRC_URI += " \
+ file://gnome-desktop-thumbnail-don-t-assume-time_t-is-long.patch \
+ file://0001-configure.ac-Remove-gnome-common-macro-calls.patch \
+ file://0001-Disable-libseccomp-sycall-filtering-mechanism.patch \
+ "
+
+DEPENDS += "intltool-native gsettings-desktop-schemas gconf virtual/libx11 gtk+3 glib-2.0 startup-notification xkeyboard-config iso-codes udev"
+
+inherit distro_features_check gtk-doc
+REQUIRED_DISTRO_FEATURES = "x11"
+
+EXTRA_OECONF = "--disable-desktop-docs"
+
+PACKAGES =+ "libgnome-desktop3"
+FILES_libgnome-desktop3 = "${libdir}/lib*${SOLIBS} ${datadir}/libgnome-desktop*/pnp.ids ${datadir}/gnome/*xml"
+
+RRECOMMENDS_libgnome-desktop3 += "gsettings-desktop-schemas"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST.patch b/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST.patch
index e7ac97b..96ec96b 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST.patch
@@ -1,29 +1,27 @@
-From d2b9ad8a80bf9320fe35c9aee8f52e55ebd40e06 Mon Sep 17 00:00:00 2001
+From 88ed996cc9e2b296cacfdbeece4be28a90bab511 Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Tue, 30 May 2017 14:55:49 +0300
-Subject: [PATCH] Don't use AC_CANONICAL_HOST
+Subject: [PATCH 1/2] Don't use AC_CANONICAL_HOST
This won't work when building allarch (and is only used to find out if
target is windows).
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
---
configure.ac | 1 -
1 file changed, 1 deletion(-)
-diff --git a/configure.ac b/configure.ac
-index d855b7a..6908f59 100644
---- a/configure.ac
-+++ b/configure.ac
+Index: adwaita-icon-theme-3.26.1/configure.ac
+===================================================================
+--- adwaita-icon-theme-3.26.1.orig/configure.ac
++++ adwaita-icon-theme-3.26.1/configure.ac
@@ -3,7 +3,6 @@ AC_PREREQ(2.53)
- AC_INIT([adwaita-icon-theme], [3.24.0],
+ AC_INIT([adwaita-icon-theme], [3.26.1],
[http://bugzilla.gnome.org/enter_bug.cgi?product=adwaita-icon-theme])
-AC_CANONICAL_HOST
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([index.theme.in])
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.24.0.bb b/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.24.0.bb
deleted file mode 100644
index d340536..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.24.0.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "GTK+ icon theme"
-HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/adwaita-icon-theme/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "x11/gnome"
-
-LICENSE = "LGPL-3.0 | CC-BY-SA-3.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c84cac88e46fc07647ea07e6c24eeb7c"
-
-inherit allarch autotools pkgconfig gettext gtk-icon-cache upstream-version-is-even
-
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
- file://0001-Don-t-use-AC_CANONICAL_HOST.patch \
- file://0001-Run-installation-commands-as-shell-jobs.patch \
- "
-
-SRC_URI[md5sum] = "3ccac0d600ffc936d2adfb80e9245bc5"
-SRC_URI[sha256sum] = "ccf79ff3bd340254737ce4d28b87f0ccee4b3358cd3cd5cd11dc7b42f41b272a"
-
-do_install_append() {
- # Build uses gtk-encode-symbolic-svg to create png versions:
- # no need to store the svgs anymore.
- rm -f ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic.svg \
- ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic-rtl.svg
-}
-
-PACKAGES = "${PN}-cursors ${PN}-symbolic-hires ${PN}-symbolic ${PN}-hires ${PN}"
-
-RREPLACES_${PN} = "gnome-icon-theme"
-RCONFLICTS_${PN} = "gnome-icon-theme"
-RPROVIDES_${PN} = "gnome-icon-theme"
-
-FILES_${PN}-cursors = "${prefix}/share/icons/Adwaita/cursors/"
-FILES_${PN}-symbolic-hires = "${prefix}/share/icons/Adwaita/96x96/*/*.symbolic.png \
- ${prefix}/share/icons/Adwaita/64x64/*/*.symbolic.png \
- ${prefix}/share/icons/Adwaita/48x48/*/*.symbolic.png \
- ${prefix}/share/icons/Adwaita/32x32/*/*.symbolic.png"
-FILES_${PN}-symbolic = "${prefix}/share/icons/Adwaita/16x16/*/*.symbolic.png \
- ${prefix}/share/icons/Adwaita/24x24/*/*.symbolic.png"
-FILES_${PN}-hires = "${prefix}/share/icons/Adwaita/256x256/ \
- ${prefix}/share/icons/Adwaita/512x512/"
-FILES_${PN} = "${prefix}/share/icons/Adwaita/ \
- ${prefix}/share/pkgconfig/adwaita-icon-theme.pc"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.26.1.bb b/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.26.1.bb
new file mode 100644
index 0000000..6437d5e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.26.1.bb
@@ -0,0 +1,44 @@
+SUMMARY = "GTK+ icon theme"
+HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/adwaita-icon-theme/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/gnome"
+
+LICENSE = "LGPL-3.0 | CC-BY-SA-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c84cac88e46fc07647ea07e6c24eeb7c"
+
+inherit allarch autotools pkgconfig gettext gtk-icon-cache upstream-version-is-even
+
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+ file://0001-Don-t-use-AC_CANONICAL_HOST.patch \
+ file://0001-Run-installation-commands-as-shell-jobs.patch \
+ "
+
+SRC_URI[md5sum] = "3ef87e789711e5130792d4b5366c005d"
+SRC_URI[sha256sum] = "28ba7392c7761996efd780779167ea6c940eedfb1bf37cfe9bccb7021f54d79d"
+
+do_install_append() {
+ # Build uses gtk-encode-symbolic-svg to create png versions:
+ # no need to store the svgs anymore.
+ rm -f ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic.svg \
+ ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic-rtl.svg
+}
+
+PACKAGES = "${PN}-cursors ${PN}-symbolic-hires ${PN}-symbolic ${PN}-hires ${PN}"
+
+RREPLACES_${PN} = "gnome-icon-theme"
+RCONFLICTS_${PN} = "gnome-icon-theme"
+RPROVIDES_${PN} = "gnome-icon-theme"
+
+FILES_${PN}-cursors = "${prefix}/share/icons/Adwaita/cursors/"
+FILES_${PN}-symbolic-hires = "${prefix}/share/icons/Adwaita/96x96/*/*.symbolic.png \
+ ${prefix}/share/icons/Adwaita/64x64/*/*.symbolic.png \
+ ${prefix}/share/icons/Adwaita/48x48/*/*.symbolic.png \
+ ${prefix}/share/icons/Adwaita/32x32/*/*.symbolic.png"
+FILES_${PN}-symbolic = "${prefix}/share/icons/Adwaita/16x16/*/*.symbolic.png \
+ ${prefix}/share/icons/Adwaita/24x24/*/*.symbolic.png"
+FILES_${PN}-hires = "${prefix}/share/icons/Adwaita/256x256/ \
+ ${prefix}/share/icons/Adwaita/512x512/"
+FILES_${PN} = "${prefix}/share/icons/Adwaita/ \
+ ${prefix}/share/pkgconfig/adwaita-icon-theme.pc"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gconf/create_config_directory.patch b/import-layers/yocto-poky/meta/recipes-gnome/gnome/gconf/create_config_directory.patch
new file mode 100644
index 0000000..cd72e73
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome/gconf/create_config_directory.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+In some circumstances, gconf isn't able to save configurations
+because ~/.config folder aka root_dir doesn't exist.
+This issue was not seen before because ~/.config directory is shared
+between several packages and one of those packages usually creates it
+by the time gconf wants to use it.
+
+This patch makes sure that gconf creates the .config directory if it
+doesn't exist, along with the gconf directory inside it.
+
+Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com>
+Signed-off-by: Alejandro Hernandez <alejandr@xilinx.com>
+
+
+Index: GConf-3.2.6/backends/markup-backend.c
+===================================================================
+--- GConf-3.2.6.orig/backends/markup-backend.c
++++ GConf-3.2.6/backends/markup-backend.c
+@@ -276,7 +276,7 @@ resolve_address (const char *address,
+ /* dir_mode without search bits */
+ file_mode = dir_mode & (~0111);
+ }
+- else if (g_mkdir (root_dir, dir_mode) < 0)
++ else if (g_mkdir_with_parents (root_dir, dir_mode) < 0)
+ {
+ /* Error out even on EEXIST - shouldn't happen anyway */
+ gconf_set_error (err, GCONF_ERROR_FAILED,
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb b/import-layers/yocto-poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb
index 92fd12c..120ae3e 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb
@@ -11,6 +11,7 @@
SRC_URI = "${GNOME_MIRROR}/GConf/${@gnome_verdir("${PV}")}/GConf-${PV}.tar.xz;name=archive \
file://remove_plus_from_invalid_characters_list.patch \
file://unable-connect-dbus.patch \
+ file://create_config_directory.patch \
"
SRC_URI[archive.md5sum] = "2b16996d0e4b112856ee5c59130e822c"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch
new file mode 100644
index 0000000..4ec527d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch
@@ -0,0 +1,73 @@
+From e48f1e18f5ea41656f0ba10fe61d69d2604b0064 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 3 Jan 2018 17:02:01 +0200
+Subject: [PATCH] giscanner: add a --lib-dirs-envvar option
+
+By default LD_LIBRARY_PATH is set to the list of target library paths;
+this breaks down in cross-compilation environment, as we need to run a
+native emulation wrapper rather than the target binary itself. This patch
+allows exporting those paths to a different environment variable
+which can be picked up and used by the wrapper.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ giscanner/ccompiler.py | 4 ++--
+ giscanner/dumper.py | 3 ++-
+ giscanner/scannermain.py | 3 +++
+ 3 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
+index 29de0ee..928eae8 100644
+--- a/giscanner/ccompiler.py
++++ b/giscanner/ccompiler.py
+@@ -109,7 +109,7 @@ class CCompiler(object):
+
+ self._cflags_no_deprecation_warnings = "-Wno-deprecated-declarations"
+
+- def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths):
++ def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths, lib_dirs_envvar):
+ # An "internal" link is where the library to be introspected
+ # is being built in the current directory.
+
+@@ -119,7 +119,7 @@ class CCompiler(object):
+ if self.check_is_msvc():
+ runtime_path_envvar = ['LIB', 'PATH']
+ else:
+- runtime_path_envvar = ['LD_LIBRARY_PATH']
++ runtime_path_envvar = ['LD_LIBRARY_PATH'] if not lib_dirs_envvar else [lib_dirs_envvar]
+ # Search the current directory first
+ # (This flag is not supported nor needed for Visual C++)
+ args.append('-L.')
+diff --git a/giscanner/dumper.py b/giscanner/dumper.py
+index 7f77bd2..db96df6 100644
+--- a/giscanner/dumper.py
++++ b/giscanner/dumper.py
+@@ -259,7 +259,8 @@ class DumpCompiler(object):
+ libtool,
+ self._options.libraries,
+ self._options.extra_libraries,
+- self._options.library_paths)
++ self._options.library_paths,
++ self._options.lib_dirs_envvar)
+ args.extend(pkg_config_libs)
+
+ else:
+diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
+index 38a45c1..b603850 100755
+--- a/giscanner/scannermain.py
++++ b/giscanner/scannermain.py
+@@ -130,6 +130,9 @@ def _get_option_parser():
+ parser.add_option("", "--use-ldd-wrapper",
+ action="store", dest="ldd_wrapper", default=None,
+ help="wrapper to use instead of ldd (useful when cross-compiling)")
++ parser.add_option("", "--lib-dirs-envvar",
++ action="store", dest="lib_dirs_envvar", default=None,
++ help="environment variable to write a list of library directories to (for running the transient binary), instead of standard LD_LIBRARY_PATH")
+ parser.add_option("", "--program-arg",
+ action="append", dest="program_args", default=[],
+ help="extra arguments to program")
+--
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch
index 48a0c85..c682b42 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch
@@ -32,10 +32,10 @@
tests/Makefile.am | 5 ++++-
4 files changed, 87 insertions(+), 1 deletion(-)
-diff --git a/Makefile.am b/Makefile.am
-index b080a89..ce8d29b 100644
---- a/Makefile.am
-+++ b/Makefile.am
+Index: gobject-introspection-1.52.1/Makefile.am
+===================================================================
+--- gobject-introspection-1.52.1.orig/Makefile.am
++++ gobject-introspection-1.52.1/Makefile.am
@@ -21,7 +21,9 @@ include Makefile-cmph.am
include Makefile-girepository.am
include Makefile-giscanner.am
@@ -46,10 +46,10 @@
include Makefile-tools.am
include Makefile-msvcproj.am
-diff --git a/common.mk b/common.mk
-index e26c637..9f3a65f 100644
---- a/common.mk
-+++ b/common.mk
+Index: gobject-introspection-1.52.1/common.mk
+===================================================================
+--- gobject-introspection-1.52.1.orig/common.mk
++++ gobject-introspection-1.52.1/common.mk
@@ -6,6 +6,15 @@
# module itself.
#
@@ -130,13 +130,13 @@
INTROSPECTION_DOCTOOL_ARGS = \
--add-include-path=$(srcdir) \
-diff --git a/configure.ac b/configure.ac
-index 6c91fa5..21340a5 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -360,6 +360,48 @@ fi
-
- AC_SUBST(EXTRA_LINK_FLAGS)
+Index: gobject-introspection-1.52.1/configure.ac
+===================================================================
+--- gobject-introspection-1.52.1.orig/configure.ac
++++ gobject-introspection-1.52.1/configure.ac
+@@ -366,6 +366,48 @@ dnl
+ AM_CONDITIONAL(MSVC_BASE_NO_TOOLSET_SET, [test x$MSVC_BASE_TOOLSET = x])
+ AM_CONDITIONAL(MSVC_NO_TOOLSET_SET, [test x$MSVC_TOOLSET = x])
+AC_ARG_ENABLE([host-gi],
+[AS_HELP_STRING([--enable-host-gi],[Use gobject introspection tools installed in the host system (useful when cross-compiling)])],
@@ -183,10 +183,10 @@
AC_CONFIG_FILES([
Makefile
tests/Makefile
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index bdd0fa7..75dd3c9 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
+Index: gobject-introspection-1.52.1/tests/Makefile.am
+===================================================================
+--- gobject-introspection-1.52.1.orig/tests/Makefile.am
++++ gobject-introspection-1.52.1/tests/Makefile.am
@@ -1,6 +1,9 @@
include $(top_srcdir)/common.mk
@@ -198,6 +198,3 @@
EXTRA_DIST=
BUILT_SOURCES=
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.52.1.bb b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.52.1.bb
deleted file mode 100644
index 3fe71a3..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.52.1.bb
+++ /dev/null
@@ -1,188 +0,0 @@
-SUMMARY = "Middleware layer between GObject-using C libraries and language bindings"
-HOMEPAGE = "https://wiki.gnome.org/action/show/Projects/GObjectIntrospection"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "libs"
-LICENSE = "LGPLv2+ & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=90d577535a3898e1ae5dbf0ae3509a8c \
- file://tools/compiler.c;endline=20;md5=fc5007fc20022720e6c0b0cdde41fabd \
- file://giscanner/sourcescanner.c;endline=22;md5=194d6e0c1d00662f32d030ce44de8d39 \
- file://girepository/giregisteredtypeinfo.c;endline=21;md5=661847611ae6979465415f31a759ba27"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/1.52/${BPN}-${PV}.tar.xz \
- file://0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch \
- file://0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch \
- file://0003-giscanner-add-use-binary-wrapper-option.patch \
- file://0004-giscanner-add-a-use-ldd-wrapper-option.patch \
- file://0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch \
- "
-SRC_URI[md5sum] = "34157073991f9eeb0ed953351b65eb61"
-SRC_URI[sha256sum] = "2ed0c38d52fe1aa6fc4def0c868fe481cb87b532fc694756b26d6cfab29faff4"
-
-inherit autotools pkgconfig gtk-doc python3native qemu gobject-introspection-data upstream-version-is-even
-BBCLASSEXTEND = "native"
-
-# needed for writing out the qemu wrapper script
-export STAGING_DIR_HOST
-export B
-
-DEPENDS_append = " libffi zlib glib-2.0 python3 flex-native bison-native"
-
-# target build needs qemu to run temporary introspection binaries created
-# on the fly by g-ir-scanner and a native version of itself to run
-# native versions of its own tools during build.
-# Also prelink-rtld is used to find out library dependencies of introspection binaries
-# (standard ldd doesn't work when cross-compiling).
-DEPENDS_class-target_append = " gobject-introspection-native qemu-native prelink-native"
-
-SSTATE_SCAN_FILES += "g-ir-scanner-qemuwrapper g-ir-scanner-wrapper g-ir-compiler-wrapper g-ir-scanner-lddwrapper Gio-2.0.gir postinst-ldsoconf-${PN}"
-
-do_configure_prepend_class-native() {
- # Tweak the native python scripts so that they don't refer to the
- # full path of native python binary (the solution is taken from glib-2.0 recipe)
- # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes)
- sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in
-}
-
-do_configure_prepend_class-target() {
- # Write out a qemu wrapper that will be given to gi-scanner so that it
- # can run target helper binaries through that.
- qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
- cat > ${B}/g-ir-scanner-qemuwrapper << EOF
-#!/bin/sh
-# Use a modules directory which doesn't exist so we don't load random things
-# which may then get deleted (or their dependencies) and potentially segfault
-export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy
-
-$qemu_binary "\$@"
-if [ \$? -ne 0 ]; then
- echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help."
- echo "(typically like this: GIR_EXTRA_LIBS_PATH=\"$""{B}/something/.libs\" )"
- exit 1
-fi
-EOF
- chmod +x ${B}/g-ir-scanner-qemuwrapper
-
- # 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
- # from the target sysroot.
- cat > ${B}/g-ir-scanner-wrapper << EOF
-#!/bin/sh
-# This prevents g-ir-scanner from writing cache data to $HOME
-export GI_SCANNER_DISABLE_CACHE=1
-
-g-ir-scanner --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 "\$@"
-EOF
- chmod +x ${B}/g-ir-scanner-wrapper
-
- # Write out a wrapper for g-ir-compiler, which runs the target version of it through qemu.
- # g-ir-compiler writes out the raw content of a C struct to disk, and therefore is architecture dependent.
- cat > ${B}/g-ir-compiler-wrapper << EOF
-#!/bin/sh
-${STAGING_BINDIR}/g-ir-scanner-qemuwrapper ${STAGING_BINDIR}/g-ir-compiler "\$@"
-EOF
- chmod +x ${B}/g-ir-compiler-wrapper
-
- # Write out a wrapper to use instead of ldd, which does not work when a binary is built
- # for a different architecture
- cat > ${B}/g-ir-scanner-lddwrapper << EOF
-#!/bin/sh
-prelink-rtld --root=$STAGING_DIR_HOST "\$@"
-EOF
- chmod +x ${B}/g-ir-scanner-lddwrapper
-
- # Also tweak the target python scripts so that they don't refer to the
- # native version of python binary (the solution is taken from glib-2.0 recipe)
- sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in
-}
-
-# Configure target build to use native tools of itself and to use a qemu wrapper
-# and optionally to generate introspection data
-EXTRA_OECONF_class-target += "--enable-host-gi \
- --disable-static \
- --enable-gi-cross-wrapper=${B}/g-ir-scanner-qemuwrapper \
- --enable-gi-ldd-wrapper=${B}/g-ir-scanner-lddwrapper \
- ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection-data', '--disable-introspection-data', d)} \
- "
-
-PACKAGECONFIG ?= ""
-PACKAGECONFIG[doctool] = "--enable-doctool,--disable-doctool,python3-mako,"
-
-do_compile_prepend() {
- # This prevents g-ir-scanner from writing cache data to $HOME
- export GI_SCANNER_DISABLE_CACHE=1
-
- # Needed to run g-ir unit tests, which won't be able to find the built libraries otherwise
- export GIR_EXTRA_LIBS_PATH=$B/.libs
-}
-
-# 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}/
- install ${B}/g-ir-scanner-qemuwrapper ${D}${bindir}/
- install ${B}/g-ir-scanner-wrapper ${D}${bindir}/
- install ${B}/g-ir-compiler-wrapper ${D}${bindir}/
- install ${B}/g-ir-scanner-lddwrapper ${D}${bindir}/
-}
-
-# .typelib files are needed at runtime and so they go to the main package
-FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib"
-
-# .gir files go to dev package, as they're needed for developing (but not for running)
-# things that depends on introspection.
-FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir"
-
-# These are used by gobject-based packages
-# to generate transient introspection binaries
-FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/gdump.c \
- ${datadir}/gobject-introspection-1.0/Makefile.introspection"
-
-# These are used by dependent packages (e.g. pygobject) to build their
-# testsuites.
-FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/tests/*.c \
- ${datadir}/gobject-introspection-1.0/tests/*.h"
-
-FILES_${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/"
-FILES_${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a"
-
-# we need target versions of introspection tools in sysroot so that they can be run via qemu
-# when building introspection files in other packages
-SYSROOT_DIRS_append_class-target = " ${bindir}"
-
-SYSROOT_PREPROCESS_FUNCS_append_class-target = " gi_binaries_sysroot_preprocess"
-gi_binaries_sysroot_preprocess() {
- # Tweak the binary names in the introspection pkgconfig file, so that it
- # picks up our wrappers which do the cross-compile and qemu magic.
- sed -i \
- -e "s|g_ir_scanner=.*|g_ir_scanner=${bindir}/g-ir-scanner-wrapper|" \
- -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \
- ${SYSROOT_DESTDIR}${libdir}/pkgconfig/gobject-introspection-1.0.pc
-}
-
-# Need to ensure ld.so.conf exists so prelink-native works
-# both before we build and if we install from sstate
-do_configure[prefuncs] += "gobject_introspection_preconfigure"
-python gobject_introspection_preconfigure () {
- oe.utils.write_ld_so_conf(d)
-}
-
-SYSROOT_PREPROCESS_FUNCS_append = " gi_ldsoconf_sysroot_preprocess"
-gi_ldsoconf_sysroot_preprocess () {
- mkdir -p ${SYSROOT_DESTDIR}${bindir}
- dest=${SYSROOT_DESTDIR}${bindir}/postinst-ldsoconf-${PN}
- echo "#!/bin/sh" > $dest
- echo "mkdir -p ${STAGING_DIR_TARGET}${sysconfdir}" >> $dest
- echo "echo ${base_libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest
- echo "echo ${libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest
- chmod 755 $dest
-}
-
-# Remove wrapper files from the package, only used for cross-compiling
-PACKAGE_PREPROCESS_FUNCS += "gi_package_preprocess"
-gi_package_preprocess() {
- rm -f ${PKGD}${bindir}/g-ir-scanner-qemuwrapper
- rm -f ${PKGD}${bindir}/g-ir-scanner-wrapper
- rm -f ${PKGD}${bindir}/g-ir-compiler-wrapper
- rm -f ${PKGD}${bindir}/g-ir-scanner-lddwrapper
-}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.54.1.bb b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.54.1.bb
new file mode 100644
index 0000000..85c8001
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.54.1.bb
@@ -0,0 +1,190 @@
+SUMMARY = "Middleware layer between GObject-using C libraries and language bindings"
+HOMEPAGE = "https://wiki.gnome.org/action/show/Projects/GObjectIntrospection"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "libs"
+LICENSE = "LGPLv2+ & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=90d577535a3898e1ae5dbf0ae3509a8c \
+ file://tools/compiler.c;endline=20;md5=fc5007fc20022720e6c0b0cdde41fabd \
+ file://giscanner/sourcescanner.c;endline=22;md5=194d6e0c1d00662f32d030ce44de8d39 \
+ file://girepository/giregisteredtypeinfo.c;endline=21;md5=661847611ae6979465415f31a759ba27"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/1.54/${BPN}-${PV}.tar.xz \
+ file://0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch \
+ file://0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch \
+ file://0003-giscanner-add-use-binary-wrapper-option.patch \
+ file://0004-giscanner-add-a-use-ldd-wrapper-option.patch \
+ file://0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch \
+ file://0001-giscanner-add-a-lib-dirs-envvar-option.patch \
+ "
+SRC_URI[md5sum] = "126c29e4d54adbed2ed4e2b04483de41"
+SRC_URI[sha256sum] = "b88ded5e5f064ab58a93aadecd6d58db2ec9d970648534c63807d4f9a7bb877e"
+
+inherit autotools pkgconfig gtk-doc python3native qemu gobject-introspection-data upstream-version-is-even
+BBCLASSEXTEND = "native"
+
+# needed for writing out the qemu wrapper script
+export STAGING_DIR_HOST
+export B
+
+DEPENDS_append = " libffi zlib glib-2.0 python3 flex-native bison-native"
+
+# target build needs qemu to run temporary introspection binaries created
+# on the fly by g-ir-scanner and a native version of itself to run
+# native versions of its own tools during build.
+# Also prelink-rtld is used to find out library dependencies of introspection binaries
+# (standard ldd doesn't work when cross-compiling).
+DEPENDS_class-target_append = " gobject-introspection-native qemu-native prelink-native"
+
+SSTATE_SCAN_FILES += "g-ir-scanner-qemuwrapper g-ir-scanner-wrapper g-ir-compiler-wrapper g-ir-scanner-lddwrapper Gio-2.0.gir postinst-ldsoconf-${PN}"
+
+do_configure_prepend_class-native() {
+ # Tweak the native python scripts so that they don't refer to the
+ # full path of native python binary (the solution is taken from glib-2.0 recipe)
+ # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes)
+ sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in
+}
+
+do_configure_prepend_class-target() {
+ # Write out a qemu wrapper that will be given to gi-scanner so that it
+ # can run target helper binaries through that.
+ qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
+ cat > ${B}/g-ir-scanner-qemuwrapper << EOF
+#!/bin/sh
+# Use a modules directory which doesn't exist so we don't load random things
+# which may then get deleted (or their dependencies) and potentially segfault
+export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy
+
+$qemu_binary "\$@"
+if [ \$? -ne 0 ]; then
+ echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help."
+ echo "(typically like this: GIR_EXTRA_LIBS_PATH=\"$""{B}/something/.libs\" )"
+ exit 1
+fi
+EOF
+ chmod +x ${B}/g-ir-scanner-qemuwrapper
+
+ # 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
+ # from the target sysroot.
+ cat > ${B}/g-ir-scanner-wrapper << EOF
+#!/bin/sh
+# This prevents g-ir-scanner from writing cache data to $HOME
+export GI_SCANNER_DISABLE_CACHE=1
+
+g-ir-scanner --lib-dirs-envvar=GIR_EXTRA_LIBS_PATH --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 "\$@"
+EOF
+ chmod +x ${B}/g-ir-scanner-wrapper
+
+ # Write out a wrapper for g-ir-compiler, which runs the target version of it through qemu.
+ # g-ir-compiler writes out the raw content of a C struct to disk, and therefore is architecture dependent.
+ cat > ${B}/g-ir-compiler-wrapper << EOF
+#!/bin/sh
+${STAGING_BINDIR}/g-ir-scanner-qemuwrapper ${STAGING_BINDIR}/g-ir-compiler "\$@"
+EOF
+ chmod +x ${B}/g-ir-compiler-wrapper
+
+ # Write out a wrapper to use instead of ldd, which does not work when a binary is built
+ # for a different architecture
+ cat > ${B}/g-ir-scanner-lddwrapper << EOF
+#!/bin/sh
+prelink-rtld --root=$STAGING_DIR_HOST "\$@"
+EOF
+ chmod +x ${B}/g-ir-scanner-lddwrapper
+
+ # Also tweak the target python scripts so that they don't refer to the
+ # native version of python binary (the solution is taken from glib-2.0 recipe)
+ sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in
+}
+
+# Configure target build to use native tools of itself and to use a qemu wrapper
+# and optionally to generate introspection data
+EXTRA_OECONF_class-target += "--enable-host-gi \
+ --disable-static \
+ --enable-gi-cross-wrapper=${B}/g-ir-scanner-qemuwrapper \
+ --enable-gi-ldd-wrapper=${B}/g-ir-scanner-lddwrapper \
+ ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection-data', '--disable-introspection-data', d)} \
+ "
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[doctool] = "--enable-doctool,--disable-doctool,python3-mako,"
+
+do_compile_prepend() {
+ # This prevents g-ir-scanner from writing cache data to $HOME
+ export GI_SCANNER_DISABLE_CACHE=1
+
+ # Needed to run g-ir unit tests, which won't be able to find the built libraries otherwise
+ export GIR_EXTRA_LIBS_PATH=$B/.libs
+}
+
+# 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}/
+ install ${B}/g-ir-scanner-qemuwrapper ${D}${bindir}/
+ install ${B}/g-ir-scanner-wrapper ${D}${bindir}/
+ install ${B}/g-ir-compiler-wrapper ${D}${bindir}/
+ install ${B}/g-ir-scanner-lddwrapper ${D}${bindir}/
+}
+
+# .typelib files are needed at runtime and so they go to the main package
+FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib"
+
+# .gir files go to dev package, as they're needed for developing (but not for running)
+# things that depends on introspection.
+FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir"
+FILES_${PN}-dev_append = " ${datadir}/gir-*/*.rnc"
+
+# These are used by gobject-based packages
+# to generate transient introspection binaries
+FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/gdump.c \
+ ${datadir}/gobject-introspection-1.0/Makefile.introspection"
+
+# These are used by dependent packages (e.g. pygobject) to build their
+# testsuites.
+FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/tests/*.c \
+ ${datadir}/gobject-introspection-1.0/tests/*.h"
+
+FILES_${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/"
+FILES_${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a"
+
+# we need target versions of introspection tools in sysroot so that they can be run via qemu
+# when building introspection files in other packages
+SYSROOT_DIRS_append_class-target = " ${bindir}"
+
+SYSROOT_PREPROCESS_FUNCS_append_class-target = " gi_binaries_sysroot_preprocess"
+gi_binaries_sysroot_preprocess() {
+ # Tweak the binary names in the introspection pkgconfig file, so that it
+ # picks up our wrappers which do the cross-compile and qemu magic.
+ sed -i \
+ -e "s|g_ir_scanner=.*|g_ir_scanner=${bindir}/g-ir-scanner-wrapper|" \
+ -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \
+ ${SYSROOT_DESTDIR}${libdir}/pkgconfig/gobject-introspection-1.0.pc
+}
+
+# Need to ensure ld.so.conf exists so prelink-native works
+# both before we build and if we install from sstate
+do_configure[prefuncs] += "gobject_introspection_preconfigure"
+python gobject_introspection_preconfigure () {
+ oe.utils.write_ld_so_conf(d)
+}
+
+SYSROOT_PREPROCESS_FUNCS_append = " gi_ldsoconf_sysroot_preprocess"
+gi_ldsoconf_sysroot_preprocess () {
+ mkdir -p ${SYSROOT_DESTDIR}${bindir}
+ dest=${SYSROOT_DESTDIR}${bindir}/postinst-ldsoconf-${PN}
+ echo "#!/bin/sh" > $dest
+ echo "mkdir -p ${STAGING_DIR_TARGET}${sysconfdir}" >> $dest
+ echo "echo ${base_libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest
+ echo "echo ${libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest
+ chmod 755 $dest
+}
+
+# Remove wrapper files from the package, only used for cross-compiling
+PACKAGE_PREPROCESS_FUNCS += "gi_package_preprocess"
+gi_package_preprocess() {
+ rm -f ${PKGD}${bindir}/g-ir-scanner-qemuwrapper
+ rm -f ${PKGD}${bindir}/g-ir-scanner-wrapper
+ rm -f ${PKGD}${bindir}/g-ir-compiler-wrapper
+ rm -f ${PKGD}${bindir}/g-ir-scanner-lddwrapper
+}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.22.0.bb b/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.22.0.bb
deleted file mode 100644
index d84a4f3..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.22.0.bb
+++ /dev/null
@@ -1,13 +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 intltool-native"
-
-inherit gnomebase gsettings gettext gobject-introspection upstream-version-is-even
-
-SRC_URI[archive.md5sum] = "5b9056ab6eff42a0117f2912edff5f20"
-SRC_URI[archive.sha256sum] = "0f06c7ba34c3a99e4d58b10889496133c9aaad6698ea2d8405d481c7f1a7eae1"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.24.1.bb b/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.24.1.bb
new file mode 100644
index 0000000..b61fd24
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.24.1.bb
@@ -0,0 +1,13 @@
+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 intltool-native"
+
+inherit gnomebase gsettings gettext gobject-introspection upstream-version-is-even
+
+SRC_URI[archive.md5sum] = "796b6ac1eff450261edd521b72e7fe6d"
+SRC_URI[archive.sha256sum] = "76a3fa309f9de6074d66848987214f0b128124ba7184c958c15ac78a8ac7eea7"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch
index 1ae728e..9eb7f6b 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch
@@ -3,19 +3,20 @@
Updated to apply to gtk+-2.24.15
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd gtk+-2.24.15/configure.ac gtk+-2.24.15/configure.ac
---- gtk+-2.24.15/configure.ac 2013-01-12 20:52:54.000000000 +0200
-+++ gtk+-2.24.15/configure.ac 2013-02-12 21:33:30.689925967 +0200
-@@ -415,7 +415,7 @@
+Index: gtk+-2.24.31/configure.ac
+===================================================================
+--- gtk+-2.24.31.orig/configure.ac
++++ gtk+-2.24.31/configure.ac
+@@ -415,7 +415,7 @@ AC_MSG_CHECKING([Whether to write depend
case $enable_explicit_deps in
auto)
export SED
- deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
+ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
- enable_explicit_deps=yes
+ enable_explicit_deps=yes
else
-@@ -774,7 +774,7 @@
+@@ -772,7 +772,7 @@ else
dnl Now we check to see if our libtool supports shared lib deps
dnl (in a rather ugly way even)
if $dynworks; then
@@ -24,7 +25,7 @@
module_deplibs_check=`$module_libtool_config | \
grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
-@@ -1574,7 +1574,7 @@
+@@ -1579,7 +1579,7 @@ fi
# We are using gmodule-no-export now, but I'm leaving the stripping
# code in place for now, since pango and atk still require gmodule.
export SED
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc
index 0a357db..420ead2 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc
@@ -35,7 +35,6 @@
--enable-modules \
--disable-cups \
--disable-colord \
- WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT} \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "", "--disable-gtk-doc", d)} \
"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch
index ab7b659..cc7edf7 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch
@@ -1,4 +1,4 @@
-From 2d2361f24be1e51201063dbbda570debe8702b6f Mon Sep 17 00:00:00 2001
+From 23a563155406980dfc8cf6f7c2da6cce0ac310f0 Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Fri, 16 Oct 2015 16:35:16 +0300
Subject: [PATCH 2/4] Do not try to initialize GL without libGL
@@ -15,29 +15,29 @@
Upstream-Status: Denied
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
---
- configure.ac | 7 +++++++
+ configure.ac | 6 ++++++
gdk/x11/gdkvisual-x11.c | 5 +++++
- 2 files changed, 12 insertions(+)
+ 2 files changed, 11 insertions(+)
diff --git a/configure.ac b/configure.ac
-index f43ac09..965eec9 100644
+index 757fd7c..0a48875 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -346,6 +346,13 @@ AC_ARG_ENABLE(mir-backend,
- [enable the Mir gdk backend])],
- [backend_set=yes])
-
+@@ -351,6 +351,12 @@ AC_ARG_ENABLE(cloudproviders,
+ [AS_HELP_STRING([--enable-cloudproviders],
+ [enable libcloudproviders integration])],
+ [cloudproviders_set=yes])
+AC_ARG_ENABLE(glx,
+ [AS_HELP_STRING([--enable-glx],
+ [When enabled Gdk will try to initialize GLX])])
+AS_IF([test "x$enable_glx" != "xno"], [
+ AC_DEFINE([HAVE_GLX], [], [GLX will be available at runtime])
+])
-+
+
if test -z "$backend_set"; then
if test "$platform_win32" = yes; then
- enable_win32_backend=yes
diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c
index 81479d8..3c8c5c0 100644
--- a/gdk/x11/gdkvisual-x11.c
@@ -56,5 +56,5 @@
gint
--
-2.12.0
+2.14.1
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch
index 9cdee0e..d2f12dc 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch
@@ -1,4 +1,4 @@
-From a2e6b7cbbd6d741fed38d91b3742aa4a08395aba Mon Sep 17 00:00:00 2001
+From de36df70d87ba3453ed4f2b92e990021c67238f5 Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Tue, 21 Jun 2016 15:11:39 +0300
Subject: [PATCH 3/4] Add --disable-opengl configure option
@@ -19,41 +19,40 @@
Upstream-Status: Inappropriate [Evil eye expected from upstream]
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
---
- configure.ac | 13 +++++++--
- demos/gtk-demo/glarea.c | 14 +++++++++
- docs/tools/Makefile.am | 9 ++++--
- docs/tools/widgets.c | 4 ++-
- gdk/gdkdisplay.c | 4 ++-
- gdk/gdkgl.c | 10 +++++++
- gdk/gdkglcontext.c | 6 ++++
- gdk/gdkwindow.c | 13 +++++++++
- gdk/x11/Makefile.am | 30 +++++++++++++++++---
- gdk/x11/gdkdisplay-x11.c | 6 +++-
- gdk/x11/gdkscreen-x11.c | 5 ++++
- gdk/x11/gdkwindow-x11.c | 4 +++
- gdk/x11/gdkx-autocleanups.h | 2 ++
- gdk/x11/gdkx-with-gl-context.h | 59 ++++++++++++++++++++++++++++++++++++++
- gdk/x11/gdkx-without-gl-context.h | 58 +++++++++++++++++++++++++++++++++++++
- gdk/x11/gdkx.h | 60 ---------------------------------------
- gtk/Makefile.am | 3 +-
- gtk/gtkglarea.c | 20 ++++++++++++-
- gtk/inspector/general.c | 6 ++++
- tests/Makefile.am | 10 +++++--
- testsuite/gtk/objects-finalize.c | 2 ++
- 21 files changed, 261 insertions(+), 77 deletions(-)
- create mode 100644 gdk/x11/gdkx-with-gl-context.h
+ configure.ac | 13 +++++--
+ demos/gtk-demo/glarea.c | 14 ++++++++
+ docs/tools/Makefile.am | 9 +++--
+ docs/tools/widgets.c | 4 ++-
+ gdk/gdkdisplay.c | 4 ++-
+ gdk/gdkgl.c | 10 ++++++
+ gdk/gdkglcontext.c | 6 ++++
+ gdk/gdkwindow.c | 13 +++++++
+ gdk/x11/Makefile.am | 30 +++++++++++++---
+ gdk/x11/gdkdisplay-x11.c | 6 +++-
+ gdk/x11/gdkscreen-x11.c | 5 +++
+ gdk/x11/gdkwindow-x11.c | 4 +++
+ gdk/x11/gdkx-autocleanups.h | 2 ++
+ gdk/x11/{gdkx.h => gdkx-with-gl-context.h} | 1 -
+ gdk/x11/gdkx-without-gl-context.h | 58 ++++++++++++++++++++++++++++++
+ gtk/Makefile.am | 3 +-
+ gtk/gtkglarea.c | 20 ++++++++++-
+ gtk/inspector/general.c | 6 ++++
+ tests/Makefile.am | 10 ++++--
+ testsuite/gtk/objects-finalize.c | 2 ++
+ 20 files changed, 202 insertions(+), 18 deletions(-)
+ rename gdk/x11/{gdkx.h => gdkx-with-gl-context.h} (98%)
create mode 100644 gdk/x11/gdkx-without-gl-context.h
- delete mode 100644 gdk/x11/gdkx.h
diff --git a/configure.ac b/configure.ac
-index 965eec9..00bf544 100644
+index 0a48875..6f0a3a6 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -346,6 +346,15 @@ AC_ARG_ENABLE(mir-backend,
- [enable the Mir gdk backend])],
- [backend_set=yes])
-
+@@ -351,6 +351,15 @@ AC_ARG_ENABLE(cloudproviders,
+ [AS_HELP_STRING([--enable-cloudproviders],
+ [enable libcloudproviders integration])],
+ [cloudproviders_set=yes])
+AC_ARG_ENABLE(opengl,
+ [AS_HELP_STRING([--enable-opengl],
+ [When enabled, Gtk+ will use libepoxy and exposes GtkGLArea widget ])])
@@ -66,16 +65,16 @@
AC_ARG_ENABLE(glx,
[AS_HELP_STRING([--enable-glx],
[When enabled Gdk will try to initialize GLX])])
-@@ -1352,7 +1361,7 @@ CFLAGS="$saved_cflags"
+@@ -1372,7 +1381,7 @@ CFLAGS="$saved_cflags"
LDFLAGS="$saved_ldflags"
GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0 >= gdk_pixbuf_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version"
--GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends epoxy >= epoxy_required_version"
-+GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends $EPOXY_PACKAGES"
+-GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends epoxy >= epoxy_required_version $CLOUDPROVIDER_PACKAGES"
++GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends $EPOXY_PACKAGES $CLOUDPROVIDER_PACKAGES"
PKG_CHECK_MODULES(GDK_DEP, $GDK_PACKAGES $GDK_PRIVATE_PACKAGES)
GDK_DEP_LIBS="$GDK_EXTRA_LIBS $GDK_DEP_LIBS $MATH_LIB"
-@@ -1386,7 +1395,7 @@ fi
+@@ -1406,7 +1415,7 @@ fi
PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
GTK_PACKAGES="atk >= atk_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version gdk-pixbuf-2.0 >= gdk_pixbuf_required_version gio-2.0 >= glib_required_version"
@@ -210,10 +209,10 @@
return info;
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
-index 6b012ca..311c7f7 100644
+index 40225e9..c55e1de 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
-@@ -2409,7 +2409,9 @@ gboolean
+@@ -2406,7 +2406,9 @@ gboolean
gdk_display_make_gl_context_current (GdkDisplay *display,
GdkGLContext *context)
{
@@ -347,7 +346,7 @@
/**
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
-index 689d666..fb84256 100644
+index c0e0a7d..437ab03 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -45,7 +45,9 @@
@@ -360,7 +359,7 @@
/* for the use of round() */
#include "fallback-c89.c"
-@@ -2819,6 +2821,13 @@ gdk_window_get_paint_gl_context (GdkWindow *window,
+@@ -2822,6 +2824,13 @@ gdk_window_get_paint_gl_context (GdkWindow *window,
{
GError *internal_error = NULL;
@@ -374,7 +373,7 @@
if (_gdk_gl_flags & GDK_GL_DISABLE)
{
g_set_error_literal (error, GDK_GL_ERROR,
-@@ -2954,6 +2963,7 @@ gdk_window_begin_paint_internal (GdkWindow *window,
+@@ -2957,6 +2966,7 @@ gdk_window_begin_paint_internal (GdkWindow *window,
}
else
{
@@ -382,7 +381,7 @@
gdk_gl_context_make_current (context);
/* With gl we always need a surface to combine the gl
drawing with the native drawing. */
-@@ -2968,6 +2978,7 @@ gdk_window_begin_paint_internal (GdkWindow *window,
+@@ -2971,6 +2981,7 @@ gdk_window_begin_paint_internal (GdkWindow *window,
glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
glViewport (0, 0, ww, wh);
@@ -390,7 +389,7 @@
}
}
-@@ -3031,6 +3042,7 @@ gdk_window_end_paint_internal (GdkWindow *window)
+@@ -3034,6 +3045,7 @@ gdk_window_end_paint_internal (GdkWindow *window)
gdk_gl_context_make_current (window->gl_paint_context);
@@ -398,7 +397,7 @@
if (!cairo_region_is_empty (opaque_region))
gdk_gl_texture_from_surface (window->current_paint.surface,
opaque_region);
-@@ -3041,6 +3053,7 @@ gdk_window_end_paint_internal (GdkWindow *window)
+@@ -3044,6 +3056,7 @@ gdk_window_end_paint_internal (GdkWindow *window)
window->current_paint.need_blend_region);
glDisable(GL_BLEND);
}
@@ -479,7 +478,7 @@
+
-include $(top_srcdir)/git.mk
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
-index ad65e29..91345ee 100644
+index e9a263f..2829a31 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -37,7 +37,9 @@
@@ -492,7 +491,7 @@
#include "gdk-private.h"
#include <glib.h>
-@@ -2994,7 +2996,9 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
+@@ -3169,7 +3171,9 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
display_class->text_property_to_utf8_list = _gdk_x11_display_text_property_to_utf8_list;
display_class->utf8_to_string_target = _gdk_x11_display_utf8_to_string_target;
@@ -554,71 +553,21 @@
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Keymap, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Screen, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Visual, g_object_unref)
-diff --git a/gdk/x11/gdkx-with-gl-context.h b/gdk/x11/gdkx-with-gl-context.h
-new file mode 100644
-index 0000000..ae05fa6
---- /dev/null
+diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx-with-gl-context.h
+similarity index 98%
+rename from gdk/x11/gdkx.h
+rename to gdk/x11/gdkx-with-gl-context.h
+index 1f64bcc..ae05fa6 100644
+--- a/gdk/x11/gdkx.h
+++ b/gdk/x11/gdkx-with-gl-context.h
-@@ -0,0 +1,59 @@
-+/* GDK - The GIMP Drawing Kit
-+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+/*
-+ * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
-+ * file for a list of people on the GTK+ Team. See the ChangeLog
-+ * files for a list of changes. These files are distributed with
-+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
-+ */
-+
-+#ifndef __GDK_X_H__
-+#define __GDK_X_H__
-+
-+#include <gdk/gdk.h>
-+
-+#include <X11/Xlib.h>
-+#include <X11/Xutil.h>
-+
-+#define __GDKX_H_INSIDE__
-+
-+#include <gdk/x11/gdkx11applaunchcontext.h>
-+#include <gdk/x11/gdkx11cursor.h>
-+#include <gdk/x11/gdkx11device.h>
-+#include <gdk/x11/gdkx11device-core.h>
-+#include <gdk/x11/gdkx11device-xi2.h>
-+#include <gdk/x11/gdkx11devicemanager.h>
-+#include <gdk/x11/gdkx11devicemanager-core.h>
-+#include <gdk/x11/gdkx11devicemanager-xi2.h>
-+#include <gdk/x11/gdkx11display.h>
-+#include <gdk/x11/gdkx11displaymanager.h>
-+#include <gdk/x11/gdkx11dnd.h>
-+#include <gdk/x11/gdkx11glcontext.h>
-+#include <gdk/x11/gdkx11keys.h>
-+#include <gdk/x11/gdkx11property.h>
-+#include <gdk/x11/gdkx11screen.h>
-+#include <gdk/x11/gdkx11selection.h>
-+#include <gdk/x11/gdkx11utils.h>
-+#include <gdk/x11/gdkx11visual.h>
-+#include <gdk/x11/gdkx11window.h>
-+
-+#include <gdk/x11/gdkx-autocleanups.h>
-+
-+#undef __GDKX_H_INSIDE__
-+
-+#endif /* __GDK_X_H__ */
+@@ -45,7 +45,6 @@
+ #include <gdk/x11/gdkx11dnd.h>
+ #include <gdk/x11/gdkx11glcontext.h>
+ #include <gdk/x11/gdkx11keys.h>
+-#include <gdk/x11/gdkx11monitor.h>
+ #include <gdk/x11/gdkx11property.h>
+ #include <gdk/x11/gdkx11screen.h>
+ #include <gdk/x11/gdkx11selection.h>
diff --git a/gdk/x11/gdkx-without-gl-context.h b/gdk/x11/gdkx-without-gl-context.h
new file mode 100644
index 0000000..c9e2617
@@ -683,77 +632,11 @@
+#undef __GDKX_H_INSIDE__
+
+#endif /* __GDK_X_H__ */
-diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h
-deleted file mode 100644
-index 1f64bcc..0000000
---- a/gdk/x11/gdkx.h
-+++ /dev/null
-@@ -1,60 +0,0 @@
--/* GDK - The GIMP Drawing Kit
-- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Lesser General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * Lesser General Public License for more details.
-- *
-- * You should have received a copy of the GNU Lesser General Public
-- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
-- */
--
--/*
-- * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
-- * file for a list of people on the GTK+ Team. See the ChangeLog
-- * files for a list of changes. These files are distributed with
-- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
-- */
--
--#ifndef __GDK_X_H__
--#define __GDK_X_H__
--
--#include <gdk/gdk.h>
--
--#include <X11/Xlib.h>
--#include <X11/Xutil.h>
--
--#define __GDKX_H_INSIDE__
--
--#include <gdk/x11/gdkx11applaunchcontext.h>
--#include <gdk/x11/gdkx11cursor.h>
--#include <gdk/x11/gdkx11device.h>
--#include <gdk/x11/gdkx11device-core.h>
--#include <gdk/x11/gdkx11device-xi2.h>
--#include <gdk/x11/gdkx11devicemanager.h>
--#include <gdk/x11/gdkx11devicemanager-core.h>
--#include <gdk/x11/gdkx11devicemanager-xi2.h>
--#include <gdk/x11/gdkx11display.h>
--#include <gdk/x11/gdkx11displaymanager.h>
--#include <gdk/x11/gdkx11dnd.h>
--#include <gdk/x11/gdkx11glcontext.h>
--#include <gdk/x11/gdkx11keys.h>
--#include <gdk/x11/gdkx11monitor.h>
--#include <gdk/x11/gdkx11property.h>
--#include <gdk/x11/gdkx11screen.h>
--#include <gdk/x11/gdkx11selection.h>
--#include <gdk/x11/gdkx11utils.h>
--#include <gdk/x11/gdkx11visual.h>
--#include <gdk/x11/gdkx11window.h>
--
--#include <gdk/x11/gdkx-autocleanups.h>
--
--#undef __GDKX_H_INSIDE__
--
--#endif /* __GDK_X_H__ */
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
-index 45fb7c2..ce81011 100644
+index 842c2f9..0921bc7 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
-@@ -1411,14 +1411,13 @@ gtkprivatetypebuiltins.c: $(gtk_private_type_h_sources) gtkprivatetypebuiltins.
+@@ -1416,14 +1416,13 @@ gtkprivatetypebuiltins.c: $(gtk_private_type_h_sources) gtkprivatetypebuiltins.
&& cp xgen-gptbc gtkprivatetypebuiltins.c \
&& rm -f xgen-gptbc
@@ -913,7 +796,7 @@
if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ()))
{
diff --git a/tests/Makefile.am b/tests/Makefile.am
-index f86c166..ba1acad 100644
+index e2db6e4..e51cf34 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -80,8 +80,6 @@ noinst_PROGRAMS = $(TEST_PROGS) \
@@ -949,17 +832,16 @@
index 0b3a519..07b096f 100644
--- a/testsuite/gtk/objects-finalize.c
+++ b/testsuite/gtk/objects-finalize.c
-@@ -115,8 +115,10 @@ main (int argc, char **argv)
+@@ -115,7 +115,9 @@ main (int argc, char **argv)
all_types[i] != GDK_TYPE_X11_DEVICE_MANAGER_CORE &&
all_types[i] != GDK_TYPE_X11_DEVICE_MANAGER_XI2 &&
all_types[i] != GDK_TYPE_X11_DISPLAY_MANAGER &&
+#ifdef HAVE_OPENGL
all_types[i] != GDK_TYPE_X11_GL_CONTEXT &&
- #endif
+#endif
+ #endif
/* Not allowed to finalize a GdkPixbufLoader without calling gdk_pixbuf_loader_close() */
all_types[i] != GDK_TYPE_PIXBUF_LOADER &&
- all_types[i] != GDK_TYPE_DRAWING_CONTEXT &&
--
-2.12.0
+2.14.1
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch
deleted file mode 100644
index aca55ce..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 34f4d3928e8206a89b0a601bdf79d6194b3cc77e Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Thu, 9 Jun 2016 11:21:36 +0300
-Subject: [PATCH 4/4] configure.ac: Fix wayland-protocols path
-
-The wayland-protocols directory is used during build: Fix the path
-to point to sysroot specified in recipe.
-
-Normally PKG_CONFIG_SYSROOT_DIR could be used in configure.ac but that
-breaks multilib gtk+ as it would point to multilib sysroot when the
-(allarch) wayland-protocols is actually in the machine sysroot.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 00bf544..5515915 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -465,7 +465,7 @@ fi
- if test "$enable_wayland_backend" = "yes"; then
- # For the cairo image backend
- cairo_backends="$cairo_backends cairo"
-- AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, `$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
-+ AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, ${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
- GDK_BACKENDS="$GDK_BACKENDS wayland"
- GDK_WINDOWING="$GDK_WINDOWING
- #define GDK_WINDOWING_WAYLAND"
---
-2.12.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.22.17.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.22.17.bb
deleted file mode 100644
index 66a5463..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.22.17.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require gtk+3.inc
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
- file://0001-Hardcoded-libtool.patch \
- file://0002-Do-not-try-to-initialize-GL-without-libGL.patch \
- file://0003-Add-disable-opengl-configure-option.patch \
- file://0004-configure.ac-Fix-wayland-protocols-path.patch \
- "
-SRC_URI[md5sum] = "29f85430cf7cfa8ca8d0703ba65dbe11"
-SRC_URI[sha256sum] = "a6c1fb8f229c626a3d9c0e1ce6ea138de7f64a5a6bc799d45fa286fe461c3437"
-
-S = "${WORKDIR}/gtk+-${PV}"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
- file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
- file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
- file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.22.28.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.22.28.bb
new file mode 100644
index 0000000..864e826
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.22.28.bb
@@ -0,0 +1,18 @@
+require gtk+3.inc
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
+ file://0001-Hardcoded-libtool.patch \
+ file://0002-Do-not-try-to-initialize-GL-without-libGL.patch \
+ file://0003-Add-disable-opengl-configure-option.patch \
+ "
+SRC_URI[md5sum] = "8c1f5ab987ddc7dab3e59660f89dcd9b"
+SRC_URI[sha256sum] = "d299612b018cfed7b2c689168ab52b668023708e17c335eb592260d186f15e1f"
+
+S = "${WORKDIR}/gtk+-${PV}"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
+ file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
+ file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
+ file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.31.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.31.bb
deleted file mode 100644
index cc31bab..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.31.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-require gtk+.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://gtk/gtk.h;endline=27;md5=c59e0b4490dd135a5726ebf851f9b17f \
- file://gdk/gdk.h;endline=27;md5=07db285ec208fb3e0bf7d861b0614202 \
- file://tests/testgtk.c;endline=27;md5=262db5db5f776f9863e56df31423e24c"
-SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-${PV}.tar.xz \
- file://xsettings.patch \
- file://hardcoded_libtool.patch \
- file://toggle-font.diff;striplevel=0 \
- file://doc-fixes.patch \
- file://strict-prototypes.patch \
- "
-
-SRC_URI[md5sum] = "526a1008586094a2cbb4592fd3f9ee10"
-SRC_URI[sha256sum] = "68c1922732c7efc08df4656a5366dcc3afdc8791513400dac276009b40954658"
-
-EXTRA_OECONF = "--enable-xkb --disable-glibtest --disable-cups --disable-xinerama"
-
-LIBV = "2.10.0"
-
-PACKAGES_DYNAMIC += "^gtk-immodule-.* ^gtk-printbackend-.*"
-
-python populate_packages_prepend () {
- gtk_libdir = d.expand('${libdir}/gtk-2.0/${LIBV}')
- immodules_root = os.path.join(gtk_libdir, 'immodules')
- printmodules_root = os.path.join(gtk_libdir, 'printbackends');
-
- d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s')))
- do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s')
-
- if (d.getVar('DEBIAN_NAMES')):
- d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-2.0')
-}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.32.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.32.bb
new file mode 100644
index 0000000..2070358
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.32.bb
@@ -0,0 +1,34 @@
+require gtk+.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+ file://gtk/gtk.h;endline=27;md5=c59e0b4490dd135a5726ebf851f9b17f \
+ file://gdk/gdk.h;endline=27;md5=07db285ec208fb3e0bf7d861b0614202 \
+ file://tests/testgtk.c;endline=27;md5=262db5db5f776f9863e56df31423e24c"
+SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-${PV}.tar.xz \
+ file://xsettings.patch \
+ file://hardcoded_libtool.patch \
+ file://toggle-font.diff;striplevel=0 \
+ file://doc-fixes.patch \
+ file://strict-prototypes.patch \
+ "
+
+SRC_URI[md5sum] = "d5742aa42275203a499b59b4c382a784"
+SRC_URI[sha256sum] = "b6c8a93ddda5eabe3bfee1eb39636c9a03d2a56c7b62828b359bf197943c582e"
+
+EXTRA_OECONF = "--enable-xkb --disable-glibtest --disable-cups --disable-xinerama"
+
+LIBV = "2.10.0"
+
+PACKAGES_DYNAMIC += "^gtk-immodule-.* ^gtk-printbackend-.*"
+
+python populate_packages_prepend () {
+ gtk_libdir = d.expand('${libdir}/gtk-2.0/${LIBV}')
+ immodules_root = os.path.join(gtk_libdir, 'immodules')
+ printmodules_root = os.path.join(gtk_libdir, 'printbackends');
+
+ d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s')))
+ do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s')
+
+ if (d.getVar('DEBIAN_NAMES')):
+ d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-2.0')
+}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.17.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.17.bb
deleted file mode 100644
index 032d82d..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.17.bb
+++ /dev/null
@@ -1,63 +0,0 @@
-SUMMARY = "Native icon utils for GTK+"
-DESCRIPTION = "gtk-update-icon-cache and gtk-encode-symbolic-svg built from GTK+ natively, for build time and on-host postinst script execution."
-SECTION = "libs"
-
-DEPENDS = "glib-2.0-native gdk-pixbuf-native librsvg-native"
-
-LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
- file://Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch"
-SRC_URI[md5sum] = "29f85430cf7cfa8ca8d0703ba65dbe11"
-SRC_URI[sha256sum] = "a6c1fb8f229c626a3d9c0e1ce6ea138de7f64a5a6bc799d45fa286fe461c3437"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
- file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
- file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
- file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
-
-S = "${WORKDIR}/gtk+-${PV}"
-
-inherit pkgconfig native
-
-# versions >= 3.90 are development versions, otherwise like upstream-version-is-even
-UPSTREAM_CHECK_REGEX = "[^\d\.](?P<pver>3\.([1-8]?[02468])+(\.\d+)+)\.tar"
-
-PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
-
-do_configure() {
- # Quite ugly but defines enough to compile the tools.
- if ! test -f gtk/config.h; then
- echo "#define GETTEXT_PACKAGE \"gtk30\"" >> gtk/config.h
- echo "#define HAVE_UNISTD_H 1" >> gtk/config.h
- echo "#define HAVE_FTW_H 1" >> gtk/config.h
- fi
- if ! test -f gdk/config.h; then
- touch gdk/config.h
- fi
-}
-
-do_compile() {
- ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
- ${S}/gtk/updateiconcache.c \
- $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gdk-pixbuf-2.0) \
- -o gtk-update-icon-cache
-
- ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
- ${S}/gtk/encodesymbolic.c \
- $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gio-2.0 gdk-pixbuf-2.0) \
- -o gtk-encode-symbolic-svg
-}
-
-do_install() {
- install -d ${D}${bindir}
- install -m 0755 ${B}/gtk-update-icon-cache ${D}${bindir}
- install -m 0755 ${B}/gtk-encode-symbolic-svg ${D}${bindir}
-
- create_wrapper ${D}/${bindir}/gtk-update-icon-cache \
- GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
- create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \
- GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
-}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.28.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.28.bb
new file mode 100644
index 0000000..942c047
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.28.bb
@@ -0,0 +1,63 @@
+SUMMARY = "Native icon utils for GTK+"
+DESCRIPTION = "gtk-update-icon-cache and gtk-encode-symbolic-svg built from GTK+ natively, for build time and on-host postinst script execution."
+SECTION = "libs"
+
+DEPENDS = "glib-2.0-native gdk-pixbuf-native librsvg-native"
+
+LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
+ file://Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch"
+SRC_URI[md5sum] = "8c1f5ab987ddc7dab3e59660f89dcd9b"
+SRC_URI[sha256sum] = "d299612b018cfed7b2c689168ab52b668023708e17c335eb592260d186f15e1f"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
+ file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
+ file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
+ file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
+
+S = "${WORKDIR}/gtk+-${PV}"
+
+inherit pkgconfig native
+
+# versions >= 3.90 are development versions, otherwise like upstream-version-is-even
+UPSTREAM_CHECK_REGEX = "[^\d\.](?P<pver>3\.([1-8]?[02468])+(\.\d+)+)\.tar"
+
+PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
+
+do_configure() {
+ # Quite ugly but defines enough to compile the tools.
+ if ! test -f gtk/config.h; then
+ echo "#define GETTEXT_PACKAGE \"gtk30\"" >> gtk/config.h
+ echo "#define HAVE_UNISTD_H 1" >> gtk/config.h
+ echo "#define HAVE_FTW_H 1" >> gtk/config.h
+ fi
+ if ! test -f gdk/config.h; then
+ touch gdk/config.h
+ fi
+}
+
+do_compile() {
+ ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
+ ${S}/gtk/updateiconcache.c \
+ $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gdk-pixbuf-2.0) \
+ -o gtk-update-icon-cache
+
+ ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
+ ${S}/gtk/encodesymbolic.c \
+ $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gio-2.0 gdk-pixbuf-2.0) \
+ -o gtk-encode-symbolic-svg
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${B}/gtk-update-icon-cache ${D}${bindir}
+ install -m 0755 ${B}/gtk-encode-symbolic-svg ${D}${bindir}
+
+ create_wrapper ${D}/${bindir}/gtk-update-icon-cache \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
+ create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
+}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch
deleted file mode 100644
index 4a90287..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From e733241fb580f032efbbe684ec35d4c9d27f1595 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 8 Sep 2016 13:38:39 +0300
-Subject: [PATCH] Do not error out if perl is not found or its version is too
- old.
-
-This allows use to avoid depending on perl-native if we're not going
-to use it (when api-docs are disabled).
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 2a61d6e..29415bd 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -36,7 +36,7 @@ dnl Check for Perl.
- dnl
- AC_PATH_PROG([PERL], [perl])
- if test -z "$PERL"; then
-- AC_MSG_ERROR([perl not found])
-+ AC_MSG_WARN([perl not found])
- fi
-
- AC_MSG_CHECKING([if Perl version >= 5.18.0])
-@@ -44,7 +44,7 @@ if "$PERL" -e "require v5.18.0"; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
-- AC_MSG_ERROR([perl >= 5.18.0 is required for gtk-doc])
-+ AC_MSG_WARN([perl >= 5.18.0 is required for gtk-doc])
- fi
-
- dnl
---
-2.9.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch
index 477fc9a..2fe3ab9 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch
@@ -1,7 +1,7 @@
-From 6fab82b93c7bd301eb42448515b02f7cb3306897 Mon Sep 17 00:00:00 2001
+From 928102874bc2339a1d57c6b178877e0c6002cb3a Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Wed, 31 Aug 2016 16:44:46 +0300
-Subject: [PATCH] Do not hardocode paths to perl/python in scripts.
+Subject: [PATCH 1/3] Do not hardocode paths to perl/python in scripts.
Doing so when the interpreters are somewhere deep in a sysroot directory
can reach the shebang line limit, and resulting scripts wouldn't work
@@ -9,131 +9,134 @@
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
- gtkdoc-check.in | 2 +-
- gtkdoc-common.pl.in | 2 +-
- gtkdoc-depscan.in | 2 +-
- gtkdoc-fixxref.in | 2 +-
- gtkdoc-mkdb.in | 2 +-
- gtkdoc-mktmpl.in | 2 +-
- gtkdoc-rebase.in | 2 +-
- gtkdoc-scan.in | 2 +-
- gtkdoc-scangobj.in | 2 +-
- tests/tools.sh.in | 4 ++--
- 10 files changed, 11 insertions(+), 11 deletions(-)
+ gtkdoc-check.in | 2 +-
+ gtkdoc-depscan.in | 2 +-
+ gtkdoc-fixxref.in | 2 +-
+ gtkdoc-mkdb.in | 2 +-
+ gtkdoc-mkhtml.in | 2 +-
+ gtkdoc-mkman.in | 2 +-
+ gtkdoc-mkpdf.in | 2 +-
+ gtkdoc-rebase.in | 2 +-
+ gtkdoc-scan.in | 2 +-
+ gtkdoc-scangobj.in | 2 +-
+ tests/tools.sh.in | 2 +-
+ 11 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/gtkdoc-check.in b/gtkdoc-check.in
-index 560d69b..b60857f 100755
+index 8c8e917..f6a25f6 100755
--- a/gtkdoc-check.in
+++ b/gtkdoc-check.in
@@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
- #
- # gtk-doc - GTK DocBook documentation generator.
-diff --git a/gtkdoc-common.pl.in b/gtkdoc-common.pl.in
-index 4747396..cfadb78 100644
---- a/gtkdoc-common.pl.in
-+++ b/gtkdoc-common.pl.in
-@@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python; coding: utf-8 -*-
#
# gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-depscan.in b/gtkdoc-depscan.in
-index 83af01b..917e247 100644
+index 9bfaf30..aadc952 100644
--- a/gtkdoc-depscan.in
+++ b/gtkdoc-depscan.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
-+#!/usr/bin/env python
++#!/usr/bin/env python3
- import gzip, os.path, re
+ from __future__ import print_function
diff --git a/gtkdoc-fixxref.in b/gtkdoc-fixxref.in
-index 3d9e8d0..d55190b 100755
+index 0ea02d4..bdd443a 100755
--- a/gtkdoc-fixxref.in
+++ b/gtkdoc-fixxref.in
@@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python -*-
#
# gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
-index 8dd6d5e..d808750 100755
+index 42d5731..3a56d56 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python; coding: utf-8 -*-
#
# gtk-doc - GTK DocBook documentation generator.
-diff --git a/gtkdoc-mktmpl.in b/gtkdoc-mktmpl.in
-index c64dfd3..2f46c18 100755
---- a/gtkdoc-mktmpl.in
-+++ b/gtkdoc-mktmpl.in
+diff --git a/gtkdoc-mkhtml.in b/gtkdoc-mkhtml.in
+index 0d0a15d..914ff55 100644
+--- a/gtkdoc-mkhtml.in
++++ b/gtkdoc-mkhtml.in
@@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python; coding: utf-8 -*-
+ #
+ # gtk-doc - GTK DocBook documentation generator.
+diff --git a/gtkdoc-mkman.in b/gtkdoc-mkman.in
+index c5445cd..65db71a 100644
+--- a/gtkdoc-mkman.in
++++ b/gtkdoc-mkman.in
+@@ -1,4 +1,4 @@
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python; coding: utf-8 -*-
+ #
+ # gtk-doc - GTK DocBook documentation generator.
+diff --git a/gtkdoc-mkpdf.in b/gtkdoc-mkpdf.in
+index e8c0c03..f807236 100755
+--- a/gtkdoc-mkpdf.in
++++ b/gtkdoc-mkpdf.in
+@@ -1,4 +1,4 @@
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python; coding: utf-8 -*-
#
# gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-rebase.in b/gtkdoc-rebase.in
-index 375482d..cf05b45 100644
+index 17a71c2..ec3fd28 100755
--- a/gtkdoc-rebase.in
+++ b/gtkdoc-rebase.in
@@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python -*-
#
# gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
-index 048e5c9..78c6136 100755
+index 954c811..f461504 100755
--- a/gtkdoc-scan.in
+++ b/gtkdoc-scan.in
@@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python -*-
#
# gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-scangobj.in b/gtkdoc-scangobj.in
-index fb66b76..67ee8f7 100644
+index 4cbe130..52c2c24 100644
--- a/gtkdoc-scangobj.in
+++ b/gtkdoc-scangobj.in
@@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python -*-
#
# gtk-doc - GTK DocBook documentation generator.
diff --git a/tests/tools.sh.in b/tests/tools.sh.in
-index a114a42..7073883 100644
+index 4d301d0..565fc1e 100644
--- a/tests/tools.sh.in
+++ b/tests/tools.sh.in
-@@ -11,7 +11,7 @@ echo "Running suite(s): gtk-doc-$suite";
-
- # test perl scripts
- for file in gtkdoc-check gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mktmpl gtkdoc-rebase gtkdoc-scan gtkdoc-scangobj ; do
-- @PERL@ -cwT `which $file`
-+ perl -cwT `which $file`
- if test $? = 1 ; then failed=`expr $failed + 1`; fi
- tested=`expr $tested + 1`
+@@ -31,7 +31,7 @@ done
+ # TODO: test python 2 and 3 (python3 -mcompileall gtkdoc/*.py)
+ for file in gtkdoc-check gtkdoc-depscan gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mkhtml gtkdoc-mkman gtkdoc-mkpdf gtkdoc-rebase gtkdoc-scangobj; do
+ fullfile=`which $file`
+- @PYTHON@ -m py_compile $fullfile
++ python3 -m py_compile $fullfile
+ if test $? != 0 ; then failed=`expr $failed + 1`; fi
+ tested=`expr $tested + 1`
done
-@@ -34,7 +34,7 @@ done
-
-
- # test python scripts
--@PYTHON@ -m py_compile `which gtkdoc-depscan`
-+python -m py_compile `which gtkdoc-depscan`
- if test $? != 0 ; then failed=`expr $failed + 1`; fi
- tested=`expr $tested + 1`
-
--
-2.9.3
+2.14.1
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/conditionaltests.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/conditionaltests.patch
index 0c180f2..21c2db7 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/conditionaltests.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/conditionaltests.patch
@@ -1,14 +1,23 @@
+From 78bbf185934147a69ceb4b617d424e12e70997bf Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Tue, 27 Jun 2017 21:00:58 +0100
+Subject: [PATCH 3/3] gtk-doc: Handle floating gtk-doc dependency
+
Allow the tests to be explicitly disabled to avoid floating dependnecy
issues. This is not really an issue with RSS but is on previous releases.
RP 2017/6/27
Upstream-Status: Pending
-Index: gtk-doc-1.25/configure.ac
-===================================================================
---- gtk-doc-1.25.orig/configure.ac
-+++ gtk-doc-1.25/configure.ac
-@@ -161,6 +161,11 @@ if test "x$GCC" = "xyes"; then
+---
+ configure.ac | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 684e2d1..e5e3aab 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -146,6 +146,11 @@ if test "x$GCC" = "xyes"; then
fi
fi
@@ -20,7 +29,7 @@
dnl if glib is available we can enable the tests
PKG_CHECK_MODULES(TEST_DEPS, [glib-2.0 >= 2.6.0 gobject-2.0 >= 2.6.0],
[ glib_prefix="`$PKG_CONFIG --variable=prefix glib-2.0`"
-@@ -171,6 +176,11 @@ PKG_CHECK_MODULES(TEST_DEPS, [glib-2.0 >
+@@ -156,6 +161,11 @@ PKG_CHECK_MODULES(TEST_DEPS, [glib-2.0 >= 2.6.0 gobject-2.0 >= 2.6.0],
build_tests="no"
]
)
@@ -30,5 +39,8 @@
+fi
+
AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL" -a x$gtk_doc_use_libtool = xyes )
- dnl this enable the rule in test/Makefile.am
+ dnl this enables the rule in test/Makefile.am
AM_CONDITIONAL(BUILD_TESTS, test x$build_tests = xyes)
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/no-clobber.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/no-clobber.patch
new file mode 100644
index 0000000..0fa22b2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/no-clobber.patch
@@ -0,0 +1,27 @@
+In out-of-tree builds gtk-doc's setup-build target copies all the content from $srcdir to $builddir.
+
+However, if some of this content is regenerated at configure time this can happen:
+
+1) configure writes new build/version.xml
+2) make compile copies content, including the tarball's src/version.xml
+ to build/version.xml, and generates gtk-doc.
+3) make install notices build/version.xml is older than configure.status,
+ so regenerates gtk-doc.
+
+gtk-doc generation is a slow process at the best of times, so doing it twice isn't good.
+
+Solve this by changing cp --force to cp --no-clobber, so setup-build only copies
+files which don't already exist.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=794571]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/gtk-doc.make b/gtk-doc.make
+index f87eaab..246f3c0 100644
+--- a/gtk-doc.make
++++ b/gtk-doc.make
+@@ -113,3 +113,3 @@ setup-build.stamp:
+ test -f $(abs_srcdir)/$$file && \
+- cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
++ cp -pn $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
+ done; \
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch
index c768870..bfbc777 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch
@@ -1,24 +1,32 @@
-Use native pkg-config when looking for gtk-doc.
+From 5f145621b4780cfd6a5632fcc97c45f572938efc Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Mon, 5 Sep 2016 22:25:44 +0100
+Subject: [PATCH 5/5] Use native pkg-config when looking for gtk-doc.
Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@intel.com>
-diff --git a/gtk-doc.m4 b/gtk-doc.m4
-index 3675543..94881ae 100644
---- a/gtk-doc.m4
-+++ b/gtk-doc.m4
-@@ -1,6 +1,6 @@
- dnl -*- mode: autoconf -*-
+---
+ gtk-doc.m4 | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+Index: gtk-doc-1.27/gtk-doc.m4
+===================================================================
+--- gtk-doc-1.27.orig/gtk-doc.m4
++++ gtk-doc-1.27/gtk-doc.m4
+@@ -25,7 +25,7 @@
+ # Macro appear in them. The GNU General Public License (GPL) does govern
+ # all other use of the material that constitutes the Autoconf Macro.
+
-# serial 2
+# serial 2.1
-
+
dnl Usage:
dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
-@@ -10,11 +10,16 @@ AC_DEFUN([GTK_DOC_CHECK],
+@@ -35,11 +35,16 @@ AC_DEFUN([GTK_DOC_CHECK],
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
-
+
+ gtkdoc_pkgconfig_save=$PKG_CONFIG
+ PKG_CONFIG=pkg-config-native
+
@@ -26,7 +34,7 @@
AC_MSG_CHECKING([for gtk-doc])
PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no])
AC_MSG_RESULT($have_gtk_doc)
-
+
+ PKG_CONFIG=$gtkdoc_pkgconfig_save
+
if test "$have_gtk_doc" = "no"; then
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb
deleted file mode 100644
index e0eb994..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-SUMMARY = "Documentation generator for glib-based software"
-DESCRIPTION = "Gtk-doc is a set of scripts that extract specially formatted comments \
- from glib-based software and produce a set of html documentation files from them"
-HOMEPAGE = "http://www.gtk.org/gtk-doc/"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-inherit gnomebase
-
-# Configure the scripts correctly (and build their dependencies) only if they are actually
-# going to be used; otheriwse we need only the m4/makefile includes from the gtk-doc tarball.
-PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "api-documentation", "working-scripts", "", d)}"
-
-# This will cause target gtk-doc to hardcode paths of native dependencies
-# into its scripts. This means that target gtk-doc package is broken;
-# hopefully no one minds because its scripts are not used for anything during build
-# and shouldn't be used on targets.
-PACKAGECONFIG[working-scripts] = "--with-highlight=source-highlight,--with-highlight=no,libxslt-native xmlto-native source-highlight-native perl-native"
-PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,glib-2.0"
-
-# We cannot use host perl, because it may be too old for gtk-doc
-EXTRANATIVEPATH += "perl-native"
-
-SRC_URI += "file://0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch \
- file://0001-Do-not-error-out-if-xsltproc-is-not-found.patch \
- file://0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch \
- file://conditionaltests.patch \
- "
-SRC_URI_append_class-native = " file://pkg-config-native.patch"
-
-SRC_URI[archive.md5sum] = "0dc6570953112a464a409fb99258ccbc"
-SRC_URI[archive.sha256sum] = "1ea46ed400e6501f975acaafea31479cea8f32f911dca4dff036f59e6464fd42"
-
-BBCLASSEXTEND = "native nativesdk"
-
-# Do not check for XML catalogs when building because that
-# information is not used for anything during build. Recipe
-# dependencies make sure we have all the right bits.
-do_configure_prepend() {
- sed -i -e 's,^JH_CHECK_XML_CATALOG.*,,' ${S}/configure.ac
-}
-
-FILES_${PN} += "${datadir}/sgml"
-FILES_${PN}-dev += "${libdir}/cmake"
-FILES_${PN}-doc = ""
-
-SYSROOT_PREPROCESS_FUNCS_append_class-native = " gtkdoc_makefiles_sysroot_preprocess"
-gtkdoc_makefiles_sysroot_preprocess() {
- # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
- # instead of libtool wrapper or running them directly
- sed -i \
- -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
- ${SYSROOT_DESTDIR}${datadir}/gtk-doc/data/gtk-doc*make
-}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.27.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.27.bb
new file mode 100644
index 0000000..4552811
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.27.bb
@@ -0,0 +1,50 @@
+SUMMARY = "Documentation generator for glib-based software"
+DESCRIPTION = "Gtk-doc is a set of scripts that extract specially formatted comments \
+ from glib-based software and produce a set of html documentation files from them"
+HOMEPAGE = "http://www.gtk.org/gtk-doc/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+inherit gnomebase
+
+# Configure the scripts correctly (and build their dependencies) only if they are actually
+# going to be used; otheriwse we need only the m4/makefile includes from the gtk-doc tarball.
+PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "api-documentation", "working-scripts", "", d)}"
+
+# This will cause target gtk-doc to hardcode paths of native dependencies
+# into its scripts. This means that target gtk-doc package is broken;
+# hopefully no one minds because its scripts are not used for anything during build
+# and shouldn't be used on targets.
+PACKAGECONFIG[working-scripts] = "--with-highlight=source-highlight,--with-highlight=no,libxslt-native xmlto-native source-highlight-native python3-six"
+PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,glib-2.0"
+
+SRC_URI[archive.md5sum] = "b29949e0964762e474b706ce22171602"
+SRC_URI[archive.sha256sum] = "e26bd3f7080c749b1cb66c46c6bf8239e2f320a949964fb9c6d56e1b0c6d9a6f"
+SRC_URI += "file://0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch \
+ file://0001-Do-not-error-out-if-xsltproc-is-not-found.patch \
+ file://conditionaltests.patch \
+ file://no-clobber.patch \
+ "
+SRC_URI_append_class-native = " file://pkg-config-native.patch"
+
+BBCLASSEXTEND = "native nativesdk"
+
+# Do not check for XML catalogs when building because that
+# information is not used for anything during build. Recipe
+# dependencies make sure we have all the right bits.
+do_configure_prepend() {
+ sed -i -e 's,^JH_CHECK_XML_CATALOG.*,,' ${S}/configure.ac
+}
+
+FILES_${PN} += "${datadir}/sgml"
+FILES_${PN}-dev += "${libdir}/cmake"
+FILES_${PN}-doc = ""
+
+SYSROOT_PREPROCESS_FUNCS_append_class-native = " gtkdoc_makefiles_sysroot_preprocess"
+gtkdoc_makefiles_sysroot_preprocess() {
+ # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
+ # instead of libtool wrapper or running them directly
+ sed -i \
+ -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
+ ${SYSROOT_DESTDIR}${datadir}/gtk-doc/data/gtk-doc*make
+}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.15.bb b/import-layers/yocto-poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.15.bb
deleted file mode 100644
index a704632..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.15.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "Default icon theme that all icon themes automatically inherit from"
-HOMEPAGE = "http://icon-theme.freedesktop.org/wiki/HicolorTheme"
-BUGTRACKER = "https://bugs.freedesktop.org/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f08a446809913fc9b3c718f0eaea0426"
-
-SRC_URI = "http://icon-theme.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "6aa2b3993a883d85017c7cc0cfc0fb73"
-SRC_URI[sha256sum] = "9cc45ac3318c31212ea2d8cb99e64020732393ee7630fa6c1810af5f987033cc"
-
-inherit allarch autotools
-
-FILES_${PN} += "${datadir}/icons"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb b/import-layers/yocto-poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb
new file mode 100644
index 0000000..7064b19
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Default icon theme that all icon themes automatically inherit from"
+HOMEPAGE = "http://icon-theme.freedesktop.org/wiki/HicolorTheme"
+BUGTRACKER = "https://bugs.freedesktop.org/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f08a446809913fc9b3c718f0eaea0426"
+
+SRC_URI = "http://icon-theme.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "84eec8d6f810240a069c731f1870b474"
+SRC_URI[sha256sum] = "317484352271d18cbbcfac3868eab798d67fff1b8402e740baa6ff41d588a9d8"
+
+inherit allarch autotools
+
+FILES_${PN} += "${datadir}/icons"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.2.8.bb b/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.2.8.bb
deleted file mode 100644
index 2c5d381..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.2.8.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "JSON-GLib implements a full JSON parser using GLib and GObject"
-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"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-DEPENDS = "glib-2.0"
-
-SRC_URI[archive.md5sum] = "ff31e7d0594df44318e12facda3d086e"
-SRC_URI[archive.sha256sum] = "fd55a9037d39e7a10f0db64309f5f0265fa32ec962bf85066087b83a2807f40a"
-
-inherit gnomebase gettext lib_package gobject-introspection gtk-doc manpages
-
-PACKAGECONFIG[manpages] = "--enable-man --with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog.xml, --disable-man, libxslt-native xmlto-native"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.4.2.bb b/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.4.2.bb
new file mode 100644
index 0000000..19fe3cc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.4.2.bb
@@ -0,0 +1,40 @@
+SUMMARY = "JSON-GLib implements a full JSON parser using GLib and GObject"
+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"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+DEPENDS = "glib-2.0"
+
+SRC_URI[archive.md5sum] = "35107e23a7bbbc70f31c34f7b9adf1c3"
+SRC_URI[archive.sha256sum] = "2d7709a44749c7318599a6829322e081915bdc73f5be5045882ed120bb686dc8"
+
+GNOMEBASEBUILDCLASS = "meson"
+inherit gnomebase lib_package gobject-introspection gtk-doc gettext
+
+# This builds both API docs (via gtk-doc) and manpages
+GTKDOC_ENABLE_FLAG = "-Ddocs=true"
+GTKDOC_DISABLE_FLAG = "-Ddocs=false"
+
+GI_ENABLE_FLAG = "-Dintrospection=true"
+GI_DISABLE_FLAG = "-Dintrospection=false"
+
+EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \
+ '${GTKDOC_DISABLE_FLAG}', d)} "
+EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '${GI_ENABLE_FLAG}', \
+ '${GI_DISABLE_FLAG}', d)} "
+
+do_install_append() {
+ # FIXME: these need to be provided via ptest
+ rm -rf ${D}${datadir}/installed-tests ${D}${libexecdir}
+}
+
+BBCLASSEXTEND = "native nativesdk"
+
+# Currently it's not possible to disable gettext in Meson, so we need to force
+# this back on.
+USE_NLS_class-native = "yes"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/libgudev/libgudev_231.bb b/import-layers/yocto-poky/meta/recipes-gnome/libgudev/libgudev_231.bb
deleted file mode 100644
index ad67926..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/libgudev/libgudev_231.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "GObject wrapper for libudev"
-HOMEPAGE = "https://wiki.gnome.org/Projects/libgudev"
-SRC_URI[archive.md5sum] = "916c10c51ec61131e244c3936bbb2e0c"
-SRC_URI[archive.sha256sum] = "3b1ef99d4a8984c35044103d8ddfc3cc52c80035c36abab2bcc5e3532e063f96"
-
-DEPENDS = "glib-2.0 udev"
-
-EXTRA_OECONF = "--disable-umockdev"
-
-RCONFLICTS_${PN} = "systemd (<= 220)"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-inherit gnomebase gobject-introspection gtk-doc
-
-UPSTREAM_CHECK_URI = "http://ftp.gnome.org/pub/GNOME/sources/libgudev/"
-UPSTREAM_CHECK_REGEX = "(?P<pver>(\d+))"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/libgudev/libgudev_232.bb b/import-layers/yocto-poky/meta/recipes-gnome/libgudev/libgudev_232.bb
new file mode 100644
index 0000000..19fe962
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/libgudev/libgudev_232.bb
@@ -0,0 +1,18 @@
+SUMMARY = "GObject wrapper for libudev"
+HOMEPAGE = "https://wiki.gnome.org/Projects/libgudev"
+SRC_URI[archive.sha256sum] = "ee4cb2b9c573cdf354f6ed744f01b111d4b5bed3503ffa956cefff50489c7860"
+SRC_URI[archive.md5sum] = "6914852377156665567abf8a38d89236"
+
+DEPENDS = "glib-2.0 udev"
+
+EXTRA_OECONF = "--disable-umockdev"
+
+RCONFLICTS_${PN} = "systemd (<= 220)"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+inherit gnomebase gobject-introspection gtk-doc
+
+UPSTREAM_CHECK_URI = "http://ftp.gnome.org/pub/GNOME/sources/libgudev/"
+UPSTREAM_CHECK_REGEX = "(?P<pver>(\d+))"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.18.bb b/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.18.bb
deleted file mode 100644
index 21a0dc2..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.18.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "Library for rendering SVG files"
-HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/librsvg/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://rsvg.h;beginline=3;endline=24;md5=20b4113c4909bbf0d67e006778302bc6"
-
-SECTION = "x11/utils"
-DEPENDS = "cairo gdk-pixbuf glib-2.0 libcroco libxml2 pango"
-BBCLASSEXTEND = "native"
-
-inherit autotools pkgconfig gnomebase gtk-doc pixbufcache upstream-version-is-even gobject-introspection
-
-SRC_URI += "file://gtk-option.patch"
-
-SRC_URI[archive.md5sum] = "eaa5c8a8bbe2600ab5194c0d3b1b621b"
-SRC_URI[archive.sha256sum] = "bfc8c488c89c1e7212c478beb95c41b44701636125a3e6dab41187f1485b564c"
-
-CACHED_CONFIGUREVARS = "ac_cv_path_GDK_PIXBUF_QUERYLOADERS=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
-
-# The older ld (2.22) on the host (Centos 6.5) doesn't have the
-# -Bsymbolic-functions option, we can disable it for native.
-EXTRA_OECONF_append_class-native = " --enable-Bsymbolic=auto"
-
-PACKAGECONFIG ??= "gdkpixbuf"
-# The gdk-pixbuf loader
-PACKAGECONFIG[gdkpixbuf] = "--enable-pixbuf-loader,--disable-pixbuf-loader,gdk-pixbuf-native"
-# GTK+ test application (rsvg-view)
-PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
-
-do_install_append() {
- # Loadable modules don't need .a or .la on Linux
- rm -f ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.a ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.la
-}
-
-PACKAGES =+ "librsvg-gtk rsvg"
-FILES_rsvg = "${bindir}/rsvg* \
- ${datadir}/pixmaps/svg-viewer.svg \
- ${datadir}/themes"
-FILES_librsvg-gtk = "${libdir}/gdk-pixbuf-2.0/*/*/*.so \
- ${datadir}/thumbnailers/librsvg.thumbnailer"
-
-PIXBUF_PACKAGES = "librsvg-gtk"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.20.bb b/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.20.bb
new file mode 100644
index 0000000..e376d52
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.20.bb
@@ -0,0 +1,47 @@
+SUMMARY = "Library for rendering SVG files"
+HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/librsvg/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+RECIPE_NO_UPDATE_REASON = "Versions from 2.41.0 requires Rust compiler to build it"
+
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://rsvg.h;beginline=3;endline=24;md5=20b4113c4909bbf0d67e006778302bc6"
+
+SECTION = "x11/utils"
+DEPENDS = "cairo gdk-pixbuf glib-2.0 libcroco libxml2 pango"
+BBCLASSEXTEND = "native"
+
+inherit gnomebase gtk-doc pixbufcache upstream-version-is-even gobject-introspection
+
+SRC_URI += "file://gtk-option.patch"
+
+SRC_URI[archive.md5sum] = "4949d313b0c5d9161a5c259104af5568"
+SRC_URI[archive.sha256sum] = "cff4dd3c3b78bfe99d8fcfad3b8ba1eee3289a0823c0e118d78106be6b84c92b"
+
+CACHED_CONFIGUREVARS = "ac_cv_path_GDK_PIXBUF_QUERYLOADERS=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
+
+# The older ld (2.22) on the host (Centos 6.5) doesn't have the
+# -Bsymbolic-functions option, we can disable it for native.
+EXTRA_OECONF_append_class-native = " --enable-Bsymbolic=auto"
+
+PACKAGECONFIG ??= "gdkpixbuf"
+# The gdk-pixbuf loader
+PACKAGECONFIG[gdkpixbuf] = "--enable-pixbuf-loader,--disable-pixbuf-loader,gdk-pixbuf-native"
+# GTK+ test application (rsvg-view)
+PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
+
+do_install_append() {
+ # Loadable modules don't need .a or .la on Linux
+ rm -f ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.a ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.la
+}
+
+PACKAGES =+ "librsvg-gtk rsvg"
+FILES_rsvg = "${bindir}/rsvg* \
+ ${datadir}/pixmaps/svg-viewer.svg \
+ ${datadir}/themes"
+FILES_librsvg-gtk = "${libdir}/gdk-pixbuf-2.0/*/*/*.so \
+ ${datadir}/thumbnailers/librsvg.thumbnailer"
+RRECOMMENDS_librsvg-gtk = "gdk-pixbuf-bin"
+
+PIXBUF_PACKAGES = "librsvg-gtk"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.10.bb b/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.10.bb
deleted file mode 100644
index fcdddc6..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.10.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-require cairo.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77"
-
-SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \
- file://cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff \
- file://0001-cairo-Fix-CVE-2017-9814.patch \
- "
-
-SRC_URI[md5sum] = "146f5f4d0b4439fc3792fd3452b7b12a"
-SRC_URI[sha256sum] = "7e87878658f2c9951a14fc64114d4958c0e65ac47530b8ac3078b2ce41b66a09"
-
-PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
-
-SUMMARY_${PN} = "The Cairo 2D vector graphics library"
-DESCRIPTION_${PN} = "Cairo is a multi-platform library providing anti-aliased \
-vector-based rendering for multiple target backends. Paths consist \
-of line segments and cubic splines and can be rendered at any width \
-with various join and cap styles. All colors may be specified with \
-optional translucence (opacity/alpha) and combined using the \
-extended Porter/Duff compositing algebra as found in the X Render \
-Extension."
-
-SUMMARY_cairo-gobject = "The Cairo library GObject wrapper library"
-DESCRIPTION_cairo-gobject = "A GObject wrapper library for the Cairo API."
-
-SUMMARY_cairo-script-interpreter = "The Cairo library script interpreter"
-DESCRIPTION_cairo-script-interpreter = "The Cairo script interpreter implements \
-CairoScript. CairoScript is used by tracing utilities to enable the ability \
-to replay rendering."
-
-DESCRIPTION_cairo-perf-utils = "The Cairo library performance utilities"
-
-FILES_${PN} = "${libdir}/libcairo.so.*"
-FILES_${PN}-dev += "${libdir}/cairo/*.so"
-FILES_${PN}-gobject = "${libdir}/libcairo-gobject.so.*"
-FILES_${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*"
-FILES_${PN}-perf-utils = "${bindir}/cairo-trace ${libdir}/cairo/*.la ${libdir}/cairo/libcairo-trace.so.*"
-
-do_install_append () {
- rm -rf ${D}${bindir}/cairo-sphinx
- rm -rf ${D}${libdir}/cairo/cairo-fdr*
- rm -rf ${D}${libdir}/cairo/cairo-sphinx*
- rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr*
- rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx*
-}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.12.bb b/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.12.bb
new file mode 100644
index 0000000..075ca1e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.12.bb
@@ -0,0 +1,46 @@
+require cairo.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77"
+
+SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \
+ file://cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff \
+ file://0001-cairo-Fix-CVE-2017-9814.patch \
+ "
+
+SRC_URI[md5sum] = "9f0db9dbfca0966be8acd682e636d165"
+SRC_URI[sha256sum] = "8c90f00c500b2299c0a323dd9beead2a00353752b2092ead558139bd67f7bf16"
+
+PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
+
+SUMMARY_${PN} = "The Cairo 2D vector graphics library"
+DESCRIPTION_${PN} = "Cairo is a multi-platform library providing anti-aliased \
+vector-based rendering for multiple target backends. Paths consist \
+of line segments and cubic splines and can be rendered at any width \
+with various join and cap styles. All colors may be specified with \
+optional translucence (opacity/alpha) and combined using the \
+extended Porter/Duff compositing algebra as found in the X Render \
+Extension."
+
+SUMMARY_cairo-gobject = "The Cairo library GObject wrapper library"
+DESCRIPTION_cairo-gobject = "A GObject wrapper library for the Cairo API."
+
+SUMMARY_cairo-script-interpreter = "The Cairo library script interpreter"
+DESCRIPTION_cairo-script-interpreter = "The Cairo script interpreter implements \
+CairoScript. CairoScript is used by tracing utilities to enable the ability \
+to replay rendering."
+
+DESCRIPTION_cairo-perf-utils = "The Cairo library performance utilities"
+
+FILES_${PN} = "${libdir}/libcairo.so.*"
+FILES_${PN}-dev += "${libdir}/cairo/*.so"
+FILES_${PN}-gobject = "${libdir}/libcairo-gobject.so.*"
+FILES_${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*"
+FILES_${PN}-perf-utils = "${bindir}/cairo-trace ${libdir}/cairo/*.la ${libdir}/cairo/libcairo-trace.so.*"
+
+do_install_append () {
+ rm -rf ${D}${bindir}/cairo-sphinx
+ rm -rf ${D}${libdir}/cairo/cairo-fdr*
+ rm -rf ${D}${libdir}/cairo/cairo-sphinx*
+ rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr*
+ rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx*
+}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/install-examples.patch b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/install-examples.patch
index 3b6a70e..ce9ab3a 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/install-examples.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/install-examples.patch
@@ -3,11 +3,11 @@
Signed-off-by: Ross Burton <ross.burton@intel.com>
Upstream-Status: Inappropriate
-diff --git a/examples/Makefile.am b/examples/Makefile.am
-index 4b9b449..232cd19 100644
---- a/examples/Makefile.am
-+++ b/examples/Makefile.am
-@@ -38,6 +38,7 @@ AM_CPPFLAGS = \
+Index: clutter-1.26.2/examples/Makefile.am
+===================================================================
+--- clutter-1.26.2.orig/examples/Makefile.am
++++ clutter-1.26.2/examples/Makefile.am
+@@ -33,7 +33,8 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/clutter \
-I$(top_builddir)/clutter
@@ -16,3 +16,4 @@
+example_PROGRAMS = $(all_examples)
EXTRA_DIST = redhand.png
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0.inc b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0.inc
index 26ae91c..4c87798 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0.inc
@@ -15,7 +15,3 @@
FILES_${PN} += "${libdir}/gstreamer-1.0/lib*.so"
FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la"
FILES_${PN}-examples = "${bindir}/video-player ${bindir}/video-sink"
-
-# Needs to be disable due to a dependency on gstreamer-plugins introspection files
-EXTRA_OECONF_append_mips64 = " --disable-introspection "
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.2.bb
deleted file mode 100644
index 78050df..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.2.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require clutter-gtk-1.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-SRC_URI[archive.md5sum] = "6698207ee6e3d5a1c0ffc0a23444e12f"
-SRC_URI[archive.sha256sum] = "da27d486325490ad3f65d2abf9413aeb8b4a8f7b559e4b2f73567a5344a26b94"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb
new file mode 100644
index 0000000..f0300c7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb
@@ -0,0 +1,6 @@
+require clutter-gtk-1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+SRC_URI[archive.md5sum] = "b363ac9878e2337be887b8ee9e1da00e"
+SRC_URI[archive.sha256sum] = "521493ec038973c77edcb8bc5eac23eed41645117894aaee7300b2487cb42b06"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch
index bf52637..40bebc0 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch
@@ -12,11 +12,11 @@
configure.ac | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
-diff --git a/configure.ac b/configure.ac
-index e3048c7..918d21d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -137,6 +137,12 @@ AC_ARG_ENABLE(install-test-programs,
+Index: libdrm-2.4.91/configure.ac
+===================================================================
+--- libdrm-2.4.91.orig/configure.ac
++++ libdrm-2.4.91/configure.ac
+@@ -163,6 +163,12 @@ AC_ARG_ENABLE(install-test-programs,
[Install test programs (default: no)]),
[INSTALL_TESTS=$enableval], [INSTALL_TESTS=no])
@@ -29,8 +29,8 @@
dnl ===========================================================================
dnl check compiler flags
AC_DEFUN([LIBDRM_CC_TRY_FLAG], [
-@@ -372,7 +378,7 @@ if test "x$RADEON" = xyes; then
- AC_DEFINE(HAVE_RADEON, 1, [Have radeon support])
+@@ -411,7 +417,7 @@ else
+ AC_DEFINE(HAVE_RADEON, 0)
fi
-if test "x$AMDGPU" != xno; then
@@ -38,8 +38,8 @@
# Detect cunit library
PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no])
# If pkg-config does not find cunit, check it using AC_CHECK_LIB. We
-@@ -399,7 +406,11 @@ if test "x$AMDGPU" = xyes; then
- AC_DEFINE(HAVE_CUNIT, [test "x$have_cunit" != "xno"], [Enable CUNIT Have amdgpu support])
+@@ -436,7 +442,11 @@ if test "x$AMDGPU" = xyes; then
+ AC_DEFINE(HAVE_AMDGPU, 1, [Have amdgpu support])
if test "x$have_cunit" = "xno"; then
- AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests])
@@ -49,8 +49,5 @@
+ AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests])
+ fi
fi
- fi
-
---
-2.1.4
-
+ else
+ AC_DEFINE(HAVE_AMDGPU, 0)
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.83.bb b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.83.bb
deleted file mode 100644
index a5cb75c..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.83.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "Userspace interface to the kernel DRM services"
-DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \
-stands for \"Direct Rendering Manager\", which is the kernel portion of the \
-\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \
-accelerated OpenGL drivers."
-HOMEPAGE = "http://dri.freedesktop.org"
-SECTION = "x11/base"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71"
-PROVIDES = "drm"
-DEPENDS = "libpthread-stubs libpciaccess"
-
-SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \
- file://installtests.patch \
- file://fix_O_CLOEXEC_undeclared.patch \
- file://0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch \
- "
-
-SRC_URI[md5sum] = "23800953ed7564988872e1e8c61fde31"
-SRC_URI[sha256sum] = "03a52669da60ead62548a35bc430aafb6c2d8dd21ec9dba3a90f96eff5fe36d6"
-
-inherit autotools pkgconfig manpages
-
-EXTRA_OECONF += "--disable-cairo-tests \
- --without-cunit \
- --enable-omap-experimental-api \
- --enable-etnaviv-experimental-api \
- --enable-install-test-programs \
- --disable-valgrind \
- "
-PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native"
-
-ALLOW_EMPTY_${PN}-drivers = "1"
-PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \
- ${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu \
- ${PN}-etnaviv"
-
-RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \
- ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \
- ${PN}-etnaviv"
-
-FILES_${PN}-tests = "${bindir}/*"
-FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*"
-FILES_${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*"
-FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*"
-FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*"
-FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*"
-FILES_${PN}-kms = "${libdir}/libkms*.so.*"
-FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
-FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*"
-FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.91.bb b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.91.bb
new file mode 100644
index 0000000..c490285
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.91.bb
@@ -0,0 +1,51 @@
+SUMMARY = "Userspace interface to the kernel DRM services"
+DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \
+stands for \"Direct Rendering Manager\", which is the kernel portion of the \
+\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \
+accelerated OpenGL drivers."
+HOMEPAGE = "http://dri.freedesktop.org"
+SECTION = "x11/base"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71"
+PROVIDES = "drm"
+DEPENDS = "libpthread-stubs libpciaccess"
+
+SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \
+ file://installtests.patch \
+ file://fix_O_CLOEXEC_undeclared.patch \
+ file://0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch \
+ "
+
+SRC_URI[md5sum] = "23d87cda92700b710a37d9b8edaa9f54"
+SRC_URI[sha256sum] = "634a0ed0cc1eff06f48674b1da81aafa661a9f001e7a4f43dde81076886dc800"
+
+inherit autotools pkgconfig manpages
+
+EXTRA_OECONF += "--disable-cairo-tests \
+ --without-cunit \
+ --enable-omap-experimental-api \
+ --enable-etnaviv-experimental-api \
+ --enable-install-test-programs \
+ --disable-valgrind \
+ "
+PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native"
+
+ALLOW_EMPTY_${PN}-drivers = "1"
+PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \
+ ${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu \
+ ${PN}-etnaviv"
+
+RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \
+ ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \
+ ${PN}-etnaviv"
+
+FILES_${PN}-tests = "${bindir}/*"
+FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*"
+FILES_${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*"
+FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*"
+FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*"
+FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*"
+FILES_${PN}-kms = "${libdir}/libkms*.so.*"
+FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
+FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*"
+FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig/0001-src-fcxml.c-avoid-double-free-of-filename.patch b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig/0001-src-fcxml.c-avoid-double-free-of-filename.patch
new file mode 100644
index 0000000..3ca9fde
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig/0001-src-fcxml.c-avoid-double-free-of-filename.patch
@@ -0,0 +1,28 @@
+From a163c81ac430cdc292add200f3e6a0c048be4d7e Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 11 Oct 2017 17:40:09 +0300
+Subject: [PATCH] src/fcxml.c: avoid double free() of filename
+
+It's also freed after bail1, so no need to do it here.
+
+Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=103221]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/fcxml.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/fcxml.c b/src/fcxml.c
+index 19ce96a..edb6054 100644
+--- a/src/fcxml.c
++++ b/src/fcxml.c
+@@ -3398,7 +3398,6 @@ FcConfigParseAndLoad (FcConfig *config,
+
+ fd = FcOpen ((char *) filename, O_RDONLY);
+ if (fd == -1) {
+- FcStrFree (filename);
+ goto bail1;
+ }
+
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.4.bb
deleted file mode 100644
index a058b35..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.4.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-SUMMARY = "Generic font configuration library"
-DESCRIPTION = "Fontconfig is a font configuration and customization library, which \
-does not depend on the X Window System. It is designed to locate \
-fonts within the system and select them according to requirements \
-specified by applications. \
-Fontconfig is not a rasterization library, nor does it impose a \
-particular rasterization library on the application. The X-specific \
-library 'Xft' uses fontconfig along with freetype to specify and \
-rasterize fonts."
-
-HOMEPAGE = "http://www.fontconfig.org"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig"
-
-LICENSE = "MIT-style & MIT & PD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7a0449e9bc5370402a94c00204beca3d \
- file://src/fcfreetype.c;endline=45;md5=5d9513e3196a1fbfdfa94051c09dfc84 \
- file://src/fccache.c;beginline=1367;endline=1382;md5=0326cfeb4a7333dd4dd25fbbc4b9f27f"
-
-SECTION = "libs"
-
-DEPENDS = "expat freetype zlib gperf-native"
-
-SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \
- file://revert-static-pkgconfig.patch \
- "
-SRC_URI[md5sum] = "4fb01fc3f41760c41c69e37cc784b658"
-SRC_URI[sha256sum] = "fd5a6a663f4c4a00e196523902626654dd0c4a78686cbc6e472f338e50fdf806"
-
-do_configure_prepend() {
- # work around https://bugs.freedesktop.org/show_bug.cgi?id=101280
- rm -f ${S}/src/fcobjshash.h ${S}/src/fcobjshash.gperf
-}
-
-PACKAGES =+ "fontconfig-utils"
-FILES_${PN} =+ "${datadir}/xml/*"
-FILES_fontconfig-utils = "${bindir}/*"
-
-# Work around past breakage in debian.bbclass
-RPROVIDES_fontconfig-utils = "libfontconfig-utils"
-RREPLACES_fontconfig-utils = "libfontconfig-utils"
-RCONFLICTS_fontconfig-utils = "libfontconfig-utils"
-DEBIAN_NOAUTONAME_fontconfig-utils = "1"
-
-inherit autotools pkgconfig relative_symlinks
-
-FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
-
-# comma separated list of additional directories
-# /usr/share/fonts is already included by default (you can change it with --with-default-fonts)
-FONTCONFIG_FONT_DIRS ?= "no"
-
-EXTRA_OECONF = " --disable-docs --with-default-fonts=${datadir}/fonts --with-cache-dir=${FONTCONFIG_CACHE_DIR} --with-add-fonts=${FONTCONFIG_FONT_DIRS}"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.6.bb b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.6.bb
new file mode 100644
index 0000000..d4cbce8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.6.bb
@@ -0,0 +1,58 @@
+SUMMARY = "Generic font configuration library"
+DESCRIPTION = "Fontconfig is a font configuration and customization library, which \
+does not depend on the X Window System. It is designed to locate \
+fonts within the system and select them according to requirements \
+specified by applications. \
+Fontconfig is not a rasterization library, nor does it impose a \
+particular rasterization library on the application. The X-specific \
+library 'Xft' uses fontconfig along with freetype to specify and \
+rasterize fonts."
+
+HOMEPAGE = "http://www.fontconfig.org"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig"
+
+LICENSE = "MIT-style & MIT & PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7a0449e9bc5370402a94c00204beca3d \
+ file://src/fcfreetype.c;endline=45;md5=5d9513e3196a1fbfdfa94051c09dfc84 \
+ file://src/fccache.c;beginline=1367;endline=1382;md5=0326cfeb4a7333dd4dd25fbbc4b9f27f"
+
+SECTION = "libs"
+
+DEPENDS = "expat freetype zlib gperf-native"
+
+SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \
+ file://revert-static-pkgconfig.patch \
+ file://0001-src-fcxml.c-avoid-double-free-of-filename.patch \
+ "
+
+SRC_URI[md5sum] = "00e748c67fad11e7057a71ed385e8bdb"
+SRC_URI[sha256sum] = "064b9ebf060c9e77011733ac9dc0e2ce92870b574cca2405e11f5353a683c334"
+
+UPSTREAM_CHECK_REGEX = "fontconfig-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
+
+do_configure_prepend() {
+ # work around https://bugs.freedesktop.org/show_bug.cgi?id=101280
+ rm -f ${S}/src/fcobjshash.h ${S}/src/fcobjshash.gperf
+}
+
+PACKAGES =+ "fontconfig-utils"
+FILES_${PN} =+ "${datadir}/xml/*"
+FILES_fontconfig-utils = "${bindir}/*"
+
+# Work around past breakage in debian.bbclass
+RPROVIDES_fontconfig-utils = "libfontconfig-utils"
+RREPLACES_fontconfig-utils = "libfontconfig-utils"
+RCONFLICTS_fontconfig-utils = "libfontconfig-utils"
+DEBIAN_NOAUTONAME_fontconfig-utils = "1"
+
+inherit autotools pkgconfig relative_symlinks
+
+FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
+
+# comma separated list of additional directories
+# /usr/share/fonts is already included by default (you can change it with --with-default-fonts)
+FONTCONFIG_FONT_DIRS ?= "no"
+
+EXTRA_OECONF = " --disable-docs --with-default-fonts=${datadir}/fonts --with-cache-dir=${FONTCONFIG_CACHE_DIR} --with-add-fonts=${FONTCONFIG_FONT_DIRS}"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.8.bb b/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.8.bb
deleted file mode 100644
index 8e88e84..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.8.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "Freetype font rendering library"
-DESCRIPTION = "FreeType is a software font engine that is designed to be small, efficient, \
-highly customizable, and portable while capable of producing high-quality output (glyph \
-images). It can be used in graphics libraries, display servers, font conversion tools, text \
-image generation tools, and many other products as well."
-HOMEPAGE = "http://www.freetype.org/"
-BUGTRACKER = "https://savannah.nongnu.org/bugs/?group=freetype"
-SECTION = "libs"
-
-LICENSE = "FreeType | GPLv2+"
-LIC_FILES_CHKSUM = "file://docs/LICENSE.TXT;md5=4af6221506f202774ef74f64932878a1 \
- file://docs/FTL.TXT;md5=13b25413274c9b3b09b63e4028216ff4 \
- file://docs/GPLv2.TXT;md5=8ef380476f642c20ebf40fecb0add2ec"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2 \
- file://use-right-libtool.patch"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/freetype/files/freetype2/"
-UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
-
-SRC_URI[md5sum] = "2413ac3eaf508ada019c63959ea81a92"
-SRC_URI[sha256sum] = "a3c603ed84c3c2495f9c9331fe6bba3bb0ee65e06ec331e0a0fb52158291b40b"
-
-inherit autotools pkgconfig binconfig-disabled multilib_header
-
-# Adapt autotools to work with the minimal autoconf usage in freetype
-AUTOTOOLS_SCRIPT_PATH = "${S}/builds/unix"
-CONFIGURE_SCRIPT = "${S}/configure"
-EXTRA_AUTORECONF += "--exclude=autoheader --exclude=automake"
-
-PACKAGECONFIG ??= "zlib"
-
-PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
-# harfbuzz results in a circular dependency so enabling is non-trivial
-PACKAGECONFIG[harfbuzz] = "--with-harfbuzz,--without-harfbuzz,harfbuzz"
-PACKAGECONFIG[pixmap] = "--with-png,--without-png,libpng"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
-
-EXTRA_OECONF = "CC_BUILD='${BUILD_CC}'"
-
-TARGET_CPPFLAGS += "-D_FILE_OFFSET_BITS=64"
-
-do_install_append() {
- oe_multilib_header freetype2/freetype/config/ftconfig.h
-}
-
-BINCONFIG = "${bindir}/freetype-config"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.9.bb b/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.9.bb
new file mode 100644
index 0000000..da05916
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.9.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Freetype font rendering library"
+DESCRIPTION = "FreeType is a software font engine that is designed to be small, efficient, \
+highly customizable, and portable while capable of producing high-quality output (glyph \
+images). It can be used in graphics libraries, display servers, font conversion tools, text \
+image generation tools, and many other products as well."
+HOMEPAGE = "http://www.freetype.org/"
+BUGTRACKER = "https://savannah.nongnu.org/bugs/?group=freetype"
+SECTION = "libs"
+
+LICENSE = "FreeType | GPLv2+"
+LIC_FILES_CHKSUM = "file://docs/LICENSE.TXT;md5=4af6221506f202774ef74f64932878a1 \
+ file://docs/FTL.TXT;md5=9f37b4e6afa3fef9dba8932b16bd3f97 \
+ file://docs/GPLv2.TXT;md5=8ef380476f642c20ebf40fecb0add2ec"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2 \
+ file://use-right-libtool.patch"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/freetype/files/freetype2/"
+UPSTREAM_CHECK_REGEX = "freetype-(?P<pver>\d+(\.\d+)+)"
+
+SRC_URI[md5sum] = "513c403c110016fdc7e537216a642b1d"
+SRC_URI[sha256sum] = "e6ffba3c8cef93f557d1f767d7bc3dee860ac7a3aaff588a521e081bc36f4c8a"
+
+inherit autotools pkgconfig binconfig-disabled multilib_header
+
+# Adapt autotools to work with the minimal autoconf usage in freetype
+AUTOTOOLS_SCRIPT_PATH = "${S}/builds/unix"
+CONFIGURE_SCRIPT = "${S}/configure"
+EXTRA_AUTORECONF += "--exclude=autoheader --exclude=automake"
+
+PACKAGECONFIG ??= "zlib"
+
+PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
+# harfbuzz results in a circular dependency so enabling is non-trivial
+PACKAGECONFIG[harfbuzz] = "--with-harfbuzz,--without-harfbuzz,harfbuzz"
+PACKAGECONFIG[pixmap] = "--with-png,--without-png,libpng"
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
+
+EXTRA_OECONF = "CC_BUILD='${BUILD_CC}'"
+
+TARGET_CPPFLAGS += "-D_FILE_OFFSET_BITS=64"
+
+do_install_append() {
+ oe_multilib_header freetype2/freetype/config/ftconfig.h
+}
+
+BINCONFIG = "${bindir}/freetype-config"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/fstests/fstests_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/fstests/fstests_git.bb
index 9e09cd2..69f2178 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/fstests/fstests_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/fstests/fstests_git.bb
@@ -8,7 +8,7 @@
PV = "0.1+git${SRCPV}"
SRC_URI = "git://git.yoctoproject.org/${BPN}"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
LIC_FILES_CHKSUM = "file://test-pango-gdk.c;endline=24;md5=1ee74ec851ecda57eb7ac6cc180f7655"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.0.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.0.0.bb
deleted file mode 100644
index f2ab756..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.0.0.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "OpenGL extension loading library"
-DESCRIPTION = "The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library."
-HOMEPAGE = "http://glew.sourceforge.net/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=67586"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
- file://no-strip.patch"
-
-SRC_URI[md5sum] = "2a2cd7c98f13854d2fcddae0d2b20411"
-SRC_URI[sha256sum] = "c572c30a4e64689c342ba1624130ac98936d7af90c3103f9ce12b8a0c5736764"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/glew/files/glew"
-UPSTREAM_CHECK_REGEX = "/glew/(?P<pver>(\d+[\.\-_]*)+)/"
-
-inherit lib_package pkgconfig distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "opengl"
-
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl', 'egl-gles2', d)}"
-
-# The opengl and egl-XXX options are exclusive, enable only one.
-PACKAGECONFIG[opengl] = "SYSTEM='linux',,virtual/libx11 virtual/libgl libglu libxext libxi libxmu"
-PACKAGECONFIG[egl-gles2] = "SYSTEM='linux-egl' GLEW_NO_GLU='-DGLEW_NO_GLU' LDFLAGS.GL='-lEGL -lGLESv2',,virtual/egl virtual/libgles2"
-
-CFLAGS += "-D_GNU_SOURCE"
-# Override SYSTEM (via PACKAGECONFIG_CONFARGS) to avoid calling config.guess,
-# we're cross-compiling. Pass our CFLAGS via POPT as that's the optimisation
-# variable and safely overwritten.
-EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS} \
- CC='${CC}' LD='${CC}' STRIP='' \
- LDFLAGS.EXTRA='${LDFLAGS}' \
- POPT='${CFLAGS}' \
- GLEW_PREFIX='${prefix}' BINDIR='${bindir}' \
- LIBDIR='${libdir}' INCDIR='${includedir}/GL' PKGDIR='${libdir}/pkgconfig'"
-
-do_compile() {
- oe_runmake
-}
-
-do_install() {
- oe_runmake 'DESTDIR=${D}' install.all
-}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.1.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.1.0.bb
new file mode 100644
index 0000000..be725e0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.1.0.bb
@@ -0,0 +1,44 @@
+SUMMARY = "OpenGL extension loading library"
+DESCRIPTION = "The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library."
+HOMEPAGE = "http://glew.sourceforge.net/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=67586"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
+ file://no-strip.patch"
+
+SRC_URI[md5sum] = "b2ab12331033ddfaa50dc39345343980"
+SRC_URI[sha256sum] = "04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/glew/files/glew"
+UPSTREAM_CHECK_REGEX = "/glew/(?P<pver>(\d+[\.\-_]*)+)/"
+
+inherit lib_package pkgconfig distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl', 'egl-gles2', d)}"
+
+# The opengl and egl-XXX options are exclusive, enable only one.
+PACKAGECONFIG[opengl] = "SYSTEM='linux',,virtual/libx11 virtual/libgl libglu libxext libxi libxmu"
+PACKAGECONFIG[egl-gles2] = "SYSTEM='linux-egl' GLEW_NO_GLU='-DGLEW_NO_GLU' LDFLAGS.GL='-lEGL -lGLESv2',,virtual/egl virtual/libgles2"
+
+CFLAGS += "-D_GNU_SOURCE"
+# Override SYSTEM (via PACKAGECONFIG_CONFARGS) to avoid calling config.guess,
+# we're cross-compiling. Pass our CFLAGS via POPT as that's the optimisation
+# variable and safely overwritten.
+EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS} \
+ CC='${CC}' LD='${CC}' STRIP='' \
+ LDFLAGS.EXTRA='${LDFLAGS}' \
+ POPT='${CFLAGS}' \
+ GLEW_PREFIX='${prefix}' BINDIR='${bindir}' \
+ LIBDIR='${libdir}' INCDIR='${includedir}/GL' PKGDIR='${libdir}/pkgconfig'"
+
+do_compile() {
+ oe_runmake
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install.all
+}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.4.8.bb b/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.4.8.bb
deleted file mode 100644
index 4f5e5a3..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.4.8.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "Text shaping library"
-DESCRIPTION = "HarfBuzz is an OpenType text shaping engine."
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/HarfBuzz"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=HarfBuzz"
-SECTION = "libs"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e021dd6dda6ff1e6b1044002fc662b9b \
- file://src/hb-ucdn/COPYING;md5=994ba0f1295f15b4bda4999a5bbeddef \
-"
-
-DEPENDS = "glib-2.0 cairo fontconfig freetype"
-
-SRC_URI = "http://www.freedesktop.org/software/harfbuzz/release/${BP}.tar.bz2"
-
-SRC_URI[md5sum] = "d1aa446e1e65717311c15d9ac0cf31ee"
-SRC_URI[sha256sum] = "ccec4930ff0bb2d0c40aee203075447954b64a8c2695202413cc5e428c907131"
-
-inherit autotools pkgconfig lib_package gtk-doc
-
-PACKAGECONFIG ??= "icu"
-PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu"
-
-EXTRA_OECONF = " \
- --with-cairo \
- --with-fontconfig \
- --with-freetype \
- --with-glib \
- --without-graphite2 \
-"
-
-PACKAGES =+ "${PN}-icu ${PN}-icu-dev"
-
-FILES_${PN}-icu = "${libdir}/libharfbuzz-icu.so.*"
-FILES_${PN}-icu-dev = "${libdir}/libharfbuzz-icu.la \
- ${libdir}/libharfbuzz-icu.so \
- ${libdir}/pkgconfig/harfbuzz-icu.pc \
-"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.7.5.bb b/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.7.5.bb
new file mode 100644
index 0000000..0a9b029
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.7.5.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Text shaping library"
+DESCRIPTION = "HarfBuzz is an OpenType text shaping engine."
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/HarfBuzz"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=HarfBuzz"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e021dd6dda6ff1e6b1044002fc662b9b \
+ file://src/hb-ucdn/COPYING;md5=994ba0f1295f15b4bda4999a5bbeddef \
+"
+
+DEPENDS = "glib-2.0 cairo fontconfig freetype"
+
+SRC_URI = "http://www.freedesktop.org/software/harfbuzz/release/${BP}.tar.bz2"
+
+SRC_URI[md5sum] = "1466ab51fc5aaa6af4065936939cec62"
+SRC_URI[sha256sum] = "84574e1b1f65ca694cb8fb6905309665c0368af18a312357f8ff886ee2f29563"
+
+inherit autotools pkgconfig lib_package gtk-doc
+
+PACKAGECONFIG ??= "icu"
+PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu"
+
+EXTRA_OECONF = " \
+ --with-cairo \
+ --with-fontconfig \
+ --with-freetype \
+ --with-glib \
+ --without-graphite2 \
+"
+
+PACKAGES =+ "${PN}-icu ${PN}-icu-dev"
+
+FILES_${PN}-icu = "${libdir}/libharfbuzz-icu.so.*"
+FILES_${PN}-icu-dev = "${libdir}/libharfbuzz-icu.la \
+ ${libdir}/libharfbuzz-icu.so \
+ ${libdir}/pkgconfig/harfbuzz-icu.pc \
+"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.2.bb
deleted file mode 100644
index 58646d3..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.2.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "Hardware accelerated JPEG compression/decompression library"
-DESCRIPTION = "libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression"
-HOMEPAGE = "http://libjpeg-turbo.org/"
-
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://cdjpeg.h;endline=13;md5=05bab7c7ad899d85bfba60da1a1271f2 \
- file://jpeglib.h;endline=16;md5=f67d70e547a2662c079781c72f877f72 \
- file://djpeg.c;endline=11;md5=b90b6d2b4119f9e5807cd273f525d2af \
-"
-DEPENDS_append_x86-64_class-target = " nasm-native"
-DEPENDS_append_x86_class-target = " nasm-native"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "6b4923e297a7eaa255f08511017a8818"
-SRC_URI[sha256sum] = "9098943b270388727ae61de82adec73cf9f0dbb240b3bc8b172595ebf405b528"
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libjpeg-turbo/files/"
-UPSTREAM_CHECK_REGEX = "/libjpeg-turbo/files/(?P<pver>(\d+[\.\-_]*)+)/"
-
-PE= "1"
-
-# Drop-in replacement for jpeg
-PROVIDES = "jpeg"
-RPROVIDES_${PN} += "jpeg"
-RREPLACES_${PN} += "jpeg"
-RCONFLICTS_${PN} += "jpeg"
-
-inherit autotools pkgconfig
-
-# Add nasm-native dependency consistently for all build arches is hard
-EXTRA_OECONF_append_class-native = " --without-simd"
-
-# Work around missing x32 ABI support
-EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--without-simd", "", d)}"
-
-# Work around missing non-floating point ABI support in MIPS
-EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf", "--without-simd", "", d)}"
-
-# Provide a workaround if Altivec unit is not present in PPC
-EXTRA_OECONF_append_class-target_powerpc = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
-EXTRA_OECONF_append_class-target_powerpc64 = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
-
-PACKAGES =+ "jpeg-tools libturbojpeg"
-
-DESCRIPTION_jpeg-tools = "The jpeg-tools package includes client programs to access libjpeg functionality. These tools allow for the compression, decompression, transformation and display of JPEG files and benchmarking of the libjpeg library."
-FILES_jpeg-tools = "${bindir}/*"
-
-DESCRIPTION_libturbojpeg = "A SIMD-accelerated JPEG codec which provides only TurboJPEG APIs"
-FILES_libturbojpeg = "${libdir}/libturbojpeg.so.*"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb
new file mode 100644
index 0000000..50a5ae0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb
@@ -0,0 +1,59 @@
+SUMMARY = "Hardware accelerated JPEG compression/decompression library"
+DESCRIPTION = "libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression"
+HOMEPAGE = "http://libjpeg-turbo.org/"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://cdjpeg.h;endline=13;md5=8184bcc7c4ac7b9edc6a7bc00f231d0b \
+ file://jpeglib.h;endline=16;md5=f67d70e547a2662c079781c72f877f72 \
+ file://djpeg.c;endline=11;md5=c59e19811c006cb38f82d6477134d314 \
+"
+DEPENDS_append_x86-64_class-target = " nasm-native"
+DEPENDS_append_x86_class-target = " nasm-native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "7c82f0f6a3130ec06b8a4d0b321cbca3"
+SRC_URI[sha256sum] = "b24890e2bb46e12e72a79f7e965f409f4e16466d00e1dd15d93d73ee6b592523"
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libjpeg-turbo/files/"
+UPSTREAM_CHECK_REGEX = "/libjpeg-turbo/files/(?P<pver>(\d+[\.\-_]*)+)/"
+
+PE= "1"
+
+# Drop-in replacement for jpeg
+PROVIDES = "jpeg"
+RPROVIDES_${PN} += "jpeg"
+RREPLACES_${PN} += "jpeg"
+RCONFLICTS_${PN} += "jpeg"
+
+inherit autotools pkgconfig
+
+# Add nasm-native dependency consistently for all build arches is hard
+EXTRA_OECONF_append_class-native = " --without-simd"
+
+# Work around missing x32 ABI support
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--without-simd", "", d)}"
+
+# Work around missing non-floating point ABI support in MIPS
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf", "--without-simd", "", d)}"
+
+# Provide a workaround if Altivec unit is not present in PPC
+EXTRA_OECONF_append_class-target_powerpc = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
+EXTRA_OECONF_append_class-target_powerpc64 = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
+
+def get_build_time(d):
+ if d.getVar('SOURCE_DATE_EPOCH') != None:
+ import datetime
+ return " --with-build-date="+ datetime.datetime.fromtimestamp(float(d.getVar('SOURCE_DATE_EPOCH'))).strftime("%Y%m%d")
+ return ""
+
+EXTRA_OECONF_append_class-target = "${@get_build_time(d)}"
+
+PACKAGES =+ "jpeg-tools libturbojpeg"
+
+DESCRIPTION_jpeg-tools = "The jpeg-tools package includes client programs to access libjpeg functionality. These tools allow for the compression, decompression, transformation and display of JPEG files and benchmarking of the libjpeg library."
+FILES_jpeg-tools = "${bindir}/*"
+
+DESCRIPTION_libturbojpeg = "A SIMD-accelerated JPEG codec which provides only TurboJPEG APIs"
+FILES_libturbojpeg = "${libdir}/libturbojpeg.so.*"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch b/import-layers/yocto-poky/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch
new file mode 100644
index 0000000..3605446
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch
@@ -0,0 +1,116 @@
+From 761bf993ca55095f46380c0238583791c1797295 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org>
+Date: Tue, 11 Jul 2017 14:50:37 -0500
+Subject: [PATCH kmscube] Detect gst_bo_map/_unmap and use it (or avoid it)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Those functions are not available on libMali, thus breaking
+builds and creating havoc.
+
+Removing the specific parts of the code that deal with
+gbm_bo_map() and gbm_bo_unmap() renders the kmscube utility
+a little less useful, but still valuable.
+
+Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
+Cc: Rob Clark <robdclark@gmail.com>
+Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
+
+Upstream-Status: Submitted [https://lists.freedesktop.org/archives/mesa-dev/2017-July/163020.html]
+---
+ Makefile.am | 5 ++++-
+ configure.ac | 3 +++
+ gst-decoder.c | 7 ++++++-
+ kmscube.c | 4 ++++
+ 4 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index a36087d..ab4adbf 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -43,7 +43,6 @@ kmscube_SOURCES = \
+ common.c \
+ common.h \
+ cube-smooth.c \
+- cube-tex.c \
+ drm-atomic.c \
+ drm-common.c \
+ drm-common.h \
+@@ -59,3 +58,7 @@ kmscube_LDADD += $(GST_LIBS)
+ kmscube_CFLAGS += $(GST_CFLAGS)
+ kmscube_SOURCES += cube-video.c gst-decoder.c
+ endif
++
++if ENABLE_GBM_MAP
++kmscube_SOURCES += cube-tex.c
++endif
+diff --git a/configure.ac b/configure.ac
+index 8397f7b..c7f1f4d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -65,5 +65,8 @@ if test "x$enable_gbm_modifiers" = xyes; then
+ AC_DEFINE(HAVE_GBM_MODIFIERS, 1, [Define if you can use GBM properties.])
+ fi
+
++AC_CHECK_LIB([gbm], [gbm_bo_map], [HAVE_GBM_BO_MAP=yes], [])
++AM_CONDITIONAL(ENABLE_GBM_MAP, [test "x$HAVE_GBM_BO_MAP" = "xyes"])
++
+ AC_CONFIG_FILES([Makefile])
+ AC_OUTPUT
+diff --git a/gst-decoder.c b/gst-decoder.c
+index 2d6d581..b84980e 100644
+--- a/gst-decoder.c
++++ b/gst-decoder.c
+@@ -332,6 +332,7 @@ set_last_frame(struct decoder *dec, EGLImage frame, GstSample *samp)
+ dec->last_samp = samp;
+ }
+
++#if HAVE_GBM_BO_MAP
+ // TODO this could probably be a helper re-used by cube-tex:
+ static int
+ buf_to_fd(const struct gbm *gbm, int size, void *ptr)
+@@ -357,6 +358,7 @@ buf_to_fd(const struct gbm *gbm, int size, void *ptr)
+
+ return fd;
+ }
++#endif
+
+ static EGLImage
+ buffer_to_image(struct decoder *dec, GstBuffer *buf)
+@@ -410,12 +412,15 @@ buffer_to_image(struct decoder *dec, GstBuffer *buf)
+
+ if (is_dmabuf_mem) {
+ dmabuf_fd = dup(gst_dmabuf_memory_get_fd(mem));
+- } else {
++ }
++#if HAVE_GBM_BO_MAP
++ else {
+ GstMapInfo map_info;
+ gst_buffer_map(buf, &map_info, GST_MAP_READ);
+ dmabuf_fd = buf_to_fd(dec->gbm, map_info.size, map_info.data);
+ gst_buffer_unmap(buf, &map_info);
+ }
++#endif
+
+ if (dmabuf_fd < 0) {
+ GST_ERROR("could not obtain DMABUF FD");
+diff --git a/kmscube.c b/kmscube.c
+index 3a2c4dd..276dc55 100644
+--- a/kmscube.c
++++ b/kmscube.c
+@@ -142,7 +142,11 @@ int main(int argc, char *argv[])
+ else if (mode == VIDEO)
+ egl = init_cube_video(gbm, video);
+ else
++#if HAVE_GBM_BO_MAP
+ egl = init_cube_tex(gbm, mode);
++#else
++ printf("gbm_bo_map() support missing\n");
++#endif
+
+ if (!egl) {
+ printf("failed to initialize EGL\n");
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/kmscube/kmscube_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/kmscube/kmscube_git.bb
index cab68ff..5b64ed6 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/kmscube/kmscube_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/kmscube/kmscube_git.bb
@@ -7,8 +7,9 @@
LIC_FILES_CHKSUM = "file://kmscube.c;beginline=1;endline=23;md5=8b309d4ee67b7315ff7381270dd631fb"
SRCREV = "0d8de4ce3a03f36af1817f9b0586d132ad2c5d2e"
-SRC_URI = "git://anongit.freedesktop.org/mesa/kmscube;branch=master;protocol=git"
-UPSTREAM_VERSION_UNKNOWN = "1"
+SRC_URI = "git://anongit.freedesktop.org/mesa/kmscube;branch=master;protocol=git \
+ file://detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch"
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/Add-fallback-definition-for-EGL-CAST.patch b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/Add-fallback-definition-for-EGL-CAST.patch
deleted file mode 100644
index b929725..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/Add-fallback-definition-for-EGL-CAST.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Add fallback definition for EGL_CAST
-
-The EGL API update from d11104f introduced a dependency on the
-EGL_CAST() macro, provided by an updated eglplatform.h. Given that we
-don't provide eglplatform.h, add a fallback definition for if we're
-building against Mesa 17.0.x or similar.
-
-https://bugs.gentoo.org/show_bug.cgi?id=623926
-
-Upstream-Status: Backport [https://github.com/anholt/libepoxy/commit/ebe3a53db1c0bb34e1ca963b95d1f222115f93f8]
-
-Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
-
-Index: libepoxy-1.4.3/src/gen_dispatch.py
-===================================================================
---- libepoxy-1.4.3.orig/src/gen_dispatch.py 2017-06-06 04:24:13.000000000 -0500
-+++ libepoxy-1.4.3/src/gen_dispatch.py 2017-11-06 12:45:43.594966473 -0600
-@@ -491,6 +491,15 @@
- self.outln('#include "epoxy/gl.h"')
- if self.target == "egl":
- self.outln('#include "EGL/eglplatform.h"')
-+ # Account for older eglplatform.h, which doesn't define
-+ # the EGL_CAST macro.
-+ self.outln('#ifndef EGL_CAST')
-+ self.outln('#if defined(__cplusplus)')
-+ self.outln('#define EGL_CAST(type, value) (static_cast<type>(value))')
-+ self.outln('#else')
-+ self.outln('#define EGL_CAST(type, value) ((type) (value))')
-+ self.outln('#endif')
-+ self.outln('#endif')
- else:
- # Add some ridiculous inttypes.h redefinitions that are
- # from khrplatform.h and not included in the XML. We
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/no-tests.patch b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/no-tests.patch
new file mode 100644
index 0000000..d2b6c1a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/no-tests.patch
@@ -0,0 +1,33 @@
+Add option to disable tests.
+
+Upstream-Status: Submitted (https://github.com/anholt/libepoxy/pull/158)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/meson.build b/meson.build
+index b2ebaef..9632c7a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -242,7 +242,10 @@ libepoxy_inc = [
+
+ subdir('include/epoxy')
+ subdir('src')
+-subdir('test')
++
++if get_option('tests')
++ subdir('test')
++endif
+
+ if get_option('docs')
+ doxygen = find_program('doxygen', required: false)
+diff --git a/meson_options.txt b/meson_options.txt
+index b5d7c98..dc30e68 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -15,3 +15,7 @@ option('x11',
+ type: 'boolean',
+ value: true,
+ description: 'Enable X11 support (GLX or EGL-X11)')
++option('tests',
++ type: 'boolean',
++ value: true,
++ description: 'Build the test suite')
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb
deleted file mode 100644
index 0172322..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "OpenGL function pointer management library"
-HOMEPAGE = "https://github.com/anholt/libepoxy/"
-SECTION = "libs"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=58ef4c80d401e07bd9ee8b6b58cf464b"
-
-SRC_URI = "https://github.com/anholt/${BPN}/releases/download/${PV}/${BP}.tar.xz \
- file://Add-fallback-definition-for-EGL-CAST.patch"
-SRC_URI[md5sum] = "af4c3ce0fb1143bdc4e43f85695a9bed"
-SRC_URI[sha256sum] = "0b808a06c9685a62fca34b680abb8bc7fb2fda074478e329b063c1f872b826f6"
-UPSTREAM_CHECK_URI = "https://github.com/anholt/libepoxy/releases"
-
-inherit autotools pkgconfig distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "opengl"
-
-DEPENDS = "util-macros"
-
-PACKAGECONFIG[egl] = "--enable-egl, --disable-egl, virtual/egl"
-PACKAGECONFIG[x11] = "--enable-glx, --disable-glx, virtual/libx11"
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} egl"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb
new file mode 100644
index 0000000..5ca0868
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb
@@ -0,0 +1,23 @@
+SUMMARY = "OpenGL function pointer management library"
+HOMEPAGE = "https://github.com/anholt/libepoxy/"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=58ef4c80d401e07bd9ee8b6b58cf464b"
+
+SRC_URI = "https://github.com/anholt/${BPN}/releases/download/${PV}/${BP}.tar.xz \
+ file://no-tests.patch \
+ "
+SRC_URI[md5sum] = "63fe3847789258254dcd7e3fdb9e7f5e"
+SRC_URI[sha256sum] = "4c94995398a6ebf691600dda2e9685a0cac261414175c2adf4645cdfab42a5d5"
+UPSTREAM_CHECK_URI = "https://github.com/anholt/libepoxy/releases"
+
+inherit meson pkgconfig distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+PACKAGECONFIG[egl] = "-Degl=yes, -Degl=no, virtual/egl"
+PACKAGECONFIG[x11] = "-Dglx=yes, -Dglx=no, virtual/libx11 virtual/libgl"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} egl"
+
+EXTRA_OEMESON += "-Dtests=false"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch
deleted file mode 100644
index efc8418..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From b44808e43130dcd13b43e5b978b9b24aeb4c134c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Thu, 20 Oct 2016 14:57:51 +0200
-Subject: [PATCH] prepend our sysroot path so that make finds our
- wayland-protocol files
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- configure.in | 4 +-
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 726ded3..3376600 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1206,7 +1206,7 @@ AC_HELP_STRING([--enable-video-wayland-qt-touch], [QtWayland server support for
- WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
- WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
- WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
-- WAYLAND_CORE_PROTOCOL_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-client`
-- WAYLAND_PROTOCOLS_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
-+ WAYLAND_CORE_PROTOCOL_DIR=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-client`
-+ WAYLAND_PROTOCOLS_DIR=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
- video_wayland=yes
- fi
- fi
---
-2.5.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0002-Avoid-finding-build-host-s-wayland-scanner.patch b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0002-Avoid-finding-build-host-s-wayland-scanner.patch
deleted file mode 100644
index 7837315..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0002-Avoid-finding-build-host-s-wayland-scanner.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ae879091cf65cb70293b375ec7e61ed12a96d8a7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Fri, 2 Dec 2016 09:39:25 +0100
-Subject: [PATCH] Avoid finding build host's wayland-scanner
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- configure.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.in b/configure.in
-index 3376600..2aa6ed4 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1204,7 +1204,7 @@ AC_HELP_STRING([--enable-video-wayland-qt-touch], [QtWayland server support for
- if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon ; then
- WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
- WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
-- WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
-+ AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
- WAYLAND_CORE_PROTOCOL_DIR=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-client`
- WAYLAND_PROTOCOLS_DIR=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
- video_wayland=yes
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/fix-build-failure-on-ppc.patch b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/fix-build-failure-on-ppc.patch
deleted file mode 100644
index 1520bcf..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/fix-build-failure-on-ppc.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Upstream-Status: Backport [https://hg.libsdl.org/SDL/rev/5184186d4366]
-
-Backport patch from upstream to fix build failures on ppc and ppc64.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-# HG changeset patch
-# User Sam Lantinga <slouken@libsdl.org>
-# Date 1477159315 25200
-# Node ID 5184186d4366169617b434f5b71c618a7035cde4
-# Parent 71d4148e32de5088c4bc2f04c1e5ded647a2bf82
-Fixed bug 3466 - Can't build 2.0.5 on ppc64
-
-/home/fedora/SDL2-2.0.5/src/video/SDL_blit_N.c: In function 'calc_swizzle32':
-/home/fedora/SDL2-2.0.5/src/video/SDL_blit_N.c:127:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
- const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00, 0x00, 0x00,
- ^
-
-diff -r 71d4148e32de -r 5184186d4366 src/video/SDL_blit_N.c
---- a/src/video/SDL_blit_N.c Wed Oct 19 21:22:42 2016 -0700
-+++ b/src/video/SDL_blit_N.c Sat Oct 22 11:01:55 2016 -0700
-@@ -118,12 +118,6 @@
- 16, 8, 0, 24,
- 0, NULL
- };
-- if (!srcfmt) {
-- srcfmt = &default_pixel_format;
-- }
-- if (!dstfmt) {
-- dstfmt = &default_pixel_format;
-- }
- const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00, 0x00, 0x00,
- 0x04, 0x04, 0x04, 0x04,
- 0x08, 0x08, 0x08, 0x08,
-@@ -136,6 +130,14 @@
- Uint32 gmask = RESHIFT(srcfmt->Gshift) << (dstfmt->Gshift);
- Uint32 bmask = RESHIFT(srcfmt->Bshift) << (dstfmt->Bshift);
- Uint32 amask;
-+
-+ if (!srcfmt) {
-+ srcfmt = &default_pixel_format;
-+ }
-+ if (!dstfmt) {
-+ dstfmt = &default_pixel_format;
-+ }
-+
- /* Use zero for alpha if either surface doesn't have alpha */
- if (dstfmt->Amask) {
- amask =
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/linkage.patch b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/linkage.patch
deleted file mode 100644
index 60185b1..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/linkage.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-When building use the libtool intermediate .lo files instead of explicitly using
-the .o files. Under libtool foo.lo is the libtool intermediate wrapper, foo.o is
-a static build, and .libs/foo.o is a shared build.
-
-If static libraries have been disabled globally then libtool won't generate them
-and explicit references to foo.o won't be satisfied.
-
-Upstream-Status: Pending
-RP
-2016/1/16
-
-
-Index: SDL2-2.0.4/configure.in
-===================================================================
---- SDL2-2.0.4.orig/configure.in
-+++ SDL2-2.0.4/configure.in
-@@ -3464,23 +3464,23 @@ done
-
- VERSION_OBJECTS=`echo $VERSION_SOURCES`
- VERSION_DEPENDS=`echo $VERSION_SOURCES`
--VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
-+VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.lo,g'`
- VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
--\\$(objects)/\\2.o: \\1/\\2.rc\\\\
-+\\$(objects)/\\2.lo: \\1/\\2.rc\\\\
- \\$(WINDRES) \\$< \\$@,g"`
-
- SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
- SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
--SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
-+SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
- SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
--\\$(objects)/\\2.o: \\1/\\2.c\\\\
-+\\$(objects)/\\2.lo: \\1/\\2.c\\\\
- \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
-
- SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES`
- SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES`
--SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
-+SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
- SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
--\\$(objects)/\\2.o: \\1/\\2.c\\\\
-+\\$(objects)/\\2.lo: \\1/\\2.c\\\\
- \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
-
- # Set runtime shared library paths as needed
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
deleted file mode 100644
index 12d3aaf..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
+++ /dev/null
@@ -1,69 +0,0 @@
-SUMMARY = "Simple DirectMedia Layer"
-DESCRIPTION = "Simple DirectMedia Layer is a cross-platform multimedia \
-library designed to provide low level access to audio, keyboard, mouse, \
-joystick, 3D hardware via OpenGL, and 2D video framebuffer."
-HOMEPAGE = "http://www.libsdl.org"
-BUGTRACKER = "http://bugzilla.libsdl.org/"
-
-SECTION = "libs"
-
-LICENSE = "Zlib"
-LIC_FILES_CHKSUM = "file://COPYING.txt;md5=b2304ad7e91711027590d3f102a754b7"
-
-PROVIDES = "virtual/libsdl2"
-
-DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender nativesdk-libxext', '', d)}"
-
-SRC_URI = " \
- http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
- file://linkage.patch \
- file://0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch \
- file://0002-Avoid-finding-build-host-s-wayland-scanner.patch \
- file://fix-build-failure-on-ppc.patch \
-"
-
-S = "${WORKDIR}/SDL2-${PV}"
-
-SRC_URI[md5sum] = "d4055424d556b4a908aa76fad63abd3c"
-SRC_URI[sha256sum] = "442038cf55965969f2ff06d976031813de643af9c9edc9e331bd761c242e8785"
-
-inherit autotools lib_package binconfig pkgconfig
-
-EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
- --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
- --disable-video-dummy \
- --enable-pthreads \
- --enable-sdl-dlopen \
- --disable-rpath \
- WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT}"
-
-# opengl packageconfig factored out to make it easy for distros
-# and BSP layers to pick either (desktop) opengl, gles2, or no GL
-PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
-
-PACKAGECONFIG ??= " \
- ${PACKAGECONFIG_GL} \
- ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
-"
-PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
-PACKAGECONFIG[directfb] = "--enable-video-directfb,--disable-video-directfb,directfb"
-PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
-PACKAGECONFIG[opengl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
-PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
-PACKAGECONFIG[tslib] = "--enable-input-tslib,--disable-input-tslib,tslib"
-PACKAGECONFIG[wayland] = "--enable-video-wayland,--disable-video-wayland,wayland-native wayland wayland-protocols libxkbcommon"
-PACKAGECONFIG[x11] = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender"
-
-EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
-
-do_configure_prepend() {
- # Remove old libtool macros.
- MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
- for i in ${MACROS}; do
- rm -f ${S}/acinclude/$i
- done
- export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
-}
-
-FILES_${PN}-dev += "${libdir}/cmake"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb
new file mode 100644
index 0000000..c0cf70d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb
@@ -0,0 +1,65 @@
+SUMMARY = "Simple DirectMedia Layer"
+DESCRIPTION = "Simple DirectMedia Layer is a cross-platform multimedia \
+library designed to provide low level access to audio, keyboard, mouse, \
+joystick, 3D hardware via OpenGL, and 2D video framebuffer."
+HOMEPAGE = "http://www.libsdl.org"
+BUGTRACKER = "http://bugzilla.libsdl.org/"
+
+SECTION = "libs"
+
+LICENSE = "Zlib"
+LIC_FILES_CHKSUM = "file://COPYING.txt;md5=02ee26814dd044bd7838ae24e05b880f"
+
+PROVIDES = "virtual/libsdl2"
+
+DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender nativesdk-libxext', '', d)}"
+
+SRC_URI = " \
+ http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
+"
+
+S = "${WORKDIR}/SDL2-${PV}"
+
+SRC_URI[md5sum] = "3800d705cef742c6a634f202c37f263f"
+SRC_URI[sha256sum] = "edc77c57308661d576e843344d8638e025a7818bff73f8fbfab09c3c5fd092ec"
+
+inherit autotools lib_package binconfig pkgconfig
+
+EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
+ --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
+ --disable-video-dummy \
+ --enable-pthreads \
+ --enable-sdl-dlopen \
+ --disable-rpath \
+ "
+
+# opengl packageconfig factored out to make it easy for distros
+# and BSP layers to pick either (desktop) opengl, gles2, or no GL
+PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
+
+PACKAGECONFIG ??= " \
+ ${PACKAGECONFIG_GL} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
+"
+PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
+PACKAGECONFIG[directfb] = "--enable-video-directfb,--disable-video-directfb,directfb"
+PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
+PACKAGECONFIG[opengl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
+PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
+PACKAGECONFIG[tslib] = "--enable-input-tslib,--disable-input-tslib,tslib"
+PACKAGECONFIG[wayland] = "--enable-video-wayland,--disable-video-wayland,wayland-native wayland wayland-protocols libxkbcommon"
+PACKAGECONFIG[x11] = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender"
+
+EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
+
+do_configure_prepend() {
+ # Remove old libtool macros.
+ MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
+ for i in ${MACROS}; do
+ rm -f ${S}/acinclude/$i
+ done
+ export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
+}
+
+FILES_${PN}-dev += "${libdir}/cmake"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libva/libva-utils_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/libva/libva-utils_1.8.3.bb
deleted file mode 100644
index c082c18..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libva/libva-utils_1.8.3.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "libva-utils is a collection of utilities from libva project"
-
-DESCRIPTION = "libva-utils is a collection of utilities \
-and examples to exercise VA-API in accordance with the libva \
-project.VA-API is an open-source library and API specification, \
-which provides access to graphics hardware acceleration capabilities \
-for video processing. It consists of a main library and driver-specific \
-acceleration backends for each supported hardware vendor"
-
-HOMEPAGE = "https://01.org/linuxmedia/vaapi"
-BUGTRACKER = "https://github.com/01org/libva-utils/issues"
-
-SECTION = "x11"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b148fc8adf19dc9aec17cf9cd29a9a5e"
-
-SRC_URI = "git://github.com/01org/libva-utils.git;branch=v1.8-branch"
-SRCREV = "011c709b98b52db3b10aeb361dfea9da43930364"
-UPSTREAM_CHECK_URI = "https://github.com/01org/libva-utils/releases"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-
-S = "${WORKDIR}/git"
-
-DEPENDS = "libva"
-
-inherit autotools pkgconfig distro_features_check
-
-# depends on libva which requires opengl
-REQUIRED_DISTRO_FEATURES = "opengl"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
-PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxext libxfixes"
-PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libva/libva-utils_2.1.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/libva/libva-utils_2.1.0.bb
new file mode 100644
index 0000000..a8018ea
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libva/libva-utils_2.1.0.bb
@@ -0,0 +1,32 @@
+SUMMARY = "libva-utils is a collection of utilities from libva project"
+
+DESCRIPTION = "libva-utils is a collection of utilities \
+and examples to exercise VA-API in accordance with the libva \
+project.VA-API is an open-source library and API specification, \
+which provides access to graphics hardware acceleration capabilities \
+for video processing. It consists of a main library and driver-specific \
+acceleration backends for each supported hardware vendor"
+
+HOMEPAGE = "https://01.org/linuxmedia/vaapi"
+BUGTRACKER = "https://github.com/intel/libva-utils/issues"
+
+SECTION = "x11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b148fc8adf19dc9aec17cf9cd29a9a5e"
+
+SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BP}.tar.bz2"
+SRC_URI[md5sum] = "6649be70390606651cb636320bfd43c6"
+SRC_URI[sha256sum] = "f6a7790c3dcc56537372c90a83036a3136194a8b397e84e97bf9cc9254fa2c51"
+
+UPSTREAM_CHECK_URI = "https://github.com/intel/libva-utils/releases"
+
+DEPENDS = "libva"
+
+inherit autotools pkgconfig distro_features_check
+
+# depends on libva which requires opengl
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
+PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxext libxfixes"
+PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libva/libva_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/libva/libva_1.8.3.bb
deleted file mode 100644
index ceeda84..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libva/libva_1.8.3.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "Video Acceleration (VA) API for Linux"
-DESCRIPTION = "Video Acceleration API (VA API) is a library (libVA) \
-and API specification which enables and provides access to graphics \
-hardware (GPU) acceleration for video processing on Linux and UNIX \
-based operating systems. Accelerated processing includes video \
-decoding, video encoding, subpicture blending and rendering. The \
-specification was originally designed by Intel for its GMA (Graphics \
-Media Accelerator) series of GPU hardware, the API is however not \
-limited to GPUs or Intel specific hardware, as other hardware and \
-manufacturers can also freely use this API for hardware accelerated \
-video decoding."
-
-HOMEPAGE = "https://01.org/linuxmedia/vaapi"
-BUGTRACKER = "https://github.com/01org/libva/issues"
-
-SECTION = "x11"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f"
-
-SRC_URI = "git://github.com/01org/libva.git;protocol=http;branch=v1.8-branch "
-SRCREV = "457470987cc9df5976ce8c72ffd4bfbd9baaf0f9"
-UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>(\d+(\.\d+)+))$"
-
-S = "${WORKDIR}/git"
-
-DEPENDS = "libdrm virtual/mesa virtual/libgles1 virtual/libgles2 virtual/egl"
-
-inherit autotools pkgconfig distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "opengl"
-
-EXTRA_OECONF = "ac_cv_prog_WAYLAND_SCANNER=wayland-scanner"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
-PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxext libxfixes"
-PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland"
-
-PACKAGES =+ "${PN}-x11 ${PN}-tpi ${PN}-glx ${PN}-egl ${PN}-wayland"
-
-RDEPENDS_${PN}-tpi =+ "${PN}"
-RDEPENDS_${PN}-x11 =+ "${PN}"
-RDEPENDS_${PN}-glx =+ "${PN}-x11"
-RDEPENDS_${PN}-egl =+ "${PN}-x11"
-
-FILES_${PN}-dbg += "${libdir}/dri/.debug"
-
-FILES_${PN}-x11 =+ "${libdir}/libva-x11*${SOLIBS}"
-FILES_${PN}-tpi =+ "${libdir}/libva-tpi*${SOLIBS}"
-FILES_${PN}-glx =+ "${libdir}/libva-glx*${SOLIBS}"
-FILES_${PN}-egl =+ "${libdir}/libva-egl*${SOLIBS}"
-FILES_${PN}-wayland =+ "${libdir}/libva-wayland*${SOLIBS}"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libva/libva_2.1.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/libva/libva_2.1.0.bb
new file mode 100644
index 0000000..d3cf633
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libva/libva_2.1.0.bb
@@ -0,0 +1,46 @@
+SUMMARY = "Video Acceleration (VA) API for Linux"
+DESCRIPTION = "Video Acceleration API (VA API) is a library (libVA) \
+and API specification which enables and provides access to graphics \
+hardware (GPU) acceleration for video processing on Linux and UNIX \
+based operating systems. Accelerated processing includes video \
+decoding, video encoding, subpicture blending and rendering. The \
+specification was originally designed by Intel for its GMA (Graphics \
+Media Accelerator) series of GPU hardware, the API is however not \
+limited to GPUs or Intel specific hardware, as other hardware and \
+manufacturers can also freely use this API for hardware accelerated \
+video decoding."
+
+HOMEPAGE = "https://01.org/linuxmedia/vaapi"
+BUGTRACKER = "https://github.com/intel/libva/issues"
+
+SECTION = "x11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f"
+
+SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BP}.tar.bz2"
+
+SRC_URI[md5sum] = "9d6e4f1d36c407566343e9dde5a972b8"
+SRC_URI[sha256sum] = "f3fa953a11d3210c3a4ee79031abdbe0863d5ce13d9b3f93f315f1eec60a4b0f"
+
+UPSTREAM_CHECK_URI = "https://github.com/intel/libva/releases"
+
+DEPENDS = "libdrm virtual/mesa"
+
+inherit autotools pkgconfig distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+EXTRA_OECONF = "ac_cv_prog_WAYLAND_SCANNER=wayland-scanner"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
+PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxext libxfixes"
+PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland"
+
+PACKAGES =+ "${PN}-x11 ${PN}-glx ${PN}-wayland"
+
+RDEPENDS_${PN}-x11 =+ "${PN}"
+RDEPENDS_${PN}-glx =+ "${PN}-x11"
+
+FILES_${PN}-x11 =+ "${libdir}/libva-x11*${SOLIBS}"
+FILES_${PN}-glx =+ "${libdir}/libva-glx*${SOLIBS}"
+FILES_${PN}-wayland =+ "${libdir}/libva-wayland*${SOLIBS}"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch
index bd1e863..f908d46 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch
@@ -20,17 +20,18 @@
explictly add EXPAT_LIBS to intel's VULKAN_LIB_DEPS
-Upstream-Status: Submitted [mesa-dev@lists.freedesktop.org]
+Upstream-Status: Accepted
+https://cgit.freedesktop.org/mesa/mesa/commit/?id=05fc62d89f59ce19a18bfd4e63a09624910d6caf
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
src/intel/Makefile.vulkan.am | 1 +
1 file changed, 1 insertion(+)
-diff --git a/src/intel/Makefile.vulkan.am b/src/intel/Makefile.vulkan.am
-index 271b0a5..8fbe2c8 100644
---- a/src/intel/Makefile.vulkan.am
-+++ b/src/intel/Makefile.vulkan.am
+Index: mesa-17.3.6/src/intel/Makefile.vulkan.am
+===================================================================
+--- mesa-17.3.6.orig/src/intel/Makefile.vulkan.am
++++ mesa-17.3.6/src/intel/Makefile.vulkan.am
@@ -144,6 +144,7 @@ VULKAN_LIB_DEPS = \
$(LIBDRM_LIBS) \
$(PTHREAD_LIBS) \
@@ -38,7 +39,4 @@
+ $(EXPAT_LIBS) \
-lm
- if HAVE_PLATFORM_X11
---
-2.7.4
-
+ if HAVE_PLATFORM_ANDROID
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-Use-wayland-scanner-in-the-path.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-Use-wayland-scanner-in-the-path.patch
index eb6ff4f..2444b28 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-Use-wayland-scanner-in-the-path.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-Use-wayland-scanner-in-the-path.patch
@@ -14,12 +14,12 @@
configure.ac | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
-diff --git a/configure.ac b/configure.ac
-index 2c7e636fac..d2b2350739 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2174,12 +2174,7 @@ if test "x$with_platforms" != xauto; then
- with_egl_platforms=$with_platforms
+Index: mesa-17.3.6/configure.ac
+===================================================================
+--- mesa-17.3.6.orig/configure.ac
++++ mesa-17.3.6/configure.ac
+@@ -1694,12 +1694,7 @@ if test "x$with_platforms" = xauto; then
+ with_platforms=$with_egl_platforms
fi
-PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
@@ -30,8 +30,5 @@
-fi
+AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
- # Do per-EGL platform setups and checks
- egl_platforms=`IFS=', '; echo $with_egl_platforms`
---
-2.13.0
-
+ PKG_CHECK_EXISTS([wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED], [have_wayland_protocols=yes], [have_wayland_protocols=no])
+ if test "x$have_wayland_protocols" = xyes; then
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-ac-fix-build-after-LLVM-5.0-SVN-r300718.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-ac-fix-build-after-LLVM-5.0-SVN-r300718.patch
deleted file mode 100644
index b27a3bc..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-ac-fix-build-after-LLVM-5.0-SVN-r300718.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 9861437e58fdd0de01193a102608d34e5952953f Mon Sep 17 00:00:00 2001
-From: Christoph Haag <haagch+mesadev@frickel.club>
-Date: Thu, 20 Apr 2017 10:34:18 +0200
-Subject: [PATCH 1/2] ac: fix build after LLVM 5.0 SVN r300718
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-v2: previously getWithDereferenceableBytes() exists, but addAttr() doesn't take that type
-
-Signed-off-by: Christoph Haag <haagch+mesadev@frickel.club>
-Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
-Tested-and-reviewed-by: Mike Lothian <mike@fireburn.co.uk>
----
-Upstream-Status: Backport
-
- src/amd/common/ac_llvm_helper.cpp | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/amd/common/ac_llvm_helper.cpp b/src/amd/common/ac_llvm_helper.cpp
-index d9ea4b1..11fa809 100644
---- a/src/amd/common/ac_llvm_helper.cpp
-+++ b/src/amd/common/ac_llvm_helper.cpp
-@@ -44,9 +44,13 @@ typedef AttributeSet AttributeList;
- void ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes)
- {
- llvm::Argument *A = llvm::unwrap<llvm::Argument>(val);
-+#if HAVE_LLVM < 0x0500
- llvm::AttrBuilder B;
- B.addDereferenceableAttr(bytes);
- A->addAttr(llvm::AttributeList::get(A->getContext(), A->getArgNo() + 1, B));
-+#else
-+ A->addAttr(llvm::Attribute::getWithDereferenceableBytes(A->getContext(), bytes));
-+#endif
- }
-
- bool ac_is_sgpr_param(LLVMValueRef arg)
---
-2.13.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-configure.ac-Always-check-for-expat.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-configure.ac-Always-check-for-expat.patch
deleted file mode 100644
index 4753c49..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-configure.ac-Always-check-for-expat.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 1f7d752193f02d15d5923cee992e8f46d4c6df1b Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Mon, 28 Aug 2017 13:51:49 +0300
-Subject: [PATCH] configure.ac: Always check for expat
-
-expat was not checked if dri was not built leading to build failure
-in vulkan driver: backport a fix (a combination of multiple commits
-that should end up in 17.3).
-
-Upstream-Status: Backport
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 15 ++++++---------
- 1 file changed, 6 insertions(+), 9 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index fd346c8aa2..662faecefa 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1777,6 +1777,12 @@ if test "x$with_dri_drivers" = xno; then
- with_dri_drivers=''
- fi
-
-+# Check for expat
-+PKG_CHECK_MODULES([EXPAT], [expat])
-+PKG_CHECK_MODULES([EXPAT], [expat],,
-+ [PKG_CHECK_MODULES([EXPAT], [expat21])]
-+)
-+
- dnl If $with_dri_drivers is yes, drivers will be added through
- dnl platform checks. Set DEFINES and LIB_DEPS
- if test "x$enable_dri" = xyes; then
-@@ -1810,15 +1816,6 @@ if test "x$enable_dri" = xyes; then
- with_dri_drivers="i915 i965 nouveau r200 radeon swrast"
- fi
-
-- # Check for expat
-- PKG_CHECK_MODULES([EXPAT], [expat], [],
-- # expat version 2.0 and earlier do not provide expat.pc
-- [AC_CHECK_HEADER([expat.h],[],
-- [AC_MSG_ERROR([Expat headers required for DRI not found])])
-- AC_CHECK_LIB([expat],[XML_ParserCreate],[],
-- [AC_MSG_ERROR([Expat library required for DRI not found])])
-- EXPAT_LIBS="-lexpat"])
--
- # put all the necessary libs together
- DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
- fi
---
-2.14.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-st-dri-Initialise-modifier-to-INVALID-for-DRI2.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-st-dri-Initialise-modifier-to-INVALID-for-DRI2.patch
new file mode 100644
index 0000000..6aba785
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-st-dri-Initialise-modifier-to-INVALID-for-DRI2.patch
@@ -0,0 +1,43 @@
+From 4cbecb61682a0ee426faaa03d824fc8fd7aef826 Mon Sep 17 00:00:00 2001
+From: Daniel Stone <daniels@collabora.com>
+Date: Mon, 2 Apr 2018 13:20:34 +0100
+Subject: [PATCH] st/dri: Initialise modifier to INVALID for DRI2
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When allocating a buffer for DRI2, set the modifier to INVALID to inform
+the backend that we have no supplied modifiers and it should do its own
+thing. The missed initialisation forced linear, even if the
+implementation had made other decisions.
+
+This resulted in VC4 DRI2 clients failing with:
+ Modifier 0x0 vs. tiling (0x700000000000001) mismatch
+
+Signed-off-by: Daniel Stone <daniels@collabora.com>
+Reported-by: Andreas Müller <schnitzeltony@gmail.com>
+Reviewed-by: Eric Anholt <eric@anholt.net>
+Fixes: 3f8513172ff6 ("gallium/winsys/drm: introduce modifier field to winsys_handle")
+
+Upstream-Status: Backport [1]
+
+[1] https://cgit.freedesktop.org/mesa/mesa/commit/?id=4cbecb61682a0ee426faaa03d824fc8fd7aef826
+---
+ src/gallium/state_trackers/dri/dri2.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
+index 31d17d46c2..58a6757f03 100644
+--- a/src/gallium/state_trackers/dri/dri2.c
++++ b/src/gallium/state_trackers/dri/dri2.c
+@@ -806,6 +806,7 @@ dri2_allocate_textures(struct dri_context *ctx,
+ whandle.handle = buf->name;
+ whandle.stride = buf->pitch;
+ whandle.offset = 0;
++ whandle.modifier = DRM_FORMAT_MOD_INVALID;
+ if (screen->can_share_buffer)
+ whandle.type = DRM_API_HANDLE_TYPE_SHARED;
+ else
+--
+2.14.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0002-gallivm-Fix-build-against-LLVM-SVN-r302589.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0002-gallivm-Fix-build-against-LLVM-SVN-r302589.patch
deleted file mode 100644
index ac8caec..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0002-gallivm-Fix-build-against-LLVM-SVN-r302589.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From a02a0dfda2712d30ad62b8f0421ec7b8244ba2cb Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
-Date: Wed, 10 May 2017 17:26:07 +0900
-Subject: [PATCH 2/2] gallivm: Fix build against LLVM SVN >= r302589
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-deregisterEHFrames doesn't take any parameters anymore.
-
-Reviewed-by: Vedran Miletić <vedran@miletic.net>
-Reviewed-by: Marek Olšák <marek.olsak@amd.com>
----
-Upstream-Status: Backport
-
- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
-index 2a388cb..0e4a531 100644
---- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
-+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
-@@ -342,14 +342,20 @@ class DelegatingJITMemoryManager : public BaseMemoryManager {
- virtual void registerEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) {
- mgr()->registerEHFrames(Addr, LoadAddr, Size);
- }
-- virtual void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) {
-- mgr()->deregisterEHFrames(Addr, LoadAddr, Size);
-- }
- #else
- virtual void registerEHFrames(llvm::StringRef SectionData) {
- mgr()->registerEHFrames(SectionData);
- }
- #endif
-+#if HAVE_LLVM >= 0x0500
-+ virtual void deregisterEHFrames() {
-+ mgr()->deregisterEHFrames();
-+ }
-+#elif HAVE_LLVM >= 0x0304
-+ virtual void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) {
-+ mgr()->deregisterEHFrames(Addr, LoadAddr, Size);
-+ }
-+#endif
- virtual void *getPointerToNamedFunction(const std::string &Name,
- bool AbortOnFailure=true) {
- return mgr()->getPointerToNamedFunction(Name, AbortOnFailure);
---
-2.13.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/Use-Python-3-to-execute-the-scripts.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/Use-Python-3-to-execute-the-scripts.patch
new file mode 100644
index 0000000..0b4aabf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/Use-Python-3-to-execute-the-scripts.patch
@@ -0,0 +1,32 @@
+From 18c3e684a8259a0644214f88c7ead7fa31573fd9 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Fri, 29 Dec 2017 10:27:59 -0200
+Subject: [PATCH] Use Python 3 to execute the scripts
+Organization: O.S. Systems Software LTDA.
+
+The MESA build system uses Python 2 but as OE-Core has moved away from
+it, we change it to use Python 3 instead.
+
+Upstream-Status: Inappropriate [ configuration ]
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index b107f04c2e..055546142d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -114,7 +114,7 @@ AC_PROG_CXX
+ AM_PROG_CC_C_O
+ AM_PROG_AS
+ AX_CHECK_GNU_MAKE
+-AC_CHECK_PROGS([PYTHON2], [python2.7 python2 python])
++AC_CHECK_PROGS([PYTHON2], [python3.5 python3 python])
+ AC_PROG_SED
+ AC_PROG_MKDIR_P
+
+--
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/llvm-config-version.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/llvm-config-version.patch
index aa33a1e..fd79991 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/llvm-config-version.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/llvm-config-version.patch
@@ -1,18 +1,24 @@
-When building llvm from git or svn it embeds the svn/git revision into internal version string
+From: Otavio Salvador <otavio@ossystems.com.br>
+Subject: [PATCH] Properly get LLVM version when using LLVM Git releases
-$ /mnt/a/oe/build/tmp/work/corei7-64-bec-linux/mesa/2_17.1.5-r0/recipe-sysroot/usr/lib/llvm5.0/llvm-config-host --version
+$ llvm-config-host --version
5.0.0git-9a5c333388c
-We need to ignore everything after 5.0.0 which is what the cut cmd is doing
+We need to ignore everything after 5.0.0 which is what the cut cmd is
+doing
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
-Index: mesa-17.1.5/configure.ac
-===================================================================
---- mesa-17.1.5.orig/configure.ac
-+++ mesa-17.1.5/configure.ac
-@@ -967,7 +967,7 @@ strip_unwanted_llvm_flags() {
+diff --git a/configure.ac b/configure.ac
+index a02173f244..b107f04c2e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -995,7 +995,7 @@ strip_unwanted_llvm_flags() {
llvm_set_environment_variables() {
if test "x$LLVM_CONFIG" != xno; then
@@ -21,12 +27,15 @@
LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
-@@ -2560,7 +2560,7 @@ if test "x$enable_llvm" = xyes; then
+@@ -2644,7 +2644,7 @@ detect_old_buggy_llvm() {
+ dnl ourselves.
dnl (See https://llvm.org/bugs/show_bug.cgi?id=6823)
- if test "x$enable_llvm_shared_libs" = xyes; then
- dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
-- LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
-+ LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version|cut -c1-5`
- AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes])
+ dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
+- LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
++ LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version | cut -c1-5`
+ AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes])
- if test "x$llvm_have_one_so" = xyes; then
+ if test "x$llvm_have_one_so" = xyes; then
+--
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch
deleted file mode 100644
index 0280ee8..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-endianness check is OS wide and not specific to libc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- src/util/u_endian.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/util/u_endian.h b/src/util/u_endian.h
-index b9d563d..2d5eab9 100644
---- a/src/util/u_endian.h
-+++ b/src/util/u_endian.h
-@@ -27,7 +27,7 @@
- #ifndef U_ENDIAN_H
- #define U_ENDIAN_H
-
--#if defined(__GLIBC__) || defined(ANDROID)
-+#if defined(__linux__)
- #include <endian.h>
-
- #if __BYTE_ORDER == __LITTLE_ENDIAN
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/vulkan-mkdir.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/vulkan-mkdir.patch
deleted file mode 100644
index 15ee5ee..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/vulkan-mkdir.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Upstream-Status: Submitted
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From c78979fd95a1c4f732f7e6edf0f32c524e5955b8 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Wed, 12 Jul 2017 17:10:07 +0100
-Subject: [PATCH] src/intel/Makefile.vulkan.am: create target directories when
- required
-
-In out-of-tree builds src/intel/vulkan won't exist, so always create it before
-writing into it.
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
----
- src/intel/Makefile.vulkan.am | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/intel/Makefile.vulkan.am b/src/intel/Makefile.vulkan.am
-index 3857a5dc62..26e9cd410c 100644
---- a/src/intel/Makefile.vulkan.am
-+++ b/src/intel/Makefile.vulkan.am
-@@ -44,11 +44,13 @@ EXTRA_DIST += \
- vulkan/TODO
-
- vulkan/dev_icd.json : vulkan/dev_icd.json.in
-+ $(MKDIR_GEN)
- $(AM_V_GEN) $(SED) \
- -e "s#@build_libdir@#${abs_top_builddir}/${LIB_DIR}#" \
- < $(srcdir)/vulkan/dev_icd.json.in > $@
-
- vulkan/intel_icd.@host_cpu@.json : vulkan/intel_icd.json.in
-+ $(MKDIR_GEN)
- $(AM_V_GEN) $(SED) \
- -e "s#@install_libdir@#${libdir}#" \
- < $(srcdir)/vulkan/intel_icd.json.in > $@
---
-2.11.0
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_17.1.7.bb b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_17.3.8.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_17.1.7.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_17.3.8.bb
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc
index 4f31ed2..b501b7e 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc
@@ -16,9 +16,15 @@
DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native"
EXTRANATIVEPATH += "chrpath-native"
-PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl virtual/mesa"
+PROVIDES = " \
+ ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \
+ virtual/mesa \
+ "
-inherit autotools pkgconfig gettext distro_features_check
+inherit autotools pkgconfig python3native gettext distro_features_check
ANY_OF_DISTRO_FEATURES = "opengl vulkan"
@@ -34,7 +40,7 @@
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
"
@@ -45,7 +51,7 @@
# "x11" requires "opengl"
PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}"
PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc"
-PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm"
+PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
DRIDRIVERS = "swrast"
DRIDRIVERS_append_x86 = ",radeon,r200,nouveau,i965,i915"
@@ -59,7 +65,7 @@
VULKAN_DRIVERS = ""
VULKAN_DRIVERS_append_x86 = ",intel"
VULKAN_DRIVERS_append_x86-64 = ",intel"
-PACKAGECONFIG[vulkan] = "--with-vulkan-drivers=${VULKAN_DRIVERS}, --without-vulkan-drivers"
+PACKAGECONFIG[vulkan] = "--with-vulkan-drivers=${VULKAN_DRIVERS}, --without-vulkan-drivers, python3-mako-native"
PACKAGECONFIG[opengl] = "--enable-opengl, --disable-opengl"
@@ -77,13 +83,13 @@
GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'imx', ',imx', '', d)}"
GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', 'radeonsi,r600', '', d)}"
PACKAGECONFIG[r600] = ""
-GALLIUMDRIVERS_LLVM33_ENABLED = "${@base_version_less_or_equal('MESA_LLVM_RELEASE', '3.2', False, len('${GALLIUMDRIVERS_LLVM33}') > 0, d)}"
+GALLIUMDRIVERS_LLVM33_ENABLED = "${@oe.utils.version_less_or_equal('MESA_LLVM_RELEASE', '3.2', False, len('${GALLIUMDRIVERS_LLVM33}') > 0, d)}"
GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${@',${GALLIUMDRIVERS_LLVM33}' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
GALLIUMDRIVERS_append_x86 = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
GALLIUMDRIVERS_append_x86-64 = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
# keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers
PACKAGECONFIG[gallium] = "--enable-texture-float --with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers"
-MESA_LLVM_RELEASE ?= "5.0"
+MESA_LLVM_RELEASE ?= "6.0"
PACKAGECONFIG[gallium-llvm] = "--enable-llvm --enable-llvm-shared-libs, --disable-llvm, llvm${MESA_LLVM_RELEASE} llvm-native \
${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}"
@@ -99,9 +105,6 @@
CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS"
-# Multiple virtual/gl providers being built breaks staging
-EXCLUDE_FROM_WORLD = "1"
-
# Remove the mesa dependency on mesa-dev, as mesa is empty
RDEPENDS_${PN}-dev = ""
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_17.1.7.bb b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_17.1.7.bb
deleted file mode 100644
index 39cfce9..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_17.1.7.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
- file://replace_glibc_check_with_linux.patch \
- file://disable-asm-on-non-gcc.patch \
- file://0001-Use-wayland-scanner-in-the-path.patch \
- file://0002-hardware-gloat.patch \
- file://vulkan-mkdir.patch \
- file://llvm-config-version.patch \
- file://0001-ac-fix-build-after-LLVM-5.0-SVN-r300718.patch \
- file://0002-gallivm-Fix-build-against-LLVM-SVN-r302589.patch \
- file://0001-winsys-svga-drm-Include-sys-types.h.patch \
- file://0001-configure.ac-Always-check-for-expat.patch \
- file://0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch \
- "
-SRC_URI[md5sum] = "e40bb428a263bd28cbf6478dae45b207"
-SRC_URI[sha256sum] = "69f472a874b1122404fa0bd13e2d6bf87eb3b9ad9c21d2f39872a96d83d9e5f5"
-
-#because we cannot rely on the fact that all apps will use pkgconfig,
-#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
-do_install_append() {
- if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
- sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
- fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_17.3.8.bb b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_17.3.8.bb
new file mode 100644
index 0000000..2d3fd3c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_17.3.8.bb
@@ -0,0 +1,23 @@
+require ${BPN}.inc
+
+SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
+ file://disable-asm-on-non-gcc.patch \
+ file://Use-Python-3-to-execute-the-scripts.patch \
+ file://0001-Use-wayland-scanner-in-the-path.patch \
+ file://0002-hardware-gloat.patch \
+ file://llvm-config-version.patch \
+ file://0001-winsys-svga-drm-Include-sys-types.h.patch \
+ file://0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch \
+ file://0001-st-dri-Initialise-modifier-to-INVALID-for-DRI2.patch \
+ "
+
+SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d"
+SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
+
+#because we cannot rely on the fact that all apps will use pkgconfig,
+#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
+do_install_append() {
+ if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
+ sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+ fi
+}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/pango/pango/0001-Drop-introspection-macros-from-acinclude.m4.patch b/import-layers/yocto-poky/meta/recipes-graphics/pango/pango/0001-Drop-introspection-macros-from-acinclude.m4.patch
index 812da21..9e1626e 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/pango/pango/0001-Drop-introspection-macros-from-acinclude.m4.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/pango/pango/0001-Drop-introspection-macros-from-acinclude.m4.patch
@@ -6,7 +6,7 @@
They take precendence over our customized macros, and so
introspection doesn't work correctly.
-Upstream-Status: Pending [review on oe-core list]
+Upstream-Status: Backport [upstream 5ccfe0]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
acinclude.m4 | 96 ------------------------------------------------------------
@@ -118,4 +118,3 @@
-])
--
2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.14.bb b/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.14.bb
new file mode 100644
index 0000000..3bd9c64
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.14.bb
@@ -0,0 +1,50 @@
+SUMMARY = "Framework for layout and rendering of internationalized text"
+DESCRIPTION = "Pango is a library for laying out and rendering of text, \
+with an emphasis on internationalization. Pango can be used anywhere \
+that text layout is needed, though most of the work on Pango so far has \
+been done in the context of the GTK+ widget toolkit. Pango forms the \
+core of text and font handling for GTK+-2.x."
+HOMEPAGE = "http://www.pango.org/"
+BUGTRACKER = "http://bugzilla.gnome.org"
+SECTION = "libs"
+LICENSE = "LGPLv2.0+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
+
+inherit gnomebase gtk-doc ptest-gnome upstream-version-is-even gobject-introspection
+
+SRC_URI += "file://run-ptest \
+ file://0001-Drop-introspection-macros-from-acinclude.m4.patch \
+ file://0001-Enforce-recreation-of-docs-pango.types-it-is-build-c.patch \
+"
+SRC_URI[archive.md5sum] = "18d7eb8d52e7e445e733c109ddaa7b78"
+SRC_URI[archive.sha256sum] = "90af1beaa7bf9e4c52db29ec251ec4fd0a8f2cc185d521ad1f88d01b3a6a17e3"
+
+DEPENDS = "glib-2.0 glib-2.0-native fontconfig freetype virtual/libiconv cairo harfbuzz"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
+PACKAGECONFIG[x11] = "--with-xft,--without-xft,virtual/libx11 libxft"
+
+EXTRA_OECONF = " \
+ --disable-debug \
+ "
+
+LEAD_SONAME = "libpango-1.0*"
+LIBV = "1.8.0"
+
+# This binary needs to be compiled for the host architecture. This isn't pretty!
+do_compile_prepend_class-target () {
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'true', 'false', d)}; then
+ make CC="${BUILD_CC}" CFLAGS="" LDFLAGS="${BUILD_LDFLAGS}" AM_CPPFLAGS="$(pkg-config-native --cflags glib-2.0)" gen_all_unicode_LDADD="$(pkg-config-native --libs glib-2.0)" -C ${B}/tests gen-all-unicode
+ fi
+}
+
+FILES_${PN} = "${bindir}/* ${libdir}/libpango*${SOLIBS}"
+FILES_${PN}-dev += "${libdir}/pango/${LIBV}/modules/*.la"
+
+RDEPENDS_${PN}-ptest += "liberation-fonts cantarell-fonts"
+
+RPROVIDES_${PN} += "pango-modules pango-module-indic-lang \
+ pango-module-basic-fc pango-module-arabic-lang"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.6.bb b/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.6.bb
deleted file mode 100644
index 31c3d2a..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.6.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Framework for layout and rendering of internationalized text"
-DESCRIPTION = "Pango is a library for laying out and rendering of text, \
-with an emphasis on internationalization. Pango can be used anywhere \
-that text layout is needed, though most of the work on Pango so far has \
-been done in the context of the GTK+ widget toolkit. Pango forms the \
-core of text and font handling for GTK+-2.x."
-HOMEPAGE = "http://www.pango.org/"
-BUGTRACKER = "http://bugzilla.gnome.org"
-SECTION = "libs"
-LICENSE = "LGPLv2.0+"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
-
-inherit gnomebase gtk-doc ptest-gnome upstream-version-is-even gobject-introspection
-
-SRC_URI += "file://run-ptest \
- file://0001-Drop-introspection-macros-from-acinclude.m4.patch \
- file://0001-Enforce-recreation-of-docs-pango.types-it-is-build-c.patch \
-"
-SRC_URI[archive.md5sum] = "507c6746fbf53fc9d48c577f1e265de3"
-SRC_URI[archive.sha256sum] = "ca152b7383a1e9f7fd74ae96023dc6770dc5043414793bfe768ff06b6759e573"
-
-DEPENDS = "glib-2.0 glib-2.0-native fontconfig freetype virtual/libiconv cairo harfbuzz"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
-PACKAGECONFIG[x11] = "--with-xft,--without-xft,virtual/libx11 libxft"
-
-EXTRA_AUTORECONF = ""
-
-EXTRA_OECONF = " \
- --disable-debug \
- "
-
-LEAD_SONAME = "libpango-1.0*"
-LIBV = "1.8.0"
-
-# This binary needs to be compiled for the host architecture. This isn't pretty!
-do_compile_prepend_class-target () {
- if ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'true', 'false', d)}; then
- make CC="${BUILD_CC}" CFLAGS="" LDFLAGS="${BUILD_LDFLAGS}" AM_CPPFLAGS="$(pkg-config-native --cflags glib-2.0)" gen_all_unicode_LDADD="$(pkg-config-native --libs glib-2.0)" -C ${B}/tests gen-all-unicode
- fi
-}
-
-FILES_${PN} = "${bindir}/* ${libdir}/libpango*${SOLIBS}"
-FILES_${PN}-dev += "${libdir}/pango/${LIBV}/modules/*.la"
-
-RDEPENDS_${PN}-ptest += "liberation-fonts cantarell-fonts"
-
-RPROVIDES_${PN} += "pango-modules pango-module-indic-lang \
- pango-module-basic-fc pango-module-arabic-lang"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit_git.bb
index d274a8f..b936ad8 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit_git.bb
@@ -6,10 +6,10 @@
file://0001-cmake-install-bash-completions-in-the-right-place.patch \
file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \
"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
-# From 2017-07-03
-SRCREV = "c8f4fd9eeb298a2ef0855927f22634f794ef3eff"
+# From 2018-02-26
+SRCREV = "4ce0887e2f7f848d2be2e435a2d0f3c80e44ea3b"
# (when PV goes above 1.0 remove the trailing r)
PV = "1.0+gitr${SRCPV}"
@@ -40,14 +40,12 @@
fi
}
-do_install() {
- oe_runmake -C ${B} 'DESTDIR=${D}' install/strip
-}
+OECMAKE_TARGET_INSTALL = "install/strip"
RDEPENDS_${PN} = "waffle python3 python3-mako python3-json \
- python3-subprocess python3-misc python3-importlib \
+ python3-misc \
python3-unixadmin python3-xml python3-multiprocessing \
- python3-six python3-shell python3-io python3-argparse \
+ python3-six python3-shell python3-io \
python3-netserver mesa-demos bash \
"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb b/import-layers/yocto-poky/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb
index b2e4cef..70b32cf 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb
@@ -13,26 +13,20 @@
FONT_PACKAGES = "${PN}"
-SRC_URI = "${GNOME_MIRROR}/ttf-bitstream-vera/1.10/ttf-bitstream-vera-${PV}.tar.bz2"
-
-do_install () {
- install -d ${D}${prefix}/share/fonts/ttf/
- for i in *.ttf; do
- install -m 644 $i ${D}${prefix}/share/fonts/ttf/${i}
- done
-
- # fontconfig ships this too. not sure what to do about it.
- #install -d ${D}${sysconfdir}/fonts
- #install -m 644 local.conf ${D}${sysconfdir}/fonts/local.conf
-
-
- install -d ${D}${prefix}/share/doc/${BPN}/
- for i in *.TXT; do
- install -m 644 $i ${D}${prefix}/share/doc/${BPN}/$i
- done
-}
-
-FILES_${PN} = "/etc ${datadir}/fonts"
-
+SRC_URI = "${GNOME_MIRROR}/ttf-bitstream-vera/1.10/ttf-bitstream-vera-${PV}.tar.bz2"
SRC_URI[md5sum] = "bb22bd5b4675f5dbe17c6963d8c00ed6"
SRC_URI[sha256sum] = "db5b27df7bbb318036ebdb75acd3e98f1bd6eb6608fb70a67d478cd243d178dc"
+
+do_install () {
+ install -d ${D}${datadir}/fonts/ttf
+ for i in *.ttf; do
+ install -m 644 $i ${D}${datadir}/fonts/ttf
+ done
+
+ install -d ${D}${docdir}/${BPN}
+ for i in *.TXT; do
+ install -m 644 $i ${D}${docdir}/${BPN}
+ done
+}
+
+FILES_${PN} = "${datadir}/fonts"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/assimp_4.0.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/assimp_4.0.0.bb
deleted file mode 100644
index 7a96a4f..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/assimp_4.0.0.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION = "Open Asset Import Library is a portable Open Source library to import \
- various well-known 3D model formats in a uniform manner."
-HOMEPAGE = "http://www.assimp.org/"
-SECTION = "devel"
-
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=2119edef0916b0bd511cb3c731076271"
-
-DEPENDS = "zlib"
-
-SRC_URI = "git://github.com/assimp/assimp.git"
-UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(\d+(\.\d+)+))"
-
-SRCREV = "52c8d06f5d6498afd66df983da348a6b112f1314"
-
-S = "${WORKDIR}/git"
-
-inherit cmake
-
-EXTRA_OECMAKE = "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_TESTS=OFF -DASSIMP_LIB_INSTALL_DIR=${baselib}"
-
-FILES_${PN}-dev += "${libdir}/cmake/"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/assimp_4.1.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/assimp_4.1.0.bb
new file mode 100644
index 0000000..194cbe3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/assimp_4.1.0.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "Open Asset Import Library is a portable Open Source library to import \
+ various well-known 3D model formats in a uniform manner."
+HOMEPAGE = "http://www.assimp.org/"
+SECTION = "devel"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2119edef0916b0bd511cb3c731076271"
+
+DEPENDS = "zlib"
+
+SRC_URI = "git://github.com/assimp/assimp.git"
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(\d+(\.\d+)+))"
+
+SRCREV = "80799bdbf90ce626475635815ee18537718a05b1"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+EXTRA_OECMAKE = "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_TESTS=OFF -DASSIMP_LIB_INSTALL_DIR=${baselib}"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb
index 0b89435..5fc9c2d 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb
@@ -10,7 +10,7 @@
file://0001-Don-t-build-demos-with-questionably-licensed-data.patch \
file://0001-Fix-build-on-x86.patch \
"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
SRCREV = "18df00c7b4677b0889486e16977857aa987947e2"
UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan/demos-Don-t-build-tri-or-cube.patch b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan/demos-Don-t-build-tri-or-cube.patch
index 3cf241d..bcf84a5 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan/demos-Don-t-build-tri-or-cube.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan/demos-Don-t-build-tri-or-cube.patch
@@ -11,9 +11,11 @@
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---- a/demos/CMakeLists.txt
-+++ b/demos/CMakeLists.txt
-@@ -61,46 +61,6 @@
+Index: git/demos/CMakeLists.txt
+===================================================================
+--- git.orig/demos/CMakeLists.txt
++++ git/demos/CMakeLists.txt
+@@ -63,46 +63,6 @@ elseif(UNIX)
else()
endif()
@@ -60,7 +62,7 @@
if(WIN32)
include_directories (
-@@ -114,43 +74,6 @@
+@@ -116,43 +76,6 @@ endif()
add_executable(${API_LOWERCASE}info vulkaninfo.c)
target_link_libraries(${API_LOWERCASE}info ${LIBRARIES})
@@ -103,4 +105,4 @@
-endif()
if(UNIX)
- install(TARGETS ${API_LOWERCASE}info DESTINATION ${CMAKE_INSTALL_BINDIR})
+ if(INSTALL_LVL_FILES)
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb
deleted file mode 100644
index 9de39bc..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "3D graphics and compute API common loader"
-DESCRIPTION = "Vulkan is a new generation graphics and compute API \
-that provides efficient access to modern GPUs. These packages \
-provide only the common vendor-agnostic library loader, headers and \
-the vulkaninfo utility."
-HOMEPAGE = "https://www.khronos.org/vulkan/"
-BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers"
-SECTION = "libs"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=99c647ca3d4f6a4b9d8628f757aad156 \
- file://loader/loader.c;endline=25;md5=a87cd5442291c23d1fce4eece4cfde9d"
-SRC_URI = "git://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers.git;branch=sdk-1.0.51 \
- file://demos-Don-t-build-tri-or-cube.patch \
-"
-SRCREV = "8d021e4d5a9f91436f4462df1dafb222908e296d"
-UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
-
-S = "${WORKDIR}/git"
-
-REQUIRED_DISTRO_FEATURES = "vulkan"
-
-inherit cmake python3native lib_package distro_features_check
-ANY_OF_DISTRO_FEATURES = "x11 wayland"
-
-EXTRA_OECMAKE = "-DBUILD_WSI_MIR_SUPPORT=OFF \
- -DBUILD_LAYERS=OFF \
- -DBUILD_TESTS=OFF"
-
-# must choose x11 or wayland or both
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '' ,d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}"
-PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON -DDEMOS_WSI_SELECTION=XCB, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF -DDEMOS_WSI_SELECTION=WAYLAND, libxcb libx11 libxrandr"
-PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland"
-
-RRECOMMENDS_${PN} = "mesa-vulkan-drivers"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.65.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.65.2.bb
new file mode 100644
index 0000000..1c8a895
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.65.2.bb
@@ -0,0 +1,36 @@
+SUMMARY = "3D graphics and compute API common loader"
+DESCRIPTION = "Vulkan is a new generation graphics and compute API \
+that provides efficient access to modern GPUs. These packages \
+provide only the common vendor-agnostic library loader, headers and \
+the vulkaninfo utility."
+HOMEPAGE = "https://www.khronos.org/vulkan/"
+BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers"
+SECTION = "libs"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=99c647ca3d4f6a4b9d8628f757aad156 \
+ file://loader/loader.c;endline=25;md5=a87cd5442291c23d1fce4eece4cfde9d"
+SRC_URI = "git://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers.git;branch=sdk-1.0.65 \
+ file://demos-Don-t-build-tri-or-cube.patch \
+ "
+SRCREV = "73486a1a169d862d5210e2ad520d95319a2383fa"
+UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
+
+S = "${WORKDIR}/git"
+
+REQUIRED_DISTRO_FEATURES = "vulkan"
+
+inherit cmake python3native lib_package distro_features_check
+ANY_OF_DISTRO_FEATURES = "x11 wayland"
+
+EXTRA_OECMAKE = "-DBUILD_WSI_MIR_SUPPORT=OFF \
+ -DBUILD_LAYERS=OFF \
+ -DBUILD_TESTS=OFF"
+
+# must choose x11 or wayland or both
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '' ,d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}"
+PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON -DDEMOS_WSI_SELECTION=XCB, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF -DDEMOS_WSI_SELECTION=WAYLAND, libxcb libx11 libxrandr"
+PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland"
+
+RRECOMMENDS_${PN} = "mesa-vulkan-drivers"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/waffle/waffle_1.5.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/waffle/waffle_1.5.2.bb
index a5179db..43c3edc 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/waffle/waffle_1.5.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/waffle/waffle_1.5.2.bb
@@ -35,6 +35,3 @@
# I say virtual/libgl, actually wants egl.pc
PACKAGECONFIG[x11-egl] = "-Dwaffle_has_x11_egl=1,-Dwaffle_has_x11_egl=0,virtual/${MLPREFIX}libgl libxcb"
-
-FILES_${PN}-dev += "${datadir}/cmake/Modules/FindWaffle.cmake \
- ${libdir}/cmake/Waffle/"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput/0001-tools-Fix-race-in-autotools-install.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput/0001-tools-Fix-race-in-autotools-install.patch
deleted file mode 100644
index 4667538..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput/0001-tools-Fix-race-in-autotools-install.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 5e8864c5b7a2e258eea041b0ef66dac7fcab9b7f Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 9 Aug 2017 09:47:14 +0300
-Subject: [PATCH] tools: Fix race in (autotools) install
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-exec/data distinction is done based on install dir so compat scripts
-must be moved in exec hook.
-
-This should fix this occasional failure:
-| install: cannot change permissions of
-| ‘/usr/bin/libinput-debug-events.compat’: No such file or directory
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Submitted
----
- tools/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tools/Makefile.am b/tools/Makefile.am
-index 2c8660b..7ee8b90 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -63,7 +63,7 @@ endif
-
- EXTRA_DIST = make-ptraccel-graphs.sh install-compat-scripts.sh $(bin_SCRIPTS)
-
--install-data-hook:
-+install-exec-hook:
- (cd $(DESTDIR)$(bindir) && mv libinput-list-devices.compat libinput-list-devices)
- (cd $(DESTDIR)$(bindir) && mv libinput-debug-events.compat libinput-debug-events)
-
---
-2.13.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.8.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.8.1.bb
deleted file mode 100644
index a21babe..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.8.1.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Library to handle input devices in Wayland compositors"
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/"
-SECTION = "libs"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2184aef38ff137ed33ce9a63b9d1eb8f"
-
-DEPENDS = "libevdev udev mtdev"
-
-SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \
- file://0001-tools-Fix-race-in-autotools-install.patch \
-"
-
-SRC_URI[md5sum] = "8247f0bb67052ffb272c50c3cb9c5998"
-SRC_URI[sha256sum] = "e3590a9037e561a5791c8bd3b34bfd30fad5cacd8cbefc0d75fafe3a41d07147"
-
-inherit autotools pkgconfig lib_package
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
-PACKAGECONFIG[libwacom] = "--enable-libwacom,--disable-libwacom,libwacom"
-PACKAGECONFIG[gui] = "--enable-debug-gui,--disable-debug-gui,cairo gtk+3"
-
-UDEVDIR = "`pkg-config --variable=udevdir udev`"
-
-EXTRA_OECONF += "--with-udev-dir=${UDEVDIR} --disable-documentation --disable-tests"
-
-# package name changed in 1.8.1 upgrade: make sure package upgrades work
-RPROVIDES_${PN} = "libinput"
-RREPLACES_${PN} = "libinput"
-RCONFLICTS_${PN} = "libinput"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.9.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.9.4.bb
new file mode 100644
index 0000000..67a49df
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.9.4.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Library to handle input devices in Wayland compositors"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2184aef38ff137ed33ce9a63b9d1eb8f"
+
+DEPENDS = "libevdev udev mtdev"
+
+SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \
+ "
+SRC_URI[md5sum] = "8b43d07d1698fb207a0492fc67554d4f"
+SRC_URI[sha256sum] = "0bcdbd4c4e3c2a2db322fbdf2ef3284f2e6d6fb7be3af80e6d8de7783f675190"
+
+UPSTREAM_CHECK_REGEX = "libinput-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
+inherit meson pkgconfig lib_package
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libwacom] = "-Dlibwacom=true,-Dlibwacom=false,libwacom"
+PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3"
+
+UDEVDIR = "`pkg-config --variable=udevdir udev`"
+
+EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} -Ddocumentation=false -Dtests=false"
+
+# package name changed in 1.8.1 upgrade: make sure package upgrades work
+RPROVIDES_${PN} = "libinput"
+RREPLACES_${PN} = "libinput"
+RCONFLICTS_${PN} = "libinput"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland-protocols_1.10.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland-protocols_1.10.bb
deleted file mode 100644
index 4f9e9f3..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland-protocols_1.10.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Collection of additional Wayland protocols"
-DESCRIPTION = "Wayland protocols that add functionality not \
-available in the Wayland core protocol. Such protocols either add \
-completely new functionality, or extend the functionality of some other \
-protocol either in Wayland core, or some other protocol in \
-wayland-protocols."
-HOMEPAGE = "http://wayland.freedesktop.org"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \
- file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53"
-
-SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
- "
-SRC_URI[md5sum] = "84a7846c2b6a6a3e265fc9be36453e60"
-SRC_URI[sha256sum] = "5719c51d7354864983171c5083e93a72ac99229e2b460c4bb10513de08839c0a"
-
-inherit allarch autotools pkgconfig
-
-PACKAGES = "${PN}"
-FILES_${PN} += "${datadir}/pkgconfig/wayland-protocols.pc"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland-protocols_1.13.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland-protocols_1.13.bb
new file mode 100644
index 0000000..1ef1ee1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland-protocols_1.13.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Collection of additional Wayland protocols"
+DESCRIPTION = "Wayland protocols that add functionality not \
+available in the Wayland core protocol. Such protocols either add \
+completely new functionality, or extend the functionality of some other \
+protocol either in Wayland core, or some other protocol in \
+wayland-protocols."
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \
+ file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53"
+
+SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+ "
+SRC_URI[md5sum] = "29312149dafcd4a0e739ba94995a574d"
+SRC_URI[sha256sum] = "0758bc8008d5332f431b2a84fea7de64d971ce270ed208206a098ff2ebc68f38"
+
+inherit allarch autotools pkgconfig
+
+PACKAGES = "${PN}"
+FILES_${PN} += "${datadir}/pkgconfig/wayland-protocols.pc"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch
new file mode 100644
index 0000000..ad3526d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch
@@ -0,0 +1,32 @@
+Fix wayland-client and wayland-scanner pc files
+
+Upstream-Status: Pending
+
+Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
+
+Index: wayland-1.14.0/src/wayland-client.pc.in
+===================================================================
+--- wayland-1.14.0.orig/src/wayland-client.pc.in
++++ wayland-1.14.0/src/wayland-client.pc.in
+@@ -1,7 +1,7 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ datarootdir=@datarootdir@
+-pkgdatadir=@datadir@/@PACKAGE@
++pkgdatadir=${pc_sysrootdir}@datadir@/@PACKAGE@
+ libdir=@libdir@
+ includedir=@includedir@
+
+Index: wayland-1.14.0/src/wayland-scanner.pc.in
+===================================================================
+--- wayland-1.14.0.orig/src/wayland-scanner.pc.in
++++ wayland-1.14.0/src/wayland-scanner.pc.in
+@@ -2,7 +2,7 @@ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ datarootdir=@datarootdir@
+ pkgdatadir=@datadir@/@PACKAGE@
+-wayland_scanner=@bindir@/wayland-scanner
++wayland_scanner=wayland-scanner
+
+ Name: Wayland Scanner
+ Description: Wayland scanner
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.13.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.13.0.bb
deleted file mode 100644
index b9396b6..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.13.0.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "Wayland, a protocol between a compositor and clients"
-DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \
-as well as a C library implementation of that protocol. The compositor can be \
-a standalone display server running on Linux kernel modesetting and evdev \
-input devices, an X application, or a wayland client itself. The clients can \
-be traditional applications, X servers (rootless or fullscreen) or other \
-display servers."
-HOMEPAGE = "http://wayland.freedesktop.org"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \
- file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce"
-
-DEPENDS = "expat libxml2 libffi wayland-native"
-
-SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
- "
-SRC_URI[md5sum] = "cae152ed956da6de53f9727bc1c45039"
-SRC_URI[sha256sum] = "69b052c031a61e89af7cc8780893d0da1e301492352aa449dee9345043e6fe51"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--disable-documentation --with-host-scanner"
-EXTRA_OECONF_class-native = "--disable-documentation --disable-libraries"
-
-# Wayland installs a M4 macro for other projects to use, which uses the target
-# pkg-config to find files. Replace pkg-config with pkg-config-native.
-do_install_append_class-native() {
- sed -e 's,PKG_CHECK_MODULES(.*),,g' \
- -e 's,$PKG_CONFIG,pkg-config-native,g' \
- -i ${D}/${datadir}/aclocal/wayland-scanner.m4
-}
-
-sysroot_stage_all_append_class-target () {
- rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4
- cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
-}
-
-FILES_${PN} = "${libdir}/*${SOLIBS}"
-FILES_${PN}-dev += "${bindir} ${datadir}/wayland"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.14.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.14.0.bb
new file mode 100644
index 0000000..1a9ff98
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.14.0.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Wayland, a protocol between a compositor and clients"
+DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \
+as well as a C library implementation of that protocol. The compositor can be \
+a standalone display server running on Linux kernel modesetting and evdev \
+input devices, an X application, or a wayland client itself. The clients can \
+be traditional applications, X servers (rootless or fullscreen) or other \
+display servers."
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \
+ file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce"
+
+DEPENDS = "expat libxml2 libffi wayland-native"
+
+SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+ file://fixpathinpcfiles.patch \
+ "
+SRC_URI[md5sum] = "0235f6075c32c3be61cff94fa0b9f108"
+SRC_URI[sha256sum] = "ed80cabc0961a759a42092e2c39aabfc1ec9a13c86c98bbe2b812f008da27ab8"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-documentation --with-host-scanner"
+EXTRA_OECONF_class-native = "--disable-documentation --disable-libraries"
+
+# Wayland installs a M4 macro for other projects to use, which uses the target
+# pkg-config to find files. Replace pkg-config with pkg-config-native.
+do_install_append_class-native() {
+ sed -e 's,PKG_CHECK_MODULES(.*),,g' \
+ -e 's,$PKG_CONFIG,pkg-config-native,g' \
+ -i ${D}/${datadir}/aclocal/wayland-scanner.m4
+}
+
+sysroot_stage_all_append_class-target () {
+ rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4
+ cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
+}
+
+FILES_${PN} = "${libdir}/*${SOLIBS}"
+FILES_${PN}-dev += "${bindir} ${datadir}/wayland"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch
deleted file mode 100644
index 5f4d79c..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 1cfc1434a5d385a74de593ec7601674dba39e2fe Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 11 May 2016 16:16:30 +0300
-Subject: [PATCH] configure.ac: Fix wayland-protocols path
-
-The wayland-protocols directory is used during build: Fix the path
-to point to sysroot specified in recipe.
-
-Normally PKG_CONFIG_SYSROOT_DIR could be used in configure.ac but that
-breaks multilib weston as it would point to multilib sysroot when the
-(allarch) wayland-protocols is actually in the machine sysroot.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Inappropriate [embedded specific]
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -187,7 +187,7 @@ PKG_CHECK_MODULES(LIBINPUT_BACKEND, [lib
- PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
-
- PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.7],
-- [ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
-+ [ac_wayland_protocols_pkgdatadir=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
- AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
-
- AC_ARG_ENABLE(wayland-compositor, [ --enable-wayland-compositor],,
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
index e2213ac..0671a45 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
@@ -16,9 +16,11 @@
3 files changed, 23 insertions(+), 1 deletion(-)
create mode 100644 src/weston-error.h
---- a/configure.ac
-+++ b/configure.ac
-@@ -60,6 +60,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
+Index: weston-3.0.0/configure.ac
+===================================================================
+--- weston-3.0.0.orig/configure.ac
++++ weston-3.0.0/configure.ac
+@@ -103,6 +103,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
[[#include <time.h>]])
AC_CHECK_HEADERS([execinfo.h])
@@ -26,9 +28,11 @@
+
AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
- COMPOSITOR_MODULES="wayland-server >= $WAYLAND_PREREQ_VERSION pixman-1 >= 0.25.2"
+ # check for libdrm as a build-time dependency only
+Index: weston-3.0.0/libweston/weston-error.h
+===================================================================
--- /dev/null
-+++ b/libweston/weston-error.h
++++ weston-3.0.0/libweston/weston-error.h
@@ -0,0 +1,20 @@
+#ifndef _WESTON_ERROR_H
+#define _WESTON_ERROR_H
@@ -50,8 +54,10 @@
+
+#endif
+
---- a/libweston/weston-launch.c
-+++ b/libweston/weston-launch.c
+Index: weston-3.0.0/libweston/weston-launch.c
+===================================================================
+--- weston-3.0.0.orig/libweston/weston-launch.c
++++ weston-3.0.0/libweston/weston-launch.c
@@ -33,7 +33,6 @@
#include <poll.h>
#include <errno.h>
@@ -60,7 +66,7 @@
#include <getopt.h>
#include <sys/types.h>
-@@ -59,6 +58,7 @@
+@@ -60,6 +59,7 @@
#endif
#include "weston-launch.h"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/fix-missing-header.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/fix-missing-header.patch
new file mode 100644
index 0000000..55c0d4f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/fix-missing-header.patch
@@ -0,0 +1,30 @@
+On the musl C library, tests/timespec-text.c does not build, with the
+following error:
+
+ In file included from tests/timespec-test.c:36:0:
+ ./shared/timespec-util.h:41:21: warning: ‘struct timespec’ declared
+ inside parameter list will not be visible outside of this definition
+ or declaration
+ timespec_sub(struct timespec *r,
+ ^~~~~~~~
+ [...]
+
+Indeed, struct timespec is defined in time.h, so we must include it.
+
+Upstream-Status: Backport [fa41bdfbc0b962fd73b89f01aab1a5370c9c28eb]
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
+
+Index: weston-3.0.0/shared/timespec-util.h
+===================================================================
+--- weston-3.0.0.orig/shared/timespec-util.h
++++ weston-3.0.0/shared/timespec-util.h
+@@ -28,6 +28,7 @@
+
+ #include <stdint.h>
+ #include <assert.h>
++#include <time.h>
+
+ #define NSEC_PER_SEC 1000000000
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch
new file mode 100644
index 0000000..b3e1d06
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch
@@ -0,0 +1,55 @@
+Multi-plane sub-sampled textures have partial width/height, e.g.
+YUV420/I420 has a full-size Y plane, followed by a half-width/height U
+plane, and a half-width/height V plane.
+
+zwp_linux_dmabuf_v1 allows clients to pass an explicit pitch for each
+plane, but for wl_shm this must be inferred. gl-renderer was correctly
+accounting for the width and height when subsampling, but the pitch was
+being taken as the pitch for the first plane.
+
+This does not match the requirements for GStreamer's waylandsink, in
+particular, as well as other clients. Fix the SHM upload path to
+correctly set the pitch for each plane, according to subsampling.
+
+Tested with:
+ $ gst-launch-1.0 videotestsrc ! waylandsink
+
+Upstream-Status: Backport [https://patchwork.freedesktop.org/patch/180767/]
+
+Signed-off-by: Daniel Stone <daniels@collabora.com>
+Fixes: fdeefe42418 ("gl-renderer: add support of WL_SHM_FORMAT_YUV420")
+Reported-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103063
+
+---
+ libweston/gl-renderer.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
+index 244ce309..40bf0bb6 100644
+--- a/libweston/gl-renderer.c
++++ b/libweston/gl-renderer.c
+@@ -1445,14 +1445,13 @@ gl_renderer_flush_damage(struct weston_surface *surface)
+ goto done;
+ }
+
+- glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch);
+-
+ if (gs->needs_full_upload) {
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, 0);
+ glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, 0);
+ wl_shm_buffer_begin_access(buffer->shm_buffer);
+ for (j = 0; j < gs->num_textures; j++) {
+ glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
++ glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
+ glTexImage2D(GL_TEXTURE_2D, 0,
+ gs->gl_format[j],
+ gs->pitch / gs->hsub[j],
+@@ -1477,6 +1476,7 @@ gl_renderer_flush_damage(struct weston_surface *surface)
+ glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, r.y1);
+ for (j = 0; j < gs->num_textures; j++) {
+ glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
++ glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
+ glTexSubImage2D(GL_TEXTURE_2D, 0,
+ r.x1 / gs->hsub[j],
+ r.y1 / gs->vsub[j],
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_2.0.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_2.0.0.bb
deleted file mode 100644
index 54b07bd..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_2.0.0.bb
+++ /dev/null
@@ -1,114 +0,0 @@
-SUMMARY = "Weston, a Wayland compositor"
-DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
-HOMEPAGE = "http://wayland.freedesktop.org"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
- file://libweston/compositor.c;endline=26;md5=e342df749174a8ee11065583157c7a38"
-
-SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
- file://weston.png \
- file://weston.desktop \
- file://0001-make-error-portable.patch \
- file://0001-configure.ac-Fix-wayland-protocols-path.patch \
- file://xwayland.weston-start \
- file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
-"
-SRC_URI[md5sum] = "15f38945942bf2a91fe2687145fb4c7d"
-SRC_URI[sha256sum] = "b4e446ac27f118196f1609dab89bb3cb3e81652d981414ad860e733b355365d8"
-
-inherit autotools pkgconfig useradd distro_features_check
-# depends on virtual/egl
-REQUIRED_DISTRO_FEATURES = "opengl"
-
-DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
-DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
-
-EXTRA_OECONF = "--enable-setuid-install \
- --disable-rdp-compositor \
- WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT} \
- "
-EXTRA_OECONF_append_qemux86 = "\
- WESTON_NATIVE_BACKEND=fbdev-backend.so \
- "
-EXTRA_OECONF_append_qemux86-64 = "\
- WESTON_NATIVE_BACKEND=fbdev-backend.so \
- "
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
- ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
- clients launch"
-#
-# Compositor choices
-#
-# Weston on KMS
-PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev"
-# Weston on Wayland (nested Weston)
-PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
-# Weston on X11
-PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
-# Headless Weston
-PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
-# Weston on framebuffer
-PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
-# weston-launch
-PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm"
-# VA-API desktop recorder
-PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
-# Weston with EGL support
-PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
-# Weston with cairo glesv2 support
-PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
-# Weston with lcms support
-PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
-# Weston with webp support
-PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp"
-# Weston with unwinding support
-PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
-# Weston with systemd-login support
-PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus"
-# Weston with Xwayland support (requires X11 and Wayland)
-PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland"
-# colord CMS support
-PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord"
-# Clients support
-PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients"
-# Weston with PAM support
-PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
-
-do_install_append() {
- # Weston doesn't need the .la files to load modules, so wipe them
- rm -f ${D}/${libdir}/libweston-2/*.la
-
- # If X11, ship a desktop file to launch it
- if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
- install -d ${D}${datadir}/applications
- install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
-
- install -d ${D}${datadir}/icons/hicolor/48x48/apps
- install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
- fi
-
- if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
- install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
- fi
-}
-
-PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
- libweston-2 ${PN}-examples"
-
-FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
-
-FILES_libweston-2 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-2/*.so"
-SUMMARY_libweston-2 = "Helper library for implementing 'wayland window managers'."
-
-FILES_${PN}-examples = "${bindir}/*"
-
-FILES_${PN}-xwayland = "${libdir}/libweston-2/xwayland.so"
-RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
-
-RDEPENDS_${PN} += "xkeyboard-config"
-RRECOMMENDS_${PN} = "liberation-fonts"
-RRECOMMENDS_${PN}-dev += "wayland-protocols"
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "--system weston-launch"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_3.0.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_3.0.0.bb
new file mode 100644
index 0000000..ad0cdc2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_3.0.0.bb
@@ -0,0 +1,114 @@
+SUMMARY = "Weston, a Wayland compositor"
+DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
+ file://libweston/compositor.c;endline=26;md5=e342df749174a8ee11065583157c7a38"
+
+SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+ file://weston.png \
+ file://weston.desktop \
+ file://0001-make-error-portable.patch \
+ file://xwayland.weston-start \
+ file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
+ file://weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch \
+ file://fix-missing-header.patch \
+"
+SRC_URI[md5sum] = "9c42a4c51a1b9f35d040fa9d45ada36d"
+SRC_URI[sha256sum] = "cde1d55e8dd70c3cbb3d1ec72f60e60000041579caa1d6a262bd9c35e93723a5"
+
+inherit autotools pkgconfig useradd distro_features_check
+# depends on virtual/egl
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
+DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
+
+EXTRA_OECONF = "--enable-setuid-install \
+ --disable-rdp-compositor \
+ "
+EXTRA_OECONF_append_qemux86 = "\
+ WESTON_NATIVE_BACKEND=fbdev-backend.so \
+ "
+EXTRA_OECONF_append_qemux86-64 = "\
+ WESTON_NATIVE_BACKEND=fbdev-backend.so \
+ "
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
+ clients launch"
+#
+# Compositor choices
+#
+# Weston on KMS
+PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev"
+# Weston on Wayland (nested Weston)
+PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
+# Weston on X11
+PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
+# Headless Weston
+PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
+# Weston on framebuffer
+PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
+# weston-launch
+PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm"
+# VA-API desktop recorder
+PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
+# Weston with EGL support
+PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
+# Weston with cairo glesv2 support
+PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
+# Weston with lcms support
+PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
+# Weston with webp support
+PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp"
+# Weston with unwinding support
+PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
+# Weston with systemd-login support
+PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus"
+# Weston with Xwayland support (requires X11 and Wayland)
+PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland"
+# colord CMS support
+PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord"
+# Clients support
+PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients"
+# Weston with PAM support
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
+
+do_install_append() {
+ # Weston doesn't need the .la files to load modules, so wipe them
+ rm -f ${D}/${libdir}/libweston-3/*.la
+
+ # If X11, ship a desktop file to launch it
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
+ install -d ${D}${datadir}/applications
+ install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
+
+ install -d ${D}${datadir}/icons/hicolor/48x48/apps
+ install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
+ fi
+
+ if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
+ install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
+ fi
+}
+
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
+ libweston-3 ${PN}-examples"
+
+FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
+
+FILES_libweston-3 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-3/*.so"
+SUMMARY_libweston-3 = "Helper library for implementing 'wayland window managers'."
+
+FILES_${PN}-examples = "${bindir}/*"
+
+FILES_${PN}-xwayland = "${libdir}/libweston-3/xwayland.so"
+RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
+
+RDEPENDS_${PN} += "xkeyboard-config"
+RRECOMMENDS_${PN} = "liberation-fonts"
+RRECOMMENDS_${PN}-dev += "wayland-protocols"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system weston-launch"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
index 324a26f..87dc4f8 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
+++ b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
@@ -5,6 +5,7 @@
EnvironmentFile=/etc/default/xserver-nodm
User=@USER@
ExecStart=/etc/xserver-nodm/Xserver
+Restart=always
[Install]
Alias=display-manager.service
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb
index 345b589..a77c564 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb
@@ -60,7 +60,7 @@
fi
}
-RDEPENDS_${PN} = "xinit ${@base_conditional('ROOTLESS_X', '1', 'xuser-account', '', d)}"
+RDEPENDS_${PN} = "xinit ${@oe.utils.conditional('ROOTLESS_X', '1', 'xuser-account', '', d)}"
INITSCRIPT_NAME = "xserver-nodm"
INITSCRIPT_PARAMS = "start 9 5 . stop 20 0 1 2 3 6 ."
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb
index 733ebce..a4ab7f6 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb
@@ -11,7 +11,7 @@
PV = "0.1.1+git${SRCPV}"
SRC_URI = "git://git.yoctoproject.org/${BPN};branch=master"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xset/disable-xkb.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xset/disable-xkb.patch
index 97d13a3..a97c7b7 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xset/disable-xkb.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xset/disable-xkb.patch
@@ -4,11 +4,11 @@
Rebase for 1.2.1 by: Yu Ke <ke.yu@intel.com>
-diff --git a/configure.ac b/configure.ac
-index 81c3ae4..26601bf 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -52,11 +52,15 @@ PKG_CHECK_MODULES(SET_XEXT, xext,
+Index: xset-1.2.3/configure.ac
+===================================================================
+--- xset-1.2.3.orig/configure.ac
++++ xset-1.2.3/configure.ac
+@@ -53,11 +53,15 @@ PKG_CHECK_MODULES(SET_XEXT, xext,
AC_CHECK_HEADERS([X11/extensions/dpms.h X11/extensions/MITMisc.h],,,[#include <X11/Xlib.h>])
CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
@@ -22,5 +22,5 @@
CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
+fi
- AC_ARG_WITH(xf86misc, AC_HELP_STRING([--without-xf86misc],[Disable xf86misc support.]),
+ AC_ARG_WITH(xf86misc, AS_HELP_STRING([--without-xf86misc],[Disable xf86misc support.]),
[USE_XF86MISC="$withval"], [USE_XF86MISC="yes"])
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.25.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.25.1.bb
deleted file mode 100644
index 7b3ea16..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.25.1.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require xorg-driver-input.inc
-
-SUMMARY = "Generic input driver for the X.Org server based on libinput"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5e6b20ea2ef94a998145f0ea3f788ee0"
-
-DEPENDS += "libinput"
-
-SRC_URI[md5sum] = "14003139614b25cc76c9a4cad059df89"
-SRC_URI[sha256sum] = "489f7d591c9ef08463d4966e61f7c6ea433f5fcbb9f5370fb621da639a84c7e0"
-
-FILES_${PN} += "${datadir}/X11/xorg.conf.d"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.26.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.26.0.bb
new file mode 100644
index 0000000..54c33d7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.26.0.bb
@@ -0,0 +1,11 @@
+require xorg-driver-input.inc
+
+SUMMARY = "Generic input driver for the X.Org server based on libinput"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5e6b20ea2ef94a998145f0ea3f788ee0"
+
+DEPENDS += "libinput"
+
+SRC_URI[md5sum] = "da47ef62eab1d0e922a8fa929ff81758"
+SRC_URI[sha256sum] = "abca558fc2226f295691f1cf3412d4c0edeaa439f677ca25b5c9fab310d2387b"
+
+FILES_${PN} += "${datadir}/X11/xorg.conf.d"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-Add-Coffeelake-PCI-IDs-for-S-Skus.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-Add-Coffeelake-PCI-IDs-for-S-Skus.patch
new file mode 100644
index 0000000..06ef105
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-Add-Coffeelake-PCI-IDs-for-S-Skus.patch
@@ -0,0 +1,116 @@
+From 96d4e8e7b8a699f0ef77fa7b210d4de5f1c703d0 Mon Sep 17 00:00:00 2001
+From: Liwei Song <liwei.song@windriver.com>
+Date: Wed, 22 Nov 2017 08:59:03 +0000
+Subject: [PATCH] Add Coffeelake PCI IDs for S Skus
+
+Add the Coffeelake PCI IDs based on the following kernel patches:
+
+commit b056f8f3d6b900e8afd19f312719160346d263b4
+Author: Anusha Srivatsa <anusha.srivatsa@intel.com>
+Date: Thu Jun 8 16:41:05 2017 -0700
+
+ drm/i915/cfl: Add Coffee Lake PCI IDs for S Skus.
+
+Upstream-Status: Submitted [https://patchwork.kernel.org/patch/10139905]
+
+Signed-off-by: Liwei Song <liwei.song@windriver.com>
+---
+ src/i915_pciids.h | 7 +++++++
+ src/intel_module.c | 13 +++++++++++++
+ src/sna/gen9_render.c | 12 ++++++++++++
+ 3 files changed, 32 insertions(+)
+
+diff --git a/src/i915_pciids.h b/src/i915_pciids.h
+index 0370f830c541..11ccfa9c047a 100644
+--- a/src/i915_pciids.h
++++ b/src/i915_pciids.h
+@@ -340,4 +340,11 @@
+ INTEL_VGA_DEVICE(0x3184, info), \
+ INTEL_VGA_DEVICE(0x3185, info)
+
++#define INTEL_CFL_S_IDS(info) \
++ INTEL_VGA_DEVICE(0x3E90, info), /* SRV GT1 */ \
++ INTEL_VGA_DEVICE(0x3E93, info), /* SRV GT1 */ \
++ INTEL_VGA_DEVICE(0x3E91, info), /* SRV GT2 */ \
++ INTEL_VGA_DEVICE(0x3E92, info), /* SRV GT2 */ \
++ INTEL_VGA_DEVICE(0x3E96, info) /* SRV GT2 */
++
+ #endif /* _I915_PCIIDS_H */
+diff --git a/src/intel_module.c b/src/intel_module.c
+index 6b04857e2853..4827a67255f0 100644
+--- a/src/intel_module.c
++++ b/src/intel_module.c
+@@ -138,6 +138,10 @@ static const struct intel_device_info intel_geminilake_info = {
+ .gen = 0113,
+ };
+
++static const struct intel_device_info intel_coffeelake_info = {
++ .gen = 0114,
++};
++
+ static const SymTabRec intel_chipsets[] = {
+ {PCI_CHIP_I810, "i810"},
+ {PCI_CHIP_I810_DC100, "i810-dc100"},
+@@ -303,6 +307,13 @@ static const SymTabRec intel_chipsets[] = {
+ {0x5916, "HD Graphics 620"},
+ {0x591E, "HD Graphics 615"},
+
++ /*Coffeelake*/
++ {0x3E90, "HD Graphics"},
++ {0x3E93, "HD Graphics"},
++ {0x3E91, "HD Graphics"},
++ {0x3E92, "HD Graphics"},
++ {0x3E96, "HD Graphics"},
++
+ /* When adding new identifiers, also update:
+ * 1. intel_identify()
+ * 2. man/intel.man
+@@ -368,6 +379,8 @@ static const struct pci_id_match intel_device_match[] = {
+
+ INTEL_GLK_IDS(&intel_geminilake_info),
+
++ INTEL_CFL_S_IDS(&intel_coffeelake_info),
++
+ INTEL_VGA_DEVICE(PCI_MATCH_ANY, &intel_generic_info),
+ #endif
+
+diff --git a/src/sna/gen9_render.c b/src/sna/gen9_render.c
+index e5f12c723956..7f49052c5ec1 100644
+--- a/src/sna/gen9_render.c
++++ b/src/sna/gen9_render.c
+@@ -245,6 +245,11 @@ static const struct gt_info glk_gt_info = {
+ .urb = { .max_vs_entries = 320 },
+ };
+
++static const struct gt_info cfl_gt_info = {
++ .name = "Coffeelake (gen9)",
++ .urb = { .max_vs_entries = 960 },
++};
++
+ static bool is_skl(struct sna *sna)
+ {
+ return sna->kgem.gen == 0110;
+@@ -265,6 +270,11 @@ static bool is_glk(struct sna *sna)
+ return sna->kgem.gen == 0113;
+ }
+
++static bool is_cfl(struct sna *sna)
++{
++ return sna->kgem.gen == 0114;
++}
++
+
+ static inline bool too_large(int width, int height)
+ {
+@@ -4040,6 +4050,8 @@ static bool gen9_render_setup(struct sna *sna)
+ state->info = &kbl_gt_info;
+ if (is_glk(sna))
+ state->info = &glk_gt_info;
++ if (is_cfl(sna))
++ state->info = &cfl_gt_info;
+
+ sna_static_stream_init(&general);
+
+--
+2.13.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
index 138dfdd..2623cb2 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
@@ -16,6 +16,7 @@
SRC_URI = "git://anongit.freedesktop.org/xorg/driver/xf86-video-intel \
file://disable-x11-dri3.patch \
file://always_include_xorg_server.h.patch \
+ file://0001-Add-Coffeelake-PCI-IDs-for-S-Skus.patch \
"
SRC_URI[md5sum] = "fa196a66e52c0c624fe5d350af7a5e7b"
@@ -37,7 +38,7 @@
PACKAGECONFIG[tools] = "--enable-tools,--disable-tools,libxinerama libxrandr libxdamage libxfixes libxcursor libxtst libxext libxrender"
# --enable-kms-only option is required by ROOTLESS_X
-EXTRA_OECONF += '${@base_conditional( "ROOTLESS_X", "1", " --enable-kms-only", "", d )}'
+EXTRA_OECONF += '${@oe.utils.conditional( "ROOTLESS_X", "1", " --enable-kms-only", "", d )}'
COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.5.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.5.bb
index e652394..bef3636 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.5.bb
@@ -36,6 +36,6 @@
python () {
if not bb.utils.contains ('DISTRO_FEATURES', 'opengl', True, False, d):
- raise bb.parse.SkipPackage("'opengl' not in DISTRO_FEATURES")
+ raise bb.parse.SkipRecipe("'opengl' not in DISTRO_FEATURES")
}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
index fe42f11..bca0aad 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
@@ -38,3 +38,5 @@
pn = d.getVar("PN")
d.appendVar('RDEPENDS_' + pn, ' ' + abi)
+
+SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.13.5.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.13.5.bb
deleted file mode 100644
index a3b682b..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.13.5.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "Generic PCI access library for X"
-
-DESCRIPTION = "libpciaccess provides functionality for X to access the \
-PCI bus and devices in a platform-independent way."
-
-require xorg-lib-common.inc
-
-SRC_URI += "\
- file://0004-Don-t-include-sys-io.h-on-arm.patch \
-"
-
-SRC_URI[md5sum] = "d810ab17e24c1418dedf7207fb2841d4"
-SRC_URI[sha256sum] = "752c54e9b3c311b4347cb50aea8566fa48eab274346ea8a06f7f15de3240b999"
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=277aada5222b9a22fbf3471ff3687068"
-
-REQUIRED_DISTRO_FEATURES = ""
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.14.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.14.bb
new file mode 100644
index 0000000..a44a5c8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.14.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Generic PCI access library for X"
+
+DESCRIPTION = "libpciaccess provides functionality for X to access the \
+PCI bus and devices in a platform-independent way."
+
+require xorg-lib-common.inc
+
+SRC_URI += "\
+ file://0004-Don-t-include-sys-io.h-on-arm.patch \
+"
+
+SRC_URI[md5sum] = "8f436e151d5106a9cfaa71857a066d33"
+SRC_URI[sha256sum] = "3df543e12afd41fea8eac817e48cbfde5aed8817b81670a4e9e493bb2f5bf2a4"
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=277aada5222b9a22fbf3471ff3687068"
+
+REQUIRED_DISTRO_FEATURES = ""
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpthread-stubs_0.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpthread-stubs_0.4.bb
index a699841..ffa1c85 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpthread-stubs_0.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpthread-stubs_0.4.bb
@@ -7,17 +7,11 @@
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=6edc1fea03d959f0c2d743fe5ca746ad"
-#DEPENDS = "xcb-proto xproto libxau libxslt-native"
-# DEPENDS += "xsltproc-native gperf-native"
-
-ALLOW_EMPTY_${PN} = "1"
-
-SRC_URI = "http://xcb.freedesktop.org/dist/libpthread-stubs-${PV}.tar.bz2"
-
+SRC_URI = "http://xcb.freedesktop.org/dist/${BP}.tar.bz2"
SRC_URI[md5sum] = "48c1544854a94db0e51499cc3afd797f"
SRC_URI[sha256sum] = "e4d05911a3165d3b18321cc067fdd2f023f06436e391c6a28dff618a78d2e733"
-inherit autotools pkgconfig
+inherit autotools
RDEPENDS_${PN}-dev = ""
RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11.inc b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11.inc
index b04eafb..4af40ab 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11.inc
@@ -35,7 +35,3 @@
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"
-
-# Multiple libx11 derivatives from from this file and are selected by virtual/libx11
-# A world build should only build the correct version, not all of them.
-EXCLUDE_FROM_WORLD = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcalibrate_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcalibrate_git.bb
index 7c7fa3d..0fe6531 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcalibrate_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcalibrate_git.bb
@@ -16,7 +16,7 @@
SRC_URI = "git://anongit.freedesktop.org/git/xorg/lib/libXCalibrate \
file://fix-xcb.patch"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb/disable-check.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb/disable-check.patch
index 5641c0f..c0efbdc 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb/disable-check.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb/disable-check.patch
@@ -9,17 +9,17 @@
Signed-off-by: Ross Burton <ross.burton@intel.com>
-diff --git a/configure.ac b/configure.ac
-index 6d7c9a5..22cceb9 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -21,7 +21,8 @@ AC_USE_SYSTEM_EXTENSIONS
-
- AM_PATH_PYTHON([2.6])
+Index: libxcb-1.12/configure.ac
+===================================================================
+--- libxcb-1.12.orig/configure.ac
++++ libxcb-1.12/configure.ac
+@@ -36,7 +36,8 @@ if test x"$HAVE_DOT" = xno; then
+ AC_MSG_WARN([dot not found - doxygen targets will be skipped])
+ fi
-PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], [HAVE_CHECK=yes], [HAVE_CHECK=no])
+dnl PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], [HAVE_CHECK=yes], [HAVE_CHECK=no])
+HAVE_CHECK=no
AM_CONDITIONAL(HAVE_CHECK, test x$HAVE_CHECK = xyes)
- AC_CONFIG_HEADERS([src/config.h])
+ XSLTPROC=no
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcursor_1.1.14.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcursor_1.1.14.bb
deleted file mode 100644
index 1762904..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcursor_1.1.14.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Xcursor: X Cursor management library"
-
-DESCRIPTION = "Xcursor is a simple library designed to help locate and \
-load cursors. Cursors can be loaded from files or memory. A library of \
-common cursors exists which map to the standard X cursor names. Cursors \
-can exist in several sizes and the library automatically picks the best \
-size."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8902e6643f7bcd7793b23dcd5d8031a4"
-
-DEPENDS += "libxrender libxfixes"
-BBCLASSEXTEND = "native nativesdk"
-
-PE = "1"
-
-XORG_PN = "libXcursor"
-
-SRC_URI[md5sum] = "1e7c17afbbce83e2215917047c57d1b3"
-SRC_URI[sha256sum] = "9bc6acb21ca14da51bda5bc912c8955bc6e5e433f0ab00c5e8bef842596c33df"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcursor_1.1.15.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcursor_1.1.15.bb
new file mode 100644
index 0000000..dc9af23
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcursor_1.1.15.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Xcursor: X Cursor management library"
+
+DESCRIPTION = "Xcursor is a simple library designed to help locate and \
+load cursors. Cursors can be loaded from files or memory. A library of \
+common cursors exists which map to the standard X cursor names. Cursors \
+can exist in several sizes and the library automatically picks the best \
+size."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8902e6643f7bcd7793b23dcd5d8031a4"
+
+DEPENDS += "libxrender libxfixes"
+BBCLASSEXTEND = "native nativesdk"
+
+PE = "1"
+
+XORG_PN = "libXcursor"
+
+SRC_URI[md5sum] = "58fe3514e1e7135cf364101e714d1a14"
+SRC_URI[sha256sum] = "294e670dd37cd23995e69aae626629d4a2dfe5708851bbc13d032401b7a3df6b"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont2_2.0.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont2_2.0.1.bb
deleted file mode 100644
index 4bfb290..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont2_2.0.1.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "XFont2: X Font rasterisation library"
-
-DESCRIPTION = "libXfont2 provides various services for X servers, most \
-notably font selection and rasterisation (through external libraries \
-such as freetype)."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT & MIT-style & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a46c8040f2f737bcd0c435feb2ab1c2c"
-
-DEPENDS += "freetype xtrans fontsproto libfontenc zlib"
-
-XORG_PN = "libXfont2"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "0d9f6dd9c23bf4bcbfb00504b566baf5"
-SRC_URI[sha256sum] = "e9fbbb475ddd171b3a6a54b989cbade1f6f874fc35d505ebc5be426bc6e4db7e"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont2_2.0.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont2_2.0.3.bb
new file mode 100644
index 0000000..5f27a55
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont2_2.0.3.bb
@@ -0,0 +1,22 @@
+SUMMARY = "XFont2: X Font rasterisation library"
+
+DESCRIPTION = "libXfont2 provides various services for X servers, most \
+notably font selection and rasterisation (through external libraries \
+such as freetype)."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT & MIT-style & BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a46c8040f2f737bcd0c435feb2ab1c2c"
+
+DEPENDS += "freetype xtrans fontsproto libfontenc zlib"
+
+XORG_PN = "libXfont2"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "b7ca87dfafeb5205b28a1e91ac3efe85"
+SRC_URI[sha256sum] = "0e8ab7fd737ccdfe87e1f02b55f221f0bd4503a1c5f28be4ed6a54586bac9c4e"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.2.bb
deleted file mode 100644
index b11dda5..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.2.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "XFont: X Font rasterisation library"
-
-DESCRIPTION = "libXfont provides various services for X servers, most \
-notably font selection and rasterisation (through external libraries \
-such as freetype)."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT & MIT-style & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a46c8040f2f737bcd0c435feb2ab1c2c"
-
-DEPENDS += "freetype xtrans fontsproto libfontenc zlib"
-PROVIDES = "xfont"
-
-PE = "1"
-
-XORG_PN = "libXfont"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "254ee42bd178d18ebc7a73aacfde7f79"
-SRC_URI[sha256sum] = "02945ea68da447102f3e6c2b896c1d2061fd115de99404facc2aca3ad7010d71"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb
new file mode 100644
index 0000000..79f77fc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb
@@ -0,0 +1,25 @@
+SUMMARY = "XFont: X Font rasterisation library"
+
+DESCRIPTION = "libXfont provides various services for X servers, most \
+notably font selection and rasterisation (through external libraries \
+such as freetype)."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT & MIT-style & BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a46c8040f2f737bcd0c435feb2ab1c2c"
+
+DEPENDS += "freetype xtrans fontsproto libfontenc zlib"
+PROVIDES = "xfont"
+
+PE = "1"
+
+XORG_PN = "libXfont"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "16eaf156edd79b68038b6a7c44aa9e9b"
+SRC_URI[sha256sum] = "1a7f7490774c87f2052d146d1e0e64518d32e6848184a18654e8d0bb57883242"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.7.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.7.1.bb
deleted file mode 100644
index 81df1dd..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.7.1.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Generic XKB keymap library"
-DESCRIPTION = "libxkbcommon is a keymap compiler and support library which \
-processes a reduced subset of keymaps as defined by the XKB specification."
-HOMEPAGE = "http://www.xkbcommon.org"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e525ed9809e1f8a07cf4bce8b09e8b87"
-LICENSE = "MIT & MIT-style"
-
-DEPENDS = "util-macros flex-native bison-native"
-
-SRC_URI = "http://xkbcommon.org/download/${BPN}-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "947ba609cb0239b9462127d5cf8908ee"
-SRC_URI[sha256sum] = "ba59305d2e19e47c27ea065c2e0df96ebac6a3c6e97e28ae5620073b6084e68b"
-
-UPSTREAM_CHECK_URI = "http://xkbcommon.org/"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--disable-docs"
-
-PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
-PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxcb xkeyboard-config,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.8.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.8.0.bb
new file mode 100644
index 0000000..050d0b7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.8.0.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Generic XKB keymap library"
+DESCRIPTION = "libxkbcommon is a keymap compiler and support library which \
+processes a reduced subset of keymaps as defined by the XKB specification."
+HOMEPAGE = "http://www.xkbcommon.org"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e525ed9809e1f8a07cf4bce8b09e8b87"
+LICENSE = "MIT & MIT-style"
+
+DEPENDS = "util-macros flex-native bison-native"
+
+SRC_URI = "http://xkbcommon.org/download/${BPN}-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "7d0e4c4a137d0ac45bf6b328c84c3a81"
+SRC_URI[sha256sum] = "e829265db04e0aebfb0591b6dc3377b64599558167846c3f5ee5c5e53641fe6d"
+
+UPSTREAM_CHECK_URI = "http://xkbcommon.org/"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-docs"
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
+PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxcb xkeyboard-config,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxres_1.0.7.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxres_1.0.7.bb
deleted file mode 100644
index 8c04c44..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxres_1.0.7.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "XRes: X Resource extension library"
-
-DESCRIPTION = "libXRes provides an X Window System client interface to \
-the Resource extension to the X protocol. The Resource extension allows \
-for X clients to see and monitor the X resource usage of various clients \
-(pixmaps, et al)."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8c89441a8df261bdc56587465e13c7fa"
-
-DEPENDS += "libxext resourceproto"
-
-PE = "1"
-
-XORG_PN = "libXres"
-
-SRC_URI[md5sum] = "45ef29206a6b58254c81bea28ec6c95f"
-SRC_URI[sha256sum] = "26899054aa87f81b17becc68e8645b240f140464cf90c42616ebb263ec5fa0e5"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxres_1.2.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxres_1.2.0.bb
new file mode 100644
index 0000000..8c34e47
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxres_1.2.0.bb
@@ -0,0 +1,20 @@
+SUMMARY = "XRes: X Resource extension library"
+
+DESCRIPTION = "libXRes provides an X Window System client interface to \
+the Resource extension to the X protocol. The Resource extension allows \
+for X clients to see and monitor the X resource usage of various clients \
+(pixmaps, et al)."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8c89441a8df261bdc56587465e13c7fa"
+
+DEPENDS += "libxext resourceproto"
+
+PE = "1"
+
+XORG_PN = "libXres"
+
+SRC_URI[md5sum] = "5d6d443d1abc8e1f6fc1c57fb27729bb"
+SRC_URI[sha256sum] = "ff75c1643488e64a7cfbced27486f0f944801319c84c18d3bd3da6bf28c812d4"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxshmfence/extensions.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxshmfence/extensions.patch
new file mode 100644
index 0000000..4cc9e05
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxshmfence/extensions.patch
@@ -0,0 +1,17 @@
+With glibc 2.27 memfd_create is behind a _GNU_SOURCE guard, so call
+AC_USE_SYSTEM_EXTENSIONS to get that defined.
+
+Upstream-Status: Submitted
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index 0c98875..ebf4dee 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -29,4 +29,6 @@ AC_CONFIG_SRCDIR([Makefile.am])
+ AC_CONFIG_HEADERS([config.h])
+
++AC_USE_SYSTEM_EXTENSIONS
++
+ # Initialize Automake
+ AM_INIT_AUTOMAKE([foreign dist-bzip2])
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxshmfence_1.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxshmfence_1.2.bb
index ae34b1f..1df068d 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxshmfence_1.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxshmfence_1.2.bb
@@ -13,5 +13,7 @@
BBCLASSEXTEND = "native nativesdk"
+SRC_URI += "file://extensions.patch"
+
SRC_URI[md5sum] = "66662e76899112c0f99e22f2fc775a7e"
SRC_URI[sha256sum] = "d21b2d1fd78c1efbe1f2c16dae1cb23f8fd231dcf891465b8debe636a9054b0c"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.21.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.21.bb
deleted file mode 100644
index 01a51ad..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.21.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Keyboard configuration database for X Window"
-
-DESCRIPTION = "The non-arch keyboard configuration database for X \
-Window. The goal is to provide the consistent, well-structured, \
-frequently released open source of X keyboard configuration data for X \
-Window System implementations. The project is targeted to XKB-based \
-systems."
-
-HOMEPAGE = "http://freedesktop.org/wiki/Software/XKeyboardConfig"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xkeyboard-config"
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
-
-SRC_URI = "${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${PV}.tar.bz2"
-SRC_URI[md5sum] = "af9498e8954907d0a47f0f7b3d21e1ef"
-SRC_URI[sha256sum] = "30c17049fae129fc14875656da9aa3099e3031d6ce0ee1d77aae190fd9edcec5"
-
-SECTION = "x11/libs"
-DEPENDS = "intltool-native util-macros libxslt-native"
-
-EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
-
-FILES_${PN} += "${datadir}/X11/xkb"
-
-inherit autotools pkgconfig gettext
-
-do_install_append () {
- install -d ${D}${datadir}/X11/xkb/compiled
- cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
-}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.22.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.22.bb
new file mode 100644
index 0000000..4fd894f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.22.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Keyboard configuration database for X Window"
+
+DESCRIPTION = "The non-arch keyboard configuration database for X \
+Window. The goal is to provide the consistent, well-structured, \
+frequently released open source of X keyboard configuration data for X \
+Window System implementations. The project is targeted to XKB-based \
+systems."
+
+HOMEPAGE = "http://freedesktop.org/wiki/Software/XKeyboardConfig"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xkeyboard-config"
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
+
+SRC_URI = "${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "eb61fb3fd419e817df572b0c8d94a883"
+SRC_URI[sha256sum] = "deaec9989fbc443358b43864437b7b6d39caff07890a4a8055105ce9fcaa59bd"
+
+SECTION = "x11/libs"
+DEPENDS = "intltool-native util-macros libxslt-native"
+
+EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
+
+FILES_${PN} += "${datadir}/X11/xkb"
+
+inherit autotools pkgconfig gettext
+
+do_install_append () {
+ install -d ${D}${datadir}/X11/xkb/compiled
+ cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
+}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/calibrateproto_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/calibrateproto_git.bb
index 3a98926..eb4b422 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/calibrateproto_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/calibrateproto_git.bb
@@ -17,5 +17,5 @@
SRC_URI = "git://anongit.freedesktop.org/git/xorg/proto/calibrateproto \
file://fix.patch;apply=yes"
S = "${WORKDIR}/git"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch
deleted file mode 100644
index 09b6088..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Upstream uses AM_PATH_PYTHON to find a python binary and ask it where to install
-libraries. This means we either need to depend on python-native (large build
-dependency, early in the build) or use the host python (pythondir reflects the
-host and not the target, breaks builds).
-
-The third option is to just hardcode the path where the module goes, as most
-callers of the code use pkg-config to find where it was installed anyway.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/configure.ac b/configure.ac
-index d140bfe..c7b68da 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -14,7 +14,10 @@ if test "$XMLLINT" = "no"; then
- AC_MSG_WARN([xmllint not found; unable to validate against schema.])
- fi
-
--AM_PATH_PYTHON([2.5])
-+pythondir="${libdir}/xcb-proto"
-+AC_SUBST(pythondir)
-+PYTHON="python3"
-+AC_SUBST(PYTHON)
-
- xcbincludedir='${datadir}/xcb'
- AC_SUBST(xcbincludedir)
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
index bc04bc4..25a8373 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
@@ -11,8 +11,7 @@
LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7 \
file://src/dri2.xml;beginline=2;endline=28;md5=f8763b13ff432e8597e0d610cf598e65"
-SRC_URI = "http://xcb.freedesktop.org/dist/xcb-proto-${PV}.tar.bz2 \
- file://no-python-native.patch \
+SRC_URI = "http://xcb.freedesktop.org/dist/${BP}.tar.bz2 \
file://0001-Make-whitespace-use-consistent.patch \
file://0002-print-is-a-function-and-needs-parentheses.patch \
"
@@ -21,6 +20,10 @@
inherit autotools pkgconfig
+# Force the use of Python 3 and a specific library path so we don't need to
+# depend on python3-native
+CACHED_CONFIGUREVARS += "PYTHON=python3 am_cv_python_pythondir=${libdir}/xcb-proto"
+
PACKAGES += "python-xcbgen"
FILES_${PN} = ""
@@ -32,9 +35,19 @@
BBCLASSEXTEND = "native nativesdk"
-do_install_append() {
- # Makefile's do_install creates .pyc files for python3, now also create
- # them for python2 so that they will be recorded by manifest, and can be
- # cleaned correctly.
- python -m py_compile ${D}${libdir}/xcb-proto/xcbgen/*.py
+# Need to do this dance because we're forcing the use of host Python above and
+# if xcb-proto is built with Py3.5 and then re-used from sstate on a host with
+# Py3.6 the second build will write new cache files into the sysroot which won't
+# be listed in the manifest so won't be deleted, resulting in an error on
+# rebuilds. Solve this by deleting the entire cache directory when this package
+# is removed from the sysroot.
+SSTATEPOSTINSTFUNCS += "xcb_sstate_postinst"
+xcb_sstate_postinst() {
+ if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
+ then
+ cat <<EOF >${SSTATE_INST_POSTRM}
+#!/bin/sh
+rm -rf ${libdir}/xcb-proto/xcbgen/__pycache__
+EOF
+ fi
}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto/xproto_fix_for_x32.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto/xproto_fix_for_x32.patch
index 8a5ff58..4f9ed99 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto/xproto_fix_for_x32.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto/xproto_fix_for_x32.patch
@@ -10,13 +10,15 @@
Received this patch from H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/1
---- xproto-7.0.22/Xmd.h.x32 2009-07-11 04:19:50.000000000 -0700
-+++ xproto-7.0.22/Xmd.h 2011-11-30 17:14:19.290395893 -0800
+Index: xproto-7.0.31/Xmd.h
+===================================================================
+--- xproto-7.0.31.orig/Xmd.h
++++ xproto-7.0.31/Xmd.h
@@ -62,7 +62,6 @@ SOFTWARE.
defined(__ia64__) || defined(ia64) || \
defined(__sparc64__) || \
defined(__s390x__) || \
- defined(__amd64__) || defined(amd64) || \
defined(__powerpc64__)
- # define LONG64 /* 32/64-bit architecture */
- # endif
+ # if !defined(__ILP32__) /* amd64-x32 is 32bit */
+ # define LONG64 /* 32/64-bit architecture */
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
index 4c442bc..5420b7d 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
@@ -10,7 +10,6 @@
S = "${WORKDIR}"
CONFFILES_${PN} = "${sysconfdir}/X11/xorg.conf"
-CONFFILES_${PN}_append_libc-musl = " ${sysconfdir}/X11/xorg.conf.d/10-preload-modules.conf"
PACKAGE_ARCH = "${MACHINE_ARCH}"
ALLOW_EMPTY_${PN} = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
index 863d80c..cf2286c 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
@@ -117,7 +117,6 @@
--sysconfdir=/etc/X11 \
--localstatedir=/var \
--with-xkb-output=/var/lib/xkb \
- WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT} \
"
OPENGL_PKGCONFIGS = "dri glx glamor dri3 xshmfence"
@@ -133,7 +132,7 @@
# DRI3 requires xshmfence to also be enabled
PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto"
PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,glproto virtual/libgl virtual/libx11"
-PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy,libegl"
+PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy virtual/libgbm,libegl"
PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence"
PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch
new file mode 100644
index 0000000..d05eec5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch
@@ -0,0 +1,53 @@
+From d77cdc5e1eee26821ab98c947abea53fb7b18fe5 Mon Sep 17 00:00:00 2001
+From: California Sullivan <california.l.sullivan@intel.com>
+Date: Fri, 16 Mar 2018 17:23:11 -0700
+Subject: [PATCH] xf86pciBus.c: use Intel ddx only for pre-gen4 hardware
+
+Use intel ddx only on pre-gen4 hw, newer ones will fall back to modesetting
+Author: Timo Aaltonen <tjaalton@debian.org>
+
+Instead of defaulting to the Intel driver for all Intel hardware, only
+default it for older hardware for which it has shown to be better for.
+
+Others fall through to the -modesetting default.
+
+Upstream-Status: Pending [Debian/Fedora patch
+https://src.fedoraproject.org/rpms/xorg-x11-server/c/ee515e44b07e37689abf48cf2fffb41578f3bc1d]
+
+Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
+---
+ hw/xfree86/common/xf86pciBus.c | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
+index e61ae0cd4..d70c99197 100644
+--- a/hw/xfree86/common/xf86pciBus.c
++++ b/hw/xfree86/common/xf86pciBus.c
+@@ -1173,7 +1173,23 @@ xf86VideoPtrToDriverList(struct pci_device *dev,
+ case 0x0bef:
+ /* Use fbdev/vesa driver on Oaktrail, Medfield, CDV */
+ break;
+- default:
++ /* Default to intel only on pre-gen4 chips */
++ case 0x3577:
++ case 0x2562:
++ case 0x3582:
++ case 0x358e:
++ case 0x2572:
++ case 0x2582:
++ case 0x258a:
++ case 0x2592:
++ case 0x2772:
++ case 0x27a2:
++ case 0x27ae:
++ case 0x29b2:
++ case 0x29c2:
++ case 0x29d2:
++ case 0xa001:
++ case 0xa011:
+ driverList[0] = "intel";
+ break;
+ }
+--
+2.14.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0002-configure.ac-Fix-wayland-scanner-and-protocols-locat.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0002-configure.ac-Fix-wayland-scanner-and-protocols-locat.patch
deleted file mode 100644
index eafd07a..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0002-configure.ac-Fix-wayland-scanner-and-protocols-locat.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 963428f914c42270d3312d4f0c0840565521534e Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 16 Nov 2016 00:41:51 +0200
-Subject: [PATCH 2/2] configure.ac: Fix wayland-scanner and protocols locations
-
-We want to use the wayland-scanner in path (native sysroot)
-instead of using pkg-config which gives us target paths.
-
-The protocols paths on the other hand need to be prefixed with the
-(allarch) sysroot because, again, pkg-config gives us target paths.
-
-Upstream-Status: Inappropriate [embedded specific]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 58f1567..383a7df 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2525,11 +2525,9 @@ if test "x$XWAYLAND" = xyes; then
- AC_MSG_ERROR([Xwayland requires CLOCK_MONOTONIC support.])
- fi
-
-- WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
-- AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],,
-- [${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH])
-+ AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
-
-- AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, `$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
-+ AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, ${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
- fi
-
-
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-1.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-1.patch
deleted file mode 100644
index 23c8049..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-1.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 215f894965df5fb0bb45b107d84524e700d2073c Mon Sep 17 00:00:00 2001
-From: Michal Srb <msrb@suse.com>
-Date: Wed, 24 May 2017 15:54:40 +0300
-Subject: [PATCH] dix: Disallow GenericEvent in SendEvent request.
-
-The SendEvent request holds xEvent which is exactly 32 bytes long, no more,
-no less. Both ProcSendEvent and SProcSendEvent verify that the received data
-exactly match the request size. However nothing stops the client from passing
-in event with xEvent::type = GenericEvent and any value of
-xGenericEvent::length.
-
-In the case of ProcSendEvent, the event will be eventually passed to
-WriteEventsToClient which will see that it is Generic event and copy the
-arbitrary length from the receive buffer (and possibly past it) and send it to
-the other client. This allows clients to copy unitialized heap memory out of X
-server or to crash it.
-
-In case of SProcSendEvent, it will attempt to swap the incoming event by
-calling a swapping function from the EventSwapVector array. The swapped event
-is written to target buffer, which in this case is local xEvent variable. The
-xEvent variable is 32 bytes long, but the swapping functions for GenericEvents
-expect that the target buffer has size matching the size of the source
-GenericEvent. This allows clients to cause stack buffer overflows.
-
-Signed-off-by: Michal Srb <msrb@suse.com>
-Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-
-CVE: CVE-2017-10971
-
-Upstream-Status: Backport [https://cgit.freedesktop.org/xorg/xserver/commit/?id=215f894965df5fb0bb45b107d84524e700d2073c]
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- dix/events.c | 6 ++++++
- dix/swapreq.c | 7 +++++++
- 2 files changed, 13 insertions(+)
-
-diff --git a/dix/events.c b/dix/events.c
-index 3e3a01e..d3a33ea 100644
---- a/dix/events.c
-+++ b/dix/events.c
-@@ -5366,6 +5366,12 @@ ProcSendEvent(ClientPtr client)
- client->errorValue = stuff->event.u.u.type;
- return BadValue;
- }
-+ /* Generic events can have variable size, but SendEvent request holds
-+ exactly 32B of event data. */
-+ if (stuff->event.u.u.type == GenericEvent) {
-+ client->errorValue = stuff->event.u.u.type;
-+ return BadValue;
-+ }
- if (stuff->event.u.u.type == ClientMessage &&
- stuff->event.u.u.detail != 8 &&
- stuff->event.u.u.detail != 16 && stuff->event.u.u.detail != 32) {
-diff --git a/dix/swapreq.c b/dix/swapreq.c
-index 719e9b8..6785059 100644
---- a/dix/swapreq.c
-+++ b/dix/swapreq.c
-@@ -292,6 +292,13 @@ SProcSendEvent(ClientPtr client)
- swapl(&stuff->destination);
- swapl(&stuff->eventMask);
-
-+ /* Generic events can have variable size, but SendEvent request holds
-+ exactly 32B of event data. */
-+ if (stuff->event.u.u.type == GenericEvent) {
-+ client->errorValue = stuff->event.u.u.type;
-+ return BadValue;
-+ }
-+
- /* Swap event */
- proc = EventSwapVector[stuff->event.u.u.type & 0177];
- if (!proc || proc == NotImplemented) /* no swapping proc; invalid event type? */
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-2.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-2.patch
deleted file mode 100644
index 5c9887a..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-2.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 8caed4df36b1f802b4992edcfd282cbeeec35d9d Mon Sep 17 00:00:00 2001
-From: Michal Srb <msrb@suse.com>
-Date: Wed, 24 May 2017 15:54:41 +0300
-Subject: [PATCH] Xi: Verify all events in ProcXSendExtensionEvent.
-
-The requirement is that events have type in range
-EXTENSION_EVENT_BASE..lastEvent, but it was tested
-only for first event of all.
-
-Signed-off-by: Michal Srb <msrb@suse.com>
-Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-
-CVE: CVE-2017-10971
-
-Upstream-Status: Backport [https://cgit.freedesktop.org/xorg/xserver/commit/?id=8caed4df36b1f802b4992edcfd282cbeeec35d9d]
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- Xi/sendexev.c | 12 +++++++-----
- 1 file changed, 7 insertions(+), 5 deletions(-)
-
-diff --git a/Xi/sendexev.c b/Xi/sendexev.c
-index 1cf118a..5e63bfc 100644
---- a/Xi/sendexev.c
-+++ b/Xi/sendexev.c
-@@ -117,7 +117,7 @@ SProcXSendExtensionEvent(ClientPtr client)
- int
- ProcXSendExtensionEvent(ClientPtr client)
- {
-- int ret;
-+ int ret, i;
- DeviceIntPtr dev;
- xEvent *first;
- XEventClass *list;
-@@ -141,10 +141,12 @@ ProcXSendExtensionEvent(ClientPtr client)
- /* The client's event type must be one defined by an extension. */
-
- first = ((xEvent *) &stuff[1]);
-- if (!((EXTENSION_EVENT_BASE <= first->u.u.type) &&
-- (first->u.u.type < lastEvent))) {
-- client->errorValue = first->u.u.type;
-- return BadValue;
-+ for (i = 0; i < stuff->num_events; i++) {
-+ if (!((EXTENSION_EVENT_BASE <= first[i].u.u.type) &&
-+ (first[i].u.u.type < lastEvent))) {
-+ client->errorValue = first[i].u.u.type;
-+ return BadValue;
-+ }
- }
-
- list = (XEventClass *) (first + stuff->num_events);
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-3.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-3.patch
deleted file mode 100644
index 54ba481..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-3.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From ba336b24052122b136486961c82deac76bbde455 Mon Sep 17 00:00:00 2001
-From: Michal Srb <msrb@suse.com>
-Date: Wed, 24 May 2017 15:54:42 +0300
-Subject: [PATCH] Xi: Do not try to swap GenericEvent.
-
-The SProcXSendExtensionEvent must not attempt to swap GenericEvent because
-it is assuming that the event has fixed size and gives the swapping function
-xEvent-sized buffer.
-
-A GenericEvent would be later rejected by ProcXSendExtensionEvent anyway.
-
-Signed-off-by: Michal Srb <msrb@suse.com>
-Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-
-CVE: CVE-2017-10971
-
-Upstream-Status: Backport [https://cgit.freedesktop.org/xorg/xserver/commit/?id=ba336b24052122b136486961c82deac76bbde455]
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- Xi/sendexev.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/Xi/sendexev.c b/Xi/sendexev.c
-index 5e63bfc..5c2e0fc 100644
---- a/Xi/sendexev.c
-+++ b/Xi/sendexev.c
-@@ -95,9 +95,17 @@ SProcXSendExtensionEvent(ClientPtr client)
-
- eventP = (xEvent *) &stuff[1];
- for (i = 0; i < stuff->num_events; i++, eventP++) {
-+ if (eventP->u.u.type == GenericEvent) {
-+ client->errorValue = eventP->u.u.type;
-+ return BadValue;
-+ }
-+
- proc = EventSwapVector[eventP->u.u.type & 0177];
-- if (proc == NotImplemented) /* no swapping proc; invalid event type? */
-+ /* no swapping proc; invalid event type? */
-+ if (proc == NotImplemented) {
-+ client->errorValue = eventP->u.u.type;
- return BadValue;
-+ }
- (*proc) (eventP, &eventT);
- *eventP = eventT;
- }
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch
index ec0eea6..c36e4e7 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch
@@ -5,13 +5,13 @@
Signed-off-by: Yu Ke <ke.yu@intel.com>
-diff --git a/xorg-server.m4 b/xorg-server.m4
-index bdecf62..040fdb8 100644
---- a/xorg-server.m4
-+++ b/xorg-server.m4
+Index: xorg-server-1.19.6/xorg-server.m4
+===================================================================
+--- xorg-server-1.19.6.orig/xorg-server.m4
++++ xorg-server-1.19.6/xorg-server.m4
@@ -28,10 +28,12 @@ dnl
- # Checks for the $1 define in xorg-server.h (from the sdk). If it
- # is defined, then add $1 to $REQUIRED_MODULES.
+ # Checks for the MACRO define in xorg-server.h (from the sdk). If it
+ # is defined, then add the given PROTO to $REQUIRED_MODULES.
+m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR)
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.19.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.19.3.bb
deleted file mode 100644
index 65ef6c6..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.19.3.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-require xserver-xorg.inc
-
-SRC_URI += "file://musl-arm-inb-outb.patch \
- file://0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch \
- file://0002-configure.ac-Fix-wayland-scanner-and-protocols-locat.patch \
- file://0003-modesetting-Fix-16-bit-depth-bpp-mode.patch \
- file://0003-Remove-check-for-useSIGIO-option.patch \
- file://CVE-2017-10971-1.patch \
- file://CVE-2017-10971-2.patch \
- file://CVE-2017-10971-3.patch \
- "
-SRC_URI[md5sum] = "015d2fc4b9f2bfe7a626edb63a62c65e"
-SRC_URI[sha256sum] = "677a8166e03474719238dfe396ce673c4234735464d6dadf2959b600d20e5a98"
-
-# These extensions are now integrated into the server, so declare the migration
-# path for in-place upgrades.
-
-RREPLACES_${PN} = "${PN}-extension-dri \
- ${PN}-extension-dri2 \
- ${PN}-extension-record \
- ${PN}-extension-extmod \
- ${PN}-extension-dbe \
- "
-RPROVIDES_${PN} = "${PN}-extension-dri \
- ${PN}-extension-dri2 \
- ${PN}-extension-record \
- ${PN}-extension-extmod \
- ${PN}-extension-dbe \
- "
-RCONFLICTS_${PN} = "${PN}-extension-dri \
- ${PN}-extension-dri2 \
- ${PN}-extension-record \
- ${PN}-extension-extmod \
- ${PN}-extension-dbe \
- "
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.19.6.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.19.6.bb
new file mode 100644
index 0000000..c680cf9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.19.6.bb
@@ -0,0 +1,32 @@
+require xserver-xorg.inc
+
+SRC_URI += "file://musl-arm-inb-outb.patch \
+ file://0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch \
+ file://0003-modesetting-Fix-16-bit-depth-bpp-mode.patch \
+ file://0003-Remove-check-for-useSIGIO-option.patch \
+ file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch \
+ "
+SRC_URI[md5sum] = "3e47777ff034a331aed2322b078694a8"
+SRC_URI[sha256sum] = "a732502f1db000cf36a376cd0c010ffdbf32ecdd7f1fa08ba7f5bdf9601cc197"
+
+# These extensions are now integrated into the server, so declare the migration
+# path for in-place upgrades.
+
+RREPLACES_${PN} = "${PN}-extension-dri \
+ ${PN}-extension-dri2 \
+ ${PN}-extension-record \
+ ${PN}-extension-extmod \
+ ${PN}-extension-dbe \
+ "
+RPROVIDES_${PN} = "${PN}-extension-dri \
+ ${PN}-extension-dri2 \
+ ${PN}-extension-record \
+ ${PN}-extension-extmod \
+ ${PN}-extension-dbe \
+ "
+RCONFLICTS_${PN} = "${PN}-extension-dri \
+ ${PN}-extension-dri2 \
+ ${PN}-extension-record \
+ ${PN}-extension-extmod \
+ ${PN}-extension-dbe \
+ "
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xvideo-tests/xvideo-tests_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xvideo-tests/xvideo-tests_git.bb
index 2667dd8..1d275a0 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xvideo-tests/xvideo-tests_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xvideo-tests/xvideo-tests_git.bb
@@ -8,7 +8,7 @@
PV = "0.1+git${SRCPV}"
SRC_URI = "git://git.yoctoproject.org/test-xvideo"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch b/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch
deleted file mode 100644
index a4b7157..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 6b5bbdfaac7f216fe8a02c4cf29e5eb2aee5a409 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 15 Sep 2015 00:01:00 +0000
-Subject: [PATCH] include sys/types.h for dev_t definition
-
-Avoids the build failures when sys/types.h does not get included
-indirectly through other headers.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- blktrace.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/blktrace.h b/blktrace.h
-index 380aec7..944fc08 100644
---- a/blktrace.h
-+++ b/blktrace.h
-@@ -5,6 +5,7 @@
- #include <limits.h>
- #include <byteswap.h>
- #include <endian.h>
-+#include <sys/types.h>
-
- #include "blktrace_api.h"
- #include "rbtree.h"
---
-2.5.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch b/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
index dea1aa2..ab905cf 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
@@ -10,6 +10,8 @@
Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
+Index: git/Makefile
+===================================================================
--- git.orig/Makefile
+++ git/Makefile
@@ -1,5 +1,6 @@
@@ -19,7 +21,7 @@
ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
PROGS = blkparse blktrace verify_blkparse blkrawverify blkiomon
LIBS = -lpthread
-@@ -23,19 +24,19 @@ btreplay/btreplay:
+@@ -26,19 +27,19 @@ btreplay/btreplay:
$(CC) -o $*.o -c $(ALL_CFLAGS) $<
blkparse: blkparse.o blkparse_fmt.o rbtree.o act_mask.o
@@ -44,6 +46,8 @@
$(PROGS): | depend
+Index: git/btreplay/Makefile
+===================================================================
--- git.orig/btreplay/Makefile
+++ git/btreplay/Makefile
@@ -7,6 +7,7 @@
@@ -55,8 +59,8 @@
OCFLAGS = -UCOUNT_IOS -UDEBUG -DNDEBUG
XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
@@ -32,10 +33,10 @@ clean: docsclean
- $(CC) $(CFLAGS) -c -o $*.o $<
-
+ $(CC) $(CFLAGS) -c -o $*.o $<
+
btrecord: btrecord.o
- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^)
+ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS)
@@ -67,6 +71,8 @@
depend:
@$(CC) -MM $(CFLAGS) *.c 1> .depend
+Index: git/btt/Makefile
+===================================================================
--- git.orig/btt/Makefile
+++ git/btt/Makefile
@@ -7,6 +7,7 @@
@@ -86,11 +92,13 @@
ifneq ($(wildcard .depend),)
include .depend
+Index: git/iowatcher/Makefile
+===================================================================
--- git.orig/iowatcher/Makefile
+++ git/iowatcher/Makefile
@@ -1,5 +1,6 @@
- C = gcc
- CFLAGS = -Wall -O0 -g -W
+ CC = gcc
+ CFLAGS = -Wall -O2 -g -W -Wunused-result
+LDFLAGS =
ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
@@ -99,8 +107,8 @@
$(CC) -o $*.o -c $(ALL_CFLAGS) $<
iowatcher: blkparse.o plot.o main.o tracers.o mpstat.o fio.o
-- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm
-+ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm $(LDFLAGS)
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm -lrt
++ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm $(LDFLAGS) -lrt
depend:
@$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace_git.bb
index 770575f..663de2e 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace_git.bb
@@ -5,13 +5,12 @@
DEPENDS = "libaio"
-SRCREV = "43fc870ce04e963def45dfc0d1ed4ea21ef10d4b"
+SRCREV = "cca113f2fe0759b91fd6a0e10fdcda2c28f18a7e"
-PV = "1.1.0+git${SRCPV}"
+PV = "1.2.0+git${SRCPV}"
SRC_URI = "git://git.kernel.dk/blktrace.git \
file://ldflags.patch \
- file://0001-include-sys-types.h-for-dev_t-definition.patch \
"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb
index 552eb6a..ed6d0ec 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb
@@ -9,6 +9,7 @@
SRC_URI += " \
file://0001-Disable-installing-header-file-provided-by-another-p.patch \
+file://0001-ioctl.c-Fix-build-with-linux-4.13.patch \
"
EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc
index 50366e7..ab15bc1 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc
@@ -3,11 +3,9 @@
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRC_URI = "http://nwl.cc/pub/cryptodev-linux/cryptodev-linux-${PV}.tar.gz"
+SRC_URI = "git://github.com/cryptodev-linux/cryptodev-linux"
+SRCREV = "87d959d9a279c055b361de8e730fab6a7144edd7"
-SRC_URI[md5sum] = "cb4e0ed9e5937716c7c8a7be84895b6d"
-SRC_URI[sha256sum] = "9f4c0b49b30e267d776f79455d09c70cc9c12c86eee400a0d0a0cd1d8e467950"
-
-S = "${WORKDIR}/cryptodev-linux-${PV}"
+S = "${WORKDIR}/git"
CLEANBROKEN = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch
index 3f0298b..84fd27e 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch
@@ -14,37 +14,37 @@
tests/Makefile | 8 ++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
-diff --git a/Makefile b/Makefile
-index 31c4b3f..2ecf2a9 100644
---- a/Makefile
-+++ b/Makefile
-@@ -34,6 +34,9 @@ modules_install:
- @echo "Installing cryptodev.h in $(PREFIX)/usr/include/crypto ..."
- @install -D crypto/cryptodev.h $(PREFIX)/usr/include/crypto/cryptodev.h
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -35,6 +35,9 @@ modules_install:
+ $(MAKE) $(KERNEL_MAKE_OPTS) modules_install
+ install -m 644 -D crypto/cryptodev.h $(DESTDIR)/$(includedir)/crypto/cryptodev.h
+install_tests:
+ make -C tests install DESTDIR=$(PREFIX)
+
clean:
- make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean
+ $(MAKE) $(KERNEL_MAKE_OPTS) clean
rm -f $(hostprogs) *~
-@@ -42,6 +45,9 @@ clean:
+@@ -43,6 +46,9 @@ clean:
check:
- CFLAGS=$(CRYPTODEV_CFLAGS) KERNEL_DIR=$(KERNEL_DIR) make -C tests check
+ CFLAGS=$(CRYPTODEV_CFLAGS) KERNEL_DIR=$(KERNEL_DIR) $(MAKE) -C tests check
+testprogs:
+ KERNEL_DIR=$(KERNEL_DIR) make -C tests testprogs
+
CPOPTS =
- ifneq (${SHOW_TYPES},)
+ ifneq ($(SHOW_TYPES),)
CPOPTS += --show-types
-diff --git a/tests/Makefile b/tests/Makefile
-index c9f04e8..cd202af 100644
---- a/tests/Makefile
-+++ b/tests/Makefile
-@@ -19,6 +19,12 @@ example-async-hmac-objs := async_hmac.o
- example-async-speed-objs := async_speed.o
- example-hashcrypt-speed-objs := hashcrypt_speed.c
+Index: git/tests/Makefile
+===================================================================
+--- git.orig/tests/Makefile
++++ git/tests/Makefile
+@@ -23,6 +23,12 @@ bindir = $(execprefix)/bin
+
+ all: $(hostprogs)
+install:
+ install -d $(DESTDIR)/usr/bin/tests_cryptodev
@@ -55,9 +55,9 @@
check: $(hostprogs)
./cipher
./hmac
-@@ -28,6 +34,8 @@ check: $(hostprogs)
- ./cipher-gcm
- ./cipher-aead
+@@ -38,6 +44,8 @@ install:
+ install -m 755 $$prog $(DESTDIR)/$(bindir); \
+ done
+testprogs: $(hostprogs)
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.13.patch b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.13.patch
new file mode 100644
index 0000000..a41efac
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.13.patch
@@ -0,0 +1,49 @@
+From f0d69774afb27ffc62bf353465fba145e70cb85a Mon Sep 17 00:00:00 2001
+From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+Date: Mon, 4 Sep 2017 11:05:08 +0200
+Subject: [PATCH] ioctl.c: Fix build with linux 4.13
+
+git/ioctl.c:1127:3: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
+ {0, },
+ ^
+note: (near initialization for 'verbosity_ctl_dir[1]')
+git/ioctl.c:1136:3: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
+ {0, },
+ ^
+
+Linux kernel has added -Werror=designated-init around 4.11 (c834f0e8a8b)
+triggering build errors with gcc 5 and 6 (but not with gcc 4)
+
+Upstream-Status: Backport
+
+Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
+---
+ ioctl.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ioctl.c b/ioctl.c
+index 0385203..8d4a162 100644
+--- a/ioctl.c
++++ b/ioctl.c
+@@ -1124,7 +1124,7 @@ static struct ctl_table verbosity_ctl_dir[] = {
+ .mode = 0644,
+ .proc_handler = proc_dointvec,
+ },
+- {0, },
++ {},
+ };
+
+ static struct ctl_table verbosity_ctl_root[] = {
+@@ -1133,7 +1133,7 @@ static struct ctl_table verbosity_ctl_root[] = {
+ .mode = 0555,
+ .child = verbosity_ctl_dir,
+ },
+- {0, },
++ {},
+ };
+ static struct ctl_table_header *verbosity_sysctl_header;
+ static int __init init_cryptodev(void)
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc.inc b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc.inc
index d759946..9a90d44 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc.inc
@@ -7,9 +7,11 @@
SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \
file://make_install.patch \
- "
+ file://0001-checks-Use-proper-format-modifier-for-size_t.patch \
+ "
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
-EXTRA_OEMAKE='PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"'
+EXTRA_OEMAKE='NO_PYTHON=1 PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"'
S = "${WORKDIR}/git"
@@ -20,4 +22,4 @@
PACKAGES =+ "${PN}-misc"
FILES_${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
-RDEPENDS_${PN}-misc += "bash"
+RDEPENDS_${PN}-misc += "bash diffutils"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/0001-checks-Use-proper-format-modifier-for-size_t.patch b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/0001-checks-Use-proper-format-modifier-for-size_t.patch
new file mode 100644
index 0000000..cab384d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/0001-checks-Use-proper-format-modifier-for-size_t.patch
@@ -0,0 +1,43 @@
+From c7a4c3817796107bb824a1f173faf90fae45396b Mon Sep 17 00:00:00 2001
+From: Thierry Reding <treding@nvidia.com>
+Date: Wed, 27 Sep 2017 15:04:09 +0200
+Subject: [PATCH] checks: Use proper format modifier for size_t
+
+The size of size_t can vary between architectures, so using %ld isn't
+going to work on 32-bit builds. Use the %zu modifier to make sure it is
+always correct.
+
+Upstream-Status: Backport
+Signed-off-by: Thierry Reding <treding@nvidia.com>
+Acked-by: Rob Herring <robh@kernel.org>
+Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ checks.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/checks.c b/checks.c
+index 902f2e3..08a3a29 100644
+--- a/checks.c
++++ b/checks.c
+@@ -972,7 +972,7 @@ static void check_property_phandle_args(struct check *c,
+ int cell, cellsize = 0;
+
+ if (prop->val.len % sizeof(cell_t)) {
+- FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %ld in node %s",
++ FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %zu in node %s",
+ prop->name, prop->val.len, sizeof(cell_t), node->fullpath);
+ return;
+ }
+@@ -1163,7 +1163,7 @@ static void check_interrupts_property(struct check *c,
+ return;
+
+ if (irq_prop->val.len % sizeof(cell_t))
+- FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %ld in node %s",
++ FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %zu in node %s",
+ irq_prop->name, irq_prop->val.len, sizeof(cell_t),
+ node->fullpath);
+
+--
+2.15.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/make_install.patch b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/make_install.patch
index 1120617..ccf17b3 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/make_install.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/make_install.patch
@@ -2,11 +2,11 @@
Index: git/Makefile
===================================================================
---- git.orig/Makefile 2011-11-02 14:52:17.243104779 -0700
-+++ git/Makefile 2011-11-02 15:06:01.555104982 -0700
-@@ -161,8 +161,8 @@
- $(INSTALL) -d $(DESTDIR)$(BINDIR)
- $(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR)
+--- git.orig/Makefile
++++ git/Makefile
+@@ -168,8 +168,8 @@ install-bin: all $(SCRIPTS)
+ install-lib: all
+ @$(VECHO) INSTALL-LIB
$(INSTALL) -d $(DESTDIR)$(LIBDIR)
- $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)
- ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
@@ -14,4 +14,4 @@
+ ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/$(notdir $(LIBFDT_lib))
ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT)
$(INSTALL) -m 644 $(LIBFDT_archive) $(DESTDIR)$(LIBDIR)
- $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc_1.4.4.bb b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc_1.4.4.bb
deleted file mode 100644
index eadb7ba..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc_1.4.4.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require dtc.inc
-
-LIC_FILES_CHKSUM = "file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://libfdt/libfdt.h;beginline=3;endline=52;md5=fb360963151f8ec2d6c06b055bcbb68c"
-
-SRCREV = "558cd81bdd432769b59bff01240c44f82cfb1a9d"
-
-S = "${WORKDIR}/git"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc_1.4.5.bb b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc_1.4.5.bb
new file mode 100644
index 0000000..0e46cfb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc_1.4.5.bb
@@ -0,0 +1,10 @@
+require dtc.inc
+
+LIC_FILES_CHKSUM = "file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://libfdt/libfdt.h;beginline=3;endline=52;md5=fb360963151f8ec2d6c06b055bcbb68c"
+
+SRCREV = "22a65c5331c22979d416738eb756b9541672e00d"
+
+S = "${WORKDIR}/git"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index 3a3992a..8ccd8ce 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -12,6 +12,7 @@
SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git"
S = "${WORKDIR}"
+UPSTREAM_CHECK_COMMITS = "1"
do_compile() {
:
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc
deleted file mode 100644
index c689bec..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "Kexec fast reboot tools"
-DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel"
-AUTHOR = "Eric Biederman"
-HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/"
-SECTION = "kernel/userland"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \
- file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09"
-DEPENDS = "zlib xz"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \
- file://kdump \
- file://kdump.conf \
- file://kdump.service \
-"
-
-PR = "r1"
-
-inherit autotools
-
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'
-
-INSANE_SKIP_${PN} = "arch"
-
-do_compile_prepend() {
- # Remove the prepackaged config.h from the source tree as it overrides
- # the same file generated by configure and placed in the build tree
- rm -f ${S}/include/config.h
-
- # Remove the '*.d' file to make sure the recompile is OK
- for dep in `find ${B} -type f -name '*.d'`; do
- dep_no_d="`echo $dep | sed 's#.d$##'`"
- # Remove file.d when there is a file.o
- if [ -f "$dep_no_d.o" ]; then
- rm -f $dep
- fi
- done
-}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch
deleted file mode 100644
index 84e94d7..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 3bb73e5e5649b455e15d5ca3a7ad1a90c4960972 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 10 Jun 2017 11:54:36 -0700
-Subject: [PATCH] arm64: Disable PIC
-
-Fix
-| cc1: sorry, unimplemented: code model 'large' with -fPIC
-| make: *** [Makefile:118: purgatory/arch/arm64/entry.o] Error 1
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- purgatory/arch/arm64/Makefile | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/purgatory/arch/arm64/Makefile b/purgatory/arch/arm64/Makefile
-index 636abea..80068ca 100644
---- a/purgatory/arch/arm64/Makefile
-+++ b/purgatory/arch/arm64/Makefile
-@@ -1,6 +1,7 @@
-
- arm64_PURGATORY_EXTRA_CFLAGS = \
- -mcmodel=large \
-+ -fno-PIC \
- -fno-stack-protector \
- -fno-asynchronous-unwind-tables \
- -Wundef \
---
-2.13.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
deleted file mode 100644
index 822f28c..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 02eed0f8f2748fd7579f69e5373445b52b2b8754 Mon Sep 17 00:00:00 2001
-From: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Date: Mon, 17 Oct 2016 13:56:58 +0900
-Subject: [PATCH 1/9] kexec: exntend the semantics of kexec_iomem_for_each_line
-
-The current kexec_iomem_for_each_line() counts up all the lines for which
-a callback function returns zero(0) or positive, and otherwise it stops
-further scanning.
-This behavior is incovenient in some cases. For instance, on arm64, we want
-to count up "System RAM" entries, but need to skip "reserved" entries.
-
-So this patch extends the semantics so that we will continue to scan
-succeeding entries but not count lines for which a callback function
-returns positive.
-
-The current users of kexec_iomem_for_each_line(), arm, sh and x86, will not
-be affected by this change because
-* arm
- The callback function only returns -1 or 0, and the return value of
- kexec_iomem_for_each_line() will never be used.
-* sh, x86
- The callback function may return (-1 for sh,) 0 or 1, but always returns
- 1 once we have reached the maximum number of entries allowed.
- Even so the current kexec_iomem_for_each_line() counts them up.
- This change actually fixes this bug.
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/kexec-iomem.c | 15 ++++++++++-----
- 1 file changed, 10 insertions(+), 5 deletions(-)
-
-diff --git a/kexec/kexec-iomem.c b/kexec/kexec-iomem.c
-index 485a2e8..0a0277a 100644
---- a/kexec/kexec-iomem.c
-+++ b/kexec/kexec-iomem.c
-@@ -18,6 +18,9 @@
- * Iterate over each line in the file returned by proc_iomem(). If match is
- * NULL or if the line matches with our match-pattern then call the
- * callback if non-NULL.
-+ * If match is NULL, callback should return a negative if error.
-+ * Otherwise the interation goes on, incrementing nr but only if callback
-+ * returns 0 (matched).
- *
- * Return the number of lines matched.
- */
-@@ -37,7 +40,7 @@ int kexec_iomem_for_each_line(char *match,
- char *str;
- int consumed;
- int count;
-- int nr = 0;
-+ int nr = 0, ret;
-
- fp = fopen(iomem, "r");
- if (!fp)
-@@ -50,11 +53,13 @@ int kexec_iomem_for_each_line(char *match,
- str = line + consumed;
- size = end - start + 1;
- if (!match || memcmp(str, match, strlen(match)) == 0) {
-- if (callback
-- && callback(data, nr, str, start, size) < 0) {
-- break;
-+ if (callback) {
-+ ret = callback(data, nr, str, start, size);
-+ if (ret < 0)
-+ break;
-+ else if (ret == 0)
-+ nr++;
- }
-- nr++;
- }
- }
-
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch
deleted file mode 100644
index 90c2f6e..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From d811875a41b4628040abaada3da29b7b9592e757 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 9 Jan 2016 17:16:16 -0800
-Subject: [PATCH] vmcore-dmesg: Define _GNU_SOURCE
-
-loff_t is guarded with _GNU_SOURCE on some C library implementations
-e.g. musl since this type is not defined by POSIX. Define _GNU_SOURCE to
-include this define, it should help compiling on musl while nothing
-changes for glibc based systems since there _GNU_SOURCE is already
-defined
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- vmcore-dmesg/vmcore-dmesg.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
-index 0364636..a8f56df 100644
---- a/vmcore-dmesg/vmcore-dmesg.c
-+++ b/vmcore-dmesg/vmcore-dmesg.c
-@@ -1,4 +1,5 @@
- #define _XOPEN_SOURCE 600
-+#define _GNU_SOURCE
- #define _LARGEFILE_SOURCE 1
- #define _FILE_OFFSET_BITS 64
- #include <endian.h>
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-x86-x86_64-Fix-format-warning-with-die.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-x86-x86_64-Fix-format-warning-with-die.patch
deleted file mode 100644
index e601f52..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-x86-x86_64-Fix-format-warning-with-die.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
-
-From 1550f81bf1886aa0520da0b6181cd61c1a75d4ad Mon Sep 17 00:00:00 2001
-From: Pratyush Anand <panand@redhat.com>
-Date: Tue, 14 Mar 2017 17:59:22 +0530
-Subject: [PATCH 1/2] x86/x86_64: Fix format warning with die()
-
-Fedora koji uses gcc version 7.0.1-0.12.fc27, and it generates a build
-warning
-
- kexec/arch/i386/kexec-elf-x86.c:299:3: error: format not a string
- literal and no format arguments [-Werror=format-security]
- die(error_msg);
- ^~~
- cc1: some warnings being treated as errors
-
-error_msg can have a format specifier as well in string. In such cases,
-if there is no other arguments for the format variable then code will
-try to access a non existing argument. Therefore, use 1st argument as
-format specifier for string print and pass error_msg as the string to be
-printed.
-
-While doing that,also use const qualifier before "char *error_msg".
-
-Signed-off-by: Pratyush Anand <panand@redhat.com>
-Signed-off-by: Simon Horman <horms@verge.net.au>
----
- kexec/arch/i386/kexec-elf-x86.c | 4 ++--
- kexec/arch/x86_64/kexec-elf-x86_64.c | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/kexec/arch/i386/kexec-elf-x86.c b/kexec/arch/i386/kexec-elf-x86.c
-index de00dcb..fedf031 100644
---- a/kexec/arch/i386/kexec-elf-x86.c
-+++ b/kexec/arch/i386/kexec-elf-x86.c
-@@ -91,7 +91,7 @@ int elf_x86_load(int argc, char **argv, const char *buf, off_t len,
- char *command_line = NULL, *modified_cmdline = NULL;
- const char *append = NULL;
- char *tmp_cmdline = NULL;
-- char *error_msg = NULL;
-+ const char *error_msg = NULL;
- int result;
- int command_line_len;
- const char *ramdisk;
-@@ -296,6 +296,6 @@ out:
- free(command_line);
- free(modified_cmdline);
- if (error_msg)
-- die(error_msg);
-+ die("%s", error_msg);
- return result;
- }
-diff --git a/kexec/arch/x86_64/kexec-elf-x86_64.c b/kexec/arch/x86_64/kexec-elf-x86_64.c
-index ae65692..ad22311 100644
---- a/kexec/arch/x86_64/kexec-elf-x86_64.c
-+++ b/kexec/arch/x86_64/kexec-elf-x86_64.c
-@@ -99,7 +99,7 @@ int elf_x86_64_load(int argc, char **argv, const char *buf, off_t len,
- #define ARG_STYLE_NONE 2
- int opt;
- int result = 0;
-- char *error_msg = NULL;
-+ const char *error_msg = NULL;
-
- /* See options.h and add any new options there too! */
- static const struct option options[] = {
-@@ -276,6 +276,6 @@ out:
- free(command_line);
- free(modified_cmdline);
- if (error_msg)
-- die(error_msg);
-+ die("%s", error_msg);
- return result;
- }
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch
deleted file mode 100644
index 953f13b..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-From d29f37bb6e9114aba96c606103b110f511bee9a1 Mon Sep 17 00:00:00 2001
-From: Pratyush Anand <panand@redhat.com>
-Date: Wed, 2 Nov 2016 15:05:25 +0530
-Subject: [PATCH 2/9] kexec: generalize and rename get_kernel_stext_sym()
-
-get_kernel_stext_sym() has been defined for both arm and i386. Other
-architecture might need some other kernel symbol address. Therefore rewrite
-this function as generic function to get any kernel symbol address.
-
-More over, kallsyms is not arch specific representation, therefore have
-common function for all arches.
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: Pratyush Anand <panand@redhat.com>
-[created symbols.c]
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/Makefile | 1 +
- kexec/arch/arm/crashdump-arm.c | 40 +---------------------------------------
- kexec/arch/i386/crashdump-x86.c | 29 -----------------------------
- kexec/kexec.h | 2 ++
- kexec/symbols.c | 41 +++++++++++++++++++++++++++++++++++++++++
- 5 files changed, 45 insertions(+), 68 deletions(-)
- create mode 100644 kexec/symbols.c
-
-diff --git a/kexec/Makefile b/kexec/Makefile
-index 39f365f..2b4fb3d 100644
---- a/kexec/Makefile
-+++ b/kexec/Makefile
-@@ -26,6 +26,7 @@ KEXEC_SRCS_base += kexec/kernel_version.c
- KEXEC_SRCS_base += kexec/lzma.c
- KEXEC_SRCS_base += kexec/zlib.c
- KEXEC_SRCS_base += kexec/kexec-xen.c
-+KEXEC_SRCS_base += kexec/symbols.c
-
- KEXEC_GENERATED_SRCS += $(PURGATORY_HEX_C)
-
-diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c
-index 4a89b5e..245c21a 100644
---- a/kexec/arch/arm/crashdump-arm.c
-+++ b/kexec/arch/arm/crashdump-arm.c
-@@ -73,48 +73,10 @@ static struct crash_elf_info elf_info = {
-
- extern unsigned long long user_page_offset;
-
--/* Retrieve kernel _stext symbol virtual address from /proc/kallsyms */
--static unsigned long long get_kernel_stext_sym(void)
--{
-- const char *kallsyms = "/proc/kallsyms";
-- const char *stext = "_stext";
-- char sym[128];
-- char line[128];
-- FILE *fp;
-- unsigned long long vaddr = 0;
-- char type;
--
-- fp = fopen(kallsyms, "r");
-- if (!fp) {
-- fprintf(stderr, "Cannot open %s\n", kallsyms);
-- return 0;
-- }
--
-- while(fgets(line, sizeof(line), fp) != NULL) {
-- unsigned long long addr;
--
-- if (sscanf(line, "%Lx %c %s", &addr, &type, sym) != 3)
-- continue;
--
-- if (strcmp(sym, stext) == 0) {
-- dbgprintf("kernel symbol %s vaddr = %#llx\n", stext, addr);
-- vaddr = addr;
-- break;
-- }
-- }
--
-- fclose(fp);
--
-- if (vaddr == 0)
-- fprintf(stderr, "Cannot get kernel %s symbol address\n", stext);
--
-- return vaddr;
--}
--
- static int get_kernel_page_offset(struct kexec_info *info,
- struct crash_elf_info *elf_info)
- {
-- unsigned long long stext_sym_addr = get_kernel_stext_sym();
-+ unsigned long long stext_sym_addr = get_kernel_sym("_stext");
- if (stext_sym_addr == 0) {
- if (user_page_offset != (-1ULL)) {
- elf_info->page_offset = user_page_offset;
-diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
-index ab833d4..abf82a5 100644
---- a/kexec/arch/i386/crashdump-x86.c
-+++ b/kexec/arch/i386/crashdump-x86.c
-@@ -102,35 +102,6 @@ static int get_kernel_paddr(struct kexec_info *UNUSED(info),
- return -1;
- }
-
--/* Retrieve kernel symbol virtual address from /proc/kallsyms */
--static unsigned long long get_kernel_sym(const char *symbol)
--{
-- const char *kallsyms = "/proc/kallsyms";
-- char sym[128];
-- char line[128];
-- FILE *fp;
-- unsigned long long vaddr;
-- char type;
--
-- fp = fopen(kallsyms, "r");
-- if (!fp) {
-- fprintf(stderr, "Cannot open %s\n", kallsyms);
-- return 0;
-- }
--
-- while(fgets(line, sizeof(line), fp) != NULL) {
-- if (sscanf(line, "%Lx %c %s", &vaddr, &type, sym) != 3)
-- continue;
-- if (strcmp(sym, symbol) == 0) {
-- dbgprintf("kernel symbol %s vaddr = %16llx\n", symbol, vaddr);
-- return vaddr;
-- }
-- }
--
-- fprintf(stderr, "Cannot get kernel %s symbol address\n", symbol);
-- return 0;
--}
--
- /* Retrieve info regarding virtual address kernel has been compiled for and
- * size of the kernel from /proc/kcore. Current /proc/kcore parsing from
- * from kexec-tools fails because of malformed elf notes. A kernel patch has
-diff --git a/kexec/kexec.h b/kexec/kexec.h
-index 9194f1c..b4fafad 100644
---- a/kexec/kexec.h
-+++ b/kexec/kexec.h
-@@ -312,4 +312,6 @@ int xen_kexec_load(struct kexec_info *info);
- int xen_kexec_unload(uint64_t kexec_flags);
- void xen_kexec_exec(void);
-
-+extern unsigned long long get_kernel_sym(const char *text);
-+
- #endif /* KEXEC_H */
-diff --git a/kexec/symbols.c b/kexec/symbols.c
-new file mode 100644
-index 0000000..ea6e327
---- /dev/null
-+++ b/kexec/symbols.c
-@@ -0,0 +1,41 @@
-+#include <stdio.h>
-+#include <string.h>
-+#include "kexec.h"
-+
-+/* Retrieve kernel symbol virtual address from /proc/kallsyms */
-+unsigned long long get_kernel_sym(const char *text)
-+{
-+ const char *kallsyms = "/proc/kallsyms";
-+ char sym[128];
-+ char line[128];
-+ FILE *fp;
-+ unsigned long long vaddr = 0;
-+ char type;
-+
-+ fp = fopen(kallsyms, "r");
-+ if (!fp) {
-+ fprintf(stderr, "Cannot open %s\n", kallsyms);
-+ return 0;
-+ }
-+
-+ while (fgets(line, sizeof(line), fp) != NULL) {
-+ unsigned long long addr;
-+
-+ if (sscanf(line, "%Lx %c %s", &addr, &type, sym) != 3)
-+ continue;
-+
-+ if (strcmp(sym, text) == 0) {
-+ dbgprintf("kernel symbol %s vaddr = %#llx\n",
-+ text, addr);
-+ vaddr = addr;
-+ break;
-+ }
-+ }
-+
-+ fclose(fp);
-+
-+ if (vaddr == 0)
-+ fprintf(stderr, "Cannot get kernel %s symbol address\n", text);
-+
-+ return vaddr;
-+}
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-ppc-Fix-format-warning-with-die.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-ppc-Fix-format-warning-with-die.patch
deleted file mode 100644
index 6a1c06d..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-ppc-Fix-format-warning-with-die.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 1c956fc8c6b6324d8d38bba5f9e60a018051c6f5 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Thu, 16 Mar 2017 15:39:06 +0200
-Subject: [PATCH 2/2] ppc: Fix format warning with die()
-
-Enable compiling kexec-tools for ppc with -Werror=format-security.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Submitted [Mailing list]
----
- kexec/arch/ppc/kexec-elf-ppc.c | 2 +-
- kexec/arch/ppc/kexec-uImage-ppc.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/kexec/arch/ppc/kexec-elf-ppc.c b/kexec/arch/ppc/kexec-elf-ppc.c
-index 291f06d..ad43ad1 100644
---- a/kexec/arch/ppc/kexec-elf-ppc.c
-+++ b/kexec/arch/ppc/kexec-elf-ppc.c
-@@ -453,7 +453,7 @@ out:
- if (!tmp_cmdline)
- free(command_line);
- if (error_msg)
-- die(error_msg);
-+ die("%s", error_msg);
-
- return result;
- }
-diff --git a/kexec/arch/ppc/kexec-uImage-ppc.c b/kexec/arch/ppc/kexec-uImage-ppc.c
-index 5eec6e4..e8f7adc 100644
---- a/kexec/arch/ppc/kexec-uImage-ppc.c
-+++ b/kexec/arch/ppc/kexec-uImage-ppc.c
-@@ -306,7 +306,7 @@ out:
- if (!tmp_cmdline)
- free(command_line);
- if (error_msg)
-- die(error_msg);
-+ die("%s", error_msg);
- return ret;
- }
-
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch
deleted file mode 100644
index 1a1c317..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 16df170ad4808d12acd5e919ac4f6e7f33a247b3 Mon Sep 17 00:00:00 2001
-From: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Date: Thu, 1 Sep 2016 10:57:42 +0900
-Subject: [PATCH 3/9] arm64: identify PHYS_OFFSET correctly
-
-Due to the kernel patch, commit e7cd190385d1 ("arm64: mark reserved
-memblock regions explicitly in iomem"), the current code will not be able
-to identify the correct value of PHYS_OFFSET if some "reserved" memory
-region, which is likely to be UEFI runtime services code/data, exists at
-an address below the first "System RAM" regions.
-
-This patch fixes this issue.
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/arch/arm64/iomem.h | 7 +++++++
- kexec/arch/arm64/kexec-arm64.c | 12 ++++++++++--
- 2 files changed, 17 insertions(+), 2 deletions(-)
- create mode 100644 kexec/arch/arm64/iomem.h
-
-diff --git a/kexec/arch/arm64/iomem.h b/kexec/arch/arm64/iomem.h
-new file mode 100644
-index 0000000..7fd66eb
---- /dev/null
-+++ b/kexec/arch/arm64/iomem.h
-@@ -0,0 +1,7 @@
-+#ifndef IOMEM_H
-+#define IOMEM_H
-+
-+#define SYSTEM_RAM "System RAM\n"
-+#define IOMEM_RESERVED "reserved\n"
-+
-+#endif
-diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c
-index 2e8839a..8ac811d 100644
---- a/kexec/arch/arm64/kexec-arm64.c
-+++ b/kexec/arch/arm64/kexec-arm64.c
-@@ -21,6 +21,7 @@
- #include "crashdump-arm64.h"
- #include "dt-ops.h"
- #include "fs2dt.h"
-+#include "iomem.h"
- #include "kexec-syscall.h"
- #include "arch/options.h"
-
-@@ -475,7 +476,14 @@ static int get_memory_ranges_iomem_cb(void *data, int nr, char *str,
- return -1;
-
- r = (struct memory_range *)data + nr;
-- r->type = RANGE_RAM;
-+
-+ if (!strncmp(str, SYSTEM_RAM, strlen(SYSTEM_RAM)))
-+ r->type = RANGE_RAM;
-+ else if (!strncmp(str, IOMEM_RESERVED, strlen(IOMEM_RESERVED)))
-+ r->type = RANGE_RESERVED;
-+ else
-+ return 1;
-+
- r->start = base;
- r->end = base + length - 1;
-
-@@ -494,7 +502,7 @@ static int get_memory_ranges_iomem_cb(void *data, int nr, char *str,
- static int get_memory_ranges_iomem(struct memory_range *array,
- unsigned int *count)
- {
-- *count = kexec_iomem_for_each_line("System RAM\n",
-+ *count = kexec_iomem_for_each_line(NULL,
- get_memory_ranges_iomem_cb, array);
-
- if (!*count) {
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch
deleted file mode 100644
index 66600f3..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch
+++ /dev/null
@@ -1,202 +0,0 @@
-From 48a4c7874d8264ddbfaec2e9858d7866a2d2eb60 Mon Sep 17 00:00:00 2001
-From: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Date: Wed, 5 Aug 2015 13:16:30 +0900
-Subject: [PATCH 4/9] arm64: kdump: identify memory regions
-
-The following regions need to be identified for later use:
- a) memory regions which belong to the 1st kernel
- b) usable memory reserved for crash dump kernel
-
-We go through /proc/iomem to find out a) and b) which are marked
-as "System RAM" and "Crash kernel", respectively.
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/arch/arm64/Makefile | 2 +
- kexec/arch/arm64/crashdump-arm64.c | 100 ++++++++++++++++++++++++++++++++++++-
- kexec/arch/arm64/crashdump-arm64.h | 14 +++++-
- kexec/arch/arm64/iomem.h | 1 +
- 4 files changed, 114 insertions(+), 3 deletions(-)
-
-diff --git a/kexec/arch/arm64/Makefile b/kexec/arch/arm64/Makefile
-index 74b677f..2d4ae0e 100644
---- a/kexec/arch/arm64/Makefile
-+++ b/kexec/arch/arm64/Makefile
-@@ -6,6 +6,8 @@ arm64_FS2DT_INCLUDE += \
-
- arm64_DT_OPS += kexec/dt-ops.c
-
-+arm64_MEM_REGIONS = kexec/mem_regions.c
-+
- arm64_CPPFLAGS += -I $(srcdir)/kexec/
-
- arm64_KEXEC_SRCS += \
-diff --git a/kexec/arch/arm64/crashdump-arm64.c b/kexec/arch/arm64/crashdump-arm64.c
-index d2272c8..dcaca43 100644
---- a/kexec/arch/arm64/crashdump-arm64.c
-+++ b/kexec/arch/arm64/crashdump-arm64.c
-@@ -1,5 +1,13 @@
- /*
- * ARM64 crashdump.
-+ * partly derived from arm implementation
-+ *
-+ * Copyright (c) 2014-2016 Linaro Limited
-+ * Author: AKASHI Takahiro <takahiro.akashi@linaro.org>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
- */
-
- #define _GNU_SOURCE
-@@ -10,12 +18,102 @@
- #include "kexec.h"
- #include "crashdump.h"
- #include "crashdump-arm64.h"
-+#include "iomem.h"
- #include "kexec-arm64.h"
- #include "kexec-elf.h"
-+#include "mem_regions.h"
-
--struct memory_ranges usablemem_rgns = {};
-+/* memory ranges on crashed kernel */
-+static struct memory_range crash_memory_ranges[CRASH_MAX_MEMORY_RANGES];
-+static struct memory_ranges crash_memory_rgns = {
-+ .size = 0,
-+ .max_size = CRASH_MAX_MEMORY_RANGES,
-+ .ranges = crash_memory_ranges,
-+};
-+
-+/* memory range reserved for crashkernel */
-+struct memory_range crash_reserved_mem;
-+struct memory_ranges usablemem_rgns = {
-+ .size = 0,
-+ .max_size = 1,
-+ .ranges = &crash_reserved_mem,
-+};
-+
-+/*
-+ * iomem_range_callback() - callback called for each iomem region
-+ * @data: not used
-+ * @nr: not used
-+ * @str: name of the memory region
-+ * @base: start address of the memory region
-+ * @length: size of the memory region
-+ *
-+ * This function is called once for each memory region found in /proc/iomem.
-+ * It locates system RAM and crashkernel reserved memory and places these to
-+ * variables, respectively, crash_memory_ranges and crash_reserved_mem.
-+ */
-+
-+static int iomem_range_callback(void *UNUSED(data), int UNUSED(nr),
-+ char *str, unsigned long long base,
-+ unsigned long long length)
-+{
-+ if (strncmp(str, CRASH_KERNEL, strlen(CRASH_KERNEL)) == 0)
-+ return mem_regions_add(&usablemem_rgns,
-+ base, length, RANGE_RAM);
-+ else if (strncmp(str, SYSTEM_RAM, strlen(SYSTEM_RAM)) == 0)
-+ return mem_regions_add(&crash_memory_rgns,
-+ base, length, RANGE_RAM);
-+
-+ return 0;
-+}
-
- int is_crashkernel_mem_reserved(void)
- {
-+ if (!crash_reserved_mem.end)
-+ kexec_iomem_for_each_line(NULL, iomem_range_callback, NULL);
-+
-+ return crash_reserved_mem.start != crash_reserved_mem.end;
-+}
-+
-+/*
-+ * crash_get_memory_ranges() - read system physical memory
-+ *
-+ * Function reads through system physical memory and stores found memory
-+ * regions in crash_memory_ranges.
-+ * Regions are sorted in ascending order.
-+ *
-+ * Returns 0 in case of success and -1 otherwise (errno is set).
-+ */
-+static int crash_get_memory_ranges(void)
-+{
-+ /*
-+ * First read all memory regions that can be considered as
-+ * system memory including the crash area.
-+ */
-+ if (!usablemem_rgns.size)
-+ kexec_iomem_for_each_line(NULL, iomem_range_callback, NULL);
-+
-+ /* allow only a single region for crash dump kernel */
-+ if (usablemem_rgns.size != 1) {
-+ errno = EINVAL;
-+ return -1;
-+ }
-+
-+ dbgprint_mem_range("Reserved memory range", &crash_reserved_mem, 1);
-+
-+ if (mem_regions_exclude(&crash_memory_rgns, &crash_reserved_mem)) {
-+ fprintf(stderr,
-+ "Error: Number of crash memory ranges excedeed the max limit\n");
-+ errno = ENOMEM;
-+ return -1;
-+ }
-+
-+ /*
-+ * Make sure that the memory regions are sorted.
-+ */
-+ mem_regions_sort(&crash_memory_rgns);
-+
-+ dbgprint_mem_range("Coredump memory ranges",
-+ crash_memory_rgns.ranges, crash_memory_rgns.size);
-+
- return 0;
- }
-diff --git a/kexec/arch/arm64/crashdump-arm64.h b/kexec/arch/arm64/crashdump-arm64.h
-index f33c7a2..07a0ed0 100644
---- a/kexec/arch/arm64/crashdump-arm64.h
-+++ b/kexec/arch/arm64/crashdump-arm64.h
-@@ -1,12 +1,22 @@
- /*
- * ARM64 crashdump.
-+ *
-+ * Copyright (c) 2014-2016 Linaro Limited
-+ * Author: AKASHI Takahiro <takahiro.akashi@linaro.org>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
- */
-
--#if !defined(CRASHDUMP_ARM64_H)
-+#ifndef CRASHDUMP_ARM64_H
- #define CRASHDUMP_ARM64_H
-
- #include "kexec.h"
-
-+#define CRASH_MAX_MEMORY_RANGES 32
-+
- extern struct memory_ranges usablemem_rgns;
-+extern struct memory_range crash_reserved_mem;
-
--#endif
-+#endif /* CRASHDUMP_ARM64_H */
-diff --git a/kexec/arch/arm64/iomem.h b/kexec/arch/arm64/iomem.h
-index 7fd66eb..20cda87 100644
---- a/kexec/arch/arm64/iomem.h
-+++ b/kexec/arch/arm64/iomem.h
-@@ -2,6 +2,7 @@
- #define IOMEM_H
-
- #define SYSTEM_RAM "System RAM\n"
-+#define CRASH_KERNEL "Crash kernel\n"
- #define IOMEM_RESERVED "reserved\n"
-
- #endif
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch
deleted file mode 100644
index fe535b6..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch
+++ /dev/null
@@ -1,191 +0,0 @@
-From 769da25627cebb2a53caee5d5be78a32d376adc1 Mon Sep 17 00:00:00 2001
-From: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Date: Wed, 5 Aug 2015 13:45:15 +0900
-Subject: [PATCH 5/9] arm64: kdump: add elf core header segment
-
-Elf core header contains the information necessary for the coredump of
-the 1st kernel, including its physcal memory layout as well as cpu register
-states at the panic.
-The segment is allocated inside the reserved memory of crash dump kernel.
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/arch/arm64/crashdump-arm64.c | 96 ++++++++++++++++++++++++++++++++++++++
- kexec/arch/arm64/crashdump-arm64.h | 3 ++
- kexec/arch/arm64/iomem.h | 2 +
- kexec/arch/arm64/kexec-elf-arm64.c | 10 ++++
- 4 files changed, 111 insertions(+)
-
-diff --git a/kexec/arch/arm64/crashdump-arm64.c b/kexec/arch/arm64/crashdump-arm64.c
-index dcaca43..8346131 100644
---- a/kexec/arch/arm64/crashdump-arm64.c
-+++ b/kexec/arch/arm64/crashdump-arm64.c
-@@ -39,6 +39,39 @@ struct memory_ranges usablemem_rgns = {
- .ranges = &crash_reserved_mem,
- };
-
-+struct memory_range elfcorehdr_mem;
-+
-+static struct crash_elf_info elf_info = {
-+ .class = ELFCLASS64,
-+#if (__BYTE_ORDER == __LITTLE_ENDIAN)
-+ .data = ELFDATA2LSB,
-+#else
-+ .data = ELFDATA2MSB,
-+#endif
-+ .machine = EM_AARCH64,
-+};
-+
-+/*
-+ * Note: The returned value is correct only if !CONFIG_RANDOMIZE_BASE.
-+ */
-+static uint64_t get_kernel_page_offset(void)
-+{
-+ int i;
-+
-+ if (elf_info.kern_vaddr_start == UINT64_MAX)
-+ return UINT64_MAX;
-+
-+ /* Current max virtual memory range is 48-bits. */
-+ for (i = 48; i > 0; i--)
-+ if (!(elf_info.kern_vaddr_start & (1UL << i)))
-+ break;
-+
-+ if (i <= 0)
-+ return UINT64_MAX;
-+ else
-+ return UINT64_MAX << i;
-+}
-+
- /*
- * iomem_range_callback() - callback called for each iomem region
- * @data: not used
-@@ -62,6 +95,10 @@ static int iomem_range_callback(void *UNUSED(data), int UNUSED(nr),
- else if (strncmp(str, SYSTEM_RAM, strlen(SYSTEM_RAM)) == 0)
- return mem_regions_add(&crash_memory_rgns,
- base, length, RANGE_RAM);
-+ else if (strncmp(str, KERNEL_CODE, strlen(KERNEL_CODE)) == 0)
-+ elf_info.kern_paddr_start = base;
-+ else if (strncmp(str, KERNEL_DATA, strlen(KERNEL_DATA)) == 0)
-+ elf_info.kern_size = base + length - elf_info.kern_paddr_start;
-
- return 0;
- }
-@@ -115,5 +152,64 @@ static int crash_get_memory_ranges(void)
- dbgprint_mem_range("Coredump memory ranges",
- crash_memory_rgns.ranges, crash_memory_rgns.size);
-
-+ /*
-+ * For additional kernel code/data segment.
-+ * kern_paddr_start/kern_size are determined in iomem_range_callback
-+ */
-+ elf_info.kern_vaddr_start = get_kernel_sym("_text");
-+ if (!elf_info.kern_vaddr_start)
-+ elf_info.kern_vaddr_start = UINT64_MAX;
-+
-+ return 0;
-+}
-+
-+/*
-+ * load_crashdump_segments() - load the elf core header
-+ * @info: kexec info structure
-+ *
-+ * This function creates and loads an additional segment of elf core header
-+ : which is used to construct /proc/vmcore on crash dump kernel.
-+ *
-+ * Return 0 in case of success and -1 in case of error.
-+ */
-+
-+int load_crashdump_segments(struct kexec_info *info)
-+{
-+ unsigned long elfcorehdr;
-+ unsigned long bufsz;
-+ void *buf;
-+ int err;
-+
-+ /*
-+ * First fetch all the memory (RAM) ranges that we are going to
-+ * pass to the crash dump kernel during panic.
-+ */
-+
-+ err = crash_get_memory_ranges();
-+
-+ if (err)
-+ return err;
-+
-+ elf_info.page_offset = get_kernel_page_offset();
-+ dbgprintf("%s: page_offset: %016llx\n", __func__,
-+ elf_info.page_offset);
-+
-+ err = crash_create_elf64_headers(info, &elf_info,
-+ crash_memory_rgns.ranges, crash_memory_rgns.size,
-+ &buf, &bufsz, ELF_CORE_HEADER_ALIGN);
-+
-+ if (err)
-+ return err;
-+
-+ elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 0,
-+ crash_reserved_mem.start, crash_reserved_mem.end,
-+ -1, 0);
-+
-+ elfcorehdr_mem.start = elfcorehdr;
-+ elfcorehdr_mem.end = elfcorehdr + bufsz - 1;
-+
-+ dbgprintf("%s: elfcorehdr 0x%llx-0x%llx\n", __func__,
-+ elfcorehdr_mem.start, elfcorehdr_mem.end);
-+
- return 0;
- }
-diff --git a/kexec/arch/arm64/crashdump-arm64.h b/kexec/arch/arm64/crashdump-arm64.h
-index 07a0ed0..da75a2d 100644
---- a/kexec/arch/arm64/crashdump-arm64.h
-+++ b/kexec/arch/arm64/crashdump-arm64.h
-@@ -18,5 +18,8 @@
-
- extern struct memory_ranges usablemem_rgns;
- extern struct memory_range crash_reserved_mem;
-+extern struct memory_range elfcorehdr_mem;
-+
-+extern int load_crashdump_segments(struct kexec_info *info);
-
- #endif /* CRASHDUMP_ARM64_H */
-diff --git a/kexec/arch/arm64/iomem.h b/kexec/arch/arm64/iomem.h
-index 20cda87..d4864bb 100644
---- a/kexec/arch/arm64/iomem.h
-+++ b/kexec/arch/arm64/iomem.h
-@@ -2,6 +2,8 @@
- #define IOMEM_H
-
- #define SYSTEM_RAM "System RAM\n"
-+#define KERNEL_CODE "Kernel code\n"
-+#define KERNEL_DATA "Kernel data\n"
- #define CRASH_KERNEL "Crash kernel\n"
- #define IOMEM_RESERVED "reserved\n"
-
-diff --git a/kexec/arch/arm64/kexec-elf-arm64.c b/kexec/arch/arm64/kexec-elf-arm64.c
-index daf8bf0..c70a37a 100644
---- a/kexec/arch/arm64/kexec-elf-arm64.c
-+++ b/kexec/arch/arm64/kexec-elf-arm64.c
-@@ -119,6 +119,16 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf,
- dbgprintf("%s: PE format: %s\n", __func__,
- (arm64_header_check_pe_sig(header) ? "yes" : "no"));
-
-+ if (info->kexec_flags & KEXEC_ON_CRASH) {
-+ /* create and initialize elf core header segment */
-+ result = load_crashdump_segments(info);
-+ if (result) {
-+ dbgprintf("%s: Creating eflcorehdr failed.\n",
-+ __func__);
-+ goto exit;
-+ }
-+ }
-+
- /* load the kernel */
- result = elf_exec_load(&ehdr, info);
-
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch
deleted file mode 100644
index 4149551..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-From 4079c93ac5453ef5f7889ab64920c1e9427690ef Mon Sep 17 00:00:00 2001
-From: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Date: Tue, 17 Feb 2015 16:06:55 +0900
-Subject: [PATCH 6/9] arm64: kdump: set up kernel image segment
-
-On arm64, we can use the same kernel image as 1st kernel, but
-we have to modify the entry point as well as segments' addresses
-in the kernel's elf header in order to load them into correct places.
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/arch/arm64/crashdump-arm64.c | 23 +++++++++++++++++++++++
- kexec/arch/arm64/crashdump-arm64.h | 1 +
- kexec/arch/arm64/kexec-arm64.c | 25 ++++++++++++++++++++-----
- kexec/arch/arm64/kexec-elf-arm64.c | 10 +++++++++-
- 4 files changed, 53 insertions(+), 6 deletions(-)
-
-diff --git a/kexec/arch/arm64/crashdump-arm64.c b/kexec/arch/arm64/crashdump-arm64.c
-index 8346131..9517329 100644
---- a/kexec/arch/arm64/crashdump-arm64.c
-+++ b/kexec/arch/arm64/crashdump-arm64.c
-@@ -213,3 +213,26 @@ int load_crashdump_segments(struct kexec_info *info)
-
- return 0;
- }
-+
-+/*
-+ * e_entry and p_paddr are actually in virtual address space.
-+ * Those values will be translated to physcal addresses by
-+ * using virt_to_phys().
-+ * So let's get ready for later use so the memory base (phys_offset)
-+ * will be correctly replaced with crash_reserved_mem.start.
-+ */
-+void modify_ehdr_for_crashdump(struct mem_ehdr *ehdr)
-+{
-+ struct mem_phdr *phdr;
-+ int i;
-+
-+ ehdr->e_entry += - arm64_mem.phys_offset + crash_reserved_mem.start;
-+
-+ for (i = 0; i < ehdr->e_phnum; i++) {
-+ phdr = &ehdr->e_phdr[i];
-+ if (phdr->p_type != PT_LOAD)
-+ continue;
-+ phdr->p_paddr +=
-+ (-arm64_mem.phys_offset + crash_reserved_mem.start);
-+ }
-+}
-diff --git a/kexec/arch/arm64/crashdump-arm64.h b/kexec/arch/arm64/crashdump-arm64.h
-index da75a2d..382f571 100644
---- a/kexec/arch/arm64/crashdump-arm64.h
-+++ b/kexec/arch/arm64/crashdump-arm64.h
-@@ -21,5 +21,6 @@ extern struct memory_range crash_reserved_mem;
- extern struct memory_range elfcorehdr_mem;
-
- extern int load_crashdump_segments(struct kexec_info *info);
-+extern void modify_ehdr_for_crashdump(struct mem_ehdr *ehdr);
-
- #endif /* CRASHDUMP_ARM64_H */
-diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c
-index 8ac811d..cec4e41 100644
---- a/kexec/arch/arm64/kexec-arm64.c
-+++ b/kexec/arch/arm64/kexec-arm64.c
-@@ -307,12 +307,27 @@ unsigned long arm64_locate_kernel_segment(struct kexec_info *info)
- {
- unsigned long hole;
-
-- hole = locate_hole(info,
-- arm64_mem.text_offset + arm64_mem.image_size,
-- MiB(2), 0, ULONG_MAX, 1);
-+ if (info->kexec_flags & KEXEC_ON_CRASH) {
-+ unsigned long hole_end;
-+
-+ hole = (crash_reserved_mem.start < mem_min ?
-+ mem_min : crash_reserved_mem.start);
-+ hole = _ALIGN_UP(hole, MiB(2));
-+ hole_end = hole + arm64_mem.text_offset + arm64_mem.image_size;
-+
-+ if ((hole_end > mem_max) ||
-+ (hole_end > crash_reserved_mem.end)) {
-+ dbgprintf("%s: Crash kernel out of range\n", __func__);
-+ hole = ULONG_MAX;
-+ }
-+ } else {
-+ hole = locate_hole(info,
-+ arm64_mem.text_offset + arm64_mem.image_size,
-+ MiB(2), 0, ULONG_MAX, 1);
-
-- if (hole == ULONG_MAX)
-- dbgprintf("%s: locate_hole failed\n", __func__);
-+ if (hole == ULONG_MAX)
-+ dbgprintf("%s: locate_hole failed\n", __func__);
-+ }
-
- return hole;
- }
-diff --git a/kexec/arch/arm64/kexec-elf-arm64.c b/kexec/arch/arm64/kexec-elf-arm64.c
-index c70a37a..842ce21 100644
---- a/kexec/arch/arm64/kexec-elf-arm64.c
-+++ b/kexec/arch/arm64/kexec-elf-arm64.c
-@@ -9,6 +9,7 @@
- #include <stdlib.h>
- #include <linux/elf.h>
-
-+#include "crashdump-arm64.h"
- #include "kexec-arm64.h"
- #include "kexec-elf.h"
- #include "kexec-syscall.h"
-@@ -105,7 +106,8 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf,
- }
-
- arm64_mem.vp_offset = _ALIGN_DOWN(ehdr.e_entry, MiB(2));
-- arm64_mem.vp_offset -= kernel_segment - get_phys_offset();
-+ if (!(info->kexec_flags & KEXEC_ON_CRASH))
-+ arm64_mem.vp_offset -= kernel_segment - get_phys_offset();
-
- dbgprintf("%s: kernel_segment: %016lx\n", __func__, kernel_segment);
- dbgprintf("%s: text_offset: %016lx\n", __func__,
-@@ -127,6 +129,12 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf,
- __func__);
- goto exit;
- }
-+
-+ /*
-+ * offset addresses in order to fit vmlinux
-+ * (elf_exec) into crash kernel's memory
-+ */
-+ modify_ehdr_for_crashdump(&ehdr);
- }
-
- /* load the kernel */
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch
deleted file mode 100644
index 2745466..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 07ad14e12665221d754fde8e47c32ac18c24586a Mon Sep 17 00:00:00 2001
-From: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Date: Fri, 31 Jul 2015 20:01:39 +0900
-Subject: [PATCH 7/9] arm64: kdump: set up other segments
-
-We make sure that all the other segments, initrd and device-tree blob,
-also be loaded into the reserved memory of crash dump kernel.
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/arch/arm64/kexec-arm64.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c
-index cec4e41..78a0035 100644
---- a/kexec/arch/arm64/kexec-arm64.c
-+++ b/kexec/arch/arm64/kexec-arm64.c
-@@ -374,7 +374,10 @@ int arm64_load_other_segments(struct kexec_info *info,
- /* Put the other segments after the image. */
-
- hole_min = image_base + arm64_mem.image_size;
-- hole_max = ULONG_MAX;
-+ if (info->kexec_flags & KEXEC_ON_CRASH)
-+ hole_max = crash_reserved_mem.end;
-+ else
-+ hole_max = ULONG_MAX;
-
- if (arm64_opts.initrd) {
- initrd_buf = slurp_file(arm64_opts.initrd, &initrd_size);
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch
deleted file mode 100644
index 31c3d85..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-From 23bf7ac189cc3b87ceb9d1d3b69b5c4815354add Mon Sep 17 00:00:00 2001
-From: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Date: Wed, 27 Jan 2016 13:38:39 +0900
-Subject: [PATCH 8/9] arm64: kdump: add DT properties to crash dump kernel's
- dtb
-
-We pass the following properties to crash dump kernel:
-linux,elfcorehdr: elf core header segment,
- same as "elfcorehdr=" kernel parameter on other archs
-linux,usable-memory-range: usable memory reserved for crash dump kernel
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/arch/arm64/kexec-arm64.c | 76 +++++++++++++++++++++++++++++++++++---
- kexec/arch/arm64/kexec-elf-arm64.c | 5 ---
- 2 files changed, 71 insertions(+), 10 deletions(-)
-
-diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c
-index 78a0035..a8fb64f 100644
---- a/kexec/arch/arm64/kexec-arm64.c
-+++ b/kexec/arch/arm64/kexec-arm64.c
-@@ -128,9 +128,6 @@ int arch_process_options(int argc, char **argv)
- case OPT_INITRD:
- arm64_opts.initrd = optarg;
- break;
-- case OPT_PANIC:
-- die("load-panic (-p) not supported");
-- break;
- default:
- break; /* Ignore core and unknown options. */
- }
-@@ -285,8 +282,12 @@ on_success:
- * setup_2nd_dtb - Setup the 2nd stage kernel's dtb.
- */
-
--static int setup_2nd_dtb(struct dtb *dtb, char *command_line)
-+static int setup_2nd_dtb(struct dtb *dtb, char *command_line, int on_crash)
- {
-+ char *new_buf;
-+ int new_size;
-+ int nodeoffset;
-+ uint64_t range[2];
- int result;
-
- result = fdt_check_header(dtb->buf);
-@@ -298,8 +299,72 @@ static int setup_2nd_dtb(struct dtb *dtb, char *command_line)
-
- result = set_bootargs(dtb, command_line);
-
-+ /* remove those anyway */
-+ nodeoffset = fdt_path_offset(dtb->buf, "/chosen");
-+ fdt_delprop(dtb->buf, nodeoffset, "linux,crashkernel-base");
-+ fdt_delprop(dtb->buf, nodeoffset, "linux,crashkernel-size");
-+
-+ if (on_crash) {
-+ nodeoffset = fdt_path_offset(dtb->buf, "/chosen");
-+ fdt_delprop(dtb->buf, nodeoffset, "linux,elfcorehdr");
-+ fdt_delprop(dtb->buf, nodeoffset, "linux,usable-memory-range");
-+ new_size = fdt_totalsize(dtb->buf)
-+ + 2 * (sizeof(struct fdt_property)
-+ + FDT_TAGALIGN(sizeof(range)))
-+ + strlen("linux,elfcorehdr") + 1
-+ + strlen("linux,usable-memory-range") + 1;
-+
-+ new_buf = xmalloc(new_size);
-+ result = fdt_open_into(dtb->buf, new_buf, new_size);
-+ if (result) {
-+ dbgprintf("%s: fdt_open_into failed: %s\n", __func__,
-+ fdt_strerror(result));
-+ result = -ENOSPC;
-+ goto on_error;
-+ }
-+
-+ range[0] = cpu_to_be64(elfcorehdr_mem.start);
-+ range[1] = cpu_to_be64(elfcorehdr_mem.end
-+ - elfcorehdr_mem.start + 1);
-+ nodeoffset = fdt_path_offset(new_buf, "/chosen");
-+ result = fdt_setprop(new_buf, nodeoffset, "linux,elfcorehdr",
-+ (void *)range, sizeof(range));
-+ if (result) {
-+ dbgprintf("%s: fdt_setprop failed: %s\n", __func__,
-+ fdt_strerror(result));
-+ result = -EINVAL;
-+ goto on_error;
-+ }
-+
-+ range[0] = cpu_to_be64(crash_reserved_mem.start);
-+ range[1] = cpu_to_be64(crash_reserved_mem.end
-+ - crash_reserved_mem.start + 1);
-+ nodeoffset = fdt_path_offset(new_buf, "/chosen");
-+ result = fdt_setprop(new_buf, nodeoffset,
-+ "linux,usable-memory-range",
-+ (void *)range, sizeof(range));
-+ if (result) {
-+ dbgprintf("%s: fdt_setprop failed: %s\n", __func__,
-+ fdt_strerror(result));
-+ result = -EINVAL;
-+ goto on_error;
-+ }
-+
-+ fdt_pack(new_buf);
-+ dtb->buf = new_buf;
-+ dtb->size = fdt_totalsize(new_buf);
-+ }
-+
- dump_reservemap(dtb);
-
-+
-+ return result;
-+
-+on_error:
-+ fprintf(stderr, "kexec: %s failed.\n", __func__);
-+ if (new_buf)
-+ free(new_buf);
-+
- return result;
- }
-
-@@ -366,7 +431,8 @@ int arm64_load_other_segments(struct kexec_info *info,
- }
- }
-
-- result = setup_2nd_dtb(&dtb, command_line);
-+ result = setup_2nd_dtb(&dtb, command_line,
-+ info->kexec_flags & KEXEC_ON_CRASH);
-
- if (result)
- return -EFAILED;
-diff --git a/kexec/arch/arm64/kexec-elf-arm64.c b/kexec/arch/arm64/kexec-elf-arm64.c
-index 842ce21..b17a31a 100644
---- a/kexec/arch/arm64/kexec-elf-arm64.c
-+++ b/kexec/arch/arm64/kexec-elf-arm64.c
-@@ -47,11 +47,6 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf,
- int result;
- int i;
-
-- if (info->kexec_flags & KEXEC_ON_CRASH) {
-- fprintf(stderr, "kexec: kdump not yet supported on arm64\n");
-- return -EFAILED;
-- }
--
- result = build_elf_exec_info(kernel_buf, kernel_size, &ehdr, 0);
-
- if (result < 0) {
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch
deleted file mode 100644
index 8b1c018..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 5a4958f01a793c3e7f440f5bae75666a4349cc50 Mon Sep 17 00:00:00 2001
-From: Pratyush Anand <panand@redhat.com>
-Date: Thu, 14 May 2015 11:25:37 +0530
-Subject: [PATCH 9/9] arm64: kdump: Add support for binary image files
-
-This patch adds support to use binary image ie arch/arm64/boot/Image with
-kdump.
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: Pratyush Anand <panand@redhat.com>
-[takahiro.akashi@linaro.org: a bit reworked]
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/arch/arm64/kexec-image-arm64.c | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/kexec/arch/arm64/kexec-image-arm64.c b/kexec/arch/arm64/kexec-image-arm64.c
-index 960ed96..982e431 100644
---- a/kexec/arch/arm64/kexec-image-arm64.c
-+++ b/kexec/arch/arm64/kexec-image-arm64.c
-@@ -4,7 +4,9 @@
-
- #define _GNU_SOURCE
-
-+#include "crashdump-arm64.h"
- #include "kexec-arm64.h"
-+#include "kexec-syscall.h"
- #include <limits.h>
-
- int image_arm64_probe(const char *kernel_buf, off_t kernel_size)
-@@ -58,6 +60,16 @@ int image_arm64_load(int argc, char **argv, const char *kernel_buf,
- dbgprintf("%s: PE format: %s\n", __func__,
- (arm64_header_check_pe_sig(header) ? "yes" : "no"));
-
-+ if (info->kexec_flags & KEXEC_ON_CRASH) {
-+ /* create and initialize elf core header segment */
-+ result = load_crashdump_segments(info);
-+ if (result) {
-+ dbgprintf("%s: Creating eflcorehdr failed.\n",
-+ __func__);
-+ goto exit;
-+ }
-+ }
-+
- /* load the kernel */
- add_segment_phys_virt(info, kernel_buf, kernel_size,
- kernel_segment + arm64_mem.text_offset,
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
deleted file mode 100644
index b03f582..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
+++ /dev/null
@@ -1,801 +0,0 @@
-From: Geoff Levand <geoff@infradead.org>
-Date: Mon, 15 Jul 2013 23:32:36 +0000 (-0700)
-Subject: Add arm64 support
-X-Git-Url: https://git.linaro.org/gitweb?p=people%2Fgeoff%2Fkexec-tools.git;a=commitdiff_plain;h=fbf5ac6c2c70ec0f6da2b9ff563e573999752c01
-
-Add arm64 support
-
-Signed-off-by: Geoff Levand <geoff@infradead.org>
-
-Get patch from:
-https://fedorapeople.org/~hrw/aarch64/for-fedora/kexec-aarch64.patch
-
-Upstream-Status: Pending
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-
----
- configure.ac | 3
- kexec/Makefile | 1
- kexec/arch/arm64/Makefile | 13 +
- kexec/arch/arm64/crashdump-arm64.c | 305 ++++++++++++++++++++++++++++++++
- kexec/arch/arm64/include/arch/options.h | 26 ++
- kexec/arch/arm64/kexec-arm64.c | 177 ++++++++++++++++++
- kexec/arch/arm64/kexec-arm64.h | 20 ++
- kexec/arch/arm64/kexec-elf-arm64.c | 114 +++++++++++
- kexec/kexec-syscall.h | 9
- kexec/kexec.c | 2
- purgatory/arch/arm64/Makefile | 7
- 11 files changed, 675 insertions(+), 2 deletions(-)
-
-Index: kexec-tools-2.0.10/configure.ac
-===================================================================
---- kexec-tools-2.0.10.orig/configure.ac
-+++ kexec-tools-2.0.10/configure.ac
-@@ -36,6 +36,9 @@ case $target_cpu in
- ARCH="ppc64"
- SUBARCH="LE"
- ;;
-+ aarch64* )
-+ ARCH="arm64"
-+ ;;
- arm* )
- ARCH="arm"
- ;;
-Index: kexec-tools-2.0.10/kexec/Makefile
-===================================================================
---- kexec-tools-2.0.10.orig/kexec/Makefile
-+++ kexec-tools-2.0.10/kexec/Makefile
-@@ -71,6 +71,7 @@ KEXEC_SRCS += $($(ARCH)_FS2DT)
-
- include $(srcdir)/kexec/arch/alpha/Makefile
- include $(srcdir)/kexec/arch/arm/Makefile
-+include $(srcdir)/kexec/arch/arm64/Makefile
- include $(srcdir)/kexec/arch/i386/Makefile
- include $(srcdir)/kexec/arch/ia64/Makefile
- include $(srcdir)/kexec/arch/m68k/Makefile
-Index: kexec-tools-2.0.10/kexec/arch/arm64/Makefile
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/Makefile
-@@ -0,0 +1,13 @@
-+
-+arm64_KEXEC_SRCS += \
-+ kexec/arch/arm64/kexec-arm64.c \
-+ kexec/arch/arm64/kexec-elf-arm64.c \
-+ kexec/arch/arm64/crashdump-arm64.c
-+
-+arm64_ARCH_REUSE_INITRD =
-+arm64_ADD_SEGMENT =
-+arm64_VIRT_TO_PHYS =
-+
-+dist += $(arm64_KEXEC_SRCS) \
-+ kexec/arch/arm64/Makefile \
-+ kexec/arch/arm64/kexec-arm64.h
-Index: kexec-tools-2.0.10/kexec/arch/arm64/crashdump-arm64.c
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/crashdump-arm64.c
-@@ -0,0 +1,305 @@
-+/*
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation (version 2 of the License).
-+ */
-+
-+#include "../../kexec.h"
-+#include "../../kexec-elf.h"
-+#include "../../crashdump.h"
-+
-+int is_crashkernel_mem_reserved(void)
-+{
-+ return 0;
-+}
-+
-+#if 0
-+/*
-+ * Used to save various memory ranges/regions needed for the captured
-+ * kernel to boot. (lime memmap= option in other archs)
-+ */
-+static struct memory_range crash_memory_ranges[CRASH_MAX_MEMORY_RANGES];
-+struct memory_ranges usablemem_rgns = {
-+ .size = 0,
-+ .ranges = crash_memory_ranges,
-+};
-+
-+/* memory range reserved for crashkernel */
-+static struct memory_range crash_reserved_mem;
-+
-+static struct crash_elf_info elf_info = {
-+ .class = ELFCLASS32,
-+ .data = ELFDATA2LSB,
-+ .machine = EM_ARM,
-+ .page_offset = PAGE_OFFSET,
-+};
-+
-+unsigned long phys_offset;
-+
-+/**
-+ * crash_range_callback() - callback called for each iomem region
-+ * @data: not used
-+ * @nr: not used
-+ * @str: name of the memory region
-+ * @base: start address of the memory region
-+ * @length: size of the memory region
-+ *
-+ * This function is called once for each memory region found in /proc/iomem. It
-+ * locates system RAM and crashkernel reserved memory and places these to
-+ * variables: @crash_memory_ranges and @crash_reserved_mem. Number of memory
-+ * regions is placed in @crash_memory_nr_ranges.
-+ */
-+static int crash_range_callback(void *UNUSED(data), int UNUSED(nr),
-+ char *str, unsigned long base,
-+ unsigned long length)
-+{
-+ struct memory_range *range;
-+
-+ if (usablemem_rgns.size >= CRASH_MAX_MEMORY_RANGES)
-+ return 1;
-+
-+ range = usablemem_rgns.ranges + usablemem_rgns.size;
-+
-+ if (strncmp(str, "System RAM\n", 11) == 0) {
-+ range->start = base;
-+ range->end = base + length - 1;
-+ range->type = RANGE_RAM;
-+ usablemem_rgns.size++;
-+ } else if (strncmp(str, "Crash kernel\n", 13) == 0) {
-+ crash_reserved_mem.start = base;
-+ crash_reserved_mem.end = base + length - 1;
-+ crash_reserved_mem.type = RANGE_RAM;
-+ }
-+
-+ return 0;
-+}
-+
-+/**
-+ * crash_exclude_range() - excludes memory region reserved for crashkernel
-+ *
-+ * Function locates where crashkernel reserved memory is and removes that region
-+ * from the available memory regions.
-+ */
-+static void crash_exclude_range(void)
-+{
-+ const struct memory_range *range = &crash_reserved_mem;
-+ int i;
-+
-+ for (i = 0; i < usablemem_rgns.size; i++) {
-+ struct memory_range *r = usablemem_rgns.ranges + i;
-+
-+ /*
-+ * We assume that crash area is fully contained in
-+ * some larger memory area.
-+ */
-+ if (r->start <= range->start && r->end >= range->end) {
-+ struct memory_range *new;
-+ /*
-+ * Let's split this area into 2 smaller ones and
-+ * remove excluded range from between. First create
-+ * new entry for the remaining area.
-+ */
-+ new = usablemem_rgns.ranges + usablemem_rgns.size;
-+ new->start = range->end + 1;
-+ new->end = r->end;
-+ usablemem_rgns.size++;
-+ /*
-+ * Next update this area to end before excluded range.
-+ */
-+ r->end = range->start - 1;
-+ break;
-+ }
-+ }
-+}
-+
-+static int range_cmp(const void *a1, const void *a2)
-+{
-+ const struct memory_range *r1 = a1;
-+ const struct memory_range *r2 = a2;
-+
-+ if (r1->start > r2->start)
-+ return 1;
-+ if (r1->start < r2->start)
-+ return -1;
-+
-+ return 0;
-+}
-+
-+/**
-+ * crash_get_memory_ranges() - read system physical memory
-+ *
-+ * Function reads through system physical memory and stores found memory regions
-+ * in @crash_memory_ranges. Number of memory regions found is placed in
-+ * @crash_memory_nr_ranges. Regions are sorted in ascending order.
-+ *
-+ * Returns %0 in case of success and %-1 otherwise (errno is set).
-+ */
-+static int crash_get_memory_ranges(void)
-+{
-+ /*
-+ * First read all memory regions that can be considered as
-+ * system memory including the crash area.
-+ */
-+ kexec_iomem_for_each_line(NULL, crash_range_callback, NULL);
-+
-+ if (usablemem_rgns.size < 1) {
-+ errno = EINVAL;
-+ return -1;
-+ }
-+
-+ /*
-+ * Exclude memory reserved for crashkernel (this may result a split memory
-+ * region).
-+ */
-+ crash_exclude_range();
-+
-+ /*
-+ * Make sure that the memory regions are sorted.
-+ */
-+ qsort(usablemem_rgns.ranges, usablemem_rgns.size,
-+ sizeof(*usablemem_rgns.ranges), range_cmp);
-+
-+ return 0;
-+}
-+
-+/**
-+ * cmdline_add_elfcorehdr() - adds elfcorehdr= to @cmdline
-+ * @cmdline: buffer where parameter is placed
-+ * @elfcorehdr: physical address of elfcorehdr
-+ *
-+ * Function appends 'elfcorehdr=start' at the end of the command line given in
-+ * @cmdline. Note that @cmdline must be at least %COMMAND_LINE_SIZE bytes long
-+ * (inclunding %NUL).
-+ */
-+static void cmdline_add_elfcorehdr(char *cmdline, unsigned long elfcorehdr)
-+{
-+ char buf[COMMAND_LINE_SIZE];
-+ int buflen;
-+
-+ buflen = snprintf(buf, sizeof(buf), "%s elfcorehdr=%#lx",
-+ cmdline, elfcorehdr);
-+ if (buflen < 0)
-+ die("Failed to construct elfcorehdr= command line parameter\n");
-+ if (buflen >= sizeof(buf))
-+ die("Command line overflow\n");
-+
-+ (void) strncpy(cmdline, buf, COMMAND_LINE_SIZE);
-+ cmdline[COMMAND_LINE_SIZE - 1] = '\0';
-+}
-+
-+/**
-+ * cmdline_add_mem() - adds mem= parameter to kernel command line
-+ * @cmdline: buffer where parameter is placed
-+ * @size: size of the kernel reserved memory (in bytes)
-+ *
-+ * This function appends 'mem=size' at the end of the command line given in
-+ * @cmdline. Note that @cmdline must be at least %COMMAND_LINE_SIZE bytes long
-+ * (including %NUL).
-+ */
-+static void cmdline_add_mem(char *cmdline, unsigned long size)
-+{
-+ char buf[COMMAND_LINE_SIZE];
-+ int buflen;
-+
-+ buflen = snprintf(buf, sizeof(buf), "%s mem=%ldK", cmdline, size >> 10);
-+ if (buflen < 0)
-+ die("Failed to construct mem= command line parameter\n");
-+ if (buflen >= sizeof(buf))
-+ die("Command line overflow\n");
-+
-+ (void) strncpy(cmdline, buf, COMMAND_LINE_SIZE);
-+ cmdline[COMMAND_LINE_SIZE - 1] = '\0';
-+}
-+
-+static unsigned long long range_size(const struct memory_range *r)
-+{
-+ return r->end - r->start + 1;
-+}
-+
-+static void dump_memory_ranges(void)
-+{
-+ int i;
-+
-+ if (!kexec_debug)
-+ return;
-+
-+ dbgprintf("crashkernel: [%#llx - %#llx] (%ldM)\n",
-+ crash_reserved_mem.start, crash_reserved_mem.end,
-+ (unsigned long)range_size(&crash_reserved_mem) >> 20);
-+
-+ for (i = 0; i < usablemem_rgns.size; i++) {
-+ struct memory_range *r = usablemem_rgns.ranges + i;
-+ dbgprintf("memory range: [%#llx - %#llx] (%ldM)\n",
-+ r->start, r->end, (unsigned long)range_size(r) >> 20);
-+ }
-+}
-+
-+/**
-+ * load_crashdump_segments() - loads additional segments needed for kdump
-+ * @info: kexec info structure
-+ * @mod_cmdline: kernel command line
-+ *
-+ * This function loads additional segments which are needed for the dump capture
-+ * kernel. It also updates kernel command line passed in @mod_cmdline to have
-+ * right parameters for the dump capture kernel.
-+ *
-+ * Return %0 in case of success and %-1 in case of error.
-+ */
-+int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
-+{
-+ unsigned long elfcorehdr;
-+ unsigned long bufsz;
-+ void *buf;
-+ int err;
-+
-+ /*
-+ * First fetch all the memory (RAM) ranges that we are going to pass to
-+ * the crashdump kernel during panic.
-+ */
-+ err = crash_get_memory_ranges();
-+ if (err)
-+ return err;
-+
-+ /*
-+ * Now that we have memory regions sorted, we can use first memory
-+ * region as PHYS_OFFSET.
-+ */
-+ phys_offset = usablemem_rgns.ranges->start;
-+ dbgprintf("phys_offset: %#lx\n", phys_offset);
-+
-+ err = crash_create_elf32_headers(info, &elf_info,
-+ usablemem_rgns.ranges,
-+ usablemem_rgns.size, &buf, &bufsz,
-+ ELF_CORE_HEADER_ALIGN);
-+ if (err)
-+ return err;
-+
-+ /*
-+ * We allocate ELF core header from the end of the memory area reserved
-+ * for the crashkernel. We align the header to SECTION_SIZE (which is
-+ * 1MB) so that available memory passed in kernel command line will be
-+ * aligned to 1MB. This is because kernel create_mapping() wants memory
-+ * regions to be aligned to SECTION_SIZE.
-+ */
-+ elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 20,
-+ crash_reserved_mem.start,
-+ crash_reserved_mem.end, -1, 0);
-+
-+ dbgprintf("elfcorehdr: %#lx\n", elfcorehdr);
-+ cmdline_add_elfcorehdr(mod_cmdline, elfcorehdr);
-+
-+ /*
-+ * Add 'mem=size' parameter to dump capture kernel command line. This
-+ * prevents the dump capture kernel from using any other memory regions
-+ * which belong to the primary kernel.
-+ */
-+ cmdline_add_mem(mod_cmdline, elfcorehdr - crash_reserved_mem.start);
-+
-+ dump_memory_ranges();
-+ dbgprintf("kernel command line: \"%s\"\n", mod_cmdline);
-+
-+ return 0;
-+}
-+
-+#endif
-+
-Index: kexec-tools-2.0.10/kexec/arch/arm64/include/arch/options.h
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/include/arch/options.h
-@@ -0,0 +1,26 @@
-+#ifndef KEXEC_ARCH_ARM64_OPTIONS_H
-+#define KEXEC_ARCH_ARM64_OPTIONS_H
-+
-+//#define OPT_ARCH_MAX ((OPT_MAX)+0)
-+
-+#define OPT_APPEND ((OPT_MAX)+0)
-+#define OPT_RAMDISK ((OPT_MAX)+1)
-+#define OPT_DTB ((OPT_MAX)+2)
-+
-+#define OPT_ARCH_MAX ((OPT_MAX)+3)
-+
-+
-+#define KEXEC_ARCH_OPTIONS \
-+ KEXEC_OPTIONS \
-+ { "append", 1, NULL, OPT_APPEND }, \
-+ { "command-line", 1, NULL, OPT_APPEND }, \
-+ { "dtb", 1, NULL, OPT_DTB }, \
-+ { "initrd", 1, NULL, OPT_RAMDISK }, \
-+ { "ramdisk", 1, NULL, OPT_RAMDISK }, \
-+
-+#define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR /* Only accept long arch options. */
-+
-+#define KEXEC_ALL_OPTIONS KEXEC_ARCH_OPTIONS
-+#define KEXEC_ALL_OPT_STR KEXEC_ARCH_OPT_STR
-+
-+#endif /* KEXEC_ARCH_ARM64_OPTIONS_H */
-Index: kexec-tools-2.0.10/kexec/arch/arm64/kexec-arm64.c
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/kexec-arm64.c
-@@ -0,0 +1,177 @@
-+/*
-+ * ARM64 kexec support.
-+ */
-+
-+#define _GNU_SOURCE
-+
-+#include <errno.h>
-+#include <stddef.h>
-+
-+//#include <linux/kexec.h>
-+
-+#include "../../kexec.h"
-+#include "../../kexec-syscall.h"
-+#include "kexec-arm64.h"
-+
-+
-+void arch_usage(void)
-+{
-+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
-+
-+ printf(
-+" --append=STRING Set the kernel command line to STRING.\n"
-+" --command-line=STRING Set the kernel command line to STRING.\n"
-+" --dtb=FILE Use FILE as the device tree blob.\n"
-+" --initrd=FILE Use FILE as the kernel initial ramdisk.\n"
-+" --ramdisk=FILE Use FILE as the kernel initial ramdisk.\n");
-+
-+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
-+}
-+
-+int arch_process_options(int UNUSED(argc), char **UNUSED(argv))
-+{
-+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+ return 0;
-+}
-+
-+const struct arch_map_entry arches[] = {
-+ { "aarch64", KEXEC_ARCH_ARM64 },
-+ { NULL, 0 },
-+};
-+
-+void arch_update_purgatory(struct kexec_info *UNUSED(info))
-+{
-+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+}
-+
-+unsigned long virt_to_phys(unsigned long addr)
-+{
-+ fprintf(stderr, "%s:%d: %016lx -> %016lx\n", __func__, __LINE__, addr,
-+ addr + 0x080000000UL);
-+ return addr + 0x080000000UL;
-+}
-+
-+void add_segment(struct kexec_info *info, const void *buf, size_t bufsz,
-+ unsigned long base, size_t memsz)
-+{
-+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
-+ add_segment_phys_virt(info, buf, bufsz, base, memsz, 1);
-+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
-+}
-+
-+static int get_memory_ranges_1(struct memory_range **range, int *ranges,
-+ unsigned long kexec_flags)
-+{
-+ static struct memory_range memory_range[KEXEC_SEGMENT_MAX];
-+ const char *iomem;
-+ int range_count = 0;
-+ char line[MAX_LINE];
-+ FILE *fp;
-+
-+ iomem = proc_iomem();
-+ fp = fopen(iomem, "r");
-+
-+ if (!fp) {
-+ fprintf(stderr, "Cannot open %s: %s\n",
-+ iomem, strerror(errno));
-+ return -1;
-+ }
-+
-+ dbgprintf("memory ranges:\n");
-+
-+ while(fgets(line, sizeof(line), fp) != 0) {
-+ struct memory_range r;
-+ char *str;
-+ int consumed;
-+
-+ if (range_count >= KEXEC_SEGMENT_MAX)
-+ break;
-+
-+ if (sscanf(line, "%Lx-%Lx : %n", &r.start, &r.end, &consumed)
-+ != 2)
-+ continue;
-+
-+ str = line + consumed;
-+ r.end++;
-+
-+ if (memcmp(str, "System RAM\n", 11)) {
-+ dbgprintf(" Skip: %016Lx - %016Lx : %s", r.start, r.end,
-+ str);
-+ continue;
-+ }
-+
-+ r.type = RANGE_RAM;
-+ memory_range[range_count] = r;
-+ range_count++;
-+
-+ dbgprintf(" Add: %016Lx - %016Lx : %s", r.start, r.end, str);
-+ }
-+
-+ fclose(fp);
-+ *range = memory_range;
-+ *ranges = range_count;
-+
-+ return 0;
-+}
-+
-+static int get_memory_ranges_2(struct memory_range **range, int *ranges,
-+ unsigned long UNUSED(kexec_flags))
-+{
-+ static struct memory_range memory_range[2];
-+
-+ memory_range[0].start = 0x080000000;
-+ memory_range[0].end = 0x100000000;
-+ memory_range[0].type = RANGE_RAM;
-+
-+ memory_range[1].start = 0x900000000;
-+ memory_range[1].end = 0x880000000;
-+ memory_range[1].type = RANGE_RAM;
-+
-+ *range = memory_range;
-+ *ranges = sizeof(memory_range) / sizeof(memory_range[0]);
-+
-+ return 0;
-+}
-+
-+int get_memory_ranges(struct memory_range **range, int *ranges,
-+ unsigned long kexec_flags)
-+{
-+ /* FIXME: Should get this info from device tree. */
-+
-+ return get_memory_ranges_1(range, ranges, kexec_flags);
-+}
-+
-+struct file_type file_type[] = {
-+ { "elf-arm64", elf_arm64_probe, elf_arm64_load, elf_arm64_usage },
-+};
-+
-+int file_types = sizeof(file_type) / sizeof(file_type[0]);
-+
-+int arch_compat_trampoline(struct kexec_info *info)
-+{
-+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+ return 0;
-+}
-+
-+void arch_reuse_initrd(void)
-+{
-+}
-+
-+int machine_verify_elf_rel(struct mem_ehdr *ehdr)
-+{
-+ (void)ehdr;
-+
-+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+ return 0;
-+}
-+
-+void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type,
-+ void *location, unsigned long address, unsigned long value)
-+{
-+ (void)ehdr;
-+ (void)r_type;
-+ (void)location;
-+ (void)address;
-+ (void)value;
-+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+}
-Index: kexec-tools-2.0.10/kexec/arch/arm64/kexec-arm64.h
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/kexec-arm64.h
-@@ -0,0 +1,20 @@
-+/*
-+ * ARM64 kexec support.
-+ */
-+
-+#if !defined(KEXEC_ARM64_H)
-+#define KEXEC_ARM64_H
-+
-+/* #include <linux/kexec.h> FIXME: this is broken */
-+#include <sys/types.h>
-+
-+#include "../../kexec.h"
-+
-+#define KEXEC_SEGMENT_MAX 16 /* FIXME: this should come from <linux/kexec.h> */
-+
-+int elf_arm64_probe(const char *buf, off_t len);
-+int elf_arm64_load(int argc, char **argv, const char *buf, off_t len,
-+ struct kexec_info *info);
-+void elf_arm64_usage(void);
-+
-+#endif
-\ No newline at end of file
-Index: kexec-tools-2.0.10/kexec/arch/arm64/kexec-elf-arm64.c
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/kexec-elf-arm64.c
-@@ -0,0 +1,114 @@
-+/*
-+ * ARM64 kexec support.
-+ */
-+
-+#define _GNU_SOURCE
-+
-+#include <elf.h>
-+#include <getopt.h>
-+
-+#include "../../kexec-syscall.h"
-+
-+#include "kexec-arm64.h"
-+#include "arch/options.h"
-+
-+#if !defined(EM_AARCH64)
-+# define EM_AARCH64 183
-+#endif
-+
-+int elf_arm64_probe(const char *buf, off_t len)
-+{
-+ int result;
-+ struct mem_ehdr ehdr;
-+
-+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
-+
-+ result = build_elf_exec_info(buf, len, &ehdr, 0);
-+
-+ if (result < 0) {
-+ dbgprintf("Not an ELF executable\n");
-+ goto out;
-+ }
-+
-+ if (ehdr.e_machine != EM_AARCH64) {
-+ dbgprintf("Not an AARCH64 executable\n");
-+ result = -1;
-+ goto out;
-+ }
-+
-+ result = 0;
-+
-+out:
-+ free_elf_info(&ehdr);
-+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
-+ return result;
-+}
-+
-+int elf_arm64_load(int argc, char **argv, const char *buf, off_t len,
-+ struct kexec_info *info)
-+{
-+ static const struct option options[] = {
-+ KEXEC_ARCH_OPTIONS
-+ { 0 }
-+ };
-+ static const char short_options[] = KEXEC_OPT_STR "";
-+ const char *command_line = NULL;
-+ unsigned int command_line_len = 0;
-+ const char *ramdisk = NULL;
-+ const char *dtb = NULL;
-+ int opt;
-+ struct mem_ehdr ehdr;
-+ int result;
-+
-+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
-+
-+ while ((opt = getopt_long(argc, argv, short_options, options, 0))
-+ != -1) {
-+ switch (opt) {
-+ default:
-+ if (opt < OPT_MAX) /* Ignore core options */
-+ break;
-+ case OPT_APPEND:
-+ command_line = optarg;
-+ command_line_len = strlen(command_line) + 1;
-+ break;
-+ case OPT_RAMDISK:
-+ ramdisk = optarg;
-+ break;
-+ case OPT_DTB:
-+ dtb = optarg;
-+ break;
-+ }
-+ }
-+
-+ fprintf(stderr, "%s:%d: command_line: %s\n", __func__, __LINE__, command_line);
-+ fprintf(stderr, "%s:%d: ramdisk: %s\n", __func__, __LINE__, ramdisk);
-+ fprintf(stderr, "%s:%d: dtb: %s\n", __func__, __LINE__, dtb);
-+
-+ if (info->kexec_flags & KEXEC_ON_CRASH) {
-+ fprintf(stderr, "kexec: kdump not yet supported on arm64\n");
-+ return -1;
-+ }
-+
-+ result = build_elf_exec_info(buf, len, &ehdr, 0);
-+
-+ if (result < 0) {
-+ free_elf_info(&ehdr);
-+ fprintf(stderr, "%s:%d: free_elf_info failed\n", __func__,
-+ __LINE__);
-+ return result;
-+ }
-+
-+ elf_exec_build_load(info, &ehdr, buf, len, 0);
-+
-+ info->entry = (void*)0x80080000UL; // FIXME
-+
-+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
-+ return 0;
-+}
-+
-+void elf_arm64_usage(void)
-+{
-+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
-+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
-+}
-Index: kexec-tools-2.0.10/kexec/kexec-syscall.h
-===================================================================
---- kexec-tools-2.0.10.orig/kexec/kexec-syscall.h
-+++ kexec-tools-2.0.10/kexec/kexec-syscall.h
-@@ -39,8 +39,8 @@
- #ifdef __s390__
- #define __NR_kexec_load 277
- #endif
--#ifdef __arm__
--#define __NR_kexec_load __NR_SYSCALL_BASE + 347
-+#if defined(__arm__) || defined(__arm64__)
-+#define __NR_kexec_load __NR_SYSCALL_BASE + 347
- #endif
- #if defined(__mips__)
- #define __NR_kexec_load 4311
-@@ -108,6 +108,8 @@ static inline long kexec_file_load(int k
- #define KEXEC_ARCH_PPC64 (21 << 16)
- #define KEXEC_ARCH_IA_64 (50 << 16)
- #define KEXEC_ARCH_ARM (40 << 16)
-+#define KEXEC_ARCH_ARM64 (183 << 16)
-+/* #define KEXEC_ARCH_AARCH64 (183 << 16) */
- #define KEXEC_ARCH_S390 (22 << 16)
- #define KEXEC_ARCH_SH (42 << 16)
- #define KEXEC_ARCH_MIPS_LE (10 << 16)
-@@ -153,5 +155,8 @@ static inline long kexec_file_load(int k
- #ifdef __m68k__
- #define KEXEC_ARCH_NATIVE KEXEC_ARCH_68K
- #endif
-+#if defined(__arm64__)
-+#define KEXEC_ARCH_NATIVE KEXEC_ARCH_ARM64
-+#endif
-
- #endif /* KEXEC_SYSCALL_H */
-Index: kexec-tools-2.0.10/kexec/kexec.c
-===================================================================
---- kexec-tools-2.0.10.orig/kexec/kexec.c
-+++ kexec-tools-2.0.10/kexec/kexec.c
-@@ -664,6 +664,8 @@ static int my_load(const char *type, int
- memset(&info, 0, sizeof(info));
- info.kexec_flags = kexec_flags;
-
-+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+
- result = 0;
- if (argc - fileind <= 0) {
- fprintf(stderr, "No kernel specified\n");
-Index: kexec-tools-2.0.10/purgatory/arch/arm64/Makefile
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/purgatory/arch/arm64/Makefile
-@@ -0,0 +1,7 @@
-+#
-+# Purgatory arm64
-+#
-+
-+arm64_PURGATORY_SRCS =
-+
-+dist += purgatory/arch/arm64/Makefile $(arm64_PURGATORY_SRCS)
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb
deleted file mode 100644
index 0f6398f..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb
+++ /dev/null
@@ -1,65 +0,0 @@
-require kexec-tools.inc
-export LDFLAGS = "-L${STAGING_LIBDIR}"
-EXTRA_OECONF = " --with-zlib=yes"
-
-SRC_URI += "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \
- file://0002-powerpc-change-the-memory-size-limit.patch \
- file://0001-purgatory-Pass-r-directly-to-linker.patch \
- file://0001-vmcore-dmesg-Define-_GNU_SOURCE.patch \
- file://0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch \
- file://0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch \
- file://0003-arm64-identify-PHYS_OFFSET-correctly.patch \
- file://0004-arm64-kdump-identify-memory-regions.patch \
- file://0005-arm64-kdump-add-elf-core-header-segment.patch \
- file://0006-arm64-kdump-set-up-kernel-image-segment.patch \
- file://0007-arm64-kdump-set-up-other-segments.patch \
- file://0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch \
- file://0009-arm64-kdump-Add-support-for-binary-image-files.patch \
- file://0010-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \
- file://0001-x86-x86_64-Fix-format-warning-with-die.patch \
- file://0002-ppc-Fix-format-warning-with-die.patch \
- file://kexec-x32.patch \
- file://0001-Disable-PIE-during-link.patch \
- file://0001-arm64-Disable-PIC.patch \
- "
-
-SRC_URI[md5sum] = "b2b2c5e6b29d467d6e99d587fb6b7cf5"
-SRC_URI[sha256sum] = "b3e69519d2acced256843b1e8f1ecfa00d9b54fa07449ed78f05b9193f239370"
-
-SECURITY_PIE_CFLAGS_remove = "-fPIE -pie"
-
-PACKAGES =+ "kexec kdump vmcore-dmesg"
-
-ALLOW_EMPTY_${PN} = "1"
-RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg"
-
-FILES_kexec = "${sbindir}/kexec"
-FILES_kdump = "${sbindir}/kdump \
- ${sysconfdir}/sysconfig/kdump.conf \
- ${sysconfdir}/init.d/kdump \
- ${libexecdir}/kdump-helper \
- ${systemd_unitdir}/system/kdump.service \
-"
-
-FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg"
-
-inherit update-rc.d systemd
-
-INITSCRIPT_PACKAGES = "kdump"
-INITSCRIPT_NAME_kdump = "kdump"
-INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ."
-
-do_install_append () {
- install -d ${D}${sysconfdir}/sysconfig
- install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig
-
- if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
- install -D -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump
- fi
-
- if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
- install -D -m 0755 ${WORKDIR}/kdump ${D}${libexecdir}/kdump-helper
- install -D -m 0644 ${WORKDIR}/kdump.service ${D}${systemd_unitdir}/system/kdump.service
- sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_unitdir}/system/kdump.service
- fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.16.bb b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.16.bb
new file mode 100644
index 0000000..ebb4832
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.16.bb
@@ -0,0 +1,86 @@
+
+SUMMARY = "Kexec fast reboot tools"
+DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel"
+AUTHOR = "Eric Biederman"
+HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/"
+SECTION = "kernel/userland"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \
+ file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09"
+DEPENDS = "zlib xz"
+
+PR = "r1"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \
+ file://kdump \
+ file://kdump.conf \
+ file://kdump.service \
+ file://0002-powerpc-change-the-memory-size-limit.patch \
+ file://0001-purgatory-Pass-r-directly-to-linker.patch \
+ file://0010-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \
+ file://kexec-x32.patch \
+ file://0001-Disable-PIE-during-link.patch \
+ "
+
+SRC_URI[md5sum] = "5198968de79b5ded96f97f3c2ea9637b"
+SRC_URI[sha256sum] = "cf17fc99bf77c9b39f06ee88ac0e86d0349c4a0c3f8214a3cc78eece872f6f3a"
+
+inherit autotools update-rc.d systemd
+
+export LDFLAGS = "-L${STAGING_LIBDIR}"
+EXTRA_OECONF = " --with-zlib=yes"
+
+do_compile_prepend() {
+ # Remove the prepackaged config.h from the source tree as it overrides
+ # the same file generated by configure and placed in the build tree
+ rm -f ${S}/include/config.h
+
+ # Remove the '*.d' file to make sure the recompile is OK
+ for dep in `find ${B} -type f -name '*.d'`; do
+ dep_no_d="`echo $dep | sed 's#.d$##'`"
+ # Remove file.d when there is a file.o
+ if [ -f "$dep_no_d.o" ]; then
+ rm -f $dep
+ fi
+ done
+}
+
+do_install_append () {
+ install -d ${D}${sysconfdir}/sysconfig
+ install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ install -D -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump
+ fi
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -D -m 0755 ${WORKDIR}/kdump ${D}${libexecdir}/kdump-helper
+ install -D -m 0644 ${WORKDIR}/kdump.service ${D}${systemd_unitdir}/system/kdump.service
+ sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_unitdir}/system/kdump.service
+ fi
+}
+
+PACKAGES =+ "kexec kdump vmcore-dmesg"
+
+ALLOW_EMPTY_${PN} = "1"
+RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg"
+
+FILES_kexec = "${sbindir}/kexec"
+FILES_kdump = "${sbindir}/kdump \
+ ${sysconfdir}/sysconfig/kdump.conf \
+ ${sysconfdir}/init.d/kdump \
+ ${libexecdir}/kdump-helper \
+ ${systemd_unitdir}/system/kdump.service \
+"
+
+FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg"
+
+INITSCRIPT_PACKAGES = "kdump"
+INITSCRIPT_NAME_kdump = "kdump"
+INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ."
+
+SECURITY_PIE_CFLAGS_remove = "-fPIE -pie"
+
+COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'
+
+INSANE_SKIP_${PN} = "arch"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
index 44d013f..9a17267 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
@@ -11,6 +11,7 @@
SSTATE_SCAN_FILES += "depmodwrapper"
EXTRA_STAGING_FIXMES += "PKGDATA_DIR"
+DEPENDS += "kmod-native"
do_populate_sysroot[depends] = ""
do_install() {
@@ -23,17 +24,13 @@
echo "Usage: depmodwrapper -a -b rootfs KERNEL_VERSION" >&2
exit 1
fi
-if [ ! -r ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion ]; then
- echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" >&2
-else
- kernelabi=\$(cat ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion)
- if [ "\$kernelabi" != "\$4" ]; then
- echo "Error: Kernel version \$4 does not match kernel-abiversion (\$kernelabi)" >&2
- exit 1
- fi
+
+kernelabi=""
+if [ -r "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" ]; then
+ kernelabi=\$(cat "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion")
fi
-if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ]; then
+if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ] || [ "\$kernelabi" != "\$4" ]; then
echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/System.map-\$4" >&2
exec env depmod "\$1" "\$2" "\$3" "\$4"
else
@@ -45,4 +42,5 @@
SYSROOT_DIRS += "${bindir_crossscripts}"
+PACKAGES = ""
inherit nopackages
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc
index 7fb10b5..29885fb 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc
@@ -14,9 +14,9 @@
"
inherit autotools gtk-doc pkgconfig manpages
-SRCREV = "ef4257b59c4307b8c627d89f3c7f1feedb32582f"
+SRCREV = "aca4eca103d6699543f7ed663335c28c2e9908bb"
# Lookout for PV bump too when SRCREV is changed
-PV = "24+git${SRCPV}"
+PV = "25+git${SRCPV}"
SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
file://depmod-search.conf \
@@ -35,9 +35,7 @@
PACKAGECONFIG[logging] = " --enable-logging,--disable-logging"
PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native"
-do_configure_prepend () {
- gtkdocize --docdir ${S}/libkmod/docs --srcdir ${S}
-}
+GTKDOC_DOCDIR = "${S}/libkmod/docs"
do_configure_append () {
sed -i 's#}libtool#}${TARGET_SYS}-libtool#' ${B}/doltlibtool
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch
index feafcb9..5f45fce 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch
@@ -11,10 +11,10 @@
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/configure.ac b/configure.ac
-index eb0f9d1..a539968 100644
---- a/configure.ac
-+++ b/configure.ac
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac
++++ git/configure.ac
@@ -14,7 +14,7 @@ AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_PREFIX_DEFAULT([/usr])
@@ -23,7 +23,4 @@
+AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules tar-pax no-dist-gzip dist-xz subdir-objects color-tests serial-tests])
AM_SILENT_RULES([yes])
LT_INIT([disable-static pic-only])
-
---
-1.9.1
-
+ DOLT
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch
index 8161d61..5d9d40c 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch
@@ -18,12 +18,12 @@
libkmod/libkmod-internal.h | 4 ++++
1 file changed, 4 insertions(+)
-diff --git a/libkmod/libkmod-internal.h b/libkmod/libkmod-internal.h
-index 0180124..100b40f 100644
---- a/libkmod/libkmod-internal.h
-+++ b/libkmod/libkmod-internal.h
-@@ -9,6 +9,10 @@
- #include "macro.h"
+Index: git/libkmod/libkmod-internal.h
+===================================================================
+--- git.orig/libkmod/libkmod-internal.h
++++ git/libkmod/libkmod-internal.h
+@@ -10,6 +10,10 @@
+
#include "libkmod.h"
+#ifndef O_CLOEXEC
@@ -33,6 +33,3 @@
static _always_inline_ _printf_format_(2, 3) void
kmod_log_null(struct kmod_ctx *ctx, const char *format, ...) {}
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch b/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch
deleted file mode 100644
index b248133..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From db112739dc4f608a968b8104b382955dc3d96ca3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Sep 2015 07:40:10 +0000
-Subject: [PATCH] Rectify the function signatures to fix prototype mismatches
-
-clang is less forgiving when it comes to coding standards, correct the
-function signatures to reflect the function logic
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- fsync.c | 7 ++++---
- latencytop.h | 2 +-
- 2 files changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/fsync.c b/fsync.c
-index 82dff0e..5cefba9 100644
---- a/fsync.c
-+++ b/fsync.c
-@@ -51,7 +51,7 @@ struct fsync_files {
- static GList *fsync_data;
-
-
--static chain_file(struct fsync_process *proc, char *filename)
-+static void chain_file(struct fsync_process *proc, char *filename)
- {
- struct fsync_files *file;
- GList *item;
-@@ -75,7 +75,7 @@ static chain_file(struct fsync_process *proc, char *filename)
- proc->files = g_list_append(proc->files, file);
- }
-
--static report_file(char *process, char *file)
-+static void report_file(char *process, char *file)
- {
- struct fsync_process *proc;
- GList *item;
-@@ -157,9 +157,10 @@ int enable_fsync_tracer(void)
- write_to_file("/sys/kernel/debug/tracing/current_tracer", "fsync");
- write_to_file("/sys/kernel/debug/tracing/iter_ctrl", "ftrace_printk");
- write_to_file("/sys/kernel/debug/tracing/tracing_on", "1");
-+ return ret;
- }
-
--int disable_fsync_tracer(void)
-+void disable_fsync_tracer(void)
- {
- write_to_file("/sys/kernel/debug/tracing/tracing_on", "0");
- }
-diff --git a/latencytop.h b/latencytop.h
-index 5394d73..9d107a8 100644
---- a/latencytop.h
-+++ b/latencytop.h
-@@ -54,5 +54,5 @@ extern char *translate(char *line);
- extern void init_translations(char *filename);
- extern int fsync_display(int duration);
- extern int enable_fsync_tracer(void);
--extern int disable_fsync_tracer(void);
-+extern void disable_fsync_tracer(void);
- extern void update_list(void);
---
-2.5.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch b/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch
deleted file mode 100644
index 7848ccf..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-linux: sysfs: use tracing_on as tracing_enabled is deprecated
-
-tracing_enabled use in the kernel is being deprecated as per commit
-6752ab4a9c30 [tracing: Deprecate tracing_enabled for tracing_on] in
-the linux mainline kernel. tracing_enabled use will generate a warning
-and may no longer function as expected, therefore move to use tracing_on.
-
-Upstream-Status: Pending
-
-Signed-off-by: Dennis Hall <dennis.hall@windriver.com>
-
-Index: latencytop-0.5/fsync.c
-===================================================================
---- latencytop-0.5.orig/fsync.c 2012-08-03 10:45:49.000000000 -0400
-+++ latencytop-0.5/fsync.c 2012-08-03 10:48:39.000000000 -0400
-@@ -149,19 +149,19 @@
- * cd /sys/kernel/debug/tracing
- * echo fsync > current_tracer
- * echo ftrace_printk > iter_ctrl
-- * echo 1 > tracing_enabled
-+ * echo 1 > tracing_on
- */
- ret = system("/bin/mount -t debugfs none /sys/kernel/debug/");
- if (!ret)
- return -1;
- write_to_file("/sys/kernel/debug/tracing/current_tracer", "fsync");
- write_to_file("/sys/kernel/debug/tracing/iter_ctrl", "ftrace_printk");
-- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1");
-+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "1");
- }
-
- int disable_fsync_tracer(void)
- {
-- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0");
-+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "0");
- }
-
-
-@@ -339,8 +339,8 @@
- if (curduration > 5)
- curduration = 5;
- /* clear the ftrace buffer */
-- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0");
-- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1");
-+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "0");
-+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "1");
- key = select(1, &rfds, NULL, NULL, &end);
- parse_ftrace();
- print_global_list();
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch b/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch
deleted file mode 100644
index 7147fda..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-
-Signed-off-by: Jack Mitchell <jack.mitchell@dbbroadcast.co.uk>
-Upstream-Status: Pending
-
-diff --git a/Makefile.orig b/Makefile
-index 16a2369..fa797a2 100644
---- a/Makefile.orig
-+++ b/Makefile
-@@ -1,10 +1,11 @@
--# FIXME: Use autoconf ?
--HAS_GTK_GUI = 1
-+#
-+#
-
- DESTDIR =
- SBINDIR = /usr/sbin
- XCFLAGS = -W -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare
--LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncursesw
-+LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncurses $(LDFLAGS)
-+CC ?= gcc
-
- OBJS= latencytop.o text_display.o translate.o fsync.o
-
-@@ -26,16 +27,17 @@ endif
-
- # We write explicity this "implicit rule"
- %.o : %.c
-- gcc -c $(CFLAGS) $(XCFLAGS) $< -o $@
-+ $(CC) -c $(CFLAGS) $(XCFLAGS) $< -o $@
-
- latencytop: $(OBJS) latencytop.h Makefile
-- gcc $(CFLAGS) $(OBJS) $(LDF) -o latencytop
-+ $(CC) $(CFLAGS) $(OBJS) $(LDF) -o latencytop
-
- clean:
- rm -f *~ latencytop DEADJOE *.o
-
- install: latencytop
- mkdir -p $(DESTDIR)/usr/share/latencytop
-+ mkdir -p $(DESTDIR)/$(SBINDIR)
- install -m 0644 latencytop.trans $(DESTDIR)/usr/share/latencytop/latencytop.trans
- install -m 0644 *.png $(DESTDIR)/usr/share/latencytop/
- install -m 0755 latencytop $(DESTDIR)$(SBINDIR)/
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop_0.5.bb b/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop_0.5.bb
deleted file mode 100644
index eb19471..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop_0.5.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Linux tool for measuring and fixing latency"
-HOMEPAGE = "http://www.latencytop.org/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://latencytop.c;endline=23;md5=ee9ea9b1415356e5734adad4a87dc7fa"
-
-inherit pkgconfig
-
-DEPENDS = "virtual/libintl ncurses glib-2.0"
-
-PR = "r3"
-
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.gz/73bb3371c6ee0b0e68e25289027e865c/${BP}.tar.gz \
- file://latencytop-makefile.patch \
- file://latencytop-fsync.patch \
- file://0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch \
-"
-
-SRC_URI[md5sum] = "73bb3371c6ee0b0e68e25289027e865c"
-SRC_URI[sha256sum] = "9e7f72fbea7bd918e71212a1eabaad8488d2c602205d2e3c95d62cd57e9203ef"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
-
-PACKAGECONFIG[x11] = ",,gtk+"
-
-EXTRA_OEMAKE_X = "${@bb.utils.contains('PACKAGECONFIG', 'x11', 'HAS_GTK_GUI=1', '', d)}"
-
-#CFLAGS += "${LDFLAGS}"
-
-do_install() {
- oe_runmake install DESTDIR=${D} ${EXTRA_OEMAKE_X}
-}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch b/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch
deleted file mode 100644
index d59a7f7..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 272a8a069a8f5f06a1e5dfa0ef12f5f92984728b Mon Sep 17 00:00:00 2001
-From: Noor <noor_ahsan@mentor.com>
-Date: Wed, 12 Aug 2015 20:54:00 +0500
-Subject: [PATCH] Makefile: Add LDFLAGS variable to SLDFLAGS.
-
-* Add LDFLAGS variable to SLDFLAGS so that extra linker
- flags can be sent via this variable.
-
-Upstream-Status: Submitted [perfmon2-libpfm4-commits@lists.sourceforge.net]
-
-Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>
----
- lib/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/Makefile b/lib/Makefile
-index 1cc8765..4bd92ef 100644
---- a/lib/Makefile
-+++ b/lib/Makefile
-@@ -187,7 +187,7 @@ CFLAGS += -DCONFIG_PFMLIB_CELL
- endif
-
- ifeq ($(SYS),Linux)
--SLDFLAGS=-shared -Wl,-soname -Wl,$(VLIBPFM)
-+SLDFLAGS=$(LDFLAGS) -shared -Wl,-soname -Wl,$(VLIBPFM)
- SLIBPFM=libpfm.so.$(VERSION).$(REVISION).$(AGE)
- VLIBPFM=libpfm.so.$(VERSION)
- SOLIBEXT=so
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch b/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch
deleted file mode 100644
index 25d47ef..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Upstream-Status: Pending
-
-Fix compile error:
-
-| syst_count.c:346:3: error: this 'for' clause does not guard... [-Werror=misleading-indentation]
-| for(c=cmin ; c < cmax; c++)
-| ^~~
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-diff --git a/perf_examples/syst_count.c b/perf_examples/syst_count.c
-index 0d53078..2dfb9b9 100644
---- a/perf_examples/syst_count.c
-+++ b/perf_examples/syst_count.c
-@@ -343,8 +343,9 @@ measure(void)
-
- for (delay = 1 ; delay <= options.delay; delay++) {
-
-- for(c=cmin ; c < cmax; c++)
-- start_cpu(c);
-+ for(c=cmin ; c < cmax; c++) {
-+ start_cpu(c);
-+ }
-
- if (0) {
- tv.tv_sec = 0;
-@@ -353,8 +354,9 @@ measure(void)
- } else
- sleep(1);
-
-- for(c=cmin ; c < cmax; c++)
-- stop_cpu(c);
-+ for(c=cmin ; c < cmax; c++) {
-+ stop_cpu(c);
-+ }
-
- for(c = cmin; c < cmax; c++) {
- printf("# %'ds -----\n", delay);
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb b/import-layers/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb
deleted file mode 100644
index 4136eac..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Monitoring tools exploiting the performance monitoring events"
-DESCRIPTION = "This package provides a library, called libpfm4 which is used to develop \
-monitoring tools exploiting the performance monitoring events such as those \
-provided by the Performance Monitoring Unit (PMU) of modern processors."
-HOMEPAGE = "http://perfmon2.sourceforge.net/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=144822&atid=759953&source=navbar"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0de488f3bd4424e308e2e399cb99c788"
-
-SECTION = "devel"
-
-COMPATIBLE_HOST = "powerpc64"
-
-SRC_URI = "http://downloads.sourceforge.net/project/perfmon2/${BPN}/libpfm-${PV}.tar.gz \
- file://0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch \
- file://fix-misleading-indentation-error.patch \
- "
-
-SRC_URI[md5sum] = "5077b9022440e4951d96f2d0e73bd487"
-SRC_URI[sha256sum] = "5ab1e5b0472550f9037a8800834f6bc3b927690070f69fac0b67284b4b05fd5f"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/perfmon2/files/libpfm4/"
-
-EXTRA_OEMAKE = "DESTDIR=\"${D}\" PREFIX=\"${prefix}\" LIBDIR=\"${libdir}\" LDCONFIG=\"true\""
-EXTRA_OEMAKE_append_powerpc = " ARCH=\"powerpc\""
-EXTRA_OEMAKE_append_powerpc64 = " ARCH=\"powerpc\" BITMODE=\"64\""
-
-S = "${WORKDIR}/libpfm-${PV}"
-
-do_install () {
- oe_runmake install
-}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
index 9054b33..8d6f2f2 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
@@ -37,6 +37,7 @@
& Firmware-ath9k-htc \
& Firmware-phanfw \
& Firmware-qat \
+ & Firmware-qcom \
& Firmware-qla1280 \
& Firmware-qla2xxx \
& Firmware-qualcommAthos_ar3k \
@@ -90,12 +91,13 @@
file://LICENCE.Marvell;md5=9ddea1734a4baf3c78d845151f42a37a \
file://LICENCE.moxa;md5=1086614767d8ccf744a923289d3d4261 \
file://LICENCE.myri10ge_firmware;md5=42e32fb89f6b959ca222e25ac8df8fed \
- file://LICENCE.Netronome;md5=cd2a3e6effe3cdf42731575b8e9477ed \
+ file://LICENCE.Netronome;md5=4add08f2577086d44447996503cddf5f \
file://LICENCE.nvidia;md5=4428a922ed3ba2ceec95f076a488ce07 \
file://LICENCE.OLPC;md5=5b917f9d8c061991be4f6f5f108719cd \
file://LICENCE.open-ath9k-htc-firmware;md5=1b33c9f4d17bc4d457bdb23727046837 \
file://LICENCE.phanfw;md5=954dcec0e051f9409812b561ea743bfa \
file://LICENCE.qat_firmware;md5=9e7d8bea77612d7cc7d9e9b54b623062 \
+ file://LICENSE.qcom;md5=164e3362a538eb11d3ac51e8e134294b \
file://LICENCE.qla1280;md5=d6895732e622d950609093223a2c4f5d \
file://LICENCE.qla2xxx;md5=505855e921b75f1be4a437ad9b79dff0 \
file://LICENSE.QualcommAtheros_ar3k;md5=b5fe244fb2b532311de1472a3bc06da5 \
@@ -116,7 +118,7 @@
file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \
file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \
file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \
- file://WHENCE;md5=038edbc9e744171d8b6235e0224028ba \
+ file://WHENCE;md5=6f46986f4e913ef16b765c2319cc5141 \
"
# These are not common licenses, set NO_GENERIC_LICENSE for them
@@ -156,6 +158,7 @@
NO_GENERIC_LICENSE[Firmware-ath9k-htc] = "LICENCE.open-ath9k-htc-firmware"
NO_GENERIC_LICENSE[Firmware-phanfw] = "LICENCE.phanfw"
NO_GENERIC_LICENSE[Firmware-qat] = "LICENCE.qat_firmware"
+NO_GENERIC_LICENSE[Firmware-qcom] = "LICENSE.qcom"
NO_GENERIC_LICENSE[Firmware-qla1280] = "LICENCE.qla1280"
NO_GENERIC_LICENSE[Firmware-qla2xxx] = "LICENCE.qla2xxx"
NO_GENERIC_LICENSE[Firmware-qualcommAthos_ar3k] = "LICENSE.QualcommAtheros_ar3k"
@@ -178,13 +181,13 @@
NO_GENERIC_LICENSE[Firmware-xc5000c] = "LICENCE.xc5000c"
NO_GENERIC_LICENSE[WHENCE] = "WHENCE"
-SRCREV = "bf04291309d3169c0ad3b8db52564235bbd08e30"
+SRCREV = "8fc2d4e55685bf73b6f7752383da9067404a74bb"
PE = "1"
PV = "0.0+git${SRCPV}"
SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
@@ -249,14 +252,19 @@
${PN}-iwlwifi-7260 \
${PN}-iwlwifi-7265 \
${PN}-iwlwifi-7265d ${PN}-iwlwifi-8000c ${PN}-iwlwifi-8265 \
+ ${PN}-iwlwifi-9000 \
${PN}-iwlwifi-misc \
${PN}-ibt-license ${PN}-ibt ${PN}-ibt-misc \
${PN}-ibt-11-5 ${PN}-ibt-12-16 ${PN}-ibt-hw-37-7 ${PN}-ibt-hw-37-8 \
+ ${PN}-ibt-17 \
${PN}-i915-license ${PN}-i915 \
${PN}-adsp-sst-license ${PN}-adsp-sst \
${PN}-bnx2-mips \
${PN}-netronome-license ${PN}-netronome \
${PN}-qat ${PN}-qat-license \
+ ${PN}-qcom-license \
+ ${PN}-qcom-venus-1.8 ${PN}-qcom-venus-4.2 \
+ ${PN}-qcom-adreno-a3xx ${PN}-qcom-adreno-a530 \
${PN}-whence-license \
${PN}-license \
"
@@ -596,6 +604,7 @@
LICENSE_${PN}-iwlwifi-7265d = "Firmware-iwlwifi_firmware"
LICENSE_${PN}-iwlwifi-8000c = "Firmware-iwlwifi_firmware"
LICENSE_${PN}-iwlwifi-8265 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-9000 = "Firmware-iwlwifi_firmware"
LICENSE_${PN}-iwlwifi-misc = "Firmware-iwlwifi_firmware"
LICENSE_${PN}-iwlwifi-license = "Firmware-iwlwifi_firmware"
@@ -622,6 +631,7 @@
FILES_${PN}-iwlwifi-7265d = "${nonarch_base_libdir}/firmware/iwlwifi-7265D-*.ucode"
FILES_${PN}-iwlwifi-8000c = "${nonarch_base_libdir}/firmware/iwlwifi-8000C-*.ucode"
FILES_${PN}-iwlwifi-8265 = "${nonarch_base_libdir}/firmware/iwlwifi-8265-*.ucode"
+FILES_${PN}-iwlwifi-9000 = "${nonarch_base_libdir}/firmware/iwlwifi-9000-*.ucode"
FILES_${PN}-iwlwifi-misc = "${nonarch_base_libdir}/firmware/iwlwifi-*.ucode"
RDEPENDS_${PN}-iwlwifi-135-6 = "${PN}-iwlwifi-license"
@@ -645,6 +655,7 @@
RDEPENDS_${PN}-iwlwifi-7265d = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-8000c = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-8265 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-9000 = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-misc = "${PN}-iwlwifi-license"
# -iwlwifi-misc is a "catch all" package that includes all the iwlwifi
@@ -670,6 +681,7 @@
LICENSE_${PN}-ibt-hw-37-8 = "Firmware-ibt_firmware"
LICENSE_${PN}-ibt-11-5 = "Firmware-ibt_firmware"
LICENSE_${PN}-ibt-12-16 = "Firmware-ibt_firmware"
+LICENSE_${PN}-ibt-17 = "Firmware-ibt_firmware"
LICENSE_${PN}-ibt-misc = "Firmware-ibt_firmware"
FILES_${PN}-ibt-license = "${nonarch_base_libdir}/firmware/LICENCE.ibt_firmware"
@@ -677,12 +689,14 @@
FILES_${PN}-ibt-hw-37-8 = "${nonarch_base_libdir}/firmware/intel/ibt-hw-37.8*.bseq"
FILES_${PN}-ibt-11-5 = "${nonarch_base_libdir}/firmware/intel/ibt-11-5.sfi /lib/firmware/intel/ibt-11-5.ddc"
FILES_${PN}-ibt-12-16 = "${nonarch_base_libdir}/firmware/intel/ibt-12-16.sfi /lib/firmware/intel/ibt-12-16.ddc"
+FILES_${PN}-ibt-17 = "${nonarch_base_libdir}/firmware/intel/ibt-17-*.sfi /lib/firmware/intel/ibt-17-*.ddc"
FILES_${PN}-ibt-misc = "${nonarch_base_libdir}/firmware/ibt-*"
RDEPENDS_${PN}-ibt-hw-37-7 = "${PN}-ibt-license"
RDEPENDS_${PN}-ibt-hw-37.8 = "${PN}-ibt-license"
RDEPENDS_${PN}-ibt-11-5 = "${PN}-ibt-license"
RDEPENDS_${PN}-ibt-12-16 = "${PN}-ibt-license"
+RDEPENDS_${PN}-ibt-17 = "${PN}-ibt-license"
RDEPENDS_${PN}-ibt-misc = "${PN}-ibt-license"
ALLOW_EMPTY_${PN}-ibt= "1"
@@ -707,6 +721,18 @@
FILES_${PN}-qat = "${nonarch_base_libdir}/firmware/qat*.bin"
RDEPENDS_${PN}-qat = "${PN}-qat-license"
+# For QCOM VPU/GPU
+LICENSE_${PN}-qcom-license = "Firmware-qcom"
+FILES_${PN}-qcom-license = "${nonarch_base_libdir}/firmware/LICENSE.qcom ${nonarch_base_libdir}/firmware/qcom/NOTICE.txt"
+FILES_${PN}-qcom-venus-1.8 = "${nonarch_base_libdir}/firmware/qcom/venus-1.8/*"
+FILES_${PN}-qcom-venus-4.2 = "${nonarch_base_libdir}/firmware/qcom/venus-4.2/*"
+FILES_${PN}-qcom-adreno-a3xx = "${nonarch_base_libdir}/firmware/qcom/a300_*.fw ${nonarch_base_libdir}/firmware/a300_*.fw"
+FILES_${PN}-qcom-adreno-a530 = "${nonarch_base_libdir}/firmware/qcom/a530*.*"
+RDEPENDS_${PN}-qcom-venus-1.8 = "${PN}-qcom-license"
+RDEPENDS_${PN}-qcom-venus-4.2 = "${PN}-qcom-license"
+RDEPENDS_${PN}-qcom-adreno-a3xx = "${PN}-qcom-license"
+RDEPENDS_${PN}-qcom-adreno-a530 = "${PN}-qcom-license"
+
# For other firmwares
# Maybe split out to separate packages when needed.
LICENSE_${PN} = "\
@@ -737,6 +763,7 @@
& Firmware-ath9k-htc \
& Firmware-phanfw \
& Firmware-qat \
+ & Firmware-qcom \
& Firmware-qla1280 \
& Firmware-qla2xxx \
& Firmware-r8a779x_usb3 \
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
index 1657df6..9903c06 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -78,7 +78,7 @@
}
do_install_armmultilib () {
- oe_multilib_header asm/auxvec.h asm/bitsperlong.h asm/byteorder.h asm/fcntl.h asm/hwcap.h asm/ioctls.h asm/kvm.h asm/mman.h asm/param.h asm/perf_regs.h
+ oe_multilib_header asm/auxvec.h asm/bitsperlong.h asm/byteorder.h asm/fcntl.h asm/hwcap.h asm/ioctls.h asm/kvm.h asm/kvm_para.h asm/mman.h asm/param.h asm/perf_regs.h asm/bpf_perf_event.h
oe_multilib_header asm/posix_types.h asm/ptrace.h asm/setup.h asm/sigcontext.h asm/siginfo.h asm/signal.h asm/stat.h asm/statfs.h asm/swab.h asm/types.h asm/unistd.h
}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch
new file mode 100644
index 0000000..68b2446
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch
@@ -0,0 +1,31 @@
+From 897736166fd709906a5fdf16eb23f8fddff770b5 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Thu, 1 Mar 2018 18:31:01 -0500
+Subject: [PATCH] if_ether: move muslc ethhdr protection to uapi file
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+Upstream-Status: Pending
+---
+ include/uapi/linux/if_ether.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
+index 153c9c2..7b69b73 100644
+--- a/include/uapi/linux/if_ether.h
++++ b/include/uapi/linux/if_ether.h
+@@ -149,6 +149,12 @@
+ * This is an Ethernet frame header.
+ */
+
++#ifdef _NETINET_IF_ETHER_H /* musl */
++#define __UAPI_DEF_ETHHDR 0
++#else /* glibc uses __NETINET_IF_ETHER_H, and includes the kernel header. */
++#define __UAPI_DEF_ETHHDR 1
++#endif
++
+ /* allow libcs like musl to deactivate this, glibc does not implement this. */
+ #ifndef __UAPI_DEF_ETHHDR
+ #define __UAPI_DEF_ETHHDR 1
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
index 8bb775c..064a391 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
@@ -11,11 +11,11 @@
include/uapi/linux/libc-compat.h | 25 ++++++++-----------------
1 file changed, 8 insertions(+), 17 deletions(-)
-Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h
+Index: linux-4.15/include/uapi/linux/libc-compat.h
===================================================================
---- linux-4.8-rc4.orig/include/uapi/linux/libc-compat.h
-+++ linux-4.8-rc4/include/uapi/linux/libc-compat.h
-@@ -48,13 +48,12 @@
+--- linux-4.15.orig/include/uapi/linux/libc-compat.h 2018-02-05 17:37:44.724314379 -0500
++++ linux-4.15/include/uapi/linux/libc-compat.h 2018-02-05 17:38:02.148913820 -0500
+@@ -49,13 +49,12 @@
#ifndef _UAPI_LIBC_COMPAT_H
#define _UAPI_LIBC_COMPAT_H
@@ -33,7 +33,7 @@
* that would already be defined. */
#define __UAPI_DEF_IF_IFCONF 0
-@@ -98,15 +97,7 @@
+@@ -99,15 +98,7 @@
#define __UAPI_DEF_IN_CLASS 0
#define __UAPI_DEF_IN6_ADDR 0
@@ -49,7 +49,7 @@
#define __UAPI_DEF_SOCKADDR_IN6 0
#define __UAPI_DEF_IPV6_MREQ 0
#define __UAPI_DEF_IPPROTO_V6 0
-@@ -114,10 +105,10 @@
+@@ -115,10 +106,10 @@
#define __UAPI_DEF_IN6_PKTINFO 0
#define __UAPI_DEF_IP6_MTUINFO 0
@@ -62,7 +62,7 @@
* __UAPI_DEF_* defines and adjust appropriately. */
#define __UAPI_DEF_IN_ADDR 1
#define __UAPI_DEF_IN_IPPROTO 1
-@@ -127,7 +118,7 @@
+@@ -128,7 +119,7 @@
#define __UAPI_DEF_IN_CLASS 1
#define __UAPI_DEF_IN6_ADDR 1
@@ -71,18 +71,18 @@
* coordinate. */
#define __UAPI_DEF_IN6_ADDR_ALT 1
#define __UAPI_DEF_SOCKADDR_IN6 1
-@@ -149,7 +140,7 @@
- /* If we did not see any headers from any supported C libraries,
+@@ -170,7 +161,7 @@
* or we are being included in the kernel, then define everything
- * that we need. */
+ * that we need. Check for previous __UAPI_* definitions to give
+ * unsupported C libraries a way to opt out of any kernel definition. */
-#else /* !defined(__GLIBC__) */
+#else /* __KERNEL__ */
/* Definitions for if.h */
- #define __UAPI_DEF_IF_IFCONF 1
-@@ -182,6 +173,6 @@
- /* Definitions for xattr.h */
+ #ifndef __UAPI_DEF_IF_IFCONF
+@@ -262,6 +253,6 @@
#define __UAPI_DEF_XATTR 1
+ #endif
-#endif /* __GLIBC__ */
+#endif /* __KERNEL__ */
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
index 8dc1edc..fb7e1de 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
@@ -11,37 +11,11 @@
include/uapi/linux/libc-compat.h | 6 ++++++
2 files changed, 9 insertions(+), 1 deletion(-)
-Index: linux-4.8-rc4/include/uapi/linux/if_ether.h
+Index: linux-4.15/include/uapi/linux/libc-compat.h
===================================================================
---- linux-4.8-rc4.orig/include/uapi/linux/if_ether.h
-+++ linux-4.8-rc4/include/uapi/linux/if_ether.h
-@@ -22,6 +22,7 @@
- #define _UAPI_LINUX_IF_ETHER_H
-
- #include <linux/types.h>
-+#include <linux/libc-compat.h>
-
- /*
- * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble
-@@ -138,11 +139,12 @@
- * This is an Ethernet frame header.
- */
-
-+#if __UAPI_DEF_ETHHDR
- struct ethhdr {
- unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
- unsigned char h_source[ETH_ALEN]; /* source ether addr */
- __be16 h_proto; /* packet type ID field */
- } __attribute__((packed));
--
-+#endif
-
- #endif /* _UAPI_LINUX_IF_ETHER_H */
-Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h
-===================================================================
---- linux-4.8-rc4.orig/include/uapi/linux/libc-compat.h
-+++ linux-4.8-rc4/include/uapi/linux/libc-compat.h
-@@ -50,6 +50,12 @@
+--- linux-4.15.orig/include/uapi/linux/libc-compat.h 2018-02-05 17:40:42.338370731 -0500
++++ linux-4.15/include/uapi/linux/libc-compat.h 2018-02-05 17:40:42.334370603 -0500
+@@ -51,6 +51,12 @@
#ifndef __KERNEL__ /* we're used from userspace */
@@ -52,5 +26,5 @@
+#endif
+
/* Coordinate with libc net/if.h header. */
- #if defined(_NET_IF_H) && defined(__USE_MISC)
+ #if defined(_NET_IF_H)
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.12.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.12.bb
deleted file mode 100644
index f0d0abf..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.12.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require linux-libc-headers.inc
-
-SRC_URI_append_libc-musl = "\
- file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \
- file://0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch \
- file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \
- file://0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch \
- "
-
-SRC_URI[md5sum] = "fc454157e2d024d401a60905d6481c6b"
-SRC_URI[sha256sum] = "a45c3becd4d08ce411c14628a949d08e2433d8cdeca92036c7013980e93858ab"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.15.7.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.15.7.bb
new file mode 100644
index 0000000..a7db4c9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.15.7.bb
@@ -0,0 +1,13 @@
+require linux-libc-headers.inc
+
+SRC_URI_append_libc-musl = "\
+ file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \
+ file://0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch \
+ file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \
+ file://0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch \
+ file://0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch \
+ "
+
+
+SRC_URI[md5sum] = "8186ce63c489199b58b6a58ad2a24a94"
+SRC_URI[sha256sum] = "cd44df4b23a3e0edc14be63df95d768b9600b31c35be05fb89f93226907fc8c6"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/kernel-devsrc.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/kernel-devsrc.bb
index c1b5b77..8bbfa23 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -69,6 +69,13 @@
cp ${B}/arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
fi
+ # Remove fixdep/objtool as they won't be target binaries
+ for i in fixdep objtool; do
+ if [ -e $kerneldir/tools/objtool/$i ]; then
+ rm -rf $kerneldir/tools/objtool/$i
+ fi
+ done
+
chown -R root:root ${D}
}
# Ensure we don't race against "make scripts" during cpio
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
index 5852b42..4201faf 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -28,10 +28,13 @@
SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
-LINUX_VERSION ?= "4.12-rc+"
+LINUX_VERSION ?= "4.16-rc+"
LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}"
PV = "${LINUX_VERSION}+git${SRCPV}"
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64)"
KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.10.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.10.bb
deleted file mode 100644
index fd31bf9..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.10.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-KBRANCH ?= "standard/preempt-rt/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# Skip processing of this recipe if it is not explicitly specified as the
-# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
-# to build multiple virtual/kernel providers, e.g. as dependency of
-# core-image-rt-sdk, core-image-rt.
-python () {
- if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
- raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
-}
-
-SRCREV_machine ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_meta ?= "1d9a8200184af22f8981fa24b0e82af49c7988dd"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.10.git;branch=${KBRANCH};name=machine \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.10;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.10.17"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-LINUX_KERNEL_TYPE = "preempt-rt"
-
-COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
-
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb
index 64b1da1..5edc0fa 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb
@@ -7,17 +7,17 @@
# to build multiple virtual/kernel providers, e.g. as dependency of
# core-image-rt-sdk, core-image-rt.
python () {
- if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
- raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+ if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
+ raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}
-SRCREV_machine ?= "da775aa9aab41e8a2b4e9b44ffe268446c51759f"
-SRCREV_meta ?= "4f825eeb783a279216ee45ed3b9a63dd6837f7d7"
+SRCREV_machine ?= "705d03507a0c10dcbf9cad3ff70f5d60b70f2d99"
+SRCREV_meta ?= "46171de19220c49d670544017cfbeffc1ec70e80"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.12.git;branch=${KBRANCH};name=machine \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.12;destsuffix=${KMETA}"
-LINUX_VERSION ?= "4.12.20"
+LINUX_VERSION ?= "4.12.24"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb
new file mode 100644
index 0000000..81306a9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb
@@ -0,0 +1,41 @@
+KBRANCH ?= "v4.14/standard/preempt-rt/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# Skip processing of this recipe if it is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers, e.g. as dependency of
+# core-image-rt-sdk, core-image-rt.
+python () {
+ if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
+ raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
+SRCREV_machine ?= "7272e9132fdaaf0dd78bc94e9f297aaf73452982"
+SRCREV_meta ?= "ea9330894eea727bd1655569b16f338976b72563"
+
+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.14;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "4.14.30"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+LINUX_KERNEL_TYPE = "preempt-rt"
+
+COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.15.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.15.bb
new file mode 100644
index 0000000..c5d3ee0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.15.bb
@@ -0,0 +1,41 @@
+KBRANCH ?= "v4.15/standard/preempt-rt/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# Skip processing of this recipe if it is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers, e.g. as dependency of
+# core-image-rt-sdk, core-image-rt.
+python () {
+ if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
+ raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
+SRCREV_machine ?= "91084d030bc841c483c31e8664289c7940aa5506"
+SRCREV_meta ?= "939d935b0c992c6f1e51a7a1c9e4fbe6ef3c3174"
+
+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.15;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "4.15.13"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+LINUX_KERNEL_TYPE = "preempt-rt"
+
+COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb
deleted file mode 100644
index 97538e2..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-KBRANCH ?= "standard/preempt-rt/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# Skip processing of this recipe if it is not explicitly specified as the
-# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
-# to build multiple virtual/kernel providers, e.g. as dependency of
-# core-image-rt-sdk, core-image-rt.
-python () {
- if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
- raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
-}
-
-SRCREV_machine ?= "d5efeeeb928a0111fc187fd1e8d03d2e4e35d4a0"
-SRCREV_meta ?= "b149d14ccae8349ab33e101f6af233a12f4b17ba"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;branch=${KBRANCH};name=machine \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.4.113"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-LINUX_KERNEL_TYPE = "preempt-rt"
-
-COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb
deleted file mode 100644
index 5c016ed..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-KBRANCH ?= "standard/preempt-rt/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# Skip processing of this recipe if it is not explicitly specified as the
-# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
-# to build multiple virtual/kernel providers, e.g. as dependency of
-# core-image-rt-sdk, core-image-rt.
-python () {
- if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
- raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
-}
-
-SRCREV_machine ?= "90d1ffa36cbd36722638c97c1bb46a5874dbe28e"
-SRCREV_meta ?= "0774eacea2a7d3a150594533b8c80d0c0bfdfded"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.9.git;branch=${KBRANCH};name=machine \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.9.82"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-LINUX_KERNEL_TYPE = "preempt-rt"
-
-COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
-
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.10.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.10.bb
deleted file mode 100644
index b223497..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.10.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-KBRANCH ?= "standard/tiny/common-pc"
-LINUX_KERNEL_TYPE = "tiny"
-KCONFIG_MODE = "--allnoconfig"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-LINUX_VERSION ?= "4.10.17"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-SRCREV_machine ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_meta ?= "1d9a8200184af22f8981fa24b0e82af49c7988dd"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.10.git;branch=${KBRANCH};name=machine \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.10;destsuffix=${KMETA}"
-
-COMPATIBLE_MACHINE = "qemux86|qemux86-64"
-
-# Functionality flags
-KERNEL_FEATURES = ""
-
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb
index 0bbd8e2..31307a6 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb
@@ -4,13 +4,13 @@
require recipes-kernel/linux/linux-yocto.inc
-LINUX_VERSION ?= "4.12.20"
+LINUX_VERSION ?= "4.12.24"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "2"
-SRCREV_machine ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c"
-SRCREV_meta ?= "4f825eeb783a279216ee45ed3b9a63dd6837f7d7"
+SRCREV_machine ?= "f9d67777b07ac97966186c1b56db78afe2a16f92"
+SRCREV_meta ?= "46171de19220c49d670544017cfbeffc1ec70e80"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb
new file mode 100644
index 0000000..34bee09
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb
@@ -0,0 +1,28 @@
+KBRANCH ?= "v4.14/standard/tiny/common-pc"
+LINUX_KERNEL_TYPE = "tiny"
+KCONFIG_MODE = "--allnoconfig"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+LINUX_VERSION ?= "4.14.30"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+SRCREV_machine ?= "ad31896630f8bf6a459164263adc0a8faf984d9e"
+SRCREV_meta ?= "ea9330894eea727bd1655569b16f338976b72563"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+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.14;destsuffix=${KMETA}"
+
+COMPATIBLE_MACHINE = "qemux86|qemux86-64"
+
+# Functionality flags
+KERNEL_FEATURES = ""
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.15.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.15.bb
new file mode 100644
index 0000000..05b9ca3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.15.bb
@@ -0,0 +1,25 @@
+KBRANCH ?= "v4.15/standard/tiny/common-pc"
+LINUX_KERNEL_TYPE = "tiny"
+KCONFIG_MODE = "--allnoconfig"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+LINUX_VERSION ?= "4.15.13"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+SRCREV_machine ?= "91084d030bc841c483c31e8664289c7940aa5506"
+SRCREV_meta ?= "939d935b0c992c6f1e51a7a1c9e4fbe6ef3c3174"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+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.15;destsuffix=${KMETA}"
+
+COMPATIBLE_MACHINE = "qemux86|qemux86-64"
+
+# Functionality flags
+KERNEL_FEATURES = ""
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb
deleted file mode 100644
index 8a98189..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-KBRANCH ?= "standard/tiny/common-pc"
-LINUX_KERNEL_TYPE = "tiny"
-KCONFIG_MODE = "--allnoconfig"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-LINUX_VERSION ?= "4.4.113"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-SRCREV_machine ?= "4d31a8b7661509ff1044abcf9050750cc2478e20"
-SRCREV_meta ?= "b149d14ccae8349ab33e101f6af233a12f4b17ba"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;branch=${KBRANCH};name=machine \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}"
-
-COMPATIBLE_MACHINE = "qemux86|qemux86-64"
-
-# Functionality flags
-KERNEL_FEATURES = ""
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb
deleted file mode 100644
index 4d46802..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-KBRANCH ?= "standard/tiny/common-pc"
-LINUX_KERNEL_TYPE = "tiny"
-KCONFIG_MODE = "--allnoconfig"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-LINUX_VERSION ?= "4.9.82"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-SRCREV_machine ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc"
-SRCREV_meta ?= "0774eacea2a7d3a150594533b8c80d0c0bfdfded"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.9.git;branch=${KBRANCH};name=machine \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}"
-
-COMPATIBLE_MACHINE = "qemux86|qemux86-64"
-
-# Functionality flags
-KERNEL_FEATURES = ""
-
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc
index 9c1f61b..3bb872a 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc
@@ -12,9 +12,9 @@
# PREFERRED_PROVIDER for virtual/kernel. This avoids network access required
# by the use of AUTOREV SRCREVs, which are the default for this recipe.
python () {
- if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != d.getVar("PN"):
+ if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != d.getVar("PN"):
d.delVar("BB_DONT_CACHE")
- raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN")))
+ raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN")))
}
DEPENDS += "xz-native bc-native"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.10.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.10.bb
deleted file mode 100644
index 1fe3cca..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.10.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-KBRANCH ?= "standard/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# board specific branches
-KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs"
-KBRANCH_qemuarm64 ?= "standard/qemuarm64"
-KBRANCH_qemumips ?= "standard/mti-malta32"
-KBRANCH_qemuppc ?= "standard/qemuppc"
-KBRANCH_qemux86 ?= "standard/base"
-KBRANCH_qemux86-64 ?= "standard/base"
-KBRANCH_qemumips64 ?= "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "ae12e19cecc19af66f64a50538909cb1cad185f9"
-SRCREV_machine_qemuarm64 ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_machine_qemumips ?= "b71b80fd679a17dfb4f73b352263c49273f721d4"
-SRCREV_machine_qemuppc ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_machine_qemux86 ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_machine_qemux86-64 ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_machine_qemumips64 ?= "8bb135e71037c46175bbcc7acf387309b2e17133"
-SRCREV_machine ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_meta ?= "1d9a8200184af22f8981fa24b0e82af49c7988dd"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.10.git;name=machine;branch=${KBRANCH}; \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.10;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.10.17"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
-
-COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb
index fabf0f5..8d56012 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb
@@ -11,20 +11,22 @@
KBRANCH_qemux86-64 ?= "standard/base"
KBRANCH_qemumips64 ?= "standard/mti-malta64"
-SRCREV_machine_qemuarm ?= "42cf4d6a1bc84b90681cb82ad95c129387d76b4b"
-SRCREV_machine_qemuarm64 ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c"
-SRCREV_machine_qemumips ?= "571315a5526b9e22262cf99bae7c0dd6e5bd204c"
-SRCREV_machine_qemuppc ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c"
-SRCREV_machine_qemux86 ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c"
-SRCREV_machine_qemux86-64 ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c"
-SRCREV_machine_qemumips64 ?= "e7889ba18f060368d4ab35e70b076728d73ba622"
-SRCREV_machine ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c"
-SRCREV_meta ?= "4f825eeb783a279216ee45ed3b9a63dd6837f7d7"
+SRCREV_machine_qemuarm ?= "45824c60ca37f414a5ac5783e970338db9a5a2af"
+SRCREV_machine_qemuarm64 ?= "f9d67777b07ac97966186c1b56db78afe2a16f92"
+SRCREV_machine_qemumips ?= "66f741b0b3d093e6b6df0f44120913ef3a259e23"
+SRCREV_machine_qemuppc ?= "f9d67777b07ac97966186c1b56db78afe2a16f92"
+SRCREV_machine_qemux86 ?= "f9d67777b07ac97966186c1b56db78afe2a16f92"
+SRCREV_machine_qemux86-64 ?= "f9d67777b07ac97966186c1b56db78afe2a16f92"
+SRCREV_machine_qemumips64 ?= "c5d838c9e26bd657b49dfe28b115e5bc4b580850"
+SRCREV_machine ?= "f9d67777b07ac97966186c1b56db78afe2a16f92"
+SRCREV_meta ?= "46171de19220c49d670544017cfbeffc1ec70e80"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.12.git;name=machine;branch=${KBRANCH}; \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.12;destsuffix=${KMETA}"
-LINUX_VERSION ?= "4.12.20"
+DEPENDS += "openssl-native util-linux-native"
+
+LINUX_VERSION ?= "4.12.24"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.14.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.14.bb
new file mode 100644
index 0000000..16142f8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.14.bb
@@ -0,0 +1,47 @@
+KBRANCH ?= "v4.14/standard/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# board specific branches
+KBRANCH_qemuarm ?= "v4.14/standard/arm-versatile-926ejs"
+KBRANCH_qemuarm64 ?= "v4.14/standard/qemuarm64"
+KBRANCH_qemumips ?= "v4.14/standard/mti-malta32"
+KBRANCH_qemuppc ?= "v4.14/standard/qemuppc"
+KBRANCH_qemux86 ?= "v4.14/standard/base"
+KBRANCH_qemux86-64 ?= "v4.14/standard/base"
+KBRANCH_qemumips64 ?= "v4.14/standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "d6268fc3460d3904fd49087f7a822efbaab9bfe8"
+SRCREV_machine_qemuarm64 ?= "c94189843b8ad62cafe9a307e7f7d60741690505"
+SRCREV_machine_qemumips ?= "4afd92347b2b35dc8e0006712f8fa00ac57f2a36"
+SRCREV_machine_qemuppc ?= "e8af5c9b65c5187d148ecd11bd7979489460ca64"
+SRCREV_machine_qemux86 ?= "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
+SRCREV_machine_qemux86-64 ?= "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
+SRCREV_machine_qemumips64 ?= "9863b327e770b42b8c18da3e0cfaf06e8f99ae97"
+SRCREV_machine ?= "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
+SRCREV_meta ?= "ea9330894eea727bd1655569b16f338976b72563"
+
+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.14;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "4.14.30"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+
+COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.15.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.15.bb
new file mode 100644
index 0000000..70bd711
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.15.bb
@@ -0,0 +1,47 @@
+KBRANCH ?= "v4.15/standard/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# board specific branches
+KBRANCH_qemuarm ?= "v4.15/standard/arm-versatile-926ejs"
+KBRANCH_qemuarm64 ?= "v4.15/standard/qemuarm64"
+KBRANCH_qemumips ?= "v4.15/standard/mti-malta32"
+KBRANCH_qemuppc ?= "v4.15/standard/qemuppc"
+KBRANCH_qemux86 ?= "v4.15/standard/base"
+KBRANCH_qemux86-64 ?= "v4.15/standard/base"
+KBRANCH_qemumips64 ?= "v4.15/standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "4b6902b42f47593928117b2ff0900cd965cf6443"
+SRCREV_machine_qemuarm64 ?= "91084d030bc841c483c31e8664289c7940aa5506"
+SRCREV_machine_qemumips ?= "19ba2d843750ff65d8fe590acdfc99aea6153945"
+SRCREV_machine_qemuppc ?= "91084d030bc841c483c31e8664289c7940aa5506"
+SRCREV_machine_qemux86 ?= "91084d030bc841c483c31e8664289c7940aa5506"
+SRCREV_machine_qemux86-64 ?= "91084d030bc841c483c31e8664289c7940aa5506"
+SRCREV_machine_qemumips64 ?= "97000c3f4664643bac7828bbdc048f7ec216cc31"
+SRCREV_machine ?= "91084d030bc841c483c31e8664289c7940aa5506"
+SRCREV_meta ?= "939d935b0c992c6f1e51a7a1c9e4fbe6ef3c3174"
+
+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.15;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "4.15.13"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+
+COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb
deleted file mode 100644
index 97c16d5..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-KBRANCH ?= "standard/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# board specific branches
-KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs"
-KBRANCH_qemuarm64 ?= "standard/qemuarm64"
-KBRANCH_qemumips ?= "standard/mti-malta32"
-KBRANCH_qemuppc ?= "standard/qemuppc"
-KBRANCH_qemux86 ?= "standard/base"
-KBRANCH_qemux86-64 ?= "standard/base"
-KBRANCH_qemumips64 ?= "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "400c0f39b954cd8fffdf53e6ec97852b73fea7af"
-SRCREV_machine_qemuarm64 ?= "4d31a8b7661509ff1044abcf9050750cc2478e20"
-SRCREV_machine_qemumips ?= "fb03a9472367b6c177729ac631326aafd5d17c92"
-SRCREV_machine_qemuppc ?= "4d31a8b7661509ff1044abcf9050750cc2478e20"
-SRCREV_machine_qemux86 ?= "4d31a8b7661509ff1044abcf9050750cc2478e20"
-SRCREV_machine_qemux86-64 ?= "4d31a8b7661509ff1044abcf9050750cc2478e20"
-SRCREV_machine_qemumips64 ?= "26b8ba186a6d39728fc1510bd2264110c75842f5"
-SRCREV_machine ?= "4d31a8b7661509ff1044abcf9050750cc2478e20"
-SRCREV_meta ?= "b149d14ccae8349ab33e101f6af233a12f4b17ba"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;name=machine;branch=${KBRANCH}; \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.4.113"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.9.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.9.bb
deleted file mode 100644
index a5a165f..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.9.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-KBRANCH ?= "standard/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# board specific branches
-KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs"
-KBRANCH_qemuarm64 ?= "standard/qemuarm64"
-KBRANCH_qemumips ?= "standard/mti-malta32"
-KBRANCH_qemuppc ?= "standard/qemuppc"
-KBRANCH_qemux86 ?= "standard/base"
-KBRANCH_qemux86-64 ?= "standard/base"
-KBRANCH_qemumips64 ?= "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "23369eb7e07c839fa73a8c1e85aba37a07bf14c1"
-SRCREV_machine_qemuarm64 ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc"
-SRCREV_machine_qemumips ?= "cab9e059447878f5383f91a05db12813f69cbfc1"
-SRCREV_machine_qemuppc ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc"
-SRCREV_machine_qemux86 ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc"
-SRCREV_machine_qemux86-64 ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc"
-SRCREV_machine_qemumips64 ?= "c2e5ef83b612d50f50fafeed9930dbea302fbe8c"
-SRCREV_machine ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc"
-SRCREV_meta ?= "0774eacea2a7d3a150594533b8c80d0c0bfdfded"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.9.git;name=machine;branch=${KBRANCH}; \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.9.82"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
-
-COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.5.3.bb b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.5.3.bb
deleted file mode 100644
index 4d81da0..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.5.3.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "Babeltrace - Trace Format Babel Tower"
-DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log."
-HOMEPAGE = "http://www.efficios.com/babeltrace/"
-BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
-
-LICENSE = "MIT & GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
-
-DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
-
-inherit autotools pkgconfig
-
-SRC_URI = "http://www.efficios.com/files/babeltrace/babeltrace-${PV}.tar.bz2 \
-"
-
-EXTRA_OECONF = "--disable-debug-info"
-
-SRC_URI[md5sum] = "0cec2745ac316649791c43f416d71ea1"
-SRC_URI[sha256sum] = "2249fee5beba657731f5d6a84c5296c6517f544bfbe7571bd1fd7af23726137c"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.5.4.bb b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.5.4.bb
new file mode 100644
index 0000000..a29402a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.5.4.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Babeltrace - Trace Format Babel Tower"
+DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log."
+HOMEPAGE = "http://www.efficios.com/babeltrace/"
+BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
+
+LICENSE = "MIT & GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
+
+DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
+
+inherit autotools pkgconfig
+
+SRC_URI = "http://www.efficios.com/files/babeltrace/babeltrace-${PV}.tar.bz2 \
+"
+
+EXTRA_OECONF = "--disable-debug-info"
+
+SRC_URI[md5sum] = "3e8cdafec3ac0346a389870e87bf1344"
+SRC_URI[sha256sum] = "9643039923a0abc75a25b3d594cee0017423b57f10d2b625e96ed1e8d4891fc1"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb
index 6e92c22..93626dd 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb
@@ -25,6 +25,7 @@
PACKAGECONFIG[kmod] = "--enable-kmod, --disable-kmod, kmod"
PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native"
PACKAGECONFIG_remove_libc-musl = "lttng-ust"
+PACKAGECONFIG_remove_riscv64 = "lttng-ust"
SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
file://x32.patch \
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch
index 0f18c5d..bff8527 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch
@@ -6,13 +6,12 @@
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
-Index: doc/Makefile.am
+Index: lttng-ust-2.9.1/doc/Makefile.am
===================================================================
---- a/doc/Makefile.am
-+++ b/doc/Makefile.am
-@@ -1,4 +1,4 @@
+--- lttng-ust-2.9.1.orig/doc/Makefile.am
++++ lttng-ust-2.9.1/doc/Makefile.am
+@@ -1,3 +1,3 @@
-SUBDIRS = . man examples
+SUBDIRS = . man
- dist_man_MANS = man/lttng-gen-tp.1 \
- man/lttng-ust.3 \
+ dist_doc_DATA = java-agent.txt
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb b/import-layers/yocto-poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
new file mode 100644
index 0000000..97c58c5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Build tools needed by external modules"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+inherit kernel-arch
+inherit pkgconfig
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+S = "${WORKDIR}"
+
+do_configure[depends] += "virtual/kernel:do_shared_workdir openssl-native:do_populate_sysroot"
+do_compile[depends] += "virtual/kernel:do_compile_kernelmodules"
+
+DEPENDS += "bc-native"
+
+EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
+
+# Build some host tools under work-shared. CC, LD, and AR are probably
+# not used, but this is the historical way of invoking "make scripts".
+#
+do_configure() {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
+ -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts prepare
+
+}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc
deleted file mode 100644
index 4b01654..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc
+++ /dev/null
@@ -1,65 +0,0 @@
-SUMMARY = "System-Wide Profiler"
-DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \
-of profiling all running code at low overhead."
-HOMEPAGE = "http://oprofile.sourceforge.net/news/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=16191&atid=116191"
-
-LICENSE = "LGPLv2.1+ & GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://libopagent/opagent.h;beginline=5;endline=26;md5=4f16f72c7a493d8a4704aa18d03d15c6 \
- "
-SECTION = "devel"
-
-DEPENDS = "popt binutils"
-RDEPENDS_${PN} = "binutils-symlinks"
-RRECOMMENDS_${PN} = "kernel-vmlinux"
-
-FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*${SOLIBS} ${datadir}/${BPN}"
-FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la"
-FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
- file://acinclude.m4 \
- file://automake-foreign.patch \
- file://oprofile-cross-compile-tests.patch \
- file://run-ptest \
- file://root-home-dir.patch \
- file://0001-Add-rmb-definition-for-NIOS2-architecture.patch \
- file://0001-Fix-FTBFS-problem-with-GCC-6.patch \
-"
-UPSTREAM_CHECK_REGEX = "oprofile-(?P<pver>\d+(\.\d+)+)/"
-UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/oprofile/files/oprofile/"
-
-SRC_URI_append_libc-musl = " file://musl.patch"
-
-inherit autotools pkgconfig ptest
-
-EXTRA_OECONF = "--with-kernel=${STAGING_DIR_HOST}${prefix} --without-x ac_cv_prog_XSLTPROC="
-do_configure () {
- cp ${WORKDIR}/acinclude.m4 ${S}/
- autotools_do_configure
-}
-
-EXTRA_OEMAKE = "SRCDIR=${PTEST_PATH}/libutil++/tests"
-do_compile_ptest() {
- oe_runmake check
-}
-
-do_install_ptest() {
- subdirs="libdb/tests libutil++/tests libregex/tests libutil/tests libop/tests libdb/tests "
- for tooltest in ${subdirs}
- do
- find ${tooltest} -perm /u=x -type f| cpio -pvdu ${D}${PTEST_PATH}
- done
-
- # needed by some libop tests
- cp -r events ${D}${PTEST_PATH}
-
- # needed by libregex regex_test
- cp libregex/stl.pat ${D}${PTEST_PATH}/libregex
- cp libregex/tests/mangled-name ${D}${PTEST_PATH}/libregex/tests
-
- # needed by litutil++ file_manip_tests
- cp ${S}/libutil++/tests/file_manip_tests.cpp \
- libutil++/tests/file_manip_tests.o ${D}${PTEST_PATH}/libutil++/tests
-}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch
deleted file mode 100644
index ae8562a..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 34b0d9b1a32fb404a30327a7ae8931c7c75583bf Mon Sep 17 00:00:00 2001
-From: Marek Vasut <marex@denx.de>
-Date: Tue, 9 Feb 2016 02:00:29 +0100
-Subject: [PATCH] Add rmb() definition for NIOS2 architecture
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Submitted [ http://marc.info/?l=oprofile-list&m=145501915931874&w=2 ]
----
- libperf_events/operf_utils.h | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libperf_events/operf_utils.h b/libperf_events/operf_utils.h
-index 32954cc..8270e53 100644
---- a/libperf_events/operf_utils.h
-+++ b/libperf_events/operf_utils.h
-@@ -178,6 +178,11 @@ void op_release_resources(void);
- #define cpu_relax() asm volatile("" ::: "memory")
- #endif
-
-+#ifdef __nios2__
-+#define rmb() asm volatile("" ::: "memory")
-+#define cpu_relax() asm volatile("" ::: "memory")
-+#endif
-+
- #ifdef __tile__
- #include <asm/unistd.h>
- #define rmb() __insn_mf()
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch
deleted file mode 100644
index d372fd5..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 39d4d46a0bd504ac708ffe72df87bf74cd12ad30 Mon Sep 17 00:00:00 2001
-From: William Cohen <wcohen@redhat.com>
-Date: Fri, 5 Feb 2016 17:30:19 -0500
-Subject: [PATCH] Fix FTBFS problem with GCC-6
-
-GCC-6 is pickier about some of the type conversions causing the Fedora
-24 mass rebuild the build of oprofile failed with:
-
-make[3]: Entering directory '/builddir/build/BUILD/oprofile-1.1.0/libutil++'
-g++ -DHAVE_CONFIG_H -I. -I.. -I ../libutil -I ../libop -I ../libpp -W -Wall -fno-common -ftemplate-depth-50 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c -o op_bfd.o op_bfd.cpp
-op_bfd.cpp: In member function 'void op_bfd::get_symbol_range(symbol_index_t, long long unsigned int&, long long unsigned int&) const':
-op_bfd.cpp:538:47: error: cannot convert 'std::ostream {aka std::basic_ostream<char>}' to 'const bool' in initialization
- bool const verbose = cverb << (vbfd & vlevel1);
- ^
-op_bfd.cpp:546:7: error: in argument to unary !
- if (!verbose)
- ^~~~~~~
-
-Avoid the intermediate bool type to make GCC-6 happy.
-
-Signed-off-by: William Cohen <wcohen@redhat.com>
----
-Upstream-Status: Backport
-
- libutil++/op_bfd.cpp | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/libutil++/op_bfd.cpp b/libutil++/op_bfd.cpp
-index 389c920..f2eb42b 100644
---- a/libutil++/op_bfd.cpp
-+++ b/libutil++/op_bfd.cpp
-@@ -535,15 +535,13 @@ void op_bfd::get_symbol_range(symbol_index_t sym_idx,
- {
- op_bfd_symbol const & sym = syms[sym_idx];
-
-- bool const verbose = cverb << (vbfd & vlevel1);
--
- if (anon_obj)
- start = sym.vma();
- else
- start = sym.filepos();
- end = start + sym.size();
-
-- if (!verbose)
-+ if (!(cverb << (vbfd & vlevel1)))
- return;
-
- io_state state(cverb << (vbfd & vlevel1));
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/acinclude.m4 b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/acinclude.m4
deleted file mode 100644
index 95ecd91..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/acinclude.m4
+++ /dev/null
@@ -1,581 +0,0 @@
-dnl AX_KERNEL_OPTION(option, action-if-found, action-if-not-found)
-dnl see if autoconf.h defines the option
-AC_DEFUN([AX_KERNEL_OPTION], [
-SAVE_CFLAGS=$CFLAGS
-CFLAGS="-I$KINC -O2 -D__KERNEL__"
-AC_TRY_COMPILE( [#include <linux/config.h>],
-[
-#ifndef $1
-break_me_hard(\\\);
-#endif
-],[$2],[$3],)
-CFLAGS=$SAVE_CFLAGS
-])
-
-dnl Handle the 2.4 module inside module/
-AC_DEFUN([AX_CONFIG_MODULE],
-[
-if test ! -f $KINC/linux/autoconf.h; then
- AC_MSG_ERROR([no suitably configured kernel include tree found])
-fi
-
-dnl --- Get Linux kernel version and compile parameters ---
-
-AC_SUBST(KVERS)
-AC_MSG_CHECKING([for kernel version])
-dnl it's like this to handle mandrake's fubar version.h - bug #471448
-eval KVERS=`gcc -I$KINC -E -dM $KINC/linux/version.h | grep -w UTS_RELEASE | awk '{print $[]3}'`
-AC_MSG_RESULT([$KVERS])
-case "$KVERS" in
-2.2.*|2.4.*) ;;
-*) AC_MSG_ERROR([Unsupported kernel version])
-esac
-
-dnl Check for the minimal kernel version supported
-AC_MSG_CHECKING([kernel version])
-AX_KERNEL_VERSION(2, 2, 10, <=, AC_MSG_RESULT([ok]), AC_MSG_ERROR([check html documentation install section]))
-
-dnl linux/spinlock.h added at some point in past
-AC_MSG_CHECKING([for $KINC/linux/spinlock.h])
-if test -f $KINC/linux/spinlock.h; then
- EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DHAVE_LINUX_SPINLOCK_HEADER"
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-AC_MSG_CHECKING([for rtc_lock])
-gcc -I$KINC -E $KINC/linux/mc146818rtc.h | grep rtc_lock >/dev/null
-if test "$?" -eq 0; then
- EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DRTC_LOCK"
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-arch="unknown"
-AC_MSG_CHECKING(for x86-64 architecture)
-AX_KERNEL_OPTION(CONFIG_X86_64, x8664=1, x8664=0)
-AX_MSG_RESULT_YN($x8664)
-BUILD_HAMMER=no
-if test "$x8664" -eq 1; then
- arch="x86"
- BUILD_HAMMER=yes
-else
- AC_MSG_CHECKING(for x86 architecture)
- AX_KERNEL_OPTION(CONFIG_X86, x86=1, x86=0)
- AX_KERNEL_OPTION(CONFIG_X86_WP_WORKS_OK, x86=1, x86=$x86)
- AX_MSG_RESULT_YN($x86)
- test "$x86" = 1 && arch="x86"
-
- if test "$arch" = "unknown"; then
- AC_MSG_CHECKING(for ia64 architecture)
- AX_KERNEL_OPTION(CONFIG_IA64, ia64=1, ia64=0)
- AX_MSG_RESULT_YN($ia64)
- test "$ia64" = 1 && arch="ia64"
- fi
-
-fi
-AC_SUBST(BUILD_HAMMER)
-
-test "$arch" = "unknown" && AC_MSG_ERROR(Unsupported architecture)
-
-dnl check to see if kernel verion appropriate for arch
-AC_MSG_CHECKING(arch/kernel version combination)
-case "$arch" in
-ia64)
- AX_KERNEL_VERSION(2, 4, 18, <, AC_MSG_RESULT([ok]),
- AC_MSG_ERROR([unsupported arch/kernel])) ;;
-*) AC_MSG_RESULT([ok])
-esac
-
-dnl for now we do not support PREEMPT patch
-AC_MSG_CHECKING([for preempt patch])
-AX_KERNEL_OPTION(CONFIG_PREEMPT,preempt=1,preempt=0)
-AX_MSG_RESULT_YN([$preempt])
-test "$preempt" = 0 || AC_MSG_ERROR([unsupported kernel configuration : CONFIG_PREEMPT])
-
-AC_SUBST(KINC)
-
-MODINSTALLDIR=/lib/modules/$KVERS
-
-OPROFILE_MODULE_ARCH=$arch
-AC_SUBST(OPROFILE_MODULE_ARCH)
-]
-)
-
-dnl AX_MSG_RESULT_YN(a)
-dnl results "yes" iff a==1, "no" else
-AC_DEFUN([AX_MSG_RESULT_YN], [x=no
-test "x$1" = "x1" && x=yes
-AC_MSG_RESULT($x)])
-
-dnl AX_MALLOC_ATTRIBUTE - see if gcc will take __attribute__((malloc))
-AC_DEFUN([AX_MALLOC_ATTRIBUTE],
-[
-AC_MSG_CHECKING([whether malloc attribute is understood])
-SAVE_CFLAGS=$CFLAGS
-CFLAGS="-Werror $CFLAGS"
-AC_TRY_COMPILE(,[
-void monkey() __attribute__((malloc));
-],AC_MSG_RESULT([yes]); AC_DEFINE(MALLOC_ATTRIBUTE_OK, 1, [whether malloc attribute is understood]), AC_MSG_RESULT([no]))
-CFLAGS=$SAVE_CFLAGS
-]
-)
-
-dnl builtin_expect is used in module we can't add that in config.h
-AC_DEFUN([AX_BUILTIN_EXPECT],
-[
-AC_MSG_CHECKING([whether __builtin_expect is understood])
-SAVE_CFLAGS=$CFLAGS
-CFLAGS="-Werror $CFLAGS"
-AC_TRY_LINK(,[
-int i;
-if (__builtin_expect(i, 0)) { }
-],
-AC_MSG_RESULT([yes]); EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DEXPECT_OK",
-AC_MSG_RESULT([no]);)
-CFLAGS=$SAVE_CFLAGS
-]
-)
-
-dnl AX_EXTRA_DIRS - Let user specify extra dirs for include/libs
-AC_DEFUN([AX_EXTRA_DIRS],
-[
-AC_ARG_WITH(extra-includes,
-[ --with-extra-includes=DIR add extra include paths],
- use_extra_includes="$withval",
- use_extra_includes=NO
-)
-if test -n "$use_extra_includes" && \
- test "$use_extra_includes" != "NO"; then
- ac_save_ifs=$IFS
- IFS=':'
- for dir in $use_extra_includes; do
- extra_includes="$extra_includes -I$dir"
- done
- IFS=$ac_save_ifs
- CPPFLAGS="$CPPFLAGS $extra_includes"
-fi
-
-AC_ARG_WITH(extra-libs,
-[ --with-extra-libs=DIR add extra library paths],
- use_extra_libs=$withval,
- use_extra_libs=NO
-)
-if test -n "$use_extra_libs" && \
- test "$use_extra_libs" != "NO"; then
- ac_save_ifs=$IFS
- IFS=':'
- for dir in $use_extra_libs; do
- extra_libraries="$extra_libraries -L$dir"
- done
- IFS=$ac_save_ifs
- LDFLAGS="$LDFLAGS $extra_libraries"
-fi
-]
-)
-
-dnl AX_POPT_CONST - check popt prototype
-AC_DEFUN([AX_POPT_CONST],
-[
-AC_MSG_CHECKING([popt prototype])
-SAVE_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="-Werror $CXXFLAGS"
-AC_TRY_COMPILE([#include <popt.h>],
-[
-int c; char **v;
-poptGetContext(0, c, v, 0, 0);
-],
-AC_MSG_RESULT([takes char **]);,
-AC_MSG_RESULT([takes const char **]); AC_DEFINE(CONST_POPT, 1, [whether popt prototype takes a const char **]))
-CXXFLAGS="$SAVE_CXXFLAGS"
-]
-)
-
-dnl AX_CHECK_SSTREAM - check if local sstream is needed to compile OK
-AC_DEFUN([AX_CHECK_SSTREAM],
-[
-AC_MSG_CHECKING([whether to use included sstream])
-AC_TRY_COMPILE([#include <sstream>], [],
-AC_MSG_RESULT([no]);,
-AC_MSG_RESULT([yes]); OP_CXXFLAGS="$OP_CXXFLAGS -I\${top_srcdir}/include")
-]
-)
-
-dnl AX_CHECK_TYPEDEF(typedef_name, type, action-if-true, action-if-false)
-dnl exec action-if-true if typedef_name is a typedef to type else exec
-dnl action-if-false
-dnl currently work only with type typedef'ed in stddef.h
-AC_DEFUN([AX_CHECK_TYPEDEF], [
-dnl AC_LANG_PUSH(C) not in autoconf 2.13
-AC_LANG_SAVE
-AC_LANG_C
-SAVE_CFLAGS=$CFLAGS
-CFLAGS="-Werror $CFLAGS"
-
-AC_TRY_COMPILE(
- [
- #include <stddef.h>
- ],
- [
- typedef void (*fct1)($1);
- typedef void (*fct2)($2);
- fct1 f1 = 0;
- fct2 f2 = 0;
- if (f1 == f2) {}
- ],
-[$3],[$4])
-
-CFLAGS=$SAVE_CFLAGS
-AC_LANG_RESTORE
-])
-
-
-dnl AX_TYPEDEFED_NAME(typedef_name, candidate_list, var_name)
-dnl set var_name to the typedef name of $1 which must be in canditate_list
-dnl else produce a fatal error
-AC_DEFUN([AX_TYPEDEFED_NAME], [
- AC_MSG_CHECKING([type of $1])
- for f in $2; do
- AX_CHECK_TYPEDEF($1, $f, $3="$f", $3="")
- if test -n "${$3}"; then
- break
- fi
- done
- if test -n "${$3}"; then
- AC_MSG_RESULT([${$3}])
- else
- AC_MSG_ERROR([not found])
- fi
-])
-
-dnl find a binary in the path
-AC_DEFUN([QT_FIND_PATH],
-[
- AC_MSG_CHECKING([for $1])
- AC_CACHE_VAL(qt_cv_path_$1,
- [
- qt_cv_path_$1="NONE"
- if test -n "$$2"; then
- qt_cv_path_$1="$$2";
- else
- dirs="$3"
- qt_save_IFS=$IFS
- IFS=':'
- for dir in $PATH; do
- dirs="$dirs $dir"
- done
- IFS=$qt_save_IFS
-
- for dir in $dirs; do
- if test -x "$dir/$1"; then
- if test -n "$5"; then
- evalstr="$dir/$1 $5 2>&1 "
- if eval $evalstr; then
- qt_cv_path_$1="$dir/$1"
- break
- fi
- else
- qt_cv_path_$1="$dir/$1"
- break
- fi
- fi
- done
- fi
- ])
-
- if test -z "$qt_cv_path_$1" || test "$qt_cv_path_$1" = "NONE"; then
- AC_MSG_RESULT(not found)
- $4
- else
- AC_MSG_RESULT($qt_cv_path_$1)
- $2=$qt_cv_path_$1
- fi
-])
-
-dnl Find the uic compiler on the path or in qt_cv_dir
-AC_DEFUN([QT_FIND_UIC],
-[
- QT_FIND_PATH(uic, ac_uic, $qt_cv_dir/bin)
- if test -z "$ac_uic" -a "$FATAL" = 1; then
- AC_MSG_ERROR([uic binary not found in \$PATH or $qt_cv_dir/bin !])
- fi
-])
-
-dnl Find the right moc in path/qt_cv_dir
-AC_DEFUN([QT_FIND_MOC],
-[
- QT_FIND_PATH(moc2, ac_moc2, $qt_cv_dir/bin)
- QT_FIND_PATH(moc, ac_moc1, $qt_cv_dir/bin)
-
- if test -n "$ac_moc1" -a -n "$ac_moc2"; then
- dnl found both. Prefer Qt3's if it exists else moc2
- $ac_moc1 -v 2>&1 | grep "Qt 3" >/dev/null
- if test "$?" = 0; then
- ac_moc=$ac_moc1;
- else
- ac_moc=$ac_moc2;
- fi
- else
- if test -n "$ac_moc1"; then
- ac_moc=$ac_moc1;
- else
- ac_moc=$ac_moc2;
- fi
- fi
-
- if test -z "$ac_moc" -a "$FATAL" = 1; then
- AC_MSG_ERROR([moc binary not found in \$PATH or $qt_cv_dir/bin !])
- fi
-])
-
-dnl check a particular libname
-AC_DEFUN([QT_TRY_LINK],
-[
- SAVE_LIBS="$LIBS"
- LIBS="$LIBS $1"
- AC_TRY_LINK([
- #include <qglobal.h>
- #include <qstring.h>
- ],
- [
- QString s("mangle_failure");
- #if (QT_VERSION < 221)
- break_me_(\\\);
- #endif
- ],
- qt_cv_libname=$1,
- )
- LIBS="$SAVE_LIBS"
-])
-
-dnl check we can do a compile
-AC_DEFUN([QT_CHECK_COMPILE],
-[
- AC_MSG_CHECKING([for Qt library name])
-
- AC_CACHE_VAL(qt_cv_libname,
- [
- AC_LANG_CPLUSPLUS
- SAVE_CXXFLAGS=$CXXFLAGS
- CXXFLAGS="$CXXFLAGS $QT_INCLUDES $QT_LDFLAGS"
-
- for libname in -lqt-mt -lqt3 -lqt2 -lqt;
- do
- QT_TRY_LINK($libname)
- if test -n "$qt_cv_libname"; then
- break;
- fi
- done
-
- CXXFLAGS=$SAVE_CXXFLAGS
- ])
-
- if test -z "$qt_cv_libname"; then
- AC_MSG_RESULT([failed])
- if test "$FATAL" = 1 ; then
- AC_MSG_ERROR([Cannot compile a simple Qt executable. Check you have the right \$QTDIR !])
- fi
- else
- AC_MSG_RESULT([$qt_cv_libname])
- fi
-])
-
-dnl get Qt version we're using
-AC_DEFUN([QT_GET_VERSION],
-[
- AC_CACHE_CHECK([Qt version],lyx_cv_qtversion,
- [
- AC_LANG_CPLUSPLUS
- SAVE_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $QT_INCLUDES"
-
- cat > conftest.$ac_ext <<EOF
-#line __oline__ "configure"
-#include "confdefs.h"
-#include <qglobal.h>
-"%%%"QT_VERSION_STR"%%%"
-EOF
- lyx_cv_qtversion=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \
- grep '^"%%%"' 2>/dev/null | \
- sed -e 's/"%%%"//g' -e 's/"//g'`
- rm -f conftest.$ac_ext
- CPPFLAGS=$SAVE_CPPFLAGS
- ])
-
- QT_VERSION=$lyx_cv_qtversion
- AC_SUBST(QT_VERSION)
-])
-
-dnl start here
-AC_DEFUN([QT_DO_IT_ALL],
-[
- dnl Please leave this alone. I use this file in
- dnl oprofile.
- FATAL=0
-
- AC_ARG_WITH(qt-dir, [ --with-qt-dir where the root of Qt is installed ],
- [ qt_cv_dir=`eval echo "$withval"/` ])
-
- AC_ARG_WITH(qt-includes, [ --with-qt-includes where the Qt includes are. ],
- [ qt_cv_includes=`eval echo "$withval"` ])
-
- AC_ARG_WITH(qt-libraries, [ --with-qt-libraries where the Qt library is installed.],
- [ qt_cv_libraries=`eval echo "$withval"` ])
-
- dnl pay attention to $QTDIR unless overridden
- if test -z "$qt_cv_dir"; then
- qt_cv_dir=$QTDIR
- fi
-
- dnl derive inc/lib if needed
- if test -n "$qt_cv_dir"; then
- if test -z "$qt_cv_includes"; then
- qt_cv_includes=$qt_cv_dir/include
- fi
- if test -z "$qt_cv_libraries"; then
- qt_cv_libraries=$qt_cv_dir/lib
- fi
- fi
-
- dnl flags for compilation
- QT_INCLUDES=
- QT_LDFLAGS=
- if test -n "$qt_cv_includes"; then
- QT_INCLUDES="-I$qt_cv_includes"
- fi
- if test -n "$qt_cv_libraries"; then
- QT_LDFLAGS="-L$qt_cv_libraries"
- fi
- AC_SUBST(QT_INCLUDES)
- AC_SUBST(QT_LDFLAGS)
-
- QT_FIND_MOC
- MOC=$ac_moc
- AC_SUBST(MOC)
- QT_FIND_UIC
- UIC=$ac_uic
- AC_SUBST(UIC)
-
- QT_CHECK_COMPILE
-
- QT_LIB=$qt_cv_libname;
- AC_SUBST(QT_LIB)
-
- if test -n "$qt_cv_libname"; then
- QT_GET_VERSION
- fi
-])
-
-dnl AX_CXXFLAGS_OPTIONS(var-name, option)
-dnl add option to var-name if $CXX support it.
-AC_DEFUN([AX_CHECK_PRECOMPILED_HEADER], [
-AC_MSG_CHECKING([whether ${CXX} support precompiled header])
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-SAVE_CXXFLAGS=$CXXFLAGS
-dnl we consider than if -Winvalid-pch is accepted pch will works ...
-CXXFLAGS=-Winvalid-pch
-dnl but we don't want -Winvalid-pch else compilation will fail due -Werror and
-dnl the fact than some pch will be invalid for the given compilation option
-AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} -include bits/stdc++.h", AC_MSG_RESULT([no]))
-CXXFLAGS=$SAVE_CXXFLAGS
-AC_LANG_RESTORE
-])
-
-dnl AX_CHECK_DOCBOOK
-AC_DEFUN([AX_CHECK_DOCBOOK], [
-# It's just rude to go over the net to build
-XSLTPROC_FLAGS=--nonet
-DOCBOOK_ROOT=
-if test ! -f /etc/xml/catalog; then
- for i in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/sgml/docbook/xsl-stylesheets/;
- do
- if test -d "$i"; then
- DOCBOOK_ROOT=$i
- fi
- done
-
- # Last resort - try net
- if test -z "$DOCBOOK_ROOT"; then
- XSLTPROC_FLAGS=
- fi
-else
- XML_CATALOG=/etc/xml/catalog
- CAT_ENTRY_START='<!--'
- CAT_ENTRY_END='-->'
-fi
-
-AC_CHECK_PROG(XSLTPROC,xsltproc,xsltproc,)
-XSLTPROC_WORKS=no
-if test -n "$XSLTPROC"; then
- AC_MSG_CHECKING([whether xsltproc works])
-
- if test -n "$XML_CATALOG"; then
- DB_FILE="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"
- else
- DB_FILE="$DOCBOOK_ROOT/docbook.xsl"
- fi
-
- $XSLTPROC $XSLTPROC_FLAGS $DB_FILE >/dev/null 2>&1 << END
-<?xml version="1.0" encoding='ISO-8859-1'?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<book id="test">
-</book>
-END
- if test "$?" = 0; then
- XSLTPROC_WORKS=yes
- fi
- AC_MSG_RESULT($XSLTPROC_WORKS)
-fi
-AM_CONDITIONAL(have_xsltproc, test "$XSLTPROC_WORKS" = "yes")
-
-AC_SUBST(XML_CATALOG)
-AC_SUBST(XSLTPROC_FLAGS)
-AC_SUBST(DOCBOOK_ROOT)
-AC_SUBST(CAT_ENTRY_START)
-AC_SUBST(CAT_ENTRY_END)
-])
-
-dnl AX_CFLAGS_OPTIONS(var-name, option)
-dnl add option to var-name if $CC support it.
-AC_DEFUN([AX_CFLAGS_OPTION], [
-AC_MSG_CHECKING([whether ${CC} $2 is understood])
-AC_LANG_SAVE
-AC_LANG_C
-SAVE_CFLAGS=$CFLAGS
-CFLAGS=$2
-AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no]))
-CFLAGS=$SAVE_CFLAGS
-AC_LANG_RESTORE
-])
-
-
-dnl AX_CXXFLAGS_OPTIONS(var-name, option)
-dnl add option to var-name if $CXX support it.
-AC_DEFUN([AX_CXXFLAGS_OPTION], [
-AC_MSG_CHECKING([whether ${CXX} $2 is understood])
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-SAVE_CXXFLAGS=$CXXFLAGS
-CXXFLAGS=$2
-AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no]))
-CXXFLAGS=$SAVE_CXXFLAGS
-AC_LANG_RESTORE
-])
-
-dnl AX_COPY_IF_CHANGE(source, dest)
-dnl copy source to dest if they don't compare equally or if dest doesn't exist
-AC_DEFUN([AX_COPY_IF_CHANGE], [
-if test -r $2; then
- if cmp $1 $2 > /dev/null; then
- echo $2 is unchanged
- else
- cp -f $1 $2
- fi
-else
- cp -f $1 $2
-fi
-])
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch
deleted file mode 100644
index b9bb6c5..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-oprofile doesn't want GNU-levels of automake strictness so tell it to be "foreign".
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/configure.ac b/configure.ac
-index 5740585..cf6c316 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -16 +16 @@ AC_CONFIG_SRCDIR([libop/op_config.h])
--AM_INIT_AUTOMAKE
-+AM_INIT_AUTOMAKE([foreign])
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/musl.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/musl.patch
deleted file mode 100644
index 51db408..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/musl.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Fix glibc-isms so that oprofile builds with musl.
-
-Patch taken from openwrt (https://github.com/openwrt-mirror/openwrt/blob/master/package/devel/oprofile/patches/100-musl.patch)
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
---- a/pe_profiling/operf.cpp
-+++ b/pe_profiling/operf.cpp
-@@ -857,11 +857,14 @@ static int __delete_old_previous_sample_
- int tflag __attribute__((unused)),
- struct FTW *ftwbuf __attribute__((unused)))
- {
-+ int err;
-+
- if (remove(fpath)) {
-+ err = errno;
- perror("sample data removal error");
-- return FTW_STOP;
-+ return err;
- } else {
-- return FTW_CONTINUE;
-+ return 0;
- }
- }
-
-@@ -896,7 +899,7 @@ static void convert_sample_data(void)
- return;
-
- if (!operf_options::append) {
-- int flags = FTW_DEPTH | FTW_ACTIONRETVAL;
-+ int flags = FTW_DEPTH;
- errno = 0;
- if (nftw(previous_sampledir.c_str(), __delete_old_previous_sample_data, 32, flags) !=0 &&
- errno != ENOENT) {
---- a/libop/op_events.c
-+++ b/libop/op_events.c
-@@ -83,7 +83,7 @@ static int parse_hex(char const * str)
- static u64 parse_long_hex(char const * str)
- {
- u64 value;
-- if (sscanf(str, "%Lx", &value) != 1)
-+ if (sscanf(str, "0x%llx", &value) != 1)
- parse_error("expected long hexadecimal value");
-
- fflush(stderr);
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch
deleted file mode 100644
index aefa954..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-Prevent running check tests on host if cross compiling
-
-This patch enables running the 'make check' tests on the target
-in a cross-compiled environment. If not cross-compiling, then 'make
- check' builds and executes the tests; no change from this patch.
-In a cross-compiling environment, the make variable CROSS_COMPILE is
-set which bypasses assiging tests to the makekfile variable TESTS.
-Since TESTS is empty, the 'make check' process never tries to run the
-tests on the hosts. On the target, the tests must be run manually.
-
-Also, in the libutil++ tests, a makefile variable SRCDIR is passed into
-the compilation phase, pointing to the runtime location of the test
-'file-manip-tests'. The mechanism used for a host test, based on
-'topdir' doesn't work. Instead, if CROSS_COMPILE is set, the
-makefile takes the path of SRCDIR from the build environment and not
-from an expression based on the host path 'topdir'.
-
-Upstream-Status: Pending
-
-Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-
-diff --git a/configure.ac b/configure.ac
-index 41ece64..ce5a16f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -392,6 +392,7 @@ AC_ARG_ENABLE(account-check,
- enable_account_check=$enableval, enable_account_check=yes)
-
- AM_CONDITIONAL(CHECK_ACCOUNT, test "x$enable_account_check" = "xyes")
-+AM_CONDITIONAL(CROSS_COMPILE, test "x$cross_compiling" = "xyes")
-
- AC_SUBST(OP_CFLAGS)
- AC_SUBST(OP_CXXFLAGS)
-diff --git a/libdb/tests/Makefile.am b/libdb/tests/Makefile.am
-index 8a69003..d820090 100644
---- a/libdb/tests/Makefile.am
-+++ b/libdb/tests/Makefile.am
-@@ -13,4 +13,6 @@ check_PROGRAMS = db_test
- db_test_SOURCES = db_test.c
- db_test_LDADD = ../libodb.a ../../libutil/libutil.a
-
-+if ! CROSS_COMPILE
- TESTS = ${check_PROGRAMS}
-+endif
-diff --git a/libop/tests/Makefile.am b/libop/tests/Makefile.am
-index 8a79eb5..6d417c4 100644
---- a/libop/tests/Makefile.am
-+++ b/libop/tests/Makefile.am
-@@ -33,4 +33,6 @@ load_events_files_tests_LDADD = ${COMMON_LIBS}
- mangle_tests_SOURCES = mangle_tests.c
- mangle_tests_LDADD = ${COMMON_LIBS}
-
-+if ! CROSS_COMPILE
- TESTS = ${check_PROGRAMS} utf8_checker.sh
-+endif
-diff --git a/libregex/tests/Makefile.am b/libregex/tests/Makefile.am
-index 6f19838..1d176f9 100644
---- a/libregex/tests/Makefile.am
-+++ b/libregex/tests/Makefile.am
-@@ -18,4 +18,6 @@ java_test_LDADD = \
-
- EXTRA_DIST = mangled-name.in
-
-+if ! CROSS_COMPILE
- TESTS = ${check_PROGRAMS}
-+endif
-diff --git a/libutil++/tests/Makefile.am b/libutil++/tests/Makefile.am
-index 51af031..a01ea2d 100644
---- a/libutil++/tests/Makefile.am
-+++ b/libutil++/tests/Makefile.am
-@@ -1,7 +1,9 @@
-
- REALPATH= readlink -f
-
-+if ! CROSS_COMPILE
- SRCDIR := $(shell $(REALPATH) $(topdir)/libutil++/tests/ )
-+endif
-
- AM_CPPFLAGS = \
- -I ${top_srcdir}/libutil++ -D SRCDIR="\"$(SRCDIR)/\"" @OP_CPPFLAGS@
-@@ -46,4 +48,6 @@ cached_value_tests_LDADD = ${COMMON_LIBS}
- utility_tests_SOURCES = utility_tests.cpp
- utility_tests_LDADD = ${COMMON_LIBS}
-
-+if ! CROSS_COMPILE
- TESTS = ${check_PROGRAMS}
-+endif
-diff --git a/libutil/tests/Makefile.am b/libutil/tests/Makefile.am
-index dfcd6ec..e8831b5 100644
---- a/libutil/tests/Makefile.am
-+++ b/libutil/tests/Makefile.am
-@@ -12,4 +12,6 @@ file_tests_LDADD = ../libutil.a
- string_tests_SOURCES = string_tests.c
- string_tests_LDADD = ../libutil.a
-
-+if ! CROSS_COMPILE
- TESTS = ${check_PROGRAMS}
-+endif
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
deleted file mode 100644
index 3eaf6a7..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-oprofile: Determine the root home directory dynamically
-
-This commit detects the root home directory dynamically with changes to
-the oprofile gui app source.
-
-The commit replaces an earlier fix that detected and adjusted a
-'non-standard' root home directory at build time. The advantage of this
-patch is that the oprofile tools are adjusted to the current run-time
-path to ~root, not the build time path.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-
-Index: oprofile-1.0.0/doc/oprofile.html
-===================================================================
---- oprofile-1.0.0.orig/doc/oprofile.html 2014-11-03 17:55:31.511034857 +0000
-+++ oprofile-1.0.0/doc/oprofile.html 2014-11-03 17:57:26.415037988 +0000
-@@ -1563,8 +1563,8 @@
- <span class="emphasis"><em>must</em></span> stop it in a controlled manner in order to process
- the profile data it has collected. Use <code class="code">kill -SIGINT <operf-PID></code>
- for this purpose. It is recommended that when running <span class="command"><strong>operf</strong></span>
-- with this option, your current working directory should be <code class="filename">/root</code> or a subdirectory
-- of <code class="filename">/root</code> to avoid storing sample data files in locations accessible by regular users.
-+ with this option, your current working directory should be <code class="filename">~root</code> or a subdirectory
-+ of <code class="filename">~root</code> to avoid storing sample data files in locations accessible by regular users.
- </p>
- </dd>
- <dt>
-Index: oprofile-1.0.0/doc/oprofile.xml
-===================================================================
---- oprofile-1.0.0.orig/doc/oprofile.xml 2014-11-03 17:55:31.515034857 +0000
-+++ oprofile-1.0.0/doc/oprofile.xml 2014-11-03 17:58:03.719039005 +0000
-@@ -654,8 +654,8 @@
- <emphasis>must</emphasis> stop it in a controlled manner in order to process
- the profile data it has collected. Use <code>kill -SIGINT <operf-PID></code>
- for this purpose. It is recommended that when running <command>operf</command>
-- with this option, your current working directory should be <filename>/root</filename> or a subdirectory
-- of <filename>/root</filename> to avoid storing sample data files in locations accessible by regular users.
-+ with this option, your current working directory should be <filename>~root</filename> or a subdirectory
-+ of <filename>~root</filename> to avoid storing sample data files in locations accessible by regular users.
- </para></listitem>
- </varlistentry>
- <varlistentry>
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/run-ptest b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/run-ptest
deleted file mode 100644
index 4814be6..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/run-ptest
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-saved_dir=$PWD
-for dir in */tests ; do
- cd $dir
- for atest in * ; do
- if [ \( -x $atest \) -a \( -f $atest \) ] ; then
- ./$atest > ${atest}.stdout 2> ${atest}.stderr
- if [ $? = 0 ] ; then
- echo "PASS: $dir $atest"
- rm ${atest}.stdout ${atest}.stderr
- else
- echo "FAIL: ${dir}/${atest}"
- fi
- fi
- done
- cd $saved_dir
-done
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb
deleted file mode 100644
index 92a94ad..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require oprofile.inc
-
-DEPENDS += "virtual/kernel"
-DEPENDS_append_powerpc64 = " libpfm4"
-
-SRC_URI[md5sum] = "248c4c069f9476f427fa7195563f9867"
-SRC_URI[sha256sum] = "cf759a6de1a6033d5dfc93bda129a9f2e128aecc4238cc657feb0801d1b0366c"
-
-S = "${WORKDIR}/oprofile-${PV}"
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/perf/perf.bb b/import-layers/yocto-poky/meta/recipes-kernel/perf/perf.bb
index b79b973..51f5597 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/perf/perf.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/perf/perf.bb
@@ -22,11 +22,14 @@
PACKAGECONFIG[systemtap] = ",NO_SDT=1,systemtap"
PACKAGECONFIG[jvmti] = ",NO_JVMTI=1"
+# libaudit support would need scripting to be enabled
+PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit"
+
DEPENDS = " \
virtual/${MLPREFIX}libc \
${MLPREFIX}elfutils \
${MLPREFIX}binutils \
- bison flex xz \
+ bison-native flex-native xz \
xmlto-native \
asciidoc-native \
"
@@ -35,9 +38,10 @@
PROVIDES = "virtual/perf"
-inherit linux-kernel-base kernel-arch pythonnative
+inherit linux-kernel-base kernel-arch
# needed for building the tools/perf Python bindings
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'pythonnative', '', d)}
inherit python-dir
export PYTHON_SITEPACKAGES_DIR
@@ -47,7 +51,8 @@
do_populate_lic[depends] += "virtual/kernel:do_patch"
# needed for building the tools/perf Perl binding
-inherit perlnative cpan-base
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'perlnative', '', d)}
+inherit cpan-base
# Env var which tells perl if it should use host (no) or target (yes) settings
export PERLCONFIGTARGET = "${@is_target(d)}"
export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}/CORE"
@@ -56,7 +61,7 @@
inherit kernelsrc
-B = "${WORKDIR}/${BPN}-${PV}"
+S = "${WORKDIR}/${BP}"
SPDX_S = "${S}/tools/perf"
# The LDFLAGS is required or some old kernels fails due missing
@@ -92,6 +97,17 @@
'infodir=${@os.path.relpath(infodir, prefix)}' \
"
+PERF_SRC ?= "Makefile \
+ include \
+ tools/arch \
+ tools/build \
+ tools/include \
+ tools/lib \
+ tools/Makefile \
+ tools/perf \
+ tools/scripts \
+"
+
PERF_EXTRA_LDFLAGS = ""
# MIPS N32
@@ -114,11 +130,22 @@
fi
}
-do_configure_prepend () {
- # Fix for rebuilding
- rm -rf ${B}/
- mkdir -p ${B}/
+do_configure[prefuncs] += "copy_perf_source_from_kernel"
+python copy_perf_source_from_kernel() {
+ sources = (d.getVar("PERF_SRC") or "").split()
+ src_dir = d.getVar("STAGING_KERNEL_DIR")
+ dest_dir = d.getVar("S")
+ bb.utils.mkdirhier(dest_dir)
+ for s in sources:
+ src = oe.path.join(src_dir, s)
+ dest = oe.path.join(dest_dir, s)
+ if os.path.isdir(src):
+ oe.path.copyhardlinktree(src, dest)
+ else:
+ bb.utils.copyfile(src, dest)
+}
+do_configure_prepend () {
# If building a multlib based perf, the incorrect library path will be
# detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit
# build, with a 64 bit multilib, the arch won't match and the detection of a
@@ -214,20 +241,21 @@
RDEPENDS_${PN} += "elfutils bash"
RDEPENDS_${PN}-doc += "man"
RDEPENDS_${PN}-archive =+ "bash"
-RDEPENDS_${PN}-python =+ "bash python python-modules"
+RDEPENDS_${PN}-python =+ "bash python python-modules ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'audit-python', '', d)}"
RDEPENDS_${PN}-perl =+ "bash perl perl-modules"
RDEPENDS_${PN}-tests =+ "python"
RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}-perl ${PN}-python', '',d)}"
RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}"
-#FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core /usr/lib64/traceevent ${libdir}/traceevent"
FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent"
FILES_${PN}-archive = "${libdir}/perf/perf-core/perf-archive"
FILES_${PN}-tests = "${libdir}/perf/perf-core/tests ${libexecdir}/perf-core/tests"
-FILES_${PN}-python = "${libdir}/perf/perf-core/scripts/python ${PYTHON_SITEPACKAGES_DIR}"
-FILES_${PN}-python += "${libexecdir}/perf-core/scripts/python/*"
-FILES_${PN}-perl = "${libdir}/perf/perf-core/scripts/perl"
+FILES_${PN}-python = " \
+ ${PYTHON_SITEPACKAGES_DIR} \
+ ${libexecdir}/perf-core/scripts/python \
+ "
+FILES_${PN}-perl = "${libexecdir}/perf-core/scripts/perl"
INHIBIT_PACKAGE_DEBUG_SPLIT="1"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch b/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch
deleted file mode 100644
index 0fd6310..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 0856d8145d187a7e5a49625247abe43a13f95acc Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 15 Sep 2015 19:36:28 +0000
-Subject: [PATCH] include rquired headers for typedefs
-
-timeval struct needs to include sys/time.h and sprintf() usage requires
-to include stdio.h headers from system
-
-Fixes
-src/perf/perf_bundle.cpp:141:2: error: use of undeclared identifier 'sprintf'; did you mean 'vswprintf'?
-src/devices/devfreq.h:35:18: error: field has incomplete type 'struct timeval'
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/devices/devfreq.h | 1 +
- src/perf/perf_bundle.cpp | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/src/devices/devfreq.h b/src/devices/devfreq.h
-index 16a60fb..4bede7c 100644
---- a/src/devices/devfreq.h
-+++ b/src/devices/devfreq.h
-@@ -25,6 +25,7 @@
- #ifndef _INCLUDE_GUARD_DEVFREQ_H
- #define _INCLUDE_GUARD_DEVFREQ_H
-
-+#include <sys/time.h>
- #include "device.h"
- #include "../parameters/parameters.h"
-
-diff --git a/src/perf/perf_bundle.cpp b/src/perf/perf_bundle.cpp
-index cf1ae11..232f894 100644
---- a/src/perf/perf_bundle.cpp
-+++ b/src/perf/perf_bundle.cpp
-@@ -27,6 +27,7 @@
- #include <algorithm>
- #include <string.h>
- #include <stdint.h>
-+#include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
---
-2.5.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop_2.8.bb b/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop_2.8.bb
deleted file mode 100644
index 4d7a3e7..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop_2.8.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Power usage tool"
-DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management."
-HOMEPAGE = "http://01.org/powertop/"
-BUGTRACKER = "http://bugzilla.lesswatts.org/"
-DEPENDS = "ncurses libnl pciutils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
-
-SRC_URI = "http://01.org/sites/default/files/downloads/powertop/powertop-${PV}.tar.gz \
- file://0001-include-rquired-headers-for-typedefs.patch \
-"
-
-SRC_URI[md5sum] = "c55fedb69203e480801b18bd7b886241"
-SRC_URI[sha256sum] = "a87b563f73106babfa3e74dcf92f252938c061e309ace20a361358bbfa579c5a"
-
-UPSTREAM_CHECK_URI = "https://01.org/powertop/downloads"
-
-inherit autotools gettext pkgconfig
-
-# we do not want libncursesw if we can
-do_configure_prepend() {
- # configure.ac checks for delwin() in "ncursesw ncurses" so let's drop first one
- sed -i -e "s/ncursesw//g" ${S}/configure.ac
- mkdir -p ${B}/src/tuning/
-}
-
-inherit update-alternatives
-ALTERNATIVE_${PN} = "powertop"
-ALTERNATIVE_TARGET[powertop] = "${sbindir}/powertop"
-ALTERNATIVE_LINK_NAME[powertop] = "${sbindir}/powertop"
-ALTERNATIVE_PRIORITY = "100"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop_2.9.bb b/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop_2.9.bb
new file mode 100644
index 0000000..4fe5447
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop_2.9.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Power usage tool"
+DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management."
+HOMEPAGE = "http://01.org/powertop/"
+BUGTRACKER = "http://bugzilla.lesswatts.org/"
+DEPENDS = "ncurses libnl pciutils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
+
+SRC_URI = "http://01.org/sites/default/files/downloads/powertop/powertop-v${PV}.tar.gz \
+"
+
+SRC_URI[md5sum] = "583518c5c4434c6e9b9c58c3920950b6"
+SRC_URI[sha256sum] = "aa7fb7d8e9a00f05e7d8a7a2866d85929741e0d03a5bf40cab22d2021c959250"
+
+UPSTREAM_CHECK_URI = "https://01.org/powertop/downloads"
+UPSTREAM_CHECK_REGEX = "powertop-[v]?(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit autotools gettext pkgconfig
+
+S = "${WORKDIR}/${BPN}-v${PV}"
+
+# we do not want libncursesw if we can
+do_configure_prepend() {
+ # configure.ac checks for delwin() in "ncursesw ncurses" so let's drop first one
+ sed -i -e "s/ncursesw//g" ${S}/configure.ac
+ mkdir -p ${B}/src/tuning/
+}
+
+inherit update-alternatives
+ALTERNATIVE_${PN} = "powertop"
+ALTERNATIVE_TARGET[powertop] = "${sbindir}/powertop"
+ALTERNATIVE_LINK_NAME[powertop] = "${sbindir}/powertop"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch
deleted file mode 100644
index 202f354..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 27df521c68e7c8b5b050dab15f40aa15fd03623a Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 4 May 2016 14:58:24 +0300
-Subject: [PATCH] Avoid building docs
-
-Upstream-Status: Inappropriate
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- Makefile.am | 2 +-
- m4/yelp.m4 | 6 ------
- 2 files changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index b919a3f..3a3851d 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,4 +1,4 @@
--SUBDIRS = daemon data help lib po src tools tests
-+SUBDIRS = daemon data lib po src tools tests
-
- EXTRA_DIST = AUTHORS tap-test COPYING.gpl-2
-
-diff --git a/m4/yelp.m4 b/m4/yelp.m4
-index 5db847f..1b6ede4 100644
---- a/m4/yelp.m4
-+++ b/m4/yelp.m4
-@@ -27,12 +27,6 @@ AC_ARG_WITH([help-dir],
- HELP_DIR="$with_help_dir"
- AC_SUBST(HELP_DIR)
-
--AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
--AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
--if test x"$ITSTOOL" = x; then
-- AC_MSG_ERROR([itstool not found])
--fi
--
- AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
- AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
- if test x"$XMLLINT" = x; then
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch
deleted file mode 100644
index 6085232..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 765d578145e31ddc9495adfab8037ade33c6a9cc Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 4 May 2016 10:59:36 +0300
-Subject: [PATCH] Disable check for polkit for UI
-
-The check is not technically required: sysprof just needs
-to be able to access system perf counters at runtime.
-
-Upstream-Status: Pending
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 8559597..ecf93ad 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -131,8 +131,8 @@ AS_IF([test "$enable_gtk" = auto],[
- AS_IF([test "$have_gtk" = "yes" && test "$have_polkit" = "yes"],[enable_gtk=yes],[enable_gtk=no])
- ])
- AS_IF([test "$enable_gtk" = "yes"],[
-- AS_IF([test "$have_gtk" = "yes" && test "$have_polkit" = "yes"],[],[
-- AC_MSG_ERROR([--enable-gtk requires gtk+-3.0 >= gtk_required_version and polkit-gobject-1])
-+ AS_IF([test "$have_gtk" = "yes"],[],[
-+ AC_MSG_ERROR([--enable-gtk requires gtk+-3.0 >= gtk_required_version])
- ])
- ])
- AM_CONDITIONAL(ENABLE_GTK, test "$enable_gtk" = "yes")
---
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch
new file mode 100644
index 0000000..e28fdca
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch
@@ -0,0 +1,26 @@
+From c2495a4c042e6a675da69bab20cc3669391e8e2a Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 23 Aug 2017 18:38:26 +0300
+Subject: [PATCH 1/2] Do not build anything in help/ as it requires itstool.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ meson.build | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 4ac3934..8c4369a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -116,7 +116,6 @@ subdir('tools')
+ subdir('tests')
+
+ subdir('data')
+-subdir('help')
+ subdir('po')
+
+ meson.add_install_script('build-aux/meson_post_install.sh')
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch
deleted file mode 100644
index 158d997..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 2b4005d72d3393933a7914be102ea65505c536cc Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Thu, 21 Jul 2016 11:53:31 +0300
-Subject: [PATCH] configure: Add option to enable/disable polkit
-
-Changes the configure behaviour from autodetecting the polkit by default
-to having an option to disable it explicitly
-
-Upstream-Status: Pending
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- configure.ac | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index 2246d5a..3d3fe0f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -104,10 +104,18 @@ PKG_CHECK_MODULES(GTK,
- [gtk+-3.0 >= gtk_required_version],
- [have_gtk=yes],
- [have_gtk=no])
-+AC_ARG_ENABLE([polkit],
-+ AS_HELP_STRING([--disable-polkit], [Do not use Polkit]),
-+ [enable_polkit="$enableval"], [enable_polkit="yes"])
-+
-+AS_IF([test "x$enable_polkit" = "xyes"], [
- PKG_CHECK_MODULES(POLKIT,
- [polkit-gobject-1],
- [have_polkit=yes],
- [have_polkit=no])
-+ ])
-+AM_CONDITIONAL([HAVE_POLKIT], [test "x$enable_polkit" = "xyes"])
-+
- PKG_CHECK_MODULES(SYSTEMD,
- [libsystemd >= systemd_required_version],
- [have_systemd=yes],
---
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_3.24.1.bb b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_3.24.1.bb
deleted file mode 100644
index 79a27be..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_3.24.1.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "System-wide Performance Profiler for Linux"
-HOMEPAGE = "http://www.sysprof.com"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://src/sp-application.c;endline=17;md5=40e55577ef122c88fe20052acda64875"
-
-inherit gnomebase gettext systemd upstream-version-is-even
-
-DEPENDS = "glib-2.0 libxml2-native glib-2.0-native"
-
-SRC_URI += " \
- file://define-NT_GNU_BUILD_ID.patch \
- file://0001-configure-Add-option-to-enable-disable-polkit.patch \
- file://0001-Disable-check-for-polkit-for-UI.patch \
- file://0001-Avoid-building-docs.patch \
- "
-SRC_URI[archive.md5sum] = "2b44ae1d8cd899417294a9c4509d7870"
-SRC_URI[archive.sha256sum] = "054eebe2afb6fe3c06ac8c46bc045c42f675d4fd64e6f16cbc602d5c7ce27bec"
-
-AUTOTOOLS_AUXDIR = "${S}/build-aux"
-
-EXTRA_OECONF = "--enable-compile-warnings"
-
-PACKAGECONFIG ?= "${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)}"
-PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+3"
-PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit dbus"
-
-SOLIBS = ".so"
-FILES_SOLIBSDEV = ""
-
-SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'sysprof2.service', '', d)}"
-
-# We do not yet work for aarch64.
-COMPATIBLE_HOST = "^(?!aarch64).*"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_3.26.1.bb b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_3.26.1.bb
new file mode 100644
index 0000000..1989b52
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_3.26.1.bb
@@ -0,0 +1,34 @@
+SUMMARY = "System-wide Performance Profiler for Linux"
+HOMEPAGE = "http://www.sysprof.com"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://src/sp-application.c;endline=17;md5=40e55577ef122c88fe20052acda64875"
+
+GNOMEBASEBUILDCLASS = "meson"
+inherit gnomebase gettext systemd upstream-version-is-even
+
+DEPENDS = "glib-2.0 libxml2-native glib-2.0-native"
+
+SRC_URI[archive.md5sum] = "6f9f947960ba79bb1269d8ee49b7db78"
+SRC_URI[archive.sha256sum] = "d8b9d5c2246696e4a3776a312731dc7c014fbd33478bb14d5512c6f1f35a3b11"
+SRC_URI += " \
+ file://define-NT_GNU_BUILD_ID.patch \
+ file://0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch \
+ "
+
+PACKAGECONFIG ?= "${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)}"
+PACKAGECONFIG[gtk] = "-Denable_gtk=true,-Denable_gtk=false,gtk+3"
+PACKAGECONFIG[sysprofd] = "-Dwith_sysprofd=bundled,-Dwith_sysprofd=none,polkit"
+
+SOLIBS = ".so"
+FILES_SOLIBSDEV = ""
+
+SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'sysprofd', 'sysprof2.service', '', d)}"
+
+# We do not yet work for aarch64.
+COMPATIBLE_HOST = "^(?!aarch64).*"
+
+FILES_${PN} += " \
+ ${datadir}/dbus-1/system-services \
+ ${datadir}/dbus-1/system.d \
+ "
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Added-a-couple-of-small-sysroot-fixes.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Added-a-couple-of-small-sysroot-fixes.patch
new file mode 100644
index 0000000..c0ceb5a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Added-a-couple-of-small-sysroot-fixes.patch
@@ -0,0 +1,42 @@
+From a714658727206d2a98a7194b7e6d29dbd3e27b8d Mon Sep 17 00:00:00 2001
+From: David Smith <dsmith@redhat.com>
+Date: Mon, 19 Mar 2018 16:50:05 -0500
+Subject: [PATCH] Added a couple of small sysroot fixes.
+
+* tapsets.cxx (dwarf_builder::build): Fix commit 4ffecddf5.
+ (path_remove_sysroot): Fix extra '/' present at start of paths.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ tapsets.cxx | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+Index: git/tapsets.cxx
+===================================================================
+--- git.orig/tapsets.cxx
++++ git/tapsets.cxx
+@@ -1395,7 +1395,8 @@ string path_remove_sysroot(const systemt
+ string retval = path;
+ if (!sess.sysroot.empty() &&
+ (pos = retval.find(sess.sysroot)) != string::npos)
+- retval.replace(pos, sess.sysroot.length(), "/");
++ retval.replace(pos, sess.sysroot.length(),
++ (sess.sysroot.back() == '/' ? "/": ""));
+ return retval;
+ }
+
+@@ -8412,8 +8413,11 @@ dwarf_builder::build(systemtap_session &
+
+ // PR13338: unquote glob results
+ module_name = unescape_glob_chars (module_name);
+- user_path = find_executable (module_name, "", sess.sysenv); // canonicalize it
+- if (!is_fully_resolved(user_path, sess.sysroot, sess.sysenv))
++ user_path = find_executable (module_name, sess.sysroot, sess.sysenv); // canonicalize it
++ // Note we don't need to pass the sysroot to
++ // is_fully_resolved(), since we just passed it to
++ // find_executable().
++ if (!is_fully_resolved(user_path, "", sess.sysenv))
+ throw SEMANTIC_ERROR(_F("cannot find executable '%s'",
+ user_path.to_string().c_str()));
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Delay-adding-sysroot-path-to-module-name-in-case-of-.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Delay-adding-sysroot-path-to-module-name-in-case-of-.patch
new file mode 100644
index 0000000..89951a2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Delay-adding-sysroot-path-to-module-name-in-case-of-.patch
@@ -0,0 +1,61 @@
+From 4ffecddf5433d65a6f01241990c9d516586b1c79 Mon Sep 17 00:00:00 2001
+From: Victor Kamensky <kamensky@cisco.com>
+Date: Mon, 19 Mar 2018 08:53:51 -0500
+Subject: [PATCH] Delay adding sysroot path to module name in case of non
+ absolute executable
+
+Current stap code adds sysroot prematurely for probes that specify non
+absolute path name, i.e like "foo", so when find_executable called it
+receives full path as <sysroot>/foo and find_executable does not search
+PATH while applying sysroot.
+
+Fix delays adding sysroot till path inside of sysroot is searched first.
+
+Also fix missing sysroot addition in glob expansion case.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ tapsets.cxx | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+Index: git/tapsets.cxx
+===================================================================
+--- git.orig/tapsets.cxx
++++ git/tapsets.cxx
+@@ -746,7 +746,7 @@ base_query::base_query(dwflpp & dw, lite
+ pid_val = 0;
+ get_string_param(params, TOK_PROCESS, module_val);
+ }
+- module_val = find_executable (module_val, "", sess.sysenv);
++ module_val = find_executable (module_val, sess.sysroot, sess.sysenv);
+ if (!is_fully_resolved(module_val, "", sess.sysenv))
+ throw SEMANTIC_ERROR(_F("cannot find executable '%s'",
+ module_val.to_string().c_str()));
+@@ -8287,7 +8287,6 @@ dwarf_builder::build(systemtap_session &
+ }
+ else
+ {
+- module_name = (string)sess.sysroot + (string)module_name;
+ filled_parameters[TOK_PROCESS] = new literal_string(module_name);
+ }
+ }
+@@ -8321,7 +8320,8 @@ dwarf_builder::build(systemtap_session &
+ assert (lit);
+
+ // Evaluate glob here, and call derive_probes recursively with each match.
+- const auto& globs = glob_executable (module_name);
++ const auto& globs = glob_executable (sess.sysroot
++ + string(module_name));
+ unsigned results_pre = finished_results.size();
+ for (auto it = globs.begin(); it != globs.end(); ++it)
+ {
+@@ -8413,7 +8413,7 @@ dwarf_builder::build(systemtap_session &
+ // PR13338: unquote glob results
+ module_name = unescape_glob_chars (module_name);
+ user_path = find_executable (module_name, "", sess.sysenv); // canonicalize it
+- if (!is_fully_resolved(user_path, "", sess.sysenv))
++ if (!is_fully_resolved(user_path, sess.sysroot, sess.sysenv))
+ throw SEMANTIC_ERROR(_F("cannot find executable '%s'",
+ user_path.to_string().c_str()));
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fix-PR22551-by-updating-the-use-of-timers-for-the-4..patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fix-PR22551-by-updating-the-use-of-timers-for-the-4..patch
new file mode 100644
index 0000000..460c3b7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fix-PR22551-by-updating-the-use-of-timers-for-the-4..patch
@@ -0,0 +1,277 @@
+From fbb26e17a4c026f05a497fc5d584516bad3b6950 Mon Sep 17 00:00:00 2001
+From: David Smith <dsmith@redhat.com>
+Date: Wed, 6 Dec 2017 14:37:42 -0600
+Subject: [PATCH] Fix PR22551 by updating the use of timers for the 4.15
+ kernel.
+
+* runtime/linux/timer_compatibility.h: New file.
+* runtime/time.c: Update timer callback function parameter type. Update
+ timer initialization.
+* runtime/transport/relay_v2.c: Ditto.
+* runtime/transport/transport.c: Ditto.
+* tapset-timers.cxx (timer_derived_probe_group::emit_module_decls):
+ Ditto. Handle old and new timer callback interface.
+* runtime/linux/runtime.h: Include timer_compatibility.h instead of timer.h.
+* tapset/linux/scsi.stp: Ditto.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+
+---
+ runtime/linux/runtime.h | 2 +-
+ runtime/linux/timer_compatibility.h | 76 +++++++++++++++++++++++++++++++++++++
+ runtime/time.c | 7 ++--
+ runtime/transport/relay_v2.c | 8 ++--
+ runtime/transport/transport.c | 13 +++----
+ tapset-timers.cxx | 14 +++++--
+ tapset/linux/scsi.stp | 2 +-
+ 7 files changed, 100 insertions(+), 22 deletions(-)
+ create mode 100644 runtime/linux/timer_compatibility.h
+
+diff --git a/runtime/linux/runtime.h b/runtime/linux/runtime.h
+index 9c585a2..df9b74c 100644
+--- a/runtime/linux/runtime.h
++++ b/runtime/linux/runtime.h
+@@ -34,7 +34,7 @@
+ #include <linux/compat.h>
+ #include <linux/sched.h>
+ #include <linux/mm.h>
+-#include <linux/timer.h>
++#include "timer_compatibility.h"
+ #include <linux/delay.h>
+ #include <linux/profile.h>
+ #include <linux/rcupdate.h>
+diff --git a/runtime/linux/timer_compatibility.h b/runtime/linux/timer_compatibility.h
+new file mode 100644
+index 0000000..ac03de9
+--- /dev/null
++++ b/runtime/linux/timer_compatibility.h
+@@ -0,0 +1,76 @@
++/*
++ * linux/timer.h compatibility defines and inlines
++ * Copyright (C) 2017 Red Hat Inc.
++ *
++ * This file is part of systemtap, and is free software. You can
++ * redistribute it and/or modify it under the terms of the GNU General
++ * Public License (GPL); either version 2, or (at your option) any
++ * later version.
++ */
++
++#ifndef _TIMER_COMPATIBILITY_H_
++#define _TIMER_COMPATIBILITY_H_
++
++#include <linux/timer.h>
++
++/*
++ * Starting with the 4.15 kernel, the timer interface
++ * changed. Originally, you'd do something like:
++ *
++ * static void timer_func(unsigned long val);
++ *
++ * init_timer(&timer);
++ * timer.expires = jiffies + STP_RELAY_TIMER_INTERVAL;
++ * timer.function = timer_func;
++ * timer.data = 0;
++ * add_timer(&timer);
++ *
++ * The 'data' parameter would get passed to the callback
++ * function. Starting with 4.15, you'd do something like this:
++ *
++ * static void timer_func(struct timer_list *val);
++ *
++ * timer_setup(&timer, timer_func, 0);
++ * timer.expires = jiffies + STP_RELAY_TIMER_INTERVAL;
++ * add_timer(&timer);
++ *
++ * With the new code, the timer that caused the callback gets passed
++ * to the timer callback function. The 'data' field has been removed.
++ *
++ * So, we're going to use the new interface. To hide the differences
++ * between the callback function parameter type, we'll define a new
++ * type, 'stp_timer_callback_parameter_t'.
++ *
++ * If code needs to figure out the difference between the old and new
++ * interface, it should test the TIMER_TRACE_FLAGMASK define (which
++ * only exists in the new interface).
++ */
++
++#if defined(TIMER_TRACE_FLAGMASK)
++/* This is the >= 4.15 kernel interface. */
++
++typedef struct timer_list * stp_timer_callback_parameter_t;
++
++#else
++/* This is the < 4.15 kernel interface. */
++
++typedef unsigned long stp_timer_callback_parameter_t;
++
++/**
++ * timer_setup - prepare a timer for first use
++ * @timer: the timer in question
++ * @callback: the function to call when timer expires
++ * @flags: any TIMER_* flags (note that anything other than 0 is an
++ * error, since this compatibility function can't support any
++ * of the TIMER_* flags)
++ */
++#define timer_setup(timer, callback, flags) \
++ { \
++ init_timer((timer)); \
++ (timer)->function = callback; \
++ (timer)->data = 0; \
++ BUILD_BUG_ON_ZERO((flags) != 0); \
++ }
++#endif
++
++#endif /* _TIMER_COMPATIBILITY_H_ */
+diff --git a/runtime/time.c b/runtime/time.c
+index 2e666d5..91ceafa 100644
+--- a/runtime/time.c
++++ b/runtime/time.c
+@@ -168,10 +168,10 @@ __stp_time_smp_callback(void *val)
+
+ /* The timer callback is in a softIRQ -- interrupts enabled. */
+ static void
+-__stp_time_timer_callback(unsigned long val)
++__stp_time_timer_callback(stp_timer_callback_parameter_t unused)
+ {
+ stp_time_t *time =__stp_time_local_update();
+- (void) val;
++ (void) unused;
+
+ /* PR6481: make sure IRQs are enabled before resetting the timer
+ (IRQs are disabled and then reenabled in
+@@ -200,9 +200,8 @@ __stp_init_time(void *info)
+ time->freq = __stp_get_freq();
+ __stp_time_local_update();
+
+- init_timer(&time->timer);
++ timer_setup(&time->timer, __stp_time_timer_callback, 0);
+ time->timer.expires = jiffies + STP_TIME_SYNC_INTERVAL;
+- time->timer.function = __stp_time_timer_callback;
+
+ #ifndef STAPCONF_ADD_TIMER_ON
+ add_timer(&time->timer);
+diff --git a/runtime/transport/relay_v2.c b/runtime/transport/relay_v2.c
+index f81d75d..135951a 100644
+--- a/runtime/transport/relay_v2.c
++++ b/runtime/transport/relay_v2.c
+@@ -30,7 +30,7 @@
+ #include <linux/debugfs.h>
+ #include <linux/mm.h>
+ #include <linux/relay.h>
+-#include <linux/timer.h>
++#include "../linux/timer_compatibility.h"
+ #include "../uidgid_compatibility.h"
+ #include "relay_compat.h"
+
+@@ -120,7 +120,7 @@ static void __stp_relay_wakeup_readers(struct rchan_buf *buf)
+ wake_up_interruptible(&buf->read_wait);
+ }
+
+-static void __stp_relay_wakeup_timer(unsigned long val)
++static void __stp_relay_wakeup_timer(stp_timer_callback_parameter_t unused)
+ {
+ #ifdef STP_BULKMODE
+ int i;
+@@ -151,10 +151,8 @@ static void __stp_relay_wakeup_timer(unsigned long val)
+ static void __stp_relay_timer_init(void)
+ {
+ atomic_set(&_stp_relay_data.wakeup, 0);
+- init_timer(&_stp_relay_data.timer);
++ timer_setup(&_stp_relay_data.timer, __stp_relay_wakeup_timer, 0);
+ _stp_relay_data.timer.expires = jiffies + STP_RELAY_TIMER_INTERVAL;
+- _stp_relay_data.timer.function = __stp_relay_wakeup_timer;
+- _stp_relay_data.timer.data = 0;
+ add_timer(&_stp_relay_data.timer);
+ smp_mb();
+ }
+diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c
+index 3400f22..320fd18 100644
+--- a/runtime/transport/transport.c
++++ b/runtime/transport/transport.c
+@@ -311,7 +311,7 @@ static void _stp_detach(void)
+ }
+
+
+-static void _stp_ctl_work_callback(unsigned long val);
++static void _stp_ctl_work_callback(stp_timer_callback_parameter_t unused);
+
+ /*
+ * Called when stapio opens the control channel.
+@@ -320,13 +320,12 @@ static void _stp_attach(void)
+ {
+ dbug_trans(1, "attach\n");
+ _stp_pid = current->pid;
+- if (_stp_namespaces_pid < 1)
+- _stp_namespaces_pid = _stp_pid;
++ if (_stp_namespaces_pid < 1)
++ _stp_namespaces_pid = _stp_pid;
+ _stp_transport_data_fs_overwrite(0);
+- init_timer(&_stp_ctl_work_timer);
++
++ timer_setup(&_stp_ctl_work_timer, _stp_ctl_work_callback, 0);
+ _stp_ctl_work_timer.expires = jiffies + STP_CTL_TIMER_INTERVAL;
+- _stp_ctl_work_timer.function = _stp_ctl_work_callback;
+- _stp_ctl_work_timer.data= 0;
+ add_timer(&_stp_ctl_work_timer);
+ }
+
+@@ -341,7 +340,7 @@ static void _stp_attach(void)
+ * notified. Reschedules itself if someone is still attached
+ * to the cmd channel.
+ */
+-static void _stp_ctl_work_callback(unsigned long val)
++static void _stp_ctl_work_callback(stp_timer_callback_parameter_t unused)
+ {
+ int do_io = 0;
+ unsigned long flags;
+diff --git a/tapset-timers.cxx b/tapset-timers.cxx
+index 1a40bcd..0ab4d69 100644
+--- a/tapset-timers.cxx
++++ b/tapset-timers.cxx
+@@ -122,9 +122,13 @@ timer_derived_probe_group::emit_module_decls (systemtap_session& s)
+ s.op->newline(-1) << "};";
+ s.op->newline();
+
+- s.op->newline() << "static void enter_timer_probe (unsigned long val) {";
++ s.op->newline() << "static void enter_timer_probe (stp_timer_callback_parameter_t val) {";
++ s.op->newline() << "#if defined(TIMER_TRACE_FLAGMASK)";
++ s.op->newline(1) << "struct stap_timer_probe* stp = container_of(val, struct stap_timer_probe, timer_list);";
++ s.op->newline(-1) << "#else";
+ s.op->newline(1) << "struct stap_timer_probe* stp = & stap_timer_probes [val];";
+- s.op->newline() << "if ((atomic_read (session_state()) == STAP_SESSION_STARTING) ||";
++ s.op->newline(-1) << "#endif";
++ s.op->newline(1) << "if ((atomic_read (session_state()) == STAP_SESSION_STARTING) ||";
+ s.op->newline() << " (atomic_read (session_state()) == STAP_SESSION_RUNNING))";
+ s.op->newline(1) << "mod_timer (& stp->timer_list, jiffies + ";
+ emit_interval (s.op);
+@@ -148,9 +152,11 @@ timer_derived_probe_group::emit_module_init (systemtap_session& s)
+ s.op->newline() << "for (i=0; i<" << probes.size() << "; i++) {";
+ s.op->newline(1) << "struct stap_timer_probe* stp = & stap_timer_probes [i];";
+ s.op->newline() << "probe_point = stp->probe->pp;";
+- s.op->newline() << "init_timer (& stp->timer_list);";
+- s.op->newline() << "stp->timer_list.function = & enter_timer_probe;";
++
++ s.op->newline() << "timer_setup (& stp->timer_list, enter_timer_probe, 0);";
++ s.op->newline() << "#if !defined(TIMER_TRACE_FLAGMASK)";
+ s.op->newline() << "stp->timer_list.data = i;"; // NB: important!
++ s.op->newline() << "#endif";
+ // copy timer renew calculations from above :-(
+ s.op->newline() << "stp->timer_list.expires = jiffies + ";
+ emit_interval (s.op);
+diff --git a/tapset/linux/scsi.stp b/tapset/linux/scsi.stp
+index 44f686c..3577942 100644
+--- a/tapset/linux/scsi.stp
++++ b/tapset/linux/scsi.stp
+@@ -14,7 +14,7 @@
+ #include <scsi/scsi_cmnd.h>
+ #include <scsi/scsi_device.h>
+ #include <scsi/scsi_host.h>
+-#include <linux/timer.h>
++#include "linux/timer_compatibility.h"
+ #include <linux/blkdev.h>
+ %}
+
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fixes-for-gcc-8.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fixes-for-gcc-8.patch
new file mode 100644
index 0000000..a1b0bff
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fixes-for-gcc-8.patch
@@ -0,0 +1,215 @@
+From 4ffe00f1d9eac332d928f7dc01fe250dc32b1bb8 Mon Sep 17 00:00:00 2001
+From: Stan Cox <scox@redhat.com>
+Date: Tue, 13 Feb 2018 22:38:03 -0500
+Subject: [PATCH] Fixes for gcc 8
+
+* includes/sys/sdt.h (__SDT_COND_SIGNED): Add CT, cast type argument
+
+Author: Will Cohen <wcohen.redhat.com>
+
+* stap-serverd.cxx (generate_mok, handleRequest, handle_connection):
+ Catch format overflow
+
+* translate.cxx (translate_pass): Use ref in catch.
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ includes/sys/sdt.h | 20 ++++++++--------
+ stap-serverd.cxx | 67 +++++++++++++++++++++++++++++++++++++++++++++++-------
+ translate.cxx | 2 +-
+ 3 files changed, 70 insertions(+), 19 deletions(-)
+
+diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h
+index 940f74483..c0c5a492c 100644
+--- a/includes/sys/sdt.h
++++ b/includes/sys/sdt.h
+@@ -119,8 +119,8 @@ struct __sdt_type
+
+ #define __SDT_ALWAYS_SIGNED(T) \
+ template<> struct __sdt_type<T> { static const bool __sdt_signed = true; };
+-#define __SDT_COND_SIGNED(T) \
+-template<> struct __sdt_type<T> { static const bool __sdt_signed = ((T)(-1) < 1); };
++#define __SDT_COND_SIGNED(T,CT) \
++template<> struct __sdt_type<T> { static const bool __sdt_signed = ((CT)(-1) < 1); };
+ __SDT_ALWAYS_SIGNED(signed char)
+ __SDT_ALWAYS_SIGNED(short)
+ __SDT_ALWAYS_SIGNED(int)
+@@ -141,14 +141,14 @@ __SDT_ALWAYS_SIGNED(const volatile short)
+ __SDT_ALWAYS_SIGNED(const volatile int)
+ __SDT_ALWAYS_SIGNED(const volatile long)
+ __SDT_ALWAYS_SIGNED(const volatile long long)
+-__SDT_COND_SIGNED(char)
+-__SDT_COND_SIGNED(wchar_t)
+-__SDT_COND_SIGNED(volatile char)
+-__SDT_COND_SIGNED(volatile wchar_t)
+-__SDT_COND_SIGNED(const char)
+-__SDT_COND_SIGNED(const wchar_t)
+-__SDT_COND_SIGNED(const volatile char)
+-__SDT_COND_SIGNED(const volatile wchar_t)
++__SDT_COND_SIGNED(char, char)
++__SDT_COND_SIGNED(wchar_t, wchar_t)
++__SDT_COND_SIGNED(volatile char, char)
++__SDT_COND_SIGNED(volatile wchar_t, wchar_t)
++__SDT_COND_SIGNED(const char, char)
++__SDT_COND_SIGNED(const wchar_t, wchar_t)
++__SDT_COND_SIGNED(const volatile char, char)
++__SDT_COND_SIGNED(const volatile wchar_t, wchar_t)
+ #if defined (__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+ /* __SDT_COND_SIGNED(char16_t) */
+ /* __SDT_COND_SIGNED(char32_t) */
+diff --git a/stap-serverd.cxx b/stap-serverd.cxx
+index 7cf76c617..41f77ee9e 100644
+--- a/stap-serverd.cxx
++++ b/stap-serverd.cxx
+@@ -1607,6 +1607,7 @@ generate_mok(string &mok_fingerprint)
+ char tmpdir[PATH_MAX] = { '\0' };
+ string public_cert_path, private_cert_path, destdir;
+ mode_t old_umask;
++ int retlen;
+
+ mok_fingerprint.clear ();
+
+@@ -1631,7 +1632,14 @@ generate_mok(string &mok_fingerprint)
+ }
+
+ // Make a temporary directory to store results in.
+- snprintf (tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", mok_path.c_str ());
++ retlen = snprintf (tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", mok_path.c_str ());
++ if (retlen < 0 || retlen >= PATH_MAX)
++ {
++ server_error (_F("Could not create %s name", "temporary directory"));
++ tmpdir[0] = '\0';
++ goto cleanup;
++ }
++
+ if (mkdtemp (tmpdir) == NULL)
+ {
+ server_error (_F("Could not create temporary directory %s: %s", tmpdir,
+@@ -1704,6 +1712,7 @@ handleRequest (const string &requestDirName, const string &responseDirName, stri
+ unsigned u;
+ unsigned i;
+ FILE* f;
++ int retlen;
+
+ // Save the server version. Do this early, so the client knows what version of the server
+ // it is dealing with, even if the request is not fully completed.
+@@ -1782,7 +1791,12 @@ handleRequest (const string &requestDirName, const string &responseDirName, stri
+ struct stat st;
+ char *arg;
+
+- snprintf (stapargfile, PATH_MAX, "%s/argv%d", requestDirName.c_str (), i);
++ retlen = snprintf (stapargfile, PATH_MAX, "%s/argv%d", requestDirName.c_str (), i);
++ if (retlen < 0 || retlen >= PATH_MAX)
++ {
++ server_error (_F("Error creating %s name", "path"));
++ return;
++ }
+
+ rc = stat(stapargfile, & st);
+ if (rc) break;
+@@ -1888,7 +1902,15 @@ handleRequest (const string &requestDirName, const string &responseDirName, stri
+ {
+ glob_t globber;
+ char pattern[PATH_MAX];
+- snprintf (pattern, PATH_MAX, "%s/*.ko", new_staptmpdir.c_str());
++ int retlen;
++
++ retlen = snprintf (pattern, PATH_MAX, "%s/*.ko", new_staptmpdir.c_str());
++ if (retlen < 0 || retlen >= PATH_MAX)
++ {
++ server_error (_F("Error creating %s name", "pattern"));
++ return;
++ }
++
+ rc = glob (pattern, GLOB_ERR, NULL, &globber);
+ if (rc)
+ server_error (_F("Unable to find a module in %s", new_staptmpdir.c_str()));
+@@ -2164,6 +2186,7 @@ handle_connection (void *arg)
+ copy for each connection.*/
+ vector<string> argv;
+ PRInt32 bytesRead;
++ int retlen;
+
+ /* Detatch to avoid a memory leak */
+ if(max_threads > 0)
+@@ -2213,7 +2236,13 @@ handle_connection (void *arg)
+ #endif
+
+ secStatus = SECFailure;
+- snprintf(tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", getenv("TMPDIR") ?: "/tmp");
++ retlen = snprintf(tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", getenv("TMPDIR") ?: "/tmp");
++ if (retlen < 0 || retlen >= PATH_MAX)
++ {
++ server_error (_F("Error creating %s name", "temporary directory"));
++ tmpdir[0]=0; /* prevent /bin/rm */
++ goto cleanup;
++ }
+ rc1 = mkdtemp(tmpdir);
+ if (! rc1)
+ {
+@@ -2223,9 +2252,20 @@ handle_connection (void *arg)
+ }
+
+ /* Create a temporary files names and directories. */
+- snprintf (requestFileName, PATH_MAX, "%s/request.zip", tmpdir);
++ retlen = snprintf (requestFileName, PATH_MAX, "%s/request.zip", tmpdir);
++ if (retlen < 0 || retlen >= PATH_MAX)
++ {
++ server_error (_F("Error creating %s name", "request.zip path"));
++ goto cleanup;
++ }
++
++ retlen = snprintf (requestDirName, PATH_MAX, "%s/request", tmpdir);
++ if (retlen < 0 || retlen >= PATH_MAX)
++ {
++ server_error (_F("Error creating %s name", "request directory path"));
++ goto cleanup;
++ }
+
+- snprintf (requestDirName, PATH_MAX, "%s/request", tmpdir);
+ rc = mkdir(requestDirName, 0700);
+ if (rc)
+ {
+@@ -2233,7 +2273,13 @@ handle_connection (void *arg)
+ goto cleanup;
+ }
+
+- snprintf (responseDirName, PATH_MAX, "%s/response", tmpdir);
++ retlen = snprintf (responseDirName, PATH_MAX, "%s/response", tmpdir);
++ if (retlen < 0 || retlen >= PATH_MAX)
++ {
++ server_error (_F("Error creating %s name", "response directory path"));
++ goto cleanup;
++ }
++
+ rc = mkdir(responseDirName, 0700);
+ if (rc)
+ {
+@@ -2243,7 +2289,12 @@ handle_connection (void *arg)
+ // Set this early, since it gets used for errors to be returned to the client.
+ stapstderr = string(responseDirName) + "/stderr";
+
+- snprintf (responseFileName, PATH_MAX, "%s/response.zip", tmpdir);
++ retlen = snprintf (responseFileName, PATH_MAX, "%s/response.zip", tmpdir);
++ if (retlen < 0 || retlen >= PATH_MAX)
++ {
++ server_error (_F("Error creating %s name", "response.zip path"));
++ goto cleanup;
++ }
+
+ /* Read data from the socket.
+ * If the user is requesting/requiring authentication, authenticate
+diff --git a/translate.cxx b/translate.cxx
+index 1240a80ec..4ade06fdd 100644
+--- a/translate.cxx
++++ b/translate.cxx
+@@ -7860,7 +7860,7 @@ translate_pass (systemtap_session& s)
+ if (versions.size() >= 3 && s.verbose > 1)
+ clog << _F("ignoring extra parts of compat version: %s", s.compatible.c_str()) << endl;
+ }
+- catch (const runtime_error)
++ catch (const runtime_error&)
+ {
+ throw SEMANTIC_ERROR(_F("parse error in compatibility version: %s", s.compatible.c_str()));
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Make-sure-sysroot-paths-don-t-end-with-a-slash.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Make-sure-sysroot-paths-don-t-end-with-a-slash.patch
new file mode 100644
index 0000000..7cd9030
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Make-sure-sysroot-paths-don-t-end-with-a-slash.patch
@@ -0,0 +1,128 @@
+From 41efad04730be89889d1483719f9a6c9396dc250 Mon Sep 17 00:00:00 2001
+From: David Smith <dsmith@redhat.com>
+Date: Wed, 14 Mar 2018 17:05:25 -0500
+Subject: [PATCH] Make sure sysroot paths don't end with a slash.
+
+* session.cxx (parse_cmdline): Make sure a sysroot path does not end with
+ a '/', since we build paths like: sysroot + "/lib/modules". If the
+ sysroot path ends with a '/', we end up with paths like
+ '/SYSROOT//lib/modules'.
+ (setup_kernel_release): Take a string parameter, not a character pointer.
+* session.h: Update setup_kernel_release() prototype.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ session.cxx | 34 ++++++++++++++++++++++++++--------
+ session.h | 2 +-
+ 2 files changed, 27 insertions(+), 9 deletions(-)
+
+Index: git/session.cxx
+===================================================================
+--- git.orig/session.cxx
++++ git/session.cxx
+@@ -722,6 +722,9 @@ systemtap_session::parse_cmdline (int ar
+ client_options_disallowed_for_unprivileged = "";
+ std::set<std::string> additional_unwindsym_modules;
+ struct rlimit our_rlimit;
++ bool sysroot_option_seen = false;
++ string kernel_release_value;
++
+ while (true)
+ {
+ char * num_endptr;
+@@ -887,7 +890,7 @@ systemtap_session::parse_cmdline (int ar
+ // Note that '-' must come last in a regex bracket expression.
+ assert_regexp_match("-r parameter from client", optarg, "^[a-z0-9_.+-]+$");
+ server_args.push_back (string ("-") + (char)grc + optarg);
+- setup_kernel_release(optarg);
++ kernel_release_value = optarg;
+ break;
+
+ case 'a':
+@@ -1473,7 +1476,7 @@ systemtap_session::parse_cmdline (int ar
+ if (client_options) {
+ cerr << _F("ERROR: %s invalid with %s", "--sysroot", "--client-options") << endl;
+ return 1;
+- } else if (!sysroot.empty()) {
++ } else if (sysroot_option_seen) {
+ cerr << "ERROR: multiple --sysroot options not supported" << endl;
+ return 1;
+ } else {
+@@ -1487,11 +1490,17 @@ systemtap_session::parse_cmdline (int ar
+
+ sysroot = string(spath);
+ free (spath);
+- if (sysroot[sysroot.size() - 1] != '/')
+- sysroot.append("/");
+
+- break;
++ // We do path creation like this:
++ // sysroot + "/lib/modules"
++ // So, we don't want the sysroot path to end with a '/',
++ // otherwise we'll end up with '/foo//lib/modules'.
++ if (sysroot.back() == '/') {
++ sysroot.pop_back();
++ }
+ }
++ sysroot_option_seen = true;
++ break;
+
+ case LONG_OPT_SYSENV:
+ if (client_options) {
+@@ -1501,7 +1510,7 @@ systemtap_session::parse_cmdline (int ar
+ string sysenv_str = optarg;
+ string value;
+ size_t pos;
+- if (sysroot.empty()) {
++ if (! sysroot_option_seen) {
+ cerr << "ERROR: --sysenv must follow --sysroot" << endl;
+ return 1;
+ }
+@@ -1646,6 +1655,15 @@ systemtap_session::parse_cmdline (int ar
+ }
+ }
+
++ if (! kernel_release_value.empty())
++ {
++ setup_kernel_release(kernel_release_value);
++ }
++ else if (! sysroot.empty())
++ {
++ kernel_build_tree = sysroot + "/lib/modules/" + kernel_release + "/build";
++ }
++
+ return 0;
+ }
+
+@@ -2152,7 +2170,7 @@ void systemtap_session::insert_loaded_mo
+ }
+
+ void
+-systemtap_session::setup_kernel_release (const char* kstr)
++systemtap_session::setup_kernel_release (const string& kstr)
+ {
+ // Sometimes we may get dupes here... e.g. a server may have a full
+ // -r /path/to/kernel followed by a client's -r kernel.
+@@ -2183,7 +2201,7 @@ systemtap_session::setup_kernel_release
+ else
+ {
+ update_release_sysroot = true;
+- kernel_release = string (kstr);
++ kernel_release = kstr;
+ if (!kernel_release.empty())
+ kernel_build_tree = "/lib/modules/" + kernel_release + "/build";
+
+Index: git/session.h
+===================================================================
+--- git.orig/session.h
++++ git/session.h
+@@ -144,7 +144,7 @@ public:
+
+ // NB: It is very important for all of the above (and below) fields
+ // to be cleared in the systemtap_session ctor (session.cxx).
+- void setup_kernel_release (const char* kstr);
++ void setup_kernel_release (const std::string& kstr);
+ void insert_loaded_modules ();
+
+ // command line parsing
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Use-sysroot-when-looking-for-the-System.map-file.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Use-sysroot-when-looking-for-the-System.map-file.patch
new file mode 100644
index 0000000..b2820b3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Use-sysroot-when-looking-for-the-System.map-file.patch
@@ -0,0 +1,29 @@
+From 436063d5e4738a9b03535d330a2242be5118e745 Mon Sep 17 00:00:00 2001
+From: David Smith <dsmith@redhat.com>
+Date: Thu, 8 Mar 2018 16:01:58 -0600
+Subject: [PATCH] Use sysroot when looking for the System.map file.
+
+Add sysroot to system_map_path + "/boot/System.map" case. Otherwise
+stap tries to look symbols on host system and it produce error like this:
+
+> Kernel symbol table /boot/System.map-4.9.78-yocto-standard unavailable, (No such file or directory)
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ session.cxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: git/session.cxx
+===================================================================
+--- git.orig/session.cxx
++++ git/session.cxx
+@@ -2013,7 +2013,7 @@ systemtap_session::parse_kernel_function
+ clog << _F("Kernel symbol table %s unavailable, (%s)",
+ system_map_path.c_str(), strerror(errno)) << endl;
+
+- system_map_path = "/boot/System.map-" + kernel_release;
++ system_map_path = sysroot + "/boot/System.map-" + kernel_release;
+ system_map.clear();
+ system_map.open(system_map_path.c_str(), ifstream::in);
+ if (! system_map.is_open())
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-_stp_umodule_relocate-needs-target-file-path-not-hos.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-_stp_umodule_relocate-needs-target-file-path-not-hos.patch
new file mode 100644
index 0000000..98181a1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-_stp_umodule_relocate-needs-target-file-path-not-hos.patch
@@ -0,0 +1,39 @@
+From 183c7a7a8167333c873525f7908913837b8dc3cb Mon Sep 17 00:00:00 2001
+From: Victor Kamensky <kamensky@cisco.com>
+Date: Tue, 20 Mar 2018 12:41:05 -0500
+Subject: [PATCH] _stp_umodule_relocate needs target file path, not host file
+ path
+
+Strip of sysroot from module name is required when _stp_umodule_relocate
+call is generated. Otherwise path won't match path on target and could
+will fail to calculated address within the file.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ loc2stap.cxx | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/loc2stap.cxx b/loc2stap.cxx
+index 4818ee0..e09954f 100644
+--- a/loc2stap.cxx
++++ b/loc2stap.cxx
+@@ -17,6 +17,7 @@
+
+ #include "loc2stap.h"
+ #include "dwflpp.h"
++#include "tapsets.h"
+
+ #if ! _ELFUTILS_PREREQ(0, 153)
+ #define DW_OP_GNU_entry_value 0xf3
+@@ -106,7 +107,9 @@ location_context::translate_address(Dwarf_Addr addr)
+ c = "/* pragma:vma */ "
+ "({ unsigned long addr = 0; "
+ "addr = _stp_umodule_relocate (\""
+- + resolve_path(dw->module_name.c_str()) + "\", "
++ + path_remove_sysroot(dw->sess,
++ resolve_path(dw->module_name.c_str()))
++ + "\", "
+ + lex_cast_hex (addr)
+ + ", current); addr; })";
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-debuginfo-lookup-with-sysroot-case-do-not-remove-sys.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-debuginfo-lookup-with-sysroot-case-do-not-remove-sys.patch
new file mode 100644
index 0000000..160642d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-debuginfo-lookup-with-sysroot-case-do-not-remove-sys.patch
@@ -0,0 +1,42 @@
+From b29e448e12040ed8f4d83743a14db0f138a7cc67 Mon Sep 17 00:00:00 2001
+From: Victor Kamensky <kamensky@cisco.com>
+Date: Wed, 14 Mar 2018 16:54:08 -0500
+Subject: [PATCH] debuginfo lookup with sysroot case do not remove sysroot from
+ file_name
+
+If sysroot option is passed, and debug symbols reside in sysroot along
+with executable <foo> in <foo_dir>/.debug/<foo_file> directory,
+stap fails to find debuginfo because it strips out sysroot path
+from file_name so dwfl_standard_find_debuginfo ends up looking at
+host <foo_dir>/.debug/<foo_file> rather then checking
+<sysroot>/<foo_dir>/.debug/<foo_file>.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ setupdwfl.cxx | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/setupdwfl.cxx b/setupdwfl.cxx
+index 11e0bb2..2a87982 100644
+--- a/setupdwfl.cxx
++++ b/setupdwfl.cxx
+@@ -627,18 +627,6 @@ internal_find_debuginfo (Dwfl_Module *mod,
+
+ call_dwfl_standard_find_debuginfo:
+
+- if (current_session_for_find_debuginfo)
+- {
+- string sysroot = current_session_for_find_debuginfo->sysroot + "/*";
+- int found = fnmatch(sysroot.c_str(), file_name, 0);
+-
+- if (found)
+- {
+- file_name = file_name
+- + current_session_for_find_debuginfo->sysroot.length() - 1;
+- }
+- }
+-
+ /* Call the original dwfl_standard_find_debuginfo */
+ return dwfl_standard_find_debuginfo(mod, userdata, modname, base,
+ file_name, debuglink_file,
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling-follow-u.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling-follow-u.patch
new file mode 100644
index 0000000..6fe7d4d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling-follow-u.patch
@@ -0,0 +1,40 @@
+From 7e11f129ff370ce5f39812ce2ae6ce40818a347f Mon Sep 17 00:00:00 2001
+From: Victor Kamensky <kamensky@cisco.com>
+Date: Thu, 22 Mar 2018 16:02:02 -0500
+Subject: [PATCH] sysroot: fix short release -r option handling follow up
+
+In case of sysroot set and short release -r option it does not make sense
+to pass short release name into dwfl_linux_kernel_report_offline
+function. This function is not aware about sysroot and it won't look for
+kernel modules under sysroot directory.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ setupdwfl.cxx | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/setupdwfl.cxx b/setupdwfl.cxx
+index c419afa..0cf5810 100644
+--- a/setupdwfl.cxx
++++ b/setupdwfl.cxx
+@@ -367,7 +367,15 @@ setup_dwfl_kernel (unsigned *modules_found, systemtap_session &s)
+ // hard-code this magic here.
+ string lib_path = s.sysroot + "/lib/modules/" + s.kernel_release + "/build";
+ if (s.kernel_build_tree == lib_path)
+- elfutils_kernel_path = s.kernel_release;
++ {
++ if (s.sysroot != "")
++ // If we have sysroot set does not make sense to pass
++ // short release to dwfl, it won't take a sysroot into
++ // account. Let's construct full path in such case.
++ elfutils_kernel_path = string(s.sysroot + "/lib/modules/" + s.kernel_release);
++ else
++ elfutils_kernel_path = s.kernel_release;
++ }
+ else
+ elfutils_kernel_path = s.kernel_build_tree;
+ offline_modules_found = 0;
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling.patch
new file mode 100644
index 0000000..b31d627
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling.patch
@@ -0,0 +1,53 @@
+From a9ce89bcd2d78728faef59bda60e75510972cd56 Mon Sep 17 00:00:00 2001
+From: Victor Kamensky <kamensky@cisco.com>
+Date: Wed, 14 Mar 2018 17:09:44 -0500
+Subject: [PATCH] sysroot: fix short release -r option handling
+
+* setupdwfl.cxx (debuginfo_path_insert_sysroot): Add a '/' to the end of
+ the sysroot for path_insert_sysroot().
+ (setup_dwfl_kernel): Simplify logic when finding the kernel path to send
+ to elfutils.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ setupdwfl.cxx | 19 ++++++++++++-------
+ 1 file changed, 12 insertions(+), 7 deletions(-)
+
+diff --git a/setupdwfl.cxx b/setupdwfl.cxx
+index 2a87982..f6c3157 100644
+--- a/setupdwfl.cxx
++++ b/setupdwfl.cxx
+@@ -339,6 +339,13 @@ static char * path_insert_sysroot(string sysroot, string path)
+
+ void debuginfo_path_insert_sysroot(string sysroot)
+ {
++ // FIXME: This is a short-term fix, until we expect sysroot paths to
++ // always end with a '/' (and never be empty).
++ //
++ // The path_insert_sysroot() function assumes that sysroot has a '/'
++ // on the end. Make sure that is true.
++ if (sysroot.back() != '/')
++ sysroot.push_back('/');
+ debuginfo_path = path_insert_sysroot(sysroot, debuginfo_path);
+ debuginfo_usr_path = path_insert_sysroot(sysroot, debuginfo_usr_path);
+ }
+@@ -358,13 +365,11 @@ setup_dwfl_kernel (unsigned *modules_found, systemtap_session &s)
+ // no way to set the dwfl_callback.debuginfo_path and always
+ // passs the plain kernel_release here. So instead we have to
+ // hard-code this magic here.
+- string lib_path = "/lib/modules/" + s.kernel_release + "/build";
+- if (s.kernel_build_tree == string(s.sysroot + lib_path) ||
+- (s.kernel_build_tree == lib_path
+- && s.sysroot == "/"))
+- elfutils_kernel_path = s.kernel_release;
+- else
+- elfutils_kernel_path = s.kernel_build_tree;
++ string lib_path = s.sysroot + "/lib/modules/" + s.kernel_release + "/build";
++ if (s.kernel_build_tree == lib_path)
++ elfutils_kernel_path = s.kernel_release;
++ else
++ elfutils_kernel_path = s.kernel_build_tree;
+ offline_modules_found = 0;
+
+ // First try to report full path modules.
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-handle-symbolic-links-with-absolute-name-rel.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-handle-symbolic-links-with-absolute-name-rel.patch
new file mode 100644
index 0000000..8a3d39a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-handle-symbolic-links-with-absolute-name-rel.patch
@@ -0,0 +1,117 @@
+From 2041085d1a700201dc088991ca8136e7935bf42f Mon Sep 17 00:00:00 2001
+From: Victor Kamensky <kamensky@cisco.com>
+Date: Wed, 21 Mar 2018 11:35:26 -0500
+Subject: [PATCH] sysroot: handle symbolic links with absolute name relative to
+ sysroot
+
+In case of symbolic link found under sysroot point to absolute path,
+instead of trying to look for such absolute path in host system,
+apply sysroot prefix first.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ util.cxx | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 76 insertions(+)
+
+Index: git/util.cxx
+===================================================================
+--- git.orig/util.cxx
++++ git/util.cxx
+@@ -441,6 +441,64 @@ split_lines(const char *buf, size_t n)
+ return lines;
+ }
+
++static string
++follow_link(const string& name, const string& sysroot)
++{
++ char *linkname;
++ ssize_t r;
++ string retpath;
++ struct stat st;
++
++ const char *f = name.c_str();
++
++ lstat(f, &st);
++
++ linkname = (char *) malloc(st.st_size + 1);
++
++ if (linkname)
++ {
++ r = readlink(f, linkname, st.st_size + 1);
++ linkname[st.st_size] = '\0';
++ /*
++ * If we have non-empty sysroot and we got link that
++ * points to absolute path name, we need to look at
++ * this path relative to sysroot itself. access and
++ * stat will follow symbolic links correctly only in
++ * case with empty sysroot.
++ */
++ while (r != -1 && linkname && linkname[0] == '/')
++ {
++ string fname1 = sysroot + linkname;
++ const char *f1 = fname1.c_str();
++ if (access(f1, X_OK) == 0
++ && stat(f1, &st) == 0
++ && S_ISREG(st.st_mode))
++ {
++ retpath = fname1;
++ break;
++ }
++ else if (lstat(f1, &st) == 0
++ && S_ISLNK(st.st_mode))
++ {
++ free(linkname);
++ linkname = (char *) malloc(st.st_size + 1);
++ if (linkname)
++ {
++ r = readlink(f1, linkname, st.st_size + 1);
++ linkname[st.st_size] = '\0';
++ }
++ }
++ else
++ {
++ break;
++ }
++ }
++ }
++ free(linkname);
++
++ return retpath;
++}
++
+ // Resolve an executable name to a canonical full path name, with the
+ // same policy as execvp(). A program name not containing a slash
+ // will be searched along the $PATH.
+@@ -465,6 +523,14 @@ string find_executable(const string& nam
+ if (name.find('/') != string::npos) // slash in the path already?
+ {
+ retpath = sysroot + name;
++
++ const char *f = retpath.c_str();
++ if (sysroot != ""
++ && lstat(f, &st) == 0
++ && S_ISLNK(st.st_mode))
++ {
++ retpath = follow_link(f, sysroot);
++ }
+ }
+ else // Nope, search $PATH.
+ {
+@@ -493,6 +559,16 @@ string find_executable(const string& nam
+ retpath = fname;
+ break;
+ }
++ else if (sysroot != ""
++ && lstat(f, &st) == 0
++ && S_ISLNK(st.st_mode))
++ {
++ retpath = follow_link(f, sysroot);
++ if (retpath != "")
++ {
++ break;
++ }
++ }
+ }
+ }
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch
deleted file mode 100644
index 013af5c..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-systemtap: Cross compilation fix
-
-This is a cross compilation fix. It allows systemtap to find
-the kernel map file in the right place, i.e. in the kernel build tree.
-Without this fix it takes a map file from the build host, if available.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
-
-Index: git/session.cxx
-===================================================================
---- git.orig/session.cxx
-+++ git/session.cxx
-@@ -1634,7 +1634,7 @@ systemtap_session::parse_kernel_function
- clog << _F("Kernel symbol table %s unavailable, (%s)",
- system_map_path.c_str(), strerror(errno)) << endl;
-
-- system_map_path = "/boot/System.map-" + kernel_release;
-+ system_map_path = kernel_build_tree + "/System.map-" + kernel_release;
- system_map.clear();
- system_map.open(system_map_path.c_str(), ifstream::in);
- if (! system_map.is_open())
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb
index 475b207..b280f58 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb
@@ -3,9 +3,7 @@
require systemtap_git.inc
-DEPENDS = "boost elfutils"
-
-RDEPENDS_${PN} += "python3-core bash perl"
+DEPENDS = "elfutils"
EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \
--without-nss --without-avahi --without-dyninst \
@@ -18,7 +16,8 @@
EXTRA_OECONF += "${STAP_DOCS} "
-PACKAGECONFIG ??= "sqlite monitor python3-probes"
+PACKAGECONFIG ??= "translator sqlite monitor python3-probes"
+PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,python3-core bash perl"
PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt"
PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3"
PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
@@ -26,4 +25,12 @@
inherit autotools gettext pkgconfig distutils3-base
+do_install_append () {
+ if [ ! -f ${D}${bindir}/stap ]; then
+ # translator disabled case, need to leave only minimal runtime
+ rm -rf ${D}${datadir}/${PN}
+ rm ${D}${libexecdir}/${PN}/stap-env
+ fi
+}
+
BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc
index 3dc688a..e2f5204 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -1,10 +1,9 @@
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRCREV = "45d0e7a09a15a21078d0ebf2db5175ed9e87014e"
-PV = "3.1"
+SRCREV = "4051c70c9318c837981384cbb23f3e9eb1bd0892"
+PV = "3.2"
SRC_URI = "git://sourceware.org/git/systemtap.git \
- file://system_map_location.patch \
file://configure-allow-to-disable-libvirt.patch \
file://x32_abi_time.patch \
file://monitor-option.patch \
@@ -13,10 +12,21 @@
file://0001-Install-python-modules-to-correct-library-dir.patch \
file://0001-buildrun-remove-quotes-around-I-include-line.patch \
file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \
+ file://0001-Fix-PR22551-by-updating-the-use-of-timers-for-the-4..patch \
+ file://0001-Fixes-for-gcc-8.patch \
+ file://0001-Use-sysroot-when-looking-for-the-System.map-file.patch \
+ file://0001-debuginfo-lookup-with-sysroot-case-do-not-remove-sys.patch \
+ file://0001-Make-sure-sysroot-paths-don-t-end-with-a-slash.patch \
+ file://0001-sysroot-fix-short-release-r-option-handling.patch \
+ file://0001-Delay-adding-sysroot-path-to-module-name-in-case-of-.patch \
+ file://0001-Added-a-couple-of-small-sysroot-fixes.patch \
+ file://0001-_stp_umodule_relocate-needs-target-file-path-not-hos.patch \
+ file://0001-sysroot-handle-symbolic-links-with-absolute-name-rel.patch \
+ file://0001-sysroot-fix-short-release-r-option-handling-follow-u.patch \
"
-# systemtap doesn't support mips
-COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64).*-linux'
+COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips).*-linux'
+COMPATIBLE_HOST_libc-musl = 'null'
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc b/import-layers/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc
index 002ee65..0a1789c 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc
@@ -1,11 +1,11 @@
-SRCREV = "021710e1073fe203341b427cd1a4bac577ec899c"
-PV = "2.6.1"
+SRCREV = "7d0147bbba3ed1d5ef6eea4eec3f0ad4c98f02b5"
+PV = "2.7"
inherit pkgconfig
FILESEXTRAPATHS =. "${FILE_DIRNAME}/trace-cmd:"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=trace-cmd-stable-v2.6 \
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git \
file://blktrace-api-compatibility.patch \
file://0001-Include-limits.h-so-that-PATH_MAX-is-defined-an-issu.patch \
"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
deleted file mode 100644
index 795e48a..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 3408f8e78776b12f131e433749721602f87e0a70 Mon Sep 17 00:00:00 2001
-From: "Hong H. Pham" <hong.pham@windriver.com>
-Date: Fri, 29 Aug 2014 17:13:55 +0300
-Subject: [PATCH] Check if wordexp function is supported
-
-eglibc could be configured to build without wordexp, so it is not enough
-to check if wordexp.h exists (the header file could be installed, but it's
-possible that the wordexp() function is not supported). An additional
-check if wordexp() is supported by the system C library is needed.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Hong H. Pham <hong.pham@windriver.com>
-Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
----
- configure.ac | 5 ++++-
- src/userfile.c | 2 +-
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 9490d39..b08a90a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -295,7 +295,10 @@ fi
- AC_SUBST(ALSA_DEPLIBS)
-
- dnl Check for headers
--AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h sys/shm.h])
-+AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h sys/shm.h],
-+ dnl Make sure wordexp is supported by the C library
-+ AC_CHECK_FUNCS([wordexp])
-+)
-
- dnl Check for resmgr support...
- AC_MSG_CHECKING(for resmgr support)
-diff --git a/src/userfile.c b/src/userfile.c
-index 72779da..e9d13e6 100644
---- a/src/userfile.c
-+++ b/src/userfile.c
-@@ -32,7 +32,7 @@
- * stores the first matchine one. The returned string is strdup'ed.
- */
-
--#ifdef HAVE_WORDEXP_H
-+#if (defined(HAVE_WORDEXP_H) && defined(HAVE_WORDEXP))
- #include <wordexp.h>
- #include <assert.h>
- int snd_user_file(const char *file, char **result)
---
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
deleted file mode 100644
index 3d44585..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-From c2c13cf0c469862cd39b2a69862002331ab7c8cb Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Tue, 9 Feb 2016 14:01:18 -0800
-Subject: [PATCH] avoid including <sys/poll.h> directly
-
-Fixes compiler warnings when building with musl libc.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- aserver/aserver.c | 2 +-
- include/asoundlib-head.h | 2 +-
- include/asoundlib.h | 2 +-
- include/local.h | 2 +-
- src/control/control.c | 2 +-
- src/control/control_shm.c | 2 +-
- src/pcm/pcm_direct.c | 2 +-
- src/pcm/pcm_mmap.c | 2 +-
- src/pcm/pcm_share.c | 2 +-
- src/pcm/pcm_shm.c | 2 +-
- src/seq/seq.c | 2 +-
- src/shmarea.c | 2 +-
- 12 files changed, 12 insertions(+), 12 deletions(-)
-
-diff --git a/aserver/aserver.c b/aserver/aserver.c
-index ac20706..46f731a 100644
---- a/aserver/aserver.c
-+++ b/aserver/aserver.c
-@@ -20,7 +20,7 @@
-
- #include <sys/shm.h>
- #include <sys/socket.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/un.h>
- #include <sys/uio.h>
- #include <stdio.h>
-diff --git a/include/asoundlib-head.h b/include/asoundlib-head.h
-index 1ec611e..21e32c6 100644
---- a/include/asoundlib-head.h
-+++ b/include/asoundlib-head.h
-@@ -35,6 +35,6 @@
- #include <string.h>
- #include <fcntl.h>
- #include <assert.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <errno.h>
- #include <stdarg.h>
-diff --git a/include/asoundlib.h b/include/asoundlib.h
-index 3c2766e..a546194 100644
---- a/include/asoundlib.h
-+++ b/include/asoundlib.h
-@@ -35,7 +35,7 @@
- #include <string.h>
- #include <fcntl.h>
- #include <assert.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <errno.h>
- #include <stdarg.h>
- #include <endian.h>
-diff --git a/include/local.h b/include/local.h
-index 317f2e3..6a43a47 100644
---- a/include/local.h
-+++ b/include/local.h
-@@ -47,7 +47,7 @@
- #error Header defining endianness not defined
- #endif
- #include <stdarg.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/types.h>
- #include <errno.h>
- #if defined(__linux__)
-diff --git a/src/control/control.c b/src/control/control.c
-index 6c00b8e..fd0c303 100644
---- a/src/control/control.c
-+++ b/src/control/control.c
-@@ -90,7 +90,7 @@ I/O operations.
- #include <string.h>
- #include <fcntl.h>
- #include <signal.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <stdbool.h>
- #include "control_local.h"
-
-diff --git a/src/control/control_shm.c b/src/control/control_shm.c
-index bd07d4a..9a2e268 100644
---- a/src/control/control_shm.c
-+++ b/src/control/control_shm.c
-@@ -27,7 +27,7 @@
- #include <fcntl.h>
- #include <sys/shm.h>
- #include <sys/socket.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/un.h>
- #include <sys/uio.h>
- #include <sys/mman.h>
-diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c
-index c3925cc..18f1dd5 100644
---- a/src/pcm/pcm_direct.c
-+++ b/src/pcm/pcm_direct.c
-@@ -30,7 +30,7 @@
- #include <grp.h>
- #include <sys/ioctl.h>
- #include <sys/mman.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/shm.h>
- #include <sys/sem.h>
- #include <sys/wait.h>
-diff --git a/src/pcm/pcm_mmap.c b/src/pcm/pcm_mmap.c
-index 1948289..4cf220a 100644
---- a/src/pcm/pcm_mmap.c
-+++ b/src/pcm/pcm_mmap.c
-@@ -22,7 +22,7 @@
- #include <stdio.h>
- #include <malloc.h>
- #include <string.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/mman.h>
- #ifdef HAVE_SYS_SHM_H
- #include <sys/shm.h>
-diff --git a/src/pcm/pcm_share.c b/src/pcm/pcm_share.c
-index 5d8aaf2..21a57fc 100644
---- a/src/pcm/pcm_share.c
-+++ b/src/pcm/pcm_share.c
-@@ -34,7 +34,7 @@
- #include <signal.h>
- #include <math.h>
- #include <sys/socket.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <pthread.h>
- #include "pcm_local.h"
-
-diff --git a/src/pcm/pcm_shm.c b/src/pcm/pcm_shm.c
-index a815ac6..4ee958c 100644
---- a/src/pcm/pcm_shm.c
-+++ b/src/pcm/pcm_shm.c
-@@ -36,7 +36,7 @@
- #include <sys/ioctl.h>
- #include <sys/shm.h>
- #include <sys/socket.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/un.h>
- #include <sys/mman.h>
- #include <netinet/in.h>
-diff --git a/src/seq/seq.c b/src/seq/seq.c
-index 9279830..d2027cb 100644
---- a/src/seq/seq.c
-+++ b/src/seq/seq.c
-@@ -777,7 +777,7 @@ void event_filter(snd_seq_t *seq, snd_seq_event_t *ev)
-
- */
-
--#include <sys/poll.h>
-+#include <poll.h>
- #include "seq_local.h"
-
- /****************************************************************************
-diff --git a/src/shmarea.c b/src/shmarea.c
-index 9843aa8..eaa71f0 100644
---- a/src/shmarea.c
-+++ b/src/shmarea.c
-@@ -27,7 +27,7 @@
- #include <malloc.h>
- #include <string.h>
- #include <errno.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/mman.h>
- #include <sys/shm.h>
- #include "list.h"
---
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.4.1.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.4.1.bb
deleted file mode 100644
index acdeae1..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.4.1.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "ALSA sound library"
-HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
-SECTION = "libs/multimedia"
-LICENSE = "LGPLv2.1 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
- file://src/socket.c;beginline=1;endline=26;md5=11ff89a8a7a4a690a5c78effe8159545"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2 \
- file://Check-if-wordexp-function-is-supported.patch \
- file://avoid-including-sys-poll.h-directly.patch \
-"
-SRC_URI[md5sum] = "29fa3e69122d3cf3e8f0e01a0cb1d183"
-SRC_URI[sha256sum] = "91bb870c14d1c7c269213285eeed874fa3d28112077db061a3af8010d0885b76"
-
-inherit autotools pkgconfig
-
-require alsa-fpu.inc
-EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} "
-
-EXTRA_OECONF += "--disable-python"
-
-PACKAGES =+ "alsa-server libasound alsa-conf alsa-doc"
-FILES_libasound = "${libdir}/libasound.so.*"
-FILES_alsa-server = "${bindir}/*"
-FILES_alsa-conf = "${datadir}/alsa/"
-
-RDEPENDS_libasound = "alsa-conf"
-
-# alsa-lib gets automatically added to alsa-lib-dev dependencies, but the
-# alsa-lib package doesn't exist. libasound is the real library package.
-RDEPENDS_${PN}-dev = "libasound"
-
-# upgrade path
-RPROVIDES_${PN}-dev = "alsa-dev"
-RREPLACES_${PN}-dev = "alsa-dev"
-RCONFLICTS_${PN}-dev = "alsa-dev"
-
-RPROVIDES_alsa-conf = "alsa-conf-base"
-RREPLACES_alsa-conf = "alsa-conf-base"
-RCONFLICTS_alsa-conf = "alsa-conf-base"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.5.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.5.bb
new file mode 100644
index 0000000..c5bf107
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.5.bb
@@ -0,0 +1,40 @@
+SUMMARY = "ALSA sound library"
+HOMEPAGE = "http://www.alsa-project.org"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
+SECTION = "libs/multimedia"
+LICENSE = "LGPLv2.1 & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
+ file://src/socket.c;beginline=1;endline=26;md5=11ff89a8a7a4a690a5c78effe8159545"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2"
+SRC_URI[md5sum] = "a2b465c3a5265d8a57f3ff39c6c4fc29"
+SRC_URI[sha256sum] = "f4f68ad3c6da36b0b5241ac3c798a7a71e0e97d51f972e9f723b3f20a9650ae6"
+
+inherit autotools pkgconfig
+
+require alsa-fpu.inc
+EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} "
+
+EXTRA_OECONF += "--disable-python"
+
+PACKAGES =+ "alsa-server libasound alsa-conf alsa-doc"
+FILES_libasound = "${libdir}/libasound.so.*"
+FILES_alsa-server = "${bindir}/*"
+FILES_alsa-conf = "${datadir}/alsa/"
+
+RDEPENDS_libasound = "alsa-conf"
+
+# alsa-lib gets automatically added to alsa-lib-dev dependencies, but the
+# alsa-lib package doesn't exist. libasound is the real library package.
+RDEPENDS_${PN}-dev = "libasound"
+
+# upgrade path
+RPROVIDES_${PN}-dev = "alsa-dev"
+RREPLACES_${PN}-dev = "alsa-dev"
+RCONFLICTS_${PN}-dev = "alsa-dev"
+
+RPROVIDES_alsa-conf = "alsa-conf-base"
+RREPLACES_alsa-conf = "alsa-conf-base"
+RCONFLICTS_alsa-conf = "alsa-conf-base"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.4.bb
deleted file mode 100644
index b7f79b7..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.4.bb
+++ /dev/null
@@ -1,103 +0,0 @@
-SUMMARY = "ALSA Plugins"
-HOMEPAGE = "http://alsa-project.org"
-BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
-SECTION = "multimedia"
-
-# The primary license of alsa-plugins is LGPLv2.1.
-#
-# m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the
-# build system, and doesn't affect the licensing of the build result.
-#
-# The samplerate plugin source code is licensed under GPLv2+ to be consistent
-# with the libsamplerate license. However, if the licensee has a commercial
-# license for libsamplerate, the samplerate plugin may be used under the terms
-# of LGPLv2.1 like the rest of the plugins.
-LICENSE = "LGPLv2.1 & GPLv2+"
-LIC_FILES_CHKSUM = "\
- file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
- file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://m4/attributes.m4;endline=33;md5=b25958da44c02231e3641f1bccef53eb \
- file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \
-"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/plugins/${BP}.tar.bz2"
-SRC_URI[md5sum] = "de51130a7444b79b2dd3c25e28420754"
-SRC_URI[sha256sum] = "530d1c3bdaeb058f2a03607a33b9e16ee5369bfd30a96bc09bd2c69b4ddd1a8a"
-
-DEPENDS += "alsa-lib"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= "\
- samplerate \
- speexdsp \
- ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \
-"
-PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec,libav"
-PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
-PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin"
-PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus"
-PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
-PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0"
-PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp"
-
-PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
-
-PACKAGES_DYNAMIC = "^libasound-module-.*"
-
-# The alsa-plugins package doesn't itself contain anything, it just depends on
-# all built plugins.
-ALLOW_EMPTY_${PN} = "1"
-
-do_install_append() {
- rm ${D}${libdir}/alsa-lib/*.la
-
- # We use the example as is, so just drop the .example suffix.
- if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then
- mv ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf
- fi
-}
-
-python populate_packages_prepend() {
- plugindir = d.expand('${libdir}/alsa-lib/')
- packages = " ".join(do_split_packages(d, plugindir, '^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends=''))
- d.setVar("RDEPENDS_alsa-plugins", packages)
-}
-
-# The rate plugins create some symlinks. For example, the samplerate plugin
-# creates these links to the main plugin file:
-#
-# libasound_module_rate_samplerate_best.so
-# libasound_module_rate_samplerate_linear.so
-# libasound_module_rate_samplerate_medium.so
-# libasound_module_rate_samplerate_order.so
-#
-# The other rate plugins create similar links. We have to add the links to
-# FILES manually, because do_split_packages() skips the links (which is good,
-# because we wouldn't want do_split_packages() to create separate packages for
-# the symlinks).
-#
-# The symlinks cause QA errors, because usually it's a bug if a non
-# -dev/-dbg/-nativesdk package contains links to .so files, but in this case
-# the errors are false positives, so we disable the QA checks.
-FILES_${MLPREFIX}libasound-module-rate-lavcrate += "${libdir}/alsa-lib/*rate_lavcrate_*.so"
-FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so"
-FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so"
-INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavcrate = "dev-so"
-INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so"
-INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so"
-
-# 50-pulseaudio.conf defines a device named "pulse" that applications can use
-# if they explicitly want to use the PulseAudio plugin.
-# 99-pulseaudio-default.conf configures the "default" device to use the
-# PulseAudio plugin.
-FILES_${PN}-pulseaudio-conf += "\
- ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \
- ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \
-"
-
-RDEPENDS_${PN}-pulseaudio-conf += "\
- libasound-module-conf-pulse \
- libasound-module-ctl-pulse \
- libasound-module-pcm-pulse \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.5.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.5.bb
new file mode 100644
index 0000000..4bd0acc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.5.bb
@@ -0,0 +1,103 @@
+SUMMARY = "ALSA Plugins"
+HOMEPAGE = "http://alsa-project.org"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
+SECTION = "multimedia"
+
+# The primary license of alsa-plugins is LGPLv2.1.
+#
+# m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the
+# build system, and doesn't affect the licensing of the build result.
+#
+# The samplerate plugin source code is licensed under GPLv2+ to be consistent
+# with the libsamplerate license. However, if the licensee has a commercial
+# license for libsamplerate, the samplerate plugin may be used under the terms
+# of LGPLv2.1 like the rest of the plugins.
+LICENSE = "LGPLv2.1 & GPLv2+"
+LIC_FILES_CHKSUM = "\
+ file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
+ file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://m4/attributes.m4;endline=33;md5=b25958da44c02231e3641f1bccef53eb \
+ file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \
+"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/plugins/${BP}.tar.bz2"
+SRC_URI[md5sum] = "f898b0e6e8acf3f6f82bc2a0f0c84a97"
+SRC_URI[sha256sum] = "797da5f8f53379fbea28817bc466de16affd2c07849e84f1af8d5e22f7bb7f1c"
+
+DEPENDS += "alsa-lib"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "\
+ samplerate \
+ speexdsp \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \
+"
+PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec,libav"
+PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
+PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin"
+PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus"
+PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
+PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0"
+PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp"
+
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
+
+PACKAGES_DYNAMIC = "^libasound-module-.*"
+
+# The alsa-plugins package doesn't itself contain anything, it just depends on
+# all built plugins.
+ALLOW_EMPTY_${PN} = "1"
+
+do_install_append() {
+ rm ${D}${libdir}/alsa-lib/*.la
+
+ # We use the example as is, so just drop the .example suffix.
+ if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then
+ mv ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf
+ fi
+}
+
+python populate_packages_prepend() {
+ plugindir = d.expand('${libdir}/alsa-lib/')
+ packages = " ".join(do_split_packages(d, plugindir, '^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends=''))
+ d.setVar("RDEPENDS_alsa-plugins", packages)
+}
+
+# The rate plugins create some symlinks. For example, the samplerate plugin
+# creates these links to the main plugin file:
+#
+# libasound_module_rate_samplerate_best.so
+# libasound_module_rate_samplerate_linear.so
+# libasound_module_rate_samplerate_medium.so
+# libasound_module_rate_samplerate_order.so
+#
+# The other rate plugins create similar links. We have to add the links to
+# FILES manually, because do_split_packages() skips the links (which is good,
+# because we wouldn't want do_split_packages() to create separate packages for
+# the symlinks).
+#
+# The symlinks cause QA errors, because usually it's a bug if a non
+# -dev/-dbg/-nativesdk package contains links to .so files, but in this case
+# the errors are false positives, so we disable the QA checks.
+FILES_${MLPREFIX}libasound-module-rate-lavcrate += "${libdir}/alsa-lib/*rate_lavcrate_*.so"
+FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so"
+FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavcrate = "dev-so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so"
+
+# 50-pulseaudio.conf defines a device named "pulse" that applications can use
+# if they explicitly want to use the PulseAudio plugin.
+# 99-pulseaudio-default.conf configures the "default" device to use the
+# PulseAudio plugin.
+FILES_${PN}-pulseaudio-conf += "\
+ ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \
+ ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \
+"
+
+RDEPENDS_${PN}-pulseaudio-conf += "\
+ libasound-module-conf-pulse \
+ libasound-module-ctl-pulse \
+ libasound-module-pcm-pulse \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-as10k1-Make-output_tram_line-static-inline.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-as10k1-Make-output_tram_line-static-inline.patch
deleted file mode 100644
index d049a30..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-as10k1-Make-output_tram_line-static-inline.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 1e5926df74a35fe2cd90bc59f5264a8715c94048 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Sep 2015 08:16:59 +0000
-Subject: [PATCH] as10k1: Make output_tram_line() static inline
-
-The function is not used in any other file, its better to make it static
-inline so compiler has a better chance of optimizing here
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- as10k1/as10k1.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/as10k1/as10k1.c b/as10k1/as10k1.c
-index 96af0c3..d0766fd 100644
---- a/as10k1/as10k1.c
-+++ b/as10k1/as10k1.c
-@@ -366,7 +366,7 @@ void as_exit(const char *message)
- exit(1);
- }
-
--inline void output_tram_line( struct list_head *line_head, int type){
-+static inline void output_tram_line( struct list_head *line_head, int type){
-
- struct tram *tram_sym;
- struct list_head *entry;
---
-2.5.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
index 319f25d..2e74963 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
@@ -20,7 +20,7 @@
--- alsa-tools-1.0.24.1-orig//Makefile 2011-07-06 11:27:40.207665000 +0800
+++ alsa-tools-1.0.24.1/Makefile 2011-07-14 15:08:08.877665009 +0800
@@ -1,8 +1,8 @@
- VERSION = 1.1.0
+ VERSION = 1.1.5
TOP = .
-SUBDIRS = as10k1 envy24control hdsploader hdspconf hdspmixer \
+SUBDIRS = as10k1 envy24control \
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch
index 9bd6848..54373d1 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch
@@ -14,7 +14,7 @@
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
- VERSION = 1.1.0
+ VERSION = 1.1.5
TOP = .
-SUBDIRS = as10k1 envy24control \
- mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.3.bb
deleted file mode 100644
index 9e97c0e..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.3.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "Advanced tools for certain ALSA sound card drivers"
-HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
-SECTION = "console/utils"
-LICENSE = "GPLv2 & LGPLv2+"
-DEPENDS = "alsa-lib ncurses glib-2.0"
-
-LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://ld10k1/COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \
- file://autotools.patch \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'file://makefile_no_gtk.patch', d)} \
- file://gitcompile_hdajacksensetest \
- file://0001-as10k1-Make-output_tram_line-static-inline.patch \
- "
-
-SRC_URI[md5sum] = "b23eaae687d55410b92587c2053b301f"
-SRC_URI[sha256sum] = "d88f1dcd6872121383eded5fa24e328e68c54e527db4547e1435d5eabc2b6709"
-
-inherit autotools-brokensep pkgconfig
-
-CLEANBROKEN = "1"
-
-EXTRA_OEMAKE += "GITCOMPILE_ARGS='--host=${HOST_SYS} --build=${BUILD_SYS} --target=${TARGET_SYS} --with-libtool-sysroot=${STAGING_DIR_HOST} --prefix=${prefix}'"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}"
-PACKAGECONFIG[gtk+] = ",,gtk+ gtk+3,"
-
-# configure.ac/.in doesn't exist so force copy
-AUTOTOOLS_COPYACLOCAL = "1"
-
-do_compile_prepend () {
- #Automake dir is not correctly detected in cross compilation case
- export AUTOMAKE_DIR="$(automake --print-libdir)"
- export ACLOCAL_FLAGS="--system-acdir=${ACLOCALDIR}/ ${ACLOCALEXTRAPATH}"
-
- cp ${WORKDIR}/gitcompile_hdajacksensetest ${S}/hdajacksensetest/gitcompile
-}
-
-FILES_${PN} += "${datadir}/ld10k1"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.5.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.5.bb
new file mode 100644
index 0000000..1be43aa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.5.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Advanced tools for certain ALSA sound card drivers"
+HOMEPAGE = "http://www.alsa-project.org"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
+SECTION = "console/utils"
+LICENSE = "GPLv2 & LGPLv2+"
+DEPENDS = "alsa-lib ncurses glib-2.0"
+
+LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://ld10k1/COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \
+ file://autotools.patch \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'file://makefile_no_gtk.patch', d)} \
+ file://gitcompile_hdajacksensetest \
+ "
+
+SRC_URI[md5sum] = "3afb92eb1b4f2edc8691498e57c3ec78"
+SRC_URI[sha256sum] = "bc3c6567de835223ee7d69487b8c22fb395a2e8c613341b0c96e6a5f6a2bd534"
+
+inherit autotools-brokensep pkgconfig
+
+CLEANBROKEN = "1"
+
+EXTRA_OEMAKE += "GITCOMPILE_ARGS='--host=${HOST_SYS} --build=${BUILD_SYS} --target=${TARGET_SYS} --with-libtool-sysroot=${STAGING_DIR_HOST} --prefix=${prefix}'"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}"
+PACKAGECONFIG[gtk+] = ",,gtk+ gtk+3,"
+
+# configure.ac/.in doesn't exist so force copy
+AUTOTOOLS_COPYACLOCAL = "1"
+
+do_compile_prepend () {
+ #Automake dir is not correctly detected in cross compilation case
+ export AUTOMAKE_DIR="$(automake --print-libdir)"
+ export ACLOCAL_FLAGS="--system-acdir=${ACLOCALDIR}/ ${ACLOCALEXTRAPATH}"
+
+ cp ${WORKDIR}/gitcompile_hdajacksensetest ${S}/hdajacksensetest/gitcompile
+}
+
+FILES_${PN} += "${datadir}/ld10k1"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.5.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.4.bb
rename to import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.5.bb
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
index e578dfe..907ca5c 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
@@ -1,4 +1,4 @@
-From 8c3e0ef9625066c2bb67ee3d2b8cd37fd44eadac Mon Sep 17 00:00:00 2001
+From b9d41b784657152a4c5683a9458dffab557f0689 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Fri, 29 Aug 2014 18:58:56 +0300
Subject: [PATCH] alsactl: don't let systemd unit restore the volume when
@@ -22,7 +22,7 @@
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
-index cac8094..ff865dc 100644
+index 90fab9d..190525a 100644
--- a/alsactl/Makefile.am
+++ b/alsactl/Makefile.am
@@ -38,9 +38,10 @@ install-data-hook:
@@ -40,17 +40,17 @@
alsa-state.service: alsa-state.service.in
diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
-index 2884098..bac3ccc 100644
+index 80fd5fd..6beb36d 100644
--- a/alsactl/alsa-restore.service.in
+++ b/alsactl/alsa-restore.service.in
-@@ -8,6 +8,7 @@ Description=Save/Restore Sound Card State
+@@ -7,6 +7,7 @@
+ Description=Save/Restore Sound Card State
ConditionPathExists=!@daemonswitch@
ConditionPathExistsGlob=/dev/snd/control*
- After=alsa-state.service
+ConditionPathExists=@localstatedir@/lib/alsa/asound.state
[Service]
Type=oneshot
--
-2.7.0.rc3
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.4.bb
deleted file mode 100644
index c8f4b86..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.4.bb
+++ /dev/null
@@ -1,109 +0,0 @@
-SUMMARY = "ALSA sound utilities"
-HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
-SECTION = "console/utils"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9"
-DEPENDS = "alsa-lib ncurses libsamplerate0"
-
-PACKAGECONFIG ??= "udev"
-
-# alsabat can be built also without fftw support (with reduced functionality).
-# It would be better to always enable alsabat, but provide an option for
-# enabling/disabling fftw. The configure script doesn't support that, however
-# (at least in any obvious way), so for now we only support alsabat with fftw
-# or no alsabat at all.
-PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftwf"
-
-PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,,udev"
-PACKAGECONFIG[manpages] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
- file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \
- "
-
-SRC_URI[md5sum] = "01e3934ca5bd22a80c27289d1b0adcdc"
-SRC_URI[sha256sum] = "a7831044de92c5bf33bf3365a3f36e49397f4191e934df460ae1ca15138c9d9d"
-
-# On build machines with python-docutils (not python3-docutils !!) installed
-# rst2man (not rst2man.py) is detected and compile fails with
-# | make[1]: *** No rule to make target 'alsaucm.1', needed by 'all-am'. Stop.
-# Avoid this by disabling expicitly
-EXTRA_OECONF = "--disable-rst2man"
-
-inherit autotools gettext pkgconfig manpages
-
-# This are all packages that we need to make. Also, the now empty alsa-utils
-# ipk depends on them.
-
-ALSA_UTILS_PKGS = "\
- ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'alsa-utils-alsabat', '', d)} \
- alsa-utils-alsamixer \
- alsa-utils-alsatplg \
- alsa-utils-midi \
- alsa-utils-aplay \
- alsa-utils-amixer \
- alsa-utils-aconnect \
- alsa-utils-iecset \
- alsa-utils-speakertest \
- alsa-utils-aseqnet \
- alsa-utils-aseqdump \
- alsa-utils-alsactl \
- alsa-utils-alsaloop \
- alsa-utils-alsaucm \
- "
-
-PACKAGES += "${ALSA_UTILS_PKGS}"
-RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}"
-
-FILES_${PN} = ""
-FILES_alsa-utils-alsabat = "${bindir}/alsabat"
-FILES_alsa-utils-alsatplg = "${bindir}/alsatplg"
-FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord"
-FILES_alsa-utils-amixer = "${bindir}/amixer"
-FILES_alsa-utils-alsamixer = "${bindir}/alsamixer"
-FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/"
-FILES_alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi"
-FILES_alsa-utils-aconnect = "${bindir}/aconnect"
-FILES_alsa-utils-aseqnet = "${bindir}/aseqnet"
-FILES_alsa-utils-iecset = "${bindir}/iecset"
-FILES_alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d */*/udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
-FILES_alsa-utils-aseqdump = "${bindir}/aseqdump"
-FILES_alsa-utils-alsaloop = "${bindir}/alsaloop"
-FILES_alsa-utils-alsaucm = "${bindir}/alsaucm"
-
-SUMMARY_alsa-utils-alsabat = "Command-line sound tester for ALSA sound card driver"
-SUMMARY_alsa-utils-alsatplg = "Converts topology text files into binary format for kernel"
-SUMMARY_alsa-utils-aplay = "Play (and record) sound files using ALSA"
-SUMMARY_alsa-utils-amixer = "Command-line control for ALSA mixer and settings"
-SUMMARY_alsa-utils-alsamixer = "ncurses-based control for ALSA mixer and settings"
-SUMMARY_alsa-utils-speakertest = "ALSA surround speaker test utility"
-SUMMARY_alsa-utils-midi = "Miscellaneous MIDI utilities for ALSA"
-SUMMARY_alsa-utils-aconnect = "ALSA sequencer connection manager"
-SUMMARY_alsa-utils-aseqnet = "Network client/server for ALSA sequencer"
-SUMMARY_alsa-utils-iecset = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
-SUMMARY_alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.state"
-SUMMARY_alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port"
-SUMMARY_alsa-utils-alsaloop = "ALSA PCM loopback utility"
-SUMMARY_alsa-utils-alsaucm = "ALSA Use Case Manager"
-
-RRECOMMENDS_alsa-utils-alsactl = "alsa-states"
-
-ALLOW_EMPTY_alsa-utils = "1"
-
-do_install() {
- autotools_do_install
-
- # We don't ship this here because it requires a dependency on bash.
- # See alsa-utils-scripts_${PV}.bb
- rm ${D}${sbindir}/alsaconf
- rm ${D}${sbindir}/alsa-info.sh
- rm -f ${D}${sbindir}/alsabat-test.sh
-
- if ${@bb.utils.contains('PACKAGECONFIG', 'udev', 'false', 'true', d)}; then
- # This is where alsa-utils will install its rules if we don't tell it anything else.
- rm -rf ${D}${nonarch_base_libdir}/udev
- rmdir --ignore-fail-on-non-empty ${D}${nonarch_base_libdir}
- fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.5.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.5.bb
new file mode 100644
index 0000000..33215bf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.5.bb
@@ -0,0 +1,108 @@
+SUMMARY = "ALSA sound utilities"
+HOMEPAGE = "http://www.alsa-project.org"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
+SECTION = "console/utils"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9"
+DEPENDS = "alsa-lib ncurses libsamplerate0"
+
+PACKAGECONFIG ??= "udev"
+
+# alsabat can be built also without fftw support (with reduced functionality).
+# It would be better to always enable alsabat, but provide an option for
+# enabling/disabling fftw. The configure script doesn't support that, however
+# (at least in any obvious way), so for now we only support alsabat with fftw
+# or no alsabat at all.
+PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftwf"
+
+PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,--with-udev-rules-dir=/unwanted/rules.d,udev"
+PACKAGECONFIG[manpages] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
+ file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \
+ "
+
+SRC_URI[md5sum] = "dfe6ea147a5e07a056919591c2f5dac3"
+SRC_URI[sha256sum] = "320bd285e91db6e7fd7db3c9ec6f55b02f35449ff273c7844780ac6a5a3de2e8"
+
+# On build machines with python-docutils (not python3-docutils !!) installed
+# rst2man (not rst2man.py) is detected and compile fails with
+# | make[1]: *** No rule to make target 'alsaucm.1', needed by 'all-am'. Stop.
+# Avoid this by disabling expicitly
+EXTRA_OECONF = "--disable-rst2man"
+
+inherit autotools gettext pkgconfig manpages
+
+# This are all packages that we need to make. Also, the now empty alsa-utils
+# ipk depends on them.
+
+ALSA_UTILS_PKGS = "\
+ ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'alsa-utils-alsabat', '', d)} \
+ alsa-utils-alsamixer \
+ alsa-utils-alsatplg \
+ alsa-utils-midi \
+ alsa-utils-aplay \
+ alsa-utils-amixer \
+ alsa-utils-aconnect \
+ alsa-utils-iecset \
+ alsa-utils-speakertest \
+ alsa-utils-aseqnet \
+ alsa-utils-aseqdump \
+ alsa-utils-alsactl \
+ alsa-utils-alsaloop \
+ alsa-utils-alsaucm \
+ "
+
+PACKAGES += "${ALSA_UTILS_PKGS}"
+RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}"
+
+FILES_${PN} = ""
+FILES_alsa-utils-alsabat = "${bindir}/alsabat"
+FILES_alsa-utils-alsatplg = "${bindir}/alsatplg"
+FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord"
+FILES_alsa-utils-amixer = "${bindir}/amixer"
+FILES_alsa-utils-alsamixer = "${bindir}/alsamixer"
+FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/"
+FILES_alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi"
+FILES_alsa-utils-aconnect = "${bindir}/aconnect"
+FILES_alsa-utils-aseqnet = "${bindir}/aseqnet"
+FILES_alsa-utils-iecset = "${bindir}/iecset"
+FILES_alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d */*/udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
+FILES_alsa-utils-aseqdump = "${bindir}/aseqdump"
+FILES_alsa-utils-alsaloop = "${bindir}/alsaloop"
+FILES_alsa-utils-alsaucm = "${bindir}/alsaucm"
+
+SUMMARY_alsa-utils-alsabat = "Command-line sound tester for ALSA sound card driver"
+SUMMARY_alsa-utils-alsatplg = "Converts topology text files into binary format for kernel"
+SUMMARY_alsa-utils-aplay = "Play (and record) sound files using ALSA"
+SUMMARY_alsa-utils-amixer = "Command-line control for ALSA mixer and settings"
+SUMMARY_alsa-utils-alsamixer = "ncurses-based control for ALSA mixer and settings"
+SUMMARY_alsa-utils-speakertest = "ALSA surround speaker test utility"
+SUMMARY_alsa-utils-midi = "Miscellaneous MIDI utilities for ALSA"
+SUMMARY_alsa-utils-aconnect = "ALSA sequencer connection manager"
+SUMMARY_alsa-utils-aseqnet = "Network client/server for ALSA sequencer"
+SUMMARY_alsa-utils-iecset = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
+SUMMARY_alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.state"
+SUMMARY_alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port"
+SUMMARY_alsa-utils-alsaloop = "ALSA PCM loopback utility"
+SUMMARY_alsa-utils-alsaucm = "ALSA Use Case Manager"
+
+RRECOMMENDS_alsa-utils-alsactl = "alsa-states"
+
+ALLOW_EMPTY_alsa-utils = "1"
+
+do_install() {
+ autotools_do_install
+
+ # We don't ship this here because it requires a dependency on bash.
+ # See alsa-utils-scripts_${PV}.bb
+ rm ${D}${sbindir}/alsaconf
+ rm ${D}${sbindir}/alsa-info.sh
+ rm -f ${D}${sbindir}/alsabat-test.sh
+
+ # If udev is disabled, we told configure to install the rules
+ # in /unwanted, so we can remove them now. If udev is enabled,
+ # then /unwanted won't exist and this will have no effect.
+ rm -rf ${D}/unwanted
+}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-build-fix-for-mips.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-build-fix-for-mips.patch
deleted file mode 100644
index 3f8224a..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-build-fix-for-mips.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From f34c567045bea5a7ded9bcfa8e785cfd24cc7dde Mon Sep 17 00:00:00 2001
-From: Shivraj Patil <shivraj.patil@imgtec.com>
-Date: Tue, 4 Apr 2017 18:56:01 +0530
-Subject: [PATCH] build fix for mips
-
-Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
-Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
----
-Upstream-Status: Backport
-
- libavcodec/mips/hevcpred_init_mips.c | 3 ++-
- libavcodec/mips/hevcpred_msa.c | 2 +-
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/libavcodec/mips/hevcpred_init_mips.c b/libavcodec/mips/hevcpred_init_mips.c
-index 331cfac115..e987698d66 100644
---- a/libavcodec/mips/hevcpred_init_mips.c
-+++ b/libavcodec/mips/hevcpred_init_mips.c
-@@ -18,7 +18,8 @@
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
--#include "libavcodec/hevc.h"
-+#include "config.h"
-+#include "libavutil/attributes.h"
- #include "libavcodec/mips/hevcpred_mips.h"
-
- #if HAVE_MSA
-diff --git a/libavcodec/mips/hevcpred_msa.c b/libavcodec/mips/hevcpred_msa.c
-index 6a3b2815fd..963c64c861 100644
---- a/libavcodec/mips/hevcpred_msa.c
-+++ b/libavcodec/mips/hevcpred_msa.c
-@@ -18,7 +18,7 @@
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
--#include "libavcodec/hevc.h"
-+#include "libavcodec/hevcdec.h"
- #include "libavutil/mips/generic_macros_msa.h"
- #include "hevcpred_mips.h"
-
---
-2.13.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14054.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14054.patch
deleted file mode 100644
index e8baa18..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14054.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 124eb202e70678539544f6268efc98131f19fa49 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=E5=AD=99=E6=B5=A9=20and=20=E5=BC=A0=E6=B4=AA=E4=BA=AE=28?=
- =?UTF-8?q?=E6=9C=9B=E5=88=9D=29?= <tony.sh and wangchu.zhl@alibaba-inc.com>
-Date: Fri, 25 Aug 2017 01:15:28 +0200
-Subject: [PATCH] avformat/rmdec: Fix DoS due to lack of eof check
-
-Fixes: loop.ivr
-
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14054
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/rmdec.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
-index 178eaea..d6d7d9c 100644
---- a/libavformat/rmdec.c
-+++ b/libavformat/rmdec.c
-@@ -1223,8 +1223,11 @@ static int ivr_read_header(AVFormatContext *s)
- av_log(s, AV_LOG_DEBUG, "%s = '%s'\n", key, val);
- } else if (type == 4) {
- av_log(s, AV_LOG_DEBUG, "%s = '0x", key);
-- for (j = 0; j < len; j++)
-+ for (j = 0; j < len; j++) {
-+ if (avio_feof(pb))
-+ return AVERROR_INVALIDDATA;
- av_log(s, AV_LOG_DEBUG, "%X", avio_r8(pb));
-+ }
- av_log(s, AV_LOG_DEBUG, "'\n");
- } else if (len == 4 && type == 3 && !strncmp(key, "StreamCount", tlen)) {
- nb_streams = value = avio_rb32(pb);
---
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14055.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14055.patch
deleted file mode 100644
index 37d0d1a..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14055.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 4f05e2e2dc1a89f38cd9f0960a6561083d714f1e Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michael@niedermayer.cc>
-Date: Fri, 25 Aug 2017 01:15:30 +0200
-Subject: [PATCH] avformat/mvdec: Fix DoS due to lack of eof check
-
-Fixes: loop.mv
-
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14055
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/mvdec.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/mvdec.c b/libavformat/mvdec.c
-index 0e12c8c..f7aa4cb 100644
---- a/libavformat/mvdec.c
-+++ b/libavformat/mvdec.c
-@@ -342,6 +342,8 @@ static int mv_read_header(AVFormatContext *avctx)
- uint32_t pos = avio_rb32(pb);
- uint32_t asize = avio_rb32(pb);
- uint32_t vsize = avio_rb32(pb);
-+ if (avio_feof(pb))
-+ return AVERROR_INVALIDDATA;
- avio_skip(pb, 8);
- av_add_index_entry(ast, pos, timestamp, asize, 0, AVINDEX_KEYFRAME);
- av_add_index_entry(vst, pos + asize, i, vsize, 0, AVINDEX_KEYFRAME);
---
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14056.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14056.patch
deleted file mode 100644
index 088b357..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14056.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 96f24d1bee7fe7bac08e2b7c74db1a046c9dc0de Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=E5=AD=99=E6=B5=A9=20and=20=E5=BC=A0=E6=B4=AA=E4=BA=AE=28?=
- =?UTF-8?q?=E6=9C=9B=E5=88=9D=29?= <tony.sh and wangchu.zhl@alibaba-inc.com>
-Date: Fri, 25 Aug 2017 01:15:29 +0200
-Subject: [PATCH] avformat/rl2: Fix DoS due to lack of eof check
-
-Fixes: loop.rl2
-
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14056
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/rl2.c | 15 ++++++++++++---
- 1 file changed, 12 insertions(+), 3 deletions(-)
-
-diff --git a/libavformat/rl2.c b/libavformat/rl2.c
-index 0bec8f1..eb1682d 100644
---- a/libavformat/rl2.c
-+++ b/libavformat/rl2.c
-@@ -170,12 +170,21 @@ static av_cold int rl2_read_header(AVFormatContext *s)
- }
-
- /** read offset and size tables */
-- for(i=0; i < frame_count;i++)
-+ for(i=0; i < frame_count;i++) {
-+ if (avio_feof(pb))
-+ return AVERROR_INVALIDDATA;
- chunk_size[i] = avio_rl32(pb);
-- for(i=0; i < frame_count;i++)
-+ }
-+ for(i=0; i < frame_count;i++) {
-+ if (avio_feof(pb))
-+ return AVERROR_INVALIDDATA;
- chunk_offset[i] = avio_rl32(pb);
-- for(i=0; i < frame_count;i++)
-+ }
-+ for(i=0; i < frame_count;i++) {
-+ if (avio_feof(pb))
-+ return AVERROR_INVALIDDATA;
- audio_size[i] = avio_rl32(pb) & 0xFFFF;
-+ }
-
- /** build the sample index */
- for(i=0;i<frame_count;i++){
---
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14057.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14057.patch
deleted file mode 100644
index b301d23..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14057.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 7f9ec5593e04827249e7aeb466da06a98a0d7329 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=E5=AD=99=E6=B5=A9=20and=20=E5=BC=A0=E6=B4=AA=E4=BA=AE=28?=
- =?UTF-8?q?=E6=9C=9B=E5=88=9D=29?= <tony.sh and wangchu.zhl@alibaba-inc.com>
-Date: Fri, 25 Aug 2017 12:37:25 +0200
-Subject: [PATCH] avformat/asfdec: Fix DoS due to lack of eof check
-
-Fixes: loop.asf
-
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14057
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/asfdec_f.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c
-index be09a92..f3acbae 100644
---- a/libavformat/asfdec_f.c
-+++ b/libavformat/asfdec_f.c
-@@ -749,13 +749,15 @@ static int asf_read_marker(AVFormatContext *s, int64_t size)
- count = avio_rl32(pb); // markers count
- avio_rl16(pb); // reserved 2 bytes
- name_len = avio_rl16(pb); // name length
-- for (i = 0; i < name_len; i++)
-- avio_r8(pb); // skip the name
-+ avio_skip(pb, name_len);
-
- for (i = 0; i < count; i++) {
- int64_t pres_time;
- int name_len;
-
-+ if (avio_feof(pb))
-+ return AVERROR_INVALIDDATA;
-+
- avio_rl64(pb); // offset, 8 bytes
- pres_time = avio_rl64(pb); // presentation time
- pres_time -= asf->hdr.preroll * 10000;
---
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14058.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14058.patch
deleted file mode 100644
index 95803ce..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14058.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From 7ec414892ddcad88313848494b6fc5f437c9ca4a Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michael@niedermayer.cc>
-Date: Sat, 26 Aug 2017 01:26:58 +0200
-Subject: [PATCH] avformat/hls: Fix DoS due to infinite loop
-
-Fixes: loop.m3u
-
-The default max iteration count of 1000 is arbitrary and ideas for a better solution are welcome
-
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-
-Previous version reviewed-by: Steven Liu <lingjiujianke@gmail.com>
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14058
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- doc/demuxers.texi | 18 ++++++++++++++++++
- libavformat/hls.c | 7 +++++++
- 2 files changed, 25 insertions(+)
-
-diff --git a/doc/demuxers.texi b/doc/demuxers.texi
-index 29a23d4..73dc0fe 100644
---- a/doc/demuxers.texi
-+++ b/doc/demuxers.texi
-@@ -300,6 +300,24 @@ used to end the output video at the length of the shortest input file,
- which in this case is @file{input.mp4} as the GIF in this example loops
- infinitely.
-
-+@section hls
-+
-+HLS demuxer
-+
-+It accepts the following options:
-+
-+@table @option
-+@item live_start_index
-+segment index to start live streams at (negative values are from the end).
-+
-+@item allowed_extensions
-+',' separated list of file extensions that hls is allowed to access.
-+
-+@item max_reload
-+Maximum number of times a insufficient list is attempted to be reloaded.
-+Default value is 1000.
-+@end table
-+
- @section image2
-
- Image file demuxer.
-diff --git a/libavformat/hls.c b/libavformat/hls.c
-index 01731bd..0995345 100644
---- a/libavformat/hls.c
-+++ b/libavformat/hls.c
-@@ -205,6 +205,7 @@ typedef struct HLSContext {
- AVDictionary *avio_opts;
- int strict_std_compliance;
- char *allowed_extensions;
-+ int max_reload;
- } HLSContext;
-
- static int read_chomp_line(AVIOContext *s, char *buf, int maxlen)
-@@ -1263,6 +1264,7 @@ static int read_data(void *opaque, uint8_t *buf, int buf_size)
- HLSContext *c = v->parent->priv_data;
- int ret, i;
- int just_opened = 0;
-+ int reload_count = 0;
-
- restart:
- if (!v->needed)
-@@ -1294,6 +1296,9 @@ restart:
- reload_interval = default_reload_interval(v);
-
- reload:
-+ reload_count++;
-+ if (reload_count > c->max_reload)
-+ return AVERROR_EOF;
- if (!v->finished &&
- av_gettime_relative() - v->last_load_time >= reload_interval) {
- if ((ret = parse_playlist(c, v->url, v, NULL)) < 0) {
-@@ -2150,6 +2155,8 @@ static const AVOption hls_options[] = {
- OFFSET(allowed_extensions), AV_OPT_TYPE_STRING,
- {.str = "3gp,aac,avi,flac,mkv,m3u8,m4a,m4s,m4v,mpg,mov,mp2,mp3,mp4,mpeg,mpegts,ogg,ogv,oga,ts,vob,wav"},
- INT_MIN, INT_MAX, FLAGS},
-+ {"max_reload", "Maximum number of times a insufficient list is attempted to be reloaded",
-+ OFFSET(max_reload), AV_OPT_TYPE_INT, {.i64 = 1000}, 0, INT_MAX, FLAGS},
- {NULL}
- };
-
---
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14059.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14059.patch
deleted file mode 100644
index 34fde0b..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14059.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 7e80b63ecd259d69d383623e75b318bf2bd491f6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=E5=AD=99=E6=B5=A9=20and=20=E5=BC=A0=E6=B4=AA=E4=BA=AE=28?=
- =?UTF-8?q?=E6=9C=9B=E5=88=9D=29?= <tony.sh and wangchu.zhl@alibaba-inc.com>
-Date: Fri, 25 Aug 2017 01:15:27 +0200
-Subject: [PATCH] avformat/cinedec: Fix DoS due to lack of eof check
-
-Fixes: loop.cine
-
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14059
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/cinedec.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/libavformat/cinedec.c b/libavformat/cinedec.c
-index 763b93b..de34fb9 100644
---- a/libavformat/cinedec.c
-+++ b/libavformat/cinedec.c
-@@ -267,8 +267,12 @@ static int cine_read_header(AVFormatContext *avctx)
-
- /* parse image offsets */
- avio_seek(pb, offImageOffsets, SEEK_SET);
-- for (i = 0; i < st->duration; i++)
-+ for (i = 0; i < st->duration; i++) {
-+ if (avio_feof(pb))
-+ return AVERROR_INVALIDDATA;
-+
- av_add_index_entry(st, avio_rl64(pb), i, 0, 0, AVINDEX_KEYFRAME);
-+ }
-
- return 0;
- }
---
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14169.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14169.patch
deleted file mode 100644
index e1284fa..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14169.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 9d00fb9d70ee8c0cc7002b89318c5be00f1bbdad Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=E5=AD=99=E6=B5=A9=28=E6=99=93=E9=BB=91=29?=
- <tony.sh@alibaba-inc.com>
-Date: Tue, 29 Aug 2017 23:59:21 +0200
-Subject: [PATCH] avformat/mxfdec: Fix Sign error in mxf_read_primer_pack()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes: 20170829B.mxf
-
-Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14169
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/mxfdec.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
-index 6adb77d..91731a7 100644
---- a/libavformat/mxfdec.c
-+++ b/libavformat/mxfdec.c
-@@ -500,7 +500,7 @@ static int mxf_read_primer_pack(void *arg, AVIOContext *pb, int tag, int size, U
- avpriv_request_sample(pb, "Primer pack item length %d", item_len);
- return AVERROR_PATCHWELCOME;
- }
-- if (item_num > 65536) {
-+ if (item_num > 65536 || item_num < 0) {
- av_log(mxf->fc, AV_LOG_ERROR, "item_num %d is too large\n", item_num);
- return AVERROR_INVALIDDATA;
- }
---
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14170.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14170.patch
deleted file mode 100644
index 8860125..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14170.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 900f39692ca0337a98a7cf047e4e2611071810c2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=E5=AD=99=E6=B5=A9=28=E6=99=93=E9=BB=91=29?=
- <tony.sh@alibaba-inc.com>
-Date: Tue, 29 Aug 2017 23:59:21 +0200
-Subject: [PATCH] avformat/mxfdec: Fix DoS issues in
- mxf_read_index_entry_array()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes: 20170829A.mxf
-
-Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14170
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/mxfdec.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
-index f8d0f9e..6adb77d 100644
---- a/libavformat/mxfdec.c
-+++ b/libavformat/mxfdec.c
-@@ -899,6 +899,8 @@ static int mxf_read_index_entry_array(AVIOContext *pb, MXFIndexTableSegment *seg
- segment->nb_index_entries = avio_rb32(pb);
-
- length = avio_rb32(pb);
-+ if(segment->nb_index_entries && length < 11)
-+ return AVERROR_INVALIDDATA;
-
- if (!(segment->temporal_offset_entries=av_calloc(segment->nb_index_entries, sizeof(*segment->temporal_offset_entries))) ||
- !(segment->flag_entries = av_calloc(segment->nb_index_entries, sizeof(*segment->flag_entries))) ||
-@@ -909,6 +911,8 @@ static int mxf_read_index_entry_array(AVIOContext *pb, MXFIndexTableSegment *seg
- }
-
- for (i = 0; i < segment->nb_index_entries; i++) {
-+ if(avio_feof(pb))
-+ return AVERROR_INVALIDDATA;
- segment->temporal_offset_entries[i] = avio_r8(pb);
- avio_r8(pb); /* KeyFrameOffset */
- segment->flag_entries[i] = avio_r8(pb);
---
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14171.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14171.patch
deleted file mode 100644
index e2ae204..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14171.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From c24bcb553650b91e9eff15ef6e54ca73de2453b7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=E5=AD=99=E6=B5=A9=28=E6=99=93=E9=BB=91=29?=
- <tony.sh@alibaba-inc.com>
-Date: Tue, 29 Aug 2017 23:59:21 +0200
-Subject: [PATCH] avformat/nsvdec: Fix DoS due to lack of eof check in
- nsvs_file_offset loop.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes: 20170829.nsv
-
-Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14171
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/nsvdec.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
-index c6ddb67..d8ce656 100644
---- a/libavformat/nsvdec.c
-+++ b/libavformat/nsvdec.c
-@@ -335,8 +335,11 @@ static int nsv_parse_NSVf_header(AVFormatContext *s)
- if (!nsv->nsvs_file_offset)
- return AVERROR(ENOMEM);
-
-- for(i=0;i<table_entries_used;i++)
-+ for(i=0;i<table_entries_used;i++) {
-+ if (avio_feof(pb))
-+ return AVERROR_INVALIDDATA;
- nsv->nsvs_file_offset[i] = avio_rl32(pb) + size;
-+ }
-
- if(table_entries > table_entries_used &&
- avio_rl32(pb) == MKTAG('T','O','C','2')) {
---
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14222.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14222.patch
deleted file mode 100644
index ee02037..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14222.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 9cb4eb772839c5e1de2855d126bf74ff16d13382 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michael@niedermayer.cc>
-Date: Tue, 5 Sep 2017 00:16:29 +0200
-Subject: [PATCH] avformat/mov: Fix DoS in read_tfra()
-
-Fixes: Missing EOF check in loop
-No testcase
-
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14222
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/mov.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/libavformat/mov.c b/libavformat/mov.c
-index 994e9c6..2519707 100644
---- a/libavformat/mov.c
-+++ b/libavformat/mov.c
-@@ -6094,6 +6094,13 @@ static int read_tfra(MOVContext *mov, AVIOContext *f)
- }
- for (i = 0; i < index->item_count; i++) {
- int64_t time, offset;
-+
-+ if (avio_feof(f)) {
-+ index->item_count = 0;
-+ av_freep(&index->items);
-+ return AVERROR_INVALIDDATA;
-+ }
-+
- if (version == 1) {
- time = avio_rb64(f);
- offset = avio_rb64(f);
---
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14223.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14223.patch
deleted file mode 100644
index d1fef6b..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14223.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From afc9c683ed9db01edb357bc8c19edad4282b3a97 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michael@niedermayer.cc>
-Date: Tue, 5 Sep 2017 00:16:29 +0200
-Subject: [PATCH] avformat/asfdec: Fix DoS in asf_build_simple_index()
-
-Fixes: Missing EOF check in loop
-No testcase
-
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14223
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/asfdec_f.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c
-index f3acbae..cc648b9 100644
---- a/libavformat/asfdec_f.c
-+++ b/libavformat/asfdec_f.c
-@@ -1610,6 +1610,11 @@ static int asf_build_simple_index(AVFormatContext *s, int stream_index)
- int64_t pos = s->internal->data_offset + s->packet_size * (int64_t)pktnum;
- int64_t index_pts = FFMAX(av_rescale(itime, i, 10000) - asf->hdr.preroll, 0);
-
-+ if (avio_feof(s->pb)) {
-+ ret = AVERROR_INVALIDDATA;
-+ goto end;
-+ }
-+
- if (pos != last_pos) {
- av_log(s, AV_LOG_DEBUG, "pktnum:%d, pktct:%d pts: %"PRId64"\n",
- pktnum, pktct, index_pts);
---
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14225.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14225.patch
deleted file mode 100644
index ce6845e..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14225.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Subject: [PATCH] ffprobe: Fix null pointer dereference with color primaries
-
-Found-by: AD-lab of venustech
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14225
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- ffprobe.c | 15 +++++++++++----
- 1 file changed, 11 insertions(+), 4 deletions(-)
-
-diff --git a/ffprobe.c b/ffprobe.c
-index a219fc1..df22b30 100644
---- a/ffprobe.c
-+++ b/ffprobe.c
-@@ -1899,6 +1899,16 @@ static void print_pkt_side_data(WriterContext *w,
- writer_print_section_footer(w);
- }
-
-+static void print_primaries(WriterContext *w, enum AVColorPrimaries color_primaries)
-+{
-+ const char *val = av_color_primaries_name(color_primaries);
-+ if (!val || color_primaries == AVCOL_PRI_UNSPECIFIED) {
-+ print_str_opt("color_primaries", "unknown");
-+ } else {
-+ print_str("color_primaries", val);
-+ }
-+}
-+
- static void clear_log(int need_lock)
- {
- int i;
-@@ -2420,10 +2430,7 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
- else
- print_str_opt("color_transfer", av_color_transfer_name(par->color_trc));
-
-- if (par->color_primaries != AVCOL_PRI_UNSPECIFIED)
-- print_str("color_primaries", av_color_primaries_name(par->color_primaries));
-- else
-- print_str_opt("color_primaries", av_color_primaries_name(par->color_primaries));
-+ print_primaries(w, par->color_primaries);
-
- if (par->chroma_location != AVCHROMA_LOC_UNSPECIFIED)
- print_str("chroma_location", av_chroma_location_name(par->chroma_location));
---
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.3.bb
deleted file mode 100644
index c1ebecf..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.3.bb
+++ /dev/null
@@ -1,165 +0,0 @@
-SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video."
-DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \
- mux, demux, stream, filter and play pretty much anything that humans and machines \
- have created. It supports the most obscure ancient formats up to the cutting edge."
-HOMEPAGE = "https://www.ffmpeg.org/"
-SECTION = "libs"
-
-LICENSE = "BSD & GPLv2+ & LGPLv2.1+ & MIT"
-LICENSE_${PN} = "GPLv2+"
-LICENSE_libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
-LICENSE_libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
-LICENSE_libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
-LICENSE_libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
-LICENSE_libavresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
-LICENSE_libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
-LICENSE_libpostproc = "GPLv2+"
-LICENSE_libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
-LICENSE_libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
-LICENSE_FLAGS = "commercial"
-
-LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
- file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
- file://mips64_cpu_detection.patch \
- file://0001-build-fix-for-mips.patch \
- file://CVE-2017-14054.patch \
- file://CVE-2017-14055.patch \
- file://CVE-2017-14056.patch \
- file://CVE-2017-14057.patch \
- file://CVE-2017-14058.patch \
- file://CVE-2017-14059.patch \
- file://CVE-2017-14169.patch \
- file://CVE-2017-14170.patch \
- file://CVE-2017-14171.patch \
- file://CVE-2017-14222.patch \
- file://CVE-2017-14223.patch \
- file://CVE-2017-14225.patch \
- "
-SRC_URI[md5sum] = "743dc66ebe67180283b92d029f690d0f"
-SRC_URI[sha256sum] = "d2a9002cdc6b533b59728827186c044ad02ba64841f1b7cd6c21779875453a1e"
-
-# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
-ARM_INSTRUCTION_SET = "arm"
-
-# Should be API compatible with libav (which was a fork of ffmpeg)
-# libpostproc was previously packaged from a separate recipe
-PROVIDES = "libav libpostproc"
-
-DEPENDS = "alsa-lib zlib libogg yasm-native"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \
- bzlib gpl lzma theora x264 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv', '', d)}"
-
-# libraries to build in addition to avutil
-PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
-PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
-PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec"
-PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
-PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
-PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
-PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
-PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample"
-
-# features to support
-PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
-PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
-PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
-PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
-PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
-PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
-PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
-PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
-PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
-PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2"
-PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
-PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
-PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
-PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
-PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
-PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
-PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
-
-# Check codecs that require --enable-nonfree
-USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}"
-
-def cpu(d):
- for arg in (d.getVar('TUNE_CCARGS') or '').split():
- if arg.startswith('-mcpu='):
- return arg[6:]
- return 'generic'
-
-EXTRA_OECONF = " \
- --disable-stripping \
- --enable-pic \
- --enable-shared \
- --enable-pthreads \
- --disable-libxcb \
- --disable-libxcb-shm \
- --disable-libxcb-xfixes \
- --disable-libxcb-shape \
- ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
- \
- --cross-prefix=${TARGET_PREFIX} \
- \
- --ld="${CCLD}" \
- --cc="${CC}" \
- --cxx="${CXX}" \
- --arch=${TARGET_ARCH} \
- --target-os="linux" \
- --enable-cross-compile \
- --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
- --extra-ldflags="${TARGET_LDFLAGS}" \
- --sysroot="${STAGING_DIR_TARGET}" \
- --enable-hardcoded-tables \
- ${EXTRA_FFCONF} \
- --libdir=${libdir} \
- --shlibdir=${libdir} \
- --datadir=${datadir}/ffmpeg \
- ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \
- --cpu=${@cpu(d)} \
- --pkg-config=pkg-config \
-"
-
-EXTRA_OECONF_append_linux-gnux32 = " --disable-asm"
-
-do_configure() {
- ${S}/configure ${EXTRA_OECONF}
-}
-
-PACKAGES =+ "libavcodec \
- libavdevice \
- libavfilter \
- libavformat \
- libavresample \
- libavutil \
- libpostproc \
- libswresample \
- libswscale"
-
-FILES_libavcodec = "${libdir}/libavcodec${SOLIBS}"
-FILES_libavdevice = "${libdir}/libavdevice${SOLIBS}"
-FILES_libavfilter = "${libdir}/libavfilter${SOLIBS}"
-FILES_libavformat = "${libdir}/libavformat${SOLIBS}"
-FILES_libavresample = "${libdir}/libavresample${SOLIBS}"
-FILES_libavutil = "${libdir}/libavutil${SOLIBS}"
-FILES_libpostproc = "${libdir}/libpostproc${SOLIBS}"
-FILES_libswresample = "${libdir}/libswresample${SOLIBS}"
-FILES_libswscale = "${libdir}/libswscale${SOLIBS}"
-
-# ffmpeg disables PIC on some platforms (e.g. x86-32)
-INSANE_SKIP_${MLPREFIX}libavcodec = "textrel"
-INSANE_SKIP_${MLPREFIX}libavdevice = "textrel"
-INSANE_SKIP_${MLPREFIX}libavfilter = "textrel"
-INSANE_SKIP_${MLPREFIX}libavformat = "textrel"
-INSANE_SKIP_${MLPREFIX}libavutil = "textrel"
-INSANE_SKIP_${MLPREFIX}libavresample = "textrel"
-INSANE_SKIP_${MLPREFIX}libswscale = "textrel"
-INSANE_SKIP_${MLPREFIX}libswresample = "textrel"
-INSANE_SKIP_${MLPREFIX}libpostproc = "textrel"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.4.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.4.2.bb
new file mode 100644
index 0000000..879cf7f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.4.2.bb
@@ -0,0 +1,151 @@
+SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video."
+DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \
+ mux, demux, stream, filter and play pretty much anything that humans and machines \
+ have created. It supports the most obscure ancient formats up to the cutting edge."
+HOMEPAGE = "https://www.ffmpeg.org/"
+SECTION = "libs"
+
+LICENSE = "BSD & GPLv2+ & LGPLv2.1+ & MIT"
+LICENSE_${PN} = "GPLv2+"
+LICENSE_libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libavresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libpostproc = "GPLv2+"
+LICENSE_libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_FLAGS = "commercial"
+
+LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
+ file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
+
+SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
+ file://mips64_cpu_detection.patch \
+ "
+SRC_URI[md5sum] = "cbf4ead227fcedddf54c86013705a988"
+SRC_URI[sha256sum] = "2b92e9578ef8b3e49eeab229e69305f5f4cbc1fdaa22e927fc7fca18acccd740"
+
+# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
+ARM_INSTRUCTION_SET = "arm"
+
+# Should be API compatible with libav (which was a fork of ffmpeg)
+# libpostproc was previously packaged from a separate recipe
+PROVIDES = "libav libpostproc"
+
+DEPENDS = "alsa-lib zlib libogg yasm-native"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \
+ bzlib gpl lzma theora x264 \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv', '', d)}"
+
+# libraries to build in addition to avutil
+PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
+PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
+PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec"
+PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
+PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
+PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
+PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
+PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample"
+
+# features to support
+PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
+PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
+PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
+PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
+PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
+PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
+PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
+PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2"
+PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
+PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
+PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
+PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
+PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
+PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
+PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
+
+# Check codecs that require --enable-nonfree
+USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}"
+
+def cpu(d):
+ for arg in (d.getVar('TUNE_CCARGS') or '').split():
+ if arg.startswith('-mcpu='):
+ return arg[6:]
+ return 'generic'
+
+EXTRA_OECONF = " \
+ --disable-stripping \
+ --enable-pic \
+ --enable-shared \
+ --enable-pthreads \
+ --disable-libxcb \
+ --disable-libxcb-shm \
+ --disable-libxcb-xfixes \
+ --disable-libxcb-shape \
+ ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
+ \
+ --cross-prefix=${TARGET_PREFIX} \
+ \
+ --ld="${CCLD}" \
+ --cc="${CC}" \
+ --cxx="${CXX}" \
+ --arch=${TARGET_ARCH} \
+ --target-os="linux" \
+ --enable-cross-compile \
+ --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
+ --extra-ldflags="${TARGET_LDFLAGS}" \
+ --sysroot="${STAGING_DIR_TARGET}" \
+ --enable-hardcoded-tables \
+ ${EXTRA_FFCONF} \
+ --libdir=${libdir} \
+ --shlibdir=${libdir} \
+ --datadir=${datadir}/ffmpeg \
+ ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \
+ --cpu=${@cpu(d)} \
+ --pkg-config=pkg-config \
+"
+
+EXTRA_OECONF_append_linux-gnux32 = " --disable-asm"
+
+do_configure() {
+ ${S}/configure ${EXTRA_OECONF}
+}
+
+PACKAGES =+ "libavcodec \
+ libavdevice \
+ libavfilter \
+ libavformat \
+ libavresample \
+ libavutil \
+ libpostproc \
+ libswresample \
+ libswscale"
+
+FILES_libavcodec = "${libdir}/libavcodec${SOLIBS}"
+FILES_libavdevice = "${libdir}/libavdevice${SOLIBS}"
+FILES_libavfilter = "${libdir}/libavfilter${SOLIBS}"
+FILES_libavformat = "${libdir}/libavformat${SOLIBS}"
+FILES_libavresample = "${libdir}/libavresample${SOLIBS}"
+FILES_libavutil = "${libdir}/libavutil${SOLIBS}"
+FILES_libpostproc = "${libdir}/libpostproc${SOLIBS}"
+FILES_libswresample = "${libdir}/libswresample${SOLIBS}"
+FILES_libswscale = "${libdir}/libswscale${SOLIBS}"
+
+# ffmpeg disables PIC on some platforms (e.g. x86-32)
+INSANE_SKIP_${MLPREFIX}libavcodec = "textrel"
+INSANE_SKIP_${MLPREFIX}libavdevice = "textrel"
+INSANE_SKIP_${MLPREFIX}libavfilter = "textrel"
+INSANE_SKIP_${MLPREFIX}libavformat = "textrel"
+INSANE_SKIP_${MLPREFIX}libavutil = "textrel"
+INSANE_SKIP_${MLPREFIX}libavresample = "textrel"
+INSANE_SKIP_${MLPREFIX}libswscale = "textrel"
+INSANE_SKIP_${MLPREFIX}libswresample = "textrel"
+INSANE_SKIP_${MLPREFIX}libpostproc = "textrel"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
new file mode 100644
index 0000000..67a872c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
@@ -0,0 +1,35 @@
+From a1d7c582392c8bc87fa9411af77b20e011944357 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 25 Jan 2018 17:55:02 +0200
+Subject: [PATCH] gst/gstpluginloader.c: when env var is set do not fall
+ through to system plugin scanner
+
+If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that.
+
+Falling through to the one installed on the system is problamatic in cross-compilation
+environemnts, regardless of whether one pointed to by the env var succeeded or failed.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gst/gstpluginloader.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c
+index 430829d..3a75731 100644
+--- a/gst/gstpluginloader.c
++++ b/gst/gstpluginloader.c
+@@ -471,9 +471,7 @@ gst_plugin_loader_spawn (GstPluginLoader * loader)
+ helper_bin = g_strdup (env);
+ res = gst_plugin_loader_try_helper (loader, helper_bin);
+ g_free (helper_bin);
+- }
+-
+- if (!res) {
++ } else {
+ GST_LOG ("Trying installed plugin scanner");
+
+ #ifdef G_OS_WIN32
+--
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch
new file mode 100644
index 0000000..d86c78d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch
@@ -0,0 +1,47 @@
+From 7018ca1c4bf26c8317e7fcd2e7e4e648195f42ca Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Wed, 20 Dec 2017 13:03:03 +0000
+Subject: [PATCH] gstreamer: use a patch instead of sed to fix gtk-doc
+
+Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient
+binaries instead of libtool wrapper or running them directly.
+
+Also substitute a bogus plugin scanner, as trying to run the real one is causing
+issues during build on x86_64.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+---
+ common/gtk-doc.mak | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/common/gtk-doc.mak b/common/gtk-doc.mak
+index 3f83491..e5cb0d1 100644
+--- a/common/gtk-doc.mak
++++ b/common/gtk-doc.mak
+@@ -6,11 +6,11 @@
+ if GTK_DOC_USE_LIBTOOL
+ GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+-GTKDOC_RUN = $(LIBTOOL) --mode=execute
++GTKDOC_RUN = $(top_builddir)/gtkdoc-qemuwrapper
+ else
+ GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+-GTKDOC_RUN =
++GTKDOC_RUN = $(top_builddir)/gtkdoc-qemuwrapper
+ endif
+
+ # We set GPATH here; this gives us semantics for GNU make
+@@ -101,6 +101,7 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+ GST_PLUGIN_PATH_1_0= \
+ GST_REGISTRY_1_0=doc-registry.xml \
+ $(GTKDOC_EXTRA_ENVIRONMENT) \
++ GST_PLUGIN_SCANNER_1_0="$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy" \
+ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" \
+ CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" \
+ LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
+--
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch
new file mode 100644
index 0000000..0338bad
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch
@@ -0,0 +1,39 @@
+From 755f6dab07565aca7b6aefacad8be65de364ff75 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Thu, 17 Aug 2017 11:07:02 +0300
+Subject: [PATCH] Make player examples installable
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Denied [Upstream considers these code examples, for now a least]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=777827
+---
+ playback/player/gst-play/meson.build | 1 +
+ playback/player/gtk/meson.build | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/playback/player/gst-play/meson.build b/playback/player/gst-play/meson.build
+index 719b55b..a56fe13 100644
+--- a/playback/player/gst-play/meson.build
++++ b/playback/player/gst-play/meson.build
+@@ -8,5 +8,6 @@ executable('gst-play',
+ ['gst-play.c',
+ 'gst-play-kb.c',
+ 'gst-play-kb.h'],
++ install: true,
+ dependencies : [gst_dep, gstplayer_dep, m_dep])
+
+diff --git a/playback/player/gtk/meson.build b/playback/player/gtk/meson.build
+index 08aae4f..671a65d 100644
+--- a/playback/player/gtk/meson.build
++++ b/playback/player/gtk/meson.build
+@@ -18,5 +18,6 @@ executable('gtk-play',
+ gtk_play_resources,
+ 'gtk-video-renderer.h',
+ 'gtk-video-renderer.c'],
++ install: true,
+ dependencies : [glib_dep, gobject_dep, gmodule_dep, gst_dep, gsttag_dep, gstplayer_dep, gtk_dep, x11_dep])
+
+--
+2.13.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop
rename to import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-examples_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-examples_git.bb
new file mode 100644
index 0000000..1d87f24
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-examples_git.bb
@@ -0,0 +1,32 @@
+SUMMARY = "GStreamer examples (including gtk-play, gst-play)"
+LICENSE = "LGPL-2.0+"
+LIC_FILES_CHKSUM = "file://playback/player/gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9"
+
+DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3 glib-2.0-native"
+
+SRC_URI = "git://anongit.freedesktop.org/gstreamer/gst-examples \
+ file://0001-Make-player-examples-installable.patch \
+ file://gst-player.desktop"
+
+SRCREV = "48247c6ab6807d6ae179cf653cbdc64714d3313c"
+PV = "0.0.1+git${SRCPV}"
+UPSTREAM_CHECK_COMMITS = "1"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig distro_features_check
+
+
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+do_install_append() {
+ install -m 0644 -D ${WORKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop
+}
+
+RDEPENDS_${PN} = "gstreamer1.0-plugins-base-playback"
+RRECOMMENDS_${PN} = "gstreamer1.0-plugins-base-meta \
+ gstreamer1.0-plugins-good-meta \
+ gstreamer1.0-plugins-bad-meta \
+ ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-libav", "", d)} \
+ ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}"
+RPROVIDES_${PN} += "gst-player gst-player-bin"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb
deleted file mode 100644
index 4fe8fde..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "GStreamer playback helper library and examples"
-LICENSE = "LGPL-2.0+"
-LIC_FILES_CHKSUM = "file://gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9"
-
-DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3 glib-2.0-native"
-
-SRC_URI = "git://github.com/sdroege/gst-player.git \
- file://gst-player.desktop"
-
-SRCREV = "ee3c226c82767a089743e4e06058743e67f73cdb"
-PV = "0.0.1+git${SRCPV}"
-UPSTREAM_VERSION_UNKNOWN = "1"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig distro_features_check
-
-ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
-
-do_configure_prepend() {
- touch ${S}/ChangeLog
-}
-
-do_install_append() {
- install -m 0644 -D ${WORKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop
-}
-
-RDEPENDS_${PN} = "gstreamer1.0-plugins-base-playback"
-RRECOMMENDS_${PN} = "gstreamer1.0-plugins-base-meta \
- gstreamer1.0-plugins-good-meta \
- gstreamer1.0-plugins-bad-meta \
- ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-libav", "", d)} \
- ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}"
-RPROVIDES_${PN} += "${PN}-bin"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-validate_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-validate_1.12.4.bb
new file mode 100644
index 0000000..0f2585a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-validate_1.12.4.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Gstreamer validation tool"
+DESCRIPTION = "A Tool to test GStreamer components"
+HOMEPAGE = "https://gstreamer.freedesktop.org/releases/gst-validate/1.12.3.html"
+SECTION = "multimedia"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/${BPN}/${BP}.tar.xz"
+SRC_URI[md5sum] = "bc074d49677081f9c27de11a09165746"
+SRC_URI[sha256sum] = "f9da9dfe6e5d6f5ba3b38c5752b42d3f927715904942b405c2924d3cb77afba1"
+
+DEPENDS = "json-glib glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base"
+RRECOMMENDS_${PN} = "git"
+
+FILES_${PN} += "${datadir}/gstreamer-1.0/* ${libdir}/gst-validate-launcher/* ${libdir}/gstreamer-1.0/*"
+
+inherit pkgconfig gettext autotools gobject-introspection gtk-doc upstream-version-is-even
+
+# With gtk-doc enabled this recipe fails to build, so forcibly disable it:
+# WORKDIR/build/docs/validate/gst-validate-scan: line 117:
+# WORKDIR/build/docs/validate/.libs/lt-gst-validate-scan: No such file or directory
+GTKDOC_ENABLED = "False"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.2.bb
deleted file mode 100644
index 3b5bbd1..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.2.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require gstreamer1.0-libav.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
- file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
- file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
- 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 \
- 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-hevcpred_msa.c-Fix-build-by-Including-libavcodec-hev.patch \
- "
-SRC_URI[md5sum] = "8788aecc032a287227b4bd239d1b998a"
-SRC_URI[sha256sum] = "5bb735b9bb218b652ae4071ea6f6be8eaae55e9d3233aec2f36b882a27542db3"
-
-S = "${WORKDIR}/gst-libav-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.4.bb
new file mode 100644
index 0000000..af547ba
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.4.bb
@@ -0,0 +1,21 @@
+require gstreamer1.0-libav.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
+ file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
+ file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+ 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 \
+ 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-hevcpred_msa.c-Fix-build-by-Including-libavcodec-hev.patch \
+ "
+SRC_URI[md5sum] = "8a851bf2e475e90a3fdac9506e3e4dbd"
+SRC_URI[sha256sum] = "2a56aa5d2d8cd912f2bce17f174713d2c417ca298f1f9c28ee66d4aa1e1d9e62"
+
+S = "${WORKDIR}/gst-libav-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.12.2.bb
deleted file mode 100644
index a1d4576..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.12.2.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-include gstreamer1.0-omx.inc
-
-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[md5sum] = "4a1404a20b72e4ab6e826500218ec308"
-SRC_URI[sha256sum] = "1b22398f45a027e977d2b5309625ec91cdcaf0da8751cbc7f596d639a45ba298"
-
-S = "${WORKDIR}/gst-omx-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.12.4.bb
new file mode 100644
index 0000000..7f7eae3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.12.4.bb
@@ -0,0 +1,11 @@
+include gstreamer1.0-omx.inc
+
+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[md5sum] = "eb8d5ae3b69cfeed9dc77c592106247e"
+SRC_URI[sha256sum] = "a025fa24242ec868fe0ff1e66d806a1070bcbc7c14a987a89cdc3395d0d56d5f"
+
+S = "${WORKDIR}/gst-omx-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
index 7be15d9..ca2ea9e 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
@@ -22,7 +22,7 @@
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
- bz2 curl dash dtls hls neon rsvg sbc smoothstreaming sndfile uvch264 webp \
+ bz2 curl dash dtls hls rsvg sbc smoothstreaming sndfile uvch264 webp \
"
PACKAGECONFIG[assrender] = "--enable-assrender,--disable-assrender,libass"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch
deleted file mode 100644
index 48d93ab..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 7c8f68c5428380b930579dc9ef27c853264448fd Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 15 May 2017 15:06:11 +0300
-Subject: [PATCH] Prepend PKG_CONFIG_SYSROOT_DIR to pkg-config output
-
-In cross environment we have to prepend the sysroot to the path found by
-pkgconfig since the path returned from pkgconfig does not have sysroot prefixed
-it ends up using the files from host system. If build host has wayland installed
-the build will succeed but if you dont have wayland-protocols installed on build
-host then it wont find the files on build host
-
-This should work ok with non sysrooted builds too since
-in those cases PKG_CONFIG_SYSROOT_DIR will be empty
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index e307be6..83cdeb0 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2272,7 +2272,7 @@ AG_GST_CHECK_FEATURE(WAYLAND, [wayland sink], wayland , [
- PKG_CHECK_MODULES(WAYLAND, wayland-client >= 1.4.0 libdrm >= 2.4.55 wayland-protocols >= 1.4, [
- if test "x$wayland_scanner" != "x"; then
- HAVE_WAYLAND="yes"
-- AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, `$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
-+ AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, ${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
- else
- AC_MSG_RESULT([wayland-scanner is required to build the wayland plugin])
- HAVE_WAYLAND="no"
---
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch
index d52afd5..ad86329 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch
@@ -18,11 +18,11 @@
configure.ac | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
-diff --git a/configure.ac b/configure.ac
-index 0e95c5c..12153b4 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1901,6 +1901,15 @@ AG_GST_CHECK_FEATURE(CHROMAPRINT, [chromaprint], chromaprint, [
+Index: gst-plugins-bad-1.12.3/configure.ac
+===================================================================
+--- gst-plugins-bad-1.12.3.orig/configure.ac
++++ gst-plugins-bad-1.12.3/configure.ac
+@@ -2139,6 +2139,15 @@ AG_GST_CHECK_FEATURE(CHROMAPRINT, [chrom
])
dnl *** Curl ***
@@ -37,8 +37,8 @@
+
translit(dnm, m, l) AM_CONDITIONAL(USE_CURL, true)
AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [
- PKG_CHECK_MODULES(CURL, libcurl >= 7.21.0, [
-@@ -1915,12 +1924,14 @@ AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [
+ PKG_CHECK_MODULES(CURL, libcurl >= 7.35.0, [
+@@ -2161,12 +2170,14 @@ AG_GST_CHECK_FEATURE(CURL, [Curl plugin]
])
AC_SUBST(CURL_CFLAGS)
AC_SUBST(CURL_LIBS)
@@ -59,6 +59,3 @@
AM_CONDITIONAL(USE_SSH2, test "x$HAVE_SSH2" = "xyes")
AC_SUBST(SSH2_CFLAGS)
AC_SUBST(SSH2_LIBS)
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.2.bb
deleted file mode 100644
index 8321da0..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.2.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-require gstreamer1.0-plugins-bad.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
- file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 "
-
-SRC_URI = " \
- http://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-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
- file://0009-glimagesink-Downrank-to-marginal.patch \
- file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
- file://0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch \
- file://link-with-libvchostif.patch \
- file://0001-vkdisplay-Use-ifdef-for-platform-specific-defines.patch \
- file://0002-vulkan-Use-the-generated-version-of-vkconfig.h.patch \
-"
-SRC_URI[md5sum] = "5683f0ea91f9e1e0613b0f6f729980a7"
-SRC_URI[sha256sum] = "9c2c7edde4f59d74eb414e0701c55131f562e5c605a3ce9b091754f106c09e37"
-
-S = "${WORKDIR}/gst-plugins-bad-${PV}"
-
-EXTRA_OECONF += "WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT}"
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.4.bb
new file mode 100644
index 0000000..82c7ffc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.4.bb
@@ -0,0 +1,24 @@
+require gstreamer1.0-plugins-bad.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
+ file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 "
+
+SRC_URI = " \
+ http://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-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
+ file://0009-glimagesink-Downrank-to-marginal.patch \
+ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+ file://link-with-libvchostif.patch \
+ file://0001-vkdisplay-Use-ifdef-for-platform-specific-defines.patch \
+ file://0002-vulkan-Use-the-generated-version-of-vkconfig.h.patch \
+"
+SRC_URI[md5sum] = "64bf16cf15edaab1c0e02c8dee7170d0"
+SRC_URI[sha256sum] = "0c7857be16686d5c1ba6e34bd338664d3d4599d32714a8eca5c8a41a101e2d08"
+
+S = "${WORKDIR}/gst-plugins-bad-${PV}"
+
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
index 0a8bc9b..6616e2c 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
@@ -20,11 +20,11 @@
gst-libs/gst/video/Makefile.am | 8 ++++----
11 files changed, 38 insertions(+), 38 deletions(-)
-diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makefile.am
-index bc7f53a..0ef5f86 100644
---- a/gst-libs/gst/allocators/Makefile.am
-+++ b/gst-libs/gst/allocators/Makefile.am
-@@ -35,7 +35,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@
+Index: gst-plugins-base-1.12.3/gst-libs/gst/allocators/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/allocators/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/allocators/Makefile.am
+@@ -36,7 +36,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(I
--c-include "gst/allocators/allocators.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -33,7 +33,7 @@
--library=libgstallocators-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--libtool="$(LIBTOOL)" \
-@@ -59,7 +59,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -60,7 +60,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -42,11 +42,11 @@
$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
-diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am
-index dcc2fe0..dc076cb 100644
---- a/gst-libs/gst/app/Makefile.am
-+++ b/gst-libs/gst/app/Makefile.am
-@@ -48,8 +48,8 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO
+Index: gst-plugins-base-1.12.3/gst-libs/gst/app/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/app/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/app/Makefile.am
+@@ -48,8 +48,8 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPE
--c-include "gst/app/app.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -57,11 +57,11 @@
--library=libgstapp-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
-diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am
-index 2374196..295eb42 100644
---- a/gst-libs/gst/audio/Makefile.am
-+++ b/gst-libs/gst/audio/Makefile.am
-@@ -106,12 +106,12 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE
+Index: gst-plugins-base-1.12.3/gst-libs/gst/audio/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/audio/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/audio/Makefile.am
+@@ -167,12 +167,12 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROS
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
--c-include "gst/audio/audio.h" \
@@ -78,7 +78,7 @@
--library-path="$(top_builddir)/gst-libs/gst/tag/" \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
-@@ -140,8 +140,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -201,8 +201,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
--includedir=$(srcdir) \
--includedir=$(builddir) \
--includedir="$(top_builddir)/gst-libs/gst/tag/" \
@@ -89,11 +89,11 @@
$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
-diff --git a/gst-libs/gst/fft/Makefile.am b/gst-libs/gst/fft/Makefile.am
-index f545354..1bb6243 100644
---- a/gst-libs/gst/fft/Makefile.am
-+++ b/gst-libs/gst/fft/Makefile.am
-@@ -62,7 +62,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSIO
+Index: gst-plugins-base-1.12.3/gst-libs/gst/fft/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/fft/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/fft/Makefile.am
+@@ -63,7 +63,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPE
--c-include "gst/fft/fft.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -102,7 +102,7 @@
--library=libgstfft-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--libtool="$(LIBTOOL)" \
-@@ -86,7 +86,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -87,7 +87,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -111,11 +111,11 @@
$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
-diff --git a/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am
-index 91dc214..dc8e1d3 100644
---- a/gst-libs/gst/pbutils/Makefile.am
-+++ b/gst-libs/gst/pbutils/Makefile.am
-@@ -84,14 +84,14 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP
+Index: gst-plugins-base-1.12.3/gst-libs/gst/pbutils/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/pbutils/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/pbutils/Makefile.am
+@@ -85,14 +85,14 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTR
--c-include "gst/pbutils/pbutils.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -134,7 +134,7 @@
--library-path="$(top_builddir)/gst-libs/gst/tag/" \
--library-path="$(top_builddir)/gst-libs/gst/video/" \
--library-path="$(top_builddir)/gst-libs/gst/audio/" \
-@@ -124,8 +124,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -125,8 +125,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -145,11 +145,11 @@
--includedir="$(top_builddir)/gst-libs/gst/tag/" \
--includedir="$(top_builddir)/gst-libs/gst/video/" \
--includedir="$(top_builddir)/gst-libs/gst/audio/" \
-diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am
-index 3bd8fc0..0a115cc 100644
---- a/gst-libs/gst/riff/Makefile.am
-+++ b/gst-libs/gst/riff/Makefile.am
-@@ -41,8 +41,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
+Index: gst-plugins-base-1.12.3/gst-libs/gst/riff/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/riff/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/riff/Makefile.am
+@@ -42,8 +42,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS
# --c-include "gst/riff/riff.h" \
# --add-include-path=$(builddir)/../tag \
# --add-include-path=$(builddir)/../audio \
@@ -160,7 +160,7 @@
# --library=libgstriff-@GST_API_VERSION@.la \
# --include=GstAudio-@GST_API_VERSION@ \
# --include=GstTag-@GST_API_VERSION@ \
-@@ -73,8 +73,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
+@@ -74,8 +74,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS
# --includedir=$(builddir) \
# --includedir=$(builddir)/../tag \
# --includedir=$(builddir)/../audio \
@@ -171,11 +171,11 @@
# $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
#
#CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
-diff --git a/gst-libs/gst/rtp/Makefile.am b/gst-libs/gst/rtp/Makefile.am
-index f5445c1..527c0b4 100644
---- a/gst-libs/gst/rtp/Makefile.am
-+++ b/gst-libs/gst/rtp/Makefile.am
-@@ -60,8 +60,8 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO
+Index: gst-plugins-base-1.12.3/gst-libs/gst/rtp/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/rtp/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/rtp/Makefile.am
+@@ -61,8 +61,8 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPE
--c-include "gst/rtp/rtp.h" \
-I$(top_builddir)/gst-libs \
-I$(top_srcdir)/gst-libs \
@@ -186,7 +186,7 @@
--library=libgstrtp-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
-@@ -88,8 +88,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -89,8 +89,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -197,11 +197,11 @@
$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
-diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am
-index 9b0b258..4f6d9f8 100644
---- a/gst-libs/gst/rtsp/Makefile.am
-+++ b/gst-libs/gst/rtsp/Makefile.am
-@@ -67,7 +67,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
+Index: gst-plugins-base-1.12.3/gst-libs/gst/rtsp/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/rtsp/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/rtsp/Makefile.am
+@@ -68,7 +68,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSP
-I$(top_builddir)/gst-libs \
-I$(top_srcdir)/gst-libs \
--add-include-path=$(builddir)/../sdp \
@@ -210,7 +210,7 @@
--library=libgstrtsp-@GST_API_VERSION@.la \
--include=Gio-2.0 \
--include=Gst-@GST_API_VERSION@ \
-@@ -97,7 +97,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -98,7 +98,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
--includedir=$(srcdir) \
--includedir=$(builddir) \
--includedir=$(builddir)/../sdp \
@@ -219,11 +219,11 @@
$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
-diff --git a/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am
-index 0e149b8..9aa0512 100644
---- a/gst-libs/gst/sdp/Makefile.am
-+++ b/gst-libs/gst/sdp/Makefile.am
-@@ -29,7 +29,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO
+Index: gst-plugins-base-1.12.3/gst-libs/gst/sdp/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/sdp/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/sdp/Makefile.am
+@@ -30,7 +30,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPE
--warn-all \
--c-include "gst/sdp/sdp.h" \
-I$(top_srcdir)/gst-libs \
@@ -232,7 +232,7 @@
--library=libgstsdp-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--libtool="$(LIBTOOL)" \
-@@ -53,7 +53,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -54,7 +54,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -241,11 +241,11 @@
$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
-diff --git a/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am
-index cafafd3..ba99279 100644
---- a/gst-libs/gst/tag/Makefile.am
-+++ b/gst-libs/gst/tag/Makefile.am
-@@ -40,8 +40,8 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO
+Index: gst-plugins-base-1.12.3/gst-libs/gst/tag/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/tag/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/tag/Makefile.am
+@@ -59,8 +59,8 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPE
--c-include "gst/tag/tag.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -256,33 +256,7 @@
--library=libgsttag-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
-@@ -68,8 +68,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
- $(INTROSPECTION_COMPILER) \
- --includedir=$(srcdir) \
- --includedir=$(builddir) \
-- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
-- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
-+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
-+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
- $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
-
- CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
-diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am
-index ac64eb3..342c8c6 100644
---- a/gst-libs/gst/video/Makefile.am
-+++ b/gst-libs/gst/video/Makefile.am
-@@ -111,8 +111,8 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE
- --c-include "gst/video/video.h" \
- -I$(top_srcdir)/gst-libs \
- -I$(top_builddir)/gst-libs \
-- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
-- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
-+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
-+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
- --library=libgstvideo-@GST_API_VERSION@.la \
- --include=Gst-@GST_API_VERSION@ \
- --include=GstBase-@GST_API_VERSION@ \
-@@ -139,8 +139,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -87,8 +87,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -293,6 +267,29 @@
$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
---
-2.6.2
-
+Index: gst-plugins-base-1.12.3/gst-libs/gst/video/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/video/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/video/Makefile.am
+@@ -116,8 +116,8 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROS
+ --c-include "gst/video/video.h" \
+ -I$(top_srcdir)/gst-libs \
+ -I$(top_builddir)/gst-libs \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ --library=libgstvideo-@GST_API_VERSION@.la \
+ --include=Gst-@GST_API_VERSION@ \
+ --include=GstBase-@GST_API_VERSION@ \
+@@ -144,8 +144,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
+ $(INTROSPECTION_COMPILER) \
+ --includedir=$(srcdir) \
+ --includedir=$(builddir) \
+- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+
+ CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.12.2.bb
deleted file mode 100644
index 5de0b8b..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.12.2.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require gstreamer1.0-plugins-base.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
- file://COPYING.LIB;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 \
- file://get-caps-from-src-pad-when-query-caps.patch \
- file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
- file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
- file://make-gio_unix_2_0-dependency-configurable.patch \
- file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
-"
-SRC_URI[md5sum] = "77f5379c4ca677616b415e3b3ff95578"
-SRC_URI[sha256sum] = "5067dce3afe197a9536fea0107c77213fab536dff4a213b07fc60378d5510675"
-
-S = "${WORKDIR}/gst-plugins-base-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.12.4.bb
new file mode 100644
index 0000000..dd895bb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.12.4.bb
@@ -0,0 +1,18 @@
+require gstreamer1.0-plugins-base.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
+ file://COPYING.LIB;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 \
+ file://get-caps-from-src-pad-when-query-caps.patch \
+ file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
+ file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
+ file://make-gio_unix_2_0-dependency-configurable.patch \
+ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+"
+SRC_URI[md5sum] = "b35b04071f69b8ab69a7f3a497ff0131"
+SRC_URI[sha256sum] = "4c306b03df0212f1b8903784e29bb3493319ba19ebebf13b0c56a17870292282"
+
+S = "${WORKDIR}/gst-plugins-base-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Fix-4K-colorimetry.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Fix-4K-colorimetry.patch
deleted file mode 100644
index f78818a..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Fix-4K-colorimetry.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 545646cccba243236e10362fe7325f89be57da1f Mon Sep 17 00:00:00 2001
-From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
-Date: Tue, 18 Jul 2017 11:28:37 -0400
-Subject: [PATCH] v4l2: Fix 4K colorimetry
-
-Since 1.6, the transfer function for BT2020 has been changed from BT709
-to BT2020_12. It's the same function, but with more precision. As a side
-effect, the V4L2 colorpsace didn't match GStreamer colorspace. When
-GStreamer ended up making a guess, it would not match anything supported
-by V4L2 anymore. This this by using BT2020_12 for BT2020 colorspace and
-BT2020 transfer function in replacement of BT709 whenever a 4K
-resolution is detected.
-
-Upstream-Status: Backport
-Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
-
----
- sys/v4l2/gstv4l2object.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
-index 61244455f..aae2c55e7 100644
---- a/sys/v4l2/gstv4l2object.c
-+++ b/sys/v4l2/gstv4l2object.c
-@@ -1960,7 +1960,7 @@ gst_v4l2_object_get_colorspace (struct v4l2_format *fmt,
- case V4L2_COLORSPACE_BT2020:
- cinfo->range = GST_VIDEO_COLOR_RANGE_16_235;
- cinfo->matrix = GST_VIDEO_COLOR_MATRIX_BT2020;
-- cinfo->transfer = GST_VIDEO_TRANSFER_BT709;
-+ cinfo->transfer = GST_VIDEO_TRANSFER_BT2020_12;
- cinfo->primaries = GST_VIDEO_COLOR_PRIMARIES_BT2020;
- break;
- case V4L2_COLORSPACE_SMPTE240M:
-@@ -2062,7 +2062,10 @@ gst_v4l2_object_get_colorspace (struct v4l2_format *fmt,
-
- switch (transfer) {
- case V4L2_XFER_FUNC_709:
-- cinfo->transfer = GST_VIDEO_TRANSFER_BT709;
-+ if (fmt->fmt.pix.height > 2160)
-+ cinfo->transfer = GST_VIDEO_TRANSFER_BT2020_12;
-+ else
-+ cinfo->transfer = GST_VIDEO_TRANSFER_BT709;
- break;
- case V4L2_XFER_FUNC_SRGB:
- cinfo->transfer = GST_VIDEO_TRANSFER_SRGB;
---
-2.14.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.2.bb
deleted file mode 100644
index f9593c9..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.2.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require gstreamer1.0-plugins-good.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
- file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
- file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
-
-SRC_URI = " \
- http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
- file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \
- file://avoid-including-sys-poll.h-directly.patch \
- file://ensure-valid-sentinel-for-gst_structure_get.patch \
- file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
- file://0001-v4l2-Fix-4K-colorimetry.patch \
-"
-SRC_URI[md5sum] = "20254217d9805484532e08ff1c3aa296"
-SRC_URI[sha256sum] = "5591ee7208ab30289a30658a82b76bf87169c927572d9b794f3a41ed48e1ee96"
-
-S = "${WORKDIR}/gst-plugins-good-${PV}"
-
-RPROVIDES_${PN}-pulseaudio += "${PN}-pulse"
-RPROVIDES_${PN}-soup += "${PN}-souphttpsrc"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.4.bb
new file mode 100644
index 0000000..a060964
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.4.bb
@@ -0,0 +1,20 @@
+require gstreamer1.0-plugins-good.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+ file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
+ file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
+
+SRC_URI = " \
+ http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
+ file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \
+ file://avoid-including-sys-poll.h-directly.patch \
+ file://ensure-valid-sentinel-for-gst_structure_get.patch \
+ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+"
+SRC_URI[md5sum] = "bdf4791a2b788ec6a149b81ff4032038"
+SRC_URI[sha256sum] = "649f49bec60892d47ee6731b92266974c723554da1c6649f21296097715eb957"
+
+S = "${WORKDIR}/gst-plugins-good-${PV}"
+
+RPROVIDES_${PN}-pulseaudio += "${PN}-pulse"
+RPROVIDES_${PN}-soup += "${PN}-souphttpsrc"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.12.2.bb
deleted file mode 100644
index 6956c85..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.12.2.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require gstreamer1.0-plugins-ugly.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
- file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
-
-SRC_URI = " \
- http://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] = "eb639021905a32cf3013ca5bac1b694d"
-SRC_URI[sha256sum] = "1cc3942bbf3ea87da3e35437d4e014e991b103db22a6174f62a98c89c3f5f466"
-
-S = "${WORKDIR}/gst-plugins-ugly-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.12.4.bb
new file mode 100644
index 0000000..f833351
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.12.4.bb
@@ -0,0 +1,13 @@
+require gstreamer1.0-plugins-ugly.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+ file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
+
+SRC_URI = " \
+ http://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] = "e2b836fb2747f6ae3a1a6f33a9d8c952"
+SRC_URI[sha256sum] = "1c165b8d888ed350acd8e6ac9f6fe06508e6fcc0a3afc6ccc9fbeb30df9be522"
+
+S = "${WORKDIR}/gst-plugins-ugly-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
index c40d398..5906e4a 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
@@ -5,6 +5,8 @@
DEPENDS = "gstreamer1.0 glib-2.0-native"
+SRC_URI_append = " file://gtk-doc-tweaks.patch"
+
inherit autotools pkgconfig upstream-version-is-even gobject-introspection gtk-doc
acpaths = "-I ${S}/common/m4 -I ${S}/m4"
@@ -34,21 +36,6 @@
rm -f "${S}/common/m4/gtk-doc.m4"
}
-# gstreamer is not using system-wide makefiles (which we patch in gtkdoc recipe,
-# but its own custom ones, which we have to patch here
-patch_gtk_doc_makefiles() {
- # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
- # instead of libtool wrapper or running them directly
- # Also substitute a bogus plugin scanner, as trying to run the real one is causing issues during build on x86_64.
- sed -i \
- -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
- -e "s|\$(GTKDOC_EXTRA_ENVIRONMENT)|\$(GTKDOC_EXTRA_ENVIRONMENT) GST_PLUGIN_SCANNER_1_0=\$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy|" \
- ${S}/common/gtk-doc*mak
-}
-
-do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles"
+do_configure[prefuncs] += " delete_pkg_m4_file"
PACKAGES_DYNAMIC = "^${PN}-.*"
-
-# qemu-mips64: error while loading shared libraries: .../recipe-sysroot/usr/lib/libgthread-2.0.so.0: ELF file data encoding not little-endian
-EXTRA_OECONF_append_mips64 = " --disable-introspection "
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc
index 961b930..361f0bc 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc
@@ -8,8 +8,6 @@
PNREAL = "gst-python"
-SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
-
S = "${WORKDIR}/${PNREAL}-${PV}"
inherit autotools pkgconfig distutils3-base upstream-version-is-even gobject-introspection
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.12.2.bb
deleted file mode 100644
index b2dc05b..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.12.2.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require gstreamer1.0-python.inc
-
-SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
-SRC_URI[md5sum] = "da5c9fa42290bc3006661c869e076ffe"
-SRC_URI[sha256sum] = "f4cc32ad46a653e1ae2f27ac2a16078b00075c9106b2784a1a8d1f31c5069e47"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.12.4.bb
new file mode 100644
index 0000000..faec356
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.12.4.bb
@@ -0,0 +1,7 @@
+require gstreamer1.0-python.inc
+
+SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
+SRC_URI[md5sum] = "f1fd046ea781736a794f9f552d77c50d"
+SRC_URI[sha256sum] = "20ce6af6615c9a440c1928c31259a78226516d06bf1a65f888c6d109826fa3ea"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
index 68173ce..3776f92 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
@@ -3,18 +3,21 @@
SECTION = "multimedia"
LICENSE = "LGPLv2"
-DEPENDS = "gstreamer1.0 libcgroup gstreamer1.0-plugins-base libcheck"
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base"
PNREAL = "gst-rtsp-server"
SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \
file://0001-Don-t-hardcode-libtool-name-when-using-introspection.patch \
- file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch"
+ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+ file://gtk-doc-tweaks.patch"
S = "${WORKDIR}/${PNREAL}-${PV}"
inherit autotools pkgconfig upstream-version-is-even gobject-introspection gtk-doc
+EXTRA_OECONF = "--disable-examples --disable-tests"
+
# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well
LIBV = "1.0"
require gst-plugins-package.inc
@@ -24,17 +27,5 @@
rm "${S}/common/m4/pkg.m4" || true
}
-# gstreamer is not using system-wide makefiles (which we patch in gtkdoc recipe,
-# but its own custom ones, which we have to patch here
-patch_gtk_doc_makefiles() {
- # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
- # instead of libtool wrapper or running them directly
- sed -i \
- -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
- ${S}/common/gtk-doc*mak
-}
+do_configure[prefuncs] += " delete_pkg_m4_file"
-do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles"
-
-# Needs to be disable due to a dependency on gstreamer-plugins introspection files
-EXTRA_OECONF_append_mips64 = " --disable-introspection "
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.12.2.bb
deleted file mode 100644
index 2426cca..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.12.2.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require gstreamer1.0-rtsp-server.inc
-
-SRC_URI[md5sum] = "022757cab183f5b970086e9101c60a98"
-SRC_URI[sha256sum] = "d8ba9264e8ae6e440293328e759e40456f161aa66077b3143dd07581136190b3"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.12.4.bb
new file mode 100644
index 0000000..da68dcb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.12.4.bb
@@ -0,0 +1,6 @@
+require gstreamer1.0-rtsp-server.inc
+
+SRC_URI[md5sum] = "ad70a9735f58da21d0f5cedf48ccadd3"
+SRC_URI[sha256sum] = "7660112ebd59838f1054796b38109dcbe32f0a040e3a252a68a81055aeaa56a9"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.12.2.bb
deleted file mode 100644
index fbd9f86..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.12.2.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require gstreamer1.0-vaapi.inc
-SRC_URI[md5sum] = "bea015f33696a15ad9575fb71af862ed"
-SRC_URI[sha256sum] = "23c714e0474b3c7ae6ff8884aebf8503a1bc3ded335fa2d2b2ac31788466163a"
-
-DEPENDS += "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.12.4.bb
new file mode 100644
index 0000000..1df2301
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.12.4.bb
@@ -0,0 +1,5 @@
+require gstreamer1.0-vaapi.inc
+SRC_URI[md5sum] = "2149982cdb348139bca946bb63766f4c"
+SRC_URI[sha256sum] = "1c2d77242e1f30c4d1394636cae9f6877228a017960fca96881e0080d8b6e9c9"
+
+DEPENDS += "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
index 3291934..c2df1f3 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
@@ -16,6 +16,8 @@
SRC_URI_append = " \
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 \
"
PACKAGECONFIG ??= ""
@@ -52,19 +54,7 @@
rm -f "${S}/common/m4/gtk-doc.m4"
}
-# gstreamer is not using system-wide makefiles (which we patch in gtkdoc recipe,
-# but its own custom ones, which we have to patch here
-patch_gtk_doc_makefiles() {
- # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
- # instead of libtool wrapper or running them directly
- # Also substitute a bogus plugin scanner, as trying to run the real one is causing issues during build on x86_64.
- sed -i \
- -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
- -e "s|\$(GTKDOC_EXTRA_ENVIRONMENT)|\$(GTKDOC_EXTRA_ENVIRONMENT) GST_PLUGIN_SCANNER_1_0=\$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy|" \
- ${S}/common/gtk-doc*mak
-}
-
-do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles"
+do_configure[prefuncs] += "delete_pkg_m4_file"
do_compile_prepend() {
export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.libs"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-configure-Add-switches-for-enabling-disabling-libdw-.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-configure-Add-switches-for-enabling-disabling-libdw-.patch
deleted file mode 100644
index 1132fd5..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-configure-Add-switches-for-enabling-disabling-libdw-.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From a0cb41ba72913eda06049d266ec43ea8f52b5bee Mon Sep 17 00:00:00 2001
-From: Carlos Rafael Giani <dv@pseudoterminal.org>
-Date: Fri, 11 Aug 2017 21:21:36 +0200
-Subject: [PATCH] configure: Add switches for enabling/disabling libdw and
- libunwind
-
-[Original patch modified to be applicable to 1.12.2]
-
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=778193]
-
-Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
----
- configure.ac | 38 ++++++++++++++++++++++++++++++++------
- 1 file changed, 32 insertions(+), 6 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index b6b2923..32dd827 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -821,15 +821,41 @@ fi
- AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
-
- dnl libunwind is optionally used by the leaks tracer
--PKG_CHECK_MODULES(UNWIND, libunwind, HAVE_UNWIND=yes, HAVE_UNWIND=no)
--if test "x$HAVE_UNWIND" = "xyes"; then
-- AC_DEFINE(HAVE_UNWIND, 1, [libunwind available])
-+AC_ARG_WITH([unwind],[AS_HELP_STRING([--with-unwind=yes|no|auto],[use libunwind])],
-+ [], [with_unwind=auto])
-+if [ test "x${with_unwind}" != "xno" ]; then
-+ PKG_CHECK_MODULES(UNWIND, [libunwind],
-+ [
-+ HAVE_UNWIND=yes
-+ AC_DEFINE(HAVE_UNWIND, 1, [libunwind available])
-+ ],
-+ [
-+ HAVE_UNWIND=no
-+ if [ test "x${with_unwind}" = "xyes" ]; then
-+ AC_MSG_ERROR([could not find libunwind])
-+ fi
-+ ])
-+else
-+ HAVE_UNWIND=no
- fi
-
- dnl libdw is optionally used to add source lines and numbers to backtraces
--PKG_CHECK_MODULES(DW, libdw, HAVE_DW=yes, HAVE_DW=no)
--if test "x$HAVE_DW" = "xyes"; then
-- AC_DEFINE(HAVE_DW, 1, [libdw available])
-+AC_ARG_WITH([dw],[AS_HELP_STRING([--with-dw=yes|no|auto],[use libdw])],
-+ [], [with_dw=auto])
-+if [ test "x${with_dw}" != "xno" ]; then
-+ PKG_CHECK_MODULES(DW, [libdw],
-+ [
-+ HAVE_DW=yes
-+ AC_DEFINE(HAVE_DW, 1, [libdw available])
-+ ],
-+ [
-+ HAVE_DW=no
-+ if [ test "x${with_dw}" = "xyes" ]; then
-+ AC_MSG_ERROR([could not find libdw])
-+ fi
-+ ])
-+else
-+ HAVE_DW=no
- fi
-
- dnl Check for backtrace() from libc
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.12.2.bb
deleted file mode 100644
index 8d41a59..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.12.2.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require gstreamer1.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
- file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
-
-SRC_URI = " \
- http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
- file://0001-configure-Add-switches-for-enabling-disabling-libdw-.patch \
-"
-SRC_URI[md5sum] = "4748860621607ffd96244fb79c86c238"
-SRC_URI[sha256sum] = "9fde3f39a2ea984f9e07ce09250285ce91f6e3619d186889f75b5154ecf994ba"
-
-S = "${WORKDIR}/gstreamer-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.12.4.bb
new file mode 100644
index 0000000..01b2396
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.12.4.bb
@@ -0,0 +1,14 @@
+require gstreamer1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
+ file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
+
+SRC_URI = " \
+ http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
+"
+SRC_URI[md5sum] = "9d268f2e891cce1ac0832f1cc467d4ea"
+SRC_URI[sha256sum] = "5a8704aa4c2eeb04da192c4a9942f94f860ac1a585de90d9f914bac26a970674"
+
+S = "${WORKDIR}/gstreamer-${PV}"
+
+CVE_PRODUCT = "gstreamer"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch b/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch
deleted file mode 100644
index 51baef2..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-Upstream-Status: Pending
-
-Fix this kind of errors with automake 1.12.x:
-| doc/man/Makefile.am:3: error: automatic de-ANSI-fication support has been removed
-| autoreconf: automake failed with exit status: 1
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/07/13
-
-Index: lame-3.99.5/configure.in
-===================================================================
---- lame-3.99.5.orig/configure.in
-+++ lame-3.99.5/configure.in
-@@ -77,9 +77,6 @@ if test "${GCC}" = "yes"; then
- AC_MSG_RESULT(${GCC_version})
- fi
-
--dnl more automake stuff
--AM_C_PROTOTYPES
--
- AC_CHECK_HEADER(dmalloc.h)
- if test "${ac_cv_header_dmalloc_h}" = "yes"; then
- AM_WITH_DMALLOC
-Index: lame-3.99.5/doc/html/Makefile.am
-===================================================================
---- lame-3.99.5.orig/doc/html/Makefile.am
-+++ lame-3.99.5/doc/html/Makefile.am
-@@ -1,6 +1,6 @@
- ## $Id: Makefile.am,v 1.7 2010/09/30 20:58:40 jaz001 Exp $
-
--AUTOMAKE_OPTIONS = foreign ansi2knr
-+AUTOMAKE_OPTIONS = foreign
-
- docdir = $(datadir)/doc
- pkgdocdir = $(docdir)/$(PACKAGE)
-Index: lame-3.99.5/libmp3lame/i386/Makefile.am
-===================================================================
---- lame-3.99.5.orig/libmp3lame/i386/Makefile.am
-+++ lame-3.99.5/libmp3lame/i386/Makefile.am
-@@ -1,6 +1,6 @@
- ## $Id: Makefile.am,v 1.26 2011/04/04 09:42:34 aleidinger Exp $
-
--AUTOMAKE_OPTIONS = foreign $(top_srcdir)/ansi2knr
-+AUTOMAKE_OPTIONS = foreign
-
- DEFS = @DEFS@ @CONFIG_DEFS@
-
-Index: lame-3.99.5/doc/man/Makefile.am
-===================================================================
---- lame-3.99.5.orig/doc/man/Makefile.am
-+++ lame-3.99.5/doc/man/Makefile.am
-@@ -1,6 +1,6 @@
- ## $Id: Makefile.am,v 1.1 2000/10/22 11:39:44 aleidinger Exp $
-
--AUTOMAKE_OPTIONS = foreign ansi2knr
-+AUTOMAKE_OPTIONS = foreign
-
- man_MANS = lame.1
- EXTRA_DIST = ${man_MANS}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame_3.100.bb b/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame_3.100.bb
new file mode 100644
index 0000000..ff6ac7e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame_3.100.bb
@@ -0,0 +1,27 @@
+SUMMARY = "High quality MP3 audio encoder"
+HOMEPAGE = "http://lame.sourceforge.net/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=290&atid=100290"
+SECTION = "console/utils"
+LICENSE = "LGPLv2+"
+LICENSE_FLAGS = "commercial"
+
+DEPENDS = "ncurses gettext-native"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c46bda00ffbb0ba1dac22f8d087f54d9 \
+ file://include/lame.h;beginline=1;endline=20;md5=a2258182c593c398d15a48262130a92b \
+"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/lame/lame-${PV}.tar.gz \
+ file://no-gtk1.patch \
+ "
+
+SRC_URI[md5sum] = "83e260acbe4389b54fe08e0bdbf7cddb"
+SRC_URI[sha256sum] = "ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e"
+
+inherit autotools pkgconfig
+
+PACKAGES += "libmp3lame libmp3lame-dev"
+FILES_${PN} = "${bindir}/lame"
+FILES_libmp3lame = "${libdir}/libmp3lame.so.*"
+FILES_libmp3lame-dev = "${includedir} ${libdir}/*"
+FILES_${PN}-dev = ""
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame_3.99.5.bb b/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame_3.99.5.bb
deleted file mode 100644
index 0477611..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame_3.99.5.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "High quality MP3 audio encoder"
-HOMEPAGE = "http://lame.sourceforge.net/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=290&atid=100290"
-SECTION = "console/utils"
-LICENSE = "LGPLv2+"
-LICENSE_FLAGS = "commercial"
-
-DEPENDS = "ncurses gettext-native"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=c46bda00ffbb0ba1dac22f8d087f54d9 \
- file://include/lame.h;beginline=1;endline=20;md5=a2258182c593c398d15a48262130a92b \
-"
-PR = "r1"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/lame/lame-${PV}.tar.gz \
- file://no-gtk1.patch \
- file://lame-3.99.5_fix_for_automake-1.12.x.patch "
-
-SRC_URI[md5sum] = "84835b313d4a8b68f5349816d33e07ce"
-SRC_URI[sha256sum] = "24346b4158e4af3bd9f2e194bb23eb473c75fb7377011523353196b19b9a23ff"
-
-inherit autotools pkgconfig
-
-PACKAGES += "libmp3lame libmp3lame-dev"
-FILES_${PN} = "${bindir}/lame"
-FILES_libmp3lame = "${libdir}/libmp3lame.so.*"
-FILES_libmp3lame-dev = "${includedir} ${libdir}/*"
-FILES_${PN}-dev = ""
-
-CACHED_CONFIGUREVARS_append_x86 = " ac_cv_header_emmintrin_h=no ac_cv_header_xmmintrin_h=no"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libogg/libogg_1.3.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libogg/libogg_1.3.2.bb
deleted file mode 100644
index 0142e0f..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libogg/libogg_1.3.2.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Ogg bitstream and framing libary"
-DESCRIPTION = "libogg is the bitstream and framing library \
-for the Ogg project. It provides functions which are \
-necessary to codec libraries like libvorbis."
-HOMEPAGE = "http://xiph.org/"
-BUGTRACKER = "https://trac.xiph.org/newticket"
-SECTION = "libs"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \
- file://include/ogg/ogg.h;beginline=1;endline=11;md5=eda812856f13a3b1326eb8f020cc3b0b"
-
-SRC_URI = "http://downloads.xiph.org/releases/ogg/${BP}.tar.xz"
-
-SRC_URI[md5sum] = "5c3a34309d8b98640827e5d0991a4015"
-SRC_URI[sha256sum] = "3f687ccdd5ac8b52d76328fbbfebc70c459a40ea891dbf3dccb74a210826e79b"
-
-inherit autotools pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libogg/libogg_1.3.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libogg/libogg_1.3.3.bb
new file mode 100644
index 0000000..8d88f1f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libogg/libogg_1.3.3.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Ogg bitstream and framing libary"
+DESCRIPTION = "libogg is the bitstream and framing library \
+for the Ogg project. It provides functions which are \
+necessary to codec libraries like libvorbis."
+HOMEPAGE = "http://xiph.org/"
+BUGTRACKER = "https://trac.xiph.org/newticket"
+SECTION = "libs"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \
+ file://include/ogg/ogg.h;beginline=1;endline=11;md5=eda812856f13a3b1326eb8f020cc3b0b"
+
+SRC_URI = "http://downloads.xiph.org/releases/ogg/${BP}.tar.xz"
+
+SRC_URI[md5sum] = "87ed742047f065046eb6c36745d871b8"
+SRC_URI[sha256sum] = "4f3fc6178a533d392064f14776b23c397ed4b9f48f5de297aba73b643f955c08"
+
+inherit autotools pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.31.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.31.bb
deleted file mode 100644
index c96ea14..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.31.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "PNG image format decoding library"
-HOMEPAGE = "http://www.libpng.org/"
-SECTION = "libs"
-LICENSE = "Libpng"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6f21e4e1f795810b5ea491b333bc6ea1 \
- file://png.h;endline=144;md5=af300c419a45c53a8d2daa0b7d167a66"
-DEPENDS = "zlib"
-
-LIBV = "16"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/${BP}.tar.xz"
-SRC_URI[md5sum] = "1b34eab440263e32cfa39d19413fad54"
-SRC_URI[sha256sum] = "232a602de04916b2b5ce6f901829caf419519e6a16cc9cd7c1c91187d3ee8b41"
-
-MIRRORS += "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/ ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/older-releases/${PV}/"
-
-BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
-
-inherit autotools binconfig-disabled pkgconfig
-
-# Work around missing symbols
-EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"
-
-PACKAGES =+ "${PN}-tools"
-
-FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.34.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.34.bb
new file mode 100644
index 0000000..e52d032
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.34.bb
@@ -0,0 +1,30 @@
+SUMMARY = "PNG image format decoding library"
+HOMEPAGE = "http://www.libpng.org/"
+SECTION = "libs"
+LICENSE = "Libpng"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2db717a05a20e36f2fa673265bd31568 \
+ file://png.h;endline=144;md5=3ac9fd250a8786ae581e34254bf79429"
+DEPENDS = "zlib"
+
+LIBV = "16"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/${BP}.tar.xz"
+SRC_URI[md5sum] = "c05b6ca7190a5e387b78657dbe5536b2"
+SRC_URI[sha256sum] = "2f1e960d92ce3b3abd03d06dfec9637dfbd22febf107a536b44f7a47c60659f6"
+
+MIRRORS += "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/ ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/older-releases/${PV}/"
+
+UPSTREAM_CHECK_URI = "http://libpng.org/pub/png/libpng.html"
+
+BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
+
+inherit autotools binconfig-disabled pkgconfig
+
+# Work around missing symbols
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"
+
+PACKAGES =+ "${PN}-tools"
+
+FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-10688.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-10688.patch
deleted file mode 100644
index b0db969..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-10688.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 333ba5599e87bd7747516d7863d61764e4ca2d92 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Fri, 30 Jun 2017 17:29:44 +0000
-Subject: [PATCH] * libtiff/tif_dirwrite.c: in
- TIFFWriteDirectoryTagCheckedXXXX() functions associated with LONG8/SLONG8
- data type, replace assertion that the file is BigTIFF, by a non-fatal error.
- Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2712 Reported by team
- OWL337
-
-Upstream-Status: Backport
-[https://github.com/vadz/libtiff/commit/6173a57d39e04d68b139f8c1aa499a24dbe74ba1]
-
-CVE: CVE-2017-10688
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- ChangeLog | 8 ++++++++
- libtiff/tif_dirwrite.c | 20 ++++++++++++++++----
- 2 files changed, 24 insertions(+), 4 deletions(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index 0240f0b..42eaeb7 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,11 @@
-+2017-06-30 Even Rouault <even.rouault at spatialys.com>
-+
-+ * libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedXXXX()
-+ functions associated with LONG8/SLONG8 data type, replace assertion that
-+ the file is BigTIFF, by a non-fatal error.
-+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2712
-+ Reported by team OWL337
-+
- 2017-06-26 Even Rouault <even.rouault at spatialys.com>
-
- * libtiff/tif_jbig.c: fix memory leak in error code path of JBIGDecode()
-diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c
-index 2967da5..8d6686b 100644
---- a/libtiff/tif_dirwrite.c
-+++ b/libtiff/tif_dirwrite.c
-@@ -2111,7 +2111,10 @@ TIFFWriteDirectoryTagCheckedLong8(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, ui
- {
- uint64 m;
- assert(sizeof(uint64)==8);
-- assert(tif->tif_flags&TIFF_BIGTIFF);
-+ if( !(tif->tif_flags&TIFF_BIGTIFF) ) {
-+ TIFFErrorExt(tif->tif_clientdata,"TIFFWriteDirectoryTagCheckedLong8","LONG8 not allowed for ClassicTIFF");
-+ return(0);
-+ }
- m=value;
- if (tif->tif_flags&TIFF_SWAB)
- TIFFSwabLong8(&m);
-@@ -2124,7 +2127,10 @@ TIFFWriteDirectoryTagCheckedLong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* di
- {
- assert(count<0x20000000);
- assert(sizeof(uint64)==8);
-- assert(tif->tif_flags&TIFF_BIGTIFF);
-+ if( !(tif->tif_flags&TIFF_BIGTIFF) ) {
-+ TIFFErrorExt(tif->tif_clientdata,"TIFFWriteDirectoryTagCheckedLong8","LONG8 not allowed for ClassicTIFF");
-+ return(0);
-+ }
- if (tif->tif_flags&TIFF_SWAB)
- TIFFSwabArrayOfLong8(value,count);
- return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_LONG8,count,count*8,value));
-@@ -2136,7 +2142,10 @@ TIFFWriteDirectoryTagCheckedSlong8(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, u
- {
- int64 m;
- assert(sizeof(int64)==8);
-- assert(tif->tif_flags&TIFF_BIGTIFF);
-+ if( !(tif->tif_flags&TIFF_BIGTIFF) ) {
-+ TIFFErrorExt(tif->tif_clientdata,"TIFFWriteDirectoryTagCheckedLong8","SLONG8 not allowed for ClassicTIFF");
-+ return(0);
-+ }
- m=value;
- if (tif->tif_flags&TIFF_SWAB)
- TIFFSwabLong8((uint64*)(&m));
-@@ -2149,7 +2158,10 @@ TIFFWriteDirectoryTagCheckedSlong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* d
- {
- assert(count<0x20000000);
- assert(sizeof(int64)==8);
-- assert(tif->tif_flags&TIFF_BIGTIFF);
-+ if( !(tif->tif_flags&TIFF_BIGTIFF) ) {
-+ TIFFErrorExt(tif->tif_clientdata,"TIFFWriteDirectoryTagCheckedLong8","SLONG8 not allowed for ClassicTIFF");
-+ return(0);
-+ }
- if (tif->tif_flags&TIFF_SWAB)
- TIFFSwabArrayOfLong8((uint64*)value,count);
- return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_SLONG8,count,count*8,value));
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-11335.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-11335.patch
deleted file mode 100644
index d08e761..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-11335.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From e8b15ccf8c9c593000f8202cf34cc6c4b936d01e Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Sat, 15 Jul 2017 11:13:46 +0000
-Subject: [PATCH] * tools/tiff2pdf.c: prevent heap buffer overflow write in
- "Raw" mode on PlanarConfig=Contig input images. Fixes
- http://bugzilla.maptools.org/show_bug.cgi?id=2715 Reported by team OWL337
-
-Upstream-Status: Backport
-[https://github.com/vadz/libtiff/commit/69bfeec247899776b1b396651adb47436e5f1556]
-
-CVE: CVE-2017-11355
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- ChangeLog | 7 +++++++
- tools/tiff2pdf.c | 7 ++++++-
- 2 files changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index 42eaeb7..6980da8 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,10 @@
-+2017-07-15 Even Rouault <even.rouault at spatialys.com>
-+
-+ * tools/tiff2pdf.c: prevent heap buffer overflow write in "Raw"
-+ mode on PlanarConfig=Contig input images.
-+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2715
-+ Reported by team OWL337
-+
- 2017-06-30 Even Rouault <even.rouault at spatialys.com>
-
- * libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedXXXX()
-diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
-index db196e0..cd1e235 100644
---- a/tools/tiff2pdf.c
-+++ b/tools/tiff2pdf.c
-@@ -1737,7 +1737,12 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){
- return;
-
- t2p->pdf_transcode = T2P_TRANSCODE_ENCODE;
-- if(t2p->pdf_nopassthrough==0){
-+ /* It seems that T2P_TRANSCODE_RAW mode doesn't support separate->contig */
-+ /* conversion. At least t2p_read_tiff_size and t2p_read_tiff_size_tile */
-+ /* do not take into account the number of samples, and thus */
-+ /* that can cause heap buffer overflows such as in */
-+ /* http://bugzilla.maptools.org/show_bug.cgi?id=2715 */
-+ if(t2p->pdf_nopassthrough==0 && t2p->tiff_planar!=PLANARCONFIG_SEPARATE){
- #ifdef CCITT_SUPPORT
- if(t2p->tiff_compression==COMPRESSION_CCITTFAX4
- ){
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-13726.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-13726.patch
deleted file mode 100644
index c60ffa6..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-13726.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 5317ce215936ce611846557bb104b49d3b4c8345 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Wed, 23 Aug 2017 13:21:41 +0000
-Subject: [PATCH] * libtiff/tif_dirwrite.c: replace assertion related to not
- finding the SubIFD tag by runtime check. Fixes
- http://bugzilla.maptools.org/show_bug.cgi?id=2727 Reported by team OWL337
-
-Upstream-Status: Backport
-[https://github.com/vadz/libtiff/commit/f91ca83a21a6a583050e5a5755ce1441b2bf1d7e]
-
-CVE: CVE-2017-13726
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- ChangeLog | 7 +++++++
- libtiff/tif_dirwrite.c | 7 ++++++-
- 2 files changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index 6980da8..3e299d9 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,10 @@
-+2017-08-23 Even Rouault <even.rouault at spatialys.com>
-+
-+ * libtiff/tif_dirwrite.c: replace assertion related to not finding the
-+ SubIFD tag by runtime check.
-+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2727
-+ Reported by team OWL337
-+
- 2017-07-15 Even Rouault <even.rouault at spatialys.com>
-
- * tools/tiff2pdf.c: prevent heap buffer overflow write in "Raw"
-diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c
-index 8d6686b..14090ae 100644
---- a/libtiff/tif_dirwrite.c
-+++ b/libtiff/tif_dirwrite.c
-@@ -821,7 +821,12 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
- TIFFDirEntry* nb;
- for (na=0, nb=dir; ; na++, nb++)
- {
-- assert(na<ndir);
-+ if( na == ndir )
-+ {
-+ TIFFErrorExt(tif->tif_clientdata,module,
-+ "Cannot find SubIFD tag");
-+ goto bad;
-+ }
- if (nb->tdir_tag==TIFFTAG_SUBIFD)
- break;
- }
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-13727.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-13727.patch
deleted file mode 100644
index e228c2f..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-13727.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From a5e8245cc67646f7b448b4ca29258eaac418102c Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Wed, 23 Aug 2017 13:33:42 +0000
-Subject: [PATCH] * libtiff/tif_dirwrite.c: replace assertion to tag value not
- fitting on uint32 when selecting the value of SubIFD tag by runtime check (in
- TIFFWriteDirectoryTagSubifd()). Fixes
- http://bugzilla.maptools.org/show_bug.cgi?id=2728 Reported by team OWL337
-
-SubIFD tag by runtime check (in TIFFWriteDirectorySec())
-
-Upstream-Status: Backport
-[https://github.com/vadz/libtiff/commit/b6af137bf9ef852f1a48a50a5afb88f9e9da01cc]
-
-CVE: CVE-2017-13727
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- ChangeLog | 10 +++++++++-
- libtiff/tif_dirwrite.c | 9 ++++++++-
- 2 files changed, 17 insertions(+), 2 deletions(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index 3e299d9..8f5efe9 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,7 +1,15 @@
- 2017-08-23 Even Rouault <even.rouault at spatialys.com>
-
-+ * libtiff/tif_dirwrite.c: replace assertion to tag value not fitting
-+ on uint32 when selecting the value of SubIFD tag by runtime check
-+ (in TIFFWriteDirectoryTagSubifd()).
-+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2728
-+ Reported by team OWL337
-+
-+2017-08-23 Even Rouault <even.rouault at spatialys.com>
-+
- * libtiff/tif_dirwrite.c: replace assertion related to not finding the
-- SubIFD tag by runtime check.
-+ SubIFD tag by runtime check (in TIFFWriteDirectorySec())
- Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2727
- Reported by team OWL337
-
-diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c
-index 14090ae..f0a4baa 100644
---- a/libtiff/tif_dirwrite.c
-+++ b/libtiff/tif_dirwrite.c
-@@ -1949,7 +1949,14 @@ TIFFWriteDirectoryTagSubifd(TIFF* tif, uint32* ndir, TIFFDirEntry* dir)
- for (p=0; p < tif->tif_dir.td_nsubifd; p++)
- {
- assert(pa != 0);
-- assert(*pa <= 0xFFFFFFFFUL);
-+
-+ /* Could happen if an classicTIFF has a SubIFD of type LONG8 (which is illegal) */
-+ if( *pa > 0xFFFFFFFFUL)
-+ {
-+ TIFFErrorExt(tif->tif_clientdata,module,"Illegal value for SubIFD tag");
-+ _TIFFfree(o);
-+ return(0);
-+ }
- *pb++=(uint32)(*pa++);
- }
- n=TIFFWriteDirectoryTagCheckedIfdArray(tif,ndir,dir,TIFFTAG_SUBIFD,tif->tif_dir.td_nsubifd,o);
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-18013.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-18013.patch
new file mode 100644
index 0000000..878e0de
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-18013.patch
@@ -0,0 +1,42 @@
+From 293c8b0298e91d20ba51291e2351ab7d110671d0 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Sun, 31 Dec 2017 15:09:41 +0100
+Subject: [PATCH] libtiff/tif_print.c: TIFFPrintDirectory(): fix null pointer
+ dereference on corrupted file. Fixes
+ http://bugzilla.maptools.org/show_bug.cgi?id=2770
+
+Upstream-Status: Backport
+[https://gitlab.com/libtiff/libtiff/commit/c6f41df7b581402dfba3c19a1e3df4454c551a01]
+
+CVE: CVE-2017-18013
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ libtiff/tif_print.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c
+index 24d4b98..f494cfb 100644
+--- a/libtiff/tif_print.c
++++ b/libtiff/tif_print.c
+@@ -667,13 +667,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
+ #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
+ fprintf(fd, " %3lu: [%8I64u, %8I64u]\n",
+ (unsigned long) s,
+- (unsigned __int64) td->td_stripoffset[s],
+- (unsigned __int64) td->td_stripbytecount[s]);
++ td->td_stripoffset ? (unsigned __int64) td->td_stripoffset[s] : 0,
++ td->td_stripbytecount ? (unsigned __int64) td->td_stripbytecount[s] : 0);
+ #else
+ fprintf(fd, " %3lu: [%8llu, %8llu]\n",
+ (unsigned long) s,
+- (unsigned long long) td->td_stripoffset[s],
+- (unsigned long long) td->td_stripbytecount[s]);
++ td->td_stripoffset ? (unsigned long long) td->td_stripoffset[s] : 0,
++ td->td_stripbytecount ? (unsigned long long) td->td_stripbytecount[s] : 0);
+ #endif
+ }
+ }
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9147.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9147.patch
deleted file mode 100644
index 3392285..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9147.patch
+++ /dev/null
@@ -1,206 +0,0 @@
-From 0acf01fea714af573b814e10cf105c3359a236c3 Mon Sep 17 00:00:00 2001
-From: erouault <erouault>
-Date: Thu, 1 Jun 2017 12:44:04 +0000
-Subject: [PATCH] * libtiff/tif_dirinfo.c, tif_dirread.c: add _TIFFCheckFieldIsValidForCodec(),
-and use it in TIFFReadDirectory() so as to ignore fields whose tag is a
-codec-specified tag but this codec is not enabled. This avoids TIFFGetField()
-to behave differently depending on whether the codec is enabled or not, and
-thus can avoid stack based buffer overflows in a number of TIFF utilities
-such as tiffsplit, tiffcmp, thumbnail, etc.
-Patch derived from 0063-Handle-properly-CODEC-specific-tags.patch
-(http://bugzilla.maptools.org/show_bug.cgi?id=2580) by Raphaël Hertzog.
-Fixes:
-http://bugzilla.maptools.org/show_bug.cgi?id=2580
-http://bugzilla.maptools.org/show_bug.cgi?id=2693
-http://bugzilla.maptools.org/show_bug.cgi?id=2625 (CVE-2016-10095)
-http://bugzilla.maptools.org/show_bug.cgi?id=2564 (CVE-2015-7554)
-http://bugzilla.maptools.org/show_bug.cgi?id=2561 (CVE-2016-5318)
-http://bugzilla.maptools.org/show_bug.cgi?id=2499 (CVE-2014-8128)
-http://bugzilla.maptools.org/show_bug.cgi?id=2441
-http://bugzilla.maptools.org/show_bug.cgi?id=2433
-
-Upstream-Status: Backport
-[https://github.com/vadz/libtiff/commit/4d4fa0b68ae9ae038959ee4f69ebe288ec892f06]
-
-CVE: CVE-2017-9147
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- ChangeLog | 20 ++++++++++
- libtiff/tif_dir.h | 1 +
- libtiff/tif_dirinfo.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++
- libtiff/tif_dirread.c | 4 ++
- 4 files changed, 128 insertions(+)
-
-diff --git a/ChangeLog b/ChangeLog
-index ee8d9d0..5739292 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,23 @@
-+2017-06-01 Even Rouault <even.rouault at spatialys.com>
-+
-+ * libtiff/tif_dirinfo.c, tif_dirread.c: add _TIFFCheckFieldIsValidForCodec(),
-+ and use it in TIFFReadDirectory() so as to ignore fields whose tag is a
-+ codec-specified tag but this codec is not enabled. This avoids TIFFGetField()
-+ to behave differently depending on whether the codec is enabled or not, and
-+ thus can avoid stack based buffer overflows in a number of TIFF utilities
-+ such as tiffsplit, tiffcmp, thumbnail, etc.
-+ Patch derived from 0063-Handle-properly-CODEC-specific-tags.patch
-+ (http://bugzilla.maptools.org/show_bug.cgi?id=2580) by Raphaël Hertzog.
-+ Fixes:
-+ http://bugzilla.maptools.org/show_bug.cgi?id=2580
-+ http://bugzilla.maptools.org/show_bug.cgi?id=2693
-+ http://bugzilla.maptools.org/show_bug.cgi?id=2625 (CVE-2016-10095)
-+ http://bugzilla.maptools.org/show_bug.cgi?id=2564 (CVE-2015-7554)
-+ http://bugzilla.maptools.org/show_bug.cgi?id=2561 (CVE-2016-5318)
-+ http://bugzilla.maptools.org/show_bug.cgi?id=2499 (CVE-2014-8128)
-+ http://bugzilla.maptools.org/show_bug.cgi?id=2441
-+ http://bugzilla.maptools.org/show_bug.cgi?id=2433
-+
- 2017-05-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
-
- * configure.ac: libtiff 4.0.8 released.
-diff --git a/libtiff/tif_dir.h b/libtiff/tif_dir.h
-index e12b44b..5206be4 100644
---- a/libtiff/tif_dir.h
-+++ b/libtiff/tif_dir.h
-@@ -291,6 +291,7 @@ struct _TIFFField {
- extern int _TIFFMergeFields(TIFF*, const TIFFField[], uint32);
- extern const TIFFField* _TIFFFindOrRegisterField(TIFF *, uint32, TIFFDataType);
- extern TIFFField* _TIFFCreateAnonField(TIFF *, uint32, TIFFDataType);
-+extern int _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag);
-
- #if defined(__cplusplus)
- }
-diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c
-index 0c8ef42..97c0df0 100644
---- a/libtiff/tif_dirinfo.c
-+++ b/libtiff/tif_dirinfo.c
-@@ -956,6 +956,109 @@ TIFFMergeFieldInfo(TIFF* tif, const TIFFFieldInfo info[], uint32 n)
- return 0;
- }
-
-+int
-+_TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag)
-+{
-+ /* Filter out non-codec specific tags */
-+ switch (tag) {
-+ /* Shared tags */
-+ case TIFFTAG_PREDICTOR:
-+ /* JPEG tags */
-+ case TIFFTAG_JPEGTABLES:
-+ /* OJPEG tags */
-+ case TIFFTAG_JPEGIFOFFSET:
-+ case TIFFTAG_JPEGIFBYTECOUNT:
-+ case TIFFTAG_JPEGQTABLES:
-+ case TIFFTAG_JPEGDCTABLES:
-+ case TIFFTAG_JPEGACTABLES:
-+ case TIFFTAG_JPEGPROC:
-+ case TIFFTAG_JPEGRESTARTINTERVAL:
-+ /* CCITT* */
-+ case TIFFTAG_BADFAXLINES:
-+ case TIFFTAG_CLEANFAXDATA:
-+ case TIFFTAG_CONSECUTIVEBADFAXLINES:
-+ case TIFFTAG_GROUP3OPTIONS:
-+ case TIFFTAG_GROUP4OPTIONS:
-+ break;
-+ default:
-+ return 1;
-+ }
-+ /* Check if codec specific tags are allowed for the current
-+ * compression scheme (codec) */
-+ switch (tif->tif_dir.td_compression) {
-+ case COMPRESSION_LZW:
-+ if (tag == TIFFTAG_PREDICTOR)
-+ return 1;
-+ break;
-+ case COMPRESSION_PACKBITS:
-+ /* No codec-specific tags */
-+ break;
-+ case COMPRESSION_THUNDERSCAN:
-+ /* No codec-specific tags */
-+ break;
-+ case COMPRESSION_NEXT:
-+ /* No codec-specific tags */
-+ break;
-+ case COMPRESSION_JPEG:
-+ if (tag == TIFFTAG_JPEGTABLES)
-+ return 1;
-+ break;
-+ case COMPRESSION_OJPEG:
-+ switch (tag) {
-+ case TIFFTAG_JPEGIFOFFSET:
-+ case TIFFTAG_JPEGIFBYTECOUNT:
-+ case TIFFTAG_JPEGQTABLES:
-+ case TIFFTAG_JPEGDCTABLES:
-+ case TIFFTAG_JPEGACTABLES:
-+ case TIFFTAG_JPEGPROC:
-+ case TIFFTAG_JPEGRESTARTINTERVAL:
-+ return 1;
-+ }
-+ break;
-+ case COMPRESSION_CCITTRLE:
-+ case COMPRESSION_CCITTRLEW:
-+ case COMPRESSION_CCITTFAX3:
-+ case COMPRESSION_CCITTFAX4:
-+ switch (tag) {
-+ case TIFFTAG_BADFAXLINES:
-+ case TIFFTAG_CLEANFAXDATA:
-+ case TIFFTAG_CONSECUTIVEBADFAXLINES:
-+ return 1;
-+ case TIFFTAG_GROUP3OPTIONS:
-+ if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX3)
-+ return 1;
-+ break;
-+ case TIFFTAG_GROUP4OPTIONS:
-+ if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX4)
-+ return 1;
-+ break;
-+ }
-+ break;
-+ case COMPRESSION_JBIG:
-+ /* No codec-specific tags */
-+ break;
-+ case COMPRESSION_DEFLATE:
-+ case COMPRESSION_ADOBE_DEFLATE:
-+ if (tag == TIFFTAG_PREDICTOR)
-+ return 1;
-+ break;
-+ case COMPRESSION_PIXARLOG:
-+ if (tag == TIFFTAG_PREDICTOR)
-+ return 1;
-+ break;
-+ case COMPRESSION_SGILOG:
-+ case COMPRESSION_SGILOG24:
-+ /* No codec-specific tags */
-+ break;
-+ case COMPRESSION_LZMA:
-+ if (tag == TIFFTAG_PREDICTOR)
-+ return 1;
-+ break;
-+
-+ }
-+ return 0;
-+}
-+
- /* vim: set ts=8 sts=8 sw=8 noet: */
-
- /*
-diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c
-index 1d4f0b9..f1dc3d7 100644
---- a/libtiff/tif_dirread.c
-+++ b/libtiff/tif_dirread.c
-@@ -3580,6 +3580,10 @@ TIFFReadDirectory(TIFF* tif)
- goto bad;
- dp->tdir_tag=IGNORE;
- break;
-+ default:
-+ if( !_TIFFCheckFieldIsValidForCodec(tif, dp->tdir_tag) )
-+ dp->tdir_tag=IGNORE;
-+ break;
- }
- }
- }
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9935.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9935.patch
new file mode 100644
index 0000000..60684dd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9935.patch
@@ -0,0 +1,160 @@
+From abb0055d21c52a9925314d5b0628fb2b6307619c Mon Sep 17 00:00:00 2001
+From: Brian May <brian@linuxpenguins.xyz>
+Date: Thu, 7 Dec 2017 07:46:47 +1100
+Subject: [PATCH] tiff2pdf: Fix CVE-2017-9935
+
+Fix for http://bugzilla.maptools.org/show_bug.cgi?id=2704
+
+This vulnerability - at least for the supplied test case - is because we
+assume that a tiff will only have one transfer function that is the same
+for all pages. This is not required by the TIFF standards.
+
+We than read the transfer function for every page. Depending on the
+transfer function, we allocate either 2 or 4 bytes to the XREF buffer.
+We allocate this memory after we read in the transfer function for the
+page.
+
+For the first exploit - POC1, this file has 3 pages. For the first page
+we allocate 2 extra extra XREF entries. Then for the next page 2 more
+entries. Then for the last page the transfer function changes and we
+allocate 4 more entries.
+
+When we read the file into memory, we assume we have 4 bytes extra for
+each and every page (as per the last transfer function we read). Which
+is not correct, we only have 2 bytes extra for the first 2 pages. As a
+result, we end up writing past the end of the buffer.
+
+There are also some related issues that this also fixes. For example,
+TIFFGetField can return uninitalized pointer values, and the logic to
+detect a N=3 vs N=1 transfer function seemed rather strange.
+
+It is also strange that we declare the transfer functions to be of type
+float, when the standard says they are unsigned 16 bit values. This is
+fixed in another patch.
+
+This patch will check to ensure that the N value for every transfer
+function is the same for every page. If this changes, we abort with an
+error. In theory, we should perhaps check that the transfer function
+itself is identical for every page, however we don't do that due to the
+confusion of the type of the data in the transfer function.
+
+Upstream-Status: Backport
+[https://gitlab.com/libtiff/libtiff/commit/3dd8f6a357981a4090f126ab9025056c938b6940]
+
+CVE: CVE-2017-9935
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ libtiff/tif_dir.c | 3 +++
+ tools/tiff2pdf.c | 65 +++++++++++++++++++++++++++++++++++++------------------
+ 2 files changed, 47 insertions(+), 21 deletions(-)
+
+diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c
+index f00f808..c36a5f3 100644
+--- a/libtiff/tif_dir.c
++++ b/libtiff/tif_dir.c
+@@ -1067,6 +1067,9 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
+ if (td->td_samplesperpixel - td->td_extrasamples > 1) {
+ *va_arg(ap, uint16**) = td->td_transferfunction[1];
+ *va_arg(ap, uint16**) = td->td_transferfunction[2];
++ } else {
++ *va_arg(ap, uint16**) = NULL;
++ *va_arg(ap, uint16**) = NULL;
+ }
+ break;
+ case TIFFTAG_REFERENCEBLACKWHITE:
+diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
+index 454befb..0b5973e 100644
+--- a/tools/tiff2pdf.c
++++ b/tools/tiff2pdf.c
+@@ -1047,6 +1047,8 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
+ uint16 pagen=0;
+ uint16 paged=0;
+ uint16 xuint16=0;
++ uint16 tiff_transferfunctioncount=0;
++ float* tiff_transferfunction[3];
+
+ directorycount=TIFFNumberOfDirectories(input);
+ t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,directorycount,sizeof(T2P_PAGE)));
+@@ -1147,26 +1149,48 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
+ }
+ #endif
+ if (TIFFGetField(input, TIFFTAG_TRANSFERFUNCTION,
+- &(t2p->tiff_transferfunction[0]),
+- &(t2p->tiff_transferfunction[1]),
+- &(t2p->tiff_transferfunction[2]))) {
+- if((t2p->tiff_transferfunction[1] != (float*) NULL) &&
+- (t2p->tiff_transferfunction[2] != (float*) NULL) &&
+- (t2p->tiff_transferfunction[1] !=
+- t2p->tiff_transferfunction[0])) {
+- t2p->tiff_transferfunctioncount = 3;
+- t2p->tiff_pages[i].page_extra += 4;
+- t2p->pdf_xrefcount += 4;
+- } else {
+- t2p->tiff_transferfunctioncount = 1;
+- t2p->tiff_pages[i].page_extra += 2;
+- t2p->pdf_xrefcount += 2;
+- }
+- if(t2p->pdf_minorversion < 2)
+- t2p->pdf_minorversion = 2;
++ &(tiff_transferfunction[0]),
++ &(tiff_transferfunction[1]),
++ &(tiff_transferfunction[2]))) {
++
++ if((tiff_transferfunction[1] != (float*) NULL) &&
++ (tiff_transferfunction[2] != (float*) NULL)
++ ) {
++ tiff_transferfunctioncount=3;
++ } else {
++ tiff_transferfunctioncount=1;
++ }
+ } else {
+- t2p->tiff_transferfunctioncount=0;
++ tiff_transferfunctioncount=0;
+ }
++
++ if (i > 0){
++ if (tiff_transferfunctioncount != t2p->tiff_transferfunctioncount){
++ TIFFError(
++ TIFF2PDF_MODULE,
++ "Different transfer function on page %d",
++ i);
++ t2p->t2p_error = T2P_ERR_ERROR;
++ return;
++ }
++ }
++
++ t2p->tiff_transferfunctioncount = tiff_transferfunctioncount;
++ t2p->tiff_transferfunction[0] = tiff_transferfunction[0];
++ t2p->tiff_transferfunction[1] = tiff_transferfunction[1];
++ t2p->tiff_transferfunction[2] = tiff_transferfunction[2];
++ if(tiff_transferfunctioncount == 3){
++ t2p->tiff_pages[i].page_extra += 4;
++ t2p->pdf_xrefcount += 4;
++ if(t2p->pdf_minorversion < 2)
++ t2p->pdf_minorversion = 2;
++ } else if (tiff_transferfunctioncount == 1){
++ t2p->tiff_pages[i].page_extra += 2;
++ t2p->pdf_xrefcount += 2;
++ if(t2p->pdf_minorversion < 2)
++ t2p->pdf_minorversion = 2;
++ }
++
+ if( TIFFGetField(
+ input,
+ TIFFTAG_ICCPROFILE,
+@@ -1828,9 +1852,8 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){
+ &(t2p->tiff_transferfunction[1]),
+ &(t2p->tiff_transferfunction[2]))) {
+ if((t2p->tiff_transferfunction[1] != (float*) NULL) &&
+- (t2p->tiff_transferfunction[2] != (float*) NULL) &&
+- (t2p->tiff_transferfunction[1] !=
+- t2p->tiff_transferfunction[0])) {
++ (t2p->tiff_transferfunction[2] != (float*) NULL)
++ ) {
+ t2p->tiff_transferfunctioncount=3;
+ } else {
+ t2p->tiff_transferfunctioncount=1;
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9936.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9936.patch
deleted file mode 100644
index fc99363..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9936.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 62efea76592647426deec5592fd7274d5c950646 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 26 Jun 2017 15:19:59 +0000
-Subject: [PATCH] * libtiff/tif_jbig.c: fix memory leak in error code path of
- JBIGDecode() Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2706 Reported
- by team OWL337
-
-* libtiff/tif_jpeg.c: error out at decoding time if anticipated libjpeg
-
-Upstream-Status: Backport
-[https://github.com/vadz/libtiff/commit/fe8d7165956b88df4837034a9161dc5fd20cf67a]
-
-CVE: CVE-2017-9936
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- ChangeLog | 6 ++++++
- libtiff/tif_jbig.c | 1 +
- 2 files changed, 7 insertions(+)
-
-diff --git a/ChangeLog b/ChangeLog
-index 5739292..0240f0b 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,9 @@
-+2017-06-26 Even Rouault <even.rouault at spatialys.com>
-+
-+ * libtiff/tif_jbig.c: fix memory leak in error code path of JBIGDecode()
-+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2706
-+ Reported by team OWL337
-+
- 2017-06-01 Even Rouault <even.rouault at spatialys.com>
-
- * libtiff/tif_dirinfo.c, tif_dirread.c: add _TIFFCheckFieldIsValidForCodec(),
-diff --git a/libtiff/tif_jbig.c b/libtiff/tif_jbig.c
-index 5f5f75e..c75f31d 100644
---- a/libtiff/tif_jbig.c
-+++ b/libtiff/tif_jbig.c
-@@ -94,6 +94,7 @@ static int JBIGDecode(TIFF* tif, uint8* buffer, tmsize_t size, uint16 s)
- jbg_strerror(decodeStatus)
- #endif
- );
-+ jbg_dec_free(&decoder);
- return 0;
- }
-
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2018-5784.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2018-5784.patch
new file mode 100644
index 0000000..406001d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2018-5784.patch
@@ -0,0 +1,135 @@
+From 6cdea15213be6b67d9f8380c7bb40e325d3adace Mon Sep 17 00:00:00 2001
+From: Nathan Baker <nathanb@lenovo-chrome.com>
+Date: Tue, 6 Feb 2018 10:13:57 -0500
+Subject: [PATCH] Fix for bug 2772
+
+It is possible to craft a TIFF document where the IFD list is circular,
+leading to an infinite loop while traversing the chain. The libtiff
+directory reader has a failsafe that will break out of this loop after
+reading 65535 directory entries, but it will continue processing,
+consuming time and resources to process what is essentially a bogus TIFF
+document.
+
+This change fixes the above behavior by breaking out of processing when
+a TIFF document has >= 65535 directories and terminating with an error.
+
+Upstream-Status: Backport
+[https://gitlab.com/libtiff/libtiff/commit/473851d211cf8805a161820337ca74cc9615d6ef]
+
+CVE: CVE-2018-5784
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ contrib/addtiffo/tif_overview.c | 14 +++++++++++++-
+ tools/tiff2pdf.c | 10 ++++++++++
+ tools/tiffcrop.c | 13 +++++++++++--
+ 3 files changed, 34 insertions(+), 3 deletions(-)
+
+diff --git a/contrib/addtiffo/tif_overview.c b/contrib/addtiffo/tif_overview.c
+index c61ffbb..03b3573 100644
+--- a/contrib/addtiffo/tif_overview.c
++++ b/contrib/addtiffo/tif_overview.c
+@@ -65,6 +65,8 @@
+ # define MAX(a,b) ((a>b) ? a : b)
+ #endif
+
++#define TIFF_DIR_MAX 65534
++
+ void TIFFBuildOverviews( TIFF *, int, int *, int, const char *,
+ int (*)(double,void*), void * );
+
+@@ -91,6 +93,7 @@ uint32 TIFF_WriteOverview( TIFF *hTIFF, uint32 nXSize, uint32 nYSize,
+ {
+ toff_t nBaseDirOffset;
+ toff_t nOffset;
++ tdir_t iNumDir;
+
+ (void) bUseSubIFDs;
+
+@@ -147,7 +150,16 @@ uint32 TIFF_WriteOverview( TIFF *hTIFF, uint32 nXSize, uint32 nYSize,
+ return 0;
+
+ TIFFWriteDirectory( hTIFF );
+- TIFFSetDirectory( hTIFF, (tdir_t) (TIFFNumberOfDirectories(hTIFF)-1) );
++ iNumDir = TIFFNumberOfDirectories(hTIFF);
++ if( iNumDir > TIFF_DIR_MAX )
++ {
++ TIFFErrorExt( TIFFClientdata(hTIFF),
++ "TIFF_WriteOverview",
++ "File `%s' has too many directories.\n",
++ TIFFFileName(hTIFF) );
++ exit(-1);
++ }
++ TIFFSetDirectory( hTIFF, (tdir_t) (iNumDir - 1) );
+
+ nOffset = TIFFCurrentDirOffset( hTIFF );
+
+diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
+index 0b5973e..ef5d6a0 100644
+--- a/tools/tiff2pdf.c
++++ b/tools/tiff2pdf.c
+@@ -68,6 +68,8 @@ extern int getopt(int, char**, char*);
+
+ #define PS_UNIT_SIZE 72.0F
+
++#define TIFF_DIR_MAX 65534
++
+ /* This type is of PDF color spaces. */
+ typedef enum {
+ T2P_CS_BILEVEL = 0x01, /* Bilevel, black and white */
+@@ -1051,6 +1053,14 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
+ float* tiff_transferfunction[3];
+
+ directorycount=TIFFNumberOfDirectories(input);
++ if(directorycount > TIFF_DIR_MAX) {
++ TIFFError(
++ TIFF2PDF_MODULE,
++ "TIFF contains too many directories, %s",
++ TIFFFileName(input));
++ t2p->t2p_error = T2P_ERR_ERROR;
++ return;
++ }
+ t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,directorycount,sizeof(T2P_PAGE)));
+ if(t2p->tiff_pages==NULL){
+ TIFFError(
+diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
+index c69177e..c60cb38 100644
+--- a/tools/tiffcrop.c
++++ b/tools/tiffcrop.c
+@@ -217,6 +217,8 @@ extern int getopt(int argc, char * const argv[], const char *optstring);
+ #define DUMP_TEXT 1
+ #define DUMP_RAW 2
+
++#define TIFF_DIR_MAX 65534
++
+ /* Offsets into buffer for margins and fixed width and length segments */
+ struct offset {
+ uint32 tmargin;
+@@ -2233,7 +2235,7 @@ main(int argc, char* argv[])
+ pageNum = -1;
+ else
+ total_images = 0;
+- /* read multiple input files and write to output file(s) */
++ /* Read multiple input files and write to output file(s) */
+ while (optind < argc - 1)
+ {
+ in = TIFFOpen (argv[optind], "r");
+@@ -2241,7 +2243,14 @@ main(int argc, char* argv[])
+ return (-3);
+
+ /* If only one input file is specified, we can use directory count */
+- total_images = TIFFNumberOfDirectories(in);
++ total_images = TIFFNumberOfDirectories(in);
++ if (total_images > TIFF_DIR_MAX)
++ {
++ TIFFError (TIFFFileName(in), "File contains too many directories");
++ if (out != NULL)
++ (void) TIFFClose(out);
++ return (1);
++ }
+ if (image_count == 0)
+ {
+ dirnum = 0;
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/libtool2.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/libtool2.patch
index 457202e..a84c688 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/libtool2.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/libtool2.patch
@@ -4,13 +4,13 @@
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-Index: tiff-3.9.5/configure.ac
+Index: tiff-4.0.9/configure.ac
===================================================================
---- tiff-3.9.5.orig/configure.ac
-+++ tiff-3.9.5/configure.ac
+--- tiff-4.0.9.orig/configure.ac
++++ tiff-4.0.9/configure.ac
@@ -27,7 +27,7 @@ dnl Process this file with autoconf to p
AC_PREREQ(2.64)
- AC_INIT([LibTIFF Software],[3.9.5],[tiff@lists.maptools.org],[tiff])
+ AC_INIT([LibTIFF Software],[4.0.9],[tiff@lists.maptools.org],[tiff])
AC_CONFIG_AUX_DIR(config)
-AC_CONFIG_MACRO_DIR(m4)
+dnl AC_CONFIG_MACRO_DIR(m4)
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.8.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.8.bb
deleted file mode 100644
index ebee6f8..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.8.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-SUMMARY = "Provides support for the Tag Image File Format (TIFF)"
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf"
-
-CVE_PRODUCT = "libtiff"
-
-SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
- file://libtool2.patch \
- file://CVE-2017-9147.patch \
- file://CVE-2017-9936.patch \
- file://CVE-2017-10688.patch \
- file://CVE-2017-11335.patch \
- file://CVE-2017-13726.patch \
- file://CVE-2017-13727.patch \
- "
-
-SRC_URI[md5sum] = "2a7d1c1318416ddf36d5f6fa4600069b"
-SRC_URI[sha256sum] = "59d7a5a8ccd92059913f246877db95a2918e6c04fb9d43fd74e5c3390dac2910"
-
-# exclude betas
-UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar"
-
-inherit autotools multilib_header
-
-CACHED_CONFIGUREVARS = "ax_cv_check_gl_libgl=no"
-
-PACKAGECONFIG ?= "cxx jpeg zlib lzma \
- strip-chopping extrasample-as-alpha check-ycbcr-subsampling"
-
-PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx,,"
-PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg,"
-PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib,"
-PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz,"
-
-# Convert single-strip uncompressed images to multiple strips of specified
-# size (default: 8192) to reduce memory usage
-PACKAGECONFIG[strip-chopping] = "--enable-strip-chopping,--disable-strip-chopping,,"
-
-# Treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA
-PACKAGECONFIG[extrasample-as-alpha] = "--enable-extrasample-as-alpha,--disable-extrasample-as-alpha,,"
-
-# Control picking up YCbCr subsample info. Disable to support files lacking
-# the tag
-PACKAGECONFIG[check-ycbcr-subsampling] = "--enable-check-ycbcr-subsampling,--disable-check-ycbcr-subsampling,,"
-
-# Support a mechanism allowing reading large strips (usually one strip files)
-# in chunks when using TIFFReadScanline. Experimental 4.0+ feature
-PACKAGECONFIG[chunky-strip-read] = "--enable-chunky-strip-read,--disable-chunky-strip-read,,"
-
-PACKAGES =+ "tiffxx tiff-utils"
-FILES_tiffxx = "${libdir}/libtiffxx.so.*"
-FILES_tiff-utils = "${bindir}/*"
-
-do_install_append() {
- oe_multilib_header tiffconf.h
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.9.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.9.bb
new file mode 100644
index 0000000..8c3bba5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.9.bb
@@ -0,0 +1,55 @@
+SUMMARY = "Provides support for the Tag Image File Format (TIFF)"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf"
+
+CVE_PRODUCT = "libtiff"
+
+SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
+ file://libtool2.patch \
+ file://CVE-2017-9935.patch \
+ file://CVE-2017-18013.patch \
+ file://CVE-2018-5784.patch \
+ "
+
+SRC_URI[md5sum] = "54bad211279cc93eb4fca31ba9bfdc79"
+SRC_URI[sha256sum] = "6e7bdeec2c310734e734d19aae3a71ebe37a4d842e0e23dbb1b8921c0026cfcd"
+
+# exclude betas
+UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar"
+
+inherit autotools multilib_header
+
+CACHED_CONFIGUREVARS = "ax_cv_check_gl_libgl=no"
+
+PACKAGECONFIG ?= "cxx jpeg zlib lzma \
+ strip-chopping extrasample-as-alpha check-ycbcr-subsampling"
+
+PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx,,"
+PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg,"
+PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib,"
+PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz,"
+
+# Convert single-strip uncompressed images to multiple strips of specified
+# size (default: 8192) to reduce memory usage
+PACKAGECONFIG[strip-chopping] = "--enable-strip-chopping,--disable-strip-chopping,,"
+
+# Treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA
+PACKAGECONFIG[extrasample-as-alpha] = "--enable-extrasample-as-alpha,--disable-extrasample-as-alpha,,"
+
+# Control picking up YCbCr subsample info. Disable to support files lacking
+# the tag
+PACKAGECONFIG[check-ycbcr-subsampling] = "--enable-check-ycbcr-subsampling,--disable-check-ycbcr-subsampling,,"
+
+# Support a mechanism allowing reading large strips (usually one strip files)
+# in chunks when using TIFFReadScanline. Experimental 4.0+ feature
+PACKAGECONFIG[chunky-strip-read] = "--enable-chunky-strip-read,--disable-chunky-strip-read,,"
+
+PACKAGES =+ "tiffxx tiff-utils"
+FILES_tiffxx = "${libdir}/libtiffxx.so.*"
+FILES_tiff-utils = "${bindir}/*"
+
+do_install_append() {
+ oe_multilib_header tiffconf.h
+}
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2017-14632.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2017-14632.patch
new file mode 100644
index 0000000..4036b96
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2017-14632.patch
@@ -0,0 +1,62 @@
+From 39704ce16835e5c019bb03f6a94dc1f0677406c5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
+Date: Wed, 15 Nov 2017 18:22:59 +0100
+Subject: [PATCH] CVE-2017-14632: vorbis_analysis_header_out: Don't clear opb
+ if not initialized
+
+If the number of channels is not within the allowed range
+we call oggback_writeclear altough it's not initialized yet.
+
+This fixes
+
+ =23371== Invalid free() / delete / delete[] / realloc()
+ ==23371== at 0x4C2CE1B: free (vg_replace_malloc.c:530)
+ ==23371== by 0x829CA31: oggpack_writeclear (in /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2)
+ ==23371== by 0x84B96EE: vorbis_analysis_headerout (info.c:652)
+ ==23371== by 0x9FBCBCC: ??? (in /usr/lib/x86_64-linux-gnu/sox/libsox_fmt_vorbis.so)
+ ==23371== by 0x4E524F1: ??? (in /usr/lib/x86_64-linux-gnu/libsox.so.2.0.1)
+ ==23371== by 0x4E52CCA: sox_open_write (in /usr/lib/x86_64-linux-gnu/libsox.so.2.0.1)
+ ==23371== by 0x10D82A: open_output_file (sox.c:1556)
+ ==23371== by 0x10D82A: process (sox.c:1753)
+ ==23371== by 0x10D82A: main (sox.c:3012)
+ ==23371== Address 0x68768c8 is 488 bytes inside a block of size 880 alloc'd
+ ==23371== at 0x4C2BB1F: malloc (vg_replace_malloc.c:298)
+ ==23371== by 0x4C2DE9F: realloc (vg_replace_malloc.c:785)
+ ==23371== by 0x4E545C2: lsx_realloc (in /usr/lib/x86_64-linux-gnu/libsox.so.2.0.1)
+ ==23371== by 0x9FBC9A0: ??? (in /usr/lib/x86_64-linux-gnu/sox/libsox_fmt_vorbis.so)
+ ==23371== by 0x4E524F1: ??? (in /usr/lib/x86_64-linux-gnu/libsox.so.2.0.1)
+ ==23371== by 0x4E52CCA: sox_open_write (in /usr/lib/x86_64-linux-gnu/libsox.so.2.0.1)
+ ==23371== by 0x10D82A: open_output_file (sox.c:1556)
+ ==23371== by 0x10D82A: process (sox.c:1753)
+ ==23371== by 0x10D82A: main (sox.c:3012)
+
+as seen when using the testcase from CVE-2017-11333 with
+008d23b782be09c8d75ba8190b1794abd66c7121 applied. However the error was
+there before.
+
+Upstream-Status: Backport
+CVE: CVE-2017-14632
+
+Reference to upstream patch:
+https://git.xiph.org/?p=vorbis.git;a=commitdiff;h=c1c2831fc7306d5fbd7bc800324efd12b28d327f
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ lib/info.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/info.c b/lib/info.c
+index 81b7557..4d82568 100644
+--- a/lib/info.c
++++ b/lib/info.c
+@@ -584,6 +584,7 @@ int vorbis_analysis_headerout(vorbis_dsp_state *v,
+ private_state *b=v->backend_state;
+
+ if(!b||vi->channels<=0||vi->channels>256){
++ b = NULL;
+ ret=OV_EFAULT;
+ goto err_out;
+ }
+--
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2017-14633.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2017-14633.patch
new file mode 100644
index 0000000..9c9e688
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2017-14633.patch
@@ -0,0 +1,42 @@
+From 07eda55f336e5c44dfc0e4a1e21628faed7255fa Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
+Date: Tue, 31 Oct 2017 18:32:46 +0100
+Subject: [PATCH] CVE-2017-14633: Don't allow for more than 256 channels
+
+Otherwise
+
+ for(i=0;i<vi->channels;i++){
+ /* the encoder setup assumes that all the modes used by any
+ specific bitrate tweaking use the same floor */
+ int submap=info->chmuxlist[i];
+
+overreads later in mapping0_forward since chmuxlist is a fixed array of
+256 elements max.
+
+Upstream-Status: Backport
+CVE: CVE-2017-14633
+
+Reference to upstream patch:
+https://git.xiph.org/?p=vorbis.git;a=commitdiff;h=667ceb4aab60c1f74060143bb24e5f427b3cce5f
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ lib/info.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/info.c b/lib/info.c
+index e447a0c..81b7557 100644
+--- a/lib/info.c
++++ b/lib/info.c
+@@ -583,7 +583,7 @@ int vorbis_analysis_headerout(vorbis_dsp_state *v,
+ oggpack_buffer opb;
+ private_state *b=v->backend_state;
+
+- if(!b||vi->channels<=0){
++ if(!b||vi->channels<=0||vi->channels>256){
+ ret=OV_EFAULT;
+ goto err_out;
+ }
+--
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2018-5146.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2018-5146.patch
new file mode 100644
index 0000000..6d4052a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2018-5146.patch
@@ -0,0 +1,100 @@
+From 3a017f591457bf6e80231b563bf83ee583fdbca8 Mon Sep 17 00:00:00 2001
+From: Thomas Daede <daede003@umn.edu>
+Date: Thu, 15 Mar 2018 14:15:31 -0700
+Subject: [PATCH] CVE-2018-5146: Prevent out-of-bounds write in codebook
+ decoding.
+
+Codebooks that are not an exact divisor of the partition size are now
+truncated to fit within the partition.
+
+Upstream-Status: Backport
+CVE: CVE-2018-5146
+
+Reference to upstream patch:
+https://git.xiph.org/?p=vorbis.git;a=commitdiff;h=667ceb4aab60c1f74060143bb24e5f427b3cce5f
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ lib/codebook.c | 48 ++++++++++--------------------------------------
+ 1 file changed, 10 insertions(+), 38 deletions(-)
+
+diff --git a/lib/codebook.c b/lib/codebook.c
+index 8b766e8..7022fd2 100644
+--- a/lib/codebook.c
++++ b/lib/codebook.c
+@@ -387,7 +387,7 @@ long vorbis_book_decodevs_add(codebook *book,float *a,oggpack_buffer *b,int n){
+ t[i] = book->valuelist+entry[i]*book->dim;
+ }
+ for(i=0,o=0;i<book->dim;i++,o+=step)
+- for (j=0;j<step;j++)
++ for (j=0;o+j<n && j<step;j++)
+ a[o+j]+=t[j][i];
+ }
+ return(0);
+@@ -399,41 +399,12 @@ long vorbis_book_decodev_add(codebook *book,float *a,oggpack_buffer *b,int n){
+ int i,j,entry;
+ float *t;
+
+- if(book->dim>8){
+- for(i=0;i<n;){
+- entry = decode_packed_entry_number(book,b);
+- if(entry==-1)return(-1);
+- t = book->valuelist+entry*book->dim;
+- for (j=0;j<book->dim;)
+- a[i++]+=t[j++];
+- }
+- }else{
+- for(i=0;i<n;){
+- entry = decode_packed_entry_number(book,b);
+- if(entry==-1)return(-1);
+- t = book->valuelist+entry*book->dim;
+- j=0;
+- switch((int)book->dim){
+- case 8:
+- a[i++]+=t[j++];
+- case 7:
+- a[i++]+=t[j++];
+- case 6:
+- a[i++]+=t[j++];
+- case 5:
+- a[i++]+=t[j++];
+- case 4:
+- a[i++]+=t[j++];
+- case 3:
+- a[i++]+=t[j++];
+- case 2:
+- a[i++]+=t[j++];
+- case 1:
+- a[i++]+=t[j++];
+- case 0:
+- break;
+- }
+- }
++ for(i=0;i<n;){
++ entry = decode_packed_entry_number(book,b);
++ if(entry==-1)return(-1);
++ t = book->valuelist+entry*book->dim;
++ for(j=0;i<n && j<book->dim;)
++ a[i++]+=t[j++];
+ }
+ }
+ return(0);
+@@ -471,12 +442,13 @@ long vorbis_book_decodevv_add(codebook *book,float **a,long offset,int ch,
+ long i,j,entry;
+ int chptr=0;
+ if(book->used_entries>0){
+- for(i=offset/ch;i<(offset+n)/ch;){
++ int m=(offset+n)/ch;
++ for(i=offset/ch;i<m;){
+ entry = decode_packed_entry_number(book,b);
+ if(entry==-1)return(-1);
+ {
+ const float *t = book->valuelist+entry*book->dim;
+- for (j=0;j<book->dim;j++){
++ for (j=0;i<m && j<book->dim;j++){
+ a[chptr++][i]+=t[j];
+ if(chptr==ch){
+ chptr=0;
+--
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb
index 56c5b0a..20f887c 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb
@@ -12,6 +12,9 @@
SRC_URI = "http://downloads.xiph.org/releases/vorbis/${BP}.tar.xz \
file://0001-configure-Check-for-clang.patch \
+ file://CVE-2017-14633.patch \
+ file://CVE-2017-14632.patch \
+ file://CVE-2018-5146.patch \
"
SRC_URI[md5sum] = "28cb28097c07a735d6af56e598e1c90f"
SRC_URI[sha256sum] = "54f94a9527ff0a88477be0a71c0bab09a4c3febe0ed878b24824906cd4b0e1d1"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.25.10.bb b/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.25.10.bb
new file mode 100644
index 0000000..929069a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.25.10.bb
@@ -0,0 +1,51 @@
+SUMMARY = "Audio decoder for MPEG-1 Layer 1/2/3"
+DESCRIPTION = "The core of mpg123 is an MPEG-1 Layer 1/2/3 decoding library, which can be used by other programs. \
+mpg123 also comes with a command-line tool which can playback using ALSA, PulseAudio, OSS, and several other APIs, \
+and also can write the decoded audio to WAV."
+HOMEPAGE = "http://mpg123.de/"
+BUGTRACKER = "http://sourceforge.net/p/mpg123/bugs/"
+SECTION = "multimedia"
+
+LICENSE = "LGPLv2.1"
+LICENSE_FLAGS = "commercial"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1e86753638d3cf2512528b99079bc4f3"
+
+SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2"
+SRC_URI[md5sum] = "ea32caa61d41d8be797f0b04a1b43ad9"
+SRC_URI[sha256sum] = "6c1337aee2e4bf993299851c70b7db11faec785303cfca3a5c3eb5f329ba7023"
+
+inherit autotools pkgconfig
+
+# The options should be mutually exclusive for configuration script.
+# If both alsa and pulseaudio are specified (as in the default distro features)
+# pulseaudio takes precedence.
+PACKAGECONFIG_ALSA = "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '${PACKAGECONFIG_ALSA}', d)}"
+
+PACKAGECONFIG[alsa] = "--with-default-audio=alsa,,alsa-lib"
+PACKAGECONFIG[esd] = ",,esound"
+PACKAGECONFIG[jack] = ",,jack"
+PACKAGECONFIG[openal] = ",,openal-soft"
+PACKAGECONFIG[portaudio] = ",,portaudio-v19"
+PACKAGECONFIG[pulseaudio] = "--with-default-audio=pulse,,pulseaudio"
+PACKAGECONFIG[sdl] = ",,libsdl"
+
+# Following are possible sound output modules:
+# alsa arts coreaudio dummy esd jack nas openal os2 oss portaudio pulse sdl sndio sun tinyalsa win32 win32_wasapi
+AUDIOMODS += "${@bb.utils.filter('PACKAGECONFIG', 'alsa esd jack openal portaudio sdl', d)}"
+AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'pulse', '', d)}"
+
+EXTRA_OECONF = " \
+ --enable-shared \
+ --with-audio='${AUDIOMODS}' \
+ ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \
+ ${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \
+"
+# Fails to build with thumb-1 (qemuarm)
+#| {standard input}: Assembler messages:
+#| {standard input}:47: Error: selected processor does not support Thumb mode `smull r5,r6,r7,r4'
+#| {standard input}:48: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r5,r5,lsr#24'
+#...
+#| make[3]: *** [equalizer.lo] Error 1
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.25.6.bb b/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.25.6.bb
deleted file mode 100644
index cb86199..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.25.6.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "Audio decoder for MPEG-1 Layer 1/2/3"
-DESCRIPTION = "The core of mpg123 is an MPEG-1 Layer 1/2/3 decoding library, which can be used by other programs. \
-mpg123 also comes with a command-line tool which can playback using ALSA, PulseAudio, OSS, and several other APIs, \
-and also can write the decoded audio to WAV."
-HOMEPAGE = "http://mpg123.de/"
-BUGTRACKER = "http://sourceforge.net/p/mpg123/bugs/"
-SECTION = "multimedia"
-
-LICENSE = "LGPLv2.1"
-LICENSE_FLAGS = "commercial"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1e86753638d3cf2512528b99079bc4f3"
-
-SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2"
-SRC_URI[md5sum] = "43336bef78f67c2e66c4f6c288ca1eb3"
-SRC_URI[sha256sum] = "0f0458c9b87799bc2c9bf9455279cc4d305e245db43b51a39ef27afe025c5a8e"
-
-inherit autotools pkgconfig
-
-# The options should be mutually exclusive for configuration script.
-# If both alsa and pulseaudio are specified (as in the default distro features)
-# pulseaudio takes precedence.
-PACKAGECONFIG_ALSA = "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}"
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '${PACKAGECONFIG_ALSA}', d)}"
-
-PACKAGECONFIG[alsa] = "--with-default-audio=alsa,,alsa-lib"
-PACKAGECONFIG[esd] = ",,esound"
-PACKAGECONFIG[jack] = ",,jack"
-PACKAGECONFIG[openal] = ",,openal-soft"
-PACKAGECONFIG[portaudio] = ",,portaudio-v19"
-PACKAGECONFIG[pulseaudio] = "--with-default-audio=pulse,,pulseaudio"
-PACKAGECONFIG[sdl] = ",,libsdl"
-
-# Following are possible sound output modules:
-# alsa arts coreaudio dummy esd jack nas openal os2 oss portaudio pulse sdl sndio sun tinyalsa win32 win32_wasapi
-AUDIOMODS += "${@bb.utils.filter('PACKAGECONFIG', 'alsa esd jack openal portaudio sdl', d)}"
-AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'pulse', '', d)}"
-
-EXTRA_OECONF = " \
- --enable-shared \
- --with-audio='${AUDIOMODS}' \
- ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \
- ${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \
-"
-# Fails to build with thumb-1 (qemuarm)
-#| {standard input}: Assembler messages:
-#| {standard input}:47: Error: selected processor does not support Thumb mode `smull r5,r6,r7,r4'
-#| {standard input}:48: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r5,r5,lsr#24'
-#...
-#| make[3]: *** [equalizer.lo] Error 1
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
index fdbf5ab..8189a56 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -160,7 +160,7 @@
}
USERADD_PACKAGES = "pulseaudio-server"
-GROUPADD_PARAM_pulseaudio-server = "pulse"
+GROUPADD_PARAM_pulseaudio-server = "--system pulse"
USERADD_PARAM_pulseaudio-server = "--system --home /var/run/pulse \
--no-create-home --shell /bin/false \
--groups audio,pulse --gid pulse pulse"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-memfd-wrappers-only-define-memfd_create-if-not-alrea.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-memfd-wrappers-only-define-memfd_create-if-not-alrea.patch
new file mode 100644
index 0000000..0391f37
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-memfd-wrappers-only-define-memfd_create-if-not-alrea.patch
@@ -0,0 +1,66 @@
+From 0cb66c0c5aafd48b63a755860746e70afb332c8d Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanuk@iki.fi>
+Date: Wed, 24 Jan 2018 03:51:49 +0200
+Subject: [PATCH] memfd-wrappers: only define memfd_create() if not already
+ defined
+
+glibc 2.27 is to be released soon, and it will provide memfd_create().
+If glibc provides the function, we must not define it ourselves,
+otherwise building fails due to conflict between the two implementations
+of the same function.
+
+BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=104733
+---
+Upstream-Status: Submitted [https://bugs.freedesktop.org/attachment.cgi?id=136927]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ configure.ac | 3 +++
+ src/pulsecore/memfd-wrappers.h | 7 ++++---
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 77b5ff5..3a71fd8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -607,6 +607,9 @@ AS_IF([test "x$enable_memfd" = "xyes" && test "x$HAVE_MEMFD" = "x0"],
+ [AC_MSG_ERROR([*** Your Linux kernel does not support memfd shared memory.
+ *** Use linux v3.17 or higher for such a feature.])])
+
++AS_IF([test "x$HAVE_MEMFD" = "x1"],
++ AC_CHECK_FUNCS([memfd_create]))
++
+ AC_SUBST(HAVE_MEMFD)
+ AM_CONDITIONAL([HAVE_MEMFD], [test "x$HAVE_MEMFD" = x1])
+ AS_IF([test "x$HAVE_MEMFD" = "x1"], AC_DEFINE([HAVE_MEMFD], 1, [Have memfd shared memory.]))
+diff --git a/src/pulsecore/memfd-wrappers.h b/src/pulsecore/memfd-wrappers.h
+index 3bed9b2..c7aadfd 100644
+--- a/src/pulsecore/memfd-wrappers.h
++++ b/src/pulsecore/memfd-wrappers.h
+@@ -20,13 +20,14 @@
+ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
+ ***/
+
+-#ifdef HAVE_MEMFD
++#if defined(HAVE_MEMFD) && !defined(HAVE_MEMFD_CREATE)
+
+ #include <sys/syscall.h>
+ #include <fcntl.h>
+
+ /*
+- * No glibc wrappers exist for memfd_create(2), so provide our own.
++ * Before glibc version 2.27 there was no wrapper for memfd_create(2),
++ * so we have to provide our own.
+ *
+ * Also define memfd fcntl sealing macros. While they are already
+ * defined in the kernel header file <linux/fcntl.h>, that file as
+@@ -63,6 +64,6 @@ static inline int memfd_create(const char *name, unsigned int flags) {
+ #define F_SEAL_WRITE 0x0008 /* prevent writes */
+ #endif
+
+-#endif /* HAVE_MEMFD */
++#endif /* HAVE_MEMFD && !HAVE_MEMFD_CREATE */
+
+ #endif
+--
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio-discuss-iochannel-don-t-use-variable-length-array-in-union.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio-discuss-iochannel-don-t-use-variable-length-array-in-union.patch
deleted file mode 100644
index 11b56ab..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio-discuss-iochannel-don-t-use-variable-length-array-in-union.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From patchwork Sat Feb 4 12:19:01 2017
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: [pulseaudio-discuss] iochannel: don't use variable length array in
- union
-From: Tanu Kaskinen <tanuk@iki.fi>
-X-Patchwork-Id: 136885
-Message-Id: <20170204121901.17428-1-tanuk@iki.fi>
-To: pulseaudio-discuss@lists.freedesktop.org
-Date: Sat, 4 Feb 2017 14:19:01 +0200
-
-Clang didn't like the variable length array:
-
-pulsecore/iochannel.c:358:17: error: fields must have a constant size:
-'variable length array in structure' extension will never be supported
- uint8_t data[CMSG_SPACE(sizeof(int) * nfd)];
- ^
-
-Commit 451d1d6762 introduced the variable length array in order to have
-the correct value in msg_controllen. This patch reverts that commit and
-uses a different way to achieve the same goal.
-
-BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=99458
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- src/pulsecore/iochannel.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/src/pulsecore/iochannel.c b/src/pulsecore/iochannel.c
-index 8ace297ff..897337522 100644
---- a/src/pulsecore/iochannel.c
-+++ b/src/pulsecore/iochannel.c
-@@ -355,7 +355,7 @@ ssize_t pa_iochannel_write_with_fds(pa_iochannel*io, const void*data, size_t l,
- struct iovec iov;
- union {
- struct cmsghdr hdr;
-- uint8_t data[CMSG_SPACE(sizeof(int) * nfd)];
-+ uint8_t data[CMSG_SPACE(sizeof(int) * MAX_ANCIL_DATA_FDS)];
- } cmsg;
-
- pa_assert(io);
-@@ -382,7 +382,13 @@ ssize_t pa_iochannel_write_with_fds(pa_iochannel*io, const void*data, size_t l,
- mh.msg_iov = &iov;
- mh.msg_iovlen = 1;
- mh.msg_control = &cmsg;
-- mh.msg_controllen = sizeof(cmsg);
-+
-+ /* If we followed the example on the cmsg man page, we'd use
-+ * sizeof(cmsg.data) here, but if nfd < MAX_ANCIL_DATA_FDS, then the data
-+ * buffer is larger than needed, and the kernel doesn't like it if we set
-+ * msg_controllen to a larger than necessary value. The commit message for
-+ * commit 451d1d6762 contains a longer explanation. */
-+ mh.msg_controllen = CMSG_SPACE(sizeof(int) * nfd);
-
- if ((r = sendmsg(io->ofd, &mh, MSG_NOSIGNAL)) >= 0) {
- io->writable = io->hungup = false;
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_10.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_10.0.bb
deleted file mode 100644
index 9a34afa..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_10.0.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require pulseaudio.inc
-
-SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
- file://0001-padsp-Make-it-compile-on-musl.patch \
- file://0001-client-conf-Add-allow-autospawn-for-root.patch \
- file://pulseaudio-discuss-iochannel-don-t-use-variable-length-array-in-union.patch \
- file://volatiles.04_pulse \
-"
-SRC_URI[md5sum] = "4950d2799bf55ab91f6b7f990b7f0971"
-SRC_URI[sha256sum] = "a3186824de9f0d2095ded5d0d0db0405dc73133983c2fbb37291547e37462f57"
-
-do_compile_prepend() {
- mkdir -p ${S}/libltdl
- cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl
-}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_11.1.bb b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_11.1.bb
new file mode 100644
index 0000000..245302d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_11.1.bb
@@ -0,0 +1,15 @@
+require pulseaudio.inc
+
+SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
+ file://0001-padsp-Make-it-compile-on-musl.patch \
+ file://0001-client-conf-Add-allow-autospawn-for-root.patch \
+ file://volatiles.04_pulse \
+ file://0001-memfd-wrappers-only-define-memfd_create-if-not-alrea.patch \
+ "
+SRC_URI[md5sum] = "390de38231d5cdd6b43ada8939eb74f1"
+SRC_URI[sha256sum] = "f2521c525a77166189e3cb9169f75c2ee2b82fa3fcf9476024fbc2c3a6c9cd9e"
+
+do_compile_prepend() {
+ mkdir -p ${S}/libltdl
+ cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl
+}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.6.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.6.0.bb
deleted file mode 100644
index bc565e9..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.6.0.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-SUMMARY = "WebP is an image format designed for the Web"
-DESCRIPTION = "WebP is a method of lossy and lossless compression that can be \
- used on a large variety of photographic, translucent and \
- graphical images found on the web. The degree of lossy \
- compression is adjustable so a user can choose the trade-off \
- between file size and image quality. WebP typically achieves \
- an average of 30% more compression than JPEG and JPEG 2000, \
- without loss of image quality."
-HOMEPAGE = "https://developers.google.com/speed/webp/"
-SECTION = "libs"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \
- file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7"
-
-SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz"
-SRC_URI[md5sum] = "19a6e926ab1721268df03161b84bb4a0"
-SRC_URI[sha256sum] = "c928119229d4f8f35e20113ffb61f281eda267634a8dc2285af4b0ee27cf2b40"
-
-UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html"
-
-EXTRA_OECONF = " \
- --disable-experimental \
- --disable-wic \
- --enable-libwebpmux \
- --enable-libwebpdemux \
- --enable-threading \
-"
-# Do not trust configure to determine if neon is available.
-#
-EXTRA_OECONF_append_arm = " \
- ${@bb.utils.contains("TUNE_FEATURES","neon","--enable-neon","--disable-neon",d)} \
-"
-
-inherit autotools lib_package
-
-PACKAGECONFIG ??= ""
-
-# libwebpdecoder is a subset of libwebp, don't build it unless requested
-PACKAGECONFIG[decoder] = "--enable-libwebpdecoder,--disable-libwebpdecoder"
-
-# Apply for examples programs: cwebp and dwebp
-PACKAGECONFIG[gif] = "--enable-gif,--disable-gif,giflib"
-PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
-PACKAGECONFIG[png] = "--enable-png,--disable-png,,libpng"
-PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
-
-# Apply only for example program vwebp
-PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,mesa-glut"
-
-PACKAGES =+ "${PN}-gif2webp"
-
-DESCRIPTION_${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP"
-FILES_${PN}-gif2webp = "${bindir}/gif2webp"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.6.1.bb b/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.6.1.bb
new file mode 100644
index 0000000..e9d4d78
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.6.1.bb
@@ -0,0 +1,54 @@
+SUMMARY = "WebP is an image format designed for the Web"
+DESCRIPTION = "WebP is a method of lossy and lossless compression that can be \
+ used on a large variety of photographic, translucent and \
+ graphical images found on the web. The degree of lossy \
+ compression is adjustable so a user can choose the trade-off \
+ between file size and image quality. WebP typically achieves \
+ an average of 30% more compression than JPEG and JPEG 2000, \
+ without loss of image quality."
+HOMEPAGE = "https://developers.google.com/speed/webp/"
+SECTION = "libs"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \
+ file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7"
+
+SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz"
+SRC_URI[md5sum] = "b49ce9c3e3e9acae4d91bca44bb85a72"
+SRC_URI[sha256sum] = "06503c782d9f151baa325591c3579c68ed700ffc62d4f5a32feead0ff017d8ab"
+
+UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html"
+
+EXTRA_OECONF = " \
+ --disable-experimental \
+ --disable-wic \
+ --enable-libwebpmux \
+ --enable-libwebpdemux \
+ --enable-threading \
+"
+# Do not trust configure to determine if neon is available.
+#
+EXTRA_OECONF_append_arm = " \
+ ${@bb.utils.contains("TUNE_FEATURES","neon","--enable-neon","--disable-neon",d)} \
+"
+
+inherit autotools lib_package
+
+PACKAGECONFIG ??= ""
+
+# libwebpdecoder is a subset of libwebp, don't build it unless requested
+PACKAGECONFIG[decoder] = "--enable-libwebpdecoder,--disable-libwebpdecoder"
+
+# Apply for examples programs: cwebp and dwebp
+PACKAGECONFIG[gif] = "--enable-gif,--disable-gif,giflib"
+PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
+PACKAGECONFIG[png] = "--enable-png,--disable-png,,libpng"
+PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
+
+# Apply only for example program vwebp
+PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,mesa-glut"
+
+PACKAGES =+ "${PN}-gif2webp"
+
+DESCRIPTION_${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP"
+FILES_${PN}-gif2webp = "${bindir}/gif2webp"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch b/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
index 73f2aac..065e3b3 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
@@ -1,20 +1,33 @@
--march flag is not in CFLAGS so this will always default to -mcpu=cortex-a8
--mfpu=neon.
+From a72bf499a0674fc75eedf15008b424e28f67e4bd Mon Sep 17 00:00:00 2001
+From: Andrei Gherzan <andrei@gherzan.ro>
+Date: Fri, 2 Feb 2018 15:10:08 +0200
+Subject: [PATCH] dont default to cortex-a9 with neon
+
+-march flag is not in CFLAGS so this will always default to
+ -mcpu=cortex-a8 -mfpu=neon.
Upstream-Status: Pending
+
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ configure | 3 ---
+ 1 file changed, 3 deletions(-)
diff --git a/configure b/configure
-index 9d1586c..3109ec4 100755
+index 0e3ef23..955b993 100755
--- a/configure
+++ b/configure
-@@ -874,9 +874,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
+@@ -911,9 +911,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
fi
if [ $asm = auto -a $ARCH = ARM ] ; then
- # set flags so neon is built by default
-- echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon"
+- [ $compiler == CL ] || echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon"
-
- if cc_check '' '' '__asm__("rev ip, ip");' ; then define HAVE_ARMV6
- cc_check '' '' '__asm__("movt r0, #0");' && define HAVE_ARMV6T2
- cc_check '' '' '__asm__("vadd.i16 q0, q0, q0");' && define HAVE_NEON
+ cc_check '' '' '__asm__("add r0, r1, r2");' && define HAVE_ARM_INLINE_ASM
+ if [ $compiler = CL ] && cpp_check '' '' 'defined(_M_ARM) && _M_ARM >= 7' ; then
+ define HAVE_ARMV6
+--
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb
index c5476c7..c445d15 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb
@@ -6,17 +6,17 @@
LICENSE_FLAGS = "commercial"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-DEPENDS = "yasm-native"
+DEPENDS = "nasm-native"
SRC_URI = "git://github.com/mirror/x264;branch=stable \
file://don-t-default-to-cortex-a9-with-neon.patch \
file://Fix-X32-build-by-disabling-asm.patch \
"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
-SRCREV = "2b741f81e51f92d053d87a49f59ff1026553a0f6"
+SRCREV = "e9a5903edf8ca59ef20e6f4894c196f135af735e"
-PV = "r2731+git${SRCPV}"
+PV = "r2854+git${SRCPV}"
S = "${WORKDIR}/git"
@@ -43,6 +43,8 @@
'
do_configure() {
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
./configure ${EXTRA_OECONF}
}
diff --git a/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt-sdk.bb b/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt-sdk.bb
index 7c1e5bf..0f7f091 100644
--- a/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt-sdk.bb
+++ b/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt-sdk.bb
@@ -5,7 +5,7 @@
# to build multiple virtual/kernel providers.
python () {
if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
- raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+ raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}
DESCRIPTION = "Small image capable of booting a device with a test suite and \
diff --git a/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt.bb b/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt.bb
index d8bb04a..9cb93b3 100644
--- a/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt.bb
+++ b/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt.bb
@@ -5,7 +5,7 @@
# to build multiple virtual/kernel providers.
python () {
if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
- raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+ raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}
DESCRIPTION = "A small image just capable of allowing a device to boot plus a \
diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_1.1.bb b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_1.1.bb
index 012b2dd..5f61c4e 100644
--- a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_1.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_1.1.bb
@@ -22,5 +22,5 @@
}
FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/dist-packages/hwlatdetect.py"
-RDEPENDS_${PN} = "python3 python3-subprocess python3-textutils"
+RDEPENDS_${PN} = "python3-core "
RRECOMMENDS_${PN} = "kernel-module-hwlat-detector"
diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_1.1.bb b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_1.1.bb
index 4336c50..496f04f 100644
--- a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_1.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_1.1.bb
@@ -26,6 +26,6 @@
cp ${WORKDIR}/rt_bmark.py ${D}${PTEST_PATH}
}
-RDEPENDS_${PN}-ptest += " stress python3 python3-subprocess python3-multiprocessing python3-datetime python3-re python3-lang python3-misc"
+RDEPENDS_${PN}-ptest += " stress python3 python3-multiprocessing python3-datetime python3-misc"
FILES_${PN} += "${prefix}/src/backfire"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb b/import-layers/yocto-poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
index 97cced7..224428d 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
+++ b/import-layers/yocto-poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
@@ -46,7 +46,7 @@
SUMMARY_${PN}-apps = "Sato desktop - applications"
RDEPENDS_${PN}-apps = "\
l3afpad \
- gst-player \
+ gst-examples \
matchbox-terminal \
sato-screenshot \
${FILEMANAGER} \
diff --git a/import-layers/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.5.bb b/import-layers/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.5.bb
index 75ff773..4127a07 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.5.bb
@@ -9,9 +9,6 @@
SECTION = "x11"
DEPENDS = "gtk+3 startup-notification libfm intltool-native gettext-native glib-2.0-native"
-
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|aarch64.*|arm.*|mips.*|powerpc.*|sh.*)-(linux|freebsd.*)'
-
SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/pcmanfm-${PV}.tar.xz \
file://gnome-fs-directory.png \
file://gnome-fs-regular.png \
diff --git a/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-Clarify-conditions-to-avoid-compiler-errors.patch b/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-Clarify-conditions-to-avoid-compiler-errors.patch
deleted file mode 100644
index 89aa158..0000000
--- a/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-Clarify-conditions-to-avoid-compiler-errors.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 72f2e9043ef509992dfa61791638db87bf0ae37b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 6 Dec 2016 01:20:00 +0000
-Subject: [PATCH] Clarify conditions to avoid compiler errors
-
-Fix errors pointed out by clang
-
-error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses]
-| if (only_immutable && !copy->flags[i] & FLAG_IMMUTABLE) continue;
-| ^
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- signpost.c | 2 +-
- tracks.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/signpost.c b/signpost.c
-index aa2e13a..2e2dff2 100644
---- a/signpost.c
-+++ b/signpost.c
-@@ -284,7 +284,7 @@ static int check_nums(game_state *orig, game_state *copy, int only_immutable)
- int i, ret = 1;
- assert(copy->n == orig->n);
- for (i = 0; i < copy->n; i++) {
-- if (only_immutable && !copy->flags[i] & FLAG_IMMUTABLE) continue;
-+ if (only_immutable && !(copy->flags[i] & FLAG_IMMUTABLE)) continue;
- assert(copy->nums[i] >= 0);
- assert(copy->nums[i] <= copy->n);
- if (copy->nums[i] != orig->nums[i]) {
-diff --git a/tracks.c b/tracks.c
-index 5b27350..ca44ce1 100644
---- a/tracks.c
-+++ b/tracks.c
-@@ -1072,7 +1072,7 @@ static int solve_check_single_sub(game_state *state, int si, int id, int n,
- x = i%w;
- y = i/w;
- if (abs(ox-x) > 1 || abs(oy-y) > 1) {
-- if (!state->sflags[i] & S_TRACK)
-+ if (!(state->sflags[i] & S_TRACK))
- did += solve_set_sflag(state, x, y, S_NOTRACK, what);
- }
- }
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb b/import-layers/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb
index decd2a8..bfd8177 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb
@@ -7,18 +7,17 @@
REQUIRED_DISTRO_FEATURES = "x11"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENCE;md5=33bcd4bce8f3c197f2aefbdbd2d299bc"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=da6110d4ed1225a287eab2bf0ac0193b"
SRC_URI = "git://git.tartarus.org/simon/puzzles.git \
file://fix-compiling-failure-with-option-g-O.patch \
file://0001-Use-labs-instead-of-abs.patch \
file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \
- file://0001-Clarify-conditions-to-avoid-compiler-errors.patch \
file://0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch \
"
-UPSTREAM_VERSION_UNKNOWN = "1"
-SRCREV = "8dfe5cec31e784e4ece2955ecc8cc35ee7e8fbb3"
-PE = "1"
+UPSTREAM_CHECK_COMMITS = "1"
+SRCREV = "2adf0052d66eae88c7a5e55e67fe16e13f7018b5"
+PE = "2"
PV = "0.0+git${SRCPV}"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc b/import-layers/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
index 4d5daa6..b568f04 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
+++ b/import-layers/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
@@ -12,7 +12,7 @@
file://rxvt.desktop \
file://rxvt.png"
-inherit autotools update-alternatives
+inherit autotools pkgconfig update-alternatives
PROVIDES = "virtual/x-terminal-emulator"
ALTERNATIVE_${PN} = "x-terminal-emulator"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb b/import-layers/yocto-poky/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb
index ceaecca..bb6b69b 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb
@@ -10,7 +10,7 @@
# SRCREV tagged 0.0.2
SRCREV = "b2e5da502f8c5ff75e9e6da771372ef8e40fd9a2"
SRC_URI = "git://git.yoctoproject.org/xsettings-daemon \
- file://addsoundkeys.patch;apply=yes \
+ file://addsoundkeys.patch \
file://70settings-daemon.sh \
"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Fix-gles3-header-when-gles2-is-enabled.patch b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Fix-gles3-header-when-gles2-is-enabled.patch
new file mode 100644
index 0000000..2157407
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Fix-gles3-header-when-gles2-is-enabled.patch
@@ -0,0 +1,38 @@
+From adf3d4c9d4133bd6995590d921c0ccaec5254da9 Mon Sep 17 00:00:00 2001
+From: Bhargava Sreekantappa Gayathri
+ <bhargava.sreekantappa-gayathri@xilinx.com>
+Date: Tue, 27 Feb 2018 16:09:31 -0800
+Subject: [PATCH] Fix gles3 header when gles2 is enabled
+
+A GLES 2 application should not use gl3.h.
+Fix the gles3 header failure while compiling webkitgtk.
+
+FAILED:
+Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/GLContext.cpp.o
+ ^~~~~~~~~~~~~
+compilation terminated.
+
+Upstream-Status: Backport
+Imported patch from: https://bugs.webkit.org/show_bug.cgi?id=183008
+
+Signed-off-by: Bhargava Sreekantappa Gayathri <bhargava.sreekantappa-gayathri@xilinx.com>
+Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
+---
+ Source/WebCore/platform/graphics/GLContext.cpp | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Source/WebCore/platform/graphics/GLContext.cpp b/Source/WebCore/platform/graphics/GLContext.cpp
+index 599dcc0..46d2fd4 100644
+--- a/Source/WebCore/platform/graphics/GLContext.cpp
++++ b/Source/WebCore/platform/graphics/GLContext.cpp
+@@ -31,7 +31,6 @@
+ #elif USE(OPENGL_ES_2)
+ #define GL_GLEXT_PROTOTYPES 1
+ #include <GLES2/gl2.h>
+-#include <GLES3/gl3.h>
+ #endif
+
+ #if USE(GLX)
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch
index dfdc116..9fc1421 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch
+++ b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch
@@ -16,6 +16,7 @@
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
---
Source/JavaScriptCore/shell/CMakeLists.txt | 2 +-
Source/WebCore/PlatformGTK.cmake | 6 +++---
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.18.6.bb b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.18.6.bb
index 9fac044..c29fa7f 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.18.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.18.6.bb
@@ -21,6 +21,7 @@
file://0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch \
file://0001-Fix-build-with-musl.patch \
file://fix-configure-failure-aarch64.patch \
+ file://0001-Fix-gles3-header-when-gles2-is-enabled.patch \
"
SRC_URI[md5sum] = "c1a548595135ee75ad3bf2e18ac83112"
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr-util_1.6.0.bb b/import-layers/yocto-poky/meta/recipes-support/apr/apr-util_1.6.0.bb
deleted file mode 100644
index 748d196..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr-util_1.6.0.bb
+++ /dev/null
@@ -1,95 +0,0 @@
-SUMMARY = "Apache Portable Runtime (APR) companion library"
-HOMEPAGE = "http://apr.apache.org/"
-SECTION = "libs"
-DEPENDS = "apr expat gdbm"
-
-BBCLASSEXTEND = "native nativesdk"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=158aa0b1efe0c12f23d4b007ddb9a5db \
- file://include/apu_version.h;endline=17;md5=806685a84e71f10c80144c48eb35df42"
-
-SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \
- file://configfix.patch \
- file://configure_fixes.patch \
- file://run-ptest \
-"
-
-SRC_URI[md5sum] = "3b03dbff60728a4f4c33f5d929e8b35a"
-SRC_URI[sha256sum] = "483ef4d59e6ac9a36c7d3fd87ad7b9db7ad8ae29c06b9dd8ff22dda1cc416389"
-
-EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
- --without-odbc \
- --without-pgsql \
- --with-dbm=gdbm \
- --with-gdbm=${STAGING_DIR_HOST}${prefix} \
- --without-sqlite2 \
- --with-expat=${STAGING_DIR_HOST}${prefix}"
-
-
-inherit autotools lib_package binconfig
-
-PR = "r1"
-
-OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
-
-do_configure_append() {
- if [ "${CLASSOVERRIDE}" = "class-target" ]; then
- cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk
- fi
-}
-do_configure_prepend_class-native() {
- mkdir ${B}/build
- cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${B}/build/rules.mk
-}
-do_configure_append_class-native() {
- sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
- # sometimes there isn't SHELL
- sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
-}
-
-do_configure_prepend_class-nativesdk() {
- cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk
-}
-
-do_configure_append_class-nativesdk() {
- sed -i "s#\(apr_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
- sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
- sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
- sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${B}/build/rules.mk
-}
-
-do_install_append_class-target() {
- sed -i -e 's,${STAGING_DIR_HOST},,g' \
- -e 's,APU_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
- -e 's,APU_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apu-1-config
-}
-
-PACKAGECONFIG ??= "crypto"
-PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
-PACKAGECONFIG[crypto] = "--with-openssl=${STAGING_DIR_HOST}${prefix} --with-crypto,--without-crypto,openssl"
-PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_DIR_HOST}${prefix},--without-sqlite3,sqlite3"
-
-#files ${libdir}/apr-util-1/*.so are not symlinks but loadable modules thus they are packaged in ${PN}
-FILES_${PN} += "${libdir}/apr-util-1/apr*${SOLIBS} ${libdir}/apr-util-1/apr*${SOLIBSDEV}"
-FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/*.la"
-FILES_${PN}-staticdev += "${libdir}/apr-util-1/*.a"
-
-INSANE_SKIP_${PN} += "dev-so"
-
-inherit ptest
-
-RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-iso8859-1 glibc-gconv-iso8859-2 glibc-gconv-utf-7"
-
-do_compile_ptest() {
- cd ${B}/test
- oe_runmake
-}
-
-do_install_ptest() {
- t=${D}${PTEST_PATH}/test
- mkdir $t
- for i in testall data; do \
- cp -r ${B}/test/$i $t; \
- done
-}
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr-util_1.6.1.bb b/import-layers/yocto-poky/meta/recipes-support/apr/apr-util_1.6.1.bb
new file mode 100644
index 0000000..88b4300
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr-util_1.6.1.bb
@@ -0,0 +1,93 @@
+SUMMARY = "Apache Portable Runtime (APR) companion library"
+HOMEPAGE = "http://apr.apache.org/"
+SECTION = "libs"
+DEPENDS = "apr expat gdbm"
+
+BBCLASSEXTEND = "native nativesdk"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=158aa0b1efe0c12f23d4b007ddb9a5db \
+ file://include/apu_version.h;endline=17;md5=806685a84e71f10c80144c48eb35df42"
+
+SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \
+ file://configfix.patch \
+ file://configure_fixes.patch \
+ file://run-ptest \
+"
+
+SRC_URI[md5sum] = "bd502b9a8670a8012c4d90c31a84955f"
+SRC_URI[sha256sum] = "b65e40713da57d004123b6319828be7f1273fbc6490e145874ee1177e112c459"
+
+EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
+ --without-odbc \
+ --without-pgsql \
+ --with-dbm=gdbm \
+ --with-gdbm=${STAGING_DIR_HOST}${prefix} \
+ --without-sqlite2 \
+ --with-expat=${STAGING_DIR_HOST}${prefix}"
+
+
+inherit autotools lib_package binconfig
+
+OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
+
+do_configure_append() {
+ if [ "${CLASSOVERRIDE}" = "class-target" ]; then
+ cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk
+ fi
+}
+do_configure_prepend_class-native() {
+ mkdir ${B}/build
+ cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${B}/build/rules.mk
+}
+do_configure_append_class-native() {
+ sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
+ # sometimes there isn't SHELL
+ sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
+}
+
+do_configure_prepend_class-nativesdk() {
+ cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk
+}
+
+do_configure_append_class-nativesdk() {
+ sed -i "s#\(apr_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
+ sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
+ sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
+ sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${B}/build/rules.mk
+}
+
+do_install_append_class-target() {
+ sed -i -e 's,${STAGING_DIR_HOST},,g' \
+ -e 's,APU_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
+ -e 's,APU_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apu-1-config
+}
+
+PACKAGECONFIG ??= "crypto"
+PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
+PACKAGECONFIG[crypto] = "--with-openssl=${STAGING_DIR_HOST}${prefix} --with-crypto,--without-crypto,openssl"
+PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_DIR_HOST}${prefix},--without-sqlite3,sqlite3"
+
+#files ${libdir}/apr-util-1/*.so are not symlinks but loadable modules thus they are packaged in ${PN}
+FILES_${PN} += "${libdir}/apr-util-1/apr*${SOLIBS} ${libdir}/apr-util-1/apr*${SOLIBSDEV}"
+FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/*.la"
+FILES_${PN}-staticdev += "${libdir}/apr-util-1/*.a"
+
+INSANE_SKIP_${PN} += "dev-so"
+
+inherit ptest
+
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-iso8859-1 glibc-gconv-iso8859-2 glibc-gconv-utf-7"
+
+do_compile_ptest() {
+ cd ${B}/test
+ oe_runmake
+}
+
+do_install_ptest() {
+ t=${D}${PTEST_PATH}/test
+ mkdir $t
+ for i in testall data; do \
+ cp -r ${B}/test/$i $t; \
+ done
+}
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0001-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0001-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
deleted file mode 100644
index c5e92ac..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0001-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From f26e8b88d2c90ed7eb9d4e276412b0923c23d10f Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Wed, 14 Dec 2016 18:13:08 +0800
-Subject: [PATCH] apr: fix off_t size doesn't match in glibc when cross
- compiling
-
-In configure.in, it contains the following:
-
- APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
-
-the macro "APR_CHECK_SIZEOF_EXTENDED" was defined in build/apr_common.m4,
-it use the "AC_TRY_RUN" macro, this macro let the off_t to 8, when cross
-compiling enable.
-
-So it was hardcoded for cross compiling, we should detect it dynamic based on
-the sysroot's glibc. We change it to the following:
-
- AC_CHECK_SIZEOF(off_t)
-
-The same for the following hardcoded types for cross compiling:
-
- pid_t 8
- ssize_t 8
- size_t 8
- off_t 8
-
-Change the above correspondingly.
-
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
-
-Upstream-Status: Pending
----
- configure.in | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 9d57ae6..5b19940 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1681,7 +1681,7 @@ else
- socklen_t_value="int"
- fi
-
--APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], pid_t, 8)
-+AC_CHECK_SIZEOF(pid_t)
-
- if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then
- pid_t_fmt='#define APR_PID_T_FMT "hd"'
-@@ -1750,7 +1750,7 @@ APR_CHECK_TYPES_COMPATIBLE(ssize_t, long, [ssize_t_fmt="ld"])
- APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned int, [size_t_fmt="u"])
- APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned long, [size_t_fmt="lu"])
-
--APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
-+AC_CHECK_SIZEOF(ssize_t)
-
- AC_MSG_CHECKING([which format to use for apr_ssize_t])
- if test -n "$ssize_t_fmt"; then
-@@ -1767,7 +1767,7 @@ fi
-
- ssize_t_fmt="#define APR_SSIZE_T_FMT \"$ssize_t_fmt\""
-
--APR_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8)
-+AC_CHECK_SIZEOF(size_t)
-
- AC_MSG_CHECKING([which format to use for apr_size_t])
- if test -n "$size_t_fmt"; then
-@@ -1784,7 +1784,7 @@ fi
-
- size_t_fmt="#define APR_SIZE_T_FMT \"$size_t_fmt\""
-
--APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
-+AC_CHECK_SIZEOF(off_t)
-
- if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then
- # Enable LFS
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0001-build-buildcheck.sh-improve-libtool-detection.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0001-build-buildcheck.sh-improve-libtool-detection.patch
new file mode 100644
index 0000000..097c195
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0001-build-buildcheck.sh-improve-libtool-detection.patch
@@ -0,0 +1,32 @@
+From 4efdc06fb17b8a00a9eca923caa176be741d1e04 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 1 Feb 2018 14:56:13 +0800
+Subject: [PATCH 1/7] build/buildcheck.sh: improve libtool detection
+
+Support customize libtool by variable assigning, it is helpful
+for cross compileing (such as libtool=aarch64-linux-libtool)
+
+Upstream-Status: Submitted [https://github.com/apache/apr/pull/8]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ build/buildcheck.sh | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/build/buildcheck.sh b/build/buildcheck.sh
+index ab5df44..f191a41 100755
+--- a/build/buildcheck.sh
++++ b/build/buildcheck.sh
+@@ -40,7 +40,9 @@ fi
+ # output is multiline from 1.5 onwards
+
+ # Require libtool 1.4 or newer
+-libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14`
++if test -z "$libtool"; then
++ libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14`
++fi
+ lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
+ if test -z "$lt_pversion"; then
+ echo "buildconf: libtool not found."
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch
new file mode 100644
index 0000000..72e706f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch
@@ -0,0 +1,74 @@
+From 5925b20da8bbc34d9bf5a5dca123ef38864d43c6 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 30 Jan 2018 09:39:06 +0800
+Subject: [PATCH 2/7] apr: Remove workdir path references from installed apr
+ files
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+The generated `apr-1-config' is used by other recipes at build time or
+packages at target run time, the workdir path caused confusion.
+
+Rebase to 1.6.3
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ apr-config.in | 26 ++------------------------
+ 1 file changed, 2 insertions(+), 24 deletions(-)
+
+diff --git a/apr-config.in b/apr-config.in
+index 84b4073..bbbf651 100644
+--- a/apr-config.in
++++ b/apr-config.in
+@@ -152,14 +152,7 @@ while test $# -gt 0; do
+ flags="$flags $LDFLAGS"
+ ;;
+ --includes)
+- if test "$location" = "installed"; then
+ flags="$flags -I$includedir $EXTRA_INCLUDES"
+- elif test "$location" = "source"; then
+- flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
+- else
+- # this is for VPATH builds
+- flags="$flags -I$APR_BUILD_DIR/include -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
+- fi
+ ;;
+ --srcdir)
+ echo $APR_SOURCE_DIR
+@@ -181,29 +174,14 @@ while test $# -gt 0; do
+ exit 0
+ ;;
+ --link-ld)
+- if test "$location" = "installed"; then
+- ### avoid using -L if libdir is a "standard" location like /usr/lib
+- flags="$flags -L$libdir -l${APR_LIBNAME}"
+- else
+- ### this surely can't work since the library is in .libs?
+- flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}"
+- fi
++ flags="$flags -l${APR_LIBNAME}"
+ ;;
+ --link-libtool)
+ # If the LA_FILE exists where we think it should be, use it. If we're
+ # installed and the LA_FILE does not exist, assume to use -L/-l
+ # (the LA_FILE may not have been installed). If we're building ourselves,
+ # we'll assume that at some point the .la file be created.
+- if test -f "$LA_FILE"; then
+- flags="$flags $LA_FILE"
+- elif test "$location" = "installed"; then
+- ### avoid using -L if libdir is a "standard" location like /usr/lib
+- # Since the user is specifying they are linking with libtool, we
+- # *know* that -R will be recognized by libtool.
+- flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}"
+- else
+- flags="$flags $LA_FILE"
+- fi
++ flags="$flags -l${APR_LIBNAME}"
+ ;;
+ --shlib-path-var)
+ echo "$SHLIBPATH_VAR"
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0002-explicitly-link-libapr-against-phtread-to-make-gold-.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0002-explicitly-link-libapr-against-phtread-to-make-gold-.patch
deleted file mode 100644
index 7d0dddc..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0002-explicitly-link-libapr-against-phtread-to-make-gold-.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 94d1ca0266a0f9c0446f1299b54f752e87b8a695 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Fri, 3 Mar 2017 22:24:17 +0100
-Subject: [PATCH] explicitly link libapr against phtread to make gold happy on
- test
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_init'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_settype'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_destroy'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutex_trylock'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_attr_setstacksize'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_create'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_join'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_detach'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_sigmask'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_once'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_key_create'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_getspecific'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_key_delete'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_setspecific'
-| collect2: error: ld returned 1 exit status
-| Makefile:114: recipe for target 'globalmutexchild' failed
-| make[1]: *** [globalmutexchild] Error 1
-| make[1]: Leaving directory '/home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-angstrom-linux-gnueabi/apr/1.5.2-r0/apr-1.5.2/test'
-
-Upstream-Status: Pending
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- configure.in | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/configure.in b/configure.in
-index 5b19940..cdf4d58 100644
---- a/configure.in
-+++ b/configure.in
-@@ -766,6 +766,7 @@ else
- APR_PTHREADS_CHECK_RESTORE ] )
- fi
- if test "$pthreadh" = "1"; then
-+ APR_ADDTO(LIBS,[-lpthread])
- APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS
- APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG
- APR_CHECK_PTHREAD_RECURSIVE_MUTEX
---
-2.9.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch
new file mode 100644
index 0000000..4dd53bd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch
@@ -0,0 +1,63 @@
+From d5028c10f156c224475b340cfb1ba025d6797243 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 2 Feb 2018 15:51:42 +0800
+Subject: [PATCH 3/7] Makefile.in/configure.in: support cross compiling
+
+While cross compiling, the tools/gen_test_char could not
+be executed at build time, use AX_PROG_CC_FOR_BUILD to
+build native tools/gen_test_char
+
+Upstream-Status: Submitted [https://github.com/apache/apr/pull/8]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile.in | 10 +++-------
+ configure.in | 3 +++
+ 2 files changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 5fb760e..8675f90 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -46,7 +46,7 @@ LT_VERSION = @LT_VERSION@
+
+ CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \
+ build/apr_rules.out tools/gen_test_char@EXEEXT@ \
+- tools/gen_test_char.o tools/gen_test_char.lo \
++ tools/gen_test_char.o \
+ include/private/apr_escape_test_char.h
+ DISTCLEAN_TARGETS = config.cache config.log config.status \
+ include/apr.h include/arch/unix/apr_private.h \
+@@ -131,13 +131,9 @@ check: $(TARGET_LIB)
+ etags:
+ etags `find . -name '*.[ch]'`
+
+-OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
+-tools/gen_test_char.lo: tools/gen_test_char.c
++tools/gen_test_char@EXEEXT@: tools/gen_test_char.c
+ $(APR_MKDIR) tools
+- $(LT_COMPILE)
+-
+-tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
+- $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@
+
+ include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
+ $(APR_MKDIR) include/private
+diff --git a/configure.in b/configure.in
+index 719f331..361120f 100644
+--- a/configure.in
++++ b/configure.in
+@@ -183,6 +183,9 @@ dnl can only be used once within a configure script, so this prevents a
+ dnl preload section from invoking the macro to get compiler info.
+ AC_PROG_CC
+
++dnl Check build CC for gen_test_char compiling which is executed at build time.
++AX_PROG_CC_FOR_BUILD
++
+ dnl AC_PROG_SED is only avaliable in recent autoconf versions.
+ dnl Use AC_CHECK_PROG instead if AC_PROG_SED is not present.
+ ifdef([AC_PROG_SED],
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch
new file mode 100644
index 0000000..30fc07d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch
@@ -0,0 +1,39 @@
+From 7925eb1766a00ccee05c6e80b1d34f163a04b7b1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 30 Jan 2018 09:43:34 +0800
+Subject: [PATCH 4/7] Fix packet discards HTTP redirect.
+
+Disconnect the connection by poll() timeout.
+If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then
+apr_socket_recv() returns EAGAIN.
+
+Upstream-Status: Pending
+
+Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp>
+Signed-off-by: Li Wang <li.wang@windriver.com>
+
+Rebase to 1.6.3
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ network_io/unix/sendrecv.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c
+index 4c0e0a6..1bdafba 100644
+--- a/network_io/unix/sendrecv.c
++++ b/network_io/unix/sendrecv.c
+@@ -85,6 +85,10 @@ apr_status_t apr_socket_recv(apr_socket_t *sock, char *buf, apr_size_t *len)
+ && (sock->timeout > 0)) {
+ do_select:
+ arv = apr_wait_for_io_or_timeout(NULL, sock, 1);
++ if ((arv == APR_TIMEUP) && (sock->timeout == 0)) {
++ *len = 0;
++ return EAGAIN;
++ }
+ if (arv != APR_SUCCESS) {
+ *len = 0;
+ return arv;
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
new file mode 100644
index 0000000..02634e6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
@@ -0,0 +1,36 @@
+From 2e66cece0c3adff92733332111204ddc1d730a07 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 19 Nov 2015 18:25:38 -0800
+Subject: [PATCH 5/7] configure.in: fix LTFLAGS to make it work with ccache
+
+When ccache is enabled, libtool requires --tag=CC when use ccache,
+otherwise when building apr-util with ccache enabled:
+
+| libtool: compile: unable to infer tagged configuration
+| libtool: error: specify a tag with '--tag'
+| libtool: compile: unable to infer tagged configuration
+| make[1]: *** [buckets/apr_buckets.lo] Error 1
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 361120f..3b10422 100644
+--- a/configure.in
++++ b/configure.in
+@@ -249,7 +249,7 @@ case $host in
+ ;;
+ *)
+ if test "x$LTFLAGS" = "x"; then
+- LTFLAGS='--silent'
++ LTFLAGS='--silent --tag=CC'
+ fi
+ if test "$experimental_libtool" = "yes"; then
+ # Use a custom-made libtool replacement
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
new file mode 100644
index 0000000..5f5e7ea
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
@@ -0,0 +1,78 @@
+From f4d6e45ed5d2ccffd1af4c2ccdf7099ba0dce137 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Wed, 14 Dec 2016 18:13:08 +0800
+Subject: [PATCH 6/7] apr: fix off_t size doesn't match in glibc when cross
+ compiling
+
+In configure.in, it contains the following:
+
+ APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
+
+the macro "APR_CHECK_SIZEOF_EXTENDED" was defined in build/apr_common.m4,
+it use the "AC_TRY_RUN" macro, this macro let the off_t to 8, when cross
+compiling enable.
+
+So it was hardcoded for cross compiling, we should detect it dynamic based on
+the sysroot's glibc. We change it to the following:
+
+ AC_CHECK_SIZEOF(off_t)
+
+The same for the following hardcoded types for cross compiling:
+
+ pid_t 8
+ ssize_t 8
+ size_t 8
+ off_t 8
+
+Change the above correspondingly.
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+
+Upstream-Status: Pending
+---
+ configure.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 3b10422..a227e72 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1769,7 +1769,7 @@ else
+ socklen_t_value="int"
+ fi
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], pid_t, 8)
++AC_CHECK_SIZEOF(pid_t)
+
+ if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then
+ pid_t_fmt='#define APR_PID_T_FMT "hd"'
+@@ -1838,7 +1838,7 @@ APR_CHECK_TYPES_COMPATIBLE(ssize_t, long, [ssize_t_fmt="ld"])
+ APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned int, [size_t_fmt="u"])
+ APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned long, [size_t_fmt="lu"])
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
++AC_CHECK_SIZEOF(ssize_t)
+
+ AC_MSG_CHECKING([which format to use for apr_ssize_t])
+ if test -n "$ssize_t_fmt"; then
+@@ -1855,7 +1855,7 @@ fi
+
+ ssize_t_fmt="#define APR_SSIZE_T_FMT \"$ssize_t_fmt\""
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8)
++AC_CHECK_SIZEOF(size_t)
+
+ AC_MSG_CHECKING([which format to use for apr_size_t])
+ if test -n "$size_t_fmt"; then
+@@ -1872,7 +1872,7 @@ fi
+
+ size_t_fmt="#define APR_SIZE_T_FMT \"$size_t_fmt\""
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
++AC_CHECK_SIZEOF(off_t)
+
+ if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then
+ # Enable LFS
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch
new file mode 100644
index 0000000..8760b01
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch
@@ -0,0 +1,50 @@
+From c6afc4a4a766478cb6aa6b43a50051881b6318d7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Fri, 3 Mar 2017 22:24:17 +0100
+Subject: [PATCH 7/7] explicitly link libapr against phtread to make gold happy
+ on test
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_init'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_settype'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_destroy'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutex_trylock'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_attr_setstacksize'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_create'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_join'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_detach'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_sigmask'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_once'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_key_create'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_getspecific'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_key_delete'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_setspecific'
+| collect2: error: ld returned 1 exit status
+| Makefile:114: recipe for target 'globalmutexchild' failed
+| make[1]: *** [globalmutexchild] Error 1
+| make[1]: Leaving directory '/home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-angstrom-linux-gnueabi/apr/1.5.2-r0/apr-1.5.2/test'
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ configure.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.in b/configure.in
+index a227e72..cbc0f90 100644
+--- a/configure.in
++++ b/configure.in
+@@ -784,6 +784,7 @@ else
+ APR_PTHREADS_CHECK_RESTORE ] )
+ fi
+ if test "$pthreadh" = "1"; then
++ APR_ADDTO(LIBS,[-lpthread])
+ APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS
+ APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG
+ APR_CHECK_PTHREAD_RECURSIVE_MUTEX
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
deleted file mode 100644
index 6805b8b..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Fix packet discards HTTP redirect.
-
-Disconnect the connection by poll() timeout.
-If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then
-apr_socket_recv() returns EAGAIN.
-
-Upstream-Status: Pending
-
-Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp>
-Signed-off-by: Li Wang <li.wang@windriver.com>
----
- network_io/unix/sendrecv.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c
-index c133a26..e8faf15 100644
---- a/network_io/unix/sendrecv.c
-+++ b/network_io/unix/sendrecv.c
-@@ -85,6 +85,10 @@ apr_status_t apr_socket_recv(apr_socket_t *sock, char *buf, apr_size_t *len)
- && (sock->timeout > 0)) {
- do_select:
- arv = apr_wait_for_io_or_timeout(NULL, sock, 1);
-+ if ((arv == APR_TIMEUP) && (sock->timeout == 0)) {
-+ *len = 0;
-+ return EAGAIN;
-+ }
- if (arv != APR_SUCCESS) {
- *len = 0;
- return arv;
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/cleanup.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/cleanup.patch
deleted file mode 100644
index b6784e0..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr/cleanup.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: apr-1.4.2/build/buildcheck.sh
-===================================================================
---- apr-1.4.2.orig/build/buildcheck.sh 2009-11-13 08:27:16.000000000 +0800
-+++ apr-1.4.2/build/buildcheck.sh 2010-11-26 15:44:00.000000000 +0800
-@@ -32,35 +32,4 @@
- echo "buildconf: autoconf version $ac_version (ok)"
- fi
-
--# Sample libtool --version outputs:
--# ltmain.sh (GNU libtool) 1.3.3 (1.385.2.181 1999/07/02 15:49:11)
--# ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a
--# output is multiline from 1.5 onwards
--
--# Require libtool 1.4 or newer
--libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14`
--lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
--if test -z "$lt_pversion"; then
--echo "buildconf: libtool not found."
--echo " You need libtool version 1.4 or newer installed"
--echo " to build APR from SVN."
--exit 1
--fi
--lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
--IFS=.; set $lt_version; IFS=' '
--lt_status="good"
--if test "$1" = "1"; then
-- if test "$2" -lt "4"; then
-- lt_status="bad"
-- fi
--fi
--if test $lt_status = "good"; then
-- echo "buildconf: libtool version $lt_pversion (ok)"
-- exit 0
--fi
--
--echo "buildconf: libtool version $lt_pversion found."
--echo " You need libtool version 1.4 or newer installed"
--echo " to build APR from SVN."
--
--exit 1
-+exit 0
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/configfix.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/configfix.patch
deleted file mode 100644
index 605c4f6..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr/configfix.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: apr-1.3.3/apr-config.in
-===================================================================
---- apr-1.3.3.orig/apr-config.in 2009-01-12 15:16:31.000000000 +0000
-+++ apr-1.3.3/apr-config.in 2009-01-12 15:19:25.000000000 +0000
-@@ -152,14 +152,7 @@
- flags="$flags $LDFLAGS"
- ;;
- --includes)
-- if test "$location" = "installed"; then
- flags="$flags -I$includedir $EXTRA_INCLUDES"
-- elif test "$location" = "source"; then
-- flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
-- else
-- # this is for VPATH builds
-- flags="$flags -I$APR_BUILD_DIR/include -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
-- fi
- ;;
- --srcdir)
- echo $APR_SOURCE_DIR
-@@ -181,29 +167,14 @@
- exit 0
- ;;
- --link-ld)
-- if test "$location" = "installed"; then
-- ### avoid using -L if libdir is a "standard" location like /usr/lib
-- flags="$flags -L$libdir -l${APR_LIBNAME}"
-- else
-- ### this surely can't work since the library is in .libs?
-- flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}"
-- fi
-+ flags="$flags -l${APR_LIBNAME}"
- ;;
- --link-libtool)
- # If the LA_FILE exists where we think it should be, use it. If we're
- # installed and the LA_FILE does not exist, assume to use -L/-l
- # (the LA_FILE may not have been installed). If we're building ourselves,
- # we'll assume that at some point the .la file be created.
-- if test -f "$LA_FILE"; then
-- flags="$flags $LA_FILE"
-- elif test "$location" = "installed"; then
-- ### avoid using -L if libdir is a "standard" location like /usr/lib
-- # Since the user is specifying they are linking with libtool, we
-- # *know* that -R will be recognized by libtool.
-- flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}"
-- else
-- flags="$flags $LA_FILE"
-- fi
-+ flags="$flags -l${APR_LIBNAME}"
- ;;
- --shlib-path-var)
- echo "$SHLIBPATH_VAR"
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
deleted file mode 100644
index 7521eeb..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr/configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From d439093aa07a486f559206ac9e5808a6a18218cd Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Thu, 19 Nov 2015 18:25:38 -0800
-Subject: [PATCH] configure.in: fix LTFLAGS to make it work with ccache
-
-When ccache is enabled, libtool requires --tag=CC when use ccache,
-otherwise when building apr-util with ccache enabled:
-
-| libtool: compile: unable to infer tagged configuration
-| libtool: error: specify a tag with '--tag'
-| libtool: compile: unable to infer tagged configuration
-| make[1]: *** [buckets/apr_buckets.lo] Error 1
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- configure.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.in b/configure.in
-index 5a4a988..9d57ae6 100644
---- a/configure.in
-+++ b/configure.in
-@@ -246,7 +246,7 @@ case $host in
- ;;
- *)
- if test "x$LTFLAGS" = "x"; then
-- LTFLAGS='--silent'
-+ LTFLAGS='--silent --tag=CC'
- fi
- if test "$experimental_libtool" = "yes"; then
- # Use a custom-made libtool replacement
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/configure_fixes.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/configure_fixes.patch
deleted file mode 100644
index 0514000..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr/configure_fixes.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: apr-1.3.3/configure.in
-===================================================================
---- apr-1.3.3.orig/configure.in
-+++ apr-1.3.3/configure.in
-@@ -794,39 +794,6 @@ AC_CHECK_FUNCS([mmap munmap shm_open shm
- create_area])
-
- APR_CHECK_DEFINE(MAP_ANON, sys/mman.h)
--AC_CHECK_FILE(/dev/zero)
--
--# Not all systems can mmap /dev/zero (such as HP-UX). Check for that.
--if test "$ac_cv_func_mmap" = "yes" &&
-- test "$ac_cv_file__dev_zero" = "yes"; then
-- AC_MSG_CHECKING(for mmap that can map /dev/zero)
-- AC_TRY_RUN([
--#include <sys/types.h>
--#include <sys/stat.h>
--#include <fcntl.h>
--#ifdef HAVE_SYS_MMAN_H
--#include <sys/mman.h>
--#endif
-- int main()
-- {
-- int fd;
-- void *m;
-- fd = open("/dev/zero", O_RDWR);
-- if (fd < 0) {
-- return 1;
-- }
-- m = mmap(0, sizeof(void*), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
-- if (m == (void *)-1) { /* aka MAP_FAILED */
-- return 2;
-- }
-- if (munmap(m, sizeof(void*)) < 0) {
-- return 3;
-- }
-- return 0;
-- }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])
--
-- AC_MSG_RESULT($ac_cv_file__dev_zero)
--fi
-
- # Now we determine which one is our anonymous shmem preference.
- haveshmgetanon="0"
-@@ -1518,13 +1485,14 @@ else
- bigendian=0
- fi
-
--APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>
--#include <sys/uio.h>],struct iovec,0)
--if test "$ac_cv_sizeof_struct_iovec" = "0"; then
-- have_iovec=0
--else
-- have_iovec=1
--fi
-+#APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>
-+##include <sys/uio.h>],struct iovec,0)
-+#if test "$ac_cv_sizeof_struct_iovec" = "0"; then
-+# have_iovec=0
-+#else
-+# have_iovec=1
-+#fi
-+have_iovec=1
-
- AC_SUBST(voidp_size)
- AC_SUBST(short_value)
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch
deleted file mode 100644
index 16499f5..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Makefile.in: fix cross compiling failed
-
-The tools/gen_test_char was invoked at build time,
-and it didn't work for the cross compiling, so we
-compile it with $BUILD_CC.
-
-Remove the 'tools' dir creation, it always existed.
-And it caused gen_test_char unexpected rebuilt at
-do_install time.
-
-Upstream-Status: Inappropriate [oe specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- Makefile.in | 10 ++--------
- 1 file changed, 2 insertions(+), 8 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index a2a5194..5fe028f 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -46,7 +46,6 @@ LT_VERSION = @LT_VERSION@
-
- CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \
- build/apr_rules.out tools/gen_test_char@EXEEXT@ \
-- tools/gen_test_char.o tools/gen_test_char.lo \
- include/private/apr_escape_test_char.h
- DISTCLEAN_TARGETS = config.cache config.log config.status \
- include/apr.h include/arch/unix/apr_private.h \
-@@ -129,13 +128,8 @@ check: $(TARGET_LIB)
- etags:
- etags `find . -name '*.[ch]'`
-
--OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
--tools/gen_test_char.lo: tools/gen_test_char.c
-- $(APR_MKDIR) tools
-- $(LT_COMPILE)
--
--tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
-- $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
-+tools/gen_test_char@EXEEXT@: tools/gen_test_char.c
-+ $(BUILD_CC) $(CFLAGS_FOR_BUILD) $< -o $@
-
- include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
- $(APR_MKDIR) include/private
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.6.2.bb b/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.6.2.bb
deleted file mode 100644
index e2eed53..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.6.2.bb
+++ /dev/null
@@ -1,114 +0,0 @@
-SUMMARY = "Apache Portable Runtime (APR) library"
-HOMEPAGE = "http://apr.apache.org/"
-SECTION = "libs"
-DEPENDS = "util-linux"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4dfd4cd216828c8cae5de5a12f3844c8 \
- file://include/apr_lib.h;endline=17;md5=ee42fa7575dc40580a9e01c1b75fae96"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
- file://configure_fixes.patch \
- file://cleanup.patch \
- file://configfix.patch \
- file://run-ptest \
- file://upgrade-and-fix-1.5.1.patch \
- file://Fix-packet-discards-HTTP-redirect.patch \
- file://configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch \
- file://0001-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch \
- file://0002-explicitly-link-libapr-against-phtread-to-make-gold-.patch \
-"
-
-SRC_URI[md5sum] = "e81a851967c79b5ce9bfbc909e4bf735"
-SRC_URI[sha256sum] = "09109cea377bab0028bba19a92b5b0e89603df9eab05c0f7dbd4dd83d48dcebd"
-
-inherit autotools-brokensep lib_package binconfig multilib_header ptest
-
-OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
-
-# Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928
-CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes"
-
-# Also suppress trying to use sctp.
-#
-CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no"
-
-# Otherwise libtool fails to compile apr-utils
-# x86_64-linux-libtool: compile: unable to infer tagged configuration
-# x86_64-linux-libtool: error: specify a tag with '--tag'
-CCACHE = ""
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-do_configure_prepend() {
- # Avoid absolute paths for grep since it causes failures
- # when using sstate between different hosts with different
- # install paths for grep.
- export GREP="grep"
-
- cd ${S}
- ./buildconf
-}
-
-FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*"
-RDEPENDS_${PN}-dev += "bash"
-
-#for some reason, build/libtool.m4 handled by buildconf still be overwritten
-#when autoconf, so handle it again.
-do_configure_append() {
- sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/libtool.m4
- sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/apr_rules.mk
-}
-
-do_install_append() {
- oe_multilib_header apr.h
- install -d ${D}${datadir}/apr
-}
-
-do_install_append_class-target() {
- sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${datadir}/build-1/apr_rules.mk
- sed -i -e 's,${STAGING_DIR_HOST},,g' \
- -e 's,APR_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
- -e 's,APR_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apr-1-config
-}
-
-SSTATE_SCAN_FILES += "apr_rules.mk libtool"
-
-SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess"
-
-apr_sysroot_preprocess () {
- d=${SYSROOT_DESTDIR}${datadir}/apr
- install -d $d/
- cp ${S}/build/apr_rules.mk $d/
- sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
- sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk
- sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk
- sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk
- cp ${S}/build/mkdir.sh $d/
- cp ${S}/build/make_exports.awk $d/
- cp ${S}/build/make_var_export.awk $d/
- cp ${S}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool
-}
-
-do_compile_ptest() {
- cd ${S}/test
- oe_runmake
-}
-
-do_install_ptest() {
- t=${D}${PTEST_PATH}/test
- mkdir -p $t/.libs
- cp -r ${S}/test/data $t/
- cp -r ${S}/test/.libs/*.so $t/.libs/
- cp ${S}/test/proc_child $t/
- cp ${S}/test/readchild $t/
- cp ${S}/test/sockchild $t/
- cp ${S}/test/sockperf $t/
- cp ${S}/test/testall $t/
- cp ${S}/test/tryread $t/
-}
-
-export CONFIG_SHELL="/bin/bash"
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.6.3.bb b/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.6.3.bb
new file mode 100644
index 0000000..87b8787
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.6.3.bb
@@ -0,0 +1,117 @@
+SUMMARY = "Apache Portable Runtime (APR) library"
+HOMEPAGE = "http://apr.apache.org/"
+SECTION = "libs"
+DEPENDS = "util-linux"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4dfd4cd216828c8cae5de5a12f3844c8 \
+ file://include/apr_lib.h;endline=17;md5=ee42fa7575dc40580a9e01c1b75fae96"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
+ file://run-ptest \
+ file://0001-build-buildcheck.sh-improve-libtool-detection.patch \
+ file://0002-apr-Remove-workdir-path-references-from-installed-ap.patch \
+ file://0003-Makefile.in-configure.in-support-cross-compiling.patch \
+ file://0004-Fix-packet-discards-HTTP-redirect.patch \
+ file://0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch \
+ file://0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch \
+ file://0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch \
+"
+
+SRC_URI[md5sum] = "12f2a349483ad6f12db49ba01fbfdbfa"
+SRC_URI[sha256sum] = "131f06d16d7aabd097fa992a33eec2b6af3962f93e6d570a9bd4d85e95993172"
+
+inherit autotools-brokensep lib_package binconfig multilib_header ptest
+
+OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
+
+# Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928
+CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes"
+
+# Also suppress trying to use sctp.
+#
+CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no"
+
+CACHED_CONFIGUREVARS += "ac_cv_sizeof_struct_iovec=yes"
+CACHED_CONFIGUREVARS += "ac_cv_file__dev_zero=yes"
+
+# Otherwise libtool fails to compile apr-utils
+# x86_64-linux-libtool: compile: unable to infer tagged configuration
+# x86_64-linux-libtool: error: specify a tag with '--tag'
+CCACHE = ""
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+do_configure_prepend() {
+ # Avoid absolute paths for grep since it causes failures
+ # when using sstate between different hosts with different
+ # install paths for grep.
+ export GREP="grep"
+
+ cd ${S}
+ libtool='${HOST_SYS}-libtool' ./buildconf
+}
+
+FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*"
+RDEPENDS_${PN}-dev += "bash"
+
+#for some reason, build/libtool.m4 handled by buildconf still be overwritten
+#when autoconf, so handle it again.
+do_configure_append() {
+ sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/libtool.m4
+ sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/apr_rules.mk
+}
+
+do_install_append() {
+ oe_multilib_header apr.h
+ install -d ${D}${datadir}/apr
+}
+
+do_install_append_class-target() {
+ sed -i -e 's,${DEBUG_PREFIX_MAP},,g' \
+ -e 's,${STAGING_DIR_HOST},,g' ${D}${datadir}/build-1/apr_rules.mk
+ sed -i -e 's,${STAGING_DIR_HOST},,g' \
+ -e 's,APR_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
+ -e 's,APR_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apr-1-config
+}
+
+SSTATE_SCAN_FILES += "apr_rules.mk libtool"
+
+SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess"
+
+apr_sysroot_preprocess () {
+ d=${SYSROOT_DESTDIR}${datadir}/apr
+ install -d $d/
+ cp ${S}/build/apr_rules.mk $d/
+ sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
+ sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk
+ sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk
+ sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk
+ cp ${S}/build/mkdir.sh $d/
+ cp ${S}/build/make_exports.awk $d/
+ cp ${S}/build/make_var_export.awk $d/
+ cp ${S}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool
+}
+
+do_compile_ptest() {
+ cd ${S}/test
+ oe_runmake
+}
+
+do_install_ptest() {
+ t=${D}${PTEST_PATH}/test
+ mkdir -p $t/.libs
+ cp -r ${S}/test/data $t/
+ cp -r ${S}/test/.libs/*.so $t/.libs/
+ cp ${S}/test/proc_child $t/
+ cp ${S}/test/readchild $t/
+ cp ${S}/test/sockchild $t/
+ cp ${S}/test/sockperf $t/
+ cp ${S}/test/testall $t/
+ cp ${S}/test/tryread $t/
+}
+
+export CONFIG_SHELL="/bin/bash"
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.24.1.bb b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.24.1.bb
deleted file mode 100644
index 4a0e411..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.24.1.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "AT-SPI 2 Toolkit Bridge"
-HOMEPAGE = "https://wiki.linuxfoundation.org/accessibility/d-bus"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "79388fbc4dc7f27394556dd389aeb594"
-SRC_URI[sha256sum] = "60dc90ac4f74b8ffe96a9363c25208a443b381bacecfefea6de549f20ed6957d"
-
-DEPENDS = "dbus glib-2.0 glib-2.0-native atk at-spi2-core"
-
-inherit autotools pkgconfig distro_features_check upstream-version-is-even
-
-# The at-spi2-core requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-PACKAGES =+ "${PN}-gnome ${PN}-gtk2"
-
-FILES_${PN}-gnome = "${libdir}/gnome-settings-daemon-3.0/gtk-modules"
-FILES_${PN}-gtk2 = "${libdir}/gtk-2.0/modules/libatk-bridge.*"
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.26.1.bb b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.26.1.bb
new file mode 100644
index 0000000..8617bb8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.26.1.bb
@@ -0,0 +1,22 @@
+SUMMARY = "AT-SPI 2 Toolkit Bridge"
+HOMEPAGE = "https://wiki.linuxfoundation.org/accessibility/d-bus"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "eeec6cead3350dca48a235271c105b3e"
+SRC_URI[sha256sum] = "b4f0c27b61dbffba7a5b5ba2ff88c8cee10ff8dac774fa5b79ce906853623b75"
+
+DEPENDS = "dbus glib-2.0 glib-2.0-native atk at-spi2-core"
+
+inherit autotools pkgconfig distro_features_check upstream-version-is-even
+
+# The at-spi2-core requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+PACKAGES =+ "${PN}-gnome ${PN}-gtk2"
+
+FILES_${PN}-gnome = "${libdir}/gnome-settings-daemon-3.0/gtk-modules"
+FILES_${PN}-gtk2 = "${libdir}/gtk-2.0/modules/libatk-bridge.*"
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch
index 4103eaa..1f8c9f3 100644
--- a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch
@@ -1,4 +1,4 @@
-From 2f47c975ebe52b6916a45ade023ae3bac21bb0e0 Mon Sep 17 00:00:00 2001
+From fa376762b92404b9e3c430054b8c3341ca0fdd8b Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Tue, 21 Jun 2016 16:00:02 +0300
Subject: [PATCH] build: Add --with-systemduserunitdir
@@ -8,29 +8,30 @@
Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=767911]
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
---
bus/Makefile.am | 2 +-
- configure.ac | 7 +++++++
- 2 files changed, 8 insertions(+), 1 deletion(-)
+ configure.ac | 9 +++++++++
+ 2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/bus/Makefile.am b/bus/Makefile.am
-index b189e02..52fbb0b 100644
+index 688f82a..10cde62 100644
--- a/bus/Makefile.am
+++ b/bus/Makefile.am
-@@ -26,7 +26,7 @@ dbusservice_DATA = org.a11y.Bus.service
- org.a11y.Bus.service: org.a11y.Bus.service.in
- sed -e $(substitutions) $< > $@.tmp && mv $@.tmp $@
+@@ -29,7 +29,7 @@ org.a11y.Bus.service: org.a11y.Bus.service.in
+ EXTRA_DIST += org.a11y.Bus.service.in
+ CLEANFILES += org.a11y.Bus.service
-systemd_userdir = $(prefix)/lib/systemd/user
+systemd_userdir = $(systemduserunitdir)
systemd_user_DATA = at-spi-dbus-bus.service
at-spi-dbus-bus.service: at-spi-dbus-bus.service.in Makefile
- sed -e $(substitutions) $< > $@.tmp && mv $@.tmp $@
+ $(AM_V_GEN) $(SED) -e $(substitutions) $< > $@.tmp && mv $@.tmp $@
diff --git a/configure.ac b/configure.ac
-index f9061c2..2b8eeed 100644
+index 8c4fca2..1415cca 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -183,6 +183,13 @@ else
+@@ -146,6 +146,15 @@ else
fi
AC_SUBST(DBUS_SERVICES_DIR)
@@ -41,9 +42,11 @@
+ [with_systemduserunitdir=$($PKG_CONFIG --variable=systemduserunitdir systemd)])
+AC_SUBST([systemduserunitdir], [$with_systemduserunitdir])
+
- AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
++AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
++
+ GOBJECT_INTROSPECTION_CHECK([1.32.0])
- GOBJECT_INTROSPECTION_CHECK([0.9.6])
+ AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
--
-2.1.4
+2.14.1
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-nls.m4-Take-it-from-gettext-0.15.patch b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-nls.m4-Take-it-from-gettext-0.15.patch
deleted file mode 100644
index 69a51d5..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-nls.m4-Take-it-from-gettext-0.15.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From c320799c941d42a9b7e351805359694ea3b36d2d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 5 Apr 2015 09:08:38 -0700
-Subject: [PATCH] nls.m4: Take it from gettext-0.15
-
-It otherwise expects gettext to provide it. Lets go independent
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- m4/nls.m4 | 30 ++++++++++++++++++++++++++++++
- 1 file changed, 30 insertions(+)
- create mode 100644 m4/nls.m4
-
-diff --git a/m4/nls.m4 b/m4/nls.m4
-new file mode 100644
-index 0000000..2c8fe69
---- /dev/null
-+++ b/m4/nls.m4
-@@ -0,0 +1,30 @@
-+dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
-+dnl This file is free software; the Free Software Foundation
-+dnl gives unlimited permission to copy and/or distribute it,
-+dnl with or without modifications, as long as this notice is preserved.
-+dnl
-+dnl This file can can be used in projects which are not available under
-+dnl the GNU General Public License or the GNU Library General Public
-+dnl License but which still want to provide support for the GNU gettext
-+dnl functionality.
-+dnl Please note that the actual code of the GNU gettext library is covered
-+dnl by the GNU Library General Public License, and the rest of the GNU
-+dnl gettext package package is covered by the GNU General Public License.
-+dnl They are not in the public domain.
-+
-+dnl Authors:
-+dnl Ulrich Drepper drepper@cygnus.com, 1995-2000.
-+dnl Bruno Haible haible@clisp.cons.org, 2000-2003.
-+
-+AC_PREREQ(2.50)
-+
-+AC_DEFUN([AM_NLS],
-+[
-+AC_MSG_CHECKING([whether NLS is requested])
-+dnl Default is enabled NLS
-+AC_ARG_ENABLE(nls,
-+[ --disable-nls do not use Native Language Support],
-+USE_NLS=$enableval, USE_NLS=yes)
-+AC_MSG_RESULT($USE_NLS)
-+AC_SUBST(USE_NLS)
-+])
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.24.1.bb b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.24.1.bb
deleted file mode 100644
index 1687ae3..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.24.1.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Assistive Technology Service Provider Interface (dbus core)"
-HOMEPAGE = "https://wiki.linuxfoundation.org/accessibility/d-bus"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
- file://0001-nls.m4-Take-it-from-gettext-0.15.patch \
- file://0001-build-Add-with-systemduserunitdir.patch \
- "
-
-SRC_URI[md5sum] = "61d0a471e693292934a73f288ebff35c"
-SRC_URI[sha256sum] = "1e90d064b937aacfe79a96232ac7e63d28d716e85bd9ff4333f865305a959b5b"
-
-DEPENDS = "dbus glib-2.0 virtual/libx11 libxi libxtst intltool-native"
-
-inherit autotools gtk-doc gettext systemd pkgconfig distro_features_check upstream-version-is-even gobject-introspection
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-EXTRA_OECONF = "--disable-xevie \
- --with-systemduserunitdir=${systemd_user_unitdir} \
- --with-dbus-daemondir=${bindir}"
-
-FILES_${PN} += "${datadir}/dbus-1/services/*.service \
- ${datadir}/dbus-1/accessibility-services/*.service \
- ${datadir}/defaults/at-spi2 \
- ${systemd_user_unitdir}/at-spi-dbus-bus.service \
- "
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.26.2.bb b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.26.2.bb
new file mode 100644
index 0000000..521ee3b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.26.2.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Assistive Technology Service Provider Interface (dbus core)"
+HOMEPAGE = "https://wiki.linuxfoundation.org/accessibility/d-bus"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+ file://0001-build-Add-with-systemduserunitdir.patch \
+ "
+
+SRC_URI[md5sum] = "4a042e4c801fdb793788b749eab21485"
+SRC_URI[sha256sum] = "c80e0cdf5e3d713400315b63c7deffa561032a6c37289211d8afcfaa267c2615"
+
+DEPENDS = "dbus glib-2.0 virtual/libx11 libxi libxtst"
+
+inherit autotools gtk-doc gettext systemd pkgconfig distro_features_check upstream-version-is-even gobject-introspection
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+EXTRA_OECONF = " \
+ --with-systemduserunitdir=${systemd_user_unitdir} \
+ --with-dbus-daemondir=${bindir}"
+
+FILES_${PN} += "${datadir}/dbus-1/services/*.service \
+ ${datadir}/dbus-1/accessibility-services/*.service \
+ ${datadir}/defaults/at-spi2 \
+ ${systemd_user_unitdir}/at-spi-dbus-bus.service \
+ "
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.24.0.bb b/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.24.0.bb
deleted file mode 100644
index d62319c..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.24.0.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Accessibility toolkit for GNOME"
-HOMEPAGE = "http://live.gnome.org/GAP/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "x11/libs"
-
-LICENSE = "GPLv2+ & LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9b30f619ca8d819bc12d3 \
- file://atk/atk.h;endline=18;md5=fcd7710187e0eae485e356c30d1b0c3b"
-
-DEPENDS = "glib-2.0"
-
-inherit gnomebase gtk-doc gettext upstream-version-is-even gobject-introspection
-
-SRC_URI[archive.md5sum] = "3747a80089dfa3c0bbcf21adfff9968b"
-SRC_URI[archive.sha256sum] = "bb2daa9a808c73a7a79d2983f333e0ba74be42fc51e3ba1faf2551a636487a49"
-
-BBCLASSEXTEND = "native"
-
-EXTRA_OECONF = "--disable-glibtest \
- "
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.26.1.bb b/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.26.1.bb
new file mode 100644
index 0000000..685b599
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.26.1.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Accessibility toolkit for GNOME"
+HOMEPAGE = "http://live.gnome.org/GAP/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/libs"
+
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+ file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9b30f619ca8d819bc12d3 \
+ file://atk/atk.h;endline=18;md5=fcd7710187e0eae485e356c30d1b0c3b"
+
+DEPENDS = "glib-2.0"
+
+inherit gnomebase gtk-doc gettext upstream-version-is-even gobject-introspection
+
+SRC_URI[archive.md5sum] = "7cddcc313b9a3efd19b2ddf079ba68f5"
+SRC_URI[archive.sha256sum] = "ef00ff6b83851dddc8db38b4d9faeffb99572ba150b0664ee02e46f015ea97cb"
+
+BBCLASSEXTEND = "native"
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch b/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
index 0b350be..f392465 100644
--- a/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
@@ -35,61 +35,56 @@
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- test/cp.test | 2 +-
- test/misc.test | 6 +++---
- test/sbits-restore.test | 6 +++---
- 3 files changed, 7 insertions(+), 7 deletions(-)
-diff --git a/test/cp.test b/test/cp.test
-index 0867f63..a927195 100644
---- a/test/cp.test
-+++ b/test/cp.test
-@@ -9,7 +9,7 @@ The cp utility should only copy ACLs if `-p' is given.
+Index: acl-2.2.52/test/cp.test
+===================================================================
+--- acl-2.2.52.orig/test/cp.test
++++ acl-2.2.52/test/cp.test
+@@ -9,7 +9,7 @@ The cp utility should only copy ACLs if
> -rw-rw-r--+
-
+
$ cp f g
- $ ls -l g | awk -- '{ print $1 }' | sed 's/\.$//g'
+ $ ls -l g | awk -- '{ print $1 }' | sed 's/\\.$//g'
> -rw-r--r--
-
+
$ rm g
-diff --git a/test/misc.test b/test/misc.test
-index 6e98053..29372b7 100644
---- a/test/misc.test
-+++ b/test/misc.test
+Index: acl-2.2.52/test/misc.test
+===================================================================
+--- acl-2.2.52.orig/test/misc.test
++++ acl-2.2.52/test/misc.test
@@ -254,7 +254,7 @@ Add some users and groups
Symlink in directory with default ACL?
-
+
$ ln -s d d/l
- $ ls -dl d/l | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d/l | awk '{print $1}' | sed 's/\\.$//g'
> lrwxrwxrwx
-
+
$ ls -dl -L d/l | awk '{print $1}'
@@ -343,7 +343,7 @@ Remove the default ACL
Reset to base entries
-
+
$ setfacl -b d
- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
> drwxr-x---
-
+
$ getfacl --omit-header d
@@ -355,7 +355,7 @@ Reset to base entries
Now, chmod should change the group_obj entry
-
+
$ chmod 775 d
- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
> drwxrwxr-x
-
+
$ getfacl --omit-header d
-diff --git a/test/sbits-restore.test b/test/sbits-restore.test
-index de21340..5899b0a 100644
---- a/test/sbits-restore.test
-+++ b/test/sbits-restore.test
-@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via --restore works
+Index: acl-2.2.52/test/sbits-restore.test
+===================================================================
+--- acl-2.2.52.orig/test/sbits-restore.test
++++ acl-2.2.52/test/sbits-restore.test
+@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via -
$ touch d/g
$ touch d/u
$ setfacl --restore d.acl
@@ -103,6 +98,3 @@
+ $ ls -dl d/g | awk '{print $1}' | sed 's/\\.$//g'
> -rw-r-Sr--
$ rm -Rf d
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/ea-acl.inc b/import-layers/yocto-poky/meta/recipes-support/attr/ea-acl.inc
index e6f4c72..1339ecc 100644
--- a/import-layers/yocto-poky/meta/recipes-support/attr/ea-acl.inc
+++ b/import-layers/yocto-poky/meta/recipes-support/attr/ea-acl.inc
@@ -17,7 +17,7 @@
EXTRA_OEMAKE = "PKG_LIB_DIR=${base_libdir} PKG_DEVLIB_DIR=${libdir}"
do_install () {
- oe_runmake install install-lib install-dev DIST_ROOT="${D}"
+ oe_runmake install install-lib install-dev DIST_ROOT="${D}" ZIP="gzip -n"
}
do_install_append_class-native () {
diff --git a/import-layers/yocto-poky/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb b/import-layers/yocto-poky/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb
index 70b6e91..9d8191f 100644
--- a/import-layers/yocto-poky/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb
@@ -9,10 +9,12 @@
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRC_URI = "git://github.com/intel/bmap-tools.git"
-SRCREV = "9dad724104df265442226972a1e310813f9ffcba"
+SRC_URI = "https://github.com/intel/${BPN}/releases/download/v${PV}/${BP}.tgz"
-S = "${WORKDIR}/git"
+SRC_URI[md5sum] = "883420183611aa137cbaf68a91ef0d7e"
+SRC_URI[sha256sum] = "0064891270c180c190f41925b0f6fb9cecac3056f1168d2592dbe90e5f226c0a"
+
+UPSTREAM_CHECK_URI = "https://github.com/intel/${BPN}/releases"
RDEPENDS_${PN} = "python3-core python3-compression python3-mmap python3-setuptools"
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.64.0.bb b/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.64.0.bb
deleted file mode 100644
index 46013f3..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.64.0.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require boost-${PV}.inc
-
-SUMMARY = "Portable Boost.Jam build tool for boost"
-SECTION = "devel"
-
-inherit native
-
-SRC_URI += "file://bjam-native-build-bjam.debug.patch"
-
-do_compile() {
- ./bootstrap.sh --with-toolset=gcc
-}
-
-do_install() {
- install -d ${D}${bindir}/
- # install unstripped version for bjam
- install -c -m 755 bjam.debug ${D}${bindir}/bjam
-}
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.66.0.bb b/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.66.0.bb
new file mode 100644
index 0000000..92c86a3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.66.0.bb
@@ -0,0 +1,19 @@
+require boost-${PV}.inc
+
+SUMMARY = "Portable Boost.Jam build tool for boost"
+SECTION = "devel"
+
+inherit native
+
+SRC_URI += "file://bjam-native-build-bjam.debug.patch \
+ file://0001-Fix-a-strange-assert-typo-how-was-this-released-with.patch"
+
+do_compile() {
+ ./bootstrap.sh --with-toolset=gcc
+}
+
+do_install() {
+ install -d ${D}${bindir}/
+ # install unstripped version for bjam
+ install -c -m 755 bjam.debug ${D}${bindir}/bjam
+}
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.64.0.inc b/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.64.0.inc
deleted file mode 100644
index dc7b1a9..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.64.0.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-# The Boost web site provides free peer-reviewed portable
-# C++ source libraries. The emphasis is on libraries which
-# work well with the C++ Standard Library. The libraries are
-# intended to be widely useful, and are in regular use by
-# thousands of programmers across a broad spectrum of applications.
-HOMEPAGE = "http://www.boost.org/"
-LICENSE = "BSL-1.0 & MIT & Python-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
-
-BOOST_VER = "${@"_".join(d.getVar("PV").split("."))}"
-BOOST_MAJ = "${@"_".join(d.getVar("PV").split(".")[0:2])}"
-BOOST_P = "boost_${BOOST_VER}"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/boost/boost/${PV}/${BOOST_P}.tar.bz2"
-SRC_URI[md5sum] = "93eecce2abed9d2442c9676914709349"
-SRC_URI[sha256sum] = "7bcc5caace97baa948931d712ea5f37038dbb1c5d89b43ad4def4ed7cb683332"
-
-UPSTREAM_CHECK_URI = "http://www.boost.org/users/download/"
-UPSTREAM_CHECK_REGEX = "boostorg/release/(?P<pver>.*)/source/"
-
-S = "${WORKDIR}/${BOOST_P}"
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.66.0.inc b/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.66.0.inc
new file mode 100644
index 0000000..fe2b863
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.66.0.inc
@@ -0,0 +1,21 @@
+# The Boost web site provides free peer-reviewed portable
+# C++ source libraries. The emphasis is on libraries which
+# work well with the C++ Standard Library. The libraries are
+# intended to be widely useful, and are in regular use by
+# thousands of programmers across a broad spectrum of applications.
+HOMEPAGE = "http://www.boost.org/"
+LICENSE = "BSL-1.0 & MIT & Python-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
+
+BOOST_VER = "${@"_".join(d.getVar("PV").split("."))}"
+BOOST_MAJ = "${@"_".join(d.getVar("PV").split(".")[0:2])}"
+BOOST_P = "boost_${BOOST_VER}"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/boost/boost/${PV}/${BOOST_P}.tar.bz2"
+SRC_URI[md5sum] = "b2dfbd6c717be4a7bb2d88018eaccf75"
+SRC_URI[sha256sum] = "5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9"
+
+UPSTREAM_CHECK_URI = "http://www.boost.org/users/download/"
+UPSTREAM_CHECK_REGEX = "boostorg/release/(?P<pver>.*)/source/"
+
+S = "${WORKDIR}/${BOOST_P}"
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc b/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc
index 41fc90f..0461ec6 100644
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc
@@ -135,29 +135,7 @@
# use PARALLEL_MAKE to speed up the build, but limit it by -j 64, greater parallelism causes bjam to segfault or to ignore -j
# https://svn.boost.org/trac/boost/ticket/7634
-def get_boost_parallel_make(d):
- pm = d.getVar('PARALLEL_MAKE')
- if pm:
- # look for '-j' and throw other options (e.g. '-l') away
- # because they might have different meaning in bjam
- pm = pm.split()
- while pm:
- v = None
- opt = pm.pop(0)
- if opt == '-j':
- v = pm.pop(0)
- elif opt.startswith('-j'):
- v = opt[2:].strip()
- else:
- v = None
-
- if v:
- v = min(64, int(v))
- return '-j' + str(v)
-
- return ""
-
-BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(d)}"
+BOOST_PARALLEL_MAKE = "${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)}"
BJAM_OPTS = '${BOOST_PARALLEL_MAKE} -d+2 -q \
${BJAM_TOOLS} \
-sBOOST_BUILD_USER_CONFIG=${WORKDIR}/user-config.jam \
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch
deleted file mode 100644
index 8a85aac..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 40192301130dcd913aa6d9cb9dba9e5f8dbd9d16 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
-Date: Wed, 24 Aug 2016 21:01:43 +0100
-Subject: [PATCH 1/4] use POSIX poll.h instead of sys/poll.h
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-POSIX specifies that <poll.h> is the correct header to
-include for poll()
- http://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html
-whereas <sys/poll.h> is only needed for ancient glibc (<2.3),
-so let's follow POSIX instead.
-
-As a side-effect, this silences a warning when compiling
-against the musl C-library:
-
-In file included from ./boost/asio/detail/socket_types.hpp:61:0,
- from ./boost/asio/ip/address_v4.hpp:21,
- from ./boost/asio/ip/address.hpp:21,
- from libs/log/src/init_from_settings.cpp:65:
-<sysroot>/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
- #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
- ^~~~~~~
-
-etc.
-
-Signed-off-by: André Draszik <adraszik@tycoint.com>
----
-Upstream-Status: Submitted https://svn.boost.org/trac/boost/ticket/12419
- boost/asio/detail/socket_types.hpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/boost/asio/detail/socket_types.hpp b/boost/asio/detail/socket_types.hpp
-index e8c7109..7e65d3c 100644
---- a/boost/asio/detail/socket_types.hpp
-+++ b/boost/asio/detail/socket_types.hpp
-@@ -58,7 +58,7 @@
- #else
- # include <sys/ioctl.h>
- # if !defined(__SYMBIAN32__)
--# include <sys/poll.h>
-+# include <poll.h>
- # endif
- # include <sys/types.h>
- # include <sys/stat.h>
---
-2.9.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-correct-error-which-appeared-when-compiling-non-c-co.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-correct-error-which-appeared-when-compiling-non-c-co.patch
deleted file mode 100644
index f96005e..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-correct-error-which-appeared-when-compiling-non-c-co.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 02fa5cee1b8d0321787113e2dc10b162c657f333 Mon Sep 17 00:00:00 2001
-From: Robert Ramey <ramey@rrsd.com>
-Date: Wed, 1 Feb 2017 16:43:59 -0800
-Subject: [PATCH] correct error which appeared when compiling non c++ compliant
- code for arrays
-
-Upstream-Status: Backport [expected to be released in v1.65]
-
----
- boost/serialization/array.hpp | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/boost/serialization/array.hpp b/boost/serialization/array.hpp
-index 61708b3..612d1a6 100644
---- a/boost/serialization/array.hpp
-+++ b/boost/serialization/array.hpp
-@@ -23,6 +23,8 @@ namespace std{
- } // namespace std
- #endif
-
-+#include <boost/serialization/array_wrapper.hpp>
-+
- #ifndef BOOST_NO_CXX11_HDR_ARRAY
-
- #include <array>
---
-2.9.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch
index e9c7e4c..26f3cbb 100644
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch
@@ -1,97 +1,65 @@
-From c0e785f8da2caa6617052b1c7b347e0dffb1520d Mon Sep 17 00:00:00 2001
+From e4d3a7470b307693660d0412732e7266d1738d8c Mon Sep 17 00:00:00 2001
From: Christopher Larson <chris_larson@mentor.com>
Date: Tue, 13 Dec 2016 10:29:17 -0700
-Subject: [PATCH 2/3] Don't set up -m32/-m64, we do that ourselves
+Subject: [PATCH 6/6] Don't set up -m32/-m64, we do that ourselves
Upstream-Status: Inappropriate
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
---
- tools/build/src/tools/gcc.jam | 10 ----------
- 1 file changed, 10 deletions(-)
+ tools/build/src/tools/gcc.jam | 39 ---------------------------------------
+ 1 file changed, 39 deletions(-)
diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam
-index 0f346a5..942f141 100644
+index e4fc6c32..37914fd0 100644
--- a/tools/build/src/tools/gcc.jam
+++ b/tools/build/src/tools/gcc.jam
-@@ -509,7 +509,6 @@ rule compile.c++.pch ( targets * : sources * : properties * )
- {
- setup-threading $(targets) : $(sources) : $(properties) ;
- setup-fpic $(targets) : $(sources) : $(properties) ;
-- setup-address-model $(targets) : $(sources) : $(properties) ;
+@@ -337,45 +337,6 @@ rule set-address-model-options ( targets * : sources * : properties * )
+ {
+ local option ;
+ local target-os = [ feature.get-values target-os : $(properties) ] ;
+- if $(target-os) = aix
+- {
+- if $(model) = 32
+- {
+- option = -maix32 ;
+- }
+- else
+- {
+- option = -maix64 ;
+- }
+- }
+- else if $(target-os) = hpux
+- {
+- if $(model) = 32
+- {
+- option = -milp32 ;
+- }
+- else
+- {
+- option = -mlp64 ;
+- }
+- }
+- else
+- {
+- local arch = [ feature.get-values architecture : $(properties) ] ;
+- if $(arch) = power || $(arch) = sparc || $(arch) = x86
+- {
+- if $(model) = 32
+- {
+- option = -m32 ;
+- }
+- else if $(model) = 64
+- {
+- option = -m64 ;
+- }
+- }
+- # For darwin, the model can be 32_64. darwin.jam will handle that
+- # on its own.
+- }
+ OPTIONS on $(targets) += $(option) ;
+ }
}
-
- actions compile.c++.pch
-@@ -521,7 +520,6 @@ rule compile.c.pch ( targets * : sources * : properties * )
- {
- setup-threading $(targets) : $(sources) : $(properties) ;
- setup-fpic $(targets) : $(sources) : $(properties) ;
-- setup-address-model $(targets) : $(sources) : $(properties) ;
- }
-
- actions compile.c.pch
-@@ -533,7 +531,6 @@ rule compile.c++.preprocess ( targets * : sources * : properties * )
- {
- setup-threading $(targets) : $(sources) : $(properties) ;
- setup-fpic $(targets) : $(sources) : $(properties) ;
-- setup-address-model $(targets) : $(sources) : $(properties) ;
-
- # Some extensions are compiled as C++ by default. For others, we need to
- # pass -x c++. We could always pass -x c++ but distcc does not work with it.
-@@ -548,7 +545,6 @@ rule compile.c.preprocess ( targets * : sources * : properties * )
- {
- setup-threading $(targets) : $(sources) : $(properties) ;
- setup-fpic $(targets) : $(sources) : $(properties) ;
-- setup-address-model $(targets) : $(sources) : $(properties) ;
-
- # If we use the name g++ then default file suffix -> language mapping does
- # not work. So have to pass -x option. Maybe, we can work around this by
-@@ -564,7 +560,6 @@ rule compile.c++ ( targets * : sources * : properties * )
- {
- setup-threading $(targets) : $(sources) : $(properties) ;
- setup-fpic $(targets) : $(sources) : $(properties) ;
-- setup-address-model $(targets) : $(sources) : $(properties) ;
-
- # Some extensions are compiled as C++ by default. For others, we need to
- # pass -x c++. We could always pass -x c++ but distcc does not work with it.
-@@ -594,7 +589,6 @@ rule compile.c ( targets * : sources * : properties * )
- {
- setup-threading $(targets) : $(sources) : $(properties) ;
- setup-fpic $(targets) : $(sources) : $(properties) ;
-- setup-address-model $(targets) : $(sources) : $(properties) ;
-
- # If we use the name g++ then default file suffix -> language mapping does
- # not work. So have to pass -x option. Maybe, we can work around this by
-@@ -610,7 +604,6 @@ rule compile.fortran ( targets * : sources * : properties * )
- {
- setup-threading $(targets) : $(sources) : $(properties) ;
- setup-fpic $(targets) : $(sources) : $(properties) ;
-- setup-address-model $(targets) : $(sources) : $(properties) ;
- }
-
- actions compile.c++ bind PCH_FILE
-@@ -641,7 +634,6 @@ actions compile.fortran
- rule compile.asm ( targets * : sources * : properties * )
- {
- setup-fpic $(targets) : $(sources) : $(properties) ;
-- setup-address-model $(targets) : $(sources) : $(properties) ;
- LANG on $(<) = "-x assembler-with-cpp" ;
- }
-
-@@ -950,7 +942,6 @@ rule quote-rpath ( targets * )
- rule link ( targets * : sources * : properties * )
- {
- setup-threading $(targets) : $(sources) : $(properties) ;
-- setup-address-model $(targets) : $(sources) : $(properties) ;
- SPACE on $(targets) = " " ;
- # Serialize execution of the 'link' action, since running N links in
- # parallel is just slower. For now, serialize only gcc links, it might be a
-@@ -1018,7 +1009,6 @@ actions piecemeal archive
- rule link.dll ( targets * : sources * : properties * )
- {
- setup-threading $(targets) : $(sources) : $(properties) ;
-- setup-address-model $(targets) : $(sources) : $(properties) ;
- SPACE on $(targets) = " " ;
- JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
- quote-rpath $(targets) ;
--
-2.8.0
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch
index 6bb25f8..fb6d971 100644
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch
@@ -1,20 +1,21 @@
-From 7c49525812567f1219706c4ed330b3bd2cc8e94a Mon Sep 17 00:00:00 2001
+From 0868761e7d2d75d472090e3ef96f3d2f9ced27f3 Mon Sep 17 00:00:00 2001
From: Christopher Larson <chris_larson@mentor.com>
Date: Tue, 13 Dec 2016 10:29:32 -0700
-Subject: [PATCH 3/3] Don't set up arch/instruction-set flags, we do that
+Subject: [PATCH 5/6] Don't set up arch/instruction-set flags, we do that
ourselves
Upstream-Status: Inappropriate
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
---
- tools/build/src/tools/gcc.jam | 121 ------------------------------------------
- 1 file changed, 121 deletions(-)
+ tools/build/src/tools/gcc.jam | 127 ------------------------------------------
+ 1 file changed, 127 deletions(-)
diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam
-index 942f141..d062c20 100644
+index e3b1b952..e4fc6c32 100644
--- a/tools/build/src/tools/gcc.jam
+++ b/tools/build/src/tools/gcc.jam
-@@ -1068,124 +1068,3 @@ local rule cpu-flags ( toolset variable : architecture : instruction-set + :
+@@ -1276,130 +1276,3 @@ local rule cpu-flags ( toolset variable : architecture : instruction-set + :
<architecture>$(architecture)/<instruction-set>$(instruction-set)
: $(values) ;
}
@@ -60,6 +61,10 @@
-cpu-flags gcc OPTIONS : x86 : core-avx-i : -march=core-avx-i ;
-cpu-flags gcc OPTIONS : x86 : ivy-bridge : -march=core-avx-i ;
-cpu-flags gcc OPTIONS : x86 : haswell : -march=core-avx-i -mavx2 -mfma -mbmi -mbmi2 -mlzcnt ;
+-cpu-flags gcc OPTIONS : x86 : broadwell : -march=broadwell ;
+-cpu-flags gcc OPTIONS : x86 : skylake : -march=skylake ;
+-cpu-flags gcc OPTIONS : x86 : skylake-avx512 : -march=skylake-avx512 ;
+-cpu-flags gcc OPTIONS : x86 : cannonlake : -march=skylake-avx512 -mavx512vbmi -mavx512ifma -msha ;
-cpu-flags gcc OPTIONS : x86 : k6 : -march=k6 ;
-cpu-flags gcc OPTIONS : x86 : k6-2 : -march=k6-2 ;
-cpu-flags gcc OPTIONS : x86 : k6-3 : -march=k6-3 ;
@@ -81,8 +86,10 @@
-cpu-flags gcc OPTIONS : x86 : bdver1 : -march=bdver1 ;
-cpu-flags gcc OPTIONS : x86 : bdver2 : -march=bdver2 ;
-cpu-flags gcc OPTIONS : x86 : bdver3 : -march=bdver3 ;
+-cpu-flags gcc OPTIONS : x86 : bdver4 : -march=bdver4 ;
-cpu-flags gcc OPTIONS : x86 : btver1 : -march=btver1 ;
-cpu-flags gcc OPTIONS : x86 : btver2 : -march=btver2 ;
+-cpu-flags gcc OPTIONS : x86 : znver1 : -march=znver1 ;
-cpu-flags gcc OPTIONS : x86 : winchip-c6 : -march=winchip-c6 ;
-cpu-flags gcc OPTIONS : x86 : winchip2 : -march=winchip2 ;
-cpu-flags gcc OPTIONS : x86 : c3 : -march=c3 ;
@@ -140,4 +147,5 @@
-# AIX variant of RS/6000 & PowerPC
-toolset.flags gcc AROPTIONS <address-model>64/<target-os>aix : "-X64" ;
--
-2.8.0
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.64.0.bb b/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.64.0.bb
deleted file mode 100644
index d1c20e1..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.64.0.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require boost-${PV}.inc
-require boost.inc
-
-SRC_URI += "\
- file://arm-intrinsics.patch \
- file://boost-CVE-2012-2677.patch \
- file://0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch \
- file://boost-math-disable-pch-for-gcc.patch \
- file://0001-Apply-boost-1.62.0-no-forced-flags.patch.patch \
- file://0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \
- file://0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch \
- file://0001-correct-error-which-appeared-when-compiling-non-c-co.patch \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.66.0.bb b/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.66.0.bb
new file mode 100644
index 0000000..63b82a5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.66.0.bb
@@ -0,0 +1,11 @@
+require boost-${PV}.inc
+require boost.inc
+
+SRC_URI += "\
+ file://arm-intrinsics.patch \
+ file://boost-CVE-2012-2677.patch \
+ file://boost-math-disable-pch-for-gcc.patch \
+ file://0001-Apply-boost-1.62.0-no-forced-flags.patch.patch \
+ file://0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \
+ file://0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/files/0001-Fix-a-strange-assert-typo-how-was-this-released-with.patch b/import-layers/yocto-poky/meta/recipes-support/boost/files/0001-Fix-a-strange-assert-typo-how-was-this-released-with.patch
new file mode 100644
index 0000000..a75133d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/files/0001-Fix-a-strange-assert-typo-how-was-this-released-with.patch
@@ -0,0 +1,37 @@
+From 5685527364198597f25fc1c6236cb64cbc3de44f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 4 Oct 2017 18:16:08 +0300
+Subject: [PATCH] Fix a strange assert typo; how was this released without
+ noticing?
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ tools/build/src/engine/debugger.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tools/build/src/engine/debugger.c b/tools/build/src/engine/debugger.c
+index 802f262..152a7e6 100644
+--- a/tools/build/src/engine/debugger.c
++++ b/tools/build/src/engine/debugger.c
+@@ -1092,7 +1092,7 @@ static void debug_start_child( int argc, const char * * argv )
+ PROCESS_INFORMATION pi = { NULL, NULL, 0, 0 };
+ STARTUPINFO si = { sizeof( STARTUPINFO ), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0 };
+- assert( DEBUG_STATE == DEBUG_NO_CHILD );
++ assert( debug_state == DEBUG_NO_CHILD );
+ if ( ! CreatePipe( &pipe1[ 0 ], &pipe1[ 1 ], &sa, 0 ) )
+ {
+ printf("internal error\n");
+@@ -1176,7 +1176,7 @@ static void debug_start_child( int argc, const char * * argv )
+ int read_fd;
+ int pid;
+ int i;
+- assert( DEBUG_STATE == DEBUG_NO_CHILD );
++ assert( debug_state == DEBUG_NO_CHILD );
+ pipe(pipe1);
+ pipe(pipe2);
+ pid = fork();
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-use-relative-symlinks-from-ET.patch b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-use-relative-symlinks-from-ET.patch
new file mode 100644
index 0000000..4bd967f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-use-relative-symlinks-from-ET.patch
@@ -0,0 +1,71 @@
+From a9fc13b2aee55655d58fcb77a3180fa99f96438a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
+Date: Wed, 28 Mar 2018 16:45:05 +0100
+Subject: [PATCH] update-ca-certificates: use relative symlinks from
+ $ETCCERTSDIR
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+update-ca-certificates symlinks (trusted) certificates
+from $CERTSDIR or $LOCALCERTSDIR into $ETCCERTSDIR.
+update-ca-certificates can call hook scripts installed
+into /etc/ca-certificates/update.d. Those scripts are
+passed the pem file in /etc/ssl/certs/ that was added or
+removed in this run and those pem files are absolute
+symlinks into $CERTSDIR or $LOCALCERTSDIR at the moment.
+
+When running update-ca-certificates during image build
+time, they thusly all point into the host's file system,
+not into the $SYSROOT. This means:
+* the host's file system layout must match the one
+ produced by OE, and
+* it also means that the host must have installed the same
+ (or more) certificates as the target in $CERTSDIR and
+ $LOCALCERTSDIR
+
+This is a problem when wanting to execute hook scripts,
+because they all need to be taught about $SYSROOT, and
+behave differently depending on whether they're called
+at image build time, or on the target, as otherwise they
+will be trying to actually read the host's certificates
+from $CERTSDIR or $LOCALCERTSDIR.
+
+This also is a problem when running anything else during
+image build time that depends on the trusted CA
+certificates.
+
+Changing the symlink to be relative solves all of these
+problems. Do so.
+
+Upstream-Status: Inappropriate [OE-specific]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+---
+ sbin/update-ca-certificates | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates
+index 00f80c7..7e911a9 100755
+--- a/sbin/update-ca-certificates
++++ b/sbin/update-ca-certificates
+@@ -29,6 +29,7 @@ CERTSDIR=$SYSROOT/usr/share/ca-certificates
+ LOCALCERTSDIR=$SYSROOT/usr/local/share/ca-certificates
+ CERTBUNDLE=ca-certificates.crt
+ ETCCERTSDIR=$SYSROOT/etc/ssl/certs
++FSROOT=../../../ # to get from $ETCCERTSDIR to the root of the file system
+ HOOKSDIR=$SYSROOT/etc/ca-certificates/update.d
+
+ while [ $# -gt 0 ];
+@@ -125,9 +126,10 @@ add() {
+ PEM="$ETCCERTSDIR/$(basename "$CERT" .crt | sed -e 's/ /_/g' \
+ -e 's/[()]/=/g' \
+ -e 's/,/_/g').pem"
+- if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "${CERT##$SYSROOT}" ]
++ DST="$(echo ${CERT} | sed -e "s|^$SYSROOT||" -e "s|^/|$FSROOT|" )"
++ if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "${DST}" ]
+ then
+- ln -sf "${CERT##$SYSROOT}" "$PEM"
++ ln -sf "${DST}" "$PEM"
+ echo "+$PEM" >> "$ADDED"
+ fi
+ # Add trailing newline to certificate, if it is missing (#635570)
diff --git a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20170717.bb b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20170717.bb
index e4ffbd3..3502948 100644
--- a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20170717.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20170717.bb
@@ -16,15 +16,17 @@
SRCREV = "34b8e19e541b8af4076616b2e170c7a70cdaded0"
-SRC_URI = "git://anonscm.debian.org/collab-maint/ca-certificates.git \
+SRC_URI = "git://salsa.debian.org/debian/ca-certificates.git;protocol=https \
file://0002-update-ca-certificates-use-SYSROOT.patch \
file://0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch \
file://update-ca-certificates-support-Toybox.patch \
file://default-sysroot.patch \
- file://sbindir.patch"
+ file://sbindir.patch \
+ file://0003-update-ca-certificates-use-relative-symlinks-from-ET.patch \
+ "
S = "${WORKDIR}/git"
-SYSROOT_DIRS_class-native += "/etc"
+SYSROOT_DIRS_class-native += "${sysconfdir} ${datadir}/ca-certificates"
inherit allarch
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch b/import-layers/yocto-poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch
index 74e5d99..a7db1b3 100644
--- a/import-layers/yocto-poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch
@@ -1,17 +1,21 @@
-[PATCH] replace krb5-config with pkg-config
+From ed70f0623708b8a6c1f58a5d243d87c5ff45b24d Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Tue, 26 Apr 2016 13:13:01 +0800
+Subject: [PATCH] replace krb5-config with pkg-config
Upstream-Status: Pending
Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
---
configure.ac | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
-index e99b303..dc93f39 100644
+index 5569a26..56b0380 100755
--- a/configure.ac
+++ b/configure.ac
-@@ -1196,7 +1196,7 @@ AC_ARG_WITH(gssapi,
+@@ -1290,7 +1290,7 @@ AC_ARG_WITH(gssapi,
fi
])
@@ -20,7 +24,7 @@
save_CPPFLAGS="$CPPFLAGS"
AC_MSG_CHECKING([if GSS-API support is requested])
-@@ -1207,7 +1207,7 @@ if test x"$want_gss" = xyes; then
+@@ -1301,7 +1301,7 @@ if test x"$want_gss" = xyes; then
if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
elif test -f "$KRB5CONFIG"; then
@@ -29,7 +33,7 @@
elif test "$GSSAPI_ROOT" != "yes"; then
GSSAPI_INCS="-I$GSSAPI_ROOT/include"
fi
-@@ -1300,7 +1300,7 @@ if test x"$want_gss" = xyes; then
+@@ -1394,7 +1394,7 @@ if test x"$want_gss" = xyes; then
elif test -f "$KRB5CONFIG"; then
dnl krb5-config doesn't have --libs-only-L or similar, put everything
dnl into LIBS
@@ -38,6 +42,3 @@
LIBS="$gss_libs $LIBS"
else
case $host in
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000099.patch b/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000099.patch
deleted file mode 100644
index 96ff1b0..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000099.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From c9332fa5e84f24da300b42b1a931ade929d3e27d Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Tue, 1 Aug 2017 17:17:06 +0200
-Subject: [PATCH] file: output the correct buffer to the user
-
-Regression brought by 7c312f84ea930d8 (April 2017)
-
-CVE: CVE-2017-1000099
-
-Bug: https://curl.haxx.se/docs/adv_20170809C.html
-
-Credit to OSS-Fuzz for the discovery
-
-Upstream-Status: Backport
-https://github.com/curl/curl/commit/c9332fa5e84f24da300b42b1a931ade929d3e27d
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- lib/file.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/file.c b/lib/file.c
-index bd426eac2..666cbe75b 100644
---- a/lib/file.c
-+++ b/lib/file.c
-@@ -499,11 +499,11 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
- Curl_month[tm->tm_mon],
- tm->tm_year + 1900,
- tm->tm_hour,
- tm->tm_min,
- tm->tm_sec);
-- result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0);
-+ result = Curl_client_write(conn, CLIENTWRITE_BOTH, header, 0);
- if(!result)
- /* set the file size to make it available post transfer */
- Curl_pgrsSetDownloadSize(data, expected_size);
- return result;
- }
---
-2.13.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000100.patch b/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000100.patch
deleted file mode 100644
index f74f1dd..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000100.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 358b2b131ad6c095696f20dcfa62b8305263f898 Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg <daniel@haxx.se>
-Date: Tue, 1 Aug 2017 17:16:46 +0200
-Subject: [PATCH] tftp: reject file name lengths that don't fit
-
-... and thereby avoid telling send() to send off more bytes than the
-size of the buffer!
-
-CVE: CVE-2017-1000100
-
-Bug: https://curl.haxx.se/docs/adv_20170809B.html
-Reported-by: Even Rouault
-
-Credit to OSS-Fuzz for the discovery
-
-Upstream-Status: Backport
-https://github.com/curl/curl/commit/358b2b131ad6c095696f20dcfa62b8305263f898
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- lib/tftp.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/lib/tftp.c b/lib/tftp.c
-index 02bd842..f6f4bce 100644
---- a/lib/tftp.c
-+++ b/lib/tftp.c
-@@ -5,7 +5,7 @@
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
-- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
-+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
-@@ -491,6 +491,11 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event)
- if(result)
- return result;
-
-+ if(strlen(filename) > (state->blksize - strlen(mode) - 4)) {
-+ failf(data, "TFTP file name too long\n");
-+ return CURLE_TFTP_ILLEGAL; /* too long file name field */
-+ }
-+
- snprintf((char *)state->spacket.data+2,
- state->blksize,
- "%s%c%s%c", filename, '\0', mode, '\0');
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000101.patch b/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000101.patch
deleted file mode 100644
index c300fff..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000101.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From 453e7a7a03a2cec749abd3878a48e728c515cca7 Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg <daniel@haxx.se>
-Date: Tue, 1 Aug 2017 17:16:07 +0200
-Subject: [PATCH] glob: do not continue parsing after a strtoul() overflow
- range
-
-Added test 1289 to verify.
-
-CVE: CVE-2017-1000101
-
-Bug: https://curl.haxx.se/docs/adv_20170809A.html
-Reported-by: Brian Carpenter
-
-Upstream-Status: Backport
-https://github.com/curl/curl/commit/453e7a7a03a2cec749abd3878a48e728c515cca7
-
-Rebase the tests/data/Makefile.inc changes for curl 7.54.1.
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- src/tool_urlglob.c | 5 ++++-
- tests/data/Makefile.inc | 2 +-
- tests/data/test1289 | 35 +++++++++++++++++++++++++++++++++++
- 3 files changed, 40 insertions(+), 2 deletions(-)
- create mode 100644 tests/data/test1289
-
-diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c
-index 6b1ece0..d56dcd9 100644
---- a/src/tool_urlglob.c
-+++ b/src/tool_urlglob.c
-@@ -273,7 +273,10 @@ static CURLcode glob_range(URLGlob *glob, char **patternp,
- }
- errno = 0;
- max_n = strtoul(pattern, &endp, 10);
-- if(errno || (*endp == ':')) {
-+ if(errno)
-+ /* overflow */
-+ endp = NULL;
-+ else if(*endp == ':') {
- pattern = endp+1;
- errno = 0;
- step_n = strtoul(pattern, &endp, 10);
-diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
-index 155320a..7adbee6 100644
---- a/tests/data/Makefile.inc
-+++ b/tests/data/Makefile.inc
-@@ -132,7 +132,7 @@ test1252 test1253 test1254 test1255 test1256 test1257 test1258 test1259 \
- test1260 test1261 test1262 \
- \
- test1280 test1281 test1282 test1283 test1284 test1285 test1286 test1287 \
--test1288 \
-+test1288 test1289 \
- \
- test1300 test1301 test1302 test1303 test1304 test1305 test1306 test1307 \
- test1308 test1309 test1310 test1311 test1312 test1313 test1314 test1315 \
-diff --git a/tests/data/test1289 b/tests/data/test1289
-new file mode 100644
-index 0000000..d679cc0
---- /dev/null
-+++ b/tests/data/test1289
-@@ -0,0 +1,35 @@
-+<testcase>
-+<info>
-+<keywords>
-+HTTP
-+HTTP GET
-+globbing
-+</keywords>
-+</info>
-+
-+#
-+# Server-side
-+<reply>
-+</reply>
-+
-+# Client-side
-+<client>
-+<server>
-+http
-+</server>
-+<name>
-+globbing with overflow and bad syntxx
-+</name>
-+<command>
-+http://ur%20[0-60000000000000000000
-+</command>
-+</client>
-+
-+# Verify data after the test has been "shot"
-+<verify>
-+# curl: (3) [globbing] bad range in column
-+<errorcode>
-+3
-+</errorcode>
-+</verify>
-+</testcase>
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000254.patch b/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000254.patch
deleted file mode 100644
index 2b0798b..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000254.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-From 1b2eba6f9745c064f7283e0ada8f46df9d9d6e42 Mon Sep 17 00:00:00 2001
-From: Li Zhou <li.zhou@windriver.com>
-Date: Mon, 23 Oct 2017 00:26:50 -0700
-Subject: [PATCH] FTP: zero terminate the entry path even on bad input
-
-... a single double quote could leave the entry path buffer without a zero
-terminating byte. CVE-2017-1000254
-
-Test 1152 added to verify.
-
-Reported-by: Max Dymond
-Bug: https://curl.haxx.se/docs/adv_20171004.html
-
-Upstream-Status: Backport
-CVE: CVE-2017-1000254
-Signed-off-by: Li Zhou <li.zhou@windriver.com>
----
- lib/ftp.c | 7 ++++--
- tests/data/Makefile.inc | 2 ++
- tests/data/test1152 | 61 +++++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 68 insertions(+), 2 deletions(-)
- create mode 100644 tests/data/test1152
-
-diff --git a/lib/ftp.c b/lib/ftp.c
-index 5edec37..493dbf9 100644
---- a/lib/ftp.c
-+++ b/lib/ftp.c
-@@ -2826,6 +2826,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
- const size_t buf_size = data->set.buffer_size;
- char *dir;
- char *store;
-+ bool entry_extracted = FALSE;
-
- dir = malloc(nread + 1);
- if(!dir)
-@@ -2857,7 +2858,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
- }
- else {
- /* end of path */
-- *store = '\0'; /* zero terminate */
-+ entry_extracted = TRUE;
- break; /* get out of this loop */
- }
- }
-@@ -2866,7 +2867,9 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
- store++;
- ptr++;
- }
--
-+ *store = '\0'; /* zero terminate */
-+ }
-+ if(entry_extracted) {
- /* If the path name does not look like an absolute path (i.e.: it
- does not start with a '/'), we probably need some server-dependent
- adjustments. For example, this is the case when connecting to
-diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
-index 7adbee6..5284654 100644
---- a/tests/data/Makefile.inc
-+++ b/tests/data/Makefile.inc
-@@ -121,6 +121,8 @@ test1120 test1121 test1122 test1123 test1124 test1125 test1126 test1127 \
- test1128 test1129 test1130 test1131 test1132 test1133 test1134 test1135 \
- test1136 test1137 test1138 test1139 test1140 test1141 test1142 test1143 \
- test1144 test1145 test1146 \
-+test1152 \
-+\
- test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
- test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \
- test1216 test1217 test1218 test1219 \
-diff --git a/tests/data/test1152 b/tests/data/test1152
-new file mode 100644
-index 0000000..aa8c0a7
---- /dev/null
-+++ b/tests/data/test1152
-@@ -0,0 +1,61 @@
-+<testcase>
-+<info>
-+<keywords>
-+FTP
-+PASV
-+LIST
-+</keywords>
-+</info>
-+#
-+# Server-side
-+<reply>
-+<servercmd>
-+REPLY PWD 257 "just one
-+</servercmd>
-+
-+# When doing LIST, we get the default list output hard-coded in the test
-+# FTP server
-+<data mode="text">
-+total 20
-+drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
-+drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
-+drwxr-xr-x 2 98 98 512 May 2 1996 curl-releases
-+-r--r--r-- 1 0 1 35 Jul 16 1996 README
-+lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin
-+dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev
-+drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
-+dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
-+drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
-+dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
-+</data>
-+</reply>
-+
-+#
-+# Client-side
-+<client>
-+<server>
-+ftp
-+</server>
-+ <name>
-+FTP with uneven quote in PWD response
-+ </name>
-+ <command>
-+ftp://%HOSTIP:%FTPPORT/test-1152/
-+</command>
-+</client>
-+
-+#
-+# Verify data after the test has been "shot"
-+<verify>
-+<protocol>
-+USER anonymous
-+PASS ftp@example.com
-+PWD
-+CWD test-1152
-+EPSV
-+TYPE A
-+LIST
-+QUIT
-+</protocol>
-+</verify>
-+</testcase>
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl/configure_ac.patch b/import-layers/yocto-poky/meta/recipes-support/curl/curl/configure_ac.patch
deleted file mode 100644
index b8bd304..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/curl/curl/configure_ac.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Upstream-Status: Pending
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -281,7 +281,7 @@ dnl ************************************
-
- CURL_CHECK_COMPILER
- CURL_SET_COMPILER_BASIC_OPTS
--CURL_SET_COMPILER_DEBUG_OPTS
-+dnl CURL_SET_COMPILER_DEBUG_OPTS
- CURL_SET_COMPILER_OPTIMIZE_OPTS
- CURL_SET_COMPILER_WARNING_OPTS
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl/reproducible-mkhelp.patch b/import-layers/yocto-poky/meta/recipes-support/curl/curl/reproducible-mkhelp.patch
deleted file mode 100644
index 268bbeb..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/curl/curl/reproducible-mkhelp.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 1fe92fd3dd64c7228f6ff41e3fc16c4f2392471a Mon Sep 17 00:00:00 2001
-From: Juro Bystricky <juro.bystricky@intel.com>
-Date: Fri, 27 Oct 2017 08:28:25 -0700
-Subject: mkhelp.pl: support reproducible build
-
-Do not generate line with the current date, such as:
-
-* Generation time: Tue Oct-24 18:01:41 2017
-
-This will improve reproducibility. The generated string is only
-part of a comment, so there should be no adverse consequences.
-
-Upstream-Status: Submitted [ https://github.com/curl/curl/pull/2026 ]
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
-diff --git a/src/mkhelp.pl b/src/mkhelp.pl
-index 270daa2..757f024 100755
---- a/src/mkhelp.pl
-+++ b/src/mkhelp.pl
-@@ -102,11 +102,9 @@ while(<READ>) {
- }
- close(READ);
-
--$now = localtime;
- print <<HEAD
- /*
- * NEVER EVER edit this manually, fix the mkhelp.pl script instead!
-- * Generation time: $now
- */
- #ifdef USE_MANUAL
- #include "tool_hugehelp.h"
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.54.1.bb b/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.54.1.bb
deleted file mode 100644
index 58f0531..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.54.1.bb
+++ /dev/null
@@ -1,87 +0,0 @@
-SUMMARY = "Command line tool and library for client-side URL transfers"
-HOMEPAGE = "http://curl.haxx.se/"
-BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker"
-SECTION = "console/network"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;beginline=8;md5=3a34942f4ae3fbf1a303160714e664ac"
-
-SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
- file://0001-replace-krb5-config-with-pkg-config.patch \
- file://CVE-2017-1000099.patch \
- file://CVE-2017-1000100.patch \
- file://CVE-2017-1000101.patch \
- file://CVE-2017-1000254.patch \
-"
-
-SRC_URI_append_class-target = " \
- file://reproducible-mkhelp.patch \
-"
-
-# curl likes to set -g0 in CFLAGS, so we stop it
-# from mucking around with debug options
-#
-SRC_URI += " file://configure_ac.patch"
-
-SRC_URI[md5sum] = "6b6eb722f512e7a24855ff084f54fe55"
-SRC_URI[sha256sum] = "fdfc4df2d001ee0c44ec071186e770046249263c491fcae48df0e1a3ca8f25a0"
-
-CVE_PRODUCT = "libcurl"
-inherit autotools pkgconfig binconfig multilib_header
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} gnutls proxy threaded-resolver zlib"
-PACKAGECONFIG_class-native = "ipv6 proxy ssl threaded-resolver zlib"
-PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl threaded-resolver zlib"
-
-# 'ares' and 'threaded-resolver' are mutually exclusive
-PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares"
-PACKAGECONFIG[dict] = "--enable-dict,--disable-dict,"
-PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
-PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher,"
-PACKAGECONFIG[imap] = "--enable-imap,--disable-imap,"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,"
-PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,"
-PACKAGECONFIG[libidn] = "--with-libidn,--without-libidn,libidn"
-PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
-PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3,"
-PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy,"
-PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
-PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp,"
-PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,"
-PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp,"
-PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl"
-PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet,"
-PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp,"
-PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver"
-PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
-PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5"
-PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2"
-
-EXTRA_OECONF = " \
- --enable-crypto-auth \
- --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
- --without-libmetalink \
- --without-libpsl \
-"
-
-do_install_append() {
- oe_multilib_header curl/curlbuild.h
-}
-
-do_install_append_class-target() {
- # cleanup buildpaths from curl-config
- sed -i \
- -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
- -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
- -e 's|${DEBUG_PREFIX_MAP}||g' \
- ${D}${bindir}/curl-config
-}
-
-PACKAGES =+ "lib${BPN}"
-
-FILES_lib${BPN} = "${libdir}/lib*.so.*"
-RRECOMMENDS_lib${BPN} += "ca-certificates"
-
-FILES_${PN} += "${datadir}/zsh"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.60.0.bb b/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.60.0.bb
new file mode 100644
index 0000000..fe04fa6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.60.0.bb
@@ -0,0 +1,70 @@
+SUMMARY = "Command line tool and library for client-side URL transfers"
+HOMEPAGE = "http://curl.haxx.se/"
+BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker"
+SECTION = "console/network"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;beginline=8;md5=3a34942f4ae3fbf1a303160714e664ac"
+
+SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
+ file://0001-replace-krb5-config-with-pkg-config.patch \
+"
+
+SRC_URI[md5sum] = "bd2aabf78ded6a9aec8a54532fd6b5d7"
+SRC_URI[sha256sum] = "897dfb2204bd99be328279f88f55b7c61592216b0542fcbe995c60aa92871e9b"
+
+CVE_PRODUCT = "libcurl"
+inherit autotools pkgconfig binconfig multilib_header
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} gnutls proxy threaded-resolver zlib"
+PACKAGECONFIG_class-native = "ipv6 proxy ssl threaded-resolver zlib"
+PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl threaded-resolver zlib"
+
+# 'ares' and 'threaded-resolver' are mutually exclusive
+PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares"
+PACKAGECONFIG[dict] = "--enable-dict,--disable-dict,"
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher,"
+PACKAGECONFIG[imap] = "--enable-imap,--disable-imap,"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5"
+PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,"
+PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,"
+PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2"
+PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
+PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2"
+PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3,"
+PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy,"
+PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
+PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp,"
+PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,"
+PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp,"
+PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl"
+PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet,"
+PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp,"
+PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver"
+PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
+
+EXTRA_OECONF = " \
+ --enable-crypto-auth \
+ --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
+ --without-libmetalink \
+ --without-libpsl \
+"
+
+do_install_append_class-target() {
+ # cleanup buildpaths from curl-config
+ sed -i \
+ -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ ${D}${bindir}/curl-config
+}
+
+PACKAGES =+ "lib${BPN}"
+
+FILES_lib${BPN} = "${libdir}/lib*.so.*"
+RRECOMMENDS_lib${BPN} += "ca-certificates"
+
+FILES_${PN} += "${datadir}/zsh"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/db/db_5.3.28.bb b/import-layers/yocto-poky/meta/recipes-support/db/db_5.3.28.bb
index fb4befb..093ee44 100644
--- a/import-layers/yocto-poky/meta/recipes-support/db/db_5.3.28.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/db/db_5.3.28.bb
@@ -12,9 +12,11 @@
SUMMARY = "Berkeley Database v5"
HOMEPAGE = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
LICENSE = "Sleepycat"
-VIRTUAL_NAME ?= "virtual/db"
RCONFLICTS_${PN} = "db3"
+CVE_PRODUCT = "oracle_berkeley_db"
+CVE_VERSION = "11.2.${PV}"
+
PR = "r1"
PE = "1"
@@ -37,15 +39,6 @@
inherit autotools
-# Put virtual/db in any appropriate provider of a
-# relational database, use it as a dependency in
-# place of a specific db and use:
-#
-# PREFERRED_PROVIDER_virtual/db
-#
-# to select the correct db in the build (distro) .conf
-PROVIDES += "${VIRTUAL_NAME}"
-
# The executables go in a separate package - typically there
# is no need to install these unless doing real database
# management on the system.
diff --git a/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.1.1.bb b/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.1.1.bb
deleted file mode 100644
index 1857d4b..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.1.1.bb
+++ /dev/null
@@ -1,55 +0,0 @@
-SUMMARY = "Miscellaneous utilities specific to Debian"
-SECTION = "base"
-LICENSE = "GPLv2 & SMAIL_GPL"
-LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f"
-
-SRC_URI = "http://snapshot.debian.org/archive/debian/20170402T211732Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz"
-# the package is taken from snapshots.debian.org; that source is static and goes stale
-# so we check the latest upstream from a directory that does get updated
-UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/"
-
-SRC_URI[md5sum] = "ee5fcecaab071bd0c93e8a0cee65d6c4"
-SRC_URI[sha256sum] = "06446cd4c0d309fd31a0682c5c2f07f7613fb867f769414b9cc51f155ad73172"
-
-inherit autotools update-alternatives
-
-do_configure_prepend() {
- sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am
-}
-
-do_install_append() {
- if [ "${base_bindir}" != "${bindir}" ]; then
- # Debian places some utils into ${base_bindir} as does busybox
- install -d ${D}${base_bindir}
- for app in run-parts tempfile; do
- mv ${D}${bindir}/$app ${D}${base_bindir}/$app
- done
- fi
-}
-
-# Note that we package the update-alternatives name.
-#
-PACKAGES =+ "${PN}-run-parts"
-FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils"
-
-RDEPENDS_${PN} += "${PN}-run-parts"
-RDEPENDS_${PN}_class-native = ""
-
-ALTERNATIVE_PRIORITY="30"
-ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which"
-
-ALTERNATIVE_PRIORITY_${PN}-run-parts = "60"
-ALTERNATIVE_${PN}-run-parts = "run-parts"
-
-ALTERNATIVE_${PN}-doc = "which.1"
-ALTERNATIVE_LINK_NAME[which.1] = "${mandir}/man1/which.1"
-
-ALTERNATIVE_LINK_NAME[add-shell]="${sbindir}/add-shell"
-ALTERNATIVE_LINK_NAME[installkernel]="${sbindir}/installkernel"
-ALTERNATIVE_LINK_NAME[remove-shell]="${sbindir}/remove-shell"
-ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts"
-ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog"
-ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile"
-ALTERNATIVE_LINK_NAME[which]="${bindir}/which"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.4.bb b/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.4.bb
new file mode 100644
index 0000000..300e6f1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.4.bb
@@ -0,0 +1,57 @@
+SUMMARY = "Miscellaneous utilities specific to Debian"
+SECTION = "base"
+LICENSE = "GPLv2 & SMAIL_GPL"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f"
+
+SRC_URI = "http://snapshot.debian.org/archive/debian/20180129T164727Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz"
+# the package is taken from snapshots.debian.org; that source is static and goes stale
+# so we check the latest upstream from a directory that does get updated
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/"
+
+SRC_URI[md5sum] = "a6dcd496b4f79b3c452c3a74c2d3f89c"
+SRC_URI[sha256sum] = "c061ab99aea61f892043b7624b021ab5b193e9c6bbfd474da0fbcdd506be1eb2"
+
+S = "${WORKDIR}/${BPN}"
+
+inherit autotools update-alternatives
+
+do_configure_prepend() {
+ sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am
+}
+
+do_install_append() {
+ if [ "${base_bindir}" != "${bindir}" ]; then
+ # Debian places some utils into ${base_bindir} as does busybox
+ install -d ${D}${base_bindir}
+ for app in run-parts tempfile; do
+ mv ${D}${bindir}/$app ${D}${base_bindir}/$app
+ done
+ fi
+}
+
+# Note that we package the update-alternatives name.
+#
+PACKAGES =+ "${PN}-run-parts"
+FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils"
+
+RDEPENDS_${PN} += "${PN}-run-parts"
+RDEPENDS_${PN}_class-native = ""
+
+ALTERNATIVE_PRIORITY="30"
+ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which"
+
+ALTERNATIVE_PRIORITY_${PN}-run-parts = "60"
+ALTERNATIVE_${PN}-run-parts = "run-parts"
+
+ALTERNATIVE_${PN}-doc = "which.1"
+ALTERNATIVE_LINK_NAME[which.1] = "${mandir}/man1/which.1"
+
+ALTERNATIVE_LINK_NAME[add-shell]="${sbindir}/add-shell"
+ALTERNATIVE_LINK_NAME[installkernel]="${sbindir}/installkernel"
+ALTERNATIVE_LINK_NAME[remove-shell]="${sbindir}/remove-shell"
+ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts"
+ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog"
+ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile"
+ALTERNATIVE_LINK_NAME[which]="${bindir}/which"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.13.bb b/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.13.bb
deleted file mode 100644
index 4bbe147..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.13.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "Key/value database library with extensible hashing"
-HOMEPAGE = "http://www.gnu.org/software/gdbm/"
-SECTION = "libs"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=241da1b9fe42e642cbb2c24d5e0c4d24"
-
-
-SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
- file://run-ptest \
- file://ptest.patch \
- "
-
-SRC_URI[md5sum] = "8929dcda2a8de3fd2367bdbf66769376"
-SRC_URI[sha256sum] = "9d252cbd7d793f7b12bcceaddda98d257c14f4d1890d851c386c37207000a253"
-
-inherit autotools gettext texinfo lib_package ptest
-
-# Needed for dbm python module
-EXTRA_OECONF = "-enable-libgdbm-compat"
-
-# Stop presence of dbm/nbdm on the host contaminating builds
-CACHED_CONFIGUREVARS += "ac_cv_lib_ndbm_main=no ac_cv_lib_dbm_main=no"
-
-BBCLASSEXTEND = "native nativesdk"
-
-do_install_append () {
- # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find
- # these headers
- install -d ${D}${includedir}/gdbm
- ln -sf ../ndbm.h ${D}/${includedir}/gdbm/ndbm.h
- ln -sf ../gdbm.h ${D}/${includedir}/gdbm/gdbm.h
-}
-
-RDEPENDS_${PN}-ptest += "diffutils"
-
-do_compile_ptest() {
- oe_runmake -C tests buildtests
-}
-
-PACKAGES =+ "${PN}-compat \
- "
-FILES_${PN}-compat = "${libdir}/libgdbm_compat${SOLIBS} \
- "
diff --git a/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.14.1.bb b/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.14.1.bb
new file mode 100644
index 0000000..54e5696
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.14.1.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Key/value database library with extensible hashing"
+HOMEPAGE = "http://www.gnu.org/software/gdbm/"
+SECTION = "libs"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=241da1b9fe42e642cbb2c24d5e0c4d24"
+
+
+SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
+ file://run-ptest \
+ file://ptest.patch \
+ "
+
+SRC_URI[md5sum] = "c2ddcb3897efa0f57484af2bd4f4f848"
+SRC_URI[sha256sum] = "cdceff00ffe014495bed3aed71c7910aa88bf29379f795abc0f46d4ee5f8bc5f"
+
+inherit autotools gettext texinfo lib_package ptest
+
+# Needed for dbm python module
+EXTRA_OECONF = "-enable-libgdbm-compat"
+
+# Stop presence of dbm/nbdm on the host contaminating builds
+CACHED_CONFIGUREVARS += "ac_cv_lib_ndbm_main=no ac_cv_lib_dbm_main=no"
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_install_append () {
+ # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find
+ # these headers
+ install -d ${D}${includedir}/gdbm
+ ln -sf ../ndbm.h ${D}/${includedir}/gdbm/ndbm.h
+ ln -sf ../gdbm.h ${D}/${includedir}/gdbm/gdbm.h
+}
+
+RDEPENDS_${PN}-ptest += "diffutils"
+
+do_compile_ptest() {
+ oe_runmake -C tests buildtests
+}
+
+PACKAGES =+ "${PN}-compat \
+ "
+FILES_${PN}-compat = "${libdir}/libgdbm_compat${SOLIBS} \
+ "
diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/0001-confiure.ac-Believe-the-cflags-from-environment.patch b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/0001-confiure.ac-Believe-the-cflags-from-environment.patch
index 6653676..1e47924 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/0001-confiure.ac-Believe-the-cflags-from-environment.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/0001-confiure.ac-Believe-the-cflags-from-environment.patch
@@ -18,13 +18,13 @@
configure.ac | 11 -----------
1 file changed, 11 deletions(-)
-diff --git a/configure.ac b/configure.ac
-index 857ea3b..359e919 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -607,15 +607,6 @@ case $host in
- GMP_INCLUDE_MPN(arm/arm-defs.m4)
- CALLING_CONVENTIONS_OBJS='arm32call.lo arm32check.lo'
+Index: gmp-6.1.2/configure.ac
+===================================================================
+--- gmp-6.1.2.orig/configure.ac
++++ gmp-6.1.2/configure.ac
+@@ -604,15 +604,6 @@ case $host in
+ any_32_testlist="sizeof-long-4"
+ any_64_testlist="sizeof-long-8"
- # This is needed for clang, which is not content with flags like -mfpu=neon
- # alone.
@@ -38,7 +38,7 @@
# FIXME: We make mandatory compiler options optional here. We should
# either enforce them, or organise to strip paths as the corresponding
# options fail.
-@@ -686,8 +677,6 @@ case $host in
+@@ -746,8 +737,6 @@ case $host in
;;
*)
path="arm"
@@ -47,6 +47,3 @@
;;
esac
;;
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/amd64.patch b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/amd64.patch
index 564d12d..3935589 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/amd64.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/amd64.patch
@@ -1,10 +1,10 @@
Upstream-Status: Pending
-Index: gmp-5.0.3/longlong.h
+Index: gmp-6.1.2/longlong.h
===================================================================
---- gmp-5.0.3.orig/longlong.h
-+++ gmp-5.0.3/longlong.h
-@@ -994,8 +994,10 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
+--- gmp-6.1.2.orig/longlong.h
++++ gmp-6.1.2/longlong.h
+@@ -1036,8 +1036,10 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype
count is only an int. */
#define count_trailing_zeros(count, x) \
do { \
@@ -14,5 +14,5 @@
+ __asm__ ("bsfq %1,%0" : "=r" (__cbtmp) : "rm" ((UDItype)(x))); \
+ (count) = __cbtmp; \
} while (0)
- #endif /* x86_64 */
+ #endif /* __amd64__ */
diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/use-includedir.patch b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/use-includedir.patch
index 74904a2..6b089cf 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/use-includedir.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/use-includedir.patch
@@ -1,15 +1,15 @@
Upstream-Status: Pending
-Index: gmp-4.2.4/Makefile.am
+Index: gmp-6.1.2/Makefile.am
===================================================================
---- gmp-4.2.4.orig/Makefile.am 2008-09-10 19:31:27.000000000 +0000
-+++ gmp-4.2.4/Makefile.am 2009-07-06 20:19:19.000000000 +0000
-@@ -106,7 +106,7 @@
- # but anyone knowledgable enough to be playing with exec_prefix will be able
+--- gmp-6.1.2.orig/Makefile.am
++++ gmp-6.1.2/Makefile.am
+@@ -130,7 +130,7 @@ EXTRA_DIST += gmpxx.h
+ # but anyone knowledgeable enough to be playing with exec_prefix will be able
# to address that.
#
-includeexecdir = $(exec_prefix)/include
+includeexecdir = $(includedir)
include_HEADERS = $(GMPXX_HEADERS_OPTION)
- nodist_includeexec_HEADERS = gmp.h $(MPBSD_HEADERS_OPTION)
- lib_LTLIBRARIES = libgmp.la $(GMPXX_LTLIBRARIES_OPTION) $(MPBSD_LTLIBRARIES_OPTION)
+ nodist_includeexec_HEADERS = gmp.h
+ lib_LTLIBRARIES = libgmp.la $(GMPXX_LTLIBRARIES_OPTION)
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch
new file mode 100644
index 0000000..3e3a64d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch
@@ -0,0 +1,30 @@
+From 0b97148c3aad0993a9aeb088596fa63a2fec5328 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 22 Jan 2018 18:00:21 +0200
+Subject: [PATCH] configure.ac: use a custom value for the location of
+ gpg-agent socket in the filesystem
+
+This should avoid clashes with the host gpg-agent observed on autobuilders.
+
+Upstream-Status: Inappropriate [oe-core specific, and only for -native]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 382ef1d..0570d7c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1818,7 +1818,7 @@ AC_DEFINE_UNQUOTED(GPGCONF_DISP_NAME, "GPGConf",
+
+ AC_DEFINE_UNQUOTED(GPGTAR_NAME, "gpgtar", [The name of the gpgtar tool])
+
+-AC_DEFINE_UNQUOTED(GPG_AGENT_SOCK_NAME, "S.gpg-agent",
++AC_DEFINE_UNQUOTED(GPG_AGENT_SOCK_NAME, "S.gpg-agent.yocto-native",
+ [The name of the agent socket])
+ AC_DEFINE_UNQUOTED(GPG_AGENT_EXTRA_SOCK_NAME, "S.gpg-agent.extra",
+ [The name of the agent socket for remote access])
+--
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.2.0.bb b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.2.0.bb
deleted file mode 100644
index 0176ddd..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.2.0.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)"
-HOMEPAGE = "http://www.gnupg.org/"
-LICENSE = "GPLv3 & LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=189af8afca6d6075ba6c9e0aa8077626 \
- file://COPYING.LGPL3;md5=a2b6bf2cb38ee52619e60f30a1fc7257"
-
-DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt"
-
-inherit autotools gettext texinfo pkgconfig
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch \
- file://0002-use-pkgconfig-instead-of-npth-config.patch \
- file://0003-dirmngr-uses-libgpg-error.patch \
- file://0004-autogen.sh-fix-find-version-for-beta-checking.patch \
- "
-
-SRC_URI[md5sum] = "789f16949fae2d003d387f49e9da4b74"
-SRC_URI[sha256sum] = "d4514a0be0f7a1ff263193330019eb4b53c82f0f5e230af3c14df371271a45e6"
-
-EXTRA_OECONF = "--disable-ldap \
- --disable-ccid-driver \
- --with-zlib=${STAGING_LIBDIR}/.. \
- --with-bzip2=${STAGING_LIBDIR}/.. \
- --with-readline=${STAGING_LIBDIR}/.. \
- --enable-gpg-is-gpg2 \
- "
-RRECOMMENDS_${PN} = "pinentry"
-
-do_configure_prepend () {
- # Else these could be used in prefernce to those in aclocal-copy
- rm -f ${S}/m4/gpg-error.m4
- rm -f ${S}/m4/libassuan.m4
- rm -f ${S}/m4/ksba.m4
- rm -f ${S}/m4/libgcrypt.m4
-}
-
-do_install_append() {
- ln -sf gpg2 ${D}${bindir}/gpg
- ln -sf gpgv2 ${D}${bindir}/gpgv
-}
-
-PACKAGECONFIG ??= "gnutls"
-PACKAGECONFIG[gnutls] = "--enable-gnutls, --disable-gnutls, gnutls"
-PACKAGECONFIG[sqlite3] = "--enable-sqlite, --disable-sqlite, sqlite3"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.2.4.bb b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.2.4.bb
new file mode 100644
index 0000000..d3f1a8f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.2.4.bb
@@ -0,0 +1,50 @@
+SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)"
+HOMEPAGE = "http://www.gnupg.org/"
+LICENSE = "GPLv3 & LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=189af8afca6d6075ba6c9e0aa8077626 \
+ file://COPYING.LGPL3;md5=a2b6bf2cb38ee52619e60f30a1fc7257"
+
+DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt"
+
+inherit autotools gettext texinfo pkgconfig
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch \
+ file://0002-use-pkgconfig-instead-of-npth-config.patch \
+ file://0003-dirmngr-uses-libgpg-error.patch \
+ file://0004-autogen.sh-fix-find-version-for-beta-checking.patch \
+ "
+SRC_URI_append_class-native = " file://0001-configure.ac-use-a-custom-value-for-the-location-of-.patch"
+
+
+SRC_URI[md5sum] = "709e5af5bba84d251c520222e720972f"
+SRC_URI[sha256sum] = "401a3e64780fdfa6d7670de0880aa5c9d589b3db7a7098979d7606cec546f2ec"
+
+EXTRA_OECONF = "--disable-ldap \
+ --disable-ccid-driver \
+ --with-zlib=${STAGING_LIBDIR}/.. \
+ --with-bzip2=${STAGING_LIBDIR}/.. \
+ --with-readline=${STAGING_LIBDIR}/.. \
+ --enable-gpg-is-gpg2 \
+ "
+RRECOMMENDS_${PN} = "pinentry"
+
+do_configure_prepend () {
+ # Else these could be used in prefernce to those in aclocal-copy
+ rm -f ${S}/m4/gpg-error.m4
+ rm -f ${S}/m4/libassuan.m4
+ rm -f ${S}/m4/ksba.m4
+ rm -f ${S}/m4/libgcrypt.m4
+}
+
+do_install_append() {
+ ln -sf gpg2 ${D}${bindir}/gpg
+ ln -sf gpgv2 ${D}${bindir}/gpgv
+}
+
+PACKAGECONFIG ??= "gnutls"
+PACKAGECONFIG[gnutls] = "--enable-gnutls, --disable-gnutls, gnutls"
+PACKAGECONFIG[sqlite3] = "--enable-sqlite, --disable-sqlite, sqlite3"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls.inc b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls.inc
index 29b5dd6..7bcb913 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls.inc
+++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls.inc
@@ -21,7 +21,7 @@
inherit autotools texinfo binconfig pkgconfig gettext lib_package gtk-doc
-PACKAGECONFIG ??= "libidn zlib"
+PACKAGECONFIG ??= "libidn"
# You must also have CONFIG_SECCOMP enabled in the kernel for
# seccomp to work.
@@ -32,7 +32,6 @@
PACKAGECONFIG[libtasn1] = "--with-included-libtasn1=no,--with-included-libtasn1,libtasn1"
PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit"
PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
EXTRA_OECONF = " \
--enable-doc \
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch
index f0b7ca2..b6e7bc9 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch
@@ -14,19 +14,16 @@
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/configure.ac b/configure.ac
-index 6907b21..7c70d9e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -948,7 +948,7 @@ YEAR=`date +%Y`
+Index: gnutls-3.5.16/configure.ac
+===================================================================
+--- gnutls-3.5.16.orig/configure.ac
++++ gnutls-3.5.16/configure.ac
+@@ -955,7 +955,7 @@ YEAR=`date +%Y`
AC_SUBST([YEAR], $YEAR)
for i in ${srcdir}/src/*-args.c.bak ${srcdir}/src/*-args.h.bak; do
- nam=$(basename $i|sed 's/.bak//g')
+ nam=$(basename $i|sed 's/\.bak$//')
if test "$create_libopts_links" = "yes";then
+ rm -f "src/$nam.stamp"
rm -f "src/$nam"
- AC_CONFIG_LINKS([src/$nam:$i])
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch
deleted file mode 100644
index ae141a5..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 18081068a97c00015aabc5fa321664951458ea0d Mon Sep 17 00:00:00 2001
-From: Fan Xin <fan.xin@jp.fujitsu.com>
-Date: Fri, 9 Jun 2017 15:20:31 +0900
-Subject: [PATCH] From cee80af1fe93f5b76765afeebfcc3b902768f5d6 Mon Sep 17
- 00:00:00 2001 From: Andre McCurdy <armccurdy@gmail.com> Date: Tue, 26 May
- 2015 21:41:24 -0700 Subject: [PATCH] use pkg-config to locate zlib
-
-AC_LIB_HAVE_LINKFLAGS can sometimes find host libs and is therefore not
-robust when cross-compiling. Remove it for zlib and use PKG_CHECK_MODULES
-instead.
-
-Removing AC_LIB_HAVE_LINKFLAGS for zlib also removes the --with-libz-prefix
-configure option. If zlib support is enabled, then failure to find zlib via
-pkg-config is now treated as a fatal error.
-
-Change based on ChromeOS gnutls 2.12.23 cross-compile fixes patch:
-
- https://chromium-review.googlesource.com/#/c/271661/
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-Rebase on gnutls 3.5.13
-
-Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
----
- configure.ac | 25 +++++++++----------------
- 1 file changed, 9 insertions(+), 16 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index c65268e..f6a18aa 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -735,28 +735,21 @@ AC_ARG_WITH(zlib, AS_HELP_STRING([--without-zlib],
- AC_MSG_CHECKING([whether to include zlib compression support])
- if test x$ac_zlib != xno; then
- AC_MSG_RESULT(yes)
-- AC_LIB_HAVE_LINKFLAGS(z,, [#include <zlib.h>], [compress (0, 0, 0, 0);])
-- if test x$ac_cv_libz != xyes; then
-- AC_MSG_WARN(
--***
--*** ZLIB was not found. You will not be able to use ZLIB compression.)
-- fi
- else
- AC_MSG_RESULT(no)
- fi
-
--PKG_CHECK_EXISTS(zlib, ZLIB_HAS_PKGCONFIG=y, ZLIB_HAS_PKGCONFIG=n)
--
- if test x$ac_zlib != xno; then
-- if test "$ZLIB_HAS_PKGCONFIG" = "y" ; then
-- if test "x$GNUTLS_REQUIRES_PRIVATE" = x; then
-- GNUTLS_REQUIRES_PRIVATE="Requires.private: zlib"
-- else
-- GNUTLS_REQUIRES_PRIVATE="$GNUTLS_REQUIRES_PRIVATE, zlib"
-- fi
-- LIBZ_PC=""
-+ PKG_CHECK_MODULES(ZLIB, zlib)
-+ HAVE_LIBZ=yes
-+ AC_DEFINE([HAVE_LIBZ], [1], [zlib is enabled])
-+ AC_SUBST(HAVE_LIBZ)
-+ LTLIBZ=$ZLIB_LIBS
-+ AC_SUBST(LTLIBZ)
-+ if test "x$GNUTLS_REQUIRES_PRIVATE" = x; then
-+ GNUTLS_REQUIRES_PRIVATE="Requires.private: zlib"
- else
-- LIBZ_PC=$LIBZ
-+ GNUTLS_REQUIRES_PRIVATE="$GNUTLS_REQUIRES_PRIVATE, zlib"
- fi
- fi
- AC_SUBST(LIBZ_PC)
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.5.13.bb b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.5.13.bb
deleted file mode 100644
index 35d7d09..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.5.13.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require gnutls.inc
-
-SRC_URI += "file://0001-configure.ac-fix-sed-command.patch \
- file://use-pkg-config-to-locate-zlib.patch \
- file://arm_eabi.patch \
- "
-SRC_URI[md5sum] = "4fd41ad86572933c2379b4cc321a0959"
-SRC_URI[sha256sum] = "79f5480ad198dad5bc78e075f4a40c4a315a1b2072666919d2d05a08aec13096"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.6.1.bb b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.6.1.bb
new file mode 100644
index 0000000..7624a20
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.6.1.bb
@@ -0,0 +1,9 @@
+require gnutls.inc
+
+SRC_URI += "file://0001-configure.ac-fix-sed-command.patch \
+ file://arm_eabi.patch \
+ "
+SRC_URI[md5sum] = "4b65ae3ffef59f3eeed51a6166ff12b3"
+SRC_URI[sha256sum] = "20b10d2c9994bc032824314714d0e84c0f19bdb3d715d8ed55beb7364a8ebaed"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/CVE-2017-10790.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/CVE-2017-10790.patch
deleted file mode 100644
index be84380..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/CVE-2017-10790.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From d8d805e1f2e6799bb2dff4871a8598dc83088a39 Mon Sep 17 00:00:00 2001
-From: Nikos Mavrogiannopoulos <nmav@redhat.com>
-Date: Thu, 22 Jun 2017 16:31:37 +0200
-Subject: [PATCH] _asn1_check_identifier: safer access to values read
-
-Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-
-http://git.savannah.gnu.org/gitweb/?p=libtasn1.git;a=commit;h=d8d805e1f2e6799bb2dff4871a8598dc83088a39
-Upstream-Status: Backport
-
-CVE: CVE-2017-10790
-
-Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- lib/parser_aux.c | 17 ++++++++++++-----
- 1 file changed, 12 insertions(+), 5 deletions(-)
-
-diff --git a/lib/parser_aux.c b/lib/parser_aux.c
-index 976ab38..786ea64 100644
---- a/lib/parser_aux.c
-+++ b/lib/parser_aux.c
-@@ -955,7 +955,7 @@ _asn1_check_identifier (asn1_node node)
- if (p2 == NULL)
- {
- if (p->value)
-- _asn1_strcpy (_asn1_identifierMissing, p->value);
-+ _asn1_str_cpy (_asn1_identifierMissing, sizeof(_asn1_identifierMissing), (char*)p->value);
- else
- _asn1_strcpy (_asn1_identifierMissing, "(null)");
- return ASN1_IDENTIFIER_NOT_FOUND;
-@@ -968,9 +968,15 @@ _asn1_check_identifier (asn1_node node)
- if (p2 && (type_field (p2->type) == ASN1_ETYPE_DEFAULT))
- {
- _asn1_str_cpy (name2, sizeof (name2), node->name);
-- _asn1_str_cat (name2, sizeof (name2), ".");
-- _asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
-- _asn1_strcpy (_asn1_identifierMissing, p2->value);
-+ if (p2->value)
-+ {
-+ _asn1_str_cat (name2, sizeof (name2), ".");
-+ _asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
-+ _asn1_str_cpy (_asn1_identifierMissing, sizeof(_asn1_identifierMissing), (char*)p2->value);
-+ }
-+ else
-+ _asn1_strcpy (_asn1_identifierMissing, "(null)");
-+
- p2 = asn1_find_node (node, name2);
- if (!p2 || (type_field (p2->type) != ASN1_ETYPE_OBJECT_ID) ||
- !(p2->type & CONST_ASSIGN))
-@@ -990,7 +996,8 @@ _asn1_check_identifier (asn1_node node)
- _asn1_str_cpy (name2, sizeof (name2), node->name);
- _asn1_str_cat (name2, sizeof (name2), ".");
- _asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
-- _asn1_strcpy (_asn1_identifierMissing, p2->value);
-+ _asn1_str_cpy (_asn1_identifierMissing, sizeof(_asn1_identifierMissing), (char*)p2->value);
-+
- p2 = asn1_find_node (node, name2);
- if (!p2 || (type_field (p2->type) != ASN1_ETYPE_OBJECT_ID)
- || !(p2->type & CONST_ASSIGN))
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.12.bb b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.12.bb
deleted file mode 100644
index 7a7571a..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.12.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Library for ASN.1 and DER manipulation"
-HOMEPAGE = "http://www.gnu.org/software/libtasn1/"
-
-LICENSE = "GPLv3+ & LGPLv2.1+"
-LICENSE_${PN}-bin = "GPLv3+"
-LICENSE_${PN} = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
- file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351"
-
-SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \
- file://dont-depend-on-help2man.patch \
- file://0001-stdint.m4-reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch \
- file://CVE-2017-10790.patch \
- "
-
-DEPENDS = "bison-native"
-
-SRC_URI[md5sum] = "5c724bd1f73aaf4a311833e1cd297b21"
-SRC_URI[sha256sum] = "6753da2e621257f33f5b051cc114d417e5206a0818fe0b1ecfd6153f70934753"
-
-inherit autotools texinfo binconfig lib_package gtk-doc
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.13.bb b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.13.bb
new file mode 100644
index 0000000..2d22386
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.13.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Library for ASN.1 and DER manipulation"
+HOMEPAGE = "http://www.gnu.org/software/libtasn1/"
+
+LICENSE = "GPLv3+ & LGPLv2.1+"
+LICENSE_${PN}-bin = "GPLv3+"
+LICENSE_${PN} = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
+ file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351"
+
+SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \
+ file://dont-depend-on-help2man.patch \
+ file://0001-stdint.m4-reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch \
+ "
+
+DEPENDS = "bison-native"
+
+SRC_URI[md5sum] = "ce2ba4d3088119b48e7531a703669c52"
+SRC_URI[sha256sum] = "7e528e8c317ddd156230c4e31d082cd13e7ddeb7a54824be82632209550c8cca"
+
+inherit autotools texinfo binconfig lib_package gtk-doc
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch
index 14a43ee..f1997e1 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch
@@ -1,7 +1,7 @@
-From 8ae149035c97d27cd2c624704d1651806c53577e Mon Sep 17 00:00:00 2001
+From 265faf8fe0acaca2043a248a4df02b0868ffa6de Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Wed, 16 Aug 2017 02:00:08 -0400
-Subject: [PATCH 1/5] pkgconfig
+Subject: [PATCH 1/4] pkgconfig
Update gpgme to use pkgconfig instead of -config files since its
simpler and less error prone when cross compiling.
@@ -25,10 +25,10 @@
create mode 100644 src/gpgme.pc.in
diff --git a/configure.ac b/configure.ac
-index 0dac6ce..6a9e507 100644
+index 6ea4bcd..2a0d528 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -866,6 +866,7 @@ AC_CONFIG_FILES(Makefile src/Makefile
+@@ -887,6 +887,7 @@ AC_CONFIG_FILES(Makefile src/Makefile
src/versioninfo.rc
src/gpgme.h)
AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config)
@@ -299,5 +299,5 @@
+Requires: libassuan gpg-error
\ No newline at end of file
--
-2.8.1
+1.8.3.1
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch
index f1f8c91..d20271e 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch
@@ -1,29 +1,28 @@
-From fb165c9bd96aca8c9ee3e4509c9b6e35d238ad2e Mon Sep 17 00:00:00 2001
-From: Mark Hatle <mark.hatle@windriver.com>
-Date: Wed, 16 Aug 2017 02:02:47 -0400
-Subject: [PATCH 2/5] gpgme/lang/python: gpg-error-config should not be used.
+From 30f7a694cc4568ecb24f77c83a6123ed3f4075fa Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 31 Jan 2018 10:44:19 +0800
+Subject: [PATCH] gpgme/lang/python: gpg-error-config should not be used
-gpg-error-config was modified by OE to always return an error. So we want
-to find an alternative way to retrieve whatever it is we need. It turns
-out that the system is just trying to find the path to the gpg-error.h, which
-we can pull in from the STAGING_INC environment.
+gpg-error-config was modified by OE to always return an error.
+So we want to find an alternative way to retrieve whatever it
+is we need.
Upstream-Status: Inappropriate [changes are specific to OE]
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Rebase to 1.9.0
+Rework to 1.10.0
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
- lang/python/setup.py.in | 15 ++-------------
- 1 file changed, 2 insertions(+), 13 deletions(-)
+ lang/python/setup.py.in | 10 +---------
+ 1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
-index bf4efa3..7c34487 100755
+index f9dda20..9f5d61f 100755
--- a/lang/python/setup.py.in
+++ b/lang/python/setup.py.in
-@@ -24,7 +24,6 @@ import glob
+@@ -26,7 +26,6 @@ import shutil
import subprocess
# Out-of-tree build of the gpg bindings.
@@ -31,35 +30,22 @@
gpgme_config_flags = ["--thread=pthread"]
gpgme_config = ["gpgme-config"] + gpgme_config_flags
gpgme_h = ""
-@@ -52,13 +51,6 @@ else:
- devnull = open(os.devnull, "w")
+@@ -174,14 +173,7 @@ class BuildExtFirstHack(build):
- try:
-- subprocess.check_call(gpg_error_config + ['--version'],
-- stdout=devnull)
--except:
-- sys.exit("Could not find gpg-error-config. " +
-- "Please install the libgpg-error development package.")
+ def _generate_errors_i(self):
+
+- try:
+- subprocess.check_call(gpg_error_config + ['--version'],
+- stdout=devnull)
+- except:
+- sys.exit("Could not find gpg-error-config. " +
+- "Please install the libgpg-error development package.")
-
--try:
- subprocess.check_call(gpgme_config + ['--version'],
- stdout=devnull)
- except:
-@@ -81,12 +73,9 @@ if not (major > 1 or (major == 1 and minor >= 7)):
- if not gpgme_h:
- gpgme_h = os.path.join(getconfig("prefix")[0], "include", "gpgme.h")
+- gpg_error_content = self._read_header("gpg-error.h", getconfig("cflags", config=gpg_error_config))
++ gpg_error_content = self._read_header("gpg-error.h", os.environ.get('CFLAGS').split())
--gpg_error_prefix = getconfig("prefix", config=gpg_error_config)[0]
--gpg_error_h = os.path.join(gpg_error_prefix, "include", "gpg-error.h")
-+gpg_error_h = os.path.join(os.getenv('STAGING_INCDIR'), "gpg-error.h")
- if not os.path.exists(gpg_error_h):
-- gpg_error_h = \
-- glob.glob(os.path.join(gpg_error_prefix, "include",
-- "*", "gpg-error.h"))[0]
-+ sys.exit("gpg_error_h not found: %s" % gpg_error_h)
-
- print("Building python gpg module using {} and {}.".format(gpgme_h, gpg_error_h))
-
+ filter_re = re.compile(r'GPG_ERR_[^ ]* =')
+ rewrite_re = re.compile(r' *(.*) = .*')
--
-2.8.1
+1.8.3.1
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch
index d383311..7c9cccc 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch
@@ -1,7 +1,7 @@
-From 62332eec752dd790f4dd071dfb0dbe86be377203 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 16 Aug 2017 02:05:34 -0400
-Subject: [PATCH 3/5] Correctly install python modules
+From 93aae34ee70b8d50b31a19a65d6ac8290cb148ae Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 30 Jan 2018 15:28:49 +0800
+Subject: [PATCH 2/4] Correctly install python modules
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
@@ -9,22 +9,25 @@
Rebase to 1.9.0
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+Rebase to 1.10.0
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
lang/python/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
-index d91ead9..67f7cdc 100644
+index 8d74cbd..ce4f0a5 100644
--- a/lang/python/Makefile.am
+++ b/lang/python/Makefile.am
-@@ -106,6 +106,7 @@ install-exec-local:
- cd python$${VERSION}-gpg ; \
- $$PYTHON setup.py install \
- --prefix $(DESTDIR)$(prefix) \
+@@ -91,6 +91,7 @@ install-exec-local:
+ --build-base="$$(basename "$${PYTHON}")-gpg" \
+ install \
+ --prefix "$(DESTDIR)$(prefix)" \
+ --install-lib=$(DESTDIR)${pythondir} \
- --record files.txt \
--verbose ; \
- cat files.txt >> ../install_files.txt ; \
+ done
+
--
-2.8.1
+1.8.3.1
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0004-python-import.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0004-python-import.patch
index 9307103..d2b039d 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0004-python-import.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0004-python-import.patch
@@ -1,7 +1,7 @@
-From ccbf028eea8815d3b16d6c34b527253a6b108ec3 Mon Sep 17 00:00:00 2001
+From 32ecc3f058307060e40af86127cd226248a73c41 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Wed, 16 Aug 2017 02:06:45 -0400
-Subject: [PATCH 4/5] python import
+Subject: [PATCH 3/4] python import
Don't check for output on stderr to know if an import worked, host inputrc and
sysroot readline can cause warnings on stderr.
@@ -30,5 +30,5 @@
else
AC_MSG_RESULT([no])
--
-2.8.1
+1.8.3.1
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch
index 7a6cc7b..963ae87 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch
@@ -1,7 +1,7 @@
-From 064ae4441e2c11329748a18157988f9e953f9752 Mon Sep 17 00:00:00 2001
+From 6dcedc4dd055af902719b1a1cb10daa935a27f58 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 13 Apr 2017 16:40:27 +0300
-Subject: [PATCH 5/5] gpgme-config: skip all /lib* or /usr/lib* directories in
+Subject: [PATCH 4/4] gpgme-config: skip all /lib* or /usr/lib* directories in
output
The logic was not working in multilib setups which use other
@@ -27,5 +27,5 @@
;;
-L*|-l*)
--
-2.8.1
+1.8.3.1
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0006-fix-build-path-issue.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0006-fix-build-path-issue.patch
new file mode 100644
index 0000000..8cc8983
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0006-fix-build-path-issue.patch
@@ -0,0 +1,37 @@
+From 180a5669e4a13a550b1b0dcef1689b6c0470fe54 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 31 Jan 2018 11:01:09 +0800
+Subject: [PATCH] fix build path issue
+
+Get the "--root" directory supplied to the "install" command,
+and use it as a prefix to strip off the purported filename
+encoded in bytecode files.
+
+Since --root added, we need to tweak --prefix and --install-lib
+to use relative path.
+
+Upstream-Status: Submitted [gnupg-devel@gnupg.org]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ lang/python/Makefile.am | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
+index ce4f0a5..5a468f1 100644
+--- a/lang/python/Makefile.am
++++ b/lang/python/Makefile.am
+@@ -90,8 +90,9 @@ install-exec-local:
+ build \
+ --build-base="$$(basename "$${PYTHON}")-gpg" \
+ install \
+- --prefix "$(DESTDIR)$(prefix)" \
+- --install-lib=$(DESTDIR)${pythondir} \
++ --root=${DESTDIR} \
++ --prefix "$(prefix)" \
++ --install-lib=${pythondir} \
+ --verbose ; \
+ done
+
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0007-qt-python-Add-variables-to-tests.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0007-qt-python-Add-variables-to-tests.patch
new file mode 100644
index 0000000..ce3745c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0007-qt-python-Add-variables-to-tests.patch
@@ -0,0 +1,78 @@
+From f47e8c6f9e461803468a64581d3640d873352eaa Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 1 Feb 2018 10:14:30 +0800
+Subject: [PATCH] qt/python: Add variables to tests
+
+* configure.ac, lang/python/Makefile.am:
+ New variable to `lang/python', set to `lang/python' if RUN_LANG_PYTHON_TESTS
+
+* configure.ac, lang/qt/Makefile.am:
+ New variable to `lang/qt', set to `lang/qt' if RUN_LANG_QT_TESTS
+
+Upstream-Status: Submitted [gnupg-devel@gnupg.org]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 11 +++++++++++
+ lang/python/Makefile.am | 3 +++
+ lang/qt/Makefile.am | 8 +++++++-
+ 3 files changed, 21 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 608c376..fad7467 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -536,6 +536,17 @@ AC_ARG_ENABLE(g13-test,
+ run_g13_test=$enableval)
+ AM_CONDITIONAL(RUN_G13_TESTS, test "$run_g13_test" = "yes")
+
++run_lang_python_test="yes"
++AC_ARG_ENABLE(lang-python-test,
++ AC_HELP_STRING([--disable-lang-python-test], [disable Python regression test]),
++ run_lang_python_test=$enableval)
++AM_CONDITIONAL(RUN_LANG_PYTHON_TESTS, test "$run_lang_python_test" = "yes")
++
++run_lang_qt_test="yes"
++AC_ARG_ENABLE(lang-qt-test,
++ AC_HELP_STRING([--disable-lang-qt-test], [disable Qt regression test]),
++ run_lang_qt_test=$enableval)
++AM_CONDITIONAL(RUN_LANG_QT_TESTS, test "$run_lang_qt_test" = "yes")
+
+ # Checks for header files.
+ AC_CHECK_HEADERS_ONCE([locale.h sys/select.h sys/uio.h argp.h
+diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
+index 8d74cbd..43b5d1e 100644
+--- a/lang/python/Makefile.am
++++ b/lang/python/Makefile.am
+@@ -24,7 +24,10 @@ EXTRA_DIST = \
+ examples \
+ src
+
++if RUN_LANG_PYTHON_TESTS
+ SUBDIRS = . tests
++endif
++
+
+ .PHONY: prepare
+ prepare: copystamp
+diff --git a/lang/qt/Makefile.am b/lang/qt/Makefile.am
+index ab85960..a244ede 100644
+--- a/lang/qt/Makefile.am
++++ b/lang/qt/Makefile.am
+@@ -19,6 +19,12 @@
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ # 02111-1307, USA
+
+-SUBDIRS = src tests doc
++if RUN_LANG_QT_TESTS
++qttests = tests
++else
++qttests =
++endif
++
++SUBDIRS = src ${qttests} doc
+
+ EXTRA_DIST = README
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.10.0.bb b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.10.0.bb
new file mode 100644
index 0000000..f015f3a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.10.0.bb
@@ -0,0 +1,86 @@
+SUMMARY = "High-level GnuPG encryption/signing API"
+DESCRIPTION = "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications. It provides a High-Level Crypto API for encryption, decryption, signing, signature verification and key management"
+HOMEPAGE = "http://www.gnupg.org/gpgme.html"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \
+ file://src/gpgme.h.in;endline=23;md5=9d157d08a69059344e6f82abd2d25781 \
+ file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \
+ file://0001-pkgconfig.patch \
+ file://0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch \
+ file://0003-Correctly-install-python-modules.patch \
+ file://0004-python-import.patch \
+ file://0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch \
+ file://0006-fix-build-path-issue.patch \
+ file://0007-qt-python-Add-variables-to-tests.patch \
+ "
+
+SRC_URI[md5sum] = "78b1533c593478982ee2fc548260c563"
+SRC_URI[sha256sum] = "1a8fed1197c3b99c35f403066bb344a26224d292afc048cfdfc4ccd5690a0693"
+
+DEPENDS = "libgpg-error libassuan"
+RDEPENDS_${PN}-cpp += "libstdc++"
+
+RDEPENDS_python2-gpg += "python-unixadmin"
+RDEPENDS_python3-gpg += "python3-unixadmin"
+
+BINCONFIG = "${bindir}/gpgme-config"
+
+# Note select python2 or python3, but you can't select both at the same time
+PACKAGECONFIG ??= "python3"
+PACKAGECONFIG[python2] = ",,python swig-native,"
+PACKAGECONFIG[python3] = ",,python3 swig-native,"
+
+# Default in configure.ac: "cl cpp python qt"
+# Supported: "cl cpp python python2 python3 qt"
+# python says 'search and find python2 or python3'
+
+# Building the C++ bindings for native requires a C++ compiler with C++11
+# support. Since these bindings are currently not needed, we can disable them.
+DEFAULT_LANGUAGES = ""
+DEFAULT_LANGUAGES_class-target = "cpp"
+LANGUAGES ?= "${DEFAULT_LANGUAGES}"
+LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' python2', '', d)}"
+LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3', '', d)}"
+
+PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}"
+PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}"
+
+EXTRA_OECONF += '--enable-languages="${LANGUAGES}" \
+ --disable-gpgconf-test \
+ --disable-gpg-test \
+ --disable-gpgsm-test \
+ --disable-g13-test \
+ --disable-lang-qt-test \
+ --disable-lang-python-test \
+'
+
+inherit autotools texinfo binconfig-disabled pkgconfig ${PYTHON_INHERIT}
+
+export PKG_CONFIG='pkg-config'
+
+BBCLASSEXTEND = "native nativesdk"
+
+PACKAGES =+ "${PN}-cpp"
+PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python2-gpg ', '', d)}"
+PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-gpg ', '', d)}"
+
+FILES_${PN}-cpp = "${libdir}/libgpgmepp.so.*"
+FILES_python2-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
+FILES_python3-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
+FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/* \
+ ${libdir}/cmake/* \
+"
+
+CFLAGS_append_libc-musl = " -D__error_t_defined "
+do_configure_prepend () {
+ # Else these could be used in preference to those in aclocal-copy
+ rm -f ${S}/m4/gpg-error.m4
+ rm -f ${S}/m4/libassuan.m4
+ rm -f ${S}/m4/python.m4
+}
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.9.0.bb b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.9.0.bb
deleted file mode 100644
index 065c346..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.9.0.bb
+++ /dev/null
@@ -1,77 +0,0 @@
-SUMMARY = "High-level GnuPG encryption/signing API"
-DESCRIPTION = "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications. It provides a High-Level Crypto API for encryption, decryption, signing, signature verification and key management"
-HOMEPAGE = "http://www.gnupg.org/gpgme.html"
-BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
-
-LICENSE = "GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \
- file://src/gpgme.h.in;endline=23;md5=9d157d08a69059344e6f82abd2d25781 \
- file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \
- file://0001-pkgconfig.patch \
- file://0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch \
- file://0003-Correctly-install-python-modules.patch \
- file://0004-python-import.patch \
- file://0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch \
- "
-
-SRC_URI[md5sum] = "1e00bb8ef04d1d05d5a0f19e143854c3"
-SRC_URI[sha256sum] = "1b29fedb8bfad775e70eafac5b0590621683b2d9869db994568e6401f4034ceb"
-
-DEPENDS = "libgpg-error libassuan"
-RDEPENDS_${PN}-cpp += "libstdc++"
-
-RDEPENDS_python2-gpg += "python-unixadmin"
-RDEPENDS_python3-gpg += "python3-unixadmin"
-
-BINCONFIG = "${bindir}/gpgme-config"
-
-# Note select python2 or python3, but you can't select both at the same time
-PACKAGECONFIG ??= "python3"
-PACKAGECONFIG[python2] = ",,python swig-native,"
-PACKAGECONFIG[python3] = ",,python3 swig-native,"
-
-# Default in configure.ac: "cl cpp python qt"
-# Supported: "cl cpp python python2 python3 qt"
-# python says 'search and find python2 or python3'
-
-# Building the C++ bindings for native requires a C++ compiler with C++11
-# support. Since these bindings are currently not needed, we can disable them.
-DEFAULT_LANGUAGES = ""
-DEFAULT_LANGUAGES_class-target = "cpp"
-LANGUAGES ?= "${DEFAULT_LANGUAGES}"
-LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' python2', '', d)}"
-LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3', '', d)}"
-
-PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}"
-PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}"
-
-EXTRA_OECONF += '--enable-languages="${LANGUAGES}"'
-
-inherit autotools texinfo binconfig-disabled pkgconfig ${PYTHON_INHERIT}
-
-export PKG_CONFIG='pkg-config'
-
-BBCLASSEXTEND = "native nativesdk"
-
-PACKAGES =+ "${PN}-cpp"
-PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python2-gpg ', '', d)}"
-PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-gpg ', '', d)}"
-
-FILES_${PN}-cpp = "${libdir}/libgpgmepp.so.*"
-FILES_python2-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
-FILES_python3-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
-FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/* \
- ${libdir}/cmake/* \
-"
-
-CFLAGS_append_libc-musl = " -D__error_t_defined "
-do_configure_prepend () {
- # Else these could be used in preference to those in aclocal-copy
- rm -f ${S}/m4/gpg-error.m4
- rm -f ${S}/m4/libassuan.m4
- rm -f ${S}/m4/python.m4
-}
diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu.inc b/import-layers/yocto-poky/meta/recipes-support/icu/icu.inc
index a1ef9ec..983118c 100644
--- a/import-layers/yocto-poky/meta/recipes-support/icu/icu.inc
+++ b/import-layers/yocto-poky/meta/recipes-support/icu/icu.inc
@@ -17,6 +17,8 @@
BINCONFIG = "${bindir}/icu-config"
+ICU_MAJOR_VER = "${@d.getVar('PV').split('.')[0]}"
+
inherit autotools pkgconfig binconfig
# ICU needs the native build directory as an argument to its --with-cross-build option when
@@ -26,6 +28,8 @@
EXTRA_OECONF_class-native = ""
EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
+EXTRA_OECONF_append_class-target = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' --with-data-packaging=archive', '', d)}"
+TARGET_CXXFLAGS_append = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' -DICU_DATA_DIR=\\""${datadir}/${BPN}/${PV}\\""', '', d)}"
# strtod_l() is not supported by musl; also xlocale.h is missing
# It is not possible to disable its use via configure switches or env vars
@@ -34,6 +38,15 @@
sed -i -e 's,DU_HAVE_STRTOD_L=1,DU_HAVE_STRTOD_L=0,' ${S}/configure.ac
}
+do_compile_prepend_class-target () {
+ # Make sure certain build host references do not end up being compiled
+ # in the image. This only affects libicutu and icu-dbg
+ sed \
+ -e 's,DU_BUILD=,DU_BUILD_unused=,g' \
+ -e '/^CPPFLAGS.*/ s,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -i ${B}/tools/toolutil/Makefile
+}
+
PREPROCESS_RELOCATE_DIRS = "${datadir}/${BPN}/${PV}"
do_install_append_class-native() {
mkdir -p ${D}/${STAGING_ICU_DIR_NATIVE}/config
@@ -44,6 +57,23 @@
cp -r ${B}/tools ${D}/${STAGING_ICU_DIR_NATIVE}
}
+do_install_append_class-target() {
+ # The native pkgdata can not generate the correct data file.
+ # Use icupkg to re-generate it.
+ if [ "${SITEINFO_ENDIANNESS}" = "be" ] ; then
+ rm -f ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat
+ icupkg -tb ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat
+ fi
+
+ # Remove build host references...
+ sed -i \
+ -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ ${D}/${bindir}/icu-config ${D}/${libdir}/${BPN}/${PV}/Makefile.inc \
+ ${D}/${libdir}/${BPN}/${PV}/pkgdata.inc
+}
+
PACKAGES =+ "libicudata libicuuc libicui18n libicutu libicuio"
FILES_${PN}-dev += "${libdir}/${BPN}/"
diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu/0001-i18n-Drop-include-xlocale.h.patch b/import-layers/yocto-poky/meta/recipes-support/icu/icu/0001-i18n-Drop-include-xlocale.h.patch
index add0d76..f0c49e1 100644
--- a/import-layers/yocto-poky/meta/recipes-support/icu/icu/0001-i18n-Drop-include-xlocale.h.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/icu/icu/0001-i18n-Drop-include-xlocale.h.patch
@@ -1,31 +1,34 @@
-From c4254fd8ff1888ca285e3242b812010357ce2b3e Mon Sep 17 00:00:00 2001
+From d6b57c1b4eb9a24d9d95342a961c93946539c93b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 24 Jun 2017 22:52:40 -0700
-Subject: [PATCH] i18n: Drop include <xlocale.h>
+Subject: [PATCH 3/4] i18n: Drop include <xlocale.h>
glibc 2.26 drops this header
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
- i18n/digitlst.cpp | 6 +-----
+---
+ source/i18n/digitlst.cpp | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
-Index: source/i18n/digitlst.cpp
-===================================================================
---- source.orig/i18n/digitlst.cpp
-+++ source/i18n/digitlst.cpp
-@@ -61,11 +61,7 @@
+diff --git a/source/i18n/digitlst.cpp b/source/i18n/digitlst.cpp
+index 8e86fa7..0bdbb2c 100644
+--- a/i18n/digitlst.cpp
++++ b/i18n/digitlst.cpp
+@@ -62,11 +62,7 @@
#endif
#if U_USE_STRTOD_L
--# if U_PLATFORM_USES_ONLY_WIN32_API || U_PLATFORM == U_PF_CYGWIN
--# include <locale.h>
--# else
+-# if U_HAVE_XLOCALE_H
-# include <xlocale.h>
+-# else
+-# include <locale.h>
-# endif
+# include <locale.h>
#endif
// ***************************************************************************
+--
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu/CVE-2017-14952.patch b/import-layers/yocto-poky/meta/recipes-support/icu/icu/CVE-2017-14952.patch
deleted file mode 100644
index f759efc..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/icu/icu/CVE-2017-14952.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From fc83cd832725d3968011f118637b9f5d212e8717 Mon Sep 17 00:00:00 2001
-From: Ovidiu Panait <ovidiu.panait@windriver.com>
-Date: Fri, 10 Nov 2017 16:51:25 +0200
-Subject: [PATCH] Removed redundant UVector entry clean up function call.
-
-Upstream-Status: Backport
-CVE: CVE-2017-14952
-
-Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
----
- i18n/zonemeta.cpp | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/i18n/zonemeta.cpp b/i18n/zonemeta.cpp
-index 84a9657..e163b00 100644
---- a/i18n/zonemeta.cpp
-+++ b/i18n/zonemeta.cpp
-@@ -690,7 +690,6 @@ ZoneMeta::createMetazoneMappings(const UnicodeString &tzid) {
- mzMappings = new UVector(deleteOlsonToMetaMappingEntry, NULL, status);
- if (U_FAILURE(status)) {
- delete mzMappings;
-- deleteOlsonToMetaMappingEntry(entry);
- uprv_free(entry);
- break;
- }
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu/fix-install-manx.patch b/import-layers/yocto-poky/meta/recipes-support/icu/icu/fix-install-manx.patch
index ec63f50..8186fb4 100644
--- a/import-layers/yocto-poky/meta/recipes-support/icu/icu/fix-install-manx.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/icu/icu/fix-install-manx.patch
@@ -1,3 +1,8 @@
+From 3063a9211669bee673840ee81f81d30699b9b702 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Fri, 9 Oct 2015 17:50:41 +0100
+Subject: [PATCH 2/4] icu: fix install race
+
The generic recursive target calls target-local so also adding it to the
dependency list results in races due to install-local being executed twice in
parallel. For example, install-manx can fail if the two install processes race
@@ -9,12 +14,15 @@
Upstream-Status: Pending
Signed-off-by: Ross Burton <ross.burton@intel.com>
+---
+ source/Makefile.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
-diff --git a/Makefile.in b/Makefile.in
-index 9db6c52..3441afa 100644
+diff --git a/source/Makefile.in b/source/Makefile.in
+index c1db15b..4948deb 100644
--- a/Makefile.in
+++ b/Makefile.in
-@@ -71,7 +71,7 @@ EXTRA_DATA =
+@@ -73,7 +73,7 @@ EXTRA_DATA =
## List of phony targets
.PHONY : all all-local all-recursive install install-local install-udata install-udata-files install-udata-dlls \
@@ -23,7 +31,7 @@
distclean-local distclean-recursive doc dist dist-local dist-recursive \
check check-local check-recursive clean-recursive-with-twist install-icu \
doc install-doc tests icu4j-data icu4j-data-install update-windows-makefiles xcheck-local xcheck-recursive xperf xcheck xperf-recursive \
-@@ -82,10 +82,10 @@ check-exhaustive check-exhaustive-local check-exhaustive-recursive releaseDist
+@@ -84,9 +84,9 @@ check-exhaustive check-exhaustive-local check-exhaustive-recursive releaseDist
## List of standard targets
all: all-local all-recursive
@@ -31,13 +39,11 @@
+install: install-recursive
clean: clean-recursive-with-twist clean-local
-distclean : distclean-recursive distclean-local
--dist: dist-recursive dist-local
+distclean : distclean-recursive
-+dist: dist-recursive
+ dist: dist-recursive
check: all check-recursive
check-recursive: all
- xcheck: all xcheck-recursive
-@@ -352,7 +352,7 @@ config.status: $(srcdir)/configure $(srcdir)/common/unicode/uvernum.h
+@@ -350,7 +350,7 @@ config.status: $(srcdir)/configure $(srcdir)/common/unicode/uvernum.h
install-manx: $(MANX_FILES)
$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
@@ -46,3 +52,6 @@
config/%.$(SECTION): $(srcdir)/config/%.$(SECTION).in
cd $(top_builddir) \
+--
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu_59.1.bb b/import-layers/yocto-poky/meta/recipes-support/icu/icu_59.1.bb
deleted file mode 100644
index 9fb1be8..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/icu/icu_59.1.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-require icu.inc
-
-LIC_FILES_CHKSUM = "file://../LICENSE;md5=fe9e1f2c500466d8f18df2cd068e4b74"
-
-def icu_download_version(d):
- pvsplit = d.getVar('PV').split('.')
- return pvsplit[0] + "_" + pvsplit[1]
-
-ICU_PV = "${@icu_download_version(d)}"
-
-# http://errors.yoctoproject.org/Errors/Details/20486/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
-
-BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-${ICU_PV}-src.tgz"
-SRC_URI = "${BASE_SRC_URI} \
- file://icu-pkgdata-large-cmd.patch \
- file://fix-install-manx.patch \
- file://0001-i18n-Drop-include-xlocale.h.patch \
- file://CVE-2017-14952.patch \
- "
-
-SRC_URI_append_class-target = "\
- file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
- "
-SRC_URI[md5sum] = "54923fa9fab5b2b83f235fb72523de37"
-SRC_URI[sha256sum] = "7132fdaf9379429d004005217f10e00b7d2319d0fea22bdfddef8991c45b75fe"
-
-UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
-UPSTREAM_CHECK_URI = "http://download.icu-project.org/files/icu4c/"
diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu_60.2.bb b/import-layers/yocto-poky/meta/recipes-support/icu/icu_60.2.bb
new file mode 100644
index 0000000..585a92b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/icu/icu_60.2.bb
@@ -0,0 +1,29 @@
+require icu.inc
+
+LIC_FILES_CHKSUM = "file://../LICENSE;md5=675f2d069434d8a1e4e6b0dcf4379226"
+
+def icu_download_version(d):
+ pvsplit = d.getVar('PV').split('.')
+ return pvsplit[0] + "_" + pvsplit[1]
+
+ICU_PV = "${@icu_download_version(d)}"
+
+# http://errors.yoctoproject.org/Errors/Details/20486/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-${ICU_PV}-src.tgz"
+SRC_URI = "${BASE_SRC_URI} \
+ file://icu-pkgdata-large-cmd.patch \
+ file://fix-install-manx.patch \
+ file://0001-i18n-Drop-include-xlocale.h.patch \
+ "
+
+SRC_URI_append_class-target = "\
+ file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
+ "
+SRC_URI[md5sum] = "43861b127744b3c0b9d7f386f4b9fa40"
+SRC_URI[sha256sum] = "f073ea8f35b926d70bb33e6577508aa642a8b316a803f11be20af384811db418"
+
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
+UPSTREAM_CHECK_URI = "http://download.icu-project.org/files/icu4c/"
diff --git a/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.75.bb b/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.75.bb
deleted file mode 100644
index 4f3d53c..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.75.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-SUMMARY = "ISO language, territory, currency, script codes and their translations"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-SRC_URI = "https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz"
-SRC_URI[md5sum] = "9ba173b69d4360003414f23837597a92"
-SRC_URI[sha256sum] = "7335e0301cd77cd4ee019bf5d3709aa79309d49dd66e85ba350caf67e00b00cd"
-
-# inherit gettext cannot be used, because it adds gettext-native to BASEDEPENDS which
-# are inhibited by allarch
-DEPENDS = "gettext-native"
-
-inherit allarch autotools
-
-FILES_${PN} += "${datadir}/xml/"
diff --git a/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.77.bb b/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.77.bb
new file mode 100644
index 0000000..bd613ac
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.77.bb
@@ -0,0 +1,15 @@
+SUMMARY = "ISO language, territory, currency, script codes and their translations"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz"
+SRC_URI[md5sum] = "9d0d06cfb4634428b300845edcd7140a"
+SRC_URI[sha256sum] = "21cd73a4c6f95d9474ebfcffd4e065223857720f24858e564f4409b19f7f0d90"
+
+# inherit gettext cannot be used, because it adds gettext-native to BASEDEPENDS which
+# are inhibited by allarch
+DEPENDS = "gettext-native"
+
+inherit allarch autotools
+
+FILES_${PN} += "${datadir}/xml/"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch b/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
index b6ccdda..525b076 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
@@ -6,32 +6,15 @@
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-Index: libassuan-2.1.2/Makefile.am
-===================================================================
---- libassuan-2.1.2.orig/Makefile.am
-+++ libassuan-2.1.2/Makefile.am
-@@ -24,10 +24,13 @@ AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gz
- # (A suitable gitlog-to-changelog script can be found in GnuPG master.)
- GITLOG_TO_CHANGELOG=gitlog-to-changelog
-
-+pkgconfigdir = $(libdir)/pkgconfig
-+pkgconfig_DATA = libassuan.pc
-+
- EXTRA_DIST = autogen.sh autogen.rc README.GIT \
- ChangeLog-2011 doc/ChangeLog-2011 src/ChangeLog-2011 \
- tests/ChangeLog-2011 contrib/ChangeLog-2011 \
-- build-aux/git-log-footer build-aux/git-log-fix
-+ build-aux/git-log-footer build-aux/git-log-fix libassuan.pc.in
-
- SUBDIRS = m4 src doc tests
-
-Index: libassuan-2.1.2/libassuan.pc.in
+forward ported to 2.4.4
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: libassuan-2.4.4/libassuan.pc.in
===================================================================
--- /dev/null
-+++ libassuan-2.1.2/libassuan.pc.in
-@@ -0,0 +1,14 @@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
++++ libassuan-2.4.4/libassuan.pc.in
+@@ -0,0 +1,13 @@
++prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+api_version=@LIBASSUAN_CONFIG_API_VERSION@
@@ -44,24 +27,42 @@
+Libs: -L${libdir} -lassuan
+Libs.private: -lgpg-error
+Cflags: -I${includedir}
-Index: libassuan-2.1.2/configure.ac
+Index: libassuan-2.4.4/Makefile.am
===================================================================
---- libassuan-2.1.2.orig/configure.ac
-+++ libassuan-2.1.2/configure.ac
-@@ -439,7 +439,7 @@ AC_CONFIG_FILES([doc/Makefile])
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -25,10 +25,13 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-doc
+ # (A suitable gitlog-to-changelog script can be found in GnuPG master.)
+ GITLOG_TO_CHANGELOG=gitlog-to-changelog
+
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = libassuan.pc
++
+ EXTRA_DIST = autogen.sh autogen.rc README.GIT VERSION \
+ ChangeLog-2011 doc/ChangeLog-2011 src/ChangeLog-2011 \
+ tests/ChangeLog-2011 contrib/ChangeLog-2011 \
+- build-aux/git-log-footer build-aux/git-log-fix
++ build-aux/git-log-footer build-aux/git-log-fix libassuan.pc.in
+
+ if BUILD_DOC
+ doc = doc
+Index: 2.4.4-r0/libassuan-2.4.4/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -485,6 +485,7 @@ AC_CONFIG_FILES([doc/Makefile])
AC_CONFIG_FILES([tests/Makefile])
AC_CONFIG_FILES([src/libassuan-config], [chmod +x src/libassuan-config])
AC_CONFIG_FILES([src/versioninfo.rc])
--
+AC_CONFIG_FILES([libassuan.pc])
+
AC_OUTPUT
- echo "
-Index: libassuan-2.1.2/src/libassuan.m4
+Index: libassuan-2.4.4/src/libassuan.m4
===================================================================
---- libassuan-2.1.2.orig/src/libassuan.m4
-+++ libassuan-2.1.2/src/libassuan.m4
-@@ -15,18 +15,6 @@ dnl Returns ok set to yes or no.
+--- a/src/libassuan.m4
++++ b/src/libassuan.m4
+@@ -16,18 +16,6 @@ dnl Returns ok set to yes or no.
dnl
AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
[ AC_REQUIRE([AC_CANONICAL_HOST])
@@ -80,7 +81,7 @@
tmp=ifelse([$1], ,1:0.9.2,$1)
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
-@@ -37,51 +25,12 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
+@@ -38,51 +26,12 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
min_libassuan_version="$tmp"
fi
@@ -105,7 +106,7 @@
-
- if test "$major" -gt "$req_major"; then
- ok=yes
-- else
+- else
- if test "$major" -eq "$req_major"; then
- if test "$minor" -gt "$req_minor"; then
- ok=yes
@@ -134,7 +135,7 @@
if test "$tmp" -gt 0 ; then
AC_MSG_CHECKING([LIBASSUAN API version])
if test "$req_libassuan_api" -eq "$tmp" ; then
-@@ -96,7 +45,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
+@@ -97,7 +46,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
if test $ok = yes; then
if test x"$host" != x ; then
@@ -143,7 +144,7 @@
if test x"$libassuan_config_host" != xnone ; then
if test x"$libassuan_config_host" != x"$host" ; then
AC_MSG_WARN([[
-@@ -137,12 +86,8 @@ dnl
+@@ -138,12 +87,8 @@ dnl
AC_DEFUN([AM_PATH_LIBASSUAN],
[ _AM_PATH_LIBASSUAN_COMMON($1)
if test $ok = yes; then
diff --git a/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.3.bb b/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.3.bb
deleted file mode 100644
index 926c279..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.3.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "IPC library used by GnuPG and GPGME"
-HOMEPAGE = "http://www.gnupg.org/related_software/libassuan/"
-BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
-
-LICENSE = "GPLv3+ & LGPLv2.1+"
-LICENSE_${PN} = "LGPLv2.1+"
-LICENSE_${PN}-doc = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
- file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://src/assuan.c;endline=20;md5=0f465544183405055ec179869fc5b5ba \
- file://src/assuan-defs.h;endline=20;md5=20cd55535260ca1779edae5c7b80b21e"
-
-DEPENDS = "libgpg-error"
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/libassuan/libassuan-${PV}.tar.bz2 \
- file://libassuan-add-pkgconfig-support.patch"
-
-SRC_URI[md5sum] = "8e01a7c72d3e5d154481230668e6eb5a"
-SRC_URI[sha256sum] = "22843a3bdb256f59be49842abf24da76700354293a066d82ade8134bb5aa2b71"
-
-BINCONFIG = "${bindir}/libassuan-config"
-
-inherit autotools texinfo binconfig-disabled pkgconfig
-
-do_configure_prepend () {
- # Else these could be used in preference to those in aclocal-copy
- rm -f ${S}/m4/*.m4
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.5.1.bb b/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.5.1.bb
new file mode 100644
index 0000000..34d5f16
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.5.1.bb
@@ -0,0 +1,32 @@
+SUMMARY = "IPC library used by GnuPG and GPGME"
+HOMEPAGE = "http://www.gnupg.org/related_software/libassuan/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+LICENSE = "GPLv3+ & LGPLv2.1+"
+LICENSE_${PN} = "LGPLv2.1+"
+LICENSE_${PN}-doc = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
+ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://src/assuan.c;endline=20;md5=ab92143a5a2adabd06d7994d1467ea5c\
+ file://src/assuan-defs.h;endline=20;md5=15d950c83e82978e35b35e790d7e4d39"
+
+DEPENDS = "libgpg-error"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/libassuan/libassuan-${PV}.tar.bz2 \
+ file://libassuan-add-pkgconfig-support.patch \
+ "
+
+SRC_URI[md5sum] = "4354b7ae296894f232ada226a062d7d7"
+SRC_URI[sha256sum] = "47f96c37b4f2aac289f0bc1bacfa8bd8b4b209a488d3d15e2229cb6cc9b26449"
+
+BINCONFIG = "${bindir}/libassuan-config"
+
+inherit autotools texinfo binconfig-disabled pkgconfig
+
+do_configure_prepend () {
+ # Else these could be used in preference to those in aclocal-copy
+ rm -f ${S}/m4/*.m4
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops/0001-Add-initial-nios2-architecture-support.patch b/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops/0001-Add-initial-nios2-architecture-support.patch
deleted file mode 100644
index c051075..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops/0001-Add-initial-nios2-architecture-support.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 4b005ee56898309e8afba9b3c48cf94f0f5f78e4 Mon Sep 17 00:00:00 2001
-From: Marek Vasut <marex@denx.de>
-Date: Tue, 15 Mar 2016 10:09:26 +0300
-Subject: [PATCH] Add initial nios2 architecture support
-
-* src/Makefile.am (nobase_private_HEADERS): Add nios2.h.
-* src/atomic_ops.h: Include nios2.h if __nios2__.
-* src/atomic_ops/sysdeps/gcc/nios2.h: New file.
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Backport [ https://github.com/ivmai/libatomic_ops.git 4b005ee56898309e8afba9b3c48cf94f0f5f78e4 ]
----
- src/Makefile.am | 1 +
- src/atomic_ops.h | 3 +++
- src/atomic_ops/sysdeps/gcc/nios2.h | 17 +++++++++++++++++
- 3 files changed, 21 insertions(+)
- create mode 100644 src/atomic_ops/sysdeps/gcc/nios2.h
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index fc09b27..d463427 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -79,6 +79,7 @@ nobase_private_HEADERS = atomic_ops/ao_version.h \
- atomic_ops/sysdeps/gcc/ia64.h \
- atomic_ops/sysdeps/gcc/m68k.h \
- atomic_ops/sysdeps/gcc/mips.h \
-+ atomic_ops/sysdeps/gcc/nios2.h \
- atomic_ops/sysdeps/gcc/powerpc.h \
- atomic_ops/sysdeps/gcc/s390.h \
- atomic_ops/sysdeps/gcc/sh.h \
-diff --git a/src/atomic_ops.h b/src/atomic_ops.h
-index 33fe00e..ec02ba4 100644
---- a/src/atomic_ops.h
-+++ b/src/atomic_ops.h
-@@ -262,6 +262,9 @@
- # if defined(__m68k__)
- # include "atomic_ops/sysdeps/gcc/m68k.h"
- # endif /* __m68k__ */
-+# if defined(__nios2__)
-+# include "atomic_ops/sysdeps/gcc/nios2.h"
-+# endif /* __nios2__ */
- # if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \
- || defined(__powerpc64__) || defined(__ppc64__)
- # include "atomic_ops/sysdeps/gcc/powerpc.h"
-diff --git a/src/atomic_ops/sysdeps/gcc/nios2.h b/src/atomic_ops/sysdeps/gcc/nios2.h
-new file mode 100644
-index 0000000..f402cbb
---- /dev/null
-+++ b/src/atomic_ops/sysdeps/gcc/nios2.h
-@@ -0,0 +1,17 @@
-+/*
-+ * Copyright (C) 2016 Marek Vasut <marex@denx.de>
-+ *
-+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
-+ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
-+ *
-+ * Permission is hereby granted to use or copy this program
-+ * for any purpose, provided the above notices are retained on all copies.
-+ * Permission to modify the code and to distribute modified code is granted,
-+ * provided the above notices are retained, and a notice that the code was
-+ * modified is included with the above copyright notice.
-+ */
-+
-+#include "../test_and_set_t_is_ao_t.h"
-+#include "generic.h"
-+
-+#define AO_T_IS_INT
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.0.bb b/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.0.bb
deleted file mode 100644
index 4463d86..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.0.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "A library for atomic integer operations"
-HOMEPAGE = "https://github.com/ivmai/libatomic_ops/"
-SECTION = "optional"
-PROVIDES += "libatomics-ops"
-LICENSE = "GPLv2 & MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://doc/LICENSING.txt;md5=e00dd5c8ac03a14c5ae5225a4525fa2d \
- "
-PV .= "+git${SRCPV}"
-
-SRCREV = "73c60c5ef1ed370111549ee5aab6d4020ba70ed4"
-SRC_URI = "git://github.com/ivmai/libatomic_ops"
-
-S = "${WORKDIR}/git"
-
-ALLOW_EMPTY_${PN} = "1"
-
-inherit autotools pkgconfig
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.2.bb b/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.2.bb
new file mode 100644
index 0000000..f7b4163
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.2.bb
@@ -0,0 +1,21 @@
+SUMMARY = "A library for atomic integer operations"
+HOMEPAGE = "https://github.com/ivmai/libatomic_ops/"
+SECTION = "optional"
+PROVIDES += "libatomics-ops"
+LICENSE = "GPLv2 & MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://doc/LICENSING.txt;md5=e00dd5c8ac03a14c5ae5225a4525fa2d \
+ "
+PV .= "+git${SRCPV}"
+SRCBRANCH ?= "release-7_6"
+
+SRCREV = "5ae4b4aeea2baf13752d07e3038c47f70f06dcac"
+SRC_URI = "git://github.com/ivmai/libatomic_ops;branch=${SRCBRANCH}"
+
+S = "${WORKDIR}/git"
+
+ALLOW_EMPTY_${PN} = "1"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch b/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch
index e97e30e..54617b5 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch
@@ -4,6 +4,7 @@
Subject: [PATCH 1/3] Replace __BEGIN_DECLS and __END_DECLS
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
Upstream-Status: Pending
@@ -13,14 +14,14 @@
include/bsd/nlist.h | 10 ++++++++--
include/bsd/readpassphrase.h | 10 ++++++++--
include/bsd/stdio.h | 10 ++++++++--
- include/bsd/stdlib.h | 10 ++++++++--
- include/bsd/string.h | 10 ++++++++--
+ include/bsd/stdlib.h | 12 +++++++++---
+ include/bsd/string.h | 12 +++++++++---
include/bsd/stringlist.h | 10 ++++++++--
include/bsd/unistd.h | 10 ++++++++--
include/bsd/vis.h | 10 ++++++++--
include/bsd/wchar.h | 10 ++++++++--
src/hash/sha512.h | 10 ++++++++--
- 13 files changed, 104 insertions(+), 26 deletions(-)
+ 13 files changed, 106 insertions(+), 28 deletions(-)
diff --git a/include/bsd/err.h b/include/bsd/err.h
index 12fd051..43dfc32 100644
@@ -50,7 +51,7 @@
#endif
diff --git a/include/bsd/libutil.h b/include/bsd/libutil.h
-index ebb6160..28b919d 100644
+index 45b3b15..9c936e5 100644
--- a/include/bsd/libutil.h
+++ b/include/bsd/libutil.h
@@ -53,7 +53,10 @@ struct pidfh {
@@ -78,7 +79,7 @@
/* humanize_number(3) */
#define HN_DECIMAL 0x01
diff --git a/include/bsd/md5.h b/include/bsd/md5.h
-index 9a75fad..3531fd6 100644
+index 5f3ae46..5d80e5c 100644
--- a/include/bsd/md5.h
+++ b/include/bsd/md5.h
@@ -30,7 +30,10 @@ typedef struct MD5Context {
@@ -103,14 +104,14 @@
+#endif
+/* __END_DECLS */
- #endif /* _MD5_H_ */
+ #endif /* LIBBSD_MD5_H */
diff --git a/include/bsd/nlist.h b/include/bsd/nlist.h
-index 2730237..0389ab7 100644
+index cb297e8..e63bbbd 100644
--- a/include/bsd/nlist.h
+++ b/include/bsd/nlist.h
-@@ -30,8 +30,14 @@
- #include <sys/cdefs.h>
- #include <a.out.h>
+@@ -88,8 +88,14 @@ struct nlist {
+
+ #define N_FORMAT "%08x" /* namelist value format; XXX */
-__BEGIN_DECLS
+/* __BEGIN_DECLS */
@@ -126,7 +127,7 @@
#endif
diff --git a/include/bsd/readpassphrase.h b/include/bsd/readpassphrase.h
-index e1dacc3..76e0d33 100644
+index 14744b8..fa73361 100644
--- a/include/bsd/readpassphrase.h
+++ b/include/bsd/readpassphrase.h
@@ -34,8 +34,14 @@
@@ -145,13 +146,13 @@
+#endif
+/* __END_DECLS */
- #endif /* !_READPASSPHRASE_H_ */
+ #endif /* !LIBBSD_READPASSPHRASE_H */
diff --git a/include/bsd/stdio.h b/include/bsd/stdio.h
-index 7697425..b5b3efd 100644
+index 4b69983..18645b7 100644
--- a/include/bsd/stdio.h
+++ b/include/bsd/stdio.h
-@@ -41,7 +41,10 @@
- #include <sys/cdefs.h>
+@@ -45,7 +45,10 @@
+ #endif
#include <sys/types.h>
-__BEGIN_DECLS
@@ -162,7 +163,7 @@
const char *fmtcheck(const char *, const char *);
/* XXX: The function requires cooperation from the system libc to store the
-@@ -69,7 +72,10 @@ FILE *funopen(const void *cookie,
+@@ -73,7 +76,10 @@ FILE *funopen(const void *cookie,
#define fwopen(cookie, fn) funopen(cookie, NULL, fn, NULL, NULL)
int fpurge(FILE *fp);
@@ -175,7 +176,7 @@
#endif
#endif
diff --git a/include/bsd/stdlib.h b/include/bsd/stdlib.h
-index 0604cad..b9f0515 100644
+index ebc9638..c4b54b6 100644
--- a/include/bsd/stdlib.h
+++ b/include/bsd/stdlib.h
@@ -46,7 +46,10 @@
@@ -189,8 +190,17 @@
+#endif
uint32_t arc4random(void);
void arc4random_stir(void);
- void arc4random_addrandom(u_char *dat, int datlen);
-@@ -73,6 +76,9 @@ long long strtonum(const char *nptr, long long minval, long long maxval,
+ void arc4random_addrandom(unsigned char *dat, int datlen);
+@@ -67,7 +70,7 @@ int sradixsort(const unsigned char **base, int nmemb,
+ const unsigned char *table, unsigned endbyte);
+
+ void *reallocf(void *ptr, size_t size);
+-#if defined(_GNU_SOURCE) && defined(__GLIBC__) && !__GLIBC_PREREQ(2, 26)
++#if defined(_GNU_SOURCE) && defined(__GLIBC__)
+ void *reallocarray(void *ptr, size_t nmemb, size_t size);
+ #endif
+
+@@ -75,6 +78,9 @@ long long strtonum(const char *nptr, long long minval, long long maxval,
const char **errstr);
char *getbsize(int *headerlenp, long *blocksizep);
@@ -202,10 +212,10 @@
#endif
diff --git a/include/bsd/string.h b/include/bsd/string.h
-index ee2f953..fbf8c54 100644
+index 6798bf6..fa1193f 100644
--- a/include/bsd/string.h
+++ b/include/bsd/string.h
-@@ -36,13 +36,19 @@
+@@ -36,15 +36,21 @@
#include <sys/cdefs.h>
#include <sys/types.h>
@@ -219,7 +229,10 @@
char *strnstr(const char *str, const char *find, size_t str_len);
void strmode(mode_t mode, char *str);
+-#if defined(_GNU_SOURCE) && defined(__GLIBC__) && !__GLIBC_PREREQ(2, 25)
++#if defined(_GNU_SOURCE) && defined(__GLIBC__)
void explicit_bzero(void *buf, size_t len);
+ #endif
-__END_DECLS
+#ifdef __cplusplus
+}
@@ -228,7 +241,7 @@
#endif
diff --git a/include/bsd/stringlist.h b/include/bsd/stringlist.h
-index e3c42e9..40d0a52 100644
+index ff30cac..4600f6b 100644
--- a/include/bsd/stringlist.h
+++ b/include/bsd/stringlist.h
@@ -43,12 +43,18 @@ typedef struct _stringlist {
@@ -251,7 +264,7 @@
+#endif
+/* __END_DECLS */
- #endif /* _STRINGLIST_H */
+ #endif /* LIBBSD_STRINGLIST_H */
diff --git a/include/bsd/unistd.h b/include/bsd/unistd.h
index 1f9c5f8..5b2f4c7 100644
--- a/include/bsd/unistd.h
@@ -280,7 +293,7 @@
#endif
diff --git a/include/bsd/vis.h b/include/bsd/vis.h
-index 835d2d6..63c951e 100644
+index 970dfdd..621d3c6 100644
--- a/include/bsd/vis.h
+++ b/include/bsd/vis.h
@@ -74,7 +74,10 @@
@@ -305,7 +318,7 @@
+#endif
+/* __END_DECLS */
- #endif /* !_VIS_H_ */
+ #endif /* !LIBBSD_VIS_H */
diff --git a/include/bsd/wchar.h b/include/bsd/wchar.h
index 33a500e..aa70742 100644
--- a/include/bsd/wchar.h
@@ -359,5 +372,5 @@
#endif /* !_SHA512_H_ */
--
-2.10.2
+1.9.1
diff --git a/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.6.bb b/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.6.bb
deleted file mode 100644
index 182543f..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.6.bb
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright (C) 2013 Khem Raj <raj.khem@gmail.com>
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-SUMMARY = "Library of utility functions from BSD systems"
-DESCRIPTION = "This library provides useful functions commonly found on BSD systems, \
- and lacking on others like GNU systems, thus making it easier to port \
- projects with strong BSD origins, without needing to embed the same \
- code over and over again on each project."
-
-HOMEPAGE = "http://libbsd.freedesktop.org/wiki/"
-# There seems to be more licenses used in the code, I don't think we want to list them all here, complete list:
-# OE @ ~/projects/libbsd $ grep ^License: COPYING | sort
-# License: BSD-2-clause
-# License: BSD-2-clause
-# License: BSD-2-clause-NetBSD
-# License: BSD-2-clause-author
-# License: BSD-2-clause-verbatim
-# License: BSD-3-clause
-# License: BSD-3-clause
-# License: BSD-3-clause
-# License: BSD-3-clause-Peter-Wemm
-# License: BSD-3-clause-Regents
-# License: BSD-4-clause-Christopher-G-Demetriou
-# License: BSD-4-clause-Niels-Provos
-# License: BSD-5-clause-Peter-Wemm
-# License: Beerware
-# License: Expat
-# License: ISC
-# License: ISC-Original
-# License: public-domain
-# License: public-domain-Colin-Plumb
-LICENSE = "BSD-4-Clause & ISC & PD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=08fc4e66be4526715dab09c5fba5e9e8"
-SECTION = "libs"
-
-SRC_URI = " \
- http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
- file://0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch \
-"
-SRC_URI_append_libc-musl = " \
- file://0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch \
- file://0002-Remove-funopen.patch \
-"
-
-SRC_URI[md5sum] = "4ab7bec639af17d0aacb50222b479110"
-SRC_URI[sha256sum] = "467fbf9df1f49af11f7f686691057c8c0a7613ae5a870577bef9155de39f9687"
-
-inherit autotools pkgconfig
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.7.bb b/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.7.bb
new file mode 100644
index 0000000..552a85c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.7.bb
@@ -0,0 +1,50 @@
+# Copyright (C) 2013 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Library of utility functions from BSD systems"
+DESCRIPTION = "This library provides useful functions commonly found on BSD systems, \
+ and lacking on others like GNU systems, thus making it easier to port \
+ projects with strong BSD origins, without needing to embed the same \
+ code over and over again on each project."
+
+HOMEPAGE = "http://libbsd.freedesktop.org/wiki/"
+# There seems to be more licenses used in the code, I don't think we want to list them all here, complete list:
+# OE @ ~/projects/libbsd $ grep ^License: COPYING | sort
+# License: BSD-2-clause
+# License: BSD-2-clause
+# License: BSD-2-clause-NetBSD
+# License: BSD-2-clause-author
+# License: BSD-2-clause-verbatim
+# License: BSD-3-clause
+# License: BSD-3-clause
+# License: BSD-3-clause
+# License: BSD-3-clause-Peter-Wemm
+# License: BSD-3-clause-Regents
+# License: BSD-4-clause-Christopher-G-Demetriou
+# License: BSD-4-clause-Niels-Provos
+# License: BSD-5-clause-Peter-Wemm
+# License: Beerware
+# License: Expat
+# License: ISC
+# License: ISC-Original
+# License: public-domain
+# License: public-domain-Colin-Plumb
+LICENSE = "BSD-4-Clause & ISC & PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=08fc4e66be4526715dab09c5fba5e9e8"
+SECTION = "libs"
+
+SRC_URI = " \
+ http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+ file://0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch \
+"
+SRC_URI_append_libc-musl = " \
+ file://0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch \
+ file://0002-Remove-funopen.patch \
+"
+
+SRC_URI[md5sum] = "d9e6980fbfe44f94fd92b89a33cce67d"
+SRC_URI[sha256sum] = "f548f10e5af5a08b1e22889ce84315b1ebe41505b015c9596bad03fd13a12b31"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libcheck/libcheck_0.10.0.bb b/import-layers/yocto-poky/meta/recipes-support/libcheck/libcheck_0.10.0.bb
deleted file mode 100644
index 9d34198..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libcheck/libcheck_0.10.0.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Check - unit testing framework for C code"
-HOMEPAGE = "http://check.sourceforge.net/"
-SECTION = "devel"
-
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=2d5025d4aa3495befef8f17206a5b0a1"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/check/check-${PV}.tar.gz \
- "
-
-SRC_URI[md5sum] = "53c5e5c77d090e103a17f3ed7fd7d8b8"
-SRC_URI[sha256sum] = "f5f50766aa6f8fe5a2df752666ca01a950add45079aa06416b83765b1cf71052"
-
-S = "${WORKDIR}/check-${PV}"
-
-inherit autotools pkgconfig texinfo
-
-CACHED_CONFIGUREVARS += "ac_cv_path_AWK_PATH=${bindir}/gawk"
-
-RREPLACES_${PN} = "check (<= 0.9.5)"
-RDEPENDS_${PN} += "gawk"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libcheck/libcheck_0.12.0.bb b/import-layers/yocto-poky/meta/recipes-support/libcheck/libcheck_0.12.0.bb
new file mode 100644
index 0000000..e646d43
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libcheck/libcheck_0.12.0.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Check - unit testing framework for C code"
+HOMEPAGE = "http://check.sourceforge.net/"
+SECTION = "devel"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=2d5025d4aa3495befef8f17206a5b0a1"
+
+SRC_URI = "https://github.com/${BPN}/check/releases/download/${PV}/check-${PV}.tar.gz"
+SRC_URI[md5sum] = "31b17c6075820a434119592941186f70"
+SRC_URI[sha256sum] = "464201098bee00e90f5c4bdfa94a5d3ead8d641f9025b560a27755a83b824234"
+UPSTREAM_CHECK_URI = "https://github.com/libcheck/check/releases/"
+
+S = "${WORKDIR}/check-${PV}"
+
+inherit autotools pkgconfig texinfo
+
+CACHED_CONFIGUREVARS += "ac_cv_path_AWK_PATH=${bindir}/gawk"
+
+RREPLACES_${PN} = "check (<= 0.9.5)"
+RDEPENDS_${PN} += "gawk"
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.12.bb b/import-layers/yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.12.bb
index b0af759..d86ddd6 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.12.bb
@@ -9,12 +9,12 @@
SECTION = "x11/utils"
DEPENDS = "glib-2.0 libxml2 zlib"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
EXTRA_OECONF += "--enable-Bsymbolic=auto"
BINCONFIG = "${bindir}/croco-0.6-config"
-inherit autotools pkgconfig gnomebase gtk-doc binconfig-disabled
+inherit gnomebase gtk-doc binconfig-disabled
SRC_URI[archive.md5sum] = "bc0984fce078ba2ce29f9500c6b9ddce"
SRC_URI[archive.sha256sum] = "ddc4b5546c9fb4280a5017e2707fbd4839034ed1aba5b7d4372212f34f84f860"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.7.bb b/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.7.bb
deleted file mode 100644
index f740da2..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.7.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "Wrapper library for evdev devices"
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libevdev/"
-SECTION = "libs"
-
-LICENSE = "MIT-X"
-LIC_FILES_CHKSUM = "file://COPYING;md5=75aae0d38feea6fda97ca381cb9132eb \
- file://libevdev/libevdev.h;endline=21;md5=7ff4f0b5113252c2f1a828e0bbad98d1"
-
-SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz"
-
-SRC_URI[md5sum] = "4f1cfaee8d75ea3fbbfeb99a98730952"
-SRC_URI[sha256sum] = "a1e59e37a2f0d397ffd7e83b73af0e638db83b8dd08902ef0f651a21cc1dd422"
-
-inherit autotools pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.8.bb b/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.8.bb
new file mode 100644
index 0000000..c138014
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.8.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Wrapper library for evdev devices"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libevdev/"
+SECTION = "libs"
+
+LICENSE = "MIT-X"
+LIC_FILES_CHKSUM = "file://COPYING;md5=75aae0d38feea6fda97ca381cb9132eb \
+ file://libevdev/libevdev.h;endline=21;md5=7ff4f0b5113252c2f1a828e0bbad98d1"
+
+SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz"
+
+SRC_URI[md5sum] = "c25a8c3939e4ad59a5e9e5e1e354832d"
+SRC_URI[sha256sum] = "6083d81e46609da8ba80cb826c02d9080764a6dec33c8267ccb7e158833d4c6d"
+
+inherit autotools pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-support/libevent/libevent/0001-test-fix-32bit-linux-regress.patch b/import-layers/yocto-poky/meta/recipes-support/libevent/libevent/0001-test-fix-32bit-linux-regress.patch
new file mode 100644
index 0000000..36d0820
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libevent/libevent/0001-test-fix-32bit-linux-regress.patch
@@ -0,0 +1,48 @@
+From 69a3813c513c84e02212250c3d5b8a02ecefa698 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Mon, 15 Jan 2018 08:00:33 +0000
+Subject: [PATCH] test: fix 32bit linux regress
+
+This patch comes from https://github.com/libevent/libevent.git,
+the commit is 63c4bf78d6af3c6ff46d2e8e4b53dd9f577a9ca9
+
+Upstream-Status: Backport
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ configure.ac | 1 +
+ test/regress_util.c | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 7528d37..e64cb1f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -663,6 +663,7 @@ AC_CHECK_SIZEOF(short)
+ AC_CHECK_SIZEOF(size_t)
+ AC_CHECK_SIZEOF(void *)
+ AC_CHECK_SIZEOF(off_t)
++AC_CHECK_SIZEOF(time_t)
+
+ AC_CHECK_TYPES([struct in6_addr, struct sockaddr_in6, sa_family_t, struct addrinfo, struct sockaddr_storage], , ,
+ [#define _GNU_SOURCE
+diff --git a/test/regress_util.c b/test/regress_util.c
+index ef6a148..0c7eafb 100644
+--- a/test/regress_util.c
++++ b/test/regress_util.c
+@@ -1412,10 +1412,12 @@ static struct date_rfc1123_case {
+ { 1289433600, "Thu, 11 Nov 2010 00:00:00 GMT"},
+ { 1323648000, "Mon, 12 Dec 2011 00:00:00 GMT"},
+ #ifndef _WIN32
++#if EVENT__SIZEOF_TIME_T > 4
+ /** In win32 case we have max "23:59:59 January 18, 2038, UTC" for time32 */
+ { 4294967296, "Sun, 07 Feb 2106 06:28:16 GMT"} /* 2^32 */,
+ /** In win32 case we have max "23:59:59, December 31, 3000, UTC" for time64 */
+ {253402300799, "Fri, 31 Dec 9999 23:59:59 GMT"} /* long long future no one can imagine */,
++#endif /* time_t != 32bit */
+ { 1456704000, "Mon, 29 Feb 2016 00:00:00 GMT"} /* leap year */,
+ #endif
+ { 1435708800, "Wed, 01 Jul 2015 00:00:00 GMT"} /* leap second */,
+--
+2.13.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libevent/libevent_2.1.8.bb b/import-layers/yocto-poky/meta/recipes-support/libevent/libevent_2.1.8.bb
index 1270d62..83ce464 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libevent/libevent_2.1.8.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libevent/libevent_2.1.8.bb
@@ -9,6 +9,7 @@
SRC_URI = " \
https://github.com/libevent/libevent/releases/download/release-${PV}-stable/${BP}-stable.tar.gz \
file://Makefile-missing-test-dir.patch \
+ file://0001-test-fix-32bit-linux-regress.patch \
file://run-ptest \
"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libffi/libffi/not-win32.patch b/import-layers/yocto-poky/meta/recipes-support/libffi/libffi/not-win32.patch
index 1e90125..80c40a4 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libffi/libffi/not-win32.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libffi/libffi/not-win32.patch
@@ -11,12 +11,16 @@
Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@intel.com>
---- a/configure.ac~ 2014-11-12 11:56:51.000000000 +0000
-+++ b/configure.ac 2016-02-04 14:02:53.765710532 +0000
-@@ -593,5 +593,5 @@
+Index: libffi-3.2.1/configure.ac
+===================================================================
+--- libffi-3.2.1.orig/configure.ac
++++ libffi-3.2.1/configure.ac
+@@ -592,7 +592,7 @@ AC_ARG_ENABLE(purify-safety,
+
# These variables are only ever used when we cross-build to X86_WIN32.
# And we only support this with GCC, so...
-if test "x$GCC" = "xyes"; then
+if false; then
if test -n "$with_cross_host" &&
- test x"$with_cross_host" != x"no"; then
\ No newline at end of file
+ test x"$with_cross_host" != x"no"; then
+ toolexecdir="${exec_prefix}"/'$(target_alias)'
diff --git a/import-layers/yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.5.bb b/import-layers/yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.5.bb
index 0134572..c0fd83e 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.5.bb
@@ -5,7 +5,7 @@
LIC_FILES_CHKSUM = "file://src/fm-extra.h;beginline=8;endline=21;md5=ef1f84da64b3c01cca447212f7ef6007"
SECTION = "x11/libs"
-DEPENDS = "glib-2.0 intltool-native gettext-native"
+DEPENDS = "glib-2.0-native glib-2.0 intltool-native"
SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz \
file://0001-nls.m4-Take-it-from-gettext-0.15.patch \
@@ -18,6 +18,6 @@
EXTRA_OECONF = "--with-extra-only --with-gtk=no"
-inherit autotools pkgconfig gtk-doc
+inherit autotools pkgconfig gtk-doc gettext
do_configure[dirs] =+ "${S}/m4"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libfm/libfm/0001-Enclose-text-in-programlisting-into-CDATA.patch b/import-layers/yocto-poky/meta/recipes-support/libfm/libfm/0001-Enclose-text-in-programlisting-into-CDATA.patch
new file mode 100644
index 0000000..40e5329
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libfm/libfm/0001-Enclose-text-in-programlisting-into-CDATA.patch
@@ -0,0 +1,76 @@
+From ed4ca8c0b17ff5d3c768b92409c1787e3f3f1841 Mon Sep 17 00:00:00 2001
+From: Andriy Grytsenko <andrej@rep.kiev.ua>
+Date: Sun, 26 Nov 2017 22:30:15 +0200
+Subject: [PATCH 2/2] Enclose text in <programlisting> into <![CDATA[
+
+New gtk-doc fails on tag-like data in it.
+See https://bugs.freedesktop.org/show_bug.cgi?id=101585
+That is definitely bug of gtk-doc but let workaround it.
+
+Upstream-Status: Backport [https://git.lxde.org/gitweb/?p=lxde/libfm.git;a=commit;h=b072ee0400432d72fdf86ba9fed74a7e0ec11ec1]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/base/fm-module.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/base/fm-module.c b/src/base/fm-module.c
+index d364b2d..2e8c978 100644
+--- a/src/base/fm-module.c
++++ b/src/base/fm-module.c
+@@ -44,7 +44,7 @@
+ * of that type should include:
+ * <example id="example-fm-dummy-h">
+ * <title>Sample of fm-dummy.h</title>
+- * <programlisting>
++ * <programlisting><![CDATA[
+ * #include <libfm/fm.h>
+ *
+ * #define FM_MODULE_dummy_VERSION 1
+@@ -54,7 +54,7 @@
+ * } FmDummyInit;
+ *
+ * extern FmDummyInit fm_module_init_dummy;
+- * </programlisting>
++ * ]]></programlisting>
+ * </example>
+ * The FM_MODULE_dummy_VERSION is a number which should be increased each
+ * time something in FmDummyInit structure is changed. The FmDummyInit
+@@ -65,7 +65,7 @@
+ * module handling in your code:
+ * <example id="example-fm-dummy-widget-c">
+ * <title>Sample of fm-dummy-widget.c</title>
+- * <programlisting>
++ * <programlisting><![CDATA[
+ * #include "fm-dummy.h"
+ *
+ * FM_MODULE_DEFINE_TYPE(dummy, FmDummyInit, 1)
+@@ -87,7 +87,7 @@
+ * result = module->get_new("test sample");
+ * return result;
+ * }
+- * </programlisting>
++ * ]]></programlisting>
+ * </example>
+ *
+ * Third thing application should do is to register module type on the
+@@ -108,7 +108,7 @@
+ * interface (see the fm-dummy.h header example above):
+ * <example id="example-fm-dummy-test-c">
+ * <title>Sample of module dummy/test</title>
+- * <programlisting>
++ * <programlisting><![CDATA[
+ * #include "fm-dummy.h"
+ *
+ * FM_DEFINE_MODULE(dummy, test)
+@@ -121,7 +121,7 @@
+ * FmDummyInit fm_module_init_dummy = {
+ * fm_dummy_test_get_new;
+ * };
+- * </programlisting>
++ * ]]></programlisting>
+ * </example>
+ * The fm_module_init_dummy should be exactly the same structure that is
+ * defined in the header file above.
+--
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libfm/libfm_1.2.5.bb b/import-layers/yocto-poky/meta/recipes-support/libfm/libfm_1.2.5.bb
index 1ddddfd..5964083 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libfm/libfm_1.2.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libfm/libfm_1.2.5.bb
@@ -9,22 +9,36 @@
SECTION = "x11/libs"
-DEPENDS = "glib-2.0 pango gtk+3 menu-cache intltool-native libexif libfm-extra gettext-native"
+DEPENDS = "glib-2.0 glib-2.0-native pango gtk+3 menu-cache intltool-native libexif libfm-extra"
SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz \
- file://0001-Correctly-check-the-stamp-file-that-indicates-if-we-.patch"
+ file://0001-Correctly-check-the-stamp-file-that-indicates-if-we-.patch \
+ file://0001-Enclose-text-in-programlisting-into-CDATA.patch \
+ "
SRC_URI[md5sum] = "a1ba9ae5e920f38b647dd511edd6c807"
SRC_URI[sha256sum] = "c706bb1020cf5f2d6f5a9226f692ce1985947134dcf2bde64278bd0420779b5a"
-inherit autotools pkgconfig gtk-doc distro_features_check
+inherit autotools pkgconfig gtk-doc gettext distro_features_check
ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
EXTRA_OECONF = "--with-gtk=3"
do_configure[dirs] =+ "${S}/m4"
+PACKAGES =+ "libfm-gtk"
PACKAGES += "${PN}-mime"
+FILES_libfm-gtk = " \
+ ${libdir}/libfm-gtk*so.* \
+ ${libdir}/libfm/modules/gtk* \
+ ${bindir}/libfm-pref-apps \
+ ${bindir}/lxshortcut \
+ ${datadir}/applications/libfm-pref-apps.desktop \
+ ${datadir}/applications/lxshortcut.desktop \
+ ${datadir}/libfm/images/folder.png \
+ ${datadir}/libfm/images/unknown.png \
+ ${datadir}/libfm/ui/*.ui \
+"
FILES_${PN}-mime = "${datadir}/mime/"
do_install_append () {
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/0005-ecc-Add-input-validation-for-X25519.patch b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/0005-ecc-Add-input-validation-for-X25519.patch
deleted file mode 100644
index 66fdd74..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/0005-ecc-Add-input-validation-for-X25519.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-From ef570e3d2773c12126e7d3fcdc4db9ef80a5e214 Mon Sep 17 00:00:00 2001
-From: NIIBE Yutaka <gniibe@fsij.org>
-Date: Fri, 25 Aug 2017 18:13:28 +0900
-Subject: [PATCH] ecc: Add input validation for X25519.
-
-* cipher/ecc.c (ecc_decrypt_raw): Add input validation.
-* mpi/ec.c (ec_p_init): Use scratch buffer for bad points.
-(_gcry_mpi_ec_bad_point): New.
-
---
-
-Following is the paper describing the attack:
-
- May the Fourth Be With You: A Microarchitectural Side Channel Attack
- on Real-World Applications of Curve25519
- by Daniel Genkin, Luke Valenta, and Yuval Yarom
-
-In the current implementation, we do output checking and it results an
-error for those bad points. However, when attacked, the computation
-will done with leak of private key, even it will results errors. To
-mitigate leak, we added input validation.
-
-Note that we only list bad points with MSB=0. By X25519, MSB is
-always cleared.
-
-In future, we should implement constant-time field computation. Then,
-this input validation could be removed, if performance is important
-and we are sure for no leak.
-
-CVE-id: CVE-2017-0379
-Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
-
-Upstream-Status: Backport
-CVE: CVE-2017-0379
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- cipher/ecc.c | 17 +++++++++++++++--
- mpi/ec.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++---
- src/mpi.h | 1 +
- 3 files changed, 64 insertions(+), 5 deletions(-)
-
-diff --git a/cipher/ecc.c b/cipher/ecc.c
-index e25bf09..4e3e5b1 100644
---- a/cipher/ecc.c
-+++ b/cipher/ecc.c
-@@ -1628,9 +1628,22 @@ ecc_decrypt_raw (gcry_sexp_t *r_plain, gcry_sexp_t s_data, gcry_sexp_t keyparms)
- if (DBG_CIPHER)
- log_printpnt ("ecc_decrypt kG", &kG, NULL);
-
-- if (!(flags & PUBKEY_FLAG_DJB_TWEAK)
-+ if ((flags & PUBKEY_FLAG_DJB_TWEAK))
-+ {
- /* For X25519, by its definition, validation should not be done. */
-- && !_gcry_mpi_ec_curve_point (&kG, ec))
-+ /* (Instead, we do output check.)
-+ *
-+ * However, to mitigate secret key leak from our implementation,
-+ * we also do input validation here. For constant-time
-+ * implementation, we can remove this input validation.
-+ */
-+ if (_gcry_mpi_ec_bad_point (&kG, ec))
-+ {
-+ rc = GPG_ERR_INV_DATA;
-+ goto leave;
-+ }
-+ }
-+ else if (!_gcry_mpi_ec_curve_point (&kG, ec))
- {
- rc = GPG_ERR_INV_DATA;
- goto leave;
-diff --git a/mpi/ec.c b/mpi/ec.c
-index a0f7357..4c16603 100644
---- a/mpi/ec.c
-+++ b/mpi/ec.c
-@@ -396,6 +396,29 @@ ec_get_two_inv_p (mpi_ec_t ec)
- }
-
-
-+static const char *curve25519_bad_points[] = {
-+ "0x0000000000000000000000000000000000000000000000000000000000000000",
-+ "0x0000000000000000000000000000000000000000000000000000000000000001",
-+ "0x00b8495f16056286fdb1329ceb8d09da6ac49ff1fae35616aeb8413b7c7aebe0",
-+ "0x57119fd0dd4e22d8868e1c58c45c44045bef839c55b1d0b1248c50a3bc959c5f",
-+ "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec",
-+ "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed",
-+ "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee",
-+ NULL
-+};
-+
-+static gcry_mpi_t
-+scanval (const char *string)
-+{
-+ gpg_err_code_t rc;
-+ gcry_mpi_t val;
-+
-+ rc = _gcry_mpi_scan (&val, GCRYMPI_FMT_HEX, string, 0, NULL);
-+ if (rc)
-+ log_fatal ("scanning ECC parameter failed: %s\n", gpg_strerror (rc));
-+ return val;
-+}
-+
-
- /* This function initialized a context for elliptic curve based on the
- field GF(p). P is the prime specifying this field, A is the first
-@@ -434,9 +457,17 @@ ec_p_init (mpi_ec_t ctx, enum gcry_mpi_ec_models model,
-
- _gcry_mpi_ec_get_reset (ctx);
-
-- /* Allocate scratch variables. */
-- for (i=0; i< DIM(ctx->t.scratch); i++)
-- ctx->t.scratch[i] = mpi_alloc_like (ctx->p);
-+ if (model == MPI_EC_MONTGOMERY)
-+ {
-+ for (i=0; i< DIM(ctx->t.scratch) && curve25519_bad_points[i]; i++)
-+ ctx->t.scratch[i] = scanval (curve25519_bad_points[i]);
-+ }
-+ else
-+ {
-+ /* Allocate scratch variables. */
-+ for (i=0; i< DIM(ctx->t.scratch); i++)
-+ ctx->t.scratch[i] = mpi_alloc_like (ctx->p);
-+ }
-
- /* Prepare for fast reduction. */
- /* FIXME: need a test for NIST values. However it does not gain us
-@@ -1572,3 +1603,17 @@ _gcry_mpi_ec_curve_point (gcry_mpi_point_t point, mpi_ec_t ctx)
-
- return res;
- }
-+
-+
-+int
-+_gcry_mpi_ec_bad_point (gcry_mpi_point_t point, mpi_ec_t ctx)
-+{
-+ int i;
-+ gcry_mpi_t x_bad;
-+
-+ for (i = 0; (x_bad = ctx->t.scratch[i]); i++)
-+ if (!mpi_cmp (point->x, x_bad))
-+ return 1;
-+
-+ return 0;
-+}
-diff --git a/src/mpi.h b/src/mpi.h
-index b5385b5..aeba7f8 100644
---- a/src/mpi.h
-+++ b/src/mpi.h
-@@ -296,6 +296,7 @@ void _gcry_mpi_ec_mul_point (mpi_point_t result,
- gcry_mpi_t scalar, mpi_point_t point,
- mpi_ec_t ctx);
- int _gcry_mpi_ec_curve_point (gcry_mpi_point_t point, mpi_ec_t ctx);
-+int _gcry_mpi_ec_bad_point (gcry_mpi_point_t point, mpi_ec_t ctx);
-
- gcry_mpi_t _gcry_mpi_ec_ec2os (gcry_mpi_point_t point, mpi_ec_t ectx);
-
---
-1.8.3.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/0006-Fix-building-AArch32-CE-implementations-when-target-.patch b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/0006-Fix-building-AArch32-CE-implementations-when-target-.patch
deleted file mode 100644
index 65b9fd4..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/0006-Fix-building-AArch32-CE-implementations-when-target-.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 4a7aa30ae9f3ce798dd886c2f2d4164c43027748 Mon Sep 17 00:00:00 2001
-From: Jussi Kivilinna <jussi.kivilinna@iki.fi>
-Date: Sat, 29 Jul 2017 14:34:23 +0300
-Subject: [PATCH] Fix building AArch32 CE implementations when target is ARMv6
- arch
-
-* cipher/cipher-gcm-armv8-aarch32-ce.S: Select ARMv8 architecure.
-* cipher/rijndael-armv8-aarch32-ce.S: Ditto.
-* cipher/sha1-armv8-aarch32-ce.S: Ditto.
-* cipher/sha256-armv8-aarch32-ce.S: Ditto.
-* configure.ac (gcry_cv_gcc_inline_asm_aarch32_crypto): Ditto.
---
-
-Raspbian distribution defaults to ARMv6 architecture thus 'rbit'
-instruction is not available with default compiler flags. Patch
-adds explicit architecture selection for ARMv8 to enable 'rbit'
-usage with ARMv8/AArch32-CE assembly implementations of SHA,
-GHASH and AES.
-
-Reported-by: Chris Horry <zerbey@gmail.com>
-Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
-
-Signed-off-by: Paul Barker <pbarker@toganlabs.com>
-Upstream-Status: Backport
-
----
- cipher/cipher-gcm-armv8-aarch32-ce.S | 1 +
- cipher/rijndael-armv8-aarch32-ce.S | 1 +
- cipher/sha1-armv8-aarch32-ce.S | 1 +
- cipher/sha256-armv8-aarch32-ce.S | 1 +
- configure.ac | 1 +
- 5 files changed, 5 insertions(+)
-
-diff --git a/cipher/cipher-gcm-armv8-aarch32-ce.S b/cipher/cipher-gcm-armv8-aarch32-ce.S
-index b61a7871..1de66a16 100644
---- a/cipher/cipher-gcm-armv8-aarch32-ce.S
-+++ b/cipher/cipher-gcm-armv8-aarch32-ce.S
-@@ -24,6 +24,7 @@
- defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO)
-
- .syntax unified
-+.arch armv8-a
- .fpu crypto-neon-fp-armv8
- .arm
-
-diff --git a/cipher/rijndael-armv8-aarch32-ce.S b/cipher/rijndael-armv8-aarch32-ce.S
-index f375f673..5c8fa3c0 100644
---- a/cipher/rijndael-armv8-aarch32-ce.S
-+++ b/cipher/rijndael-armv8-aarch32-ce.S
-@@ -24,6 +24,7 @@
- defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO)
-
- .syntax unified
-+.arch armv8-a
- .fpu crypto-neon-fp-armv8
- .arm
-
-diff --git a/cipher/sha1-armv8-aarch32-ce.S b/cipher/sha1-armv8-aarch32-ce.S
-index b0bc5ffe..bf2b233b 100644
---- a/cipher/sha1-armv8-aarch32-ce.S
-+++ b/cipher/sha1-armv8-aarch32-ce.S
-@@ -24,6 +24,7 @@
- defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO) && defined(USE_SHA1)
-
- .syntax unified
-+.arch armv8-a
- .fpu crypto-neon-fp-armv8
- .arm
-
-diff --git a/cipher/sha256-armv8-aarch32-ce.S b/cipher/sha256-armv8-aarch32-ce.S
-index 2041a237..2b17ab1b 100644
---- a/cipher/sha256-armv8-aarch32-ce.S
-+++ b/cipher/sha256-armv8-aarch32-ce.S
-@@ -24,6 +24,7 @@
- defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO) && defined(USE_SHA256)
-
- .syntax unified
-+.arch armv8-a
- .fpu crypto-neon-fp-armv8
- .arm
-
-diff --git a/configure.ac b/configure.ac
-index 27faa7f4..66e7cd67 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1619,6 +1619,7 @@ AC_CACHE_CHECK([whether GCC inline assembler supports AArch32 Crypto Extension i
- AC_COMPILE_IFELSE([AC_LANG_SOURCE(
- [[__asm__(
- ".syntax unified\n\t"
-+ ".arch armv8-a\n\t"
- ".arm\n\t"
- ".fpu crypto-neon-fp-armv8\n\t"
-
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.0.bb b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.0.bb
deleted file mode 100644
index 02982f0..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.0.bb
+++ /dev/null
@@ -1,55 +0,0 @@
-SUMMARY = "General purpose cryptographic library based on the code from GnuPG"
-HOMEPAGE = "http://directory.fsf.org/project/libgcrypt/"
-BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
-SECTION = "libs"
-
-# helper program gcryptrnd and getrandom are under GPL, rest LGPL
-LICENSE = "GPLv2+ & LGPLv2.1+ & GPLv3+"
-LICENSE_${PN} = "LGPLv2.1+"
-LICENSE_${PN}-dev = "GPLv2+ & LGPLv2.1+"
-LICENSE_dumpsexp-dev = "GPLv3+"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff"
-
-DEPENDS = "libgpg-error"
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.gz \
- file://0001-Add-and-use-pkg-config-for-libgcrypt-instead-of-conf.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://0005-ecc-Add-input-validation-for-X25519.patch \
- file://0006-Fix-building-AArch32-CE-implementations-when-target-.patch \
-"
-SRC_URI[md5sum] = "110ce4352f9ea6f560bdc6c5644ae93c"
-SRC_URI[sha256sum] = "f6e470b7f2d3a703e8747f05a8c19d9e10e26ebf2d5f3d71ff75a40f504e12ee"
-
-BINCONFIG = "${bindir}/libgcrypt-config"
-
-inherit autotools texinfo binconfig-disabled pkgconfig
-
-EXTRA_OECONF = "--disable-asm"
-EXTRA_OEMAKE_class-target = "LIBTOOLFLAGS='--tag=CC'"
-
-PACKAGECONFIG ??= "capabilities"
-PACKAGECONFIG[capabilities] = "--with-capabilities,--without-capabilities,libcap"
-
-do_configure_prepend () {
- # Else this could be used in preference to the one in aclocal-copy
- rm -f ${S}/m4/gpg-error.m4
-}
-
-# libgcrypt.pc is added locally and thus installed here
-do_install_append() {
- install -d ${D}/${libdir}/pkgconfig
- install -m 0644 ${B}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/
-}
-
-PACKAGES =+ "dumpsexp-dev"
-
-FILES_${PN}-dev += "${bindir}/hmac256"
-FILES_dumpsexp-dev += "${bindir}/dumpsexp"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.2.bb b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.2.bb
new file mode 100644
index 0000000..b36e653
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.2.bb
@@ -0,0 +1,53 @@
+SUMMARY = "General purpose cryptographic library based on the code from GnuPG"
+HOMEPAGE = "http://directory.fsf.org/project/libgcrypt/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+SECTION = "libs"
+
+# helper program gcryptrnd and getrandom are under GPL, rest LGPL
+LICENSE = "GPLv2+ & LGPLv2.1+ & GPLv3+"
+LICENSE_${PN} = "LGPLv2.1+"
+LICENSE_${PN}-dev = "GPLv2+ & LGPLv2.1+"
+LICENSE_dumpsexp-dev = "GPLv3+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff"
+
+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://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 \
+"
+SRC_URI[md5sum] = "cfb0b5c79eab07686b6898160a407139"
+SRC_URI[sha256sum] = "c8064cae7558144b13ef0eb87093412380efa16c4ee30ad12ecb54886a524c07"
+
+BINCONFIG = "${bindir}/libgcrypt-config"
+
+inherit autotools texinfo binconfig-disabled pkgconfig
+
+EXTRA_OECONF = "--disable-asm"
+EXTRA_OEMAKE_class-target = "LIBTOOLFLAGS='--tag=CC'"
+
+PACKAGECONFIG ??= "capabilities"
+PACKAGECONFIG[capabilities] = "--with-capabilities,--without-capabilities,libcap"
+
+do_configure_prepend () {
+ # Else this could be used in preference to the one in aclocal-copy
+ rm -f ${S}/m4/gpg-error.m4
+}
+
+# libgcrypt.pc is added locally and thus installed here
+do_install_append() {
+ install -d ${D}/${libdir}/pkgconfig
+ install -m 0644 ${B}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/
+}
+
+PACKAGES =+ "dumpsexp-dev"
+
+FILES_${PN}-dev += "${bindir}/hmac256"
+FILES_dumpsexp-dev += "${bindir}/dumpsexp"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.27.bb b/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.27.bb
index b2e2d50..b74f079 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.27.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.27.bb
@@ -21,7 +21,7 @@
BINCONFIG = "${bindir}/gpg-error-config"
-inherit autotools binconfig-disabled pkgconfig gettext
+inherit autotools binconfig-disabled pkgconfig gettext multilib_header
CPPFLAGS += "-P"
do_compile_prepend() {
TARGET_FILE=linux-gnu
@@ -53,6 +53,7 @@
do_install_append() {
# we don't have common lisp in OE
rm -rf "${D}${datadir}/common-lisp/"
+ oe_multilib_header gpg-error.h gpgrt.h
}
FILES_${PN}-dev += "${bindir}/gpg-error"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch b/import-layers/yocto-poky/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch
index c5c0cb0..b50f50e 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch
@@ -14,11 +14,11 @@
CMakeLists.txt | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index d5aad80..5cc9863 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -91,8 +91,7 @@ if(SHARED_ONLY)
+Index: libical-2.0.0/CMakeLists.txt
+===================================================================
+--- libical-2.0.0.orig/CMakeLists.txt
++++ libical-2.0.0/CMakeLists.txt
+@@ -116,8 +116,7 @@ if(SHARED_ONLY)
set(LIBRARY_TYPE SHARED)
endif()
@@ -26,8 +26,5 @@
-find_package(Perl REQUIRED)
+set(PERL_EXECUTABLE perl)
- # MSVC specific definitions
- if(WIN32)
---
-2.1.4
-
+ # Ensure finding 64bit libs when using 64-bit compilers
+ if(CMAKE_CL_64)
diff --git a/import-layers/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb b/import-layers/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb
index d4fe868..dcc21cc 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb
@@ -17,5 +17,3 @@
UPSTREAM_CHECK_URI = "https://github.com/libical/libical/releases"
inherit cmake pkgconfig
-
-FILES_${PN}-dev += "${libdir}/cmake/*"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch b/import-layers/yocto-poky/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
index d28dfd9..5afe6de 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
@@ -6,13 +6,13 @@
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-Index: libksba-1.3.0/Makefile.am
+Index: libksba-1.3.5/Makefile.am
===================================================================
---- libksba-1.3.0.orig/Makefile.am 2014-05-13 21:39:22.390385646 +0000
-+++ libksba-1.3.0/Makefile.am 2014-05-13 21:39:22.462385646 +0000
-@@ -21,6 +21,9 @@
+--- libksba-1.3.5.orig/Makefile.am
++++ libksba-1.3.5/Makefile.am
+@@ -20,6 +20,9 @@
+
ACLOCAL_AMFLAGS = -I m4 -I gl/m4
- AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
+pkgconfigdir = ${libdir}/pkgconfig
+pkgconfig_DATA = ksba.pc
@@ -20,11 +20,11 @@
# (A suitable gitlog-to-changelog script can be found in GnuPG master.)
GITLOG_TO_CHANGELOG=gitlog-to-changelog
-Index: libksba-1.3.0/configure.ac
+Index: libksba-1.3.5/configure.ac
===================================================================
---- libksba-1.3.0.orig/configure.ac 2014-05-13 21:39:22.390385646 +0000
-+++ libksba-1.3.0/configure.ac 2014-05-13 21:39:22.462385646 +0000
-@@ -400,6 +400,7 @@
+--- libksba-1.3.5.orig/configure.ac
++++ libksba-1.3.5/configure.ac
+@@ -414,6 +414,7 @@ gl/Makefile
src/Makefile
src/ksba-config
src/versioninfo.rc
@@ -32,10 +32,10 @@
tests/Makefile
doc/Makefile
])
-Index: libksba-1.3.0/ksba.pc.in
+Index: libksba-1.3.5/ksba.pc.in
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ libksba-1.3.0/ksba.pc.in 2014-05-13 21:39:22.462385646 +0000
+--- /dev/null
++++ libksba-1.3.5/ksba.pc.in
@@ -0,0 +1,17 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
@@ -54,11 +54,11 @@
+Libs.private: -L${libdir} -lgpg-error
+Cflags: -I${includedir}
+
-Index: libksba-1.3.0/src/ksba.m4
+Index: libksba-1.3.5/src/ksba.m4
===================================================================
---- libksba-1.3.0.orig/src/ksba.m4 2014-05-13 21:39:22.390385646 +0000
-+++ libksba-1.3.0/src/ksba.m4 2014-05-13 21:49:03.650382696 +0000
-@@ -22,18 +22,7 @@
+--- libksba-1.3.5.orig/src/ksba.m4
++++ libksba-1.3.5/src/ksba.m4
+@@ -22,18 +22,7 @@ dnl with a changed API.
dnl
AC_DEFUN([AM_PATH_KSBA],
[AC_REQUIRE([AC_CANONICAL_HOST])
@@ -77,7 +77,7 @@
tmp=ifelse([$1], ,1:1.0.0,$1)
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
req_ksba_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
-@@ -43,48 +32,13 @@
+@@ -43,48 +32,13 @@ AC_DEFUN([AM_PATH_KSBA],
min_ksba_version="$tmp"
fi
@@ -129,7 +129,7 @@
if test "$tmp" -gt 0 ; then
AC_MSG_CHECKING([KSBA API version])
if test "$req_ksba_api" -eq "$tmp" ; then
-@@ -97,10 +51,8 @@
+@@ -97,10 +51,8 @@ AC_DEFUN([AM_PATH_KSBA],
fi
fi
if test $ok = yes; then
@@ -141,7 +141,7 @@
if test x"$libksba_config_host" != xnone ; then
if test x"$libksba_config_host" != x"$host" ; then
AC_MSG_WARN([[
-@@ -114,8 +66,6 @@
+@@ -114,8 +66,6 @@ AC_DEFUN([AM_PATH_KSBA],
fi
fi
else
diff --git a/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.5.bb b/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.5.bb
index 36b6670..a7ea53f 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.5.bb
@@ -24,3 +24,5 @@
# Else these could be used in preference to those in aclocal-copy
rm -f ${S}/m4/gpg-error.m4
}
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libmpc/libmpc_1.0.3.bb b/import-layers/yocto-poky/meta/recipes-support/libmpc/libmpc_1.0.3.bb
deleted file mode 100644
index 5881324..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libmpc/libmpc_1.0.3.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require libmpc.inc
-
-DEPENDS = "gmp mpfr"
-
-LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
-SRC_URI = "https://ftp.gnu.org/gnu/mpc/mpc-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "d6a1d5f8ddea3abd2cc3e98f58352d26"
-SRC_URI[sha256sum] = "617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3"
-
-UPSTREAM_CHECK_URI = "http://www.multiprecision.org/index.php?prog=mpc&page=download"
-
-S = "${WORKDIR}/mpc-${PV}"
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libmpc/libmpc_1.1.0.bb b/import-layers/yocto-poky/meta/recipes-support/libmpc/libmpc_1.1.0.bb
new file mode 100644
index 0000000..2d25d38
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libmpc/libmpc_1.1.0.bb
@@ -0,0 +1,15 @@
+require libmpc.inc
+
+DEPENDS = "gmp mpfr"
+
+LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
+SRC_URI = "https://ftp.gnu.org/gnu/mpc/mpc-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "4125404e41e482ec68282a2e687f6c73"
+SRC_URI[sha256sum] = "6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e"
+
+UPSTREAM_CHECK_URI = "http://www.multiprecision.org/mpc/download.html"
+
+S = "${WORKDIR}/mpc-${PV}"
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0001-PATCH-fix-libnl-3.4.0-musl-compile-problem.patch b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0001-PATCH-fix-libnl-3.4.0-musl-compile-problem.patch
new file mode 100644
index 0000000..b20a299
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0001-PATCH-fix-libnl-3.4.0-musl-compile-problem.patch
@@ -0,0 +1,38 @@
+Subject: [PATCH] fix libnl-3.4.0 musl compile problem
+Avoid in6_addr redefinition
+
+Upstream-Status: Pending
+
+Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
+---
+ include/linux-private/linux/if_bridge.h | 1 -
+ include/linux-private/linux/ipv6.h | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/include/linux-private/linux/if_bridge.h b/include/linux-private/linux/if_bridge.h
+index f24050b..8f7490c 100644
+--- a/include/linux-private/linux/if_bridge.h
++++ b/include/linux-private/linux/if_bridge.h
+@@ -15,7 +15,6 @@
+
+ #include <linux/types.h>
+ #include <linux/if_ether.h>
+-#include <linux/in6.h>
+
+ #define SYSFS_BRIDGE_ATTR "bridge"
+ #define SYSFS_BRIDGE_FDB "brforward"
+diff --git a/include/linux-private/linux/ipv6.h b/include/linux-private/linux/ipv6.h
+index e05e684..f16349d 100644
+--- a/include/linux-private/linux/ipv6.h
++++ b/include/linux-private/linux/ipv6.h
+@@ -2,7 +2,6 @@
+ #define _IPV6_H
+
+ #include <asm/byteorder.h>
+-#include <linux/in6.h>
+
+ /* The latest drafts declared increase in minimal mtu up to 1280. */
+
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch
deleted file mode 100644
index 79aa0bd..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-libnl has progressed to 0.3.2 and there does not appear to be any
-"make -j" issues with this build after my limited testing on that
-newer version so we can assume this issue is fixed upstream
-
-Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
-
-Index: libnl-3.2.25/lib/Makefile.am
-===================================================================
---- libnl-3.2.25.orig/lib/Makefile.am
-+++ libnl-3.2.25/lib/Makefile.am
-@@ -46,9 +46,12 @@ CLEANFILES = \
-
- # Hack to avoid using ylwrap. It does not function correctly in combination
- # with --header-file=
-+route/pktloc.lo: route/pktloc_syntax.h route/pktloc_grammar.h
-+route/pktloc_grammar.h: route/pktloc_grammar.c
- route/pktloc_grammar.c: route/pktloc_grammar.l
- $(AM_V_GEN) $(MKDIR_P) route; $(FLEX) --header-file=route/pktloc_grammar.h $(LFLAGS) -o $@ $^
-
-+route/pktloc_syntax.h: route/pktloc_syntax.c
- route/pktloc_syntax.c: route/pktloc_syntax.y
- $(AM_V_GEN) $(MKDIR_P) route; $(YACC) -d $(YFLAGS) -o $@ $^
-
-@@ -102,7 +105,9 @@ BUILT_SOURCES = \
- route/cls/ematch_grammar.c \
- route/cls/ematch_syntax.c \
- route/pktloc_grammar.c \
-- route/pktloc_syntax.c
-+ route/pktloc_syntax.c \
-+ route/pktloc_syntax.h \
-+ route/pktloc_grammar.h
-
- EXTRA_DIST = \
- route/pktloc_grammar.l \
diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.29.bb b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.29.bb
deleted file mode 100644
index 7d4839b..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.29.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-SUMMARY = "A library for applications dealing with netlink sockets"
-HOMEPAGE = "http://www.infradead.org/~tgr/libnl/"
-SECTION = "libs/network"
-
-PE = "1"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-DEPENDS = "flex-native bison-native"
-
-SRC_URI = "https://github.com/thom311/${BPN}/releases/download/${BPN}${@d.getVar('PV').replace('.','_')}/${BP}.tar.gz \
- file://fix-pktloc_syntax_h-race.patch \
- file://fix-pc-file.patch \
-"
-UPSTREAM_CHECK_URI = "https://github.com/thom311/${BPN}/releases"
-
-SRC_URI[md5sum] = "a8ba62a5c4f883f4e493a46d1f3733fe"
-SRC_URI[sha256sum] = "0beb593dc6abfffa18a5c787b27884979c1b7e7f1fd468c801e3cc938a685922"
-
-inherit autotools pkgconfig
-
-FILES_${PN} = "${libdir}/libnl-3.so.* \
- ${libdir}/libnl.so.* \
- ${sysconfdir}"
-RREPLACES_${PN} = "libnl2"
-RCONFLICTS_${PN} = "libnl2"
-FILES_${PN}-dev += "${libdir}/libnl/cli/*/*.la"
-FILES_${PN}-staticdev += "${libdir}/libnl/cli/*/*.a"
-
-PACKAGES += "${PN}-cli ${PN}-genl ${PN}-idiag ${PN}-nf ${PN}-route ${PN}-xfrm"
-FILES_${PN}-cli = "${libdir}/libnl-cli-3.so.* \
- ${libdir}/libnl/cli/*/*.so \
- ${bindir}/genl-ctrl-list \
- ${bindir}/idiag-socket-details \
- ${bindir}/nf-* \
- ${bindir}/nl-*"
-FILES_${PN}-genl = "${libdir}/libnl-genl-3.so.* \
- ${libdir}/libnl-genl.so.*"
-FILES_${PN}-idiag = "${libdir}/libnl-idiag-3.so.*"
-FILES_${PN}-nf = "${libdir}/libnl-nf-3.so.*"
-FILES_${PN}-route = "${libdir}/libnl-route-3.so.*"
-FILES_${PN}-xfrm = "${libdir}/libnl-xfrm-3.so.*"
-RREPLACES_${PN}-genl = "libnl-genl2"
-RCONFLICTS_${PN}-genl = "libnl-genl2"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.4.0.bb b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.4.0.bb
new file mode 100644
index 0000000..90dc644
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.4.0.bb
@@ -0,0 +1,46 @@
+SUMMARY = "A library for applications dealing with netlink sockets"
+HOMEPAGE = "http://www.infradead.org/~tgr/libnl/"
+SECTION = "libs/network"
+
+PE = "1"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS = "flex-native bison-native"
+
+SRC_URI = "https://github.com/thom311/${BPN}/releases/download/${BPN}${@d.getVar('PV').replace('.','_')}/${BP}.tar.gz \
+ file://fix-pc-file.patch \
+ file://0001-PATCH-fix-libnl-3.4.0-musl-compile-problem.patch \
+"
+
+UPSTREAM_CHECK_URI = "https://github.com/thom311/${BPN}/releases"
+
+SRC_URI[md5sum] = "8f71910c03db363b41e2ea62057a4311"
+SRC_URI[sha256sum] = "b7287637ae71c6db6f89e1422c995f0407ff2fe50cecd61a312b6a9b0921f5bf"
+
+inherit autotools pkgconfig
+
+FILES_${PN} = "${libdir}/libnl-3.so.* \
+ ${libdir}/libnl.so.* \
+ ${sysconfdir}"
+RREPLACES_${PN} = "libnl2"
+RCONFLICTS_${PN} = "libnl2"
+FILES_${PN}-dev += "${libdir}/libnl/cli/*/*.la"
+FILES_${PN}-staticdev += "${libdir}/libnl/cli/*/*.a"
+
+PACKAGES += "${PN}-cli ${PN}-genl ${PN}-idiag ${PN}-nf ${PN}-route ${PN}-xfrm"
+FILES_${PN}-cli = "${libdir}/libnl-cli-3.so.* \
+ ${libdir}/libnl/cli/*/*.so \
+ ${bindir}/genl-ctrl-list \
+ ${bindir}/idiag-socket-details \
+ ${bindir}/nf-* \
+ ${bindir}/nl-*"
+FILES_${PN}-genl = "${libdir}/libnl-genl-3.so.* \
+ ${libdir}/libnl-genl.so.*"
+FILES_${PN}-idiag = "${libdir}/libnl-idiag-3.so.*"
+FILES_${PN}-nf = "${libdir}/libnl-nf-3.so.*"
+FILES_${PN}-route = "${libdir}/libnl-route-3.so.*"
+FILES_${PN}-xfrm = "${libdir}/libnl-xfrm-3.so.*"
+RREPLACES_${PN}-genl = "libnl-genl2"
+RCONFLICTS_${PN}-genl = "libnl-genl2"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/libpcre2-CVE-2017-7186.patch b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/libpcre2-CVE-2017-7186.patch
deleted file mode 100644
index bfa3bfe..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/libpcre2-CVE-2017-7186.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-libpcre2-10.23: Fix CVE-2017-7186
-
-A fuzz on libpcre1 through the pcretest utility revealed an invalid read in the
-library. For who is interested in a detailed description of the bug, will
-follow a feedback from upstream:
-
-This was a genuine bug in the 32-bit library. Thanks for finding it. The crash
-was caused by trying to find a Unicode property for a code value greater than
-0x10ffff, the Unicode maximum, when running in non-UTF mode (where character
-values can be up to 0xffffffff).
-
-The complete ASan output:
-
-# pcretest -32 -d $FILE
-==14788==ERROR: AddressSanitizer: SEGV on unknown address 0x7f1bbffed4df (pc 0x7f1bbee3fe6b bp 0x7fff8b50d8c0 sp 0x7fff8b50d3a0 T0)
-==14788==The signal is caused by a READ memory access.
- #0 0x7f1bbee3fe6a in match /tmp/portage/dev-libs/libpcre-8.40/work/pcre-8.40/pcre_exec.c:5473:18
- #1 0x7f1bbee09226 in pcre32_exec /tmp/portage/dev-libs/libpcre-8.40/work/pcre-8.40/pcre_exec.c:6936:8
- #2 0x527d6c in main /tmp/portage/dev-libs/libpcre-8.40/work/pcre-8.40/pcretest.c:5218:9
- #3 0x7f1bbddd678f in __libc_start_main /tmp/portage/sys-libs/glibc-2.23-r3/work/glibc-2.23/csu/../csu/libc-start.c:289
- #4 0x41b438 in _init (/usr/bin/pcretest+0x41b438)
-
-AddressSanitizer can not provide additional info.
-SUMMARY: AddressSanitizer: SEGV /tmp/portage/dev-libs/libpcre-8.40/work/pcre-8.40/pcre_exec.c:5473:18 in match
-==14788==ABORTING
-
-Upstream-Status: Backport [https://vcs.pcre.org/pcre2/code/trunk/src/pcre2_ucd.c?view=patch&r1=316&r2=670&sortby=date \
- https://vcs.pcre.org/pcre2/code/trunk/src/pcre2_internal.h?view=patch&r1=600&r2=670&sortby=date]
-CVE: CVE-2017-7186
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
---- trunk/src/pcre2_ucd.c 2015/07/17 15:44:51 316
-+++ trunk/src/pcre2_ucd.c 2017/02/24 18:25:32 670
-@@ -41,6 +41,20 @@
-
- const char *PRIV(unicode_version) = "8.0.0";
-
-+/* If the 32-bit library is run in non-32-bit mode, character values
-+greater than 0x10ffff may be encountered. For these we set up a
-+special record. */
-+
-+#if PCRE2_CODE_UNIT_WIDTH == 32
-+const ucd_record PRIV(dummy_ucd_record)[] = {{
-+ ucp_Common, /* script */
-+ ucp_Cn, /* type unassigned */
-+ ucp_gbOther, /* grapheme break property */
-+ 0, /* case set */
-+ 0, /* other case */
-+ }};
-+#endif
-+
- /* When recompiling tables with a new Unicode version, please check the
- types in this structure definition from pcre2_internal.h (the actual
- field names will be different):
---- trunk/src/pcre2_internal.h 2016/11/19 12:46:24 600
-+++ trunk/src/pcre2_internal.h 2017/02/24 18:25:32 670
-@@ -1774,10 +1774,17 @@
- /* UCD access macros */
-
- #define UCD_BLOCK_SIZE 128
--#define GET_UCD(ch) (PRIV(ucd_records) + \
-+#define REAL_GET_UCD(ch) (PRIV(ucd_records) + \
- PRIV(ucd_stage2)[PRIV(ucd_stage1)[(int)(ch) / UCD_BLOCK_SIZE] * \
- UCD_BLOCK_SIZE + (int)(ch) % UCD_BLOCK_SIZE])
-
-+#if PCRE2_CODE_UNIT_WIDTH == 32
-+#define GET_UCD(ch) ((ch > MAX_UTF_CODE_POINT)? \
-+ PRIV(dummy_ucd_record) : REAL_GET_UCD(ch))
-+#else
-+#define GET_UCD(ch) REAL_GET_UCD(ch)
-+#endif
-+
- #define UCD_CHARTYPE(ch) GET_UCD(ch)->chartype
- #define UCD_SCRIPT(ch) GET_UCD(ch)->script
- #define UCD_CATEGORY(ch) PRIV(ucp_gentype)[UCD_CHARTYPE(ch)]
-@@ -1834,6 +1841,9 @@
- #define _pcre2_default_compile_context PCRE2_SUFFIX(_pcre2_default_compile_context_)
- #define _pcre2_default_match_context PCRE2_SUFFIX(_pcre2_default_match_context_)
- #define _pcre2_default_tables PCRE2_SUFFIX(_pcre2_default_tables_)
-+#if PCRE2_CODE_UNIT_WIDTH == 32
-+#define _pcre2_dummy_ucd_record PCRE2_SUFFIX(_pcre2_dummy_ucd_record_)
-+#endif
- #define _pcre2_hspace_list PCRE2_SUFFIX(_pcre2_hspace_list_)
- #define _pcre2_vspace_list PCRE2_SUFFIX(_pcre2_vspace_list_)
- #define _pcre2_ucd_caseless_sets PCRE2_SUFFIX(_pcre2_ucd_caseless_sets_)
-@@ -1858,6 +1868,9 @@
- extern const uint32_t PRIV(vspace_list)[];
- extern const uint32_t PRIV(ucd_caseless_sets)[];
- extern const ucd_record PRIV(ucd_records)[];
-+#if PCRE2_CODE_UNIT_WIDTH == 32
-+extern const ucd_record PRIV(dummy_ucd_record)[];
-+#endif
- extern const uint8_t PRIV(ucd_stage1)[];
- extern const uint16_t PRIV(ucd_stage2)[];
- extern const uint32_t PRIV(ucp_gbtable)[];
diff --git a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/libpcre2-CVE-2017-8786.patch b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/libpcre2-CVE-2017-8786.patch
deleted file mode 100644
index eafafc1..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/libpcre2-CVE-2017-8786.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-libpcre2-10.23: Fix CVE-2017-8786
-
-The pcre2test.c in PCRE2 10.23 allows remote attackers to cause a denial of
-service (heap-based buffer overflow) or possibly have unspecified other impact
-via a crafted regular expression.
-
-Upstream-Status: Backport [https://vcs.pcre.org/pcre2/code/trunk/src/pcre2test.c?r1=692&r2=697&view=patch]
-CVE: CVE-2017-8786
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
---- trunk/src/pcre2test.c 2017/03/21 16:18:54 692
-+++ trunk/src/pcre2test.c 2017/03/21 18:36:13 697
-@@ -1017,9 +1017,9 @@
- if (test_mode == PCRE8_MODE) \
- r = pcre2_get_error_message_8(a,G(b,8),G(G(b,8),_size)); \
- else if (test_mode == PCRE16_MODE) \
-- r = pcre2_get_error_message_16(a,G(b,16),G(G(b,16),_size)); \
-+ r = pcre2_get_error_message_16(a,G(b,16),G(G(b,16),_size/2)); \
- else \
-- r = pcre2_get_error_message_32(a,G(b,32),G(G(b,32),_size))
-+ r = pcre2_get_error_message_32(a,G(b,32),G(G(b,32),_size/4))
-
- #define PCRE2_GET_OVECTOR_COUNT(a,b) \
- if (test_mode == PCRE8_MODE) \
-@@ -1399,6 +1399,9 @@
-
- /* ----- Common macros for two-mode cases ----- */
-
-+#define BYTEONE (BITONE/8)
-+#define BYTETWO (BITTWO/8)
-+
- #define CASTFLD(t,a,b) \
- ((test_mode == G(G(PCRE,BITONE),_MODE))? (t)(G(a,BITONE)->b) : \
- (t)(G(a,BITTWO)->b))
-@@ -1481,9 +1484,9 @@
-
- #define PCRE2_GET_ERROR_MESSAGE(r,a,b) \
- if (test_mode == G(G(PCRE,BITONE),_MODE)) \
-- r = G(pcre2_get_error_message_,BITONE)(a,G(b,BITONE),G(G(b,BITONE),_size)); \
-+ r = G(pcre2_get_error_message_,BITONE)(a,G(b,BITONE),G(G(b,BITONE),_size/BYTEONE)); \
- else \
-- r = G(pcre2_get_error_message_,BITTWO)(a,G(b,BITTWO),G(G(b,BITTWO),_size))
-+ r = G(pcre2_get_error_message_,BITTWO)(a,G(b,BITTWO),G(G(b,BITTWO),_size/BYTETWO))
-
- #define PCRE2_GET_OVECTOR_COUNT(a,b) \
- if (test_mode == G(G(PCRE,BITONE),_MODE)) \
-@@ -1904,7 +1907,7 @@
- #define PCRE2_DFA_MATCH(a,b,c,d,e,f,g,h,i,j) \
- a = pcre2_dfa_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),h,i,j)
- #define PCRE2_GET_ERROR_MESSAGE(r,a,b) \
-- r = pcre2_get_error_message_16(a,G(b,16),G(G(b,16),_size))
-+ r = pcre2_get_error_message_16(a,G(b,16),G(G(b,16),_size/2))
- #define PCRE2_GET_OVECTOR_COUNT(a,b) a = pcre2_get_ovector_count_16(G(b,16))
- #define PCRE2_GET_STARTCHAR(a,b) a = pcre2_get_startchar_16(G(b,16))
- #define PCRE2_JIT_COMPILE(r,a,b) r = pcre2_jit_compile_16(G(a,16),b)
-@@ -2000,7 +2003,7 @@
- #define PCRE2_DFA_MATCH(a,b,c,d,e,f,g,h,i,j) \
- a = pcre2_dfa_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),h,i,j)
- #define PCRE2_GET_ERROR_MESSAGE(r,a,b) \
-- r = pcre2_get_error_message_32(a,G(b,32),G(G(b,32),_size))
-+ r = pcre2_get_error_message_32(a,G(b,32),G(G(b,32),_size/4))
- #define PCRE2_GET_OVECTOR_COUNT(a,b) a = pcre2_get_ovector_count_32(G(b,32))
- #define PCRE2_GET_STARTCHAR(a,b) a = pcre2_get_startchar_32(G(b,32))
- #define PCRE2_JIT_COMPILE(r,a,b) r = pcre2_jit_compile_32(G(a,32),b)
-@@ -2889,7 +2892,7 @@
- {
- if (pbuffer32 != NULL) free(pbuffer32);
- pbuffer32_size = 4*len + 4;
-- if (pbuffer32_size < 256) pbuffer32_size = 256;
-+ if (pbuffer32_size < 512) pbuffer32_size = 512;
- pbuffer32 = (uint32_t *)malloc(pbuffer32_size);
- if (pbuffer32 == NULL)
- {
-@@ -7600,7 +7603,8 @@
- int errcode;
- char *endptr;
-
--/* Ensure the relevant non-8-bit buffer is available. */
-+/* Ensure the relevant non-8-bit buffer is available. Ensure that it is at
-+least 128 code units, because it is used for retrieving error messages. */
-
- #ifdef SUPPORT_PCRE2_16
- if (test_mode == PCRE16_MODE)
-@@ -7620,7 +7624,7 @@
- #ifdef SUPPORT_PCRE2_32
- if (test_mode == PCRE32_MODE)
- {
-- pbuffer32_size = 256;
-+ pbuffer32_size = 512;
- pbuffer32 = (uint32_t *)malloc(pbuffer32_size);
- if (pbuffer32 == NULL)
- {
diff --git a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch
index 9516caf..871cdfc 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch
@@ -9,11 +9,11 @@
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-diff --git a/Makefile.am b/Makefile.am
-index 38f1d41..2bde083 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -298,9 +298,21 @@ bin_SCRIPTS = pcre2-config
+Index: pcre2-10.30/Makefile.am
+===================================================================
+--- pcre2-10.30.orig/Makefile.am
++++ pcre2-10.30/Makefile.am
+@@ -325,9 +325,21 @@ bin_SCRIPTS = pcre2-config
## to copy a distributed set of tables that are defined for ASCII code. In this
## case, dftables is not needed.
@@ -35,13 +35,13 @@
src/pcre2_chartables.c: dftables$(EXEEXT)
rm -f $@
./dftables$(EXEEXT) $@
-diff --git a/configure.ac b/configure.ac
-index d7c57aa..d6eb0aa 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -59,6 +59,23 @@ then
- fi
- fi
+Index: pcre2-10.30/configure.ac
+===================================================================
+--- pcre2-10.30.orig/configure.ac
++++ pcre2-10.30/configure.ac
+@@ -60,6 +60,23 @@ fi
+ # This is a new thing required to stop a warning from automake 1.12
+ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+if test x"$cross_compiling" = xyes; then
+ CC_FOR_BUILD="${CC_FOR_BUILD-gcc}"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2_10.23.bb b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2_10.23.bb
deleted file mode 100644
index ca2b028..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2_10.23.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-DESCRIPTION = "There are two major versions of the PCRE library. The \
-newest version is PCRE2, which is a re-working of the original PCRE \
-library to provide an entirely new API. The original, very widely \
-deployed PCRE library's API and feature are stable, future releases \
- will be for bugfixes only. All new future features will be to PCRE2, \
-not the original PCRE 8.x series."
-SUMMARY = "Perl Compatible Regular Expressions version 2"
-HOMEPAGE = "http://www.pcre.org"
-SECTION = "devel"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENCE;md5=3de34df49e1fe3c3b59a08dff214488b"
-
-SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre2-${PV}.tar.bz2 \
- file://pcre-cross.patch \
- file://libpcre2-CVE-2017-8786.patch \
- file://libpcre2-CVE-2017-7186.patch \
-"
-
-SRC_URI[md5sum] = "b2cd00ca7e24049040099b0a46bb3649"
-SRC_URI[sha256sum] = "dfc79b918771f02d33968bd34a749ad7487fa1014aeb787fad29dd392b78c56e"
-
-CVE_PRODUCT = "pcre2"
-
-S = "${WORKDIR}/pcre2-${PV}"
-
-PROVIDES += "pcre2"
-DEPENDS += "bzip2 zlib"
-
-BINCONFIG = "${bindir}/pcre2-config"
-
-inherit autotools binconfig-disabled
-
-EXTRA_OECONF = "\
- --enable-newline-is-lf \
- --enable-rebuild-chartables \
- --with-link-size=2 \
- --with-match-limit=10000000 \
-"
-
-# Set LINK_SIZE in BUILD_CFLAGS given that the autotools bbclass use it to
-# set CFLAGS_FOR_BUILD, required for the libpcre build.
-BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}/src"
-CFLAGS += "-D_REENTRANT"
-CXXFLAGS_append_powerpc = " -lstdc++"
-
-export CCLD_FOR_BUILD ="${BUILD_CCLD}"
-
-PACKAGES =+ "pcre2grep pcre2grep-doc pcre2test pcre2test-doc"
-
-SUMMARY_pcre2grep = "grep utility that uses perl 5 compatible regexes"
-SUMMARY_pcre2grep-doc = "grep utility that uses perl 5 compatible regexes - docs"
-SUMMARY_pcre2test = "program for testing Perl-comatible regular expressions"
-SUMMARY_pcre2test-doc = "program for testing Perl-comatible regular expressions - docs"
-
-FILES_pcre2grep = "${bindir}/pcre2grep"
-FILES_pcre2grep-doc = "${mandir}/man1/pcre2grep.1"
-FILES_pcre2test = "${bindir}/pcre2test"
-FILES_pcre2test-doc = "${mandir}/man1/pcre2test.1"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2_10.30.bb b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2_10.30.bb
new file mode 100644
index 0000000..46c2d63
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2_10.30.bb
@@ -0,0 +1,61 @@
+DESCRIPTION = "There are two major versions of the PCRE library. The \
+newest version is PCRE2, which is a re-working of the original PCRE \
+library to provide an entirely new API. The original, very widely \
+deployed PCRE library's API and feature are stable, future releases \
+ will be for bugfixes only. All new future features will be to PCRE2, \
+not the original PCRE 8.x series."
+SUMMARY = "Perl Compatible Regular Expressions version 2"
+HOMEPAGE = "http://www.pcre.org"
+SECTION = "devel"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=12d55e15a0c6da5c645ba40382bd3293"
+
+SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre2-${PV}.tar.bz2 \
+ file://pcre-cross.patch \
+"
+
+SRC_URI[md5sum] = "d3adf4b130eed854a530390f00020a65"
+SRC_URI[sha256sum] = "90bd41c605d30e3745771eb81928d779f158081a51b2f314bbcc1f73de5773db"
+
+CVE_PRODUCT = "pcre2"
+
+S = "${WORKDIR}/pcre2-${PV}"
+
+PROVIDES += "pcre2"
+DEPENDS += "bzip2 zlib"
+
+BINCONFIG = "${bindir}/pcre2-config"
+
+inherit autotools binconfig-disabled
+
+EXTRA_OECONF = "\
+ --enable-newline-is-lf \
+ --enable-rebuild-chartables \
+ --with-link-size=2 \
+ --with-match-limit=10000000 \
+ --enable-pcre2-16 \
+ --enable-pcre2-32 \
+"
+# Set LINK_SIZE in BUILD_CFLAGS given that the autotools bbclass use it to
+# set CFLAGS_FOR_BUILD, required for the libpcre build.
+BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}/src"
+CFLAGS += "-D_REENTRANT"
+CXXFLAGS_append_powerpc = " -lstdc++"
+
+export CCLD_FOR_BUILD ="${BUILD_CCLD}"
+
+PACKAGES =+ "libpcre2-16 libpcre2-32 pcre2grep pcre2grep-doc pcre2test pcre2test-doc"
+
+SUMMARY_pcre2grep = "grep utility that uses perl 5 compatible regexes"
+SUMMARY_pcre2grep-doc = "grep utility that uses perl 5 compatible regexes - docs"
+SUMMARY_pcre2test = "program for testing Perl-comatible regular expressions"
+SUMMARY_pcre2test-doc = "program for testing Perl-comatible regular expressions - docs"
+
+FILES_libpcre2-16 = "${libdir}/libpcre2-16.so.*"
+FILES_libpcre2-32 = "${libdir}/libpcre2-32.so.*"
+FILES_pcre2grep = "${bindir}/pcre2grep"
+FILES_pcre2grep-doc = "${mandir}/man1/pcre2grep.1"
+FILES_pcre2test = "${bindir}/pcre2test"
+FILES_pcre2test-doc = "${mandir}/man1/pcre2test.1"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.41.bb b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.41.bb
index 0eaed18..0187c08 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.41.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.41.bb
@@ -80,4 +80,8 @@
for i in RunTest RunGrepTest test-driver; \
do cp ${S}/$i $t; \
done
+ # Skip the fr_FR locale test. If the locale fr_FR is found, it is tested.
+ # If not found, the test is skipped. The test program assumes fr_FR is non-UTF-8
+ # locale so the test fails if fr_FR is UTF-8 locale.
+ sed -i -e 's:do3=yes:do3=no:g' ${D}${PTEST_PATH}/RunTest
}
diff --git a/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.14.bb b/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.14.bb
deleted file mode 100644
index 4c39f52..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.14.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "Library providing automatic proxy configuration management"
-HOMEPAGE = "https://github.com/libproxy/libproxy"
-BUGTRACKER = "https://github.com/libproxy/libproxy/issues"
-SECTION = "libs"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
- file://utils/proxy.c;beginline=1;endline=18;md5=55152a1006d7dafbef32baf9c30a99c0"
-
-DEPENDS = "glib-2.0"
-
-SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz"
-SRC_URI[md5sum] = "e7514f78f5432210e17a01b6b618dde2"
-SRC_URI[sha256sum] = "e25d046850346a505c0617646f1e68b660092efadf665548a89c280900262ea6"
-
-UPSTREAM_CHECK_URI = "https://github.com/libproxy/libproxy/releases"
-UPSTREAM_CHECK_REGEX = "libproxy-(?P<pver>.*)\.tar"
-
-inherit cmake pkgconfig
-
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gnome', '', d)} gnome3"
-PACKAGECONFIG[gnome] = "-DWITH_GNOME=yes,-DWITH_GNOME=no,gconf"
-PACKAGECONFIG[gnome3] = "-DWITH_GNOME3=yes,-DWITH_GNOME3=no"
-
-EXTRA_OECMAKE += " \
- -DWITH_KDE4=no \
- -DWITH_MOZJS=no \
- -DWITH_NM=no \
- -DWITH_PERL=no \
- -DWITH_PYTHON=no \
- -DWITH_WEBKIT=no \
- -DLIB_INSTALL_DIR=${libdir} \
- -DLIBEXEC_INSTALL_DIR=${libexecdir} \
-"
-SECURITY_PIE_CFLAGS_remove = "-fPIE -pie"
-
-FILES_${PN} += "${libdir}/${BPN}/${PV}/modules"
-FILES_${PN}-dev += "${datadir}/cmake"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.15.bb b/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.15.bb
new file mode 100644
index 0000000..991c9d8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.15.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Library providing automatic proxy configuration management"
+HOMEPAGE = "https://github.com/libproxy/libproxy"
+BUGTRACKER = "https://github.com/libproxy/libproxy/issues"
+SECTION = "libs"
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://utils/proxy.c;beginline=1;endline=18;md5=55152a1006d7dafbef32baf9c30a99c0"
+
+DEPENDS = "glib-2.0"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz"
+SRC_URI[md5sum] = "f6b1d2a1e17a99cd3debaae6d04ab152"
+SRC_URI[sha256sum] = "654db464120c9534654590b6683c7fa3887b3dad0ca1c4cd412af24fbfca6d4f"
+
+UPSTREAM_CHECK_URI = "https://github.com/libproxy/libproxy/releases"
+UPSTREAM_CHECK_REGEX = "libproxy-(?P<pver>.*)\.tar"
+
+inherit cmake pkgconfig
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gnome', '', d)} gnome3"
+PACKAGECONFIG[gnome] = "-DWITH_GNOME=yes,-DWITH_GNOME=no,gconf"
+PACKAGECONFIG[gnome3] = "-DWITH_GNOME3=yes,-DWITH_GNOME3=no"
+
+EXTRA_OECMAKE += " \
+ -DWITH_KDE4=no \
+ -DWITH_MOZJS=no \
+ -DWITH_NM=no \
+ -DWITH_PERL=no \
+ -DWITH_PYTHON=no \
+ -DWITH_WEBKIT=no \
+ -DLIB_INSTALL_DIR=${libdir} \
+ -DLIBEXEC_INSTALL_DIR=${libexecdir} \
+"
+SECURITY_PIE_CFLAGS_remove = "-fPIE -pie"
+
+FILES_${PN} += "${libdir}/${BPN}/${PV}/modules"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.58.2.bb b/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.58.2.bb
deleted file mode 100644
index c9f95e5..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.58.2.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "An HTTP library implementation in C"
-HOMEPAGE = "https://wiki.gnome.org/Projects/libsoup"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "x11/gnome/libs"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 intltool-native"
-
-SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
-
-SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "eb33adb459c2283efc5c7d09ccdbbcfc"
-SRC_URI[sha256sum] = "442300ca1b1bf8a3bbf2f788203287ff862542d4fc048f19a92a068a27d17b72"
-
-S = "${WORKDIR}/libsoup-${PV}"
-
-inherit autotools gettext pkgconfig upstream-version-is-even gobject-introspection gtk-doc
-
-# libsoup-gnome is entirely deprecated and just stubs in 2.42 onwards. Disable by default.
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome"
-PACKAGECONFIG[gssapi] = "--with-gssapi,--without-gssapi,krb5"
-
-EXTRA_OECONF = "--disable-vala"
-
-# 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
-# renaming in order to keep the package name consistent regardless of whether
-# gnome support is enabled or disabled.
-DEBIAN_NOAUTONAME_${PN} = "1"
-
-# glib-networking is needed for SSL, proxies, etc.
-RRECOMMENDS_${PN} = "glib-networking"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.60.3.bb b/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.60.3.bb
new file mode 100644
index 0000000..e2e7ff4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.60.3.bb
@@ -0,0 +1,35 @@
+SUMMARY = "An HTTP library implementation in C"
+HOMEPAGE = "https://wiki.gnome.org/Projects/libsoup"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/gnome/libs"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 intltool-native"
+
+SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
+
+SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "4cf8937d161d3dd71a65f1684e317824"
+SRC_URI[sha256sum] = "1b0dc762f23abe4e0d29b77370e539fd35f31d8e8e0318d6ddccff395be68a22"
+
+S = "${WORKDIR}/libsoup-${PV}"
+
+inherit autotools gettext pkgconfig upstream-version-is-even gobject-introspection gtk-doc
+
+# libsoup-gnome is entirely deprecated and just stubs in 2.42 onwards. Disable by default.
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome"
+PACKAGECONFIG[gssapi] = "--with-gssapi,--without-gssapi,krb5"
+
+EXTRA_OECONF = "--disable-vala"
+
+# 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
+# renaming in order to keep the package name consistent regardless of whether
+# gnome support is enabled or disabled.
+DEBIAN_NOAUTONAME_${PN} = "1"
+
+# glib-networking is needed for SSL, proxies, etc.
+RRECOMMENDS_${PN} = "glib-networking"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch b/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
index d448916..9e8ce22 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
@@ -1,6 +1,6 @@
-From 8d99a368615656a835f5502326afd31cec2cebfe Mon Sep 17 00:00:00 2001
+From 30562065ba9e4c238e76100b5f9f0c5add0e635b Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
-Date: Mon, 16 Sep 2013 18:16:12 +0800
+Date: Tue, 5 Dec 2017 09:30:36 +0200
Subject: [PATCH] remove the test to convert euc-jp
Remove the test "Test against HP-UX 11.11 bug:
@@ -13,28 +13,44 @@
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
- gnulib-m4/iconv.m4 | 11 -----------
- 1 files changed, 0 insertions(+), 11 deletions(-)
+---
+ gnulib-m4/iconv.m4 | 23 -----------------------
+ 1 file changed, 23 deletions(-)
-Index: libunistring-0.9.4/gnulib-m4/iconv.m4
-===================================================================
---- libunistring-0.9.4.orig/gnulib-m4/iconv.m4 2014-11-03 17:41:29.755011917 +0000
-+++ libunistring-0.9.4/gnulib-m4/iconv.m4 2014-11-03 17:43:03.795014480 +0000
-@@ -159,17 +159,6 @@
+diff --git a/gnulib-m4/iconv.m4 b/gnulib-m4/iconv.m4
+index b33ecd0..73b6aa1 100644
+--- a/gnulib-m4/iconv.m4
++++ b/gnulib-m4/iconv.m4
+@@ -165,29 +165,6 @@ AC_DEFUN([AM_ICONV_LINK],
}
}
#endif
- /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
- provided. */
-- if (/* Try standardized names. */
-- iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
-- /* Try IRIX, OSF/1 names. */
-- && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
-- /* Try AIX names. */
-- && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
-- /* Try HP-UX names. */
-- && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
-- result |= 16;
+- {
+- /* Try standardized names. */
+- iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
+- /* Try IRIX, OSF/1 names. */
+- iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
+- /* Try AIX names. */
+- iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
+- /* Try HP-UX names. */
+- iconv_t cd4 = iconv_open ("utf8", "eucJP");
+- if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
+- && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
+- result |= 16;
+- if (cd1 != (iconv_t)(-1))
+- iconv_close (cd1);
+- if (cd2 != (iconv_t)(-1))
+- iconv_close (cd2);
+- if (cd3 != (iconv_t)(-1))
+- iconv_close (cd3);
+- if (cd4 != (iconv_t)(-1))
+- iconv_close (cd4);
+- }
return result;
- }]])],
- [am_cv_func_iconv_works=yes],
+ ]])],
+ [am_cv_func_iconv_works=yes], ,
+--
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.7.bb b/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.7.bb
deleted file mode 100644
index f77a210..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.7.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Library for manipulating C and Unicode strings"
-
-DESCRIPTION = "Text files are nowadays usually encoded in Unicode, and may\
- consist of very different scripts from Latin letters to Chinese Hanzi\
- with many kinds of special characters accents, right-to-left writing\
- marks, hyphens, Roman numbers, and much more. But the POSIX platform\
- APIs for text do not contain adequate functions for dealing with\
- particular properties of many Unicode characters. In fact, the POSIX\
- APIs for text have several assumptions at their base which don't hold\
- for Unicode text. This library provides functions for manipulating\
- Unicode strings and for manipulating C strings according to the Unicode\
- standard. This package contains documentation."
-
-HOMEPAGE = "http://www.gnu.org/software/libunistring/"
-SECTION = "devel"
-LICENSE = "LGPLv3+ | GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
- file://README;beginline=45;endline=65;md5=08287d16ba8d839faed8d2dc14d7d6a5 \
- file://doc/libunistring.texi;md5=b86c9fd7acaac623017239640631912c \
- "
-
-SRC_URI = "${GNU_MIRROR}/libunistring/libunistring-${PV}.tar.gz \
- file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
-"
-SRC_URI[md5sum] = "8e663454aa372181ee8e46edaa3ba4c8"
-SRC_URI[sha256sum] = "9ce081cbee1951b55597b30e7030bda9d7b2f034ef901a135ff3a020be5a41e5"
-
-inherit autotools texinfo
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.9.bb b/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.9.bb
new file mode 100644
index 0000000..ab7cba5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.9.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Library for manipulating C and Unicode strings"
+
+DESCRIPTION = "Text files are nowadays usually encoded in Unicode, and may\
+ consist of very different scripts from Latin letters to Chinese Hanzi\
+ with many kinds of special characters accents, right-to-left writing\
+ marks, hyphens, Roman numbers, and much more. But the POSIX platform\
+ APIs for text do not contain adequate functions for dealing with\
+ particular properties of many Unicode characters. In fact, the POSIX\
+ APIs for text have several assumptions at their base which don't hold\
+ for Unicode text. This library provides functions for manipulating\
+ Unicode strings and for manipulating C strings according to the Unicode\
+ standard. This package contains documentation."
+
+HOMEPAGE = "http://www.gnu.org/software/libunistring/"
+SECTION = "devel"
+LICENSE = "LGPLv3+ | GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://README;beginline=45;endline=65;md5=08287d16ba8d839faed8d2dc14d7d6a5 \
+ file://doc/libunistring.texi;md5=efb80a3799a60f95feaf80661d4f204c \
+ "
+
+SRC_URI = "${GNU_MIRROR}/libunistring/libunistring-${PV}.tar.gz \
+ file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+"
+SRC_URI[md5sum] = "4f689e37e4c3bd67de5786aa51d98b13"
+SRC_URI[sha256sum] = "f5e90c08f9e5427ca3a2c0c53f19aa38b25c500913510ad25afef86448bea84a"
+
+inherit autotools texinfo
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
index 0dff2c8..c8faca4 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
@@ -28,10 +28,10 @@
include/libunwind_i.h | 1 +
2 files changed, 2 insertions(+), 7 deletions(-)
-diff --git a/acinclude.m4 b/acinclude.m4
-index 497f7c2..9c15af1 100644
---- a/acinclude.m4
-+++ b/acinclude.m4
+Index: libunwind-1.2.1/acinclude.m4
+===================================================================
+--- libunwind-1.2.1.orig/acinclude.m4
++++ libunwind-1.2.1/acinclude.m4
@@ -22,11 +22,5 @@ fi])
AC_DEFUN([CHECK_ATOMIC_OPS],
[dnl Check whether the system has the atomic_ops package installed.
@@ -45,18 +45,15 @@
-# AC_CHECK_LIB(atomic_ops, main)
+ AC_CHECK_LIB(atomic_ops, main)
])
-diff --git a/include/libunwind_i.h b/include/libunwind_i.h
-index 23f615e..deabdfd 100644
---- a/include/libunwind_i.h
-+++ b/include/libunwind_i.h
-@@ -95,6 +95,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
- (pthread_mutex_unlock != NULL ? pthread_mutex_unlock (l) : 0)
+Index: libunwind-1.2.1/include/libunwind_i.h
+===================================================================
+--- libunwind-1.2.1.orig/include/libunwind_i.h
++++ libunwind-1.2.1/include/libunwind_i.h
+@@ -116,6 +116,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
+ (pthread_mutex_unlock != NULL ? pthread_mutex_unlock (l) : 0)
#ifdef HAVE_ATOMIC_OPS_H
+# define AO_REQUIRE_CAS
# include <atomic_ops.h>
static inline int
cmpxchg_ptr (void *addr, void *old, void *new)
---
-1.9.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/fix-mips.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/fix-mips.patch
deleted file mode 100644
index 0022237..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/fix-mips.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 5f354cb7b9c84dae006f0ebd8ad7a78d7e2aad0c Mon Sep 17 00:00:00 2001
-From: Dave Watson <davejwatson@fb.com>
-Date: Wed, 25 Jan 2017 16:18:02 -0800
-Subject: [PATCH] mips/tilegx: Add missing unwind_i.h header file
-
-reported-by: John Knight <John.Knight@belkin.com>
----
- src/Makefile.am | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 5d874755..7de4c425 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -280,7 +280,7 @@ libunwind_hppa_la_SOURCES_hppa = $(libunwind_la_SOURCES_hppa_common) \
- hppa/Gresume.c hppa/Gstep.c
-
- # The list of files that go info libunwind and libunwind-mips:
--noinst_HEADERS += mips/init.h mips/offsets.h
-+noinst_HEADERS += mips/init.h mips/offsets.h mips/unwind_i.h
- libunwind_la_SOURCES_mips_common = $(libunwind_la_SOURCES_common) \
- mips/is_fpreg.c mips/regname.c
-
-@@ -299,7 +299,7 @@ libunwind_mips_la_SOURCES_mips = $(libunwind_la_SOURCES_mips_common) \
- mips/Gis_signal_frame.c mips/Gregs.c mips/Gresume.c mips/Gstep.c
-
- # The list of files that go info libunwind and libunwind-tilegx:
--noinst_HEADERS += tilegx/init.h tilegx/offsets.h
-+noinst_HEADERS += tilegx/init.h tilegx/offsets.h tilegx/unwind_i.h
- libunwind_la_SOURCES_tilegx_common = $(libunwind_la_SOURCES_common) \
- tilegx/is_fpreg.c tilegx/regname.c
-
-diff --git a/src/mips/unwind_i.h b/src/mips/unwind_i.h
-new file mode 100644
-index 0000000..3382dcf
---- /dev/null
-+++ b/src/mips/unwind_i.h
-@@ -0,0 +1,43 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2008 CodeSourcery
-+
-+This file is part of libunwind.
-+
-+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 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 unwind_i_h
-+#define unwind_i_h
-+
-+#include <stdint.h>
-+
-+#include <libunwind-mips.h>
-+
-+#include "libunwind_i.h"
-+
-+#define mips_lock UNW_OBJ(lock)
-+#define mips_local_resume UNW_OBJ(local_resume)
-+#define mips_local_addr_space_init UNW_OBJ(local_addr_space_init)
-+
-+extern int mips_local_resume (unw_addr_space_t as, unw_cursor_t *cursor,
-+ void *arg);
-+
-+extern void mips_local_addr_space_init (void);
-+
-+#endif /* unwind_i_h */
-diff --git a/src/tilegx/unwind_i.h b/src/tilegx/unwind_i.h
-new file mode 100644
-index 0000000..aac7be3
---- /dev/null
-+++ b/src/tilegx/unwind_i.h
-@@ -0,0 +1,44 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2008 CodeSourcery
-+
-+This file is part of libunwind.
-+
-+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 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 unwind_i_h
-+#define unwind_i_h
-+
-+#include <memory.h>
-+#include <stdint.h>
-+
-+#include <libunwind-tilegx.h>
-+
-+#include "libunwind_i.h"
-+
-+#define tilegx_local_resume UNW_OBJ(local_resume)
-+#define tilegx_local_addr_space_init UNW_OBJ(local_addr_space_init)
-+
-+extern int tilegx_local_resume (unw_addr_space_t as,
-+ unw_cursor_t *cursor,
-+ void *arg);
-+
-+extern void tilegx_local_addr_space_init (void);
-+
-+#endif /* unwind_i_h */
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.2.1.bb b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.2.1.bb
new file mode 100644
index 0000000..37a7624
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.2.1.bb
@@ -0,0 +1,23 @@
+require libunwind.inc
+
+SRC_URI[md5sum] = "06ba9e60d92fd6f55cd9dadb084df19e"
+SRC_URI[sha256sum] = "3f3ecb90e28cbe53fba7a4a27ccce7aad188d3210bb1964a923a731a27a75acb"
+
+SRC_URI = "http://download.savannah.nongnu.org/releases/libunwind/libunwind-${PV}.tar.gz \
+ file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \
+ file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \
+ file://0001-x86-Stub-out-x86_local_resume.patch \
+ file://0001-Fix-build-on-mips-musl.patch \
+ file://0001-add-knobs-to-disable-enable-tests.patch \
+ file://0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \
+ file://libunwind-1.1-x32.patch \
+ "
+
+SRC_URI_append_libc-musl = " file://musl-header-conflict.patch"
+EXTRA_OECONF_append_libc-musl = " --disable-documentation --disable-tests "
+
+# http://errors.yoctoproject.org/Errors/Details/20487/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.2.bb b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.2.bb
deleted file mode 100644
index c6312f2..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.2.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-require libunwind.inc
-
-SRC_URI[md5sum] = "eefcb5d7f78fdc8f1ed172a26ea4202f"
-SRC_URI[sha256sum] = "1de38ffbdc88bd694d10081865871cd2bfbb02ad8ef9e1606aee18d65532b992"
-
-SRC_URI = "http://download.savannah.nongnu.org/releases/libunwind/libunwind-${PV}.tar.gz \
- file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \
- file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \
- file://0001-x86-Stub-out-x86_local_resume.patch \
- file://0001-Fix-build-on-mips-musl.patch \
- file://0001-add-knobs-to-disable-enable-tests.patch \
- file://0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \
- file://libunwind-1.1-x32.patch \
- file://fix-mips.patch \
- "
-
-SRC_URI_append_libc-musl = " file://musl-header-conflict.patch"
-EXTRA_OECONF_append_libc-musl = " --disable-documentation --disable-tests "
-
-# http://errors.yoctoproject.org/Errors/Details/20487/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
-
-LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.10.0.bb b/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.10.0.bb
deleted file mode 100644
index 4ecb20b..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.10.0.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Userspace RCU (read-copy-update) library"
-HOMEPAGE = "http://lttng.org/urcu"
-BUGTRACKER = "http://lttng.org/project/issues"
-
-LICENSE = "LGPLv2.1+ & MIT-style"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
- file://src/urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \
- file://include/urcu/uatomic/x86.h;beginline=4;endline=21;md5=58e50bbd8a2f073bb5500e6554af0d0b"
-
-SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \
- "
-
-SRC_URI[md5sum] = "69dab85b6929c378338b9504adc6aea7"
-SRC_URI[sha256sum] = "7cb58a7ba5151198087f025dc8d19d8918e9c6d56772f039696c111d9aad3190"
-
-S = "${WORKDIR}/userspace-rcu-${PV}"
-inherit autotools
diff --git a/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.10.1.bb b/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.10.1.bb
new file mode 100644
index 0000000..459c04a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.10.1.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Userspace RCU (read-copy-update) library"
+HOMEPAGE = "http://lttng.org/urcu"
+BUGTRACKER = "http://lttng.org/project/issues"
+
+LICENSE = "LGPLv2.1+ & MIT-style"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
+ file://src/urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \
+ file://include/urcu/uatomic/x86.h;beginline=4;endline=21;md5=58e50bbd8a2f073bb5500e6554af0d0b"
+
+SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \
+ "
+
+SRC_URI[md5sum] = "281a2f92fdc39c40ad6b76f6631fdbd7"
+SRC_URI[sha256sum] = "9c09220be4435dc27fcd22d291707b94b97f159e0c442fbcd60c168f8f79eb06"
+
+S = "${WORKDIR}/userspace-rcu-${PV}"
+inherit autotools
+
+CPPFLAGS_append_riscv64 = " -pthread -D_REENTRANT"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Check-for-integer-overflow-in-xsltAddTextString.patch b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Check-for-integer-overflow-in-xsltAddTextString.patch
deleted file mode 100644
index 57aaacc..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Check-for-integer-overflow-in-xsltAddTextString.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 08ab2774b870de1c7b5a48693df75e8154addae5 Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Thu, 12 Jan 2017 15:39:52 +0100
-Subject: [PATCH] Check for integer overflow in xsltAddTextString
-
-Limit buffer size in xsltAddTextString to INT_MAX. The issue can be
-exploited to trigger an out of bounds write on 64-bit systems.
-
-Originally reported to Chromium:
-
-https://crbug.com/676623
-
-CVE: CVE-2017-5029
-Upstream-Status: Backport
-
-Signed-off-by: Fan Xin <fan.xin@jp.fujitus.com>
-
----
- libxslt/transform.c | 25 ++++++++++++++++++++++---
- libxslt/xsltInternals.h | 4 ++--
- 2 files changed, 24 insertions(+), 5 deletions(-)
-
-diff --git a/libxslt/transform.c b/libxslt/transform.c
-index 519133f..02bff34 100644
---- a/libxslt/transform.c
-+++ b/libxslt/transform.c
-@@ -813,13 +813,32 @@ xsltAddTextString(xsltTransformContextPtr ctxt, xmlNodePtr target,
- return(target);
-
- if (ctxt->lasttext == target->content) {
-+ int minSize;
-
-- if (ctxt->lasttuse + len >= ctxt->lasttsize) {
-+ /* Check for integer overflow accounting for NUL terminator. */
-+ if (len >= INT_MAX - ctxt->lasttuse) {
-+ xsltTransformError(ctxt, NULL, target,
-+ "xsltCopyText: text allocation failed\n");
-+ return(NULL);
-+ }
-+ minSize = ctxt->lasttuse + len + 1;
-+
-+ if (ctxt->lasttsize < minSize) {
- xmlChar *newbuf;
- int size;
-+ int extra;
-+
-+ /* Double buffer size but increase by at least 100 bytes. */
-+ extra = minSize < 100 ? 100 : minSize;
-+
-+ /* Check for integer overflow. */
-+ if (extra > INT_MAX - ctxt->lasttsize) {
-+ size = INT_MAX;
-+ }
-+ else {
-+ size = ctxt->lasttsize + extra;
-+ }
-
-- size = ctxt->lasttsize + len + 100;
-- size *= 2;
- newbuf = (xmlChar *) xmlRealloc(target->content,size);
- if (newbuf == NULL) {
- xsltTransformError(ctxt, NULL, target,
-diff --git a/libxslt/xsltInternals.h b/libxslt/xsltInternals.h
-index 060b178..5ad1771 100644
---- a/libxslt/xsltInternals.h
-+++ b/libxslt/xsltInternals.h
-@@ -1754,8 +1754,8 @@ struct _xsltTransformContext {
- * Speed optimization when coalescing text nodes
- */
- const xmlChar *lasttext; /* last text node content */
-- unsigned int lasttsize; /* last text node size */
-- unsigned int lasttuse; /* last text node use */
-+ int lasttsize; /* last text node size */
-+ int lasttuse; /* last text node use */
- /*
- * Per Context Debugging
- */
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Link-libraries-with-libm.patch b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Link-libraries-with-libm.patch
deleted file mode 100644
index 16ffeba..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Link-libraries-with-libm.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 487e2f7e35dad3deec7978ce4478a3d4ea5070e7 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Fri, 10 Feb 2017 14:26:59 +0200
-Subject: [PATCH] Link libraries with libm
-
-Otherwise linking the resulting libraries to a binary (e.g. xsltproc)
-fails when using gold linker:
-| ../libxslt/.libs/libxslt.so: error: undefined reference to 'fmod'
-| ../libxslt/.libs/libxslt.so: error: undefined reference to 'pow'
-| ../libexslt/.libs/libexslt.so: error: undefined reference to 'floor'
-| collect2: error: ld returned 1 exit status
-
-Upstream-Status: Submitted [mailing list, Feb 10 2017]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- libexslt/Makefile.am | 2 +-
- libxslt/Makefile.am | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libexslt/Makefile.am b/libexslt/Makefile.am
-index 1cf5138..5449524 100644
---- a/libexslt/Makefile.am
-+++ b/libexslt/Makefile.am
-@@ -27,7 +27,7 @@ libexslt_la_SOURCES = \
- libexslt.h \
- dynamic.c
-
--libexslt_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(EXTRA_LIBS) $(LIBGCRYPT_LIBS)
-+libexslt_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(EXTRA_LIBS) $(LIBGCRYPT_LIBS) $(M_LIBS)
- libexslt_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) -version-info $(LIBEXSLT_VERSION_INFO)
-
- man_MANS = libexslt.3
-diff --git a/libxslt/Makefile.am b/libxslt/Makefile.am
-index d9fed68..9d44c3d 100644
---- a/libxslt/Makefile.am
-+++ b/libxslt/Makefile.am
-@@ -62,7 +62,7 @@ else
- LIBXSLT_VERSION_SCRIPT =
- endif
-
--libxslt_la_LIBADD = $(LIBXML_LIBS) $(EXTRA_LIBS)
-+libxslt_la_LIBADD = $(LIBXML_LIBS) $(M_LIBS) $(EXTRA_LIBS)
- libxslt_la_LDFLAGS = \
- $(WIN32_EXTRA_LDFLAGS) \
- $(LIBXSLT_VERSION_SCRIPT) \
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch
deleted file mode 100644
index 7186706..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From ed71ac9548a2bb6ecd2dc5ad880c604975f872b0 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 2 Jun 2016 14:20:04 +0300
-Subject: [PATCH] Use pkg-config to find gcrypt and libxml2.
-
-Upstream-Status: Pending [libxml2 is upstreamable]
-
-RP 2014/5/22
-
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure.in | 70 +++++++++++-------------------------------------------------
- 1 file changed, 12 insertions(+), 58 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 8bdf45a..0b2b312 100644
---- a/configure.in
-+++ b/configure.in
-@@ -377,6 +377,8 @@ AC_SUBST(pythondir)
- AC_SUBST(PYTHON_SUBDIR)
- AC_SUBST(PYTHON_LIBS)
-
-+PKG_PROG_PKG_CONFIG
-+
- AC_ARG_WITH(crypto, [ --with-crypto Add crypto support to exslt (on)])
- WITH_CRYPTO=0
- CRYPTO_TESTDIR=
-@@ -394,27 +396,14 @@ case $host in
- CRYPTO_TESTDIR=crypto
- ;;
- *)
-- AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
-- if test "$LIBGCRYPT_CONFIG" != "no" ; then
-- LIBGCRYPT_VERSION=`$LIBGCRYPT_CONFIG --version`
-- if test VERSION_TO_NUMBER(echo $LIBGCRYPT_VERSION) -lt VERSION_TO_NUMBER(echo "1.1.42")
-- then
-- LIBGCRYPT_CFLAGS=""
-- LIBGCRYPT_LIBS=""
-- echo 'gcrypt library version < 1.1.42 - Crypto extensions will not be available.'
-- else
-- LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --cflags`
-- LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --libs`
-- AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
-- echo 'Crypto extensions will be available.'
-+ PKG_CHECK_MODULES(LIBGCRYPT, [libgcrypt >= 1.1.42], [
-+ AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
-+ echo 'Crypto extensions will be available.'
- WITH_CRYPTO=1
- CRYPTO_TESTDIR=crypto
-- fi
-- else
-- LIBGCRYPT_CFLAGS=""
-- LIBGCRYPT_LIBS=""
-- echo 'Crypto extensions will not be available. Install libgcrypt and reconfigure to make available.'
-- fi
-+ ], [
-+ echo 'Crypto extensions will not be available. Install libgcrypt >= 1.1.42 and reconfigure to make available.'
-+ ])
- esac
- fi
- AC_SUBST(WITH_CRYPTO)
-@@ -476,24 +465,8 @@ dnl original work - Mathieu Lacage 30/03/2000
- dnl some tweaking - David Härdeman 30/10/2001
- dnl
-
--LIBXML_CONFIG_PREFIX=""
- LIBXML_SRC=""
-
--AC_ARG_WITH(libxml-prefix,
-- [ --with-libxml-prefix=[PFX] Specify location of libxml config],
-- LIBXML_CONFIG_PREFIX=$withval
--)
--
--AC_ARG_WITH(libxml-include-prefix,
-- [ --with-libxml-include-prefix=[PFX] Specify location of libxml headers],
-- LIBXML_CFLAGS="-I$withval"
--)
--
--AC_ARG_WITH(libxml-libs-prefix,
-- [ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs],
-- LIBXML_LIBS="-L$withval"
--)
--
- AC_ARG_WITH(libxml-src,
- [ --with-libxml-src=[DIR] For libxml thats not installed yet (sets all three above)],
- LIBXML_SRC="$withval"
-@@ -556,28 +529,9 @@ then
- fi
- fi
-
--dnl
--dnl make sure xml2-config is executable,
--dnl test version and init our variables
--dnl
--
--if ${XML_CONFIG} --libs print > /dev/null 2>&1
--then
-- XMLVERS=`$XML_CONFIG --version`
-- if test VERSION_TO_NUMBER(echo $XMLVERS) -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION)
-- then
-- AC_MSG_RESULT($XMLVERS found)
-- else
-- AC_MSG_ERROR(Version $XMLVERS found. You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt)
-- fi
-- LIBXML_LIBS="$LIBXML_LIBS `$XML_CONFIG --libs`"
-- if test "x$LIBXML_SRC" = "x"; then
-- LIBXML_CFLAGS="$LIBXML_CFLAGS `$XML_CONFIG --cflags`"
-- fi
--else
-- AC_MSG_ERROR([Could not find libxml2 anywhere, check ftp://xmlsoft.org/.])
--fi
--
-+PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= $LIBXML_REQUIRED_VERSION],,
-+ [AC_MSG_ERROR([Could not find libxml-2.0 >= $LIBXML_REQUIRED_VERSION anywhere, check ftp://xmlsoft.org/.])]
-+)
-
- AC_SUBST(CFLAGS)
- AC_SUBST(CPPFLAGS)
-@@ -602,7 +556,7 @@ fi
-
- if test "$with_plugins" = "yes" ; then
- AC_MSG_CHECKING([libxml2 module support])
-- WITH_MODULES="`$XML_CONFIG --modules`"
-+ WITH_MODULES="`$PKG_CONFIG --variable=modules libxml-2.0`"
- if test "${WITH_MODULES}" = "1"; then
- AC_MSG_RESULT(yes)
- else
---
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch
deleted file mode 100644
index 16a8010..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: libxslt-1.1.27/libexslt.pc.in
-===================================================================
---- libxslt-1.1.27.orig/libexslt.pc.in
-+++ libxslt-1.1.27/libexslt.pc.in
-@@ -8,5 +8,5 @@ Name: libexslt
- Version: @LIBEXSLT_VERSION@
- Description: EXSLT Extension library
- Requires: libxml-2.0
--Libs: @EXSLT_LIBDIR@ @EXSLT_LIBS@
-+Libs: -lexslt @EXSLT_LIBDIR@ @EXSLT_LIBS@
- Cflags: @EXSLT_INCLUDEDIR@
-Index: libxslt-1.1.27/libxslt.pc.in
-===================================================================
---- libxslt-1.1.27.orig/libxslt.pc.in
-+++ libxslt-1.1.27/libxslt.pc.in
-@@ -8,5 +8,5 @@ Name: libxslt
- Version: @VERSION@
- Description: XSLT library version 2.
- Requires: libxml-2.0
--Libs: @XSLT_LIBDIR@ @XSLT_LIBS@ @EXTRA_LIBS@
-+Libs: -lxslt @XSLT_LIBDIR@ @XSLT_LIBS@ @EXTRA_LIBS@
- Cflags: @XSLT_INCLUDEDIR@
diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.29.bb b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.29.bb
deleted file mode 100644
index 5b11bc2..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.29.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "GNOME XSLT library"
-HOMEPAGE = "http://xmlsoft.org/XSLT/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://Copyright;md5=0cd9a07afbeb24026c9b03aecfeba458"
-
-SECTION = "libs"
-DEPENDS = "libxml2"
-
-SRC_URI = "http://xmlsoft.org/sources/libxslt-${PV}.tar.gz \
- file://pkgconfig_fix.patch \
- file://0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch \
- file://0001-Link-libraries-with-libm.patch \
- file://0001-Check-for-integer-overflow-in-xsltAddTextString.patch \
- "
-
-SRC_URI[md5sum] = "a129d3c44c022de3b9dcf6d6f288d72e"
-SRC_URI[sha256sum] = "b5976e3857837e7617b29f2249ebb5eeac34e249208d31f1fbf7a6ba7a4090ce"
-
-UPSTREAM_CHECK_REGEX = "libxslt-(?P<pver>\d+(\.\d+)+)\.tar"
-
-S = "${WORKDIR}/libxslt-${PV}"
-
-BINCONFIG = "${bindir}/xslt-config"
-
-inherit autotools pkgconfig binconfig-disabled lib_package
-
-# We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header
-do_configure_prepend () {
- sed -i -e 's/ansidecl.h//' ${S}/configure.in
-
- # The timestamps in the 1.1.28 tarball are messed up causing this file to
- # appear out of date. Touch it so that we don't try to regenerate it.
- touch ${S}/doc/xsltproc.1
-}
-
-EXTRA_OECONF = "--without-python --without-debug --without-mem-debug --without-crypto"
-# older versions of this recipe had ${PN}-utils
-RPROVIDES_${PN}-bin += "${PN}-utils"
-RCONFLICTS_${PN}-bin += "${PN}-utils"
-RREPLACES_${PN}-bin += "${PN}-utils"
-
-
-do_install_append_class-native () {
- create_wrapper ${D}/${bindir}/xsltproc XML_CATALOG_FILES=${sysconfdir}/xml/catalog.xml
-}
-
-FILES_${PN} += "${libdir}/libxslt-plugins"
-FILES_${PN}-dev += "${libdir}/xsltConf.sh"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.32.bb b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.32.bb
new file mode 100644
index 0000000..6a03f77
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.32.bb
@@ -0,0 +1,46 @@
+SUMMARY = "GNOME XSLT library"
+HOMEPAGE = "http://xmlsoft.org/XSLT/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://Copyright;md5=0cd9a07afbeb24026c9b03aecfeba458"
+
+SECTION = "libs"
+DEPENDS = "libxml2"
+
+SRC_URI = "http://xmlsoft.org/sources/libxslt-${PV}.tar.gz"
+SRC_URI[md5sum] = "1fc72f98e98bf4443f1651165f3aa146"
+SRC_URI[sha256sum] = "526ecd0abaf4a7789041622c3950c0e7f2c4c8835471515fd77eec684a355460"
+
+UPSTREAM_CHECK_REGEX = "libxslt-(?P<pver>\d+(\.\d+)+)\.tar"
+
+S = "${WORKDIR}/libxslt-${PV}"
+
+BINCONFIG = "${bindir}/xslt-config"
+
+inherit autotools pkgconfig binconfig-disabled lib_package
+
+# We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header
+do_configure_prepend () {
+ sed -i -e 's/ansidecl.h//' ${S}/configure.ac
+
+ # The timestamps in the 1.1.28 tarball are messed up causing this file to
+ # appear out of date. Touch it so that we don't try to regenerate it.
+ touch ${S}/doc/xsltproc.1
+}
+
+EXTRA_OECONF = "--without-python --without-debug --without-mem-debug --without-crypto"
+# older versions of this recipe had ${PN}-utils
+RPROVIDES_${PN}-bin += "${PN}-utils"
+RCONFLICTS_${PN}-bin += "${PN}-utils"
+RREPLACES_${PN}-bin += "${PN}-utils"
+
+
+do_install_append_class-native () {
+ create_wrapper ${D}/${bindir}/xsltproc XML_CATALOG_FILES=${sysconfdir}/xml/catalog.xml
+}
+
+FILES_${PN} += "${libdir}/libxslt-plugins"
+FILES_${PN}-dev += "${libdir}/xsltConf.sh"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/lzo/lzo/acinclude.m4 b/import-layers/yocto-poky/meta/recipes-support/lzo/lzo/acinclude.m4
deleted file mode 100644
index c4d2ccd..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/lzo/lzo/acinclude.m4
+++ /dev/null
@@ -1,358 +0,0 @@
-
-AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [
-AC_C_BIGENDIAN([AC_DEFINE(ACC_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
-])#
-
-AC_DEFUN([mfx_ACC_CHECK_HEADERS], [
-AC_HEADER_TIME
-AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/stat.h sys/time.h sys/types.h sys/wait.h])
-])#
-
-AC_DEFUN([mfx_ACC_CHECK_FUNCS], [
-AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown ctime difftime fstat gettimeofday gmtime localtime longjmp lstat memcmp memcpy memmove memset mktime qsort raise setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf)
-])#
-
-
-AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [
-AC_CHECK_SIZEOF(short)
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(long)
-
-AC_CHECK_SIZEOF(long long)
-AC_CHECK_SIZEOF(__int16)
-AC_CHECK_SIZEOF(__int32)
-AC_CHECK_SIZEOF(__int64)
-
-AC_CHECK_SIZEOF(void *)
-AC_CHECK_SIZEOF(size_t)
-AC_CHECK_SIZEOF(ptrdiff_t)
-])#
-
-
-# /***********************************************************************
-# // Check for ACC_conformance
-# ************************************************************************/
-
-AC_DEFUN([mfx_ACC_ACCCHK], [
-mfx_tmp=$1
-mfx_save_CPPFLAGS=$CPPFLAGS
-dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
-test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
-
-AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
-
-AC_LANG_CONFTEST([AC_LANG_PROGRAM(
-[[#define ACC_CONFIG_NO_HEADER 1
-#include "acc/acc.h"
-#include "acc/acc_incd.h"
-#undef ACCCHK_ASSERT
-#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
-#include "acc/acc_chk.ch"
-#undef ACCCHK_ASSERT
-static void test_acc_compile_time_assert(void) {
-#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr)
-#include "acc/acc_chk.ch"
-#undef ACCCHK_ASSERT
-}
-#undef NDEBUG
-#include <assert.h>
-static int test_acc_run_time_assert(int r) {
-#define ACCCHK_ASSERT(expr) assert(expr);
-#include "acc/acc_chk.ch"
-#undef ACCCHK_ASSERT
-return r;
-}
-]], [[
-test_acc_compile_time_assert();
-if (test_acc_run_time_assert(1) != 1) return 1;
-]]
-)])
-
-mfx_tmp=FAILED
-_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
-rm -f conftest.$ac_ext conftest.$ac_objext
-
-CPPFLAGS=$mfx_save_CPPFLAGS
-
-AC_MSG_RESULT([$mfx_tmp])
-case x$mfx_tmp in
- xpassed | xyes) ;;
- *)
- AC_MSG_NOTICE([])
- AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
- AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
- AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
- AC_MSG_NOTICE([Thanks for your support.])
- AC_MSG_NOTICE([])
- AC_MSG_ERROR([ACC conformance test failed. Stop.])
-dnl AS_EXIT
- ;;
-esac
-])# mfx_ACC_ACCCHK
-
-
-# /***********************************************************************
-# // Check for ACC_conformance
-# ************************************************************************/
-
-AC_DEFUN([mfx_MINIACC_ACCCHK], [
-mfx_tmp=$1
-mfx_save_CPPFLAGS=$CPPFLAGS
-dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
-test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
-
-AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
-
-AC_LANG_CONFTEST([AC_LANG_PROGRAM(
-[[#define ACC_CONFIG_NO_HEADER 1
-#define ACC_WANT_ACC_INCD_H 1
-#include $2
-
-#define ACC_WANT_ACC_CHK_CH 1
-#undef ACCCHK_ASSERT
-#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
-#include $2
-
-#define ACC_WANT_ACC_CHK_CH 1
-#undef ACCCHK_ASSERT
-#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr)
-static void test_acc_compile_time_assert(void) {
-#include $2
-}
-
-#undef NDEBUG
-#include <assert.h>
-#define ACC_WANT_ACC_CHK_CH 1
-#undef ACCCHK_ASSERT
-#define ACCCHK_ASSERT(expr) assert(expr);
-static int test_acc_run_time_assert(int r) {
-#include $2
-return r;
-}
-]], [[
-test_acc_compile_time_assert();
-if (test_acc_run_time_assert(1) != 1) return 1;
-]]
-)])
-
-mfx_tmp=FAILED
-_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
-rm -f conftest.$ac_ext conftest.$ac_objext
-
-CPPFLAGS=$mfx_save_CPPFLAGS
-
-AC_MSG_RESULT([$mfx_tmp])
-case x$mfx_tmp in
- xpassed | xyes) ;;
- *)
- AC_MSG_NOTICE([])
- AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
- AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
- AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
- AC_MSG_NOTICE([Thanks for your support.])
- AC_MSG_NOTICE([])
- AC_MSG_ERROR([ACC conformance test failed. Stop.])
-dnl AS_EXIT
- ;;
-esac
-])# mfx_MINIACC_ACCCHK
-
-
-
-# serial 1
-
-AC_DEFUN([mfx_PROG_CPPFLAGS], [
-AC_MSG_CHECKING([whether the C preprocessor needs special flags])
-
-AC_LANG_CONFTEST([AC_LANG_PROGRAM(
-[[#include <limits.h>
-#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
-# include "your C preprocessor is broken 1"
-#elif (0xffffu == 0xfffffffful)
-# include "your C preprocessor is broken 2"
-#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX)
-# include "your C preprocessor is broken 3"
-#endif
-]], [[ ]]
-)])
-
-mfx_save_CPPFLAGS=$CPPFLAGS
-mfx_tmp=ERROR
-for mfx_arg in "" -no-cpp-precomp
-do
- CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS"
- _AC_COMPILE_IFELSE([],
-[mfx_tmp=$mfx_arg
-break])
-done
-CPPFLAGS=$mfx_save_CPPFLAGS
-rm -f conftest.$ac_ext conftest.$ac_objext
-case x$mfx_tmp in
- x)
- AC_MSG_RESULT([none needed]) ;;
- xERROR)
- AC_MSG_RESULT([ERROR])
- AC_MSG_ERROR([your C preprocessor is broken - for details see config.log])
- ;;
- *)
- AC_MSG_RESULT([$mfx_tmp])
- CPPFLAGS="$mfx_tmp $CPPFLAGS"
- ;;
-esac
-])# mfx_PROG_CPPFLAGS
-
-
-
-# serial 3
-
-AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [
-AC_CACHE_CHECK([whether limits.h is sane],
-mfx_cv_header_sane_limits_h,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits.h>
-#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
-# if defined(__APPLE__) && defined(__GNUC__)
-# error "your preprocessor is broken - use compiler option -no-cpp-precomp"
-# else
-# include "your preprocessor is broken"
-# endif
-#endif
-#define MFX_0xffff 0xffff
-#define MFX_0xffffffffL 4294967295ul
-#if !defined(CHAR_BIT) || (CHAR_BIT != 8)
-# include "error CHAR_BIT"
-#endif
-#if !defined(UCHAR_MAX)
-# include "error UCHAR_MAX 1"
-#endif
-#if !defined(USHRT_MAX)
-# include "error USHRT_MAX 1"
-#endif
-#if !defined(UINT_MAX)
-# include "error UINT_MAX 1"
-#endif
-#if !defined(ULONG_MAX)
-# include "error ULONG_MAX 1"
-#endif
-#if !defined(SHRT_MAX)
-# include "error SHRT_MAX 1"
-#endif
-#if !defined(INT_MAX)
-# include "error INT_MAX 1"
-#endif
-#if !defined(LONG_MAX)
-# include "error LONG_MAX 1"
-#endif
-#if (UCHAR_MAX < 1)
-# include "error UCHAR_MAX 2"
-#endif
-#if (USHRT_MAX < 1)
-# include "error USHRT_MAX 2"
-#endif
-#if (UINT_MAX < 1)
-# include "error UINT_MAX 2"
-#endif
-#if (ULONG_MAX < 1)
-# include "error ULONG_MAX 2"
-#endif
-#if (UCHAR_MAX < 0xff)
-# include "error UCHAR_MAX 3"
-#endif
-#if (USHRT_MAX < MFX_0xffff)
-# include "error USHRT_MAX 3"
-#endif
-#if (UINT_MAX < MFX_0xffff)
-# include "error UINT_MAX 3"
-#endif
-#if (ULONG_MAX < MFX_0xffffffffL)
-# include "error ULONG_MAX 3"
-#endif
-#if (USHRT_MAX > UINT_MAX)
-# include "error USHRT_MAX vs UINT_MAX"
-#endif
-#if (UINT_MAX > ULONG_MAX)
-# include "error UINT_MAX vs ULONG_MAX"
-#endif
-]], [[
-#if (USHRT_MAX == MFX_0xffff)
-{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; }
-#elif (USHRT_MAX >= MFX_0xffff)
-{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; }
-#endif
-#if (UINT_MAX == MFX_0xffff)
-{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; }
-#elif (UINT_MAX >= MFX_0xffff)
-{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; }
-#endif
-#if (ULONG_MAX == MFX_0xffff)
-{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; }
-#elif (ULONG_MAX >= MFX_0xffff)
-{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; }
-#endif
-#if (USHRT_MAX == MFX_0xffffffffL)
-{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; }
-#elif (USHRT_MAX >= MFX_0xffffffffL)
-{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; }
-#endif
-#if (UINT_MAX == MFX_0xffffffffL)
-{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; }
-#elif (UINT_MAX >= MFX_0xffffffffL)
-{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; }
-#endif
-#if (ULONG_MAX == MFX_0xffffffffL)
-{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; }
-#elif (ULONG_MAX >= MFX_0xffffffffL)
-{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; }
-#endif
-]])],
-[mfx_cv_header_sane_limits_h=yes],
-[mfx_cv_header_sane_limits_h=no])])
-])
-
-# /***********************************************************************
-# // standard
-# ************************************************************************/
-
-AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [
-AC_C_BIGENDIAN([AC_DEFINE(LZO_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(LZO_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
-])#
-
-
-# /***********************************************************************
-# //
-# ************************************************************************/
-
-dnl more types which are not yet covered by ACC
-
-AC_DEFUN([mfx_CHECK_SIZEOF], [
-AC_CHECK_SIZEOF(__int32)
-AC_CHECK_SIZEOF(intmax_t)
-AC_CHECK_SIZEOF(uintmax_t)
-AC_CHECK_SIZEOF(intptr_t)
-AC_CHECK_SIZEOF(uintptr_t)
-
-AC_CHECK_SIZEOF(float)
-AC_CHECK_SIZEOF(double)
-AC_CHECK_SIZEOF(long double)
-
-AC_CHECK_SIZEOF(dev_t)
-AC_CHECK_SIZEOF(fpos_t)
-AC_CHECK_SIZEOF(mode_t)
-AC_CHECK_SIZEOF(off_t)
-AC_CHECK_SIZEOF(ssize_t)
-AC_CHECK_SIZEOF(time_t)
-])#
-
-
-
-AC_DEFUN([mfx_CHECK_LIB_WINMM], [
-if test "X$GCC" = Xyes; then
-case $host_os in
-cygwin* | mingw* | pw32*)
- test "X$LIBS" != "X" && LIBS="$LIBS "
- LIBS="${LIBS}-lwinmm" ;;
-*)
- ;;
-esac
-fi
-])#
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/lzo/lzo_2.10.bb b/import-layers/yocto-poky/meta/recipes-support/lzo/lzo_2.10.bb
index 490d230..8eefec3 100644
--- a/import-layers/yocto-poky/meta/recipes-support/lzo/lzo_2.10.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/lzo/lzo_2.10.bb
@@ -8,7 +8,6 @@
SRC_URI = "http://www.oberhumer.com/opensource/lzo/download/lzo-${PV}.tar.gz \
file://0001-Use-memcpy-instead-of-reinventing-it.patch \
file://0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch \
- file://acinclude.m4 \
file://run-ptest \
"
@@ -19,10 +18,6 @@
EXTRA_OECONF = "--enable-shared"
-do_configure_prepend () {
- cp ${WORKDIR}/acinclude.m4 ${S}/
-}
-
do_install_ptest() {
t=${D}${PTEST_PATH}
cp ${S}/util/check.sh $t
diff --git a/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr.inc b/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr.inc
deleted file mode 100644
index 7f3f917..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-SUMMARY = "C library for multiple-precision floating-point computations with exact rounding"
-HOMEPAGE = "http://www.mpfr.org/"
-LICENSE = "LGPLv3+"
-SECTION = "devel"
-
-inherit autotools texinfo
diff --git a/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.5.bb b/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.5.bb
index 2d59c4a..a78c0bd 100644
--- a/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.5.bb
@@ -1,6 +1,10 @@
-require mpfr.inc
+SUMMARY = "C library for multiple-precision floating-point computations with exact rounding"
+HOMEPAGE = "http://www.mpfr.org/"
+LICENSE = "LGPLv3+"
+SECTION = "devel"
-LICENSE = "GPLv3 & LGPLv3"
+inherit autotools texinfo
+
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6"
DEPENDS = "gmp"
@@ -13,6 +17,4 @@
UPSTREAM_CHECK_URI = "http://www.mpfr.org/mpfr-current/"
-S = "${WORKDIR}/mpfr-${PV}"
-
BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/neon/neon/pkgconfig.patch b/import-layers/yocto-poky/meta/recipes-support/neon/neon/pkgconfig.patch
deleted file mode 100644
index 239dba8..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/neon/neon/pkgconfig.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
----
- neon.pc.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- neon-0.30.1.orig/neon.pc.in
-+++ neon-0.30.1/neon.pc.in
-@@ -7,5 +7,5 @@ Name: neon
- Description: HTTP/WebDAV client library
- Version: @NEON_VERSION@
- Libs: -L${libdir} -lneon @NEON_PC_LIBS@
--Libs.private: @NEON_LIBS@
-+Libs.private: -L${libdir} -lz -lgcrypt -lgpg-error -lexpat -lgnutls
- Cflags: -I${includedir}/neon @NEON_CFLAGS@
diff --git a/import-layers/yocto-poky/meta/recipes-support/neon/neon_0.30.2.bb b/import-layers/yocto-poky/meta/recipes-support/neon/neon_0.30.2.bb
deleted file mode 100644
index 5792c56..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/neon/neon_0.30.2.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "An HTTP and WebDAV client library with a C interface"
-HOMEPAGE = "http://www.webdav.org/neon/"
-SECTION = "libs"
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://src/COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a \
- file://src/ne_utils.h;beginline=1;endline=20;md5=2caca609538eddaa6f6adf120a218037"
-
-SRC_URI = "http://www.webdav.org/${BPN}/${BPN}-${PV}.tar.gz \
- file://pkgconfig.patch \
- "
-
-SRC_URI[md5sum] = "e28d77bf14032d7f5046b3930704ef41"
-SRC_URI[sha256sum] = "db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca"
-
-inherit autotools binconfig-disabled lib_package pkgconfig
-
-# Enable gnutls or openssl, not both
-PACKAGECONFIG ?= "expat gnutls libproxy webdav zlib"
-PACKAGECONFIG_class-native = "expat gnutls webdav zlib"
-
-PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat"
-PACKAGECONFIG[gnutls] = "--with-ssl=gnutls,,gnutls"
-PACKAGECONFIG[gssapi] = "--with-gssapi,--without-gssapi,krb5"
-PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy"
-PACKAGECONFIG[libxml2] = "--with-libxml2,--without-libxml2,libxml2"
-PACKAGECONFIG[openssl] = "--with-ssl=openssl,,openssl"
-PACKAGECONFIG[webdav] = "--enable-webdav,--disable-webdav,"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
-
-EXTRA_OECONF += "--enable-shared"
-
-do_compile_append() {
- oe_runmake -C test
-}
-
-BINCONFIG = "${bindir}/neon-config"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/files/Add-target-to-only-build-tests-not-run-them.patch b/import-layers/yocto-poky/meta/recipes-support/nettle/files/Add-target-to-only-build-tests-not-run-them.patch
deleted file mode 100644
index 23da777..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/nettle/files/Add-target-to-only-build-tests-not-run-them.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 46edf01cc98db9f9feec984897836dfdd26bdc8d Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 12 Aug 2015 23:27:27 +0300
-Subject: [PATCH] Add target to only build tests (not run them)
-
-Not sending upstream as this is only a start of a solution to
-installable tests: It's useful for us already as is.
-
-Upstream-Status: Inappropriate [not a complete solution]
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- Makefile.in | 3 +++
- testsuite/Makefile.in | 2 ++
- 2 files changed, 5 insertions(+)
-
-diff --git a/Makefile.in b/Makefile.in
-index 08efb7d..7909342 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -55,6 +55,9 @@ clean distclean mostlyclean maintainer-clean tags:
- echo "Making $@ in $$d" ; (cd $$d && $(MAKE) $@); done
- $(MAKE) $@-here
-
-+buildtest:
-+ echo "Making $@ in testsuite" ; (cd testsuite && $(MAKE) $@)
-+
- check-here:
- true
-
-diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in
-index 6bc1907..bb65bf0 100644
---- a/testsuite/Makefile.in
-+++ b/testsuite/Makefile.in
-@@ -116,6 +116,8 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \
- # data.
- VALGRIND = valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes @IF_ASM@ --partial-loads-ok=yes
-
-+buildtest: $(TS_ALL)
-+
- # The PATH update is for locating dlls on w*ndows.
- check: $(TS_ALL)
- LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" srcdir="$(srcdir)" \
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.3/check-header-files-of-openssl-only-if-enable_.patch b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.3/check-header-files-of-openssl-only-if-enable_.patch
deleted file mode 100644
index e7216ba..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.3/check-header-files-of-openssl-only-if-enable_.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From ffee6b5f6204a0210f717968ec6ce514d70acca1 Mon Sep 17 00:00:00 2001
-From: Haiqing Bai <Haiqing.Bai@windriver.com>
-Date: Fri, 9 Dec 2016 15:23:17 +0800
-Subject: [PATCH] nettle: check header files of openssl only if
- 'enable_openssl=yes'.
-
-The original configure script checks openssl header files to generate
-config.h even if 'enable_openssl' is not set to yes, this made inconsistent
-building for nettle.
-
-Upstream-Status: Pending
-Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
----
- configure.ac | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 4ead52c..982760f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -185,9 +185,11 @@ AC_HEADER_TIME
- AC_CHECK_SIZEOF(long)
- AC_CHECK_SIZEOF(size_t)
-
--AC_CHECK_HEADERS([openssl/blowfish.h openssl/des.h openssl/cast.h openssl/aes.h openssl/ecdsa.h],,
--[enable_openssl=no
-- break])
-+if test "x$enable_openssl" = "xyes"; then
-+ AC_CHECK_HEADERS([openssl/blowfish.h openssl/des.h openssl/cast.h openssl/aes.h openssl/ecdsa.h],,
-+ [enable_openssl=no
-+ break])
-+fi
-
- AC_CHECK_HEADERS([valgrind/memcheck.h])
-
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/Add-target-to-only-build-tests-not-run-them.patch b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/Add-target-to-only-build-tests-not-run-them.patch
new file mode 100644
index 0000000..c007060
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/Add-target-to-only-build-tests-not-run-them.patch
@@ -0,0 +1,38 @@
+Add target to only build tests (not run them)
+
+Not sending upstream as this is only a start of a solution to
+installable tests: It's useful for us already as is.
+
+Upstream-Status: Inappropriate [not a complete solution]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Refactored for 3.4
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: nettle-3.4/Makefile.in
+===================================================================
+--- nettle-3.4.orig/Makefile.in
++++ nettle-3.4/Makefile.in
+@@ -55,6 +55,9 @@ clean distclean mostlyclean maintainer-c
+ echo "Making $@ in $$d" ; (cd $$d && $(MAKE) $@); done
+ $(MAKE) $@-here
+
++buildtest:
++ echo "Making $@ in testsuite" ; (cd testsuite && $(MAKE) $@)
++
+ check-here:
+ true
+
+Index: nettle-3.4/testsuite/Makefile.in
+===================================================================
+--- nettle-3.4.orig/testsuite/Makefile.in
++++ nettle-3.4/testsuite/Makefile.in
+@@ -131,6 +131,8 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$
+ # data.
+ VALGRIND = valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes @IF_ASM@ --partial-loads-ok=yes
+
++buildtest: $(TS_ALL)
++
+ # The PATH update is for windows dlls, DYLD_LIBRARY_PATH is for OSX.
+ check: $(TS_ALL)
+ LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" DYLD_LIBRARY_PATH=../.lib \
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/check-header-files-of-openssl-only-if-enable_.patch b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/check-header-files-of-openssl-only-if-enable_.patch
new file mode 100644
index 0000000..d5f2666
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/check-header-files-of-openssl-only-if-enable_.patch
@@ -0,0 +1,36 @@
+From ffee6b5f6204a0210f717968ec6ce514d70acca1 Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <Haiqing.Bai@windriver.com>
+Date: Fri, 9 Dec 2016 15:23:17 +0800
+Subject: [PATCH] nettle: check header files of openssl only if
+ 'enable_openssl=yes'.
+
+The original configure script checks openssl header files to generate
+config.h even if 'enable_openssl' is not set to yes, this made inconsistent
+building for nettle.
+
+Upstream-Status: Pending
+Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
+
+refactored for 3.4. pending not in as of 3.4
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: nettle-3.4/configure.ac
+===================================================================
+--- nettle-3.4.orig/configure.ac
++++ nettle-3.4/configure.ac
+@@ -185,9 +185,11 @@ AC_HEADER_TIME
+ AC_CHECK_SIZEOF(long)
+ AC_CHECK_SIZEOF(size_t)
+
+-AC_CHECK_HEADERS([openssl/evp.h openssl/ecdsa.h],,
+-[enable_openssl=no
+- break])
++if test "x$enable_openssl" = "xyes"; then
++ AC_CHECK_HEADERS([openssl/evp.h openssl/ecdsa.h],,
++ [enable_openssl=no
++ break])
++fi
+
+ # For use by the testsuite
+ AC_CHECK_HEADERS([valgrind/memcheck.h])
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.3/dlopen-test.patch b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/dlopen-test.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.3/dlopen-test.patch
rename to import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/dlopen-test.patch
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/files/run-ptest b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/run-ptest
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-support/nettle/files/run-ptest
rename to import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/run-ptest
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle.inc b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle.inc
deleted file mode 100644
index af51fb6..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle.inc
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "A low level cryptographic library"
-HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/"
-SECTION = "libs"
-
-DEPENDS += "gmp"
-
-SRC_URI = "http://www.lysator.liu.se/~nisse/archive/${BP}.tar.gz \
- file://Add-target-to-only-build-tests-not-run-them.patch \
- file://run-ptest \
- "
-
-UPSTREAM_CHECK_REGEX = "nettle-(?P<pver>\d+(\.\d+)+)\.tar"
-
-inherit autotools ptest
-
-EXTRA_OECONF = "--disable-openssl"
-
-do_configure_prepend() {
- if [ ! -e ${S}/acinclude.m4 -a -e ${S}/aclocal.m4 ]; then
- cp ${S}/aclocal.m4 ${S}/acinclude.m4
- fi
-}
-
-do_compile_ptest() {
- oe_runmake buildtest
-}
-
-do_install_ptest() {
- install -d ${D}${PTEST_PATH}/testsuite/
- install ${S}/testsuite/gold-bug.txt ${D}${PTEST_PATH}/testsuite/
- install ${S}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
- # tools can be found in PATH, not in ../tools/
- sed -i -e 's|../tools/||' ${D}${PTEST_PATH}/testsuite/*-test
- install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_3.3.bb b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_3.3.bb
deleted file mode 100644
index 3951678..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_3.3.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require nettle.inc
-
-LICENSE = "LGPLv3+ | GPLv2+"
-
-LIC_FILES_CHKSUM = "file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
- file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://serpent-decrypt.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e \
- file://serpent-set-key.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e"
-
-SRC_URI += "\
- file://check-header-files-of-openssl-only-if-enable_.patch \
- "
-
-SRC_URI_append_class-target = "\
- file://dlopen-test.patch \
- "
-
-SRC_URI[md5sum] = "10f969f78a463704ae73529978148dbe"
-SRC_URI[sha256sum] = "46942627d5d0ca11720fec18d81fc38f7ef837ea4197c1f630e71ce0d470b11e"
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_3.4.bb b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_3.4.bb
new file mode 100644
index 0000000..7a3cc65
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_3.4.bb
@@ -0,0 +1,47 @@
+SUMMARY = "A low level cryptographic library"
+HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/"
+SECTION = "libs"
+LICENSE = "LGPLv3+ | GPLv2+"
+
+LIC_FILES_CHKSUM = "file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://serpent-decrypt.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e \
+ file://serpent-set-key.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e"
+
+DEPENDS += "gmp"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
+ file://Add-target-to-only-build-tests-not-run-them.patch \
+ file://run-ptest \
+ file://check-header-files-of-openssl-only-if-enable_.patch \
+ "
+
+SRC_URI_append_class-target = "\
+ file://dlopen-test.patch \
+ "
+
+SRC_URI[md5sum] = "dc0f13028264992f58e67b4e8915f53d"
+SRC_URI[sha256sum] = "ae7a42df026550b85daca8389b6a60ba6313b0567f374392e54918588a411e94"
+
+UPSTREAM_CHECK_REGEX = "nettle-(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit autotools ptest
+
+EXTRA_AUTORECONF += "--exclude=aclocal"
+
+EXTRA_OECONF = "--disable-openssl"
+
+do_compile_ptest() {
+ oe_runmake buildtest
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/testsuite/
+ install ${S}/testsuite/gold-bug.txt ${D}${PTEST_PATH}/testsuite/
+ install ${S}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
+ # tools can be found in PATH, not in ../tools/
+ sed -i -e 's|../tools/||' ${D}${PTEST_PATH}/testsuite/*-test
+ install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/npth/npth_1.5.bb b/import-layers/yocto-poky/meta/recipes-support/npth/npth_1.5.bb
index 54de70c..e7db6ae 100644
--- a/import-layers/yocto-poky/meta/recipes-support/npth/npth_1.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/npth/npth_1.5.bb
@@ -19,3 +19,5 @@
FILES_${PN} = "${libdir}/libnpth.so.*"
FILES_${PN}-dev += "${bindir}/npth-config"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/0001-include-stdint.h-for-SSIZE_MAX-and-SIZE_MAX-definiti.patch b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/0001-include-stdint.h-for-SSIZE_MAX-and-SIZE_MAX-definiti.patch
deleted file mode 100644
index b3bdd8e..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/0001-include-stdint.h-for-SSIZE_MAX-and-SIZE_MAX-definiti.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From f7551ec58e2f0a892295e0c2a650083101e12c54 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 20 May 2017 13:24:26 -0700
-Subject: [PATCH] include stdint.h for SSIZE_MAX and SIZE_MAX definitions
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- pr/tests/prfz.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/pr/tests/prfz.c b/pr/tests/prfz.c
-index 0c5a432..9c17590 100644
---- a/pr/tests/prfz.c
-+++ b/pr/tests/prfz.c
-@@ -10,7 +10,9 @@
- #include <sys/types.h>
- #include <limits.h>
- #include <string.h>
--
-+#ifdef XP_UNIX
-+#include <stdint.h>
-+#endif
- int
- main(int argc, char **argv)
- {
---
-2.13.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
index c2b7258..f12acc8 100644
--- a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
@@ -49,4 +49,4 @@
- PR_MD_ASFILES=os_Linux_ppc.s
fi
;;
- m68k)
+ esac
diff --git a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
index a7e7853..ecc6d31 100644
--- a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
@@ -11,12 +11,12 @@
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Upstream-Status: Pending
-Index: nspr-4.8.9/mozilla/nsprpub/pr/tests/Makefile.in
+Index: nspr/pr/tests/Makefile.in
===================================================================
---- nsprpub.orig/pr/tests/Makefile.in 2012-02-11 00:01:10.476220505 +0200
-+++ nsprpub/pr/tests/Makefile.in 2012-02-10 23:57:40.000000000 +0200
-@@ -379,7 +379,7 @@
- endif
+--- nspr.orig/pr/tests/Makefile.in
++++ nspr/pr/tests/Makefile.in
+@@ -315,7 +315,7 @@ ifeq ($(OS_ARCH), SunOS)
+ endif # SunOS
ifeq (,$(filter-out Linux GNU GNU_%,$(OS_ARCH)))
- LDOPTS += -Xlinker -rpath $(ABSOLUTE_LIB_DIR)
diff --git a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.16.bb b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.16.bb
deleted file mode 100644
index 78ef994..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.16.bb
+++ /dev/null
@@ -1,191 +0,0 @@
-SUMMARY = "Netscape Portable Runtime Library"
-HOMEPAGE = "http://www.mozilla.org/projects/nspr/"
-LICENSE = "GPL-2.0 | MPL-2.0 | LGPL-2.1"
-LIC_FILES_CHKSUM = "file://configure.in;beginline=3;endline=6;md5=90c2fdee38e45d6302abcfe475c8b5c5 \
- file://Makefile.in;beginline=4;endline=38;md5=beda1dbb98a515f557d3e58ef06bca99"
-SECTION = "libs/network"
-
-SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \
- file://remove-rpath-from-tests.patch \
- file://fix-build-on-x86_64.patch \
- file://remove-srcdir-from-configure-in.patch \
- file://0002-Add-nios2-support.patch \
- file://0001-include-stdint.h-for-SSIZE_MAX-and-SIZE_MAX-definiti.patch \
- file://0001-md-Fix-build-with-musl.patch \
- file://nspr.pc.in \
-"
-
-CACHED_CONFIGUREVARS_append_libc-musl = " CFLAGS='${CFLAGS} -D_PR_POLL_AVAILABLE \
- -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP \
- -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO \
- -D_PR_INET6_PROBE -DNO_DLOPEN_NULL'"
-
-UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/"
-UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)/"
-
-SRC_URI[md5sum] = "42fd8963a4b394f62d43ba604f03fab7"
-SRC_URI[sha256sum] = "9b3102d97665504aeee73363c11a21c062ad67a2522242368b7f019f96a53cd1"
-
-CVE_PRODUCT = "netscape_portable_runtime"
-
-S = "${WORKDIR}/nspr-${PV}/nspr"
-
-RDEPENDS_${PN}-dev += "perl"
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-TESTS = " \
- accept \
- acceptread \
- acceptreademu \
- affinity \
- alarm \
- anonfm \
- atomic \
- attach \
- bigfile \
- cleanup \
- cltsrv \
- concur \
- cvar \
- cvar2 \
- dlltest \
- dtoa \
- errcodes \
- exit \
- fdcach \
- fileio \
- foreign \
- formattm \
- fsync \
- gethost \
- getproto \
- i2l \
- initclk \
- inrval \
- instrumt \
- intrio \
- intrupt \
- io_timeout \
- ioconthr \
- join \
- joinkk \
- joinku \
- joinuk \
- joinuu \
- layer \
- lazyinit \
- libfilename \
- lltest \
- lock \
- lockfile \
- logfile \
- logger \
- many_cv \
- multiwait \
- nameshm1 \
- nblayer \
- nonblock \
- ntioto \
- ntoh \
- op_2long \
- op_excl \
- op_filnf \
- op_filok \
- op_nofil \
- parent \
- parsetm \
- peek \
- perf \
- pipeping \
- pipeping2 \
- pipeself \
- poll_nm \
- poll_to \
- pollable \
- prftest \
- primblok \
- provider \
- prpollml \
- ranfile \
- randseed \
- reinit \
- rwlocktest \
- sel_spd \
- selct_er \
- selct_nm \
- selct_to \
- selintr \
- sema \
- semaerr \
- semaping \
- sendzlf \
- server_test \
- servr_kk \
- servr_uk \
- servr_ku \
- servr_uu \
- short_thread \
- sigpipe \
- socket \
- sockopt \
- sockping \
- sprintf \
- stack \
- stdio \
- str2addr \
- strod \
- switch \
- system \
- testbit \
- testfile \
- threads \
- timemac \
- timetest \
- tpd \
- udpsrv \
- vercheck \
- version \
- writev \
- xnotify \
- zerolen"
-
-inherit autotools
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-do_compile_prepend() {
- oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX ${BUILD_CFLAGS}" LDFLAGS="" CC="${BUILD_CC}" -C config export
-}
-
-do_compile_append() {
- oe_runmake -C pr/tests
-}
-
-do_install_append() {
- install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc
- sed -i \
- -e 's:NSPRVERSION:${PV}:g' \
- -e 's:OEPREFIX:${prefix}:g' \
- -e 's:OELIBDIR:${libdir}:g' \
- -e 's:OEINCDIR:${includedir}:g' \
- -e 's:OEEXECPREFIX:${exec_prefix}:g' \
- ${D}${libdir}/pkgconfig/nspr.pc
-
- mkdir -p ${D}${libdir}/nspr/tests
- install -m 0755 ${S}/pr/tests/runtests.pl ${D}${libdir}/nspr/tests
- install -m 0755 ${S}/pr/tests/runtests.sh ${D}${libdir}/nspr/tests
- cd ${B}/pr/tests
- install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests
-
- # delete compile-et.pl and perr.properties from ${bindir} because these are
- # only used to generate prerr.c and prerr.h files from prerr.et at compile
- # time
- rm ${D}${bindir}/compile-et.pl ${D}${bindir}/prerr.properties
-}
-
-FILES_${PN} = "${libdir}/lib*.so"
-FILES_${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \
- ${includedir}/* ${datadir}/aclocal/* "
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.19.bb b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.19.bb
new file mode 100644
index 0000000..de2c871
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.19.bb
@@ -0,0 +1,190 @@
+SUMMARY = "Netscape Portable Runtime Library"
+HOMEPAGE = "http://www.mozilla.org/projects/nspr/"
+LICENSE = "GPL-2.0 | MPL-2.0 | LGPL-2.1"
+LIC_FILES_CHKSUM = "file://configure.in;beginline=3;endline=6;md5=90c2fdee38e45d6302abcfe475c8b5c5 \
+ file://Makefile.in;beginline=4;endline=38;md5=beda1dbb98a515f557d3e58ef06bca99"
+SECTION = "libs/network"
+
+SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \
+ file://remove-rpath-from-tests.patch \
+ file://fix-build-on-x86_64.patch \
+ file://remove-srcdir-from-configure-in.patch \
+ file://0002-Add-nios2-support.patch \
+ file://0001-md-Fix-build-with-musl.patch \
+ file://nspr.pc.in \
+"
+
+CACHED_CONFIGUREVARS_append_libc-musl = " CFLAGS='${CFLAGS} -D_PR_POLL_AVAILABLE \
+ -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP \
+ -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO \
+ -D_PR_INET6_PROBE -DNO_DLOPEN_NULL'"
+
+UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/"
+UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)/"
+
+SRC_URI[md5sum] = "e1d27282ad6286b69d6b9fd07201d3dd"
+SRC_URI[sha256sum] = "2ed95917fa2277910d1d1cf36030607dccc0ba522bba08e2af13c113dcd8f729"
+
+CVE_PRODUCT = "netscape_portable_runtime"
+
+S = "${WORKDIR}/nspr-${PV}/nspr"
+
+RDEPENDS_${PN}-dev += "perl"
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+TESTS = " \
+ accept \
+ acceptread \
+ acceptreademu \
+ affinity \
+ alarm \
+ anonfm \
+ atomic \
+ attach \
+ bigfile \
+ cleanup \
+ cltsrv \
+ concur \
+ cvar \
+ cvar2 \
+ dlltest \
+ dtoa \
+ errcodes \
+ exit \
+ fdcach \
+ fileio \
+ foreign \
+ formattm \
+ fsync \
+ gethost \
+ getproto \
+ i2l \
+ initclk \
+ inrval \
+ instrumt \
+ intrio \
+ intrupt \
+ io_timeout \
+ ioconthr \
+ join \
+ joinkk \
+ joinku \
+ joinuk \
+ joinuu \
+ layer \
+ lazyinit \
+ libfilename \
+ lltest \
+ lock \
+ lockfile \
+ logfile \
+ logger \
+ many_cv \
+ multiwait \
+ nameshm1 \
+ nblayer \
+ nonblock \
+ ntioto \
+ ntoh \
+ op_2long \
+ op_excl \
+ op_filnf \
+ op_filok \
+ op_nofil \
+ parent \
+ parsetm \
+ peek \
+ perf \
+ pipeping \
+ pipeping2 \
+ pipeself \
+ poll_nm \
+ poll_to \
+ pollable \
+ prftest \
+ primblok \
+ provider \
+ prpollml \
+ ranfile \
+ randseed \
+ reinit \
+ rwlocktest \
+ sel_spd \
+ selct_er \
+ selct_nm \
+ selct_to \
+ selintr \
+ sema \
+ semaerr \
+ semaping \
+ sendzlf \
+ server_test \
+ servr_kk \
+ servr_uk \
+ servr_ku \
+ servr_uu \
+ short_thread \
+ sigpipe \
+ socket \
+ sockopt \
+ sockping \
+ sprintf \
+ stack \
+ stdio \
+ str2addr \
+ strod \
+ switch \
+ system \
+ testbit \
+ testfile \
+ threads \
+ timemac \
+ timetest \
+ tpd \
+ udpsrv \
+ vercheck \
+ version \
+ writev \
+ xnotify \
+ zerolen"
+
+inherit autotools
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+do_compile_prepend() {
+ oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX ${BUILD_CFLAGS}" LDFLAGS="" CC="${BUILD_CC}" -C config export
+}
+
+do_compile_append() {
+ oe_runmake -C pr/tests
+}
+
+do_install_append() {
+ install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc
+ sed -i \
+ -e 's:NSPRVERSION:${PV}:g' \
+ -e 's:OEPREFIX:${prefix}:g' \
+ -e 's:OELIBDIR:${libdir}:g' \
+ -e 's:OEINCDIR:${includedir}:g' \
+ -e 's:OEEXECPREFIX:${exec_prefix}:g' \
+ ${D}${libdir}/pkgconfig/nspr.pc
+
+ mkdir -p ${D}${libdir}/nspr/tests
+ install -m 0755 ${S}/pr/tests/runtests.pl ${D}${libdir}/nspr/tests
+ install -m 0755 ${S}/pr/tests/runtests.sh ${D}${libdir}/nspr/tests
+ cd ${B}/pr/tests
+ install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests
+
+ # delete compile-et.pl and perr.properties from ${bindir} because these are
+ # only used to generate prerr.c and prerr.h files from prerr.et at compile
+ # time
+ rm ${D}${bindir}/compile-et.pl ${D}${bindir}/prerr.properties
+}
+
+FILES_${PN} = "${libdir}/lib*.so"
+FILES_${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \
+ ${includedir}/* ${datadir}/aclocal/* "
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss/0001-Bug-1437734-Use-snprintf-in-sign.c-r-ttaubert.patch b/import-layers/yocto-poky/meta/recipes-support/nss/nss/0001-Bug-1437734-Use-snprintf-in-sign.c-r-ttaubert.patch
new file mode 100644
index 0000000..bc10f33
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/nss/nss/0001-Bug-1437734-Use-snprintf-in-sign.c-r-ttaubert.patch
@@ -0,0 +1,119 @@
+From 6f7d7be9997ba6727a5ad7c3800df9051160dc12 Mon Sep 17 00:00:00 2001
+From: Martin Thomson <martin.thomson@gmail.com>
+Date: Tue, 13 Feb 2018 12:30:58 +1100
+Subject: [PATCH] Bug 1437734 - Use snprintf in sign.c, r=ttaubert
+
+--HG--
+extra : rebase_source : 97921ece71ff86b18d32b891591608290eed4d83
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport [https://github.com/nss-dev/nss/commit/0a9078b3cde97add7c825c9d13467a8401ad0c88#diff-b42512151dc137537091f823f7701804.patch]
+
+ nss/cmd/signtool/sign.c | 58 ++++++++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 48 insertions(+), 10 deletions(-)
+
+diff --git a/nss/cmd/signtool/sign.c b/nss/cmd/signtool/sign.c
+index 6e776069a..6f8e43946 100644
+--- a/nss/cmd/signtool/sign.c
++++ b/nss/cmd/signtool/sign.c
+@@ -43,6 +43,7 @@ SignArchive(char *tree, char *keyName, char *zip_file, int javascript,
+ int status;
+ char tempfn[FNSIZE], fullfn[FNSIZE];
+ int keyType = rsaKey;
++ int count;
+
+ metafile = meta_file;
+ optimize = _optimize;
+@@ -81,9 +82,18 @@ SignArchive(char *tree, char *keyName, char *zip_file, int javascript,
+ }
+
+ /* rsa/dsa to zip */
+- sprintf(tempfn, "META-INF/%s.%s", base, (keyType == dsaKey ? "dsa"
+- : "rsa"));
+- sprintf(fullfn, "%s/%s", tree, tempfn);
++ count = snprintf(tempfn, sizeof(tempfn), "META-INF/%s.%s", base, (keyType == dsaKey ? "dsa" : "rsa"));
++ if (count >= sizeof(tempfn)) {
++ PR_fprintf(errorFD, "unable to write key metadata\n");
++ errorCount++;
++ exit(ERRX);
++ }
++ count = snprintf(fullfn, sizeof(fullfn), "%s/%s", tree, tempfn);
++ if (count >= sizeof(fullfn)) {
++ PR_fprintf(errorFD, "unable to write key metadata\n");
++ errorCount++;
++ exit(ERRX);
++ }
+ JzipAdd(fullfn, tempfn, zipfile, compression_level);
+
+ /* Loop through all files & subdirectories, add to archive */
+@@ -93,20 +103,44 @@ SignArchive(char *tree, char *keyName, char *zip_file, int javascript,
+ }
+ /* mf to zip */
+ strcpy(tempfn, "META-INF/manifest.mf");
+- sprintf(fullfn, "%s/%s", tree, tempfn);
++ count = snprintf(fullfn, sizeof(fullfn), "%s/%s", tree, tempfn);
++ if (count >= sizeof(fullfn)) {
++ PR_fprintf(errorFD, "unable to write manifest\n");
++ errorCount++;
++ exit(ERRX);
++ }
+ JzipAdd(fullfn, tempfn, zipfile, compression_level);
+
+ /* sf to zip */
+- sprintf(tempfn, "META-INF/%s.sf", base);
+- sprintf(fullfn, "%s/%s", tree, tempfn);
++ count = snprintf(tempfn, sizeof(tempfn), "META-INF/%s.sf", base);
++ if (count >= sizeof(tempfn)) {
++ PR_fprintf(errorFD, "unable to write sf metadata\n");
++ errorCount++;
++ exit(ERRX);
++ }
++ count = snprintf(fullfn, sizeof(fullfn), "%s/%s", tree, tempfn);
++ if (count >= sizeof(fullfn)) {
++ PR_fprintf(errorFD, "unable to write sf metadata\n");
++ errorCount++;
++ exit(ERRX);
++ }
+ JzipAdd(fullfn, tempfn, zipfile, compression_level);
+
+ /* Add the rsa/dsa file to the zip archive normally */
+ if (!xpi_arc) {
+ /* rsa/dsa to zip */
+- sprintf(tempfn, "META-INF/%s.%s", base, (keyType == dsaKey ? "dsa"
+- : "rsa"));
+- sprintf(fullfn, "%s/%s", tree, tempfn);
++ count = snprintf(tempfn, sizeof(tempfn), "META-INF/%s.%s", base, (keyType == dsaKey ? "dsa" : "rsa"));
++ if (count >= sizeof(tempfn)) {
++ PR_fprintf(errorFD, "unable to write key metadata\n");
++ errorCount++;
++ exit(ERRX);
++ }
++ count = snprintf(fullfn, sizeof(fullfn), "%s/%s", tree, tempfn);
++ if (count >= sizeof(fullfn)) {
++ PR_fprintf(errorFD, "unable to write key metadata\n");
++ errorCount++;
++ exit(ERRX);
++ }
+ JzipAdd(fullfn, tempfn, zipfile, compression_level);
+ }
+
+@@ -408,6 +442,7 @@ static int
+ manifesto_xpi_fn(char *relpath, char *basedir, char *reldir, char *filename, void *arg)
+ {
+ char fullname[FNSIZE];
++ int count;
+
+ if (verbosity >= 0) {
+ PR_fprintf(outputFD, "--> %s\n", relpath);
+@@ -421,7 +456,10 @@ manifesto_xpi_fn(char *relpath, char *basedir, char *reldir, char *filename, voi
+ if (!PL_HashTableLookup(extensions, ext))
+ return 0;
+ }
+- sprintf(fullname, "%s/%s", basedir, relpath);
++ count = snprintf(fullname, sizeof(fullname), "%s/%s", basedir, relpath);
++ if (count >= sizeof(fullname)) {
++ return 1;
++ }
+ JzipAdd(fullname, relpath, zipfile, compression_level);
+
+ return 0;
diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss/nss-build-hacl-poly1305-aarch64.patch b/import-layers/yocto-poky/meta/recipes-support/nss/nss/nss-build-hacl-poly1305-aarch64.patch
new file mode 100644
index 0000000..8276f89
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/nss/nss/nss-build-hacl-poly1305-aarch64.patch
@@ -0,0 +1,30 @@
+# HG changeset patch
+# User Daiki Ueno <dueno@redhat.com>
+# Date 1516710574 -3600
+# Tue Jan 23 13:29:34 2018 +0100
+# Node ID 27f27ce21c2c6ff5a47fa9e17c438b000366c9c9
+# Parent be1dca5ac80541d3b81a8da9d42854d8b1cceefb
+Build Hacl_Poly1305_64.o on aarch64 even with make
+
+Upstream-Status: Backport
+https://bug1432455.bmoattachments.org/attachment.cgi?id=8944691
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: nss-3.35/nss/lib/freebl/Makefile
+===================================================================
+--- nss-3.35.orig/nss/lib/freebl/Makefile
++++ nss-3.35/nss/lib/freebl/Makefile
+@@ -533,7 +533,12 @@ ifndef NSS_DISABLE_CHACHAPOLY
+ EXTRA_SRCS += chacha20_vec.c
+ endif
+ else
+- EXTRA_SRCS += poly1305.c
++ ifeq ($(CPU_ARCH),aarch64)
++ EXTRA_SRCS += Hacl_Poly1305_64.c
++ else
++ EXTRA_SRCS += poly1305.c
++ endif
++
+ EXTRA_SRCS += chacha20.c
+ VERIFIED_SRCS += Hacl_Chacha20.c
+ endif # x86_64
diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.31.1.bb b/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.31.1.bb
deleted file mode 100644
index 2bb9bdb..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.31.1.bb
+++ /dev/null
@@ -1,253 +0,0 @@
-SUMMARY = "Mozilla's SSL and TLS implementation"
-DESCRIPTION = "Network Security Services (NSS) is a set of libraries \
-designed to support cross-platform development of \
-security-enabled client and server applications. \
-Applications built with NSS can support SSL v2 and v3, \
-TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \
-v3 certificates, and other security standards."
-HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/"
-SECTION = "libs"
-
-LICENSE = "MPL-2.0 | (MPL-2.0 & GPL-2.0+) | (MPL-2.0 & LGPL-2.1+)"
-
-LIC_FILES_CHKSUM = "file://nss/COPYING;md5=3b1e88e1b9c0b5a4b2881d46cce06a18 \
- file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \
- file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=5d425c8f3157dbf212db2ec53d9e5132"
-
-VERSION_DIR = "${@d.getVar('BP').upper().replace('-', '_').replace('.', '_') + '_RTM'}"
-
-SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${VERSION_DIR}/src/${BP}.tar.gz \
- file://nss.pc.in \
- file://signlibs.sh \
- file://0001-nss-fix-support-cross-compiling.patch \
- file://nss-no-rpath-for-cross-compiling.patch \
- file://nss-fix-incorrect-shebang-of-perl.patch \
- file://nss-fix-nsinstall-build.patch \
- file://disable-Wvarargs-with-clang.patch \
- file://pqg.c-ULL_addend.patch \
- file://Fix-compilation-for-X32.patch \
- "
-
-SRC_URI[md5sum] = "ebb44f1394250d2cf6ec3c2e3d71fa20"
-SRC_URI[sha256sum] = "933439214dc03ee60e86d1419c19e1568998b0776dde987f41fa70ced6cd08dc"
-
-UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases"
-UPSTREAM_CHECK_REGEX = "NSS_(?P<pver>.+)_release_notes"
-
-inherit siteinfo
-
-DEPENDS = "sqlite3 nspr zlib nss-native"
-DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
-RDEPENDS_${PN}-smime = "perl"
-
-TD = "${S}/tentative-dist"
-TDS = "${S}/tentative-dist-staging"
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-do_configure_prepend_libc-musl () {
- sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk
-}
-
-do_compile_prepend_class-native() {
- export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}
- export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
- export NSS_ENABLE_WERROR=0
-}
-
-do_compile_prepend_class-nativesdk() {
- export LDFLAGS=""
-}
-
-do_compile_prepend_class-native() {
- # Need to set RPATH so that chrpath will do its job correctly
- RPATH="-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE}"
-}
-
-do_compile() {
- export CROSS_COMPILE=1
- export NATIVE_CC="${BUILD_CC}"
- export NATIVE_FLAGS="${BUILD_CFLAGS}"
- export BUILD_OPT=1
-
- export FREEBL_NO_DEPEND=1
- export FREEBL_LOWHASH=1
-
- export LIBDIR=${libdir}
- export MOZILLA_CLIENT=1
- export NS_USE_GCC=1
- export NSS_USE_SYSTEM_SQLITE=1
- export NSS_ENABLE_ECC=1
-
- export OS_RELEASE=3.4
- export OS_TARGET=Linux
- export OS_ARCH=Linux
-
- if [ "${TARGET_ARCH}" = "powerpc" ]; then
- OS_TEST=ppc
- elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
- OS_TEST=ppc64
- elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
- OS_TEST=mips
- else
- OS_TEST="${TARGET_ARCH}"
- fi
-
- if [ "${SITEINFO_BITS}" = "64" ]; then
- export USE_64=1
- elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
- export USE_X32=1
- fi
-
- export NSS_DISABLE_GTESTS=1
-
- # We can modify CC in the environment, but if we set it via an
- # argument to make, nsinstall, a host program, will also build with it!
- #
- # nss pretty much does its own thing with CFLAGS, so we put them into CC.
- # Optimization will get clobbered, but most of the stuff will survive.
- # The motivation for this is to point to the correct place for debug
- # source files and CFLAGS does that. Nothing uses CCC.
- #
- export CC="${CC} ${CFLAGS}"
- make -C ./nss CCC="${CXX} -g" \
- OS_TEST=${OS_TEST} \
- RPATH="${RPATH}"
-}
-do_compile[vardepsexclude] += "SITEINFO_BITS"
-
-
-do_install_prepend_class-nativesdk() {
- export LDFLAGS=""
-}
-
-do_install() {
- export CROSS_COMPILE=1
- export NATIVE_CC="${BUILD_CC}"
- export BUILD_OPT=1
-
- export FREEBL_NO_DEPEND=1
-
- export LIBDIR=${libdir}
- export MOZILLA_CLIENT=1
- export NS_USE_GCC=1
- export NSS_USE_SYSTEM_SQLITE=1
- export NSS_ENABLE_ECC=1
-
- export OS_RELEASE=3.4
- export OS_TARGET=Linux
- export OS_ARCH=Linux
-
- if [ "${TARGET_ARCH}" = "powerpc" ]; then
- OS_TEST=ppc
- elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
- OS_TEST=ppc64
- elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
- OS_TEST=mips
- else
- OS_TEST="${TARGET_ARCH}"
- fi
- if [ "${SITEINFO_BITS}" = "64" ]; then
- export USE_64=1
- elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
- export USE_X32=1
- fi
-
- export NSS_DISABLE_GTESTS=1
-
- make -C ./nss \
- CCC="${CXX}" \
- OS_TEST=${OS_TEST} \
- SOURCE_LIB_DIR="${TD}/${libdir}" \
- SOURCE_BIN_DIR="${TD}/${bindir}" \
- install
-
- install -d ${D}/${libdir}/
- for file in ${S}/dist/*.OBJ/lib/*.so; do
- echo "Installing `basename $file`..."
- cp $file ${D}/${libdir}/
- done
-
- for shared_lib in ${TD}/${libdir}/*.so.*; do
- if [ -f $shared_lib ]; then
- cp $shared_lib ${D}/${libdir}
- ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe)
- fi
- done
- for shared_lib in ${TD}/${libdir}/*.so; do
- if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then
- cp $shared_lib ${D}/${libdir}
- fi
- done
-
- install -d ${D}/${includedir}/nss3
- install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/*
-
- install -d ${D}/${bindir}
- for binary in ${TD}/${bindir}/*; do
- install -m 755 -t ${D}/${bindir} $binary
- done
-}
-do_install[vardepsexclude] += "SITEINFO_BITS"
-
-do_install_append() {
- # Create empty .chk files for the NSS libraries at build time. They could
- # be regenerated at target's boot time.
- for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do
- touch ${D}/${libdir}/$file
- chmod 755 ${D}/${libdir}/$file
- done
- install -D -m 755 ${WORKDIR}/signlibs.sh ${D}/${bindir}/signlibs.sh
-
- install -d ${D}${libdir}/pkgconfig/
- sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc
- sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc
- sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc
- sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc
- sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc
-}
-
-do_install_append_class-target() {
- # Create a blank certificate
- mkdir -p ${D}${sysconfdir}/pki/nssdb/
- touch ./empty_password
- certutil -N -d ${D}${sysconfdir}/pki/nssdb/ -f ./empty_password
- chmod 644 ${D}${sysconfdir}/pki/nssdb/*.db
- rm ./empty_password
-}
-
-PACKAGE_WRITE_DEPS += "nss-native"
-pkg_postinst_${PN} () {
- if [ -n "$D" ]; then
- for I in $D${libdir}/lib*.chk; do
- DN=`dirname $I`
- BN=`basename $I .chk`
- FN=$DN/$BN.so
- shlibsign -i $FN
- if [ $? -ne 0 ]; then
- exit 1
- fi
- done
- else
- signlibs.sh
- fi
-}
-
-PACKAGES =+ "${PN}-smime"
-FILES_${PN}-smime = "\
- ${bindir}/smime \
-"
-FILES_${PN} = "\
- ${sysconfdir} \
- ${bindir} \
- ${libdir}/lib*.chk \
- ${libdir}/lib*.so \
- "
-FILES_${PN}-dev = "\
- ${libdir}/nss \
- ${libdir}/pkgconfig/* \
- ${includedir}/* \
- "
-
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.35.bb b/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.35.bb
new file mode 100644
index 0000000..84f1916
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.35.bb
@@ -0,0 +1,255 @@
+SUMMARY = "Mozilla's SSL and TLS implementation"
+DESCRIPTION = "Network Security Services (NSS) is a set of libraries \
+designed to support cross-platform development of \
+security-enabled client and server applications. \
+Applications built with NSS can support SSL v2 and v3, \
+TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \
+v3 certificates, and other security standards."
+HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/"
+SECTION = "libs"
+
+LICENSE = "MPL-2.0 | (MPL-2.0 & GPL-2.0+) | (MPL-2.0 & LGPL-2.1+)"
+
+LIC_FILES_CHKSUM = "file://nss/COPYING;md5=3b1e88e1b9c0b5a4b2881d46cce06a18 \
+ file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \
+ file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=5d425c8f3157dbf212db2ec53d9e5132"
+
+VERSION_DIR = "${@d.getVar('BP').upper().replace('-', '_').replace('.', '_') + '_RTM'}"
+
+SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${VERSION_DIR}/src/${BP}.tar.gz \
+ file://nss.pc.in \
+ file://signlibs.sh \
+ file://0001-nss-fix-support-cross-compiling.patch \
+ file://nss-no-rpath-for-cross-compiling.patch \
+ file://nss-fix-incorrect-shebang-of-perl.patch \
+ file://nss-fix-nsinstall-build.patch \
+ file://disable-Wvarargs-with-clang.patch \
+ file://pqg.c-ULL_addend.patch \
+ file://Fix-compilation-for-X32.patch \
+ file://nss-build-hacl-poly1305-aarch64.patch \
+ file://0001-Bug-1437734-Use-snprintf-in-sign.c-r-ttaubert.patch \
+ "
+
+SRC_URI[md5sum] = "9467ec9e65c5aeb3254a50250490f5f7"
+SRC_URI[sha256sum] = "f4127de09bede39f5fd0f789d33c3504c5d261e69ea03022d46b319b3e32f6fa"
+
+UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases"
+UPSTREAM_CHECK_REGEX = "NSS_(?P<pver>.+)_release_notes"
+
+inherit siteinfo
+
+DEPENDS = "sqlite3 nspr zlib nss-native"
+DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
+RDEPENDS_${PN}-smime = "perl"
+
+TD = "${S}/tentative-dist"
+TDS = "${S}/tentative-dist-staging"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+do_configure_prepend_libc-musl () {
+ sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk
+}
+
+do_compile_prepend_class-native() {
+ export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}
+ export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
+ export NSS_ENABLE_WERROR=0
+}
+
+do_compile_prepend_class-nativesdk() {
+ export LDFLAGS=""
+}
+
+do_compile_prepend_class-native() {
+ # Need to set RPATH so that chrpath will do its job correctly
+ RPATH="-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE}"
+}
+
+do_compile() {
+ export CROSS_COMPILE=1
+ export NATIVE_CC="${BUILD_CC}"
+ export NATIVE_FLAGS="${BUILD_CFLAGS}"
+ export BUILD_OPT=1
+
+ export FREEBL_NO_DEPEND=1
+ export FREEBL_LOWHASH=1
+
+ export LIBDIR=${libdir}
+ export MOZILLA_CLIENT=1
+ export NS_USE_GCC=1
+ export NSS_USE_SYSTEM_SQLITE=1
+ export NSS_ENABLE_ECC=1
+
+ export OS_RELEASE=3.4
+ export OS_TARGET=Linux
+ export OS_ARCH=Linux
+
+ if [ "${TARGET_ARCH}" = "powerpc" ]; then
+ OS_TEST=ppc
+ elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
+ OS_TEST=ppc64
+ elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
+ OS_TEST=mips
+ else
+ OS_TEST="${TARGET_ARCH}"
+ fi
+
+ if [ "${SITEINFO_BITS}" = "64" ]; then
+ export USE_64=1
+ elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
+ export USE_X32=1
+ fi
+
+ export NSS_DISABLE_GTESTS=1
+
+ # We can modify CC in the environment, but if we set it via an
+ # argument to make, nsinstall, a host program, will also build with it!
+ #
+ # nss pretty much does its own thing with CFLAGS, so we put them into CC.
+ # Optimization will get clobbered, but most of the stuff will survive.
+ # The motivation for this is to point to the correct place for debug
+ # source files and CFLAGS does that. Nothing uses CCC.
+ #
+ export CC="${CC} ${CFLAGS}"
+ make -C ./nss CCC="${CXX} -g" \
+ OS_TEST=${OS_TEST} \
+ RPATH="${RPATH}"
+}
+do_compile[vardepsexclude] += "SITEINFO_BITS"
+
+
+do_install_prepend_class-nativesdk() {
+ export LDFLAGS=""
+}
+
+do_install() {
+ export CROSS_COMPILE=1
+ export NATIVE_CC="${BUILD_CC}"
+ export BUILD_OPT=1
+
+ export FREEBL_NO_DEPEND=1
+
+ export LIBDIR=${libdir}
+ export MOZILLA_CLIENT=1
+ export NS_USE_GCC=1
+ export NSS_USE_SYSTEM_SQLITE=1
+ export NSS_ENABLE_ECC=1
+
+ export OS_RELEASE=3.4
+ export OS_TARGET=Linux
+ export OS_ARCH=Linux
+
+ if [ "${TARGET_ARCH}" = "powerpc" ]; then
+ OS_TEST=ppc
+ elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
+ OS_TEST=ppc64
+ elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
+ OS_TEST=mips
+ else
+ OS_TEST="${TARGET_ARCH}"
+ fi
+ if [ "${SITEINFO_BITS}" = "64" ]; then
+ export USE_64=1
+ elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
+ export USE_X32=1
+ fi
+
+ export NSS_DISABLE_GTESTS=1
+
+ make -C ./nss \
+ CCC="${CXX}" \
+ OS_TEST=${OS_TEST} \
+ SOURCE_LIB_DIR="${TD}/${libdir}" \
+ SOURCE_BIN_DIR="${TD}/${bindir}" \
+ install
+
+ install -d ${D}/${libdir}/
+ for file in ${S}/dist/*.OBJ/lib/*.so; do
+ echo "Installing `basename $file`..."
+ cp $file ${D}/${libdir}/
+ done
+
+ for shared_lib in ${TD}/${libdir}/*.so.*; do
+ if [ -f $shared_lib ]; then
+ cp $shared_lib ${D}/${libdir}
+ ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe)
+ fi
+ done
+ for shared_lib in ${TD}/${libdir}/*.so; do
+ if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then
+ cp $shared_lib ${D}/${libdir}
+ fi
+ done
+
+ install -d ${D}/${includedir}/nss3
+ install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/*
+
+ install -d ${D}/${bindir}
+ for binary in ${TD}/${bindir}/*; do
+ install -m 755 -t ${D}/${bindir} $binary
+ done
+}
+do_install[vardepsexclude] += "SITEINFO_BITS"
+
+do_install_append() {
+ # Create empty .chk files for the NSS libraries at build time. They could
+ # be regenerated at target's boot time.
+ for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do
+ touch ${D}/${libdir}/$file
+ chmod 755 ${D}/${libdir}/$file
+ done
+ install -D -m 755 ${WORKDIR}/signlibs.sh ${D}/${bindir}/signlibs.sh
+
+ install -d ${D}${libdir}/pkgconfig/
+ sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc
+ sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc
+ sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc
+ sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc
+ sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc
+}
+
+do_install_append_class-target() {
+ # Create a blank certificate
+ mkdir -p ${D}${sysconfdir}/pki/nssdb/
+ touch ./empty_password
+ certutil -N -d ${D}${sysconfdir}/pki/nssdb/ -f ./empty_password
+ chmod 644 ${D}${sysconfdir}/pki/nssdb/*.db
+ rm ./empty_password
+}
+
+PACKAGE_WRITE_DEPS += "nss-native"
+pkg_postinst_${PN} () {
+ if [ -n "$D" ]; then
+ for I in $D${libdir}/lib*.chk; do
+ DN=`dirname $I`
+ BN=`basename $I .chk`
+ FN=$DN/$BN.so
+ shlibsign -i $FN
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+ done
+ else
+ signlibs.sh
+ fi
+}
+
+PACKAGES =+ "${PN}-smime"
+FILES_${PN}-smime = "\
+ ${bindir}/smime \
+"
+FILES_${PN} = "\
+ ${sysconfdir} \
+ ${bindir} \
+ ${libdir}/lib*.chk \
+ ${libdir}/lib*.so \
+ "
+FILES_${PN}-dev = "\
+ ${libdir}/nss \
+ ${libdir}/pkgconfig/* \
+ ${includedir}/* \
+ "
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry-1.0.0/gpg-error_pkconf.patch b/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry-1.1.0/gpg-error_pkconf.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry-1.0.0/gpg-error_pkconf.patch
rename to import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry-1.1.0/gpg-error_pkconf.patch
diff --git a/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry-1.0.0/libassuan_pkgconf.patch b/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry-1.1.0/libassuan_pkgconf.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry-1.0.0/libassuan_pkgconf.patch
rename to import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry-1.1.0/libassuan_pkgconf.patch
diff --git a/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_1.0.0.bb b/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_1.0.0.bb
deleted file mode 100644
index 319acd3..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_1.0.0.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "Collection of simple PIN or passphrase entry dialogs"
-DESCRIPTION = "\
- Pinentry is a collection of simple PIN or passphrase entry dialogs which \
- utilize the Assuan protocol as described by the aegypten project; see \
- http://www.gnupg.org/aegypten/ for details."
-
-HOMEPAGE = "http://www.gnupg.org/related_software/pinentry/index.en.html"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=cbbd794e2a0a289b9dfcc9f513d1996e"
-
-inherit autotools pkgconfig
-
-DEPENDS = "gettext-native libassuan libgpg-error"
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://libassuan_pkgconf.patch \
- file://gpg-error_pkconf.patch \
-"
-
-SRC_URI[md5sum] = "4a3fad8b31f9b4c5526c8837495015dc"
-SRC_URI[sha256sum] = "1672c2edc1feb036075b187c0773787b2afd0544f55025c645a71b4c2f79275a"
-
-EXTRA_OECONF = "--disable-rpath --disable-dependency-tracking \
- --disable-pinentry-qt5 \
-"
-
-PACKAGECONFIG ??= "ncurses libcap"
-
-PACKAGECONFIG[ncurses] = "--enable-ncurses --with-ncurses-include-dir=${STAGING_INCDIR}, --disable-ncurses, ncurses"
-PACKAGECONFIG[libcap] = "--with-libcap, --without-libcap, libcap"
-PACKAGECONFIG[qt] = "--enable-pinentry-qt, --disable-pinentry-qt, qt4-x11"
-PACKAGECONFIG[gtk2] = "--enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0"
-
-#To use libsecret, add meta-gnome
-PACKAGECONFIG[secret] = "--enable-libsecret, --disable-libsecret, libsecret"
diff --git a/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_1.1.0.bb b/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_1.1.0.bb
new file mode 100644
index 0000000..1eaa261
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_1.1.0.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Collection of simple PIN or passphrase entry dialogs"
+DESCRIPTION = "\
+ Pinentry is a collection of simple PIN or passphrase entry dialogs which \
+ utilize the Assuan protocol as described by the aegypten project; see \
+ http://www.gnupg.org/aegypten/ for details."
+
+HOMEPAGE = "http://www.gnupg.org/related_software/pinentry/index.en.html"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cbbd794e2a0a289b9dfcc9f513d1996e"
+
+inherit autotools pkgconfig
+
+DEPENDS = "gettext-native libassuan libgpg-error"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://libassuan_pkgconf.patch \
+ file://gpg-error_pkconf.patch \
+"
+
+SRC_URI[md5sum] = "3829315cb0a1e9cedc05ffe6def7a2c6"
+SRC_URI[sha256sum] = "68076686fa724a290ea49cdf0d1c0c1500907d1b759a3bcbfbec0293e8f56570"
+
+EXTRA_OECONF = "--disable-rpath --disable-dependency-tracking \
+ --disable-pinentry-qt5 \
+"
+
+PACKAGECONFIG ??= "ncurses libcap"
+
+PACKAGECONFIG[ncurses] = "--enable-ncurses --with-ncurses-include-dir=${STAGING_INCDIR}, --disable-ncurses, ncurses"
+PACKAGECONFIG[libcap] = "--with-libcap, --without-libcap, libcap"
+PACKAGECONFIG[qt] = "--enable-pinentry-qt, --disable-pinentry-qt, qt4-x11"
+PACKAGECONFIG[gtk2] = "--enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0"
+
+#To use libsecret, add meta-gnome
+PACKAGECONFIG[secret] = "--enable-libsecret, --disable-libsecret, libsecret"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.1.1.bb b/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.1.1.bb
new file mode 100644
index 0000000..e5b71c0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.1.1.bb
@@ -0,0 +1,26 @@
+SUMMARY = "A C program to run all installed ptests"
+DESCRIPTION = "The ptest-runner2 package installs a ptest-runner \
+program which loops through all installed ptest test suites and \
+runs them in sequence."
+HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/ptest-runner2/about/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
+
+SRCREV = "16413d71cc06b02a6d859c35a017cc49b88283f7"
+PV = "2.1.1+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/ptest-runner2"
+S = "${WORKDIR}/git"
+
+FILES_${PN} = "${bindir}/ptest-runner"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+do_compile () {
+ oe_runmake
+}
+
+do_install () {
+ install -D -m 0755 ${S}/ptest-runner ${D}${bindir}/ptest-runner
+}
diff --git a/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.1.bb b/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.1.bb
deleted file mode 100644
index 71c1dab..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.1.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "A C program to run all installed ptests"
-DESCRIPTION = "The ptest-runner2 package installs a ptest-runner \
-program which loops through all installed ptest test suites and \
-runs them in sequence."
-HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/ptest-runner2/about/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
-
-SRCREV = "8a93832dad621535e90aa8e1fb74ae5ba743fc3e"
-PV = "2.1+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/ptest-runner2"
-S = "${WORKDIR}/git"
-
-FILES_${PN} = "${bindir}/ptest-runner"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-do_compile () {
- oe_runmake
-}
-
-do_install () {
- install -D -m 0755 ${S}/ptest-runner ${D}${bindir}/ptest-runner
-}
diff --git a/import-layers/yocto-poky/meta/recipes-support/rng-tools/rng-tools/read_error_msg.patch b/import-layers/yocto-poky/meta/recipes-support/rng-tools/rng-tools/read_error_msg.patch
new file mode 100644
index 0000000..8aa13bf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/rng-tools/rng-tools/read_error_msg.patch
@@ -0,0 +1,98 @@
+rng-tools: modify 'read error' message
+
+Make the 'read error' message more descriptive.
+
+Copied from https://bugzilla.redhat.com/attachment.cgi?id=1295857
+and modified in one place to apply successfully. Error message during
+bootstrap modified to show device name.
+
+Upstream-Status: pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+--- a/rngd.c
++++ b/rngd.c
+@@ -247,8 +247,11 @@ static void do_loop(int random_step)
+ continue; /* failed, no work */
+
+ retval = iter->xread(buf, sizeof buf, iter);
+- if (retval)
++ if (retval) {
++ message(LOG_DAEMON|LOG_ERR,
++ "Error reading from entropy source\n");
+ continue; /* failed, no work */
++ }
+
+ work_done = true;
+
+--- a/rngd_entsource.c
++++ b/rngd_entsource.c
+@@ -63,10 +63,8 @@ int xread(void *buf, size_t size, struct
+ size -= r;
+ }
+
+- if (size) {
+- message(LOG_DAEMON|LOG_ERR, "read error\n");
++ if (size)
+ return -1;
+- }
+ return 0;
+ }
+
+@@ -152,7 +150,7 @@ error_out:
+ }
+
+ /* Initialize entropy source */
+-static int discard_initial_data(struct rng *ent_src)
++static int discard_initial_data(struct rng *ent_src, int *buf)
+ {
+ /* Trash 32 bits of what is probably stale (non-random)
+ * initial state from the RNG. For Intel's, 8 bits would
+@@ -164,10 +162,12 @@ static int discard_initial_data(struct r
+ xread(tempbuf, sizeof(tempbuf), ent_src);
+
+ /* Return 32 bits of bootstrap data */
+- xread(tempbuf, sizeof(tempbuf), ent_src);
++ if (xread(tempbuf, sizeof(tempbuf), ent_src) != 0)
++ return -1;
+
+- return tempbuf[0] | (tempbuf[1] << 8) |
++ *buf = tempbuf[0] | (tempbuf[1] << 8) |
+ (tempbuf[2] << 16) | (tempbuf[3] << 24);
++ return 0;
+ }
+
+ /*
+@@ -175,6 +175,8 @@ static int discard_initial_data(struct r
+ */
+ int init_entropy_source(struct rng *ent_src)
+ {
++ int bootstrap;
++
+ ent_src->rng_fd = open(ent_src->rng_name, O_RDONLY);
+ if (ent_src->rng_fd == -1) {
+ return 1;
+@@ -182,7 +184,11 @@ int init_entropy_source(struct rng *ent_
+ src_list_add(ent_src);
+ /* Bootstrap FIPS tests */
+ ent_src->fipsctx = malloc(sizeof(fips_ctx_t));
+- fips_init(ent_src->fipsctx, discard_initial_data(ent_src));
++ if (discard_initial_data(ent_src, &bootstrap) != 0) {
++ message(LOG_ERR|LOG_INFO, "Read failure in %s during bootstrap\n",ent_src->rng_name);
++ return 1;
++ }
++ fips_init(ent_src->fipsctx, bootstrap);
+ return 0;
+ }
+
+--- a/rngtest.c
++++ b/rngtest.c
+@@ -335,6 +335,7 @@ static int discard_initial_data(void)
+
+ return tempbuf[0] | (tempbuf[1] << 8) |
+ (tempbuf[2] << 16) | (tempbuf[3] << 24);
++
+ }
+
+ static void do_rng_fips_test_loop( void )
diff --git a/import-layers/yocto-poky/meta/recipes-support/rng-tools/rng-tools_5.bb b/import-layers/yocto-poky/meta/recipes-support/rng-tools/rng-tools_5.bb
index 4a66bed..b3c9fd9 100644
--- a/import-layers/yocto-poky/meta/recipes-support/rng-tools/rng-tools_5.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/rng-tools/rng-tools_5.bb
@@ -7,6 +7,7 @@
file://0002-Add-argument-to-control-the-libargp-dependency.patch \
file://underquote.patch \
file://rng-tools-5-fix-textrels-on-PIC-x86.patch \
+ file://read_error_msg.patch \
file://init \
file://default \
file://rngd.service \
diff --git a/import-layers/yocto-poky/meta/recipes-support/serf/serf/norpath.patch b/import-layers/yocto-poky/meta/recipes-support/serf/serf/norpath.patch
index 380f5d0..c392444 100644
--- a/import-layers/yocto-poky/meta/recipes-support/serf/serf/norpath.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/serf/serf/norpath.patch
@@ -5,11 +5,11 @@
RP 2014/7/17
-Index: serf-1.3.6/SConstruct
+Index: serf-1.3.9/SConstruct
===================================================================
---- serf-1.3.6.orig/SConstruct 2014-07-17 19:57:57.724389150 +0000
-+++ serf-1.3.6/SConstruct 2014-07-17 20:04:21.784399616 +0000
-@@ -218,8 +218,7 @@
+--- serf-1.3.9.orig/SConstruct
++++ serf-1.3.9/SConstruct
+@@ -224,8 +224,7 @@ if sys.platform != 'win32':
else:
LIBNAMESTATIC = 'serf-${MAJOR}'
@@ -17,9 +17,9 @@
- PDB='${TARGET.filebase}.pdb')
+env.Append(PDB='${TARGET.filebase}.pdb')
- #for i in env:
- # print(str(env[i]))
-@@ -371,12 +370,6 @@
+ if sys.platform == 'darwin':
+ # linkflags.append('-Wl,-install_name,@executable_path/%s.dylib' % (LIBNAME,))
+@@ -385,12 +384,6 @@ if gssapi and CALLOUT_OKAY:
if sys.platform == 'win32':
env.Append(CPPDEFINES=['SERF_HAVE_SSPI'])
@@ -32,8 +32,8 @@
# Set up the construction of serf-*.pc
pkgconfig = env.Textfile('serf-%d.pc' % (MAJOR,),
env.File('build/serf.pc.in'),
-@@ -446,7 +439,6 @@
- ENV={'PATH' : os.environ['PATH']}))
+@@ -461,7 +454,6 @@ else:
+ TEST_EXES = [ os.path.join('test', '%s' % (prog)) for prog in TEST_PROGRAMS ]
# Find the (dynamic) library in this directory
-tenv.Replace(RPATH=thisdir)
diff --git a/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch b/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
index 3c9f1ea..262ff75 100644
--- a/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
@@ -8,16 +8,18 @@
Signed-off-by: Joe Slater <jslater@windriver.com>
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -44,7 +44,9 @@ $(pkgconfig_DATA): config.status
- @INTLTOOL_XML_RULE@
- @INTLTOOL_DESKTOP_RULE@
+Index: shared-mime-info-1.9/Makefile.am
+===================================================================
+--- shared-mime-info-1.9.orig/Makefile.am
++++ shared-mime-info-1.9/Makefile.am
+@@ -50,7 +50,9 @@ else
+ update_mime_database="$(top_builddir)/update-mime-database$(EXEEXT)"
+ endif
-install-data-hook: install-binPROGRAMS
+# do NOT make this dependent on anything!
+#
+install-data-hook:
if ENABLE_UPDATE_MIMEDB
- $(DESTDIR)"$(bindir)/update-mime-database" -V "$(DESTDIR)$(datadir)/mime"
+ $(update_mime_database) -V "$(DESTDIR)$(datadir)/mime"
endif
diff --git a/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch b/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch
index 84c4d03..fea34a5 100644
--- a/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch
@@ -11,17 +11,17 @@
Upstream-Status: Pending
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-Index: shared-mime-info-1.0/Makefile.am
+Index: shared-mime-info-1.9/Makefile.am
===================================================================
---- shared-mime-info-1.0.orig/Makefile.am
-+++ shared-mime-info-1.0/Makefile.am
+--- shared-mime-info-1.9.orig/Makefile.am
++++ shared-mime-info-1.9/Makefile.am
@@ -1,5 +1,3 @@
-SUBDIRS=. po
-
AM_CPPFLAGS = $(ALL_CFLAGS)
packagesdir = $(datadir)/mime/packages
-@@ -72,8 +70,7 @@ uninstall-hook:
+@@ -81,8 +79,7 @@ endif
all: $(defaultmakedeps)
@@ -29,5 +29,5 @@
- $(AM_V_GEN) $(MAKE) -C po shared-mime-info.pot
+create-pot: po
- check: create-pot freedesktop.org.xml update-mime-database check-translations
- if test -e $(top_builddir)/freedesktop.org.xml; then \
+ local-test: create-pot freedesktop.org.xml update-mime-database$(EXEEXT)
+ if CROSS_COMPILING
diff --git a/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.8.bb b/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.8.bb
deleted file mode 100644
index 849d999..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.8.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require shared-mime-info.inc
-
-SRC_URI += "file://parallelmake.patch \
- file://install-data-hook.patch"
-
-SRC_URI[md5sum] = "f6dcadce764605552fc956563efa058c"
-SRC_URI[sha256sum] = "2af55ef1a0319805b74ab40d331a3962c905477d76c086f49e34dc96363589e9"
diff --git a/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.9.bb b/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.9.bb
new file mode 100644
index 0000000..f9b273e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.9.bb
@@ -0,0 +1,7 @@
+require shared-mime-info.inc
+
+SRC_URI += "file://parallelmake.patch \
+ file://install-data-hook.patch"
+
+SRC_URI[md5sum] = "45103889b91242850aa47f09325e798b"
+SRC_URI[sha256sum] = "5c0133ec4e228e41bdf52f726d271a2d821499c2ab97afd3aa3d6cf43efcdc83"
diff --git a/import-layers/yocto-poky/meta/recipes-support/sqlite/files/sqlite3-fix-CVE-2017-13685.patch b/import-layers/yocto-poky/meta/recipes-support/sqlite/files/sqlite3-fix-CVE-2017-13685.patch
deleted file mode 100644
index aac428c..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/sqlite/files/sqlite3-fix-CVE-2017-13685.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Fix CVE-2017-13685
-
-The dump_callback function in SQLite 3.20.0 allows remote attackers to
-cause a denial of service (EXC_BAD_ACCESS and application crash) via a
-crafted file.
-
-References:
-https://sqlite.org/src/info/02f0f4c54f2819b3
-http://www.mail-archive.com/sqlite-users%40mailinglists.sqlite.org/msg105314.html
-
-Upstream-Status: Backport [https://sqlite.org/src/info/cf0d3715caac9149]
-
-CVE: CVE-2017-13685
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-
-Index: src/shell.c
-==================================================================
---- src/shell.c
-+++ src/shell.c
-@@ -2657,10 +2657,11 @@
- int *aiType /* Column types */
- ){
- int i;
- ShellState *p = (ShellState*)pArg;
-
-+ if( azArg==0 ) return 0;
- switch( p->cMode ){
- case MODE_Line: {
- int w = 5;
- if( azArg==0 ) break;
- for(i=0; i<nArg; i++){
-@@ -3007,10 +3008,11 @@
- */
- static int captureOutputCallback(void *pArg, int nArg, char **azArg, char **az){
- ShellText *p = (ShellText*)pArg;
- int i;
- UNUSED_PARAMETER(az);
-+ if( azArg==0 ) return 0;
- if( p->n ) appendText(p, "|", 0);
- for(i=0; i<nArg; i++){
- if( i ) appendText(p, ",", 0);
- if( azArg[i] ) appendText(p, azArg[i], 0);
- }
-@@ -3888,11 +3890,11 @@
- const char *zType;
- const char *zSql;
- ShellState *p = (ShellState *)pArg;
-
- UNUSED_PARAMETER(azNotUsed);
-- if( nArg!=3 ) return 1;
-+ if( nArg!=3 || azArg==0 ) return 0;
- zTable = azArg[0];
- zType = azArg[1];
- zSql = azArg[2];
-
- if( strcmp(zTable, "sqlite_sequence")==0 ){
diff --git a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.20.0.bb b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.20.0.bb
deleted file mode 100644
index e508258..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.20.0.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require sqlite3.inc
-
-LICENSE = "PD"
-LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66"
-
-SRC_URI = "\
- http://www.sqlite.org/2017/sqlite-autoconf-${SQLITE_PV}.tar.gz \
- file://sqlite3-fix-CVE-2017-13685.patch \
- "
-SRC_URI[md5sum] = "e262a28b73cc330e7e83520c8ce14e4d"
-SRC_URI[sha256sum] = "3814c6f629ff93968b2b37a70497cfe98b366bf587a2261a56a5f750af6ae6a0"
diff --git a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.22.0.bb b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.22.0.bb
new file mode 100644
index 0000000..ef88659
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.22.0.bb
@@ -0,0 +1,10 @@
+require sqlite3.inc
+
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66"
+
+SRC_URI = "\
+ http://www.sqlite.org/2018/sqlite-autoconf-${SQLITE_PV}.tar.gz \
+ "
+SRC_URI[md5sum] = "96b5648d542e8afa6ab7ffb8db8ddc3d"
+SRC_URI[sha256sum] = "2824ab1238b706bc66127320afbdffb096361130e23291f26928a027b885c612"
diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.48.3.bb b/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.48.3.bb
deleted file mode 100644
index 4720841..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.48.3.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "Virtual terminal emulator GTK+ widget library"
-BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte"
-LICENSE = "LGPLv2.1+"
-DEPENDS = "glib-2.0 gtk+3 libpcre2 intltool-native libxml2-native gperf-native"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-inherit gnomebase gtk-doc distro_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) } \
- "
-SRC_URI[archive.md5sum] = "b300675ac5f269aa6eb48fe89a0d726d"
-SRC_URI[archive.sha256sum] = "a3a9fb182740b392a45cd3f46fa61a985f68bb6b1817b52daec22034c46158c3"
-
-ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
-
-# Instead of "inherit vala" we do the relevant settings here so we can
-# set DEPENDS based on PACKAGECONFIG.
-
-# Our patched version of Vala looks in STAGING_DATADIR for .vapi files
-export STAGING_DATADIR
-# Upstream Vala >= 0.11 looks in XDG_DATA_DIRS for .vapi files
-export XDG_DATA_DIRS = "${STAGING_DATADIR}"
-
-# Help g-ir-scanner find the .so for linking
-do_compile_prepend() {
- export GIR_EXTRA_LIBS_PATH="${B}/src/.libs"
-}
-
-# Package additional files
-FILES_${PN}-dev += "${datadir}/vala/vapi/*"
-
-PACKAGECONFIG ??= "gnutls"
-PACKAGECONFIG[vala] = "--enable-vala,--disable-vala,vala-native vala"
-PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
-
-CFLAGS += "-D_GNU_SOURCE"
-
-EXTRA_OECONF = "--disable-test-application"
-
-# 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"
-FILES_libvte = "${libdir}/*.so.* ${libdir}/girepository-1.0/*"
diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.50.2.bb b/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.50.2.bb
new file mode 100644
index 0000000..8b9ee33
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.50.2.bb
@@ -0,0 +1,48 @@
+SUMMARY = "Virtual terminal emulator GTK+ widget library"
+BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte"
+LICENSE = "LGPLv2.1+"
+DEPENDS = "glib-2.0 gtk+3 libpcre2 intltool-native libxml2-native gperf-native"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+inherit gnomebase gtk-doc distro_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) } \
+ "
+SRC_URI[archive.md5sum] = "1912cfd1d9cdd30cebeb908507acadc5"
+SRC_URI[archive.sha256sum] = "79dd316bfaff48f2fb74d066baae0d830e1f44436796fe410a57297e5c5f09cf"
+
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+# Instead of "inherit vala" we do the relevant settings here so we can
+# set DEPENDS based on PACKAGECONFIG.
+
+# Our patched version of Vala looks in STAGING_DATADIR for .vapi files
+export STAGING_DATADIR
+# Upstream Vala >= 0.11 looks in XDG_DATA_DIRS for .vapi files
+export XDG_DATA_DIRS = "${STAGING_DATADIR}"
+
+# Help g-ir-scanner find the .so for linking
+do_compile_prepend() {
+ export GIR_EXTRA_LIBS_PATH="${B}/src/.libs"
+}
+
+# Package additional files
+FILES_${PN}-dev += "${datadir}/vala/vapi/*"
+
+PACKAGECONFIG ??= "gnutls"
+PACKAGECONFIG[vala] = "--enable-vala,--disable-vala,vala-native vala"
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+
+CFLAGS += "-D_GNU_SOURCE"
+
+EXTRA_OECONF = "--disable-test-application"
+
+# 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"
+FILES_libvte = "${libdir}/*.so.* ${libdir}/girepository-1.0/*"
diff --git a/import-layers/yocto-poky/meta/site/arm-linux b/import-layers/yocto-poky/meta/site/arm-linux
index e6b9a72..fb3c81d 100644
--- a/import-layers/yocto-poky/meta/site/arm-linux
+++ b/import-layers/yocto-poky/meta/site/arm-linux
@@ -3,7 +3,6 @@
ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
ac_cv_sizeof_wchar_t=${ac_cv_sizeof_wchar_t=1}
ac_cv_sizeof_unsigned_char=${ac_cv_sizeof_unsigned_char=1}
-ac_cv_sizeof_bool=${ac_cv_sizeof_bool=1}
ac_cv_sizeof_char_p=${ac_cv_sizeof_int_p=4}
ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
ac_cv_sizeof_int_p=${ac_cv_sizeof_int_p=4}
@@ -142,7 +141,6 @@
clamav_av_func_working_snprintf_long=${clamav_av_func_working_snprintf_long=yes}
clamav_av_have_in_port_t=${clamav_av_have_in_port_t=yes}
clamav_av_have_in_addr_t=${clamav_av_have_in_addr_t=yes}
-ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
#dbus
ac_cv_have_abstract_sockets=${ac_cv_have_abstract_sockets=yes}
diff --git a/import-layers/yocto-poky/meta/site/common b/import-layers/yocto-poky/meta/site/common
index 5ccc14f..ff55232 100644
--- a/import-layers/yocto-poky/meta/site/common
+++ b/import-layers/yocto-poky/meta/site/common
@@ -18,4 +18,4 @@
# python: deactivate a runtime check for ipv6-support in python >=2.7.1 that fails when cross-compiling
ac_cv_buggy_getaddrinfo=no
-ac_cv_path_SED=sed
+ac_cv_path_SED=${ac_cv_path_SED=sed}
diff --git a/import-layers/yocto-poky/meta/site/common-linux b/import-layers/yocto-poky/meta/site/common-linux
index 2958716..71ec961 100644
--- a/import-layers/yocto-poky/meta/site/common-linux
+++ b/import-layers/yocto-poky/meta/site/common-linux
@@ -48,6 +48,7 @@
# coreutils
gl_cv_func_fstatat_zero_flag=${gl_cv_func_fstatat_zero_flag=yes}
+gl_cv_have_proc_uptime=${gl_cv_have_proc_uptime=yes}
# mysql
ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls=yes}
diff --git a/import-layers/yocto-poky/meta/site/common-musl b/import-layers/yocto-poky/meta/site/common-musl
index 26fc103..1b4fc32 100644
--- a/import-layers/yocto-poky/meta/site/common-musl
+++ b/import-layers/yocto-poky/meta/site/common-musl
@@ -12,6 +12,7 @@
ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=yes}
ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=yes}
ac_cv_func_getaddrinfo=${ac_cv_func_getaddrinfo=yes}
+ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
# glib
glib_cv_strlcpy=${glib_cv_strlcpy=no}
diff --git a/import-layers/yocto-poky/meta/site/ix86-common b/import-layers/yocto-poky/meta/site/ix86-common
index 4fbf58c..c5e354c 100644
--- a/import-layers/yocto-poky/meta/site/ix86-common
+++ b/import-layers/yocto-poky/meta/site/ix86-common
@@ -53,7 +53,6 @@
clamav_av_func_working_snprintf_long=${clamav_av_func_working_snprintf_long=yes}
clamav_av_have_in_port_t=${clamav_av_have_in_port_t=yes}
clamav_av_have_in_addr_t=${clamav_av_have_in_addr_t=yes}
-ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
# cvs
cvs_cv_func_printf_ptr=${cvs_cv_func_printf_ptr=yes}
diff --git a/import-layers/yocto-poky/meta/site/microblaze-linux b/import-layers/yocto-poky/meta/site/microblaze-linux
new file mode 100644
index 0000000..c6a40c6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/site/microblaze-linux
@@ -0,0 +1,54 @@
+# general
+ac_cv_va_val_copy=${ac_cv_va_val_copy=yes}
+ac_cv_sizeof___int64=${ac_cv_sizeof___int64=0}
+ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
+ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
+ac_cv_sizeof_long=${ac_cv_sizeof_long=4}
+ac_cv_sizeof_long_int=${ac_cv_sizeof_long_int=4}
+ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8}
+ac_cv_sizeof_short=${ac_cv_sizeof_short=2}
+ac_cv_sizeof_short_int=${ac_cv_sizeof_short_int=2}
+ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=4}
+ac_cv_sizeof_ssize_t=${ac_cv_sizeof_size_t=4}
+ac_cv_sizeof_void_p=${ac_cv_sizeof_void_p=4}
+ac_cv_sizeof_float=${ac_cv_sizeof_float=4}
+ac_cv_sizeof_double=${ac_cv_sizeof_double=8}
+ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=8}
+ac_cv_sizeof_unsigned=${ac_cv_sizeof_unsigned=4}
+ac_cv_sizeof_unsigned_char=${ac_cv_sizeof_unsigned_char=1}
+ac_cv_sizeof_unsigned_short=${ac_cv_sizeof_unsigned_short=2}
+ac_cv_sizeof_unsigned_int=${ac_cv_sizeof_unsigned_int=4}
+ac_cv_sizeof_unsigned_long=${ac_cv_sizeof_unsigned_long=4}
+ac_cv_sizeof_unsigned_long_long=${ac_cv_sizeof_unsigned_long_long=8}
+ac_cv_sizeof_signed_char=${ac_cv_sizeof_signed_char=1}
+ac_cv_uchar=${ac_cv_uchar=no}
+ac_cv_uint=${ac_cv_uint=yes}
+ac_cv_ulong=${ac_cv_ulong=yes}
+ac_cv_ushort=${ac_cv_ushort=yes}
+
+# glib
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_has__inline=${glib_cv_has__inline=yes}
+glib_cv_has__inline__=${glib_cv_has__inline__=yes}
+glib_cv_hasinline=${glib_cv_hasinline=yes}
+glib_cv_sane_realloc=${glib_cv_sane_realloc=yes}
+glib_cv_uscore=${glib_cv_uscore=no}
+glib_cv_va_copy=${glib_cv_va_copy=yes}
+glib_cv_va_val_copy=${glib_cv_va_val_copy=yes}
+glib_cv___va_copy=${glib_cv___va_copy=yes}
+
+# glib-2.0
+glib_cv_long_long_format=${glib_cv_long_long_format=ll}
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=4
+glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+glib_cv_sizeof_intmax_t=${glib_cv_sizeof_intmax_t=8}
+glib_cv_sizeof_ptrdiff_t=${glib_cv_sizeof_ptrdiff_t=4}
+glib_cv_sizeof_size_t=${glib_cv_sizeof_size_t=4}
+glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
+glib_cv_sys_use_pid_niceness_surrogate=${glib_cv_sys_use_pid_niceness_surrogate=yes}
+
+# startup-notification
+lf_cv_sane_realloc=yes
+
diff --git a/import-layers/yocto-poky/meta/site/nios2-linux b/import-layers/yocto-poky/meta/site/nios2-linux
index 5bae748..67a3fc8 100644
--- a/import-layers/yocto-poky/meta/site/nios2-linux
+++ b/import-layers/yocto-poky/meta/site/nios2-linux
@@ -232,7 +232,6 @@
ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
ac_cv_sizeof_wchar_t=${ac_cv_sizeof_wchar_t=1}
ac_cv_sizeof_unsigned_char=${ac_cv_sizeof_unsigned_char=1}
-ac_cv_sizeof_bool=${ac_cv_sizeof_bool=1}
ac_cv_sizeof_char_p=${ac_cv_sizeof_int_p=4}
ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
ac_cv_sizeof_int_p=${ac_cv_sizeof_int_p=4}
@@ -372,7 +371,6 @@
clamav_av_func_working_snprintf_long=${clamav_av_func_working_snprintf_long=yes}
clamav_av_have_in_port_t=${clamav_av_have_in_port_t=yes}
clamav_av_have_in_addr_t=${clamav_av_have_in_addr_t=yes}
-ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
#dbus
ac_cv_have_abstract_sockets=${ac_cv_have_abstract_sockets=yes}
diff --git a/import-layers/yocto-poky/meta/site/powerpc32-linux b/import-layers/yocto-poky/meta/site/powerpc32-linux
index 06d961f..f37e915 100644
--- a/import-layers/yocto-poky/meta/site/powerpc32-linux
+++ b/import-layers/yocto-poky/meta/site/powerpc32-linux
@@ -1,6 +1,5 @@
ac_cv_func_setvbuf_reversed=no
ac_cv_sizeof___int64=${ac_cv_sizeof___int64=0}
-ac_cv_sizeof_bool=${ac_cv_sizeof_bool=1}
ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p=4}
ac_cv_sizeof_double=${ac_cv_sizeof_double=8}
diff --git a/import-layers/yocto-poky/meta/site/riscv32-linux b/import-layers/yocto-poky/meta/site/riscv32-linux
new file mode 100644
index 0000000..97de628
--- /dev/null
+++ b/import-layers/yocto-poky/meta/site/riscv32-linux
@@ -0,0 +1,11 @@
+# general
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=4
+
+# glib-2.0
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_uscore=${glib_cv_uscore=no}
+
+# startup-notification
+lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
diff --git a/import-layers/yocto-poky/meta/site/riscv64-linux b/import-layers/yocto-poky/meta/site/riscv64-linux
new file mode 100644
index 0000000..38bc5f0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/site/riscv64-linux
@@ -0,0 +1,11 @@
+# general
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=8
+
+# glib-2.0
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_uscore=${glib_cv_uscore=no}
+
+# startup-notification
+lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
diff --git a/import-layers/yocto-poky/meta/site/sh-common b/import-layers/yocto-poky/meta/site/sh-common
index fc4d6ad..97c9693 100644
--- a/import-layers/yocto-poky/meta/site/sh-common
+++ b/import-layers/yocto-poky/meta/site/sh-common
@@ -227,7 +227,6 @@
clamav_av_func_working_snprintf_long=${clamav_av_func_working_snprintf_long=yes}
clamav_av_have_in_port_t=${clamav_av_have_in_port_t=yes}
clamav_av_have_in_addr_t=${clamav_av_have_in_addr_t=yes}
-ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
# libnet
ac_cv_lbl_unaligned_fail=${ac_cv_lbl_unaligned_fail=no}