Commit Graph

4041 Commits

Author SHA1 Message Date
Juro Bystricky cb8f468991 gcc-6.3.inc: Use ucontext_t not struct ucontext.
Use ucontext_t not struct ucontext in linux-unwind.h files.

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.

Backport of patches by Joseph Myers, taken from
https://gcc.gnu.org/viewcvs/gcc?limit_changes=0&view=revision&revision=249957

[YOCTO #12083]

(From OE-Core rev: ec1c18d866c137b1fa523d0fcc29f65a28f59f44)

(From OE-Core rev: 5c4c077a9182561a95f071d9c0d4a7a7f06fca98)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-21 16:55:58 +01:00
Yi Zhao 02b1cc0aef e2fsprogs: fix ptest script
* Fix hardcoded path for ptest script which would cause failure on
  mulitilib:
  ls: cannot access '/usr/lib/e2fsprogs/ptest/test/[a-zA-Z]_*': No such file or directory
  ./test_script: line 54: /usr/lib/e2fsprogs/ptest/test/test_post: No such file or directory

* Add missing '$' for shell variable reference

(From OE-Core rev: 82d244a9225bd1fa512e696aae917febe051fcf9)

(From OE-Core rev: d2fc87e074ed41d265667383827c36ceb0302693)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 22:15:58 +01:00
Joe Slater c63480c960 ruby: fix CVE-2017-922{6-9}
CVE-2017-9226 : check too big code point value for single byte
CVE-2017-9227 : access to invalid address by reg->dmin value
CVE-2017-9228 : invalid state(CCS_VALUE) in parse_char_class()
CVE-2017-9229 : access to invalid address by reg->dmax value

(From OE-Core rev: f15f01edbaa431829a50053d07ed6d6b333584c7)

(From OE-Core rev: 4077e088b6e750c4143a59c5d89258ab682ed96b)

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 22:15:58 +01:00
Joe Slater 62e244d713 ruby: fix CVE-2017-9224
Use DATA_ENSURE(1) before access.

(From OE-Core rev: 9db907a0bd331c47c4882b82f9f1d2a7ef1f6d1f)

(From OE-Core rev: 7ba25f0d8d95ece5f5d56ace5b1e9c8c797efbc0)

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Fixed up to get to apply

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 22:15:58 +01:00
Richard Purdie b8eb4b65cd python-numpy: Fix issues with recent glibc versions
Fix issues building on recent glibc versions (for python*-numpy-native).

(From OE-Core rev: 08a46b2477c1ea0e76695b51b59dc1bb46b1b521)

(From OE-Core rev: d17b2f44f69a160c227cbd808a2cf62c994ed92e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-06 17:07:39 +01:00
Richard Purdie 364f6b5fac qemu: Backport a patch for recent glibc versions
This fixes compile failures of qemu-native with new versions of glibc. Patch
is taken from upstream.

(From OE-Core rev: 9c54510632d22c12850962572ce7276170ce5488)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-06 17:07:39 +01:00
Richard Purdie ffb1aa67a4 python3-native: Avoid use of getentropy/getrandom
getentropy/random() 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 codepaths until we can come up with a better solution for this kind of
issue.

(From OE-Core rev: 92bda0024d85ae78345665cc2f9646c9881ed61b)

(From OE-Core rev: ee006aac0a52709cf5524aeb17a92b8c5c44be34)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-06 17:01:12 +01:00
Mark Hatle 09471f0593 rpm: Disable perl dependency generation
When rpmdeps files a perl script, it attempts to determine what it provides
and what it requires.  Often the requires are incorrect, within the context
of Wind River Linux.  This results in an error that DNF is unable to install
a package due to one or more unresolved dependencies.

In RPM5 we had disabled this behavior, the alternative is to require that all
perl scripts be 'complete', in that they only require things they absolutely
need and that OE provides.  If we ever enforce that, this commit can be
reverted.  Until they fall back to prior behavior (which also matches ipkg
and deb style packages.)

(From OE-Core rev: bd8e5dc3ebabb3d88169e2f848219ca201fa5fdb)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 17:57:12 +01:00
Peter Kjellerstedt abc1771306 git: Do not install git cvsserver and git svn by default
These git commands require Perl modules that do not exist in OE-Core.
Add PACKAGECONFIGs to enable them. Be aware though that if you enable
them you must also provide the missing dependencies.

(From OE-Core rev: a803938407ee5a55fb40a6940bb6680ba21909b0)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 17:57:12 +01:00
Peter Kjellerstedt 6f5b49ba22 rpm: Add dependencies on bash, perl and python3-core
Also modify a Python script (pythondistdeps.py) to use Python 3.

(From OE-Core rev: 18116c1490e6ef09ad5046db7f90dbcbe4caf595)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 17:57:12 +01:00
Peter Kjellerstedt 58884341dc perl: Do not generate file dependencies for perl-ptest
The perl-ptest package contains Perl internal modules and generating
file dependencies for it causes problems.

(From OE-Core rev: a36cf8e53122c32ef8a91759cd49d294483c6bde)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 17:57:12 +01:00
Peter Kjellerstedt abbd0abe1a rpm: 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.

(From OE-Core rev: 7a4794534bb2e67c61262361f907eced18ec69cc)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 17:57:12 +01:00
Peter Kjellerstedt 6c9ad26db0 rpm: 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.

(From OE-Core rev: c128e19d25f2015ce1bed13b423ac0d6e619ef5e)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 17:57:12 +01:00
Peter Kjellerstedt ada48bbe8c rpm: 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
is still an ELF binary and should be identified as such.

(From OE-Core rev: 8d9cca4956ba1d8438e185af8baa2b64809d7c86)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 17:57:12 +01:00
Peter Kjellerstedt 269bea560c rpm: Create a wrapper for the native rpmdeps tool
Rather than trying to call rpmdeps with the correct arguments to work
with the sysroot as was done in package.bbclass, create a wrapper for
it like all the other native tools already had.

(From OE-Core rev: 8279881fb0a65b238c6d484a45a71b6c4dd433e2)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 17:57:12 +01:00
Peter Kjellerstedt e6aa58d0b0 rpm: Simplify the creation of wrappers for the native tools
Use a loop rather than calling create_wrapper for each individual
tool.

(From OE-Core rev: d052c534c5099b9927ec84b23e01341f0aa3ce7d)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 17:57:12 +01:00
Ross Burton 2ded079276 chrpath: use https for SRC_URI
Alioth always redirects, so we might as well save time by looking in the right
place.

(From OE-Core rev: 906ba241b76c79b2298c48bb915b2ef1bd820491)

Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit e681e25fb8fb97a8592df69180d2fd85d136352c)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-29 11:57:29 +01:00
Andre McCurdy 6da2983692 gnu-config: update SRC_URI to new savannah.gnu.org hostname
http://sv.gnu.org/ now redirects to http://savannah.gnu.org/

(From OE-Core rev: e5aa3325949e2db9ba22ed06d2b7709cd3415d69)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit cf21f45fc7fa7a70df48e9eb6bdf38d0aa902f9b)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-29 11:57:29 +01:00
Ross Burton 24b0fa7324 elfutils: use HTTP instead of FTP to fetch
FTP is inferiour to HTTP is all respects, so use the HTTP URL for the tarball.

(From OE-Core rev: c190e5a884d85cb8d8783e78ad1a0489e56fac58)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6a9e38be6e9dcbeff033944f9a3a18e3838af10d)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-29 11:57:28 +01:00
Mikko Rapeli 5b56c220e6 python.inc: set CVE_PRODUCT to python
All python versions are just python in NVD like this CVE
for python 3.4.4:

https://nvd.nist.gov/vuln/detail/CVE-2016-5699

(From OE-Core rev: b5a5a8368629f8176d8a340e3f8b1cc6734460e5)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 848e1be494e8ea10c729f95f02acb366e1843d75)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-29 11:57:28 +01:00
Mikko Rapeli fe3f704f10 gcc-common.inc: set CVE_PRODUCT to gcc
All recipes which include this are using gcc as product name in NVD like

https://nvd.nist.gov/vuln/detail/CVE-2015-5276

(From OE-Core rev: 8e1b34aab4bd390f53945789c91a69883613d778)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit bd6f1430334412588c143d8029be39fe814672cd)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-29 11:57:27 +01:00
Peter Kjellerstedt 0e80156a99 git: Add a dependency on perl for gitweb
(From OE-Core rev: db31c837b579dc64bc86553cbc95736bfca97a90)

(From OE-Core rev: 76045a1d96380e3e0a339442f3e19501c4aae5bd)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:44 +01:00
Martin Kelly 5686f4e1fe tcf-agent: kill with USR2 in systemd stop
tcf-agent ignores SIGTERM, so upstream uses USR2 instead. This issue was noticed
by Jan Kiszka and Brian Avery around the same time:

https://patchwork.openembedded.org/patch/139546/
https://patchwork.openembedded.org/patch/139560/

However, these patches fixed only the init scripts, not the systemd service
file. This patch fixes the systemd file.

(From OE-Core rev: 4f8ed1b3bf676a58055ebe01184b3594459a4118)

(From OE-Core rev: a8d25315baf3226e2213e1cfba1d7023ec02a401)

Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-20 11:00:23 +01:00
Jan Kiszka 4ba7143744 tcf-agent: Fix daemon termination
The upstream init script uses SIGUSR2 to terminate that daemon because
SIGTERM is ignored. As the killproc function does not support specifying
a signal, switch to start-stop-daemon. Drop the retry loop because
SIGUSR2 is lethal for agent.

(From OE-Core rev: b27d804dd0cbce3e4ed43e7fdfcc4e12c141e78d)

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-20 11:00:23 +01:00
Saul Wold 5bb92a3166 mkelfimage: Fix broken patch when building native
A change occured about a year ago that broke the native build, fix
that patch

[YOCTO #11590]

(From OE-Core rev: ccd8e2cf7157c941ebacc6be306c1dbe2ec31e86)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-14 11:57:47 +01:00
Marek Vasut 4ba0cc04af automake: Backport perl 5.22 fix
Backport 13f00eb4493c "automake: port to Perl 5.22 and later"
from automake upstream to fix build with perl 5.22 .

(From OE-Core rev: ab0e298ec2c155739565f1cde76639855ba7bba0)

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-14 11:56:49 +01:00
Yuanjie Huang fa7a1f2115 binutils: fix CVE-2017-7210
CVE: CVE-2017-7210

[BZ 21157] -- https://sourceware.org/bugzilla/show_bug.cgi?id=21157

PR binutils/21157: Fix handling of corrupt STABS enum type strings.

(From OE-Core rev: d12a99cba6c9dc9e1f6bc3a7ca8057f07e9cb950)

(From OE-Core rev: 4ca4e781f1c62696f896d7027081f759798794aa)

Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-05 23:30:22 +01:00
Yuanjie Huang e28778ee72 binutils: fix CVE-2017-7209 in readelf
CVE: CVE-2017-7209

[BZ 21135] -- https://sourceware.org/bugzilla/show_bug.cgi?id=21135

PR binutils/21135: Fix invalid read of section contents whilst processing
a corrupt binary.

(From OE-Core rev: 2df642ca0a1e4a4e6616729018cf32d2108cabb2)

(From OE-Core rev: b262000162cb4e18421dd85bf5216c9fa3bdbf15)

Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-05 23:30:22 +01:00
Yuanjie Huang 829e2027b6 binutils: fix CVE-2017-6969 in readelf
CVE: CVE-2017-6969
[BZ 21156] -- https://sourceware.org/bugzilla/show_bug.cgi?id=21156

PR binutils/21156: Fix illegal memory accesses in readelf when
ing a corrupt binary.
PR binutils/21156: Fix another memory access error in readelf when
parsing a corrupt binary.

(From OE-Core rev: de04c9811f7ce5179ba261bd8eae921d7873d6cd)

(From OE-Core rev: ae0e01474623969dc193687d59fb5a65ab4d42bc)

Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-05 23:30:21 +01:00
Fan Xin 13f7fc4655 binutils: Fix CVE-2017-8392
Backport upsream commit to fix CVE-2017-8392

CVE: CVE-2017-8392

[BZ 21409] -- https://sourceware.org/bugzilla/show_bug.cgi?id=21409

        PR 21409, segfault in _bfd_dwarf2_find_nearest_line

        PR 21409
        * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
        no symbols.

(From OE-Core rev: dff01b827c87ae135a1d5511b1efbdad01c0eaee)

(From OE-Core rev: c5a5017ce710108c61dba0e0af72bb72a9419701)

Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-05 23:30:21 +01:00
Chen Qi bc45d3a86b cve-check-tool: backport a patch to make CVE checking work
CVE checking in OE didn't work as do_populate_cve_db failed with the following
error message.

  [snip]/downloads/CVE_CHECK/nvdcve-2.0-2002.xml is not consistent

Backport a patch to fix this error.

(From OE-Core rev: ee55b5685aaa4be92d6d51f8641a559d4e34ce64)

(From OE-Core rev: e0f0a7283c597e783b69aac2c8e8a7663b70262d)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-05 23:30:21 +01:00
Richard Purdie d31bee70dd python.inc: Fix python2/3 hosttools path references
Both native and target versions of this file reference mkdir and install
in hosttools paths. Use the version from PATH instead.

(From OE-Core rev: 080197bf3bdf612da8104c2ae7f0b2c8dea32a0b)

(From OE-Core rev: 8e3134953edfc88bf3d135b5dc00d361f84b5f37)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-18 13:17:43 +01:00
Richard Purdie 901d3880bf rpm: Ensure macros file doesn't reference HOSTTOOLS
Currently the file encodes full paths to various host tools in the
HOSTTOOLS directory which is bad in native and target cases. We can
simply use the versions from PATH quite safely in OE.

(From OE-Core rev: be901200d94beaa35e1d05eb502b117b3b523609)

(From OE-Core rev: 2a12c159aae9877a05e0ba023de278cdca59ac45)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-18 13:17:43 +01:00
Peter Kjellerstedt 439bb8cc71 bitbake.conf: Add COMPONENTS_DIR for ${STAGING_DIR}-components
The path to where to install and find the sysroot components is used
in many places. This warrants it to get its own variable.

(From OE-Core rev: 70a84b525470f72339568409daf84845904e4cab)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-11 16:55:59 +01:00
Alexander Kanavin 9cb2695786 python3-iniparse: fix upstream version check
(From OE-Core rev: 21e9e3642d1dbd3d868a4472716f633bd5626b08)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-29 11:17:23 +01:00
Alexander Kanavin 475786d0f3 rpm: properly relocate additional native tools
These tools are not currently used for anything, but we should
still provide working versions of them.

[YOCTO #11400]

(From OE-Core rev: da11fbde6f8164e2774068b99bab84e4b6084713)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-29 11:17:23 +01:00
Richard Purdie c5269fd210 pseudo: Backport two upstream fixes
Backport fixes from pseudo master for an acl issue and more importantly, a segfault
issue with bash which can be triggered by the recent useradd changes.

(From OE-Core rev: 949214761998a93fc6b8b009f1cdad0db3bfa5db)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-14 23:25:54 +01:00
Ross Burton 135afdff02 Revert "dnf: remove systemd units in nativesdk builds"
nativesdk builds now control the DISTRO_FEATURES (oe-core 731744) so this
workaround is no longer required.

This reverts commit 415b72ffcb.

(From OE-Core rev: 4f1f05295f12f619c87fb53e16e19a11775c2c84)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-14 09:47:08 +01:00
Robert Yang 7b4a8a2fb8 apt: fix libdir path for apt.systemd.daily
It should be ${libdir} rather than /usr/lib, otherwise it would fail
when multilib:

MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

$ bitbake apt
[snip]
install: target /path/to/apt/1.2.12-r0/image/usr/lib/apt is not a directory: No such file or directory
[snip]

(From OE-Core rev: bf867019c33c34dc997e10a3bdba4aeee81f559a)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-14 09:47:08 +01:00
Richard Purdie b5c383074a base-passwd/useradd: Various improvements to useradd with RSS
Currently there are multiple issues with useradd:

* If base-passwd rebuilds, it wipes out recipe specific user/group additions
  to sysroots and causes errors
* If recipe A adds a user and recipe B depends on A, it can't see any of the
  users/groups A adds.

This patch changes base-passwd so it always works as a postinst script
within the sysroot and copies in the master files, then runs any
postinst-useradd-* scripts afterwards to add additional user/groups.

The postinst-useradd-* scripts are tweaked so that if /etc/passwd doesn't exist
they just exit, knowning they'll be executed later. We also add a dummy entry to
the dummy passwd file from pseudo so we can avoid this too.

There is a problem where if recipe A adds a user and recipe B depends on A but
doesn't care about users, it may not have a dependency on the useradd/groupadd
tools which would therefore not be available in B's sysroot. We therefore also
tweak postinst-useradd-* scripts so that if the tools aren't present we simply
don't add users. If you need the users, you add a dependency on the tools in the
recipe and they'll be added.

We add postinst-* to SSTATE_SCAN_FILES since almost any postinst script of this
kind is going to need relocation help.

We also ensure that the postinst-useradd script is written into the sstate
object as the current script was only being added in a recipe local way.

Thanks to Peter Kjellerstedt <pkj@axis.com> and Patrick Ohly for some pieces
of this patch.

[Yocto #11124]

(From OE-Core rev: 1b5afaf437f7a1107d4edca8eeb668b9618a5488)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-14 09:47:08 +01:00
brian avery 0637c5ab25 qemu-helper-native: prepare native sysroot for runqemu
Make sure that native sysroot contains qemu and tunctl binaries for
runqemu usage:
  - excluded native sysroot from rm_work
  - added qemu-native to DEPENDS to put qemu binaries into native sysroot
  - forced addto_recipe_sysroot task

[YOCTO #11266]
[YOCTO #11193]

(From OE-Core rev: 2e7a155774952705d21109720985f6833fba2669)

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-13 10:54:10 +01:00
Patrick Ohly 3e903cb42f recipes/*-cross recipes: ignore TARGET_ARCH sstate hash
"yocto-compat-layer.py --machines" showed that shared packages like
gcc-cross-powerpc64 have a sstate signature that depends on
TUNEFLAGS. As a result, there are unnecessary rebuilds and potential
conflicts in a multiconfig.

That's due to the way how TARGET_ARCH is set. Richard Purdie suggested
setting TARGET_ARCH[vardepvalue] as fix, which works. It would be
shorter to do that in cross.bbclass instead of repeating the relevant
line in different recipes, but Richard was concerned about potential
side-effects in other usages of cross.bbclass.

TARGET_GOARM as used in go.inc is still causing signature differences
for go-cross-powerpc64 and machines b4420qds-64b and p5020ds-64b. This
needs further investigation.

(From OE-Core rev: 39bfa0dd3237cbca47e7fca1075d521f9d073f25)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12 15:09:58 +01:00
Patrick Ohly fc43f10a51 gdb-cross: avoid tune specific paths
gdb-cross used to be specific to the tune flags, but isn't
anymore. Therefore it is enough to use TARGET_SYS instead of
TUNE_PKGARCH to create a unique path.

Fixes a sstate signature difference that was found via
yocto-compat-layer.py's test_machine_signatures check. In practice it
probably showed up as unnecessarily rebuilding gdb-cross when
switching between machines like intel-corei7-64 and qemux86-64.

(From OE-Core rev: f346473a4868563db7fb63665e808c3fe25a8b58)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12 15:09:58 +01:00
Patrick Ohly 30686e2fd6 go-cross: avoid libgcc dependency
libgcc gets compiled differently depending on the tune flags for the
target. That dependency would make go-cross also tune specific and
prevent sharing it between different machines using the same
architecture.

For example, MACHINE=intel-corei7-64 and MACHINE=qemux86-64 shared the
same go-cross-x86_64, but compiled libgcc differently.

The libgcc dependency gets inherited from go.inc, but does not seem to
be necessary for go-cross (compiling go-helloworld still succeeds).
The dependency is left in go.inc conditionally, just in case that it
really is relevant for the various on-target recipes which inherit
that.

Because go-cross*.bb includes go*.bb, moving the DEPENDS into a .inc
file that only gets included for the target recipes doesn't
work. Reshuffling the content of three .bb files seems too intrusive
at this point.

(From OE-Core rev: 58149a7be4172074349951aaf5af95fa40fd4bdb)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12 15:09:58 +01:00
Yuanjie Huang ca22ef73d0 binutils: Fix CVE-2017-6965 and CVE-2017-6966
Backport upstream commit to address vulnerabilities:

CVE: CVE-2017-6965
[BZ 21137] -- https://sourceware.org/bugzilla/show_bug.cgi?id=21137

Fix readelf writing to illegal addresses whilst processing corrupt input
files containing symbol-difference relocations.

	PR binutils/21137
	* readelf.c (target_specific_reloc_handling): Add end parameter.
	Check for buffer overflow before writing relocated values.
	(apply_relocations): Pass end to target_specific_reloc_handling.

CVE: CVE-2017-6966
[BZ 21139] -- https://sourceware.org/bugzilla/show_bug.cgi?id=21139

Fix read-after-free error in readelf when processing multiple, relocated
sections in an MSP430 binary.

	PR binutils/21139
	* readelf.c (target_specific_reloc_handling): Add num_syms
	parameter.  Check for symbol table overflow before accessing
	symbol value.  If reloc pointer is NULL, discard all saved state.
	(apply_relocations): Pass num_syms to target_specific_reloc_handling.
	Call target_specific_reloc_handling with a NULL reloc pointer
	after processing all of the relocs.

(From OE-Core rev: 8c52a530ba2beb438aa47956bcec3777a1eafe5f)

Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:18 +01:00
Li Zhou a2d5c0b602 python2/3: Move config/Makefile from core package to dev package
Move config/Makefile in libdir from core package to dev package for
python, because it is only needed in development process.

(From OE-Core rev: 8b55d055f046677c18eeaefe3ca18869eedeb14d)

Signed-off-by: Li Zhou <li.zhou@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:18 +01:00
Andre McCurdy 31a293d0dc mtd-utils: refresh patches now merged upstream
Update Upstream-Status tags and apply 010-fix-rpmatch.patch
unconditionally, since it's merged unconditionally upstream.

(From OE-Core rev: 87dcaf2094baf9a7b7993c2ff1f60db73f4248f4)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:18 +01:00
Dmitry Rozhkov 0e138bf56d python-pycurl: create python3-pycurl recipe
The python-pycurl recipe can be used with python2 only even
though python3 is officially supported by upstream.

Create python3-pycurl recipe enabling the pycurl module for
python3.

(From OE-Core rev: 6cb9c0a4e75c647b38c81d2d7217b54b2fdfd972)

Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:44 +01:00
Martin Kelly e340af0449 qemu: use python2.7 instead of python2
meta/conf/bitbake.conf puts python2.7 into the HOSTTOOLS variable but not
python2, so only python2.7 is guaranteed. In addition, on some distros -- such
as Amazon Linux -- /usr/bin/python2 doesn't exist but python2.7 does. So, use
python2.7 for the --python= argument in the qemu configure step.

(From OE-Core rev: 88dc8b532817f4779b35422a413d5c700c130a74)

Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:43 +01:00
Joshua Lock f70179e280 gcc-6.3: backport fix of check for empty string in ubsan.c
Building gcc-cross-initial with GCC7 on the host fails due to the
comparison of a pointer to an integer in ubsan_use_new_style_p, which
is forbidden by ISO C++:

ubsan.c:1474:23: error: ISO C++ forbids comparison between pointer and
integer [-fpermissive]
       || xloc.file == '\0' || xloc.file[0] == '\xff'

Backport the fix from upstream GCC to enable the build with GCC 7

(From OE-Core rev: 7a7fcbab0365b9501c737dbc02715be14dda72a3)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:43 +01:00