summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* cve-check: failure to parse versions should be more visibleRoss Burton2019-11-071-2/+2
| | | | | | (From OE-Core rev: f6a456fed7286e1304cd776bb2f740c462c9b4b1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: ensure all known CVEs are in the reportRoss Burton2019-11-071-2/+7
| | | | | | | | | | | | | CVEs that are whitelisted or were not vulnerable when there are version comparisons were not included in the report, so alter the logic to ensure that all relevant CVEs are in the report for completeness. (From OE-Core rev: 98256ff05fcfe9d5ccad360582c36eafb577c264) (From OE-Core rev: 301887fc4b726e1040e1ff2045c70562624dc961) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-update-db-native: Remove hash column from database.Pierre Le Magourou2019-11-071-6/+6
| | | | | | | | | | | | | | djb2 hash algorithm was found to do collisions, so the database was sometime missing data. Remove this hash mechanism, clear and populate elements from scratch in PRODUCTS table if the current year needs an update. (From OE-Core rev: 78de2cb39d74b030cd4ec811bf6f9a6daa003d19) (From OE-Core rev: e6541c6add1714938a81cca394886893cf24cdb0) Signed-off-by: Pierre Le Magourou <pierre.lemagourou@softbankrobotics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Replace CVE_CHECK_CVE_WHITELIST by CVE_CHECK_WHITELISTPierre Le Magourou2019-11-071-11/+11
| | | | | | | | | | | | CVE_CHECK_WHITELIST does not contain version anymore, as it was not used. This variable should be set per recipe. (From OE-Core rev: 7069302a4ccbb5b72e1902f284cf078516fd7294) (From OE-Core rev: 8dd899679fc881d02e081d1e0814252d604dd479) Signed-off-by: Pierre Le Magourou <pierre.lemagourou@softbankrobotics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: allow comparison of Vendor as well as ProductRoss Burton2019-11-071-4/+8
| | | | | | | | | | | | | | | | | | Some product names are too vague to be searched without also matching the vendor, for example Flex could be the parser compiler we ship, or Adobe Flex, or Apache Flex, or IBM Flex. If entries in CVE_PRODUCT contain a colon then split it as vendor:product to improve the search. Also don't use .format() to construct SQL as that can lead to security issues. Instead, use ? placeholders and lets sqlite3 handle the escaping. (From OE-Core rev: e6bf90009877d00243417898700d2320fd87b39c) (From OE-Core rev: 0851d68b4679a7035029d28091d9a6b21d266c99) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check.bbclass: initialize to_appendMikko Rapeli2019-11-071-0/+1
| | | | | | | | | | | | | Fixes build failure with core-image-minimal: Exception: UnboundLocalError: local variable 'to_append' referenced before assignment (From OE-Core rev: 270ac00cb43d0614dfe1c95f960c76e9e5fa20d4) (From OE-Core rev: 45758c900ff738e58fd37ff809960965867d79f8) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: exclude child recipes from CVE scanningRoss Burton2019-11-071-3/+1
| | | | | | | | | | | | | | | | As glibc will be scanned for CVEs, we don't need to scan glibc-locale, glibc-mtrace, and glibc-scripts which are all separate recipes for technical reasons. Exclude the recipes by setting CVE_PRODUCT in the recipe, instead of using the global whitelist. (From OE-Core rev: 1f9a963b9ff7ebe052ba54b9fcbdf7d09478dd17) (From OE-Core rev: 2b9f1b654c726e7c7b2fe8710d60ca10212295f5) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: remove redundant readline CVE whitelistingRoss Burton2019-11-071-4/+9
| | | | | | | | | | | | | | CVE-2014-2524 is a readline CVE that was fixed in 6.3patch3 onwards, but the tooling wasn't able to detect this version. As we now ship readline 8 we don't need to manually whitelist it, and if we did then the whitelisting should be in the readline recipe. (From OE-Core rev: 07bb8b25e172aa5c8ae96b6e8eb4ac901b835219) (From OE-Core rev: c7f23d4e53d039838536f71996ad896c977cf138) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Update unpatched CVE matchingPierre Le Magourou2019-11-071-14/+40
| | | | | | | | | | | | Now that cve-update-db added CPE information to NVD database. We can check for unpatched versions with operators '<', '<=', '>', and '>='. (From OE-Core rev: bc0195be1b15bcffe60127bc5e8b7011a853c2ed) (From OE-Core rev: 48793a3b74bfaa5ffe6191d21f64aef3720433db) Signed-off-by: Pierre Le Magourou <pierre.lemagourou@softbankrobotics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Depends on cve-update-db-nativePierre Le Magourou2019-11-071-1/+1
| | | | | | | | | | | | | | do_populate_cve_db is a native task. (From OE-Core rev: 4078da92b49946848cddebe1735f301af161e162) (From OE-Core rev: 5d6cbab419770eb556b57445fd5509339d3142b4) Signed-off-by: Pierre Le Magourou <pierre.lemagourou@softbankrobotics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Conflicts: meta/conf/distro/include/maintainers.inc
* cve-update-db: Catch request.urlopen errors.Pierre Le Magourou2019-11-071-2/+3
| | | | | | | | | | | | | If the NVD url is not accessible, print a warning on top of the CVE report, and continue. The database will not be fully updated, but cve_check can still run on the previous database. (From OE-Core rev: 0325dd72714f0b447558084f481b77f0ec850eed) (From OE-Core rev: ae743789d893e950583014f38f0ad246aa4fe034) Signed-off-by: Pierre Le Magourou <pierre.lemagourou@softbankrobotics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: be idiomaticRoss Burton2019-11-071-8/+9
| | | | | | | | | | | | Instead of generating a series of indexes via range(len(list)), just iterate the list. (From OE-Core rev: 27eb839ee651c2d584db42d23bcf5dd764eb33f1) (From OE-Core rev: 27ef8c40afc27ce0ae87d2fe9a973edc89133def) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Consider CVE that affects versions with less than operatorPierre Le Magourou2019-11-071-2/+14
| | | | | | | | | | | | | | | | In the NVD json CVE feed, affected versions can be strictly matched to a version, but they can also be matched with the operator '<='. Add a new condition in the sqlite query to match affected versions that are defined with the operator '<='. Then use LooseVersion to discard all versions that are not relevant. (From OE-Core rev: 3bf63bc60848d91e90c23f6d854d22b78832aa2d) (From OE-Core rev: 70046288894184477dcf6f7eba25b1994b88c8de) Signed-off-by: Pierre Le Magourou <pierre.lemagourou@softbankrobotics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Manage CVE_PRODUCT with more than one namePierre Le Magourou2019-11-071-11/+14
| | | | | | | | | | | | In some rare cases (eg. curl recipe) the CVE_PRODUCT contains more than one name. (From OE-Core rev: 7f62a20b32a3d42f04ec58786a7d0db68ef1bb05) (From OE-Core rev: 4f96e9ba1f4f14f312b6024711fe8da0c3041e4c) Signed-off-by: Pierre Le Magourou <pierre.lemagourou@softbankrobotics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Remove dependency to cve-check-tool-nativePierre Le Magourou2019-11-071-45/+26
| | | | | | | | | | | Use the new update-cve-db recipe to update database. (From OE-Core rev: bc144b028f6f51252f4359248f6921028bcb6780) (From OE-Core rev: 6556bb30998d9d37f2389492eb7c15667ba4a827) Signed-off-by: Pierre Le Magourou <pierre.lemagourou@softbankrobotics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Switch from bz2 to xzRichard Purdie2019-11-071-2/+2
| | | | | | | | | | (From OE-Core rev: 29fc9210b973be68de474e75068e4c72371afe5a) (From OE-Core rev: b6645596f2d2faf8f1fdfbedfe1edd004fbce6bc) (From OE-Core rev: 151f7fb11bb4c91dd6edaebcc63fa3c1a2cbfe8b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm/archiver: Apply bandaid to src.rpm creationRichard Purdie2019-02-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | error: create archive failed on file /media/build1/poky/build/tmp/work/all-poky-linux/xcursor-transparent-theme/0.1.1+gitAUTOINC+23c8af5ba4-r0/deploy-sources/allarch-poky-linux/xcursor-transparent-theme-0.1.1+gitAUTOINC+23c8af5ba4-r0/xcursor-transparent-theme-0.1.1+git0+23c8af5ba4-r0.src.rpm: cpio: read failed - No such file or directory | Building target platforms: noarch-poky-linux | Building for target noarch-poky-linux This is caused by: $ cat log.task_order do_cleansstate (24289): log.do_cleansstate.24289 do_deploy_archives_setscene (24395): log.do_deploy_archives_setscene.24395 do_fetch (24407): log.do_fetch.24407 [..] do_package_write_rpm (25448): log.do_package_write_rpm.25448 do_package_qa (25451): log.do_package_qa.25451 So do_deploy_archives can run from sstate, created a .src.rpm in WORKDIR/deploy-sources, then it was removed when rpm was running. This leads to a broken Source line in the spec file as the original file was found by the os.listdir(). This fix is just a bandaid over much more fundamental problems sadly. (From OE-Core rev: a10020ace4c3cd863c782760f7cbecea557ec6e7) (From OE-Core rev: 6d56e912fbbaa22830b4da5ab230586a3d15b23e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver/package_rpm: Fix the worst src.rpm generation raceRichard Purdie2019-02-252-1/+7
| | | | | | | | | | | | | | | | | | | | The package_rpm code is writing outside the task's sstate directory into the sstate of do_deploy_archives. This is "out of spec" since if the task is installed from sstate, the files are not restored. This means the files may appear/disappear, things are not deterministic and there are races. Extend the do_package_write_rpm code to handle writing the src.rpm into place to avoid these issues. There are other problems but this avoids races around this file. (From OE-Core rev: c6e151ba7fe0f14044537cf0ab2cac436f1496e3) (From OE-Core rev: b119872fb794a36b6eb9ef5e9c42a9c6c991e835) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib_script: Add support for multilib scriptsRichard Purdie2019-02-251-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | Whilst the package managers handle multilib ELF binaries well, they don't handle scripts in the *bindir directories well. This adds support for marking these up so that they can be handled using update-alternatives. Its done this way so that non-multilib systems don't see any changes and there is standardisation amongst the multilibs on how the alternatives are named and prioritiesd. The priotitisation code needs to be added but this change means there is somewhere to add it. Recipe needs to set MULTILIB_SCRIPTS in the form <pkgname>:<scriptname>, e.g. MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/file1 ${PN}:${base_bindir}/file2" to indicate which script files to process from which packages. libtool is used a as a reference to stop the libtool scripts conflicting in a multilib case and allows the kernel-devsrc change to be merged. (From OE-Core rev: 18e837433d07cfdce4019c13f682c6676425a2ad) (From OE-Core rev: 97e2d65d1c406bc58fe693e500fcc939459bac1a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: use cpio-native to build cpio imagesRoss Burton2019-02-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | As per the previous commit, upstream cpio has a bug which means it crashes on append. If the image being built has already had testimage ran then cpio-native will be in the sysroot. It's also possible that some distributions are shipping this broken CVE patch too. Now that our cpio-native is fixed, until we can be sure that the host cpio isn't broken depend on cpio-native if building a cpio image. [ YOCTO #13042 ] (From OE-Core rev: c3b9aedcbe538d7fa74bd814644b4899769dec46) (From OE-Core rev: a75eba71145efa1c3d206c5e5c00608a50f013bc) (From OE-Core rev: 9e1c69932add702b9c5bc1faa9ef5db975de0ee3) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Only add uninative and checksum if inherited uninative classJeremy Puhlman2019-02-251-2/+3
| | | | | | | | | | | | | | The checksum value is only calculated if the uninative class is inherited, so check for inherit before adding it to local.conf (From OE-Core rev: 3b5b832589d943700b273e3a4d83561be0c47f36) (From OE-Core rev: 8e23a3d59421f34961f39a7db512e93eb9647ec6) Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: make it work for multiple usersRobert Yang2019-02-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: 872c6e5101f4f27dcfc63d141d1b6568f46d2b5f) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/classes/testimage.bbclass: Only validate IMAGE_FSTYPES when is QEMUAníbal Limón2019-02-251-6/+7
| | | | | | | | | | | | | | | | | 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) (From OE-Core rev: 05896e2f83ffef5262ccd3a0fa20b81b2a878957) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: remove boot parameter systemd.log_targetKai Kang2019-02-251-7/+1
| | | | | | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: 9d8a97b43c42b87c56d3b2ac318cb5482e86c397) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Add possibility to pass parmeters to qemuErik Botö2019-02-251-1/+4
| | | | | | | | | | | | | | | 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) (From OE-Core rev: 643457d350a921379600248f99d73374e6a2f5a2) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Add support for slirpYeoh Ee Peng2019-02-251-0/+5
| | | | | | | | | | | | | | | | Enable testimage to support qemu slirp. Configure "QEMU_USE_SLIRP" & "TEST_SERVER_IP" variables to enable slirp. [YOCTO#10713] (From OE-Core rev: 3df9ee85ce7fe52f0893fd33aea3bf1fcc6ead0a) (From OE-Core rev: 8bf8cbb82472a0547b62f94fafa5790cf67ff9cb) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Enable autorunning of the package manager testsuitesRichard Purdie2019-02-251-3/+1
| | | | | | | | | | | | | Now that the hangs in httpservice are fixed we can let these tests auto skip as appropriate. (From OE-Core rev: 42a0d70291d551578e21f590fcb85ca72a78ccb5) (From OE-Core rev: d82f2a0a17ecad5fdb2d2450f5048d00cf0448b1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Further cleanup DEFAULT_TEST_SUITESRichard Purdie2019-02-251-3/+1
| | | | | | | | | | | | | 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) (From OE-Core rev: 4b9641505f39718fe820eb199ed6554662d4d4cf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Simplfy DEFAULT_TEST_SUITES logicRichard Purdie2019-02-251-20/+11
| | | | | | | | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: eeee75d0a51ab7c15457b89233b7bb5254d7ee0b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Fix for sumo context] Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runtime/dnf: Add new dnf test casesJose Perez Carranza2019-02-251-3/+8
| | | | | | | | | | | | | | | | | 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) (From OE-Core rev: e1b050f53ece2a31cd6866d2d737d7c67a44cea4) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: don't assign the build user/hostFederico Sauter2019-02-251-2/+2
| | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: 2fac83ff87d9ad934250f712d2d0fd91fccb8728) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: Fix for QEMU_USE_KVMRobert Yang2019-02-251-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: de1b80f7f7b787f6b5b62c576ca6c62d2440031c) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patch: reproducibility: Fix host umask leakageDouglas Royds2019-02-251-0/+1
| | | | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: ae10351f4aa443fc6df5a674b0aae0731304254d) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: fix python unclosed file ResourceWarningChen Qi2019-02-251-1/+2
| | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: f8c111891066609ed40d11fee61ca9e29b5b6029) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Rework PACKAGELOCK based upon sstate for do_packagedataRichard Purdie2019-02-251-14/+9
| | | | | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: 1af1e9c23965637ab4a23b3eaf64192694c5448d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: fix qemu_use_kvm handlingEmmanuel Roullit2019-02-251-2/+2
| | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: 3383b1f9bb4aedfb88e888e88fe316e3f361c7bf) Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage/testsdk/selftest: Avoid platform.distro_identifier deprecation ↵Richard Purdie2019-02-252-2/+2
| | | | | | | | | | | | | | warnings Use our own lsb function instead as used elsewhere by the codebase. (From OE-Core rev: acac45a6fd604d28ef7c23d67482af3d7e8bcfe3) (From OE-Core rev: 570256a64af5a3fa994a20a5cc4c74d59ffc361f) (From OE-Core rev: d58fe9d352ae7de857e7f55b88f6e7d35b2cd706) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testsdk: Improvements to the json loggingRichard Purdie2018-12-161-18/+18
| | | | | | | | | | | | | 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 (From OE-Core rev: 31f0c5e59c7fb0ae0915de584fbfcf3d95bbb061) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Improvements to the json loggingRichard Purdie2018-12-161-14/+14
| | | | | | | | | | | | | | 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 (From OE-Core rev: fd07da4d46a8167807f6ce872497fbdc812494ad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-buildinfo,oeqa/selftest/containerimage: Ensure image-buildinfo doesn't ↵Richard Purdie2018-12-161-0/+2
| | | | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: f49ab8b1610c045acaed7b964d12f07f969df856) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testsdk.bbclass: write testresult to json filesYeoh Ee Peng2018-12-161-4/+32
| | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: eefb07907873d20f2e66d3784106f6f72030b5b2) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: write testresult to json filesYeoh Ee Peng2018-12-161-2/+29
| | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 2b8b47ec8ee835d2e70cc4ff3ec484f9e4e4d02d) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/threaded: Remove in favour of using concurrenttestsRichard Purdie2018-12-161-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: bb9a85e157e669d7a91c3bbefc8d5138e7b8b6ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Add check for WSLRichard Purdie2018-12-051-0/+11
| | | | | | | | | | | | | 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) (From OE-Core rev: 33a577864123833d7d8182fe90df7069fc583bc6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: avoid 'find -ignore_readdir_race -delete'Matthias Schiffer2018-11-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: 0808fe2c1b465114c16265bea3442e878586a8e6) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Drop unwanted directoriesFabien Lahoudere2018-11-241-1/+9
| | | | | | | | | | | | | | | | | 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) (From OE-Core rev: f0eebea19ff8d9dfd89d104be04ca3510a546424) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* crosssdk: Remove usage of host flags for cross-compilationRichard Purdie2018-11-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: 702917592ffca04fb1447fca60f6377ef96a57a0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Allow multiple entries in CVE_PRODUCTGrygorii Tertychnyi2018-11-161-1/+2
| | | | | | | | | | | | | | | | | | There are both "curl" and "libcurl" CPEs in NVD. All "curl" CVEs are currently missing in the reports. Hence, switch "CVE_PRODUCT" to a space separated list. It is useful for recipes generating several packages, that have different product names in NVD. (From OE-Core rev: 404f75e026393ddc55da87f6f04fb1201cff4e11) (From OE-Core rev: 667d5e77e1ce0f0e531ed87f6fc30e1d65b16759) Signed-off-by: Grygorii Tertychnyi <gtertych@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: specify dependencies for compilation for config tasksBruce Ashfield2018-11-162-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With recent kernels (i.e. 4.17+) the configuration phase of the kernel will check for capabilities/options of the compiler for CVE and other mitigation support. For a general kernel, we want to ensure that CC is fully defined when the config targets are invoked (so the proper compiler will be checked). For linux-yocto, we also need to specify the compiler/tools dependencies for the configme task since it executes before configure and hence the main kernel build DEPENDS will not always be in the sysroot before it executes. Without those dependencies the kernel will be incorrectly configured (i.e. bison is missing) or the configuration will fail the mitigation tests. [YOCTO #12757] (From OE-Core rev: ff1bdd75d50f0ebac3d599e461685ace29559a82) (From OE-Core rev: ec5cc387ca6828c5dbb3d36c9a92e2d7654c616a) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Sinan Kaya <okaya@kernel.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc.bbclass: Set BB_DONT_CACHE for non-target recipesOla x Nilsson2018-10-181-2/+2
| | | | | | | | | | | | | | | BB_DONT_CACHE was not set for non-virtual recipes where PN != BPN, such as quilt-native. Recipes that do not set BBCLASSEXTEND should always have BB_DONT_CACHE set by externalsrc. (From OE-Core rev: 4eff427a0ee629a1541a420a9591411648569a97) (From OE-Core rev: 30b055d2296f060a4ca054d042f353a2153fdd4e) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>