]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
6 years agobusybox: handle syslog
Yadi.hu [Thu, 2 Jun 2016 00:54:17 +0000 (17:54 -0700)]
busybox: handle syslog

If CONFIG_KLOGD is not enabled, then the related service file should
not be installed, The error message is below:

    Cannot add dependency job for unit busybox-klogd.service,
    ignoring: Unit busybox-klogd.service failed to load:
    No such file or directory.

So we should first check the configuration before we install these
service files.

(From OE-Core rev: c3cc402df996654bf6f838b1e79e16a8bdd6d4d7)

Signed-off-by: Yadi.hu <yadi.hu@windriver.com>
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoblktrace: Security fix CVE-2018-10689
Yi Zhao [Fri, 24 Aug 2018 07:21:27 +0000 (15:21 +0800)]
blktrace: Security fix CVE-2018-10689

CVE-2018-10689: blktrace (aka Block IO Tracing) 1.2.0, as used with the
Linux kernel and Android, has a buffer overflow in the dev_map_read
function in btt/devmap.c because the device and devno arrays are too
small, as demonstrated by an invalid free when using the btt program
with a crafted file.

References:
https://nvd.nist.gov/vuln/detail/CVE-2018-10689

Patch from:
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/blktrace.git/commit/?id=d61ff409cb4dda31386373d706ea0cfb1aaac5b7

(From OE-Core rev: 6a7ed8b1db10abd38bdd20c77a8f27427d381156)

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>
6 years agoutil-linux: upgrade 2.32 -> 2.32.1
Chen Qi [Thu, 23 Aug 2018 08:11:46 +0000 (16:11 +0800)]
util-linux: upgrade 2.32 -> 2.32.1

(From OE-Core rev: 711f867b1d036aba04e839e955e0fa9d81d3c794)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
[Bug fix update]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoswig: Remove superfluous python dependency
Joshua Watt [Thu, 23 Aug 2018 21:24:37 +0000 (16:24 -0500)]
swig: Remove superfluous python dependency

The actual dependency on native Python and is handled by inheriting
python3native

(From OE-Core rev: 115a6dea664c9b18fd19b79659029afb52b1a660)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agopatch: fix CVE-2018-6952
Hongxu Jia [Wed, 22 Aug 2018 12:10:40 +0000 (20:10 +0800)]
patch: fix CVE-2018-6952

(From OE-Core rev: 1314a6953aa647706107557faaba8574e307d2bd)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoperl: CVE-2018-12015
Jagadeesh Krishnanjanappa [Wed, 22 Aug 2018 11:41:52 +0000 (17:11 +0530)]
perl: CVE-2018-12015

Remove existing files before overwriting them

Archive should extract only the latest same-named entry.
Extracted regular file should not be writtent into existing block
device (or any other one).

https://rt.cpan.org/Ticket/Display.html?id=125523

Affects perl <= 5.26.2

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoperl: CVE-2018-6913
Jagadeesh Krishnanjanappa [Wed, 22 Aug 2018 11:41:50 +0000 (17:11 +0530)]
perl: CVE-2018-6913

(perl #131844) fix various space calculation issues in
 pp_pack.c

- for the originally reported case, if the start/cur pointer is in the
  top 75% of the address space the add (cur) + glen addition would
  overflow, resulting in the condition failing incorrectly.

- the addition of the existing space used to the space needed could
  overflow, resulting in too small an allocation and a buffer overflow.

- the scaling for UTF8 could overflow.

- the multiply to calculate the space needed for many items could
  overflow.

For the first case, do a space calculation without making new pointers.

For the other cases, detect the overflow and croak if there's an
overflow.

Originally this used Size_t_MAX as the maximum size of a memory
allocation, but for -DDEBUGGING builds realloc() throws a panic for
allocations over half the address space in size, changing the error
reported for the allocation.

For non-DEBUGGING builds the Size_t_MAX limit has the small chance
of finding a system that has 3GB of contiguous space available, and
allocating that space, which could be a denial of servce in some cases.

Unfortunately changing the limit to half the address space means that
the exact case with the original issue can no longer occur, so the
test is no longer testing against the address + length issue that
caused the original problem, since the allocation is failing earlier.

One option would be to change the test so the size request by pack is
just under 2GB, but this has a higher (but still low) probability that
the system has the address space available, and will actually try to
allocate the memory, so let's not do that.

Note: changed
plan tests => 14713;
to
plan tests => 14712;
in a/t/op/pack.t
to apply this patch on perl 5.24.1.

Affects perl < 5.26.2

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoperl: CVE-2018-6797
Jagadeesh Krishnanjanappa [Wed, 22 Aug 2018 11:41:49 +0000 (17:11 +0530)]
perl: CVE-2018-6797

(perl #132227) restart a node if we change to uni rules within the node and encounter...
This could lead to a buffer overflow.

(cherry picked from commit a02c70e35d1313a5f4e245e8f863c810e991172d)

Affects perl >= 5.18 && perl <= 5.26

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoperl: CVE-2018-6798
Jagadeesh Krishnanjanappa [Wed, 22 Aug 2018 11:41:43 +0000 (17:11 +0530)]
perl: CVE-2018-6798

* CVE-2018-6798-1
 The proximal cause is several instances in regexec.c of the code
 assuming that the input was valid UTF-8, whereas the input was too short
 for what the start byte claimed it would be.

 I grepped through the core for any other similar uses, and did not find
 any.

 (cherry picked from commit fe7d8ba0a1bf567af8fa8fea128e2b9f4c553e84)

* CVE-2018-6798-2
 The first patch for 132063 prevented the buffer read overflow when
 dumping the warning but didn't fix the underlying problem.

 The next change treats the supplied buffer correctly, preventing the
 non-UTF-8 SV from being treated as UTF-8, preventing the warning.

 (cherry picked from commit 1e8b61488f195e1396aa801c685340b156104f4f)

Affects perl >= 5.22 && perl <= 5.26

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoqemu: CVE-2018-12617
Jagadeesh Krishnanjanappa [Wed, 22 Aug 2018 11:41:47 +0000 (17:11 +0530)]
qemu: CVE-2018-12617

qga: check bytes count read by guest-file-read

While reading file content via 'guest-file-read' command,
'qmp_guest_file_read' routine allocates buffer of count+1
bytes. It could overflow for large values of 'count'.
Add check to avoid it.

Affects qemu < v3.0.0

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoqemu: CVE-2018-7550
Jagadeesh Krishnanjanappa [Wed, 22 Aug 2018 11:41:46 +0000 (17:11 +0530)]
qemu: CVE-2018-7550

multiboot: bss_end_addr can be zero

The multiboot spec
(https://www.gnu.org/software/grub/manual/multiboot/),
section 3.1.3, allows for bss_end_addr to be zero.

A zero bss_end_addr signifies there is no .bss section.

Affects qemu < v2.12.0

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agopython: CVE-2018-1000030
Jagadeesh Krishnanjanappa [Wed, 22 Aug 2018 11:41:42 +0000 (17:11 +0530)]
python: CVE-2018-1000030

* CVE-2018-1000030-1
[2.7] bpo-31530: Stop crashes when iterating over a file on multiple threads

* CVE-2018-1000030-2
Multiple threads iterating over a file can corrupt the file's internal readahead
buffer resulting in crashes. To fix this, cache buffer state thread-locally for
the duration of a file_iternext call and only update the file's internal state
after reading completes.

No attempt is made to define or provide "reasonable" semantics for iterating
over a file on multiple threads. (Non-crashing) races are still
present. Duplicated, corrupt, and missing data will happen.

This was originally fixed by 6401e56, which
raised an exception from seek() and next() when concurrent operations were
detected. Alas, this simpler solution breaks legitimate use cases such as
capturing the standard streams when multiple threads are logging.

Affects python <= 2.7.14

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoprocps: CVE-2018-1124
Jagadeesh Krishnanjanappa [Wed, 22 Aug 2018 11:41:44 +0000 (17:11 +0530)]
procps: CVE-2018-1124

proc/readproc.c: Fix bugs and overflows in file2strvec().

Note: this is by far the most important and complex patch of the whole
series, please review it carefully; thank you very much!

For this patch, we decided to keep the original function's design and
skeleton, to avoid regressions and behavior changes, while fixing the
various bugs and overflows. And like the "Harden file2str()" patch, this
patch does not fail when about to overflow, but truncates instead: there
is information available about this process, so return it to the caller;
also, we used INT_MAX as a limit, but a lower limit could be used.

The easy changes:

- Replace sprintf() with snprintf() (and check for truncation).

- Replace "if (n == 0 && rbuf == 0)" with "if (n <= 0 && tot <= 0)" and
  do break instead of return: it simplifies the code (only one place to
  handle errors), and also guarantees that in the while loop either n or
  tot is > 0 (or both), even if n is reset to 0 when about to overflow.

- Remove the "if (n < 0)" block in the while loop: it is (and was) dead
  code, since we enter the while loop only if n >= 0.

- Rewrite the missing-null-terminator detection: in the original
  function, if the size of the file is a multiple of 2047, a null-
  terminator is appended even if the file is already null-terminated.

- Replace "if (n <= 0 && !end_of_file)" with "if (n < 0 || tot <= 0)":
  originally, it was equivalent to "if (n < 0)", but we added "tot <= 0"
  to handle the first break of the while loop, and to guarantee that in
  the rest of the function tot is > 0.

- Double-force ("belt and suspenders") the null-termination of rbuf:
  this is (and was) essential to the correctness of the function.

- Replace the final "while" loop with a "for" loop that behaves just
  like the preceding "for" loop: in the original function, this would
  lead to unexpected results (for example, if rbuf is |\0|A|\0|, this
  would return the array {"",NULL} but should return {"","A",NULL}; and
  if rbuf is |A|\0|B| (should never happen because rbuf should be null-
  terminated), this would make room for two pointers in ret, but would
  write three pointers to ret).

The hard changes:

- Prevent the integer overflow of tot in the while loop, but unlike
  file2str(), file2strvec() cannot let tot grow until it almost reaches
  INT_MAX, because it needs more space for the pointers: this is why we
  introduced ARG_LEN, which also guarantees that we can add "align" and
  a few sizeof(char*)s to tot without overflowing.

- Prevent the integer overflow of "tot + c + align": when INT_MAX is
  (almost) reached, we write the maximal safe amount of pointers to ret
  (ARG_LEN guarantees that there is always space for *ret = rbuf and the
  NULL terminator).

Affects procps-ng < 3.3.15

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoshadow: CVE-2018-7169
Jagadeesh Krishnanjanappa [Wed, 22 Aug 2018 11:41:48 +0000 (17:11 +0530)]
shadow: CVE-2018-7169

newgidmap: enforce setgroups=deny if self-mapping a group

This is necessary to match the kernel-side policy of "self-mapping in a
user namespace is fine, but you cannot drop groups" -- a policy that was
created in order to stop user namespaces from allowing trivial privilege
escalation by dropping supplementary groups that were "blacklisted" from
certain paths.

This is the simplest fix for the underlying issue, and effectively makes
it so that unless a user has a valid mapping set in /etc/subgid (which
only administrators can modify) -- and they are currently trying to use
that mapping -- then /proc/$pid/setgroups will be set to deny. This
workaround is only partial, because ideally it should be possible to set
an "allow_setgroups" or "deny_setgroups" flag in /etc/subgid to allow
administrators to further restrict newgidmap(1).

We also don't write anything in the "allow" case because "allow" is the
default, and users may have already written "deny" even if they
technically are allowed to use setgroups. And we don't write anything if
the setgroups policy is already "deny".

Ref: https://bugs.launchpad.net/ubuntu/+source/shadow/+bug/1729357
Fixes: CVE-2018-7169
Affects shadow <= 4.5

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agognupg: CVE-2018-12020
Jagadeesh Krishnanjanappa [Wed, 22 Aug 2018 11:41:45 +0000 (17:11 +0530)]
gnupg: CVE-2018-12020

gpg: Sanitize diagnostic with the original file name.

* g10/mainproc.c (proc_plaintext): Sanitize verbose output.

Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agogit: CVE-2018-11235
Jagadeesh Krishnanjanappa [Wed, 22 Aug 2018 11:41:51 +0000 (17:11 +0530)]
git: CVE-2018-11235

submodule-config: verify submodule names as paths

Submodule "names" come from the untrusted .gitmodules file,
but we blindly append them to $GIT_DIR/modules to create our
on-disk repo paths. This means you can do bad things by
putting "../" into the name (among other things).

Let's sanity-check these names to avoid building a path that
can be exploited. There are two main decisions:

  1. What should the allowed syntax be?

     It's tempting to reuse verify_path(), since submodule
     names typically come from in-repo paths. But there are
     two reasons not to:

       a. It's technically more strict than what we need, as
          we really care only about breaking out of the
          $GIT_DIR/modules/ hierarchy.  E.g., having a
          submodule named "foo/.git" isn't actually
          dangerous, and it's possible that somebody has
          manually given such a funny name.

       b. Since we'll eventually use this checking logic in
          fsck to prevent downstream repositories, it should
          be consistent across platforms. Because
          verify_path() relies on is_dir_sep(), it wouldn't
          block "foo\..\bar" on a non-Windows machine.

  2. Where should we enforce it? These days most of the
     .gitmodules reads go through submodule-config.c, so
     I've put it there in the reading step. That should
     cover all of the C code.

     We also construct the name for "git submodule add"
     inside the git-submodule.sh script. This is probably
     not a big deal for security since the name is coming
     from the user anyway, but it would be polite to remind
     them if the name they pick is invalid (and we need to
     expose the name-checker to the shell anyway for our
     test scripts).

     This patch issues a warning when reading .gitmodules
     and just ignores the related config entry completely.
     This will generally end up producing a sensible error,
     as it works the same as a .gitmodules file which is
     missing a submodule entry (so "submodule update" will
     barf, but "git clone --recurse-submodules" will print
     an error but not abort the clone.

     There is one minor oddity, which is that we print the
     warning once per malformed config key (since that's how
     the config subsystem gives us the entries). So in the
     new test, for example, the user would see three
     warnings. That's OK, since the intent is that this case
     should never come up outside of malicious repositories
     (and then it might even benefit the user to see the
     message multiple times).

Credit for finding this vulnerability and the proof of
concept from which the test script was adapted goes to
Etienne Stalmans.

Affects: git < 2.13.7 and  git < 2.14.4 and git < 2.15.2 and git < 2.16.4 and
         git < 2.17.1

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agolibgcrypt: CVE-2018-0495
Jagadeesh Krishnanjanappa [Wed, 22 Aug 2018 11:41:53 +0000 (17:11 +0530)]
libgcrypt: CVE-2018-0495

ecc: Add blinding for ECDSA.

* cipher/ecc-ecdsa.c (_gcry_ecc_ecdsa_sign): Blind secret D with
randomized nonce B.

Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agocoreutils: CVE-2017-18018
Jagadeesh Krishnanjanappa [Wed, 22 Aug 2018 11:41:41 +0000 (17:11 +0530)]
coreutils: CVE-2017-18018

CVE-2017-18018-1:
doc: clarify chown/chgrp --dereference defaults
* doc/coreutils.texi: the documentation for the --dereference
  flag of chown/chgrp states that it is the default mode of
  operation. Document that this is only the case when operating
  non-recursively.

CVE-2017-18018-2:
doc: warn about following symlinks recursively in chown/chgrp
In both chown and chgrp (which shares its code with chown), operating
on symlinks recursively has a window of vulnerability where the
destination user or group can change the target of the operation.
Warn about combining the --dereference, --recursive, and -L flags.

* doc/coreutils.texi (warnOptDerefWithRec): Add macro.
(node chown invocation): Add it to --dereference and -L.
(node chgrp invocation): Likewise.

Affects coreutils <= 8.29

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agolibsndfile1: CVE-2017-14634
Jagadeesh Krishnanjanappa [Wed, 22 Aug 2018 13:19:58 +0000 (18:49 +0530)]
libsndfile1: CVE-2017-14634

double64_init: Check psf->sf.channels against upper bound

This prevents division by zero later in the code.

While the trivial case to catch this (i.e. sf.channels < 1) has already
been covered, a crafted file may report a number of channels that is
so high (i.e. > INT_MAX/sizeof(double)) that it "somehow" gets
miscalculated to zero (if this makes sense) in the determination of the
blockwidth. Since we only support a limited number of channels anyway,
make sure to check here as well.

CVE-2017-14634

Closes: #318
Affects libsndfile1 = 1.0.28

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agolibsndfile1: CVE-2017-14245 CVE-2017-14246
Jagadeesh Krishnanjanappa [Wed, 22 Aug 2018 13:19:51 +0000 (18:49 +0530)]
libsndfile1: CVE-2017-14245 CVE-2017-14246

sfe_copy_data_fp: check value of "max" variable for being normal
and check elements of the data[] array for being finite.

Both checks use functions provided by the <math.h> header as declared
by the C99 standard.

Fixes #317
CVE-2017-14245
CVE-2017-14246

Affects libsndfile1 = 1.0.28

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agolibarchive: CVE-2017-14503
Jagadeesh Krishnanjanappa [Wed, 22 Aug 2018 13:19:59 +0000 (18:49 +0530)]
libarchive: CVE-2017-14503

Reject LHA archive entries with negative size.

Affects libarchive = 3.3.2

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoflac: CVE-2017-6888
Jagadeesh Krishnanjanappa [Wed, 22 Aug 2018 13:20:05 +0000 (18:50 +0530)]
flac: CVE-2017-6888

stream_decoder.c: Fix a memory leak

Leak reported by Secunia Research.

Affects flac = 1.3.2

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agonasm: fix CVE-2018-8883 & CVE-2018-8882 & CVE-2018-10316
Hongxu Jia [Tue, 21 Aug 2018 06:30:27 +0000 (14:30 +0800)]
nasm: fix CVE-2018-8883 & CVE-2018-8882 & CVE-2018-10316

(From OE-Core rev: 10a52e436d2f9a40c04271bc8aeb04c75fb11383)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agounzip: fix CVE-2018-1000035
Changqing Li [Fri, 17 Aug 2018 02:02:13 +0000 (10:02 +0800)]
unzip: fix CVE-2018-1000035

(From OE-Core rev: f75289b9215580030540245cd0b5f945bfb05ffa)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agounzip: fix symlink problem
Ross Burton [Wed, 25 Jul 2018 20:55:17 +0000 (21:55 +0100)]
unzip: fix symlink problem

Large zip files can cause unzip to crash, take a patch from Fedora to fix it.

(From OE-Core rev: a001833b7c7a0a6eef88e053fe65e2a0c91ca7bc)

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>
6 years agoopenssl: update 1.1.0h -> 1.1.0i
Andrej Valek [Thu, 16 Aug 2018 12:27:57 +0000 (14:27 +0200)]
openssl: update 1.1.0h -> 1.1.0i

Please see this security advisory:
https://www.openssl.org/news/secadv/20180612.txt

Remove obsolete patch.

(From OE-Core rev: 0d19caefeeca14f44c80ccb716c30b17f14255a5)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoopenssl: update 1.0.2o -> 1.0.2p
Andrej Valek [Thu, 16 Aug 2018 12:27:56 +0000 (14:27 +0200)]
openssl: update 1.0.2o -> 1.0.2p

Please see this security advisory:
https://www.openssl.org/news/secadv/20180612.txt

Refresh patches

(From OE-Core rev: ff3db93e53c4f9d56807d3755c799459944e9a87)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoopenssl-1.1: fix c_rehash perl errors
Andrej Valek [Tue, 17 Jul 2018 09:10:33 +0000 (11:10 +0200)]
openssl-1.1: fix c_rehash perl errors

Patch original c_rehash script with Debian patch instead
of overriding it with own version.

Error output from c_reshah without patching:
  Unknown regexp modifier "/b" at ./c_rehash line 15, at end of line
  Unknown regexp modifier "/W" at ./c_rehash line 28, at end of line
  Unknown regexp modifier "/3" at ./c_rehash line 28, at end of line
  Unknown regexp modifier "/2" at ./c_rehash line 28, at end of line
  No such class installdir at ./c_rehash line 63, near "Prefix our
  installdir"
    (Might be a runaway multi-line // string starting on line 28)
  syntax error at ./c_rehash line 63, near "Prefix our installdir"
  Can't redeclare "my" in "my" at ./c_rehash line 68, near ""
  Execution of ./c_rehash aborted due to compilation errors.

(From OE-Core rev: f8a826f497073533a3e4c390255ae197d65d6ef3)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Marko Peter <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoopenssl_1.0: drop unnecessary call to perlpath.pl from do_configure()
Andre McCurdy [Wed, 8 Aug 2018 18:15:12 +0000 (11:15 -0700)]
openssl_1.0: drop unnecessary call to perlpath.pl from do_configure()

The perlpath.pl script is used to patch the #! lines in all perl
scripts in the utils directory. However, as these scripts are run via
e.g. "perl foo.pl", they don't actually rely on the #! path to be
correct (which can be confirmed by the observation that the path is
currently being set to ${STAGING_BINDIR_NATIVE}/perl, which doesn't
exist).

(From OE-Core rev: ba88fe46d47846042518a5a1017d782ba548202c)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoopenssl_1.0: drop unnecessary dependency on makedepend-native
Andre McCurdy [Tue, 31 Jul 2018 01:28:07 +0000 (18:28 -0700)]
openssl_1.0: drop unnecessary dependency on makedepend-native

The openssl Configure script will only select standalone makedepend
(vs running "$CC -M") when building with gcc < 3.x or with an Apple
Xcode version which predates the switch to clang (in approx 2010?).
Neither of these cases are possible when building under OE, therefore
the dependency on makedepend-native can be dropped (ie align the
openssl 1.0 recipe with the 1.1 recipe, which has dropped the
makedepend-native dependency already).

(From OE-Core rev: 4c5bd69e5cb203c8a4c2f3716c941661c0afc830)

Signed-off-by: Andre McCurdy <armccurdy@gmail.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>
6 years agoopenssl: fix missing dependency on hostperl-runtime-native
Andre McCurdy [Tue, 31 Jul 2018 13:57:56 +0000 (06:57 -0700)]
openssl: fix missing dependency on hostperl-runtime-native

Openssl 1.1 requires perl in order to build (just as openssl 1.0
does). The missing dependency has gone unnoticed up to now since
hostperl-runtime-native is included in ASSUME_PROVIDED.

(From OE-Core rev: ed5f8bb582453e7d8a1636ad1463380076209bd2)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoopenssl_1.0: squash whitespace in CC_INFO
Andre McCurdy [Sat, 28 Jul 2018 20:39:23 +0000 (13:39 -0700)]
openssl_1.0: squash whitespace in CC_INFO

Squash whitespace in CC_INFO to avoid recipe whitespace changes to
CFLAG affecting the final openssl binaries (the value of CC_INFO gets
embedded in libcrypto, via buildinf.h).

(From OE-Core rev: 2227c51896d4399daac9d85f40d7510b7c8ae03f)

Signed-off-by: Andre McCurdy <armccurdy@gmail.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>
6 years agoopenssl_1.0: add PACKAGECONFIG option to control manpages
Andre McCurdy [Sat, 28 Jul 2018 20:39:22 +0000 (13:39 -0700)]
openssl_1.0: add PACKAGECONFIG option to control manpages

Creating the openssl manpages, which happens as part of do_install(),
can take a significant amount of time (e.g. ~50 seconds on a quad
core laptop). Provide a PACKAGECONFIG option to allow creation of the
manpages to be skipped completely if not required and inherit the
manpages class to automatically control the PACKAGECONFIG option
(based on the "api-documentation" distro feature).

(From OE-Core rev: 1ddca1872f64c566fd812a6ec44f2d4e4d84f58f)

Signed-off-by: Andre McCurdy <armccurdy@gmail.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>
6 years agoopenssl_1.0: drop unmaintained darwin support
Andre McCurdy [Sat, 28 Jul 2018 20:39:21 +0000 (13:39 -0700)]
openssl_1.0: drop unmaintained darwin support

The fact that the darwin support only appears to consider x86 (and
not x86_64) suggests that it's not maintained or tested. In general
oe-core doesn't support building on darwin.

(From OE-Core rev: 9c7f37bb1345c38211acd137c00b9d07f92601a7)

Signed-off-by: Andre McCurdy <armccurdy@gmail.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>
6 years agoopenssl_1.0: drop obsolete exporting of AS, EX_LIBS and DIRS
Andre McCurdy [Sat, 28 Jul 2018 20:39:20 +0000 (13:39 -0700)]
openssl_1.0: drop obsolete exporting of AS, EX_LIBS and DIRS

Previously (when EXTRA_OEMAKE contained -e) exporting these variables
over-rode default values in the top-level openssl Makefile. However,
since -e was removed from EXTRA_OEMAKE as part of:

  http://git.openembedded.org/openembedded-core/commit/?id=537a404cfbb811fcb526cdb5f2e059257de6ef13

exporting these variables does nothing. The comment from that commit
that only AR is affected by removing -e wasn't correct, but the
effects of letting the openssl Makefile also control AS, EX_LIBS and
DIRS seem to be either benign or beneficial.

Since without -e make ignores DIRS from the environment and always
runs for all subdirs (including "test"), adding "test" to DIRS and
calling "make depend" again from do_compile_ptest() can be dropped.

(From OE-Core rev: b3e81e3cf86dd8736b62a6b88d6a6dbe518c9e5e)

Signed-off-by: Andre McCurdy <armccurdy@gmail.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>
6 years agoopenssl_1.0: drop obsolete ca.patch
Andre McCurdy [Sat, 28 Jul 2018 20:39:19 +0000 (13:39 -0700)]
openssl_1.0: drop obsolete ca.patch

This patch adds a second line to the -help output of the CA.pl script
(which lists almost the same command line options as the line above
it but in a slightly different order). Although it's tagged as a
Debian backport, there's no patch like it in recent Debian patch sets
for openssl 1.0.2.

(From OE-Core rev: 9b3af406747a3d565d12d948400d44fb12ab0d96)

Signed-off-by: Andre McCurdy <armccurdy@gmail.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>
6 years agoopenssl: minor indent fixes
Andre McCurdy [Tue, 24 Jul 2018 02:38:55 +0000 (19:38 -0700)]
openssl: minor indent fixes

Fix inconsistent indent (and also make the openssl 1.1 recipe more
consistent and consistent with the openssl 1.0 recipe).

(From OE-Core rev: 69844643aa1b829c27f144db634c8223c18c783f)

Signed-off-by: Andre McCurdy <armccurdy@gmail.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>
6 years agoopenssl: support musl-x32 build
Andre McCurdy [Tue, 24 Jul 2018 02:38:54 +0000 (19:38 -0700)]
openssl: support musl-x32 build

Align the openssl 1.1 recipe with changes made to openssl 1.0:

  http://git.openembedded.org/openembedded-core/commit/?id=a072d4620db462c5d3459441d5684cfd99938400

(From OE-Core rev: 24e745aaa2354432a9112879450263cab742c85b)

Signed-off-by: Andre McCurdy <armccurdy@gmail.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>
6 years agoopenssl: remove uclibc remnants
Andre McCurdy [Tue, 24 Jul 2018 02:38:53 +0000 (19:38 -0700)]
openssl: remove uclibc remnants

Align the openssl 1.1 recipe with changes made to openssl 1.0:

  http://git.openembedded.org/openembedded-core/commit/?id=e01e7c543a559c8926d72159b5cd55db0c661434

(From OE-Core rev: 35cf2c1266927b609e0022be2c7bd8e08410a456)

Signed-off-by: Andre McCurdy <armccurdy@gmail.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>
6 years agoopenssl_1.0: avoid running make twice for target do_compile()
Andre McCurdy [Tue, 24 Jul 2018 02:38:52 +0000 (19:38 -0700)]
openssl_1.0: avoid running make twice for target do_compile()

Currently target builds call make twice as part of do_compile(). It
appears to be an accidental side effect of needing to only pass
CC_INFO on the make command line for target builds, since CC_INFO is
only referenced by the reproducible build patches.

(From OE-Core rev: 6c4942b5c771876ad0e62e56923f59cc71776157)

Signed-off-by: Andre McCurdy <armccurdy@gmail.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>
6 years agoopenssl_1.0: drop leading "-" from no-ssl3 config option
Andre McCurdy [Tue, 24 Jul 2018 02:38:51 +0000 (19:38 -0700)]
openssl_1.0: drop leading "-" from no-ssl3 config option

Although passing -no-ssl3 works, comments in the openssl Configure
script suggest doing so isn't really correct:

  s /^-no-/no-/; # some people just can't read the instructions

The documented way to pass no-<cipher> config options is without a
leading "-"

  https://github.com/openssl/openssl/blob/OpenSSL_1_0_2-stable/INSTALL

(From OE-Core rev: 369927de1d94a295671d3750c95b70a497b13425)

Signed-off-by: Andre McCurdy <armccurdy@gmail.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>
6 years agoopenssl_1.0: fix cryptodev-linux PACKAGECONFIG support
Andre McCurdy [Tue, 24 Jul 2018 02:38:50 +0000 (19:38 -0700)]
openssl_1.0: fix cryptodev-linux PACKAGECONFIG support

Since openssl isn't an autotools recipe, defining cryptodev-linux
related config options via PACKAGECONFIG hasn't worked correctly
since PACKAGECONFIG_CONFARGS stopped being automatically appended to
EXTRA_OECONF in 2016:

  http://git.openembedded.org/openembedded-core/commit/?id=c98fb5f5129e71829ffab4449b3d28082bc95ab4

The issue appears to have been hidden as the flags are also hardcoded
in CFLAG - and therefore always enabled, regardless of the state of
the PACKAGECONFIG option. Fix by passing both EXTRA_OECONF and
PACKAGECONFIG_CONFARGS when running the openssl Configure script.
Although the openssl 1.1 recipe doesn't contain any PACKAGECONFIG
options yet, pre-emptively make the same fix there too.

Also only enable cryptodev-linux by default for target builds (based
on the historical comments in the recipe, that seems to have been the
original intention).

(From OE-Core rev: 6fee11b04b979a5b3237902d947db7118cafca2b)

Signed-off-by: Andre McCurdy <armccurdy@gmail.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>
6 years agoopenssl_1.0: drop curly brackets from shell local variables
Andre McCurdy [Tue, 24 Jul 2018 02:38:49 +0000 (19:38 -0700)]
openssl_1.0: drop curly brackets from shell local variables

Make clear distinction between local variables and bitbake variables.

(From OE-Core rev: d1e441db511faf9c170733c01ded8c56faac9ab6)

Signed-off-by: Andre McCurdy <armccurdy@gmail.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>
6 years agoopenssl_1.0: minor recipe formatting tweaks etc
Andre McCurdy [Tue, 24 Jul 2018 02:38:48 +0000 (19:38 -0700)]
openssl_1.0: minor recipe formatting tweaks etc

Drop redundant setting of S to its default value, fix inconsistent
indent and re-order variables to align more closely to the OE
style-guide.

(From OE-Core rev: c36637a0304551bf2736bb15796947d9aaf00076)

Signed-off-by: Andre McCurdy <armccurdy@gmail.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>
6 years agoopenssl_1.0: merge openssl10.inc into the openssl_1.0.2o.bb recipe
Andre McCurdy [Tue, 24 Jul 2018 02:38:47 +0000 (19:38 -0700)]
openssl_1.0: merge openssl10.inc into the openssl_1.0.2o.bb recipe

The openssl10.inc include file only has one user, so we can improve
maintainability by merging the include file into the recipe which
uses it.

(From OE-Core rev: f5568740d5ff72090c3ca894ddfdc3078169da25)

Signed-off-by: Andre McCurdy <armccurdy@gmail.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>
6 years agoopenssl_1.1: minor recipe formatting tweaks etc
Andre McCurdy [Mon, 9 Jul 2018 18:12:53 +0000 (11:12 -0700)]
openssl_1.1: minor recipe formatting tweaks etc

Drop redundant setting of S to its default value and re-order
variables to align more closely to the OE style-guide.

(From OE-Core rev: 4871481e66449dd2b054119b37d0baedb166b72c)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoopenssl_1.1: avoid using += with an over-ride
Andre McCurdy [Fri, 6 Jul 2018 19:05:53 +0000 (12:05 -0700)]
openssl_1.1: avoid using += with an over-ride

Using += with an over-ride can be a source of confusion so try to
avoid the construct in core recipes.

The current usage is incorrect and prevents the aarch64 and musl
specific config options from being active together.

(From OE-Core rev: 2a30a9ecab6465892698f7fc9d14a430d8a26f0c)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoopenssl-nativesdk: Fix "can't open config file" warning
Ovidiu Panait [Wed, 20 Dec 2017 13:15:37 +0000 (13:15 +0000)]
openssl-nativesdk: Fix "can't open config file" warning

When SDK is not installed in the default location, openssl will not be
able to find the the openssl.cnf config file:

"WARNING: can't open config file: XXXX/usr/lib/ssl/openssl.cnf"

To fix this, we need to provide the environment variable $OPENSSL_CONF
pointing to the correct config file location.

(From OE-Core rev: b3f148333515efdb746b78c57d62cfbf3321b21e)

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
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>
6 years agoopenssl: disable ccache usage
Ross Burton [Thu, 28 Jun 2018 14:44:09 +0000 (15:44 +0100)]
openssl: disable ccache usage

ccache and openssl don't get on:

| make[1]: Entering directory '/home/prj/yocto/build/tmp/work/core2-64-poky-linux/openssl/1.0.2o-r0/openssl-1.0.2o/crypto'
| ccache: invalid option -- 'D'

Disable the use of ccache in the openssl recipe until someone root-causes this.

[ YOCTO #12810 ]

(From OE-Core rev: 8f9ceebb197dba10f2d08449de2dd64584de06bb)

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>
6 years agoopenssl: fix upstream version check for 1.0 version
Alexander Kanavin [Thu, 17 May 2018 11:38:35 +0000 (14:38 +0300)]
openssl: fix upstream version check for 1.0 version

(From OE-Core rev: 50dc3283e39e85912cdbeb9e885dcd22011d4a51)

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>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agowic/qemux86: don't pass ip parameter to kernel in wks
Anuj Mittal [Wed, 1 Aug 2018 08:35:21 +0000 (16:35 +0800)]
wic/qemux86: don't pass ip parameter to kernel in wks

Images that rely on dhcp being used won't have network setup properly
otherwise.

Fixes [YOCTO #12804]

(From OE-Core rev: fb4dd04f65ea78890c1102424765056d93e6ca65)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoalsa-lib: Cleanup packaging
Joshua Watt [Tue, 7 Aug 2018 13:40:04 +0000 (08:40 -0500)]
alsa-lib: Cleanup packaging

Cleans up the packaging by moving libasound.so.2 back into the alsa-lib
package which was previously empty.

Previously, it was difficult to create an image that had libasound.so.2,
then create an SDK from that image that had the proper development
files, because the only way to get libasound.so.2 was to do:

 IMAGE_INSTALL += "libasound"

This however caused a problem because all of the development files that
would be desired in the SDK were located in alsa-lib-dev, which wouldn't
be included because alsa-lib wasn't included, and it was impossible to
include alsa-lib because it was an empty package that was culled.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 30352f3d84344bff8c06625f9674947417f6e8e1)

Change-Id: I2fb065b7e00569ba3a6aac631ac863999455bfb2
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoclasses: sanity-check LIC_FILES_CHKSUM
Ross Burton [Mon, 13 Aug 2018 17:20:54 +0000 (18:20 +0100)]
classes: sanity-check LIC_FILES_CHKSUM

We assume that LIC_FILES_CHKSUM is a file: URI but don't actually verify this,
which can lead to problems if you have a URI that resolves to a path of / as
Bitbake will then dutifully checksum / recursively.

[ YOCTO #12883 ]

(From OE-Core rev: e2b8a3d5a10868f9c0dec8d7b9f5f89fdd100fc8)

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>
6 years agolibvorbis: CVE-2018-10392
Jagadeesh Krishnanjanappa [Sat, 28 Jul 2018 04:50:08 +0000 (10:20 +0530)]
libvorbis: CVE-2018-10392

Sanity check number of channels in setup.

Fixes #2335.
Link: https://gitlab.xiph.org/xiph/vorbis/issues/2335
Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agolibvorbis: CVE-2017-14160 CVE-2018-10393
Jagadeesh Krishnanjanappa [Sun, 22 Jul 2018 06:41:27 +0000 (12:11 +0530)]
libvorbis: CVE-2017-14160 CVE-2018-10393

CVE-2017-14160: fix bounds check on very low sample rates.

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agobzip2: use Yocto Project mirror for SRC_URI
Ross Burton [Mon, 13 Aug 2018 23:59:39 +0000 (00:59 +0100)]
bzip2: use Yocto Project mirror for SRC_URI

The bzip.org domain expired and is now a holding site for adverts, so we can't
trust a tarball that appears on that site (luckily we have source checksums to
detect this).

For now, point SRC_URI at the tarball in the Yocto Project source mirror, but
set HOMEPAGE and UPSTREAM_CHECK_URI to the sourceware.org/bzip2/ page which
apparently will be resurrected as the new canonical home page.

(From OE-Core rev: 9e291d9923efc988abe8689c64bafbb29da06339)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
6 years agomultilib_header: recognize BPF as a target
Daniel Díaz [Tue, 14 Aug 2018 16:14:36 +0000 (11:14 -0500)]
multilib_header: recognize BPF as a target

When building with `clang -target bpf` using the
multilib_header, a recursion was unavoidable because
bits/wordsize.h would #include itself, still lacking
a definition for __MHWORDSIZE or __WORDSIZE.

(From OE-Core rev: 70b41b3c335a80b4ac243f468f22331d261299db)

Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoglibc: Make bits/wordsize.h multilibbed again
Daniel Díaz [Tue, 14 Aug 2018 16:14:35 +0000 (11:14 -0500)]
glibc: Make bits/wordsize.h multilibbed again

As reported by ChenQi, leaving bits/wordsize.h out of being
multilibbed introduced a problem in building the SDK for
arm64:
  Error: Transaction check error:
    file /usr/include/bits/wordsize.h conflicts between attempted installs of lib32-libc6-dev-2.27-r0.armv7vet2hf_vfp and libc6-dev-2.27-r0.aarch64

This effectively reverts commit a74c77d6.

(From OE-Core rev: 90ad502bf8faa233e25cf297c1eeefcb0367aea3)

Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooe-pkgdata-util: package-info: Re-add support for the --extra option
Peter Kjellerstedt [Sat, 2 Jun 2018 19:30:33 +0000 (21:30 +0200)]
oe-pkgdata-util: package-info: Re-add support for the --extra option

Commit 64d3ce83 broke the --extra option.

(From OE-Core rev: cd195bdf5dd2c8ff03c58a63dcabe88b142d2a9c)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agooe-pkgdata-util: Make parse_pkgdatafile() support package suffixed vars
Peter Kjellerstedt [Sat, 2 Jun 2018 19:30:32 +0000 (21:30 +0200)]
oe-pkgdata-util: Make parse_pkgdatafile() support package suffixed vars

Support for variables suffixed with package names, e.g., PKGV_foo, was
removed in commit 3d2c87c4, which broke support for recipes that set
other versions on their packages than what is in ${PV}.

(From OE-Core rev: 38f8284212370999e1e7b0f6559f7cd786e80d1a)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agooe-pkgdata-util: lookup-recipe, package-info: Don't finish prematurely
Peter Kjellerstedt [Tue, 15 May 2018 21:33:03 +0000 (23:33 +0200)]
oe-pkgdata-util: lookup-recipe, package-info: Don't finish prematurely

If a package name exists in runtime-rprovides, lookup-recipe and
package-info would finish after printing information about that
package even if more packages were specified.

(From OE-Core rev: 32c2a2ddb1614f978f511dfccb6cc3e9398df841)

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>
6 years agodevtool/sdk.py: error out in case of downloading file failure
Chen Qi [Mon, 14 May 2018 08:35:22 +0000 (16:35 +0800)]
devtool/sdk.py: error out in case of downloading file failure

It's possible that downloading file from updateserver fails. In
this case, we should error out instead of continue.

We have users reporting unexpected behavior of 'devtool sdk-update'.
When an invalid url is supplied, e.g., `devtool sdk-update http://invalid',
the program reports 'Note: Already up-to-date'.

This is obviously not expected. We should error out in such case.

(From OE-Core rev: 449564783dfb162536a2f772b3a8704973221e0f)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agobuild-appliance-image: Update to sumo head revision
Richard Purdie [Mon, 6 Aug 2018 15:32:44 +0000 (16:32 +0100)]
build-appliance-image: Update to sumo head revision

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agobinutls: Security fix CVE-2018-10534
Armin Kuster [Mon, 6 Aug 2018 05:07:45 +0000 (22:07 -0700)]
binutls: Security fix CVE-2018-10534

Affects <= 2.30

Signed-off-by: Armin Kuster <akuster@mvista.com>
6 years agobinutls: Security fix CVE-2018-10535
Armin Kuster [Mon, 6 Aug 2018 05:06:33 +0000 (22:06 -0700)]
binutls: Security fix CVE-2018-10535

Affects <= 2.30

Signed-off-by: Armin Kuster <akuster@mvista.com>
6 years agobinutls: Security fix CVE-2018-10372
Armin Kuster [Mon, 6 Aug 2018 05:05:12 +0000 (22:05 -0700)]
binutls: Security fix CVE-2018-10372

Affects <= 2.30

Signed-off-by: Armin Kuster <akuster@mvista.com>
6 years agobinutls: Security fix CVE-2018-10373
Armin Kuster [Mon, 6 Aug 2018 05:03:27 +0000 (22:03 -0700)]
binutls: Security fix CVE-2018-10373

Affects <= 2.30

Signed-off-by: Armin Kuster <akuster@mvista.com>
6 years agobinutls: Security fix CVE-2018-7568
Armin Kuster [Mon, 6 Aug 2018 05:02:12 +0000 (22:02 -0700)]
binutls: Security fix CVE-2018-7568

Affects <= 2.30

Signed-off-by: Armin Kuster <akuster@mvista.com>
6 years agobinutls: Security fix CVE-2018-7569
Armin Kuster [Mon, 6 Aug 2018 04:56:30 +0000 (21:56 -0700)]
binutls: Security fix CVE-2018-7569

Affects <= 2.30

Signed-off-by: Armin Kuster <akuster@mvista.com>
6 years agobinutls: Security fix CVE-2018-7208
Armin Kuster [Mon, 6 Aug 2018 04:59:02 +0000 (21:59 -0700)]
binutls: Security fix CVE-2018-7208

Affects <= 2.30

Signed-off-by: Armin Kuster <akuster@mvista.com>
6 years agobinutls: Security fix CVE-2018-7642
Armin Kuster [Mon, 6 Aug 2018 04:57:46 +0000 (21:57 -0700)]
binutls: Security fix CVE-2018-7642

Affects <= 2.30

Signed-off-by: Armin Kuster <akuster@mvista.com>
6 years agobinutls: Security fix CVE-2018-6759
Armin Kuster [Mon, 6 Aug 2018 05:00:28 +0000 (22:00 -0700)]
binutls: Security fix CVE-2018-6759

Affects <= 2.30

Signed-off-by: Armin Kuster <akuster@mvista.com>
6 years agobinutls: Security fix CVE-2018-6872
Armin Kuster [Mon, 6 Aug 2018 04:55:12 +0000 (21:55 -0700)]
binutls: Security fix CVE-2018-6872

Affects <= 2.30

Signed-off-by: Armin Kuster <akuster@mvista.com>
6 years agobinutls: Security fix CVE-2018-7643
Armin Kuster [Mon, 6 Aug 2018 04:53:37 +0000 (21:53 -0700)]
binutls: Security fix CVE-2018-7643

Affects <= 2.30

Signed-off-by: Armin Kuster <akuster@mvista.com>
6 years agobinutils: Security fix CVE-2018-8945
Armin Kuster [Mon, 6 Aug 2018 04:51:56 +0000 (21:51 -0700)]
binutils: Security fix CVE-2018-8945

Affects <= 2.30

Signed-off-by: Armin Kuster <akuster@mvista.com>
6 years agoclasses/sanity: Clean up getstatusoutput usage
Joshua Watt [Sun, 5 Aug 2018 19:43:10 +0000 (14:43 -0500)]
classes/sanity: Clean up getstatusoutput usage

Replace usage of oe.utils.getstatusoutput() with direct subprocess
calls.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolinux-firmware: add separate packages for all brcm files
Martin Jansa [Mon, 30 Jul 2018 09:17:25 +0000 (09:17 +0000)]
linux-firmware: add separate packages for all brcm files

* no changes in the content of previously existing packages

* include some silly commands I've used to "parse" WHENCE file to
  generate these, some manual changes are still needed, like separating
  cypress licensed files, removing duplicates when 2 files are included
  in the same package (bcm4356-pcie is exception because sdio and pcie
  files have different license).

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agolinux-firmware: update LICENSE for bcm43* packages according to WHENCE file
Martin Jansa [Mon, 30 Jul 2018 09:17:24 +0000 (09:17 +0000)]
linux-firmware: update LICENSE for bcm43* packages according to WHENCE file

* the license was updated
  brcm/brcmfmac43430-sdio.bin:
  https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=ec734a30
  brcm/brcmfmac43340-sdio.bin:
  https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=5ac5ad5c
  brcm/brcmfmac43362-sdio.bin:
  https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=be1c535e
  brcm/brcmfmac4354-sdio.bin:
  https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=a2921812

* this shows that with every upgrade the changes in WHENCE file should
  checked carefully

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agolinux-firmware: add ${PN}-cypress-license handling from meta-raspberrypi
Martin Jansa [Mon, 30 Jul 2018 09:17:23 +0000 (09:17 +0000)]
linux-firmware: add ${PN}-cypress-license handling from meta-raspberrypi

* this will break meta-raspberrypi once more, by including
  ${PN}-cypress-license package twice in PACKAGES
  I've sent fix here:
  https://github.com/agherzan/meta-raspberrypi/pull/295

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agopython2: Fix build with gcc8
Ross Burton [Mon, 30 Jul 2018 21:59:06 +0000 (23:59 +0200)]
python2: Fix build with gcc8

(From OE-Core rev: 910f68c9c8dc26e12d28ef29e956af63d100f121)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agolibxml2: fix libxml2 ptest fails
Changqing Li [Wed, 1 Aug 2018 05:57:01 +0000 (13:57 +0800)]
libxml2: fix libxml2 ptest fails

for core-image-minimal image,  missing these two dependency
will cause below warning and error:

warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
./test/icu_parse_test.xml generated an error

(From OE-Core rev: 848031cf0b89b752c6fedcb63fc6938642a87fd8)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agou-boot: Fix pylibfdt generation
Joshua Watt [Tue, 31 Jul 2018 17:19:13 +0000 (12:19 -0500)]
u-boot: Fix pylibfdt generation

u-boot attempts to build a Python library called pylibfdt. By default,
u-boot would attempt to use the build host's Python interpreter, which
causes numerous problems, not least of which is that it fails if the
host doesn't have the Python development package installed (complaining
about not being able to find Python.h)

Rectify this situation by including the proper build time dependencies
for pylibfdt and passing the proper arguments to make.

[YOCTO #12867]

(From OE-Core rev: 3b0b16300b351878790729d6270cd113bca73eff)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agokdump: start kdump.service after basic.target
Yongxin Liu [Mon, 30 Jul 2018 09:16:32 +0000 (17:16 +0800)]
kdump: start kdump.service after basic.target

If kdump.service is set to run on boot and dump-capture kernel isn't
placed in /dev/root, kdump.service will fail to load the kernel,
since other partitions are not mounted yet. Starting kdump.service
after basic.target guarantees dump-capture kernel can be loaded in
this situation.

(From OE-Core rev: ac9a54fc617ff5f1eb75fa8500187c5ed3effe46)

Signed-off-by: Yongxin Liu <yongxin.liu@windriver.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>
6 years agogcc-7.3: Backport fixes for std::pair high memory usage
Joel Stanley [Mon, 30 Jul 2018 05:10:29 +0000 (14:40 +0930)]
gcc-7.3: Backport fixes for std::pair high memory usage

C++ applications that contain a specfic use of std::pair with tempates
cause the build to require many gigabytes of RAM to build.

This is a fix that was applied to the upstream GCC 7 branch.

Change-Id: I213f96d1d6332e2dce5765482ff3413f1abd7ff8
(From OE-Core rev: 51a09ba2729a840a9f2f87b68c7f50a3e6ac0d04)

Signed-off-by: Joel Stanley <joel@jms.id.au>
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>
6 years agogcc-7.3: Fix build on ppc64le hosts
Joel Stanley [Mon, 30 Jul 2018 05:10:28 +0000 (14:40 +0930)]
gcc-7.3: Fix build on ppc64le hosts

When building on ppc64le hosts that have GCC 8 (such as Ubuntu 18.10)
the GCC build bootstrap fails.

 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86162

This is a fix that was applied to the upstream GCC 7 branch.

Change-Id: I7796d2a999ec420805dd1c6cf0a1ecba1de5a897
(From OE-Core rev: c17f5e7e954487ad3e97e26c3e0d31443d658d5a)

Signed-off-by: Joel Stanley <joel@jms.id.au>
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>
6 years agoglibc-locale: Fix host-user-contaminated QA errors
Khem Raj [Sat, 21 Jul 2018 16:27:09 +0000 (09:27 -0700)]
glibc-locale: Fix host-user-contaminated QA errors

Fixes

ERROR: glibc-locale-2.27-r0 do_package_qa: QA Issue: glibc-locale: /glibc-binary-localedata-hy-am/usr/lib/locale/hy_AM/LC_MEASUREMENT.tmp is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]

(From OE-Core rev: 06d831d12fe2a2366480c79f4c018942937b753a)

Signed-off-by: Khem Raj <raj.khem@gmail.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>
6 years agoshadow: fix CVE-2017-2616
Andrej Valek [Tue, 24 Jul 2018 11:08:29 +0000 (13:08 +0200)]
shadow: fix CVE-2017-2616

(From OE-Core rev: 94a1e2794df15f0f2cb62ae030cd81e6c0798b1f)

Signed-off-by: Andrej Valek <andrej.valek@siemens.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>
6 years agotiff: security fix CVE-2018-7456
Joe Slater [Wed, 18 Jul 2018 18:25:00 +0000 (11:25 -0700)]
tiff: security fix CVE-2018-7456

NULL pointer use as described at nvd.nist.gov/vuln/detail/CVE-2018-7456.

(From OE-Core rev: 122da5cec495fc8ddfd880327e7c3ed0dc70e04f)

Signed-off-by: Joe Slater <joe.slater@windriver.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>
6 years agotiff: security fix CVE-2018-8905
Joe Slater [Wed, 18 Jul 2018 18:24:59 +0000 (11:24 -0700)]
tiff: security fix CVE-2018-8905

Buffer overflow described at nvd.nits.gov/vuln/detail/CVE-2018-8905.

(From OE-Core rev: 3f6f2a0619b4e243e6a9e52cee2cdd625ebf6769)

Signed-off-by: Joe Slater <joe.slater@windriver.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>
6 years agoyocto-uninative: Upgrade to version 2.2
Richard Purdie [Wed, 25 Jul 2018 21:29:57 +0000 (22:29 +0100)]
yocto-uninative: Upgrade to version 2.2

This version adds nativesdk-libnss-nis to resolve glibc symbol issues

We need this to avoid symbol mismatch issues for binaries that use this
on newer systems which then won't run on older ones where it isn't present.

(From OE-Core rev: 98c7ab9cf32765d604c35dc69bc7bd90e94fc8f3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agogio-module-cache.bbclass: disable update_gio_module_cache postinst script for nativesdk
Martin Jansa [Fri, 20 Jul 2018 16:03:26 +0000 (16:03 +0000)]
gio-module-cache.bbclass: disable update_gio_module_cache postinst script for nativesdk

* it fails to execute native binary inside the qemu usermode for target
  arch as shown e.g. for qemuarm and raspberrypi3 build on x86_64
  builder:

  qemuarm-webos-linux-gnueabi/webos-ndk-basic/1.0.0-1-r3/temp/log.do_populate_sdk:
    NOTE: > Executing update_gio_module_cache-nativesdk intercept ...
    WARNING: The postinstall intercept hook 'update_gio_module_cache-nativesdk' failed, details in log.do_populate_sdk
    qemuarm-webos-linux-gnueabi/webos-ndk-basic/1.0.0-1-r3/sdk/image/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/libexec/nativesdk-gio-querymodules: Invalid ELF image for this architecture

  qemuarm-webos-linux-gnueabi/my-sdk/1.0.0-1-r3/sdk/image/opt/webos-sdk-x86_64/7.0~s14/sysroots/armv5te-webos-linux-gnueabi/usr/libexec/gio-querymodules:
    ELF 32-bit LSB  executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, BuildID[sha1]=5b7f0c77e8ee9587f4e02eaf1d54a1e230e539bd, stripped
  qemuarm-webos-linux-gnueabi/my-sdk/1.0.0-1-r3/sdk/image/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/libexec/nativesdk-gio-querymodules:
    ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, BuildID[sha1]=eeded124aa53c7ac997dd6326e5d9b75e8d9c43d, stripped

  qemuarm-webos-linux-gnueabi/webos-ndk-basic/1.0.0-1-r3/intercept_scripts-ac629c4abfb418548877d2a412f7e552bd21e66f0b645b8875dc56ed9f0df40d/update_gio_module_cache-nativesdk
bindir=/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/bin
base_libdir=/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/lib
libexecdir=/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/libexec
libdir=/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/lib
binprefix=nativesdk-

set -e

PSEUDO_UNLOAD=1 qemuwrapper -L $D -E
LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \
        $D${libexecdir}/${binprefix}gio-querymodules
$D${libdir}/gio/modules/

[ ! -e $D${libdir}/gio/modules/giomodule.cache ] ||
        chown root:root $D${libdir}/gio/modules/giomodule.cache

  raspberrypi3-webos-linux-gnueabi/webos-ndk-basic/1.0.0-1-r3/temp/log.do_populate_sdk:
    NOTE: > Executing update_gio_module_cache-nativesdk intercept ...
    WARNING: The postinstall intercept hook 'update_gio_module_cache-nativesdk' failed, details in log.do_populate_sdk
    raspberrypi3-webos-linux-gnueabi/webos-ndk-basic/1.0.0-1-r3/sdk/image/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/libexec/nativesdk-gio-querymodules: Invalid ELF image for this architecture

  raspberrypi3-webos-linux-gnueabi/my-sdk/1.0.0-1-r3/sdk/image/opt/webos-sdk-x86_64/7.0~s14/sysroots/cortexa7t2hf-neon-vfpv4-webos-linux-gnueabi/usr/libexec/gio-querymodules:
    ELF 32-bit LSB  executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, BuildID[sha1]=5267f1e542b014522af5ab54443d768ba6b47351, stripped
  raspberrypi3-webos-linux-gnueabi/my-sdk/1.0.0-1-r3/sdk/image/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/libexec/nativesdk-gio-querymodules:
    ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, BuildID[sha1]=eeded124aa53c7ac997dd6326e5d9b75e8d9c43d, stripped

  raspberrypi3-webos-linux-gnueabi/webos-ndk-basic/1.0.0-1-r3/intercept_scripts-a4270d1427cca0a9d172dbcd8dc262957c8e081c657e1123cc9ad551d65f22ea/update_gio_module_cache-nativesdk
bindir=/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/bin
base_libdir=/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/lib
libexecdir=/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/libexec
libdir=/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/lib
binprefix=nativesdk-

set -e

PSEUDO_UNLOAD=1 qemuwrapper -L $D -E
LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \
        $D${libexecdir}/${binprefix}gio-querymodules
$D${libdir}/gio/modules/

[ ! -e $D${libdir}/gio/modules/giomodule.cache ] ||
        chown root:root $D${libdir}/gio/modules/giomodule.cache

* it isn't needed in master, because nativesdk postinst were fixed by:
  commit d10fd6ae3fe46290c6e3a5250878966d9f12ca3f
  Author: Alexander Kanavin <alexander.kanavin@linux.intel.com>
  Date:   Mon Jun 11 16:38:20 2018 +0300
  Subject: qemuwrapper-cross: enable multilib and nativesdk variants of the script
* which depends on:
  commit d4f5b8e26acaadffac6df10f9a9d9ebfb3045f5f
  Author: Alexander Kanavin <alexander.kanavin@linux.intel.com>
  Date:   Mon Jun 11 16:38:17 2018 +0300
  Subject: gtk-immodules-cache.bbclass: convert cache creation to postinst_intercept mechanism

* backporting just these 2 isn't enough, we would need to backport
  something else as well, otherwise it fails with:
  webos-ndk-basic/1.0.0-1-r3/intercept_scripts-a4270d1427cca0a9d172dbcd8dc262957c8e081c657e1123cc9ad551d65f22ea/update_gio_module_cache-nativesdk:
  nativesdk-qemuwrapper: not found

  and at this point I would rather safely disable it for nativesdk
  in sumo instead of backporting bunch more commits to stable branch

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoglibc: Avoid multilibbing on wordsize.h
Daniel Díaz [Thu, 26 Jul 2018 14:39:26 +0000 (09:39 -0500)]
glibc: Avoid multilibbing on wordsize.h

Once another header #includes <bits/wordsize.h>, there is a
potential recursion going on because the
multilib_header_wrapper.h #includes <bits/wordsize.h> again!

This should not happen because an __arm__ (32-bits) or an
__aarch64__ (64-bits) environment guarantees that we will
be getting the correct definition, but when building against
a different target (like BPF), recursion is what happens.

This can be seen, for instance, when building eBPF programs
from the kernel with `clang -target bpf', such as the ones
located in linux/tools/testing/selftests/bpf/.

(From OE-Core rev: a74c77d6168101e88c3a3bce7130f4f52cfab95d)

Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agou-boot: Fix build race condition
Joshua Watt [Thu, 26 Jul 2018 15:04:09 +0000 (10:04 -0500)]
u-boot: Fix build race condition

Backports 2f61b13d6acba787b00598d519c85222e993e4ca (included in the
2018.07 release) which fixes a race condition when building.

[YOCTO #12705]

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agocurl: update 7.60.0 -> 7.61.0
Andre McCurdy [Fri, 13 Jul 2018 21:12:24 +0000 (14:12 -0700)]
curl: update 7.60.0 -> 7.61.0

https://curl.haxx.se/changes.html#7_61_0

(From OE-Core rev: b26ca91574a88745910d44777bb17ac0616baf3e)

Signed-off-by: Andre McCurdy <armccurdy@gmail.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>
6 years agobash: fix wrong exit status offset
Rui Wang [Mon, 16 Jul 2018 02:55:08 +0000 (10:55 +0800)]
bash: fix wrong exit status offset

In Linux,8 bits of the return code and 8 bits of the number of
the killing signal are mixed into a single value on the exit code,
so the exit status offset should be 8. But the autoconf checker
can not determine it while cross compiling, and then it is set to
the default value 0, which will cause generating the wrong exit
code if program exit with an error code.

(From OE-Core rev: e2dea46607a24620d6d2c250efc9b2e95bfd5ad8)

Signed-off-by: Rui Wang <rui.wang@windriver.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>
6 years agognutls: use HTTP instead of FTP
Ross Burton [Mon, 16 Jul 2018 10:29:41 +0000 (11:29 +0100)]
gnutls: use HTTP instead of FTP

HTTP is in general more reliable so use that in the SRC_URI.

(From OE-Core rev: 4f3378e0763a94a5daac7169f498177fc6ef4e75)

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>
6 years agotiff: security fix CVE-2018-10963
Joe Slater [Thu, 12 Jul 2018 18:48:17 +0000 (11:48 -0700)]
tiff: security fix CVE-2018-10963

Denial of service described at https://nvd.nist.gov/vuln/detail/CVE-2018-10963.

(From OE-Core rev: d19a9b41d3b2dcba3b102a8289b7787b4b131e96)

Signed-off-by: Joe Slater <joe.slater@windriver.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>
6 years agoinsane: optimise buildpath search
Ross Burton [Thu, 12 Jul 2018 13:44:06 +0000 (14:44 +0100)]
insane: optimise buildpath search

Instead of decoding every file we open as UTF-8 (with many errors as machine
code isn't UTF-8), convert the build path to the UTF-8 byte representation and
search for that instead.

(From OE-Core rev: ffb52d383bfe413cf31fef13663fe9937a146c76)

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>
6 years agowic/engine: use up all free space when expanding partitions
Anuj Mittal [Thu, 12 Jul 2018 02:05:25 +0000 (10:05 +0800)]
wic/engine: use up all free space when expanding partitions

Currently we just divide up the free space by the number of partitions
that need to be re-sized. This leads to problems when a user has
explicitly specified a subset of partitions (but not all) that need
to re-sized along with the sizes. As an example, for an image with 3
partitions, if we use:

wic write image.wic /dev/sdb --expand 1:10G

This would lead to paritions 2 and 3 each being re-sized to one thirds
of the free space instead of half.

Change the behavior to use up all the free space.

(From OE-Core rev: a88f1b5d88dbc5fb28be24b9787d73b9e0cdf183)

Signed-off-by: Anuj Mittal <anuj.mittal@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>
6 years agowic/engine: fix errors when expanding partitions
Anuj Mittal [Thu, 12 Jul 2018 02:05:24 +0000 (10:05 +0800)]
wic/engine: fix errors when expanding partitions

The UEFI spec implies that GPT partitions should be assumed to be on a 2048
sector boundary (for a 512 byte sector) and the current logic just
divides the free sectors available by the number of partitions that need
re-sizing, which may or may not align and the final result might
overshoot the limits imposed after alignment.

Since we are expanding already aligned partitions, just divide up the
free space in multiples of 2048. Also use the exec_cmd wrapper instead
of the subprocess call directly.

Fixes [YOCTO #12840]

(From OE-Core rev: 5eef63f5afdfbab8e30748cb1bf42bf2e6524759)

Signed-off-by: Anuj Mittal <anuj.mittal@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>