]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
6 years agorunqemu-gen-tapdevs: Allow run --help without sudo
Robert Yang [Fri, 28 Dec 2018 08:58:58 +0000 (00:58 -0800)]
runqemu-gen-tapdevs: Allow run --help without sudo

Then we can get user's UID and GID rather than hardcode to 1000, e.g.:

- Without sudo
$ runqemu-gen-tapdevs --help
[snip]
$ sudo ../poky/scripts/runqemu-gen-tapdevs 15220 100 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin
[snip]

- With sudo
$ sudo ../poky/scripts/runqemu-gen-tapdevs --help
[snip]
$ sudo ../poky/scripts/runqemu-gen-tapdevs 15220 100 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin
[snip]

(From OE-Core rev: 446e7da7e56f9de3602498b5ef40e9e0f8f71837)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agorunqemu: clean up subprocess usage
Ross Burton [Fri, 21 Sep 2018 15:11:32 +0000 (16:11 +0100)]
runqemu: clean up subprocess usage

Where possible pass lists instead of strings, don't use a subshell, and call
check*() instead of using Popen directly.

(From OE-Core rev: d2374623444752af1ad748ed36b68ea58f629bf6)

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 agooeqa/runtime/cases/rpm.py: change to use base-passwd-doc
Chen Qi [Thu, 14 Jun 2018 04:52:32 +0000 (12:52 +0800)]
oeqa/runtime/cases/rpm.py: change to use base-passwd-doc

The test cases assume that rpm-doc is built out, as it says it its
comment. This is not always true. And it sometimes results in
following error.

  |     cls.tc.target.copyTo(test_file, dst)
  | UnboundLocalError: local variable 'test_file' referenced before assignment

Change to use base-passwd-doc, as this package is more likely to be
built out than rpm-doc.

(From OE-Core rev: 2e23543b48921182307065c1fa9e8b9d7fbb3cdc)

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 agooeqa: replace Alex Kanavin's @intel email address with a personal one
Alexander Kanavin [Mon, 4 Jun 2018 08:21:51 +0000 (11:21 +0300)]
oeqa: replace Alex Kanavin's @intel email address with a personal one

As I will be leaving Intel, this address will no longer be valid,
so swap it for my personal one for now.

(From OE-Core rev: ea58ff101e28dfda3410de66d775df3d8a1e5a96)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agooeqa: make it work for multiple users
Robert Yang [Thu, 10 Jan 2019 07:49:49 +0000 (15:49 +0800)]
oeqa: make it work for multiple users

There are failures when multiple users run oe-selftest on the same
host:

PermissionError: [Errno 13] Permission denied: '/tmp/oe-saved-
tests/201812250324_qemu'

This is because /tmp/oe-saved-tests was created by user A, while user B tries
to write data in it, then the error will happen. This patch can fix the
problem.

Move the dumped data to ${LOG_DIR}/runtime-hostdump/ rather than
/tmp/oe-saved-tests/ to fix the problem.

(From OE-Core rev: e219fe5329599cd6c3682f521eaee3852a2c8980)

Signed-off-by: Robert Yang <liezhi.yang@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 agometa/classes/testimage.bbclass: Only validate IMAGE_FSTYPES when is QEMU
Aníbal Limón [Wed, 2 Jan 2019 16:08:13 +0000 (10:08 -0600)]
meta/classes/testimage.bbclass: Only validate IMAGE_FSTYPES when is QEMU

When use simpleremote target the flash/boot process is executed
manually, the IMAGE_FSTYPES validation is only needed when execute
testimage against qemu.

The supported_fstypes comes from oeqa.core.target.qemu module.

(From OE-Core rev: e7dc5963adbacc091fe8943119262166977623ad)

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 agotestimage.bbclass: remove boot parameter systemd.log_target
Kai Kang [Tue, 25 Dec 2018 09:39:43 +0000 (04:39 -0500)]
testimage.bbclass: remove boot parameter systemd.log_target

Boot parameter systemd.log_target=console affects command journalctl's
output and causes oe selftest case test_systemd_boot_time fail to pass.

| Error at obtaining the boot time from journalctl
| RESULTS:
| RESULTS - systemd.SystemdJournalTests.test_systemd_boot_time - Testcase -1: SKIPPED (0.74s)

systemd.log_target=console was introduced by oe-core commit a0bb649 and
work with parameter systemd.log_level to enable systemd debug.
systemd.log_level has been removed already, so remove systemd.log_target
too to make case test_systemd_boot_time pass.

(From OE-Core rev: caa776bdcf8ea34c857f45970370bf771075f4bc)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agotestimage: Add possibility to pass parmeters to qemu
Erik Botö [Fri, 14 Dec 2018 18:53:42 +0000 (19:53 +0100)]
testimage: Add possibility to pass parmeters to qemu

Add a variable called TEST_QEMUPARAMS in testimage.bbclass to make it
possible to pass parameters to qemu. This can be useful for e.g.
increasing the amount of RAM available during testimage runs.

(From OE-Core rev: 1a9163f5779d233c884c8fd50e0812eabab4fdf3)

Signed-off-by: Erik Botö <erik.boto@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agotestimage: Add support for slirp
Yeoh Ee Peng [Thu, 22 Nov 2018 09:10:46 +0000 (17:10 +0800)]
testimage: Add support for slirp

Enable testimage to support qemu slirp. Configure "QEMU_USE_SLIRP"
& "TEST_SERVER_IP" variables to enable slirp.

[YOCTO#10713]

(From OE-Core rev: 3df9ee85ce7fe52f0893fd33aea3bf1fcc6ead0a)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agotestimage: Enable autorunning of the package manager testsuites
Richard Purdie [Fri, 16 Nov 2018 09:39:30 +0000 (09:39 +0000)]
testimage: Enable autorunning of the package manager testsuites

Now that the hangs in httpservice are fixed we can let these tests
auto skip as appropriate.

(From OE-Core rev: 42a0d70291d551578e21f590fcb85ca72a78ccb5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agotestimage: Further cleanup DEFAULT_TEST_SUITES
Richard Purdie [Fri, 9 Nov 2018 09:59:19 +0000 (09:59 +0000)]
testimage: Further cleanup DEFAULT_TEST_SUITES

Now the test markup of the development tools tests is complete, this
can be further tweaked to auto run the correct tests.

(From OE-Core rev: bd4f8d12fe1f9f2643ee9e68fa2bb981134294fb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agotestimage: Simplfy DEFAULT_TEST_SUITES logic
Richard Purdie [Thu, 8 Nov 2018 19:57:49 +0000 (19:57 +0000)]
testimage: Simplfy DEFAULT_TEST_SUITES logic

Now that the tests have correct markup to automatically determine which images
they can run against, clean up the default test suites logic to be simpler
and not image specific.

Some cleanup of the compiler tests still needs to be completed but this
is a good first step.

The only downside to this is more noise during testing as we now see
many skipped messages for simple images like core-image-minimal.

The auto type is being removed since it currently breaks badly due to the
socat mandatory inclusion from the meta-selftest layer which is a problem
which needs to be addressed seperately.

(From OE-Core rev: 4966bc33845752eb0aeae54b72e8ba0146a7ed52)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
[Fix for sumo context]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoruntime/dnf: Add new dnf test cases
Jose Perez Carranza [Thu, 30 Nov 2017 16:23:02 +0000 (10:23 -0600)]
runtime/dnf: Add new dnf test cases

Add test cases to test “exclude” and “installroot“ options, also modify
the logic of filtering packages on the feed to have all the packages
needed by the tests.

[YOCTO #10744]

(From OE-Core rev: 1121806603c6f621d084b692216f3f616a0768dc)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agokernel: don't assign the build user/host
Federico Sauter [Wed, 5 Dec 2018 14:22:32 +0000 (14:22 +0000)]
kernel: don't assign the build user/host

The KBUILD_BUILD_USER and KBUILD_BUILD_HOST variables were
assigned at the kernel class level, which made it impossible
to override them in the local configuration.

By setting only the default values of those variables in the
kernel class, it is now possible to override them as expected.

(From OE-Core rev: a3e8cdf9c3ba966fa4b5a21235540eb0b00fb487)

Signed-off-by: Federico Sauter <federico.sauter@ableton.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agooeqa: Fix for QEMU_USE_KVM
Robert Yang [Fri, 4 Jan 2019 07:15:43 +0000 (15:15 +0800)]
oeqa: Fix for QEMU_USE_KVM

Fixed:
MACHINE = "qemux86"
QEMU_USE_KVM = "qemux86"
IMAGE_CLASSES += "testimage"

$ oe-selftest -r runqemu.RunqemuTests.test_boot_rootfs

[snip]
  File "/buildarea1/lyang1/poky/meta/lib/oe/types.py", line 122, in boolean
    raise ValueError("Invalid boolean value '%s'" % value)
ValueError: Invalid boolean value 'qemux86'

Now QEMU_USE_KVM can only be boolean, can not contain MACHINE any more, kvm
will be enabled if target_arch == build_arch or both of them are x86 archs.

(From OE-Core rev: 7c1a8a624cad8d967635c6cb5f99cf655bde3d44)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agopatch: reproducibility: Fix host umask leakage
Douglas Royds [Thu, 20 Dec 2018 23:10:22 +0000 (12:10 +1300)]
patch: reproducibility: Fix host umask leakage

Some patch files create entirely new files, so their permissions are subject to
the host umask. If such a file is later installed into a package with no change
in permissions, it breaks the reproducibility of the package.

This was observed on libpam, for instance: The patch file
pam-security-abstract-securetty-handling.patch creates a new file
(tty_secure.c). This file is later copied into the -dbg package with no change
in permissions.

(From OE-Core rev: 2a2bbd755b330cd63f7f6e2f2b374a3ae065b37a)

Signed-off-by: Douglas Royds <douglas.royds@taitradio.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 agoscripts/oe-git-archive: fix non-existent key referencing error
Yeoh Ee Peng [Fri, 4 Jan 2019 06:46:01 +0000 (14:46 +0800)]
scripts/oe-git-archive: fix non-existent key referencing error

Without installing gitpython package, oe-git-archive will face error
below, where it was referencing key that was non-existent inside
metadata object.

Traceback (most recent call last):
  File "<poky_dir>/scripts/oe-git-archive", line 271, in <module>
    sys.exit(main())
  File "<poky_dir>/scripts/oe-git-archive", line 229, in main
    'commit_count': metadata['layers']['meta']['commit_count'],
KeyError: 'commit_count'

Fix this error by adding exception catch when referencing
non-existent key (based on inputs provided by Richard Purdie).

[YOCTO# 13082]

(From OE-Core rev: 9a3cc9b8523b78dda6c3f3f2e12798b2b907d7e5)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agopackage.bbclass: fix python unclosed file ResourceWarning
Chen Qi [Tue, 18 Dec 2018 06:53:43 +0000 (14:53 +0800)]
package.bbclass: fix python unclosed file ResourceWarning

Fix the following warning.

  ResourceWarning: unclosed file <_io.TextIOWrapper name='/.../systemd/1_239-r0/debugsources.list' mode='a' encoding='UTF-8'>

(From OE-Core rev: 91810a57f0edd8b37c5f3f989a5aca69d9a40b37)

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>
[Fixup for sumo context]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agopackage: Rework PACKAGELOCK based upon sstate for do_packagedata
Richard Purdie [Wed, 18 Jul 2018 12:54:05 +0000 (13:54 +0100)]
package: Rework PACKAGELOCK based upon sstate for do_packagedata

I think this lock dates from before we had sstate for do_packagedata.

Since WORKDIR is recipe specific and we write into WORKDIR, we no longer need
any write locks in the do_packagedata code itself, its handled by the sstate
task lock for the final copy in at the end. The final write lock can be simply
removed.

The only time we need read locking is when actually reading data from the
shared directory. We can therefore reduce the window the lock is held
significantly as well, hence improving the speed of packagedata tasks running
in parallel.

(From OE-Core rev: f7106cdf2190d9ec59132a1cb2bb431d653cd9c5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agotestimage.bbclass: fix qemu_use_kvm handling
Emmanuel Roullit [Wed, 5 Sep 2018 19:49:58 +0000 (21:49 +0200)]
testimage.bbclass: fix qemu_use_kvm handling

QEMU_USE_KVM can either be a boolean or a whitespace separated list
of kvm supported machines.
For the 'intel-corei7-64' machine, defined in meta-intel, kvm could not be
used as the 'x86' substring is not part of its machine name.

By changing the order of this 'or' statement and setting
the 'QEMU_USE_KVM' variable to 'intel-corei7-64', it is possible to run the
'testimage' task with kvm support successfully.

(From OE-Core rev: a22789253aa653dc50fb159b40910248c2f98dd4)

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agotestimage/testsdk/selftest: Avoid platform.distro_identifier deprecation warnings
Richard Purdie [Thu, 15 Nov 2018 14:38:19 +0000 (14:38 +0000)]
testimage/testsdk/selftest: Avoid platform.distro_identifier deprecation warnings

Use our own lsb function instead as used elsewhere by the codebase.

(From OE-Core rev: acac45a6fd604d28ef7c23d67482af3d7e8bcfe3)

(From OE-Core rev: 570256a64af5a3fa994a20a5cc4c74d59ffc361f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/utils/qemurunner: set timeout to 60s for run_serial
Robert Yang [Thu, 3 Jan 2019 08:16:32 +0000 (16:16 +0800)]
oeqa/utils/qemurunner: set timeout to 60s for run_serial

The 5s timeout for non-kvm is too short, especially when the load is high,
which leads to unexpected errors, so set timeout to 60s by default.

(From OE-Core rev: 8197d0f638a760fc03062c7a9009117d083d7ead)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agotzdata/tzcode-native: update to 2018i
Armin Kuster [Wed, 2 Jan 2019 16:36:10 +0000 (08:36 -0800)]
tzdata/tzcode-native: update to 2018i

2018i:

  Briefly:
    São Tomé and Príncipe switches from +01 to +00 on 2019-01-01.

  Changes to future timestamps

    Due to a change in government, São Tomé and Príncipe switches back
    from +01 to +00 on 2019-01-01 at 02:00.  (Thanks to Vadim
    Nasardinov and Michael Deckers.)

2018h:
Briefly:
    Qyzylorda, Kazakhstan moved from +06 to +05 on 2018-12-21.
    New zone Asia/Qostanay because Qostanay, Kazakhstan didn't move.
    Metlakatla, Alaska observes PST this winter only.
    Guess Morocco will continue to adjust clocks around Ramadan.
    Add predictions for Iran from 2038 through 2090.

  Changes to future timestamps

    Guess that Morocco will continue to fall back just before and
    spring forward just after Ramadan, the practice since 2012.
    (Thanks to Maamar Abdelkader.)  This means Morocco will observe
    negative DST during Ramadan in main and vanguard formats, and in
    rearguard format it stays in the +00 timezone and observes
    ordinary DST in all months other than Ramadan.  As before, extend
    this guesswork to the year 2037.  As a consequence, Morocco is
    scheduled to observe three DST transitions in some Gregorian years
    (e.g., 2033) due to the mismatch between the Gregorian and Islamic
    calendars.

    The table of exact transitions for Iranian DST has been extended.
    It formerly cut off before the year 2038 in a nod to 32-bit time_t.
    It now cuts off before 2091 as there is doubt about how the Persian
    calendar will treat 2091.  This change predicts DST transitions in
    2038-9, 2042-3, and 2046-7 to occur one day later than previously
    predicted.  As before, post-cutoff transitions are approximated.

  Changes to past and future timestamps

    Qyzylorda (aka Kyzylorda) oblast in Kazakhstan moved from +06 to
    +05 on 2018-12-21.  This is a zone split as Qostanay (aka
    Kostanay) did not switch, so create a zone Asia/Qostanay.

    Metlakatla moved from Alaska to Pacific standard time on 2018-11-04.
    It did not change clocks that day and remains on -08 this winter.
    (Thanks to Ryan Stanley.)  It will revert to the usual Alaska
    rules next spring, so this change affects only timestamps
    from 2018-11-04 through 2019-03-10.

  Change to past timestamps

    Kwajalein's 1993-08-20 transition from -12 to +12 was at 24:00,
    not 00:00.  I transcribed the time incorrectly from Shanks.
    (Thanks to Phake Nick.)

    Nauru's 1979 transition was on 02-10 at 02:00, not 05-01 at 00:00.
    (Thanks to Phake Nick.)

    Guam observed DST irregularly from 1959 through 1977.
    (Thanks to Phake Nick.)

    Hong Kong observed DST in 1941 starting 06-15 (not 04-01), then on
    10-01 changed standard time to +08:30 (not +08).  Its transition
    back to +08 after WWII was on 1945-09-15, not the previous day.
    Its 1904-10-30 change took effect at 01:00 +08 (not 00:00 LMT).
    (Thanks to Phake Nick, Steve Allen, and Joseph Myers.)  Also,
    its 1952 fallback was on 11-02 (not 10-25).

    This release contains many changes to timestamps before 1946 due
    to Japanese possession or occupation of Pacific/Chuuk,
    Pacific/Guam, Pacific/Kosrae, Pacific/Kwajalein, Pacific/Majuro,
    Pacific/Nauru, Pacific/Palau, and Pacific/Pohnpei.
    (Thanks to Phake Nick.)

    Assume that the Spanish East Indies was like the Philippines and
    observed American time until the end of 1844.  This affects
    Pacific/Chuuk, Pacific/Kosrae, Pacific/Palau, and Pacific/Pohnpei.

  Changes to past tm_isdst flags

    For the recent Morocco change, the tm_isdst flag should be 1 from
    2018-10-27 00:00 to 2018-10-28 03:00.  (Thanks to Michael Deckers.)
    Give a URL to the official decree.  (Thanks to Matt Johnson.)

(From OE-Core rev: 100d0d0f24cabedd1a89b69ac8ffb05d85663761)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agotzcode-native: update to 2018g
Armin Kuster [Sun, 28 Oct 2018 23:38:32 +0000 (23:38 +0000)]
tzcode-native: update to 2018g

  Changes to code

    When generating TZif files with leap seconds, zic no longer uses a
    format that trips up older 32-bit clients, fixing a bug introduced
    in 2018f.  (Reported by Daniel Fischer.)  Also, the zic workaround
    for QTBUG-53071 now also works for TZif files with leap seconds.

    The translator to rearguard format now rewrites the line
    "Rule Japan 1948 1951 - Sep Sat>=8 25:00 0 S" to
    "Rule Japan 1948 1951 - Sep Sun>=9  1:00 0 S".
    This caters to zic before 2007 and to Oracle TZUpdater 2.2.0
    and earlier.  (Reported by Christos Zoulas.)

  Changes to past time zone abbreviations

    Change HDT to HWT/HPT for WWII-era abbreviations in Hawaii.
    This reverts to 2011h, as the abbreviation change in 2011i was
    likely inadvertent.

  Changes to documentation

    tzfile.5 has new sections on interoperability issues.

(From OE-Core rev: a24d0c174411a32a2793c89980ca87c4f9d98bc4)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agotzdata: update to 2018g
Armin Kuster [Mon, 29 Oct 2018 01:29:32 +0000 (01:29 +0000)]
tzdata: update to 2018g

  Changes to code

    When generating TZif files with leap seconds, zic no longer uses a
    format that trips up older 32-bit clients, fixing a bug introduced
    in 2018f.  (Reported by Daniel Fischer.)  Also, the zic workaround
    for QTBUG-53071 now also works for TZif files with leap seconds.

    The translator to rearguard format now rewrites the line
    "Rule Japan 1948 1951 - Sep Sat>=8 25:00 0 S" to
    "Rule Japan 1948 1951 - Sep Sun>=9  1:00 0 S".
    This caters to zic before 2007 and to Oracle TZUpdater 2.2.0
    and earlier.  (Reported by Christos Zoulas.)

  Changes to past time zone abbreviations

    Change HDT to HWT/HPT for WWII-era abbreviations in Hawaii.
    This reverts to 2011h, as the abbreviation change in 2011i was
    likely inadvertent.

  Changes to documentation

    tzfile.5 has new sections on interoperability issues.

(From OE-Core rev: 32e5dd919a61b1c245fb6a867d0ea4a71d394aca)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/utils/qemurunner: Print output when failed to login
Robert Yang [Thu, 27 Dec 2018 08:59:43 +0000 (00:59 -0800)]
oeqa/utils/qemurunner: Print output when failed to login

This is useful for debugging.

(From OE-Core rev: da527d73f5eeae0f29b5f99aab757491d3f87ec7)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agobusybox: Put klogd/syslogd alternative links in syslog package
Richard Purdie [Wed, 5 Sep 2018 16:39:31 +0000 (17:39 +0100)]
busybox: Put klogd/syslogd alternative links in syslog package

Currently these are in ${PN} and ${PN}-syslog may get replaced by
other packages but update-alternatives would error in the postinst
if other files were installed first. Avoid the problems by putting
the links in the correct package.

(From OE-Core rev: ef11c54ba99af261a70ec31091216cdd1556da24)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agotestsdk: Improvements to the json logging
Richard Purdie [Mon, 29 Oct 2018 13:49:24 +0000 (13:49 +0000)]
testsdk: Improvements to the json logging

Tweak the preceeding commit to:
* Add STARTTIME to the identifier to make it unique
* Add MACHINE to the identifier
* Use LOG_DIR
* Store the layer config in a more natural json format
* Drop '_' function prefixes

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agotestimage: Improvements to the json logging
Richard Purdie [Mon, 29 Oct 2018 13:49:14 +0000 (13:49 +0000)]
testimage: Improvements to the json logging

Tweak the preceeding commit to:

* Add STARTTIME to the identifier to make it unique
* Log DISTRO
* Use LOG_DIR
* Store the layer config in a more natural json format
* Drop '_' function prefixes

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/selftest/esdk: Fix typo causing test failure
Richard Purdie [Thu, 6 Dec 2018 23:25:49 +0000 (23:25 +0000)]
oeqa/selftest/esdk: Fix typo causing test failure

2018-12-06 23:19:24,564 - oe-selftest - INFO - Traceback (most recent call last):
  File "/media/build1/poky-sumo/meta/lib/oeqa/core/case.py", line 32, in _oeSetUpClass
    clss.setUpClassMethod()
  File "/media/build1/poky-sumo/meta/lib/oeqa/selftest/cases/eSDK.py", line 78, in setUpClass
    cls.tmpdir_eSDKQA = cls.tempdirobj.name
AttributeError: type object 'oeSDKExtSelfTest' has no attribute 'tempdirobj'

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agodefault-versions.inc: Make PREFERRED_VERSION_openssl* overwritable
Stefan Lendl [Tue, 27 Nov 2018 13:19:45 +0000 (14:19 +0100)]
default-versions.inc: Make PREFERRED_VERSION_openssl* overwritable

defaultsetup.conf and therefore default-versions.inc is sourced pretty late in bitbake.conf.
default-versions.inc overwrites previous assignments of PREFERRED_VERSION_openssl.
Assigning it with ?= allows other .conf files to assign correctly.
in particular assignment in conf/local.conf and machine config is used instead of default.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/selftest/esdk: Ensure parent directory exists
Richard Purdie [Thu, 6 Dec 2018 14:06:34 +0000 (14:06 +0000)]
oeqa/selftest/esdk: Ensure parent directory exists

INFO - ======================================================================
INFO - ERROR: setUpClass (eSDK.oeSDKExtSelfTest)
INFO - ----------------------------------------------------------------------
INFO - Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/core/case.py", line 32, in _oeSetUpClass
    clss.setUpClassMethod()
  File "/home/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/selftest/cases/eSDK.py", line 76, in setUpClass
    cls.tmpdirobj = tempfile.TemporaryDirectory(prefix="selftest-esdk-", dir=bb_vars["WORKDIR"])
  File "/usr/lib/python3.5/tempfile.py", line 929, in __init__
    self.name = mkdtemp(suffix, prefix, dir)
  File "/usr/lib/python3.5/tempfile.py", line 507, in mkdtemp
    _os.mkdir(file, 0o700)
FileNotFoundError: [Errno 2] No such file or directory: '/home/pokybuild/yocto-worker/oe-selftest-debian/build/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/selftest-esdk-q7ln84gc'

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoimage-buildinfo,oeqa/selftest/containerimage: Ensure image-buildinfo doesn't break...
Richard Purdie [Fri, 9 Nov 2018 11:24:47 +0000 (11:24 +0000)]
image-buildinfo,oeqa/selftest/containerimage: Ensure image-buildinfo doesn't break tests

Having image-buildinfo enabled causes containerimage.ContainerImageTests.test_expected_files
to fail due to the presence of an unexpected file:
  ['./',
   './etc/',
-  './etc/build',
   './etc/default/',
   './etc/default/postinst',

Tweak the class to allow it to be disabled and disable it from the test just in
case it was enabled.

(From OE-Core rev: af67bf422a4df5b7e07894512ff73a5f493682ab)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/utils/metadata: Allow to function without the git module
Richard Purdie [Mon, 29 Oct 2018 13:46:52 +0000 (13:46 +0000)]
oeqa/utils/metadata: Allow to function without the git module

The python git module may or may not be enabled, allow this code to
function without it, falling back to the same method as metadata_scm.bbclass
uses. This will be cleaned up in the next round of feature development.

(From OE-Core rev: 6350586ba9f4a4107a2d457590824cd4d662d5b9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/selftest: Standardize json logging output directory
Yeoh Ee Peng [Wed, 7 Nov 2018 07:08:31 +0000 (15:08 +0800)]
oeqa/selftest: Standardize json logging output directory

Currently sdk & sdkext will output json file to LOG_DIR, while
selftest will output json file to TOPDIR/log.

Standardize selftest json output file to LOG_DIR.

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/selftest: Improvements to the json logging
Richard Purdie [Mon, 29 Oct 2018 13:49:02 +0000 (13:49 +0000)]
oeqa/selftest: Improvements to the json logging

Tweak the preceeding commit to:

* Add STARTTIME to the identifier to make it unique
* Use LOG_DIR
* Store the layer config in a more natural json format
* Drop '_' function prefixes

(From OE-Core rev: 173f59acf9722e2ef27fdd49c20f7d3d664917eb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agotestsdk.bbclass: write testresult to json files
Yeoh Ee Peng [Tue, 23 Oct 2018 05:57:22 +0000 (13:57 +0800)]
testsdk.bbclass: write testresult to json files

As part of the solution to replace Testopia to store testresult,
OEQA sdk and sdkext need to output testresult into json files, where
these json testresult files will be stored into git repository
by the future test-case-management tools.

By default, json testresult file will be written to "oeqa"
directory under the "WORKDIR" directory.

To configure multiple instances of bitbake to write json testresult
to a single testresult file at custom directory, user will define
the variable "OEQA_JSON_RESULT_DIR" with the custom directory for
json testresult.

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agotestimage.bbclass: write testresult to json files
Yeoh Ee Peng [Tue, 23 Oct 2018 05:57:21 +0000 (13:57 +0800)]
testimage.bbclass: write testresult to json files

As part of the solution to replace Testopia to store testresult,
OEQA testimage need to output testresult into json files, where
these json testresult files will be stored into git repository
by the future test-case-management tools.

By default, json testresult file will be written to "oeqa"
directory under the "WORKDIR" directory.

To configure multiple instances of bitbake to write json testresult
to a single testresult file at custom directory, user will define
the variable "OEQA_JSON_RESULT_DIR" with the custom directory for
json testresult.

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/selftest/context: write testresult to json files
Yeoh Ee Peng [Tue, 23 Oct 2018 05:57:20 +0000 (13:57 +0800)]
oeqa/selftest/context: write testresult to json files

As part of the solution to replace Testopia to store testresult,
OEQA selftest need to output testresult into json files, where
these json testresult files will be stored into git repository
by the future test-case-management tools.

By default, json testresult file will be written to "oeqa"
directory under the oe-selftest log directory.

To configure multiple instances of bitbake to write json testresult
to a single testresult file at custom directory, user will define
the variable "OEQA_JSON_RESULT_DIR" with the custom directory for
json testresult.

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/runner: Sort the test result output by result class
Richard Purdie [Tue, 13 Nov 2018 21:11:50 +0000 (21:11 +0000)]
oeqa/runner: Sort the test result output by result class

We want to see failures/errors listed last since this is the most easily
visible part of the log on consoles or autobuilder output and makes
human processing easier rather than having to scroll up and scan for
a single failure.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/runner: Always show a summary of success/fail/error/skip counts
Richard Purdie [Tue, 13 Nov 2018 21:10:43 +0000 (21:10 +0000)]
oeqa/runner: Always show a summary of success/fail/error/skip counts

Its useful to have the counts of success/failure/error/skipped at the end of the
results to allow for easier human reading of what happened.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/runtime/ptest: Inject results+logs into stored json results file
Richard Purdie [Fri, 2 Nov 2018 13:13:43 +0000 (13:13 +0000)]
oeqa/runtime/ptest: Inject results+logs into stored json results file

This allows the ptest results from ptest-runner, run in an image to be
transferred over to the resulting json results output.

Each test is given a pass/skip/fail so individual results can be monitored
and the raw log output from the ptest-runner is also dumped into the
results json file as this means after the fact debugging becomes much easier.

Currently the log output is not split up per test but that would make a good
future enhancement.

I attempted to implement this as python subTests however it failed as the
output was too confusing, subTests don't support any kind of log
output handling, subTest successes aren't logged and it was making things
far more complex than they needed to be.

We mark ptest-runner as "EXPECTEDFAILURE" since its unlikely every ptest
will pass currently and we don't want that to fail the whole image test run.
Its assumed there would be later analysis of the json output to determine
regressions. We do have to change the test runner code so that
'unexpectedsuccess' is not a failure.

Also, the test names are manipuated to remove spaces and brackets with
"_" used as a replacement and any duplicate occurrences truncated.

(From OE-Core rev: a13e088942e2a3c3521e98954a394e61a15234e8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/core/runner: write testresult to json files
Yeoh Ee Peng [Tue, 23 Oct 2018 05:57:19 +0000 (13:57 +0800)]
oeqa/core/runner: write testresult to json files

As part of the solution to replace Testopia to store testresult,
OEQA need to output testresult into single json file, where json
testresult file will be stored in git repository by the future
test-case-management tools.

The json testresult file will store more than one set of results,
where each set of results was uniquely identified by the result_id.
The result_id would be like "runtime-qemux86-core-image-sato", where
it was a runtime test with target machine equal to qemux86 and running
on core-image-sato image. The json testresult file will only store
the latest test content for a given result_id. The json testresult
file contains the configuration (eg. COMMIT, BRANCH, MACHINE, IMAGE),
result (eg. PASSED, FAILED, ERROR), test log, and result_id.

Based on the destination json testresult file directory provided,
it could have multiple instances of bitbake trying to write json
testresult to a single testresult file, using locking a lockfile
alongside the results file directory to prevent races.

Also the library class inside this patch will be reused by the future
test-case-management tools to write json testresult for manual test
case executed.

(From OE-Core rev: 00e03b5004f1eb6d59295544b3a8620504278f51)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/core/runner: refactor for OEQA to write json testresult
Yeoh Ee Peng [Thu, 18 Oct 2018 09:11:05 +0000 (17:11 +0800)]
oeqa/core/runner: refactor for OEQA to write json testresult

Refactor the original _getDetailsNotPassed method to return
testresult details (test status and log), which will be reused
by future OEQA code to write json testresult.

Take the opportunity to consolidate and simplify the logic used
to gather test status and log within the TestResult instance.

(From OE-Core rev: 79ee7d1c371a86edeb61c99679985118da657e5d)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa: Remove xmlrunner
Richard Purdie [Fri, 13 Jul 2018 12:13:10 +0000 (13:13 +0100)]
oeqa: Remove xmlrunner

This isn't present on modern distros by default and doesn't work with
testtools, needing multiple code paths in the code. Remove it in favour
of finding a better replacement for results collection/analysis.

(From OE-Core rev: 8001d933a8dc86004db014777f094d718086687d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/runner: Simplify code
Richard Purdie [Wed, 11 Jul 2018 11:54:20 +0000 (11:54 +0000)]
oeqa/runner: Simplify code

There doesn't appear to be any reason we need this _results indirection
any more so remove it.

(From OE-Core rev: b618261811c48ff3b98eab1b340a8cd09ef183c6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/core/threaded: Remove in favour of using concurrenttests
Richard Purdie [Thu, 12 Jul 2018 11:10:38 +0000 (11:10 +0000)]
oeqa/core/threaded: Remove in favour of using concurrenttests

We have several options for parallel processing in oeqa, parallel
execution of modules, threading and mulitple processes for the runners.

After much experimentation is appears the most scalable and least
invasive approach is multiple processes using concurrenttestsuite
from testtools. This means we can drop the current threading code
which is only used by the sdk test execution.

oeqa/decorator/depends: Remove threading code

Revert "oeqa/sdk: Enable usage of OEQA thread mode"
This reverts commit adc434c0636b7dea2ef70c8d2c8e61cdb5c703b1.

Revert "oeqa/core/tests: Add tests of OEQA Threaded mode"
This reverts commit a4eef558c9933eb32413b61ff80a11b999951b40.

Revert "oeqa/core/decorator/oetimeout: Add support for OEQA threaded mode"
This reverts commit d3d4ba902dee8b19fa1054330cffdf73f9b81fe7.

(From OE-Core rev: a98ab5e560e73b6988512fbae5cefe9e42ceed53)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/runner: Ensure we don't print misleading results output
Richard Purdie [Wed, 11 Jul 2018 11:46:01 +0000 (11:46 +0000)]
oeqa/runner: Ensure we don't print misleading results output

The current code assumes if something isn't a failure of some
kind, it was a pass. When test case IDs weren't matching, this lead
to very confusing output where things would fail, then be listed as
passing.

This adds code to track successes, ensuring we don't end up in this
position again with unmatched entries being listed as UNKNOWN.

(From OE-Core rev: 4374c296d8963e4f6a1aa7bef7983ad0a1c2fcff)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/core/runner: Improve test case comparision
Richard Purdie [Wed, 11 Jul 2018 11:03:31 +0000 (11:03 +0000)]
oeqa/core/runner: Improve test case comparision

We can directly compare the test case IDs rather than representations,
then if we're using subunit to split the tests, the comparisions still
work as intended.

(From OE-Core rev: 72e5f46f75454ba4c445c65c1cbc616a9e72fc6e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/selftest/context: Improve log file handling
Richard Purdie [Thu, 29 Nov 2018 12:07:53 +0000 (12:07 +0000)]
oeqa/selftest/context: Improve log file handling

The existing logfile is simply placed in the current directory. Since the test
changes cwd to BUILDDIR, the symlink to the log can be placed in an invalid
directory. We also see trackbacks if the symlink is invalid.

Improve things by:

* Placing logs in LOG_DIR (or BUILDDIR if unset).
* Using a full path to the log meaning the log and link are placed in the same directory.
* Using lexists instead of exists so invalid symlinks are handled correctly.

(From OE-Core rev: 750ece11bed0e62a11e0003d1d16a81f7c219761)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/utils/qemurunner.py: Fix python regex warnings
Richard Purdie [Wed, 14 Nov 2018 11:34:02 +0000 (11:34 +0000)]
oeqa/utils/qemurunner.py: Fix python regex warnings

Fix the warnings:

meta/lib/oeqa/utils/qemurunner.py:250: DeprecationWarning: invalid escape sequence \.
  ips = re.findall("((?:[0-9]{1,3}\.){3}[0-9]{1,3})", cmdline.split("ip=")[1])
meta/lib/oeqa/utils/qemurunner.py:343: DeprecationWarning: invalid escape sequence \-
  if re.search("root@[a-zA-Z0-9\-]+:~#", output):
poky/meta/lib/oeqa/utils/qemurunner.py:350: DeprecationWarning: invalid escape sequence \-
  if re.search("root@[a-zA-Z0-9\-]+:~#", output):
meta/lib/oeqa/utils/qemurunner.py:448: DeprecationWarning: invalid escape sequence \-
  if re.search("[a-zA-Z0-9]+@[a-zA-Z0-9\-]+:~#", data):

by correctly marking the regexs.

(From OE-Core rev: 8e6987735002560fca714f77ea8ece9d4b28f7fa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/selftest/context: Replace deprecated imp module usage
Richard Purdie [Wed, 14 Nov 2018 11:32:49 +0000 (11:32 +0000)]
oeqa/selftest/context: Replace deprecated imp module usage

Avoid the warning:

meta/lib/oeqa/selftest/context.py:8: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp

In this case importlib is a direct replacement.

(From OE-Core rev: db7a60c36a2d3eefc61ae6e1ede01680dc932035)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/utils/commands: Avoid unclosed file warnings
Richard Purdie [Tue, 13 Nov 2018 22:43:25 +0000 (22:43 +0000)]
oeqa/utils/commands: Avoid unclosed file warnings

Avoid warnings such as:

meta/lib/oeqa/utils/commands.py:213: ResourceWarning: unclosed file <_io.BufferedReader name=4>
  return runCmd(cmd, ignore_status, timeout, output_log=output_log, **options)

(From OE-Core rev: 6a68c42de08cffbadb59ebda63fa5e19f6e5acef)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/loader: Fix deprecation warning
Richard Purdie [Tue, 13 Nov 2018 21:16:54 +0000 (21:16 +0000)]
oeqa/loader: Fix deprecation warning

Clean up the warning:
meta/lib/oeqa/core/loader.py:27: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  _failed_test_args = inspect.getargspec(unittest.loader._make_failed_test).args

(From OE-Core rev: d2deb66830be2d44532fea3d5db763b57778252a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/selftest/esdk: run selftest inside workdir not /tmp
Ross Burton [Mon, 3 Dec 2018 20:35:15 +0000 (20:35 +0000)]
oeqa/selftest/esdk: run selftest inside workdir not /tmp

We've seen issues with rootfs size calculations and we've seen systems
like opensuse which have btrfs mounted on /tmp causing selftest failures.

(From OE-Core rev: 61be3cd748d1b7321a1fc4cfe84efa9b26a6aee0)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa: don't litter /tmp with temporary directories
Ross Burton [Mon, 3 Dec 2018 20:35:14 +0000 (20:35 +0000)]
oeqa: don't litter /tmp with temporary directories

If we need to create a temporary directory in targetbuild or buildproject use
tempfile.TemporaryDirectory so that when the test case is finished, the
directory is deleted.

Also synchronise the logic and don't possibly store the temporary directory in
self.tmpdir as nothing uses that.

(From OE-Core rev: db0e658097130d146752785d0d45f46a3e0bad71)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/utils/qemurunner: Avoid tracebacks on closed files
Richard Purdie [Sun, 2 Dec 2018 11:23:17 +0000 (11:23 +0000)]
oeqa/utils/qemurunner: Avoid tracebacks on closed files

Reorder the shutdown/teardown to avoid:

  File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/utils/qemurunner.py", line 224, in launch
    op = self.getOutput(output)
  File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/utils/qemurunner.py", line 90, in getOutput
    fl = fcntl.fcntl(o, fcntl.F_GETFL)
ValueError: I/O operation on closed file

(From OE-Core rev: 8e7d756862d2a8d62f3c87497d6d65ddb3c1b962)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/selftest/runqemu: Improve testcase failure handling
Richard Purdie [Mon, 3 Dec 2018 20:46:06 +0000 (20:46 +0000)]
oeqa/selftest/runqemu: Improve testcase failure handling

assertTrue doesn't give good debug information when things fail. Update
several to use assertIn which gives information upon failure, for the
others print the log information upon failure.

(From OE-Core rev: c29cb75d5ce6b0873a934f4709b0c8824f7164d3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/oelib/path: don't leak temporary directories
Ross Burton [Mon, 3 Dec 2018 11:47:58 +0000 (11:47 +0000)]
oeqa/oelib/path: don't leak temporary directories

setUp() is used to populate a directory of temporary files, and deleted in
__del__.  However setUp() is called once *per test* so __del__ would only be
able to remove the last directory created.

Fix the code by using the natural counterpart to setUp, tearDown(), to clean up.

(From OE-Core rev: 68b4723e6fb11d171869185bccf28f32f6284c18)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/selftest/buildoptions: Ensure diskmon tests run consistently
Richard Purdie [Thu, 29 Nov 2018 10:40:58 +0000 (10:40 +0000)]
oeqa/selftest/buildoptions: Ensure diskmon tests run consistently

Heartbeat events default to once a second and we need to ensure we have
enough time in the task to see them.

Add a nostamp delay task 5s long so we can have a consistently timed
task which doesn't need cleanup or have unneeded dependencies. This
ensures we should deterministically see the disk moinitor events
regardless of the state of the build. This is done in a way which
doesn't corrupt build state or need cleanup and is efficient.

(From OE-Core rev: ecc49ee8986929e2429d948000a0ca588fe63959)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/selftest/buildoptions: Improve ccache test
Richard Purdie [Thu, 29 Nov 2018 10:22:15 +0000 (10:22 +0000)]
oeqa/selftest/buildoptions: Improve ccache test

This test occisionally fails as m4 doesn't recompile, meaning the logfile test
then doesn't find mention of ccache.

To ensure m4 does recompile, clean m4 before force compiling it.

(Reading the test is confusing due to the test cleanup also involving a clean)

(From OE-Core rev: 6e0b9214a0d57ed45a5df0ba5c9887a9045b89b1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/qemurunner: Remove resource python warnings
Richard Purdie [Wed, 28 Nov 2018 16:12:51 +0000 (16:12 +0000)]
oeqa/qemurunner: Remove resource python warnings

If runqemu fails it would leak an unclosed socket and file. Ensure we
close these in all cases to remove the resource warning.

(From OE-Core rev: ed80e46ccbc8fe8e9148d80723152066fa00ba28)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/utils/commands: Avoid log message duplication
Richard Purdie [Wed, 28 Nov 2018 13:00:11 +0000 (13:00 +0000)]
oeqa/utils/commands: Avoid log message duplication

Each time a runqemu() fails, the log handler would be left behind meaning
messages from any subsequent run would be duplicated (or worse/more).

This ensures we remove the handler regardless and means we no longer
have the duplication.

(From OE-Core rev: 532984708436bdfa3a8cac2c684a425eb249bad0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/utils/qemurunner: Fix python ResourceWarning for unclosed file
Richard Purdie [Wed, 28 Nov 2018 11:18:30 +0000 (11:18 +0000)]
oeqa/utils/qemurunner: Fix python ResourceWarning for unclosed file

Fixes:

Stderr:
/media/build1/poky/meta/lib/oeqa/utils/qemurunner.py:381: ResourceWarning: unclosed file <_io.BufferedWriter name=16>
  self.runqemu = None

(From OE-Core rev: b9e0bf919e6fc1a58e02145a363ebe7066e5bf4f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/utils/commands: Add extra qemu failure logging
Richard Purdie [Tue, 27 Nov 2018 23:38:44 +0000 (23:38 +0000)]
oeqa/utils/commands: Add extra qemu failure logging

Rather than just referring the user to the logs containing the failure, print
them on the console. This aids debugging with oe-selftest with parallelisation
as the logs may otherwise be lost.

(From OE-Core rev: 36a018e245a232f520ff946f152cc875927a6fb4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/selftest/buildoptions: Improve ccache test failure output
Richard Purdie [Tue, 27 Nov 2018 12:19:39 +0000 (12:19 +0000)]
oeqa/selftest/buildoptions: Improve ccache test failure output

The current failure mode doesn't show us what the logs actually looked like
and later cleans can lose them. Show the whole log in case of failure
to aid debugging intermittent problems on the autobuilder.

(From OE-Core rev: 7c3a0dc5978cea898b1ca51decf4d6e7cf9d519f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/selftest/case: Use bb.utils.remove() instead of shutil.remove()
Richard Purdie [Tue, 27 Nov 2018 12:03:50 +0000 (12:03 +0000)]
oeqa/selftest/case: Use bb.utils.remove() instead of shutil.remove()

This avoids problems where shutil.remove will error with:

  File "/usr/lib/python3.5/shutil.py", line 436, in _rmtree_safe_fd
    os.unlink(name, dir_fd=topfd)
FileNotFoundError: [Errno 2] No such file or directory: 'S.gpg-agent.extra'

when there are races over file deletion (gpg agent may be slow to exit).

We already worked around speed and race issues in bb.utils.

(From OE-Core rev: 00a8fd5b93a5c19ce0b7498e2bc653ce8ad58aaf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/selftest/signing: Use do_populate_lic target instead of do_package
Richard Purdie [Mon, 26 Nov 2018 17:03:13 +0000 (17:03 +0000)]
oeqa/selftest/signing: Use do_populate_lic target instead of do_package

This should speed the test up signficiantly without any loss of functionality
for the purposes of the test.

(From OE-Core rev: 3dde0b749643575878bfbca2f8d2d9ec30bad166)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/selftest/signing: Allow tests not to need gpg on the host
Richard Purdie [Mon, 26 Nov 2018 17:00:10 +0000 (17:00 +0000)]
oeqa/selftest/signing: Allow tests not to need gpg on the host

We ideally don't want to use gpg from the host. This is straightforward for package
management but not for sstate.

For sstate, create a second build directory to run the test in using gnupg-native
from the original build directory.

(From OE-Core rev: 10afa94c3f0d7eb7524a26deda86949073d55fde)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/selftest/signing: Skip tests if gpg isn't found
Richard Purdie [Sat, 24 Nov 2018 17:56:06 +0000 (17:56 +0000)]
oeqa/selftest/signing: Skip tests if gpg isn't found

Raising an assertionError in the class setup isn't a particuarly good way to
indicate gpg isn't installed. Instead skip the tests if the required binary
isn't present. For the signing tests we do require it to be present and can't
use a prebuilt one.

(From OE-Core rev: 2d486af97e51b9daa9c40482c31d637c9ab4ae79)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoscripts/runqemu: Improve lockfile handling for python with close_fd=True
Richard Purdie [Wed, 28 Nov 2018 17:31:39 +0000 (17:31 +0000)]
scripts/runqemu: Improve lockfile handling for python with close_fd=True

On python versions with close_fds=True (python 3.2 onwards), the tap
device lockfile isn't passed to the child process.

Since this guards against use of an active interface, we really want this
here, so pass it in pass_fds. This means if the parent exits early, the child
still holds the lock, avoiding messages like:

runqemu - ERROR - Failed to run qemu: qemu-system-x86_64: could not configure /dev/net/tun (tap0): Device or resource busy

(From OE-Core rev: 17a0a067d597c445c5892ff9914e91a2187f7e09)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoscripts/runqemu: Tidy up lock handling code
Richard Purdie [Wed, 28 Nov 2018 17:30:10 +0000 (17:30 +0000)]
scripts/runqemu: Tidy up lock handling code

Various tweaks:
- Balance up the aquire/release functions
- Use debug messge for both acquiring and release message for consistency in logs
- Use None instead of an empty string
- Reset the value of the field if we don't have the lock any more

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoscripts/runqemu: Replace subprocess.run() for compatibilty
Michael Halstead [Thu, 8 Nov 2018 20:58:39 +0000 (12:58 -0800)]
scripts/runqemu: Replace subprocess.run() for compatibilty

subprocess.run() was introduced in Python 3.5. We currently support down to
Python 3.4 so I've replaced it with subprocess.check_call() which is available
in that version.

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agobuild-appliance-image: Update to sumo head revision
Richard Purdie [Wed, 5 Dec 2018 22:35:18 +0000 (22:35 +0000)]
build-appliance-image: Update to sumo head revision

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosanity: Add check for WSL
Richard Purdie [Fri, 16 Nov 2018 10:28:10 +0000 (10:28 +0000)]
sanity: Add check for WSL

Users are starting to expect OE to work under WSL which it doesn't. Add a warning to
tell them about this up front and manage expectations.

(From OE-Core rev: 4f22710f9a310412f1de0b4e6905c058ec416f25)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agobusybox: make busybox.links.{suid, nosuid} reproducible
Martin Hundebøll [Thu, 15 Nov 2018 09:12:49 +0000 (10:12 +0100)]
busybox: make busybox.links.{suid, nosuid} reproducible

The busybox.link.* files are generated from autoconf.h and applets.h,
which are both auto-generated by the build system. The contents of the
two files might be in different order, and so the link files are not
reproducble as is.

Fix this by sorting the lists using `sort`.

(From OE-Core rev: bade7cc344c2f0e9316f973c34e9c9dfcbdbe32d)

Signed-off-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoshadow: improve reproducibility by hard-coding shell path
Martin Hundebøll [Thu, 15 Nov 2018 09:12:48 +0000 (10:12 +0100)]
shadow: improve reproducibility by hard-coding shell path

The shadow configure script tries really hard to detect the running
shell to make sure it doesn't do unsupported calls.

On my system the shell is detected as /bin/sh, while a build in an
ubuntu docker it resolves to /bin/bash. And since the shell path is
baked into the target binaries through config.h, the build becomes
inreproducible.

Fix reproducibility by hard-coding the shell to be /bin/sh

(From OE-Core rev: 5f4fe91cb6c21cd3ecd0b68d1c6b46a9530c7570)

Signed-off-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agosocat: fix LICENSE
Paul Eggleton [Thu, 22 Nov 2018 21:55:50 +0000 (10:55 +1300)]
socat: fix LICENSE

According to both the README and source headers, the LICENSE value for
socat is explicitly GPLv2, not v2 or later, so adjust LICENSE
accordingly (leaving aside whether "GPL-2.0+-with-OpenSSL-exception"
should actually be considered a valid LICENSE string or not).

(From OE-Core rev: 466044a341a8b42159bd9388950c9079e0d7a2c3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agognupg: patch gnupg-native to allow path relocation
Ross Burton [Wed, 19 Sep 2018 13:44:40 +0000 (14:44 +0100)]
gnupg: patch gnupg-native to allow path relocation

GnuPG hard-codes $bindir etc and uses them to find the helper binaries, such as
gpg-agent.  This breaks if gnupg-native is reused from sstate for a different
build directory and GPG signing of packages is required.

Patch in getenv() checks for gnupg-native when returning the hardcoded paths,
and create a wrapper script which overrides GNUPG_BINDIR. There are more paths
that can be overridden, but this one is sufficient to make GnuPG work.

(From OE-Core rev: dfd69ff889ed78bf137116583d8ae351859ee203)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agodhcp: allow for excluding the external bind
Armin Kuster [Tue, 13 Nov 2018 21:19:42 +0000 (13:19 -0800)]
dhcp: allow for excluding the external bind

There is a known issue when using ISC DHCP alongside bind 9.10. DHCP uses libraries
provided by bind and there is a bug which results in dhcpd/dhclient not
running in the background and not responding to sigterm.

The issue was first reported in 02/2015 by the fedora team here:

https://lists.isc.org/pipermail/bind-users/2015-February/094636.html

and as of 02/2018 it is still unresolved:

https://bugzilla.redhat.com/show_bug.cgi?id=1457871

Fedora's workaround seems to consist of providing working libraries from the bind 9.9
package just for DHCP.

added 'ext-bind' in PACKACGECONFIG
added notes on how to enable the workaround
refreshed patches too

[ Yocto # 12744 ]

Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agocurl: actually apply latest CVE patches
Ross Burton [Fri, 9 Nov 2018 16:53:11 +0000 (16:53 +0000)]
curl: actually apply latest CVE patches

(From OE-Core rev: f0394e80a37f1da47042a1aa0487594f390603f9)

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 agounzip: actually apply CVE-2018-18384
Ross Burton [Fri, 9 Nov 2018 16:28:36 +0000 (16:28 +0000)]
unzip: actually apply CVE-2018-18384

(From OE-Core rev: d8e1b7afc536f989e7e6efdab0998d54f26ad1f6)

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 agooeqa/selftest/recipetool: Fix problems from changing upstream source
Mohamad Noor Alim Hussin [Fri, 9 Nov 2018 09:57:58 +0000 (17:57 +0800)]
oeqa/selftest/recipetool: Fix problems from changing upstream source

The upstream source tarball checksums changed. Use the copy from our source
mirror to avoid failures.

[YOCTO #12979]

(From OE-Core rev: e97a31e6bbaec5cb56d4750bf5171dbba510ee33)

Signed-off-by: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agobase.bbclass: avoid 'find -ignore_readdir_race -delete'
Matthias Schiffer [Tue, 6 Nov 2018 08:56:23 +0000 (09:56 +0100)]
base.bbclass: avoid 'find -ignore_readdir_race -delete'

Due to a bug in find [1], -ignore_readdir_race does not work correctly with
-delete. This can lead to spurious build failures when files disappear
while such a command is running; specifically this was seen in the case of
do_configure and do_populate_lic running concurrently for packages
with ${B} == ${WORKDIR}:

   find: '.../sstate-build-populate_lic': No such file or directory

While the issue is fixed in the findutils git master, the find command of
the host system is called here, so we can't ensure that the used version
contains the fix. Many common distros have not updated to a recent enough
findutils version yet (Ubuntu 18.10 contains the fix, while 18.04 is still
affected).

Work around the issue by passing the output of find to 'rm -f' instead of
using -delete.

[1] https://savannah.gnu.org/bugs/?52981

(From OE-Core rev: 8079e2d62e23f7c274f46185e6dad64fa95394c1)

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoarchiver: Drop unwanted directories
Fabien Lahoudere [Mon, 29 Oct 2018 11:02:29 +0000 (12:02 +0100)]
archiver: Drop unwanted directories

In sources directory we can find patches/ and temp/.
The first one is filled with symbolic link unusable on another
machines.
The second contains yocto logs to create this archives and are
typically copied when 'S = "${WORKDIR}"'

(From OE-Core rev: 3904f98851c6a63dd9377e38f1432be6b1c0a94d)

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agometa: Use double colon for chown OWNER:GROUP
Kosta Zertsekel [Sun, 4 Nov 2018 19:24:46 +0000 (21:24 +0200)]
meta: Use double colon for chown OWNER:GROUP

Rationale - excerp from `info chown`
====================================

OWNER‘:’GROUP
     If the OWNER is followed by a colon and a GROUP (a group name or
     numeric group ID), with no spaces between them, the group ownership
     of the files is changed as well (to GROUP).

   Some older scripts may still use ‘.’ in place of the ‘:’ separator.
POSIX 1003.1-2001 (*note Standards conformance::) does not require
support for that, but for backward compatibility GNU ‘chown’ supports
‘.’ so long as no ambiguity results.  New scripts should avoid the use
of ‘.’ because it is not portable, and because it has undesirable
results if the entire OWNER‘.’GROUP happens to identify a user whose
name contains ‘.’.

(From OE-Core rev: 185918234a07cb506d7d7464a49ac33972c7d963)

Signed-off-by: Kosta Zertsekel <zertsekel@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 agocrosssdk: Remove usage of host flags for cross-compilation
Richard Purdie [Wed, 31 Oct 2018 22:38:43 +0000 (22:38 +0000)]
crosssdk: Remove usage of host flags for cross-compilation

Similarlly to OE-Core rev 4b936cde58ca0a6f34092ce82640a02859110411 for
cross.sdk, BUILD_* flags can't be used as TARGET_* flags

gcc-crosssdk buils leaks config.log's through "gcc-stashed-builddir" and
TARGET_* flags to libgcc cross-build through "gcc/libgcc.mvars" file
on "gcc-stashed-builddir". This means that if BUILD_CFLAGS contains
host-specific flags like "-isystem/usr/include" libgcc build will
fail "do_qa_configure" and "do_package_qa" checks.

Remove host-related flags from TARGET_* flags for gcc-crosssdk builds.

[YOCTO #11874]

(From OE-Core rev: 6e162e619b6f5173c073cd9bedbcadf205017e30)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agopixman: Trim license info extracted from pixman-matrix.c
Peter Kjellerstedt [Sat, 3 Nov 2018 09:30:29 +0000 (10:30 +0100)]
pixman: Trim license info extracted from pixman-matrix.c

Four unrelated lines were extracted from pixman-matrix.c for the
license information.

License-Update: Only extract the relevant part from pixman-matrix.c
(From OE-Core rev: d0a209e8cf29d982567e3978e1dcbb3871505a39)

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 agoapr-util: Trim license info extracted from apu_version.h
Peter Kjellerstedt [Sat, 3 Nov 2018 09:30:27 +0000 (10:30 +0100)]
apr-util: Trim license info extracted from apu_version.h

Two unrelated lines were extracted from apu_version.h for the license
information.

License-Update: Only extract the relevant part from apu_version.h
(From OE-Core rev: 2edb0f24a13f27b2fae94fb447221ad2ddb924a0)

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 agoapr: Trim license info extracted from apr_lib.h
Peter Kjellerstedt [Sat, 3 Nov 2018 09:30:26 +0000 (10:30 +0100)]
apr: Trim license info extracted from apr_lib.h

Two unrelated lines were extracted from apr_lib.h for the license
information.

License-Update: Only extract the relevant part from apr_lib.h
(From OE-Core rev: 90ab83ecc509c2fdc1f6083d771031decdcaad63)

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 agocommon-licenses: Correct the FreeType license text
Peter Kjellerstedt [Sat, 3 Nov 2018 09:30:25 +0000 (10:30 +0100)]
common-licenses: Correct the FreeType license text

It now matches:
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/FTL.TXT

(From OE-Core rev: 9dcb393551b65c8b674f625e90171b512f5e5a60)

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 agocurl: fix for CVE-2018-16839/CVE-2018-16840/CVE-2018-16842
Changqing Li [Fri, 2 Nov 2018 06:07:49 +0000 (14:07 +0800)]
curl: fix for CVE-2018-16839/CVE-2018-16840/CVE-2018-16842

(From OE-Core rev: 0f0db9fc8512a0ecd0cdba3304a195cd925a5029)

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 for CVE-2018-18384
Changqing Li [Fri, 2 Nov 2018 06:08:57 +0000 (14:08 +0800)]
unzip: fix for CVE-2018-18384

(From OE-Core rev: 2ddb3b25ed063b47d3fe2b3e9e17b7f9d0e2a7e5)

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 agowic: isoimage-isohybrid: fix UEFI spec breakage
Ioan-Adrian Ratiu [Thu, 28 Jun 2018 13:58:32 +0000 (16:58 +0300)]
wic: isoimage-isohybrid: fix UEFI spec breakage

It's really good that OE supports multiple EFI_PROVIDERs and that
commit 9a1709278de87 ("wic: isoimage-isohybrid: use grub-efi from
deploy dir") makes re-use of the grub-efi built image, but we should
still respect the standard otherwise the ISO will not boot, so install
grub images as boot[x64|ia32].efi not ${PN}-boot[x64|ia32].efi.

(From OE-Core rev: 1608129692d92c239b5fb9244b649a32b9009254)

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoselftest/wic: Improve error message for test_fixed_size
Richard Purdie [Mon, 23 Jul 2018 10:54:20 +0000 (10:54 +0000)]
selftest/wic: Improve error message for test_fixed_size

Currently this can fail with a message like 127 != 0 which is unhelpful.

If we remove the ignore_status=False, the debugging from runCmd is much
more helpful printing status.output.

Also remove the now unneeded exit code check.

(From OE-Core rev: 1aa7471b11aedc68de5116c461fe73152e3985fd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agooeqa/selftest/wic: Ensure initramfs exists for test_iso_image
Richard Purdie [Sat, 14 Jul 2018 11:02:07 +0000 (11:02 +0000)]
oeqa/selftest/wic: Ensure initramfs exists for test_iso_image

AssertionError: Command 'wic create mkhybridiso --image-name core-image-minimal -o /var/tmp/wic.oe-selftest/' returned non-zero exit status 1:

ERROR: _exec_cmd: gzip -f -9 -c /var/tmp/wic.oe-selftest/tmp.wic.drhn6edm/initrd.cpio > /var/tmp/wic.oe-selftest/tmp.wic.drhn6edm/initrd.cpio.gz returned '1' instead of 0
output: gzip: /var/tmp/wic.oe-selftest/tmp.wic.drhn6edm/initrd.cpio: No such file or directory

This is because in a clean build directory, the initramfs may not be rebuilt.
Add a call to ensure it is built to avoid the error.

(From OE-Core rev: 2a80fa234d31992691a157425e8990db30158fd1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agooeqa/selftest/wic: Use a subdir of builddir, not /var/
Richard Purdie [Sat, 14 Jul 2018 11:01:24 +0000 (11:01 +0000)]
oeqa/selftest/wic: Use a subdir of builddir, not /var/

Using /var/ leave wic open to races with other processes on the system, use
a subdir of builddir instead to avoid this.

(From OE-Core rev: e07ec908ce7f26143a7bdf0a07a1230c0fd6ac87)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agooeqa/selftest/runtime_test: Ensure we build/use gnupg-native
Richard Purdie [Thu, 13 Sep 2018 13:12:11 +0000 (14:12 +0100)]
oeqa/selftest/runtime_test: Ensure we build/use gnupg-native

Without this, we see errors if gpg is missing from the host system
for "oe-selftest -r runtime_test.TestImage.test_testimage_dnf".

(From OE-Core rev: e91838b63b506e2969582b2b8511fd3724d6aa3f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agocurl: Include the complete license information
Peter Kjellerstedt [Fri, 5 Oct 2018 20:45:53 +0000 (22:45 +0200)]
curl: Include the complete license information

For some reason, the copyright part was left out of the license
information included in LIC_FILES_CHKSUM, preventing it from being
used in, e.g., documentation to satisfy the requirements of the
license.

License-Update: Include the complete license information
(From OE-Core rev: 390becd2dcf4fe791ec3715a74e34a46bd457e7a)

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 agocurl: CVE-2018-14618
Zhixiong Chi [Tue, 18 Sep 2018 08:46:17 +0000 (01:46 -0700)]
curl: CVE-2018-14618

Backport the CVE patch from the upstream
https://github.com/curl/curl/commit/57d299a499155d4b327e341c6024e293b0418243.patch
https://curl.haxx.se/docs/CVE-2018-14618.html
https://nvd.nist.gov/vuln/detail/CVE-2018-14618

(From OE-Core rev: b76903b4b7bfec71be0a8a14e2cab4e2ec852222)

Signed-off-by: Zhixiong Chi <zhixiong.chi@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>