Commit Graph

253 Commits

Author SHA1 Message Date
Ross Burton bb81269c3d sanity: explain where TMPDIR is if we're telling the user to delete it
(From OE-Core rev: c03de901213846d7c8cc2a12a97034273aa904c3)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-05 23:22:12 +01:00
Richard Purdie 236a291abc sanity: Drop obsolete TMPDIR ABI conversions
When we get to version 12 we have a hard break as we can't convert to newer
versions. There is no point in running the old conversions on an old tmpdir
only to hit that block. Remove all the old conversions to avoid that and
make things clearer.

(From OE-Core rev: 163b27bdfe323b648929240375aaf251e8d5edf4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-31 10:10:29 +01:00
Juro Bystricky ab2caed31a sanity.bbclass: modify check for shell
Due to the recently implemented update-alternatives for bash binary,
sanity checker may end up with a (false-positive) error such as:

Error, /bin/sh links to /bin/bash.bash, must be dash or bash

This patch modifies the test: presence of "/bash" or "/dash" in shell binary
name results in pass.

[YOCTO#11108]

(From OE-Core rev: ef51746cdd12e6b08109e9bd90a0a465c3f9f93c)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16 22:11:32 +00:00
Andre McCurdy 3f3ced499c sanity.bbclass: allow s3 protocol when sanity checking MIRRORS, etc
Bitbake now supports an Amazon AWS S3 fetcher:

  http://git.openembedded.org/bitbake/commit/?id=6fe07ed25457dd7952b60f4b2153d56b15d5eea6

(From OE-Core rev: 5cc3592afc72bae8dd12d3d8ff15bb7418baaea3)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-10 14:50:10 +00:00
Richard Purdie 85188262f7 sanity: Allow whitespace only mirror entries
Forcing the use of "\n" in mirror variables is pointless, we can just require that
there are pairs of values. With the bitbake restriction relaxed, we can relax
the sanity check too.

(From OE-Core rev: 7313b10e242da9225211ca9fd53d14a121c5fa42)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-03 00:19:37 +00:00
Philip Balister b6939b7392 sanity.bbclass: Add which to SANITY_REQUIRED_UTILITIES.
Using docker with the Fedora 23 container exposed an issue with
the rpm-native configure step. If which is not present the configure
script fork bombs. After much pain, I tracked this to which not being
present in the default container. Add a check for which so others
do not have to have this experience.

(From OE-Core rev: 096c07900250db157bb0c38785b9d8efc6301cab)

Signed-off-by: Philip Balister <philip@balister.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 09:29:56 -08:00
Richard Purdie bfd0a39bdf classes: Drop now unneeded update_data calls
Now that the datastore works dynamically we don't need the update_data calls
so we can just remove them. They're not actually done anything at all for
a while.

(From OE-Core rev: 8de0c5d3bd01919e2bf0394f9c485936d6098cec)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 09:29:55 -08:00
Richard Purdie 3b4a36be50 sanity/abi-version: Force a clean TMPDIR after recipe specific sysroot changes
With the recipe specific sysroots, we need a clean tmpdir, else pseudo-native,
openssl-native, subversion-native and serf-native need to be manually cleaned.
After these there are probably more places where software doesn't rebuild correctly
even if we pass in new parameters to it.

The simplest solution is to force people to start from a clean TMPDIR since
everything would rebuild anyway.

(From OE-Core rev: da58e27a0f8fc8200f1953f05888834abd79c9f8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 23:30:14 +00:00
Juro Bystricky fe84f7b33e sanity.bbclass: Improved error message
When a non-existing MACHINE is specified, sanity check issues
the following message:

    Please set a valid MACHINE in your local.conf or environment

However, MACHINE can also be set in multiconfig .conf file(s).
Hence we may have several different MACHINE settings within one
(multiconfig) build, so the present error message is fairly
ambiguous.

This patch remedies this by explicitly naming the offending MACHINE and
by amending the list of places where this erroneous MACHINE definition
could have originated.

    MACHINE=xyz is invalid. Please set a valid MACHINE in your local.conf, environment or other configuration file.

[YOCTO#10810]

(From OE-Core rev: a7cb408dd784178197687a2129e936620bf6a0d3)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-17 11:31:36 +00:00
Richard Purdie 022a8b58c8 meta/scripts: Various getVar/getVarFlag expansion parameter fixes
There were a few straggling expansion parameter removals left for
getVar/getVarFlag where the odd whitespace meant they were missed
on previous passes. There were also some plain broken ussages such
as:

d.getVar('ALTERNATIVE_TARGET', old_name, True)
path = d.getVar('PATH', d, True)
d.getVar('IMAGE_ROOTFS', 'True')

which I've corrected (they happend to work by luck).

(From OE-Core rev: 688f7a64917a5ce5cbe12f8e5da4d47e265d240f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-09 13:39:11 +00:00
Joshua Lock c4e2c59088 meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Robert Yang 67e8ffcfa6 sanity.bbclass: fix check_connectivity() for BB_NO_NETWORK = "0"
The old code:
network_enabled = not d.getVar('BB_NO_NETWORK', True)

It is True only when BB_NO_NETWORK is not set (None),
but BB_NO_NETWORK = "0" should also be True while "1" means no network,
"0" means need network in a normal case.

(From OE-Core rev: 3d8db6cb992f96023a0486f64fe6b0f1ead04184)

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>
2016-11-23 11:10:13 +00:00
Robert Yang d755f0721a sanity.bbclass:check_connectivity(): print more error messages
This can help fix the problem when the error happens.

Now the error message is:
    Fetcher failure for URL: 'https://www.example.com/'. URL https://www.example.com/ doesn't work.
    Please ensure your host's network is configured correctly,
    or set BB_NO_NETWORK = "1" to disable network access if
    all required sources are on local disk.

(From OE-Core rev: 0b31a03c59efea3a8742762772e39dcbd6f8ed25)

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>
2016-11-23 11:10:13 +00:00
Markus Lehtonen 62b521722a sanity.bbclass: fix logging of an error
Fixes a crash in exception handler. All bb logging functions need an
string instances as arguments.

(From OE-Core rev: a675b2c89e477af088faee9b3be96eae19a85f0b)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-15 15:19:55 +00:00
Markus Lehtonen a24b2fa8f8 sanity.bbclass: split out config re-parse check
Split out the functionality doing configuration re-parse check into a
separate event handler that is hooked into ConfigParsed event. This will
make config re-parsing actually work. Re-parsing in bitbake is triggered
by setting BB_INVALIDCONF whose value is checked after configuration has
been parsed (after ConfigParsed event). However, previously
BB_INVALIDCONF was set in SanityCheck event handler which caused
re-parsing never to happen.

[YOCTO #10188]

(From OE-Core rev: 8fda70bb74f7c63d393d5424436d034d2cc6c05e)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:03 +01:00
Jérémy Rosen cc27fa238f sanity: fix hardcoded references to gcc
(From OE-Core rev: 89f55bf8e9d633cfb508a0885a462afb561c7cee)

Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:07 +01:00
Richard Purdie 7283c149df sanity.bbclass: Ensure we expand BUILD_PREFIX
This likely used to work when we expanded python functions and broke when
we stopped. Since it defaults to "", it never caused an issue but
is incorrect usage so fix it.

(From OE-Core rev: bfb395fdea642b306f110b4b8f1046f1992c622c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-20 16:06:02 +01:00
Olof Johansson 4b9c75a953 sanity.bbclass: Only verify /bin/sh link if it's a link
If /bin/sh is a regular file (and not a symlink), we assume it's a
reasonable shell and allow it.

(From OE-Core rev: eaa0dc21a5f058a39bd7867bd3cafdb3407abe36)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17 10:35:39 +01:00
Jeremy Puhlman dca3aba0f4 sanity: Switch urlparse to urllib.parse
urlparse is replaced with urllib.parse functionality in python3

(From OE-Core rev: ecfcc5dad20943b762a741546732a6c447265251)

Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:00 +01:00
Richard Purdie 297438e965 classes/lib: Convert to use python3 octal syntax
The syntax for octal values changed in python3, adapt to it.

(From OE-Core rev: 737a095fcde773a36e0fee1f27b74aaa88062386)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:00 +01:00
Richard Purdie 3c42280b8a sanity: Drop setting C locale
We really want the en_US locale as per the configuration and
previous patches. Don't set it back to C as things will break
under python3.

(From OE-Core rev: 42af63f326b03b32019c8b808b7ba07027f209b8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01 15:05:47 +01:00
Ross Burton 7b3061e5e7 sanity: check that the en_US.UTF-8 locale exists
(From OE-Core rev: 55e335d93fe74da3cce220f34bfedcfc47132806)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-30 15:58:10 +01:00
Ross Burton 29cf26363f sanity: allow sftp and ssh mirrors
URLs in MIRRORS and PREMIRRORS are vetted against a hard-coded list of protocols
which were missing sftp: and ssh:, so add them.

[ YOCTO #9444 ]

(From OE-Core rev: 036b26093e3c88dbb903a4a11d29c32c7516bc02)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-13 10:12:52 +01:00
Robert Yang b667f4dfdf sanity.bbclass: fix a hardcode in check_path_length()
* Fixed:
  410 -> limit

(From OE-Core rev: e5a4c3f8ea0d27ce2b3a3c33c231e28b7647f16b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06 22:57:26 +01:00
Richard Purdie c1436b32cf sanity: Increase minimum git version to 1.8.3.1
The kernel tools assume git > 1.7.9.5, I'm unsure of the exact version but
the oldest in our infrastructure is 1.8.3.1. The git fetcher also currently
has nasty workarounds for git < 1.7.9.2.

Moving to 1.8.3.1 as our minimum version seems sane at this point as the oldest
we're testing/supporting.

[YOCTO #6162]

(From OE-Core rev: dbae075f62ecceadacc6d847e5697b9f3339b168)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06 10:29:23 +01:00
Richard Purdie 2123a7ef28 sanity.bbclass: Use pythonexception to raise real exceptions without backtraces
If the sanity code encounters a version change is doesn't understand, the current
output is unreadable and confusing for the user, particularly due to the presence
of the backtrace.

Use improved functionality in bitbake to improve this and correctly pass python
exceptions around.

[YOCTO #9291]

(From OE-Core rev: a0860e308645f17dbf4b9005b2fc0e9869d730bf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31 09:15:04 +01:00
Paul Eggleton 39170fe6f1 classes/sanity: use proper multi-line string literals
A python string literal isn't meant to be split over multiple lines
unless it is explicitly multi-line. Use three quotes to indicate that.

(From OE-Core rev: 8cdb505bb3d9748be1744f36cbbfb4f62fa20b67)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28 15:55:48 +01:00
Bill Randle e33124f828 sanity.bbclass: check host tool dependencies on change in NATIVELSBSTRING
When a user upgrades their host distro, it may no longer have all the
required tools installed, but this won't be caught by bitbake resulting
in possible build errors. Rather than check for installed tools on every
startup, use the NATIVELSBSTRING change as indicator to rescan for host
tool dependencies. Store the NATIVELSBSTRING in the sanity_info file.

[YOCTO #8585]

(From OE-Core rev: e838b581397bbea9a0f4d74648fcc250073db1ae)

Signed-off-by: Bill Randle <william.c.randle@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:16 +00:00
Bill Randle 421289cbcc sanity.bbclass cleanup
Limit search for a version var name to start at the beginning of a line,
otherwise, if the var name is used in a comment, that comment line will
be replaced, rather than the desired assignment line.
Move bblayer update message into function where it's actually updated,
rather than assuming all successful config file update are to the
bblayers.conf file.
Replace a stray tab with spaces for consistency.

[Fixes YOCTO #9318]

(From OE-Core rev: 7c1e53bb802f021f06231243077d0e007a64274c)

Signed-off-by: Bill Randle <william.c.randle@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:15 +00:00
Patrick Ohly cad415dc2f sanity.bbclass: allow customizing config file update error messages
The default file pattern may be amiguous and "meld" might not always
be the preferred tool, so allow distros to override those parts of the
error messages.

(From OE-Core rev: 98fc50436dfa5d0e5bee0930154a5563ffc8151d)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20 23:12:28 +00:00
Patrick Ohly 96a5cb41fd sanity.bbclass: fix success message when config file was updated
The code now iterates over different config files, but always printed a
message about conf/bblayers.conf for each file.

(From OE-Core rev: af55727fc1920c4c23476304f57a3720835ec203)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20 23:12:28 +00:00
Patrick Ohly 805aca8192 sanity.bbclass: expand error messages for version checks
The ${WORKDIR} variable was not getting expanded (anymore?), leading to
less helpful error messages like:

   Exception: NotImplementedError: Your version of bblayers.conf has the wrong LCONF_VERSION (has 7, expecting 8).
   Please compare your file against bblayers.conf.sample and merge any changes before continuing.
   "meld conf/bblayers.conf ${COREBASE}/meta*/conf/bblayers.conf.sample"

   is a good way to visualise the changes.

   ERROR: Execution of event handler 'check_sanity_eventhandler' failed

After adding expansion, embedding ${LCONF_VERSION} and ${LAYER_CONF_VERSION}
in the error message seems a bit more readable and consistent.

(From OE-Core rev: 7fd08497cf780018fa144a870bdea0e7a69dae20)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20 23:12:28 +00:00
Peter Kjellerstedt 4eaef67a38 sanity: Do not mistake meta-yocto-bsp for meta-yocto
The code in oecore_update_bblayers() handling the transition from
meta-yocto to meta-poky was not very resilient. It would, e.g.,
mistake meta-yocto-bsp for meta-yocto if the former occurred before
the latter in BBLAYERS.

The code also failed to update multiple existences of meta-yocto in
the bblayers.conf file, e.g., if it was present in
BBLAYERS_NON_REMOVABLE in addition to BBLAYERS (which it is by
default).

(From OE-Core rev: 8deb14898f351bd33950291ccde7c4458c6cf506)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-02 23:08:51 +00:00
Robert Yang 86759deb5c sanity.bbclass: remove conflict checking for image vm and live
[YOCTO #9161]

(From OE-Core rev: f350bedf745b356a74e3a15d82055472796580fe)

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>
2016-03-02 23:08:51 +00:00
Richard Purdie 4006a7f276 sanity: Fix int verses string reference
The sanity update code needs to be passed an int, not string.

(From OE-Core rev: 390bad905537820f49add855c95d726b5b55c8fa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-28 22:54:09 +00:00
Richard Purdie 889a5cc221 mirrors/own-mirrors/sanity: Updates after npm fetcher addition
Update the classes after the addition of the npm fetcher to
match the other fetcher additions.

(From OE-Core rev: b91c5c94182ce08d4daccf85eaa0375daefc356e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-28 11:32:57 +00:00
Richard Purdie c1c6a9d64e sanity: Improve configuration upgrade capabilities (support meta-yocto -> poky transition)
Right now, only one configuration file can be processed (conf/bblayers.conf)
and it can only have one version number. This is a cause of immense friction
between OE-Core and Poky since if one needs a version change, it shouldn't
be forced on the other.

We'd like to rename the meta-yocto layer (within the meta-yocto repository)
to meta-poky. To do this, we need to correct the bblayers.conf file and that
means changing the sanity version. After the pain this caused the last time,
Paul made me promise never to have them out of sync between OE-Core and Poky,
equally, having every distro changing config update OE-Core isn't scalable
either.

This patch changes the sanity upgrade method to list a more generic format:

<config file>:<current version variable name>:<required version variable name>:<upgrade function>

This in theory allows us to support upgrades to any of the core
configuration files, and allow layers to extend them as needed. Files
with the same name can be handled in different layers by setting a unique
version name variable in the file itself. The upgrade code is only called
if the version variable is set.

To allow us to make the poky name change and use a new configuration file
name, one last version bump is included for poky to handle the transition.

(From OE-Core rev: 10fd24271e771ed12e36edcff0007caa1a4e67e4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-28 11:31:17 +00:00
Aníbal Limón 738a9b7cc3 classes/sanity: check_perl_modules provide output when fail
When check_perl_modules fail is a good idea to print perl
interpeter output for debug purposes.

(From OE-Core rev: 9e0ee11a59c545dba45947b7675f5bcef489a7c8)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 12:34:29 +00:00
Martin Jansa e2736f7db6 sanity.bbclass: add more information to error message about TUNE_PKGARCH missing in PACKAGE_ARCHS
* sometimes it's hard to see what's wrong here
* error message:
  Error, the PACKAGE_ARCHS variable does not contain TUNE_PKGARCH (cortexa7t2hfhf-vfp-vfpv4-neon).
  doesn't help much to understand what exactly went wrong and where

(From OE-Core rev: 4bedd149964b3b594d7b1a233a9cc436925288e9)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07 13:40:18 +00:00
Ross Burton b8ee7ae6b4 sanity: don't enforce DISPLAY for testimage
Now that qemurunner doesn't need DISPLAY set, let whether DISPLAY is set be up
to the user.

(From OE-Core rev: 259d1d1889b9349498d3f995a09466ce89bd3fcf)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-01 21:32:01 +00:00
Ross Burton 83a2bde15d sanity: check that the host has file installed
Now that file-native is ASSUME_PROVIDED, check that it's actually present.

(From OE-Core rev: 5dad6758980233f976e39357b91b9cc673a574af)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-27 07:24:29 +00:00
Alex Franco 96a5cfd656 sanity.bbclass: expand warning when chmod fails
As suggested, add exception message to warning in
sanity.bbclass when chmod fails on TMPDIR.

[YOCTO #7669]

(From OE-Core rev: f6609aca5c533325411567a79130114654c50f3b)

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-21 22:56:03 +01:00
Alex Franco c5aab3f63e sanity.bbclass: show warning when chmod fails
* for some reason this part of:
  http://patchwork.openembedded.org/patch/102561/
  wasn't ever merged.

[YOCTO #7669]

(From OE-Core rev: 95daa7c26d119ae11f1835ce0e895bbd4a3e9605)

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-28 12:00:20 +01:00
Christopher Larson 32633f0844 sanity.bbclass: remove abspath warning for SSTATE_MIRRORS
The sstate URI is relative to begin with, so it's completely valid to want to
alter it in a way that keeps it relative using a mirror, and I have real world
cases where this is causing issues. Remove the warning.

(From OE-Core rev: 6d20514b1289212991b4945ad267f85960dc945c)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-12 22:48:25 +01:00
Alex Franco cd61c1a6c5 Fix mode +st on TMPDIR when creating it
A sanity check fails when TMPDIR has setuid, setgid set. It was
proposed to fix this on TMPDIR creation instead of failing with
a sanity test only. This patch handles removal of those special
bits (and additonally, the sticky bit) from BUILDDIR and TMPDIR
when these directories are created.

[YOCTO #7669]

(From OE-Core rev: 8236d57439640a185c0226312cd4903a3ce2f53b)

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-01 11:43:58 +01:00
Mikko Rapeli f820d0275f sanity.bbclass: check SSTATE_DIR, DL_DIR and *MIRROR for broken symlinks
This change makes broken symlinks stand out clearly instead of bitbake
failing with odd error messages. Tested locally with broken symlink
as SSTATE_DIR, DL_DIR and SSTATE_MIRROR.

Change-Id: I2e92702237ab3bdb897d0bdefcf33480aabbc288
(From OE-Core rev: f635b9c00aa8a69130e471b9507f263a1ba081ff)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-11 09:28:50 -07:00
Christian Ziethén 2963cc25af image: Support for qcow2
Add support for qcow2 image format. Implemented in the same way as
the previously existing vmdk and vdi solutions.

(From OE-Core rev: c1f9ed400e4b5fe5be4fac86021dea11a7546035)

Signed-off-by: Christian Ziethén <christian.ziethen@linaro.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-25 14:41:43 +01:00
Mariano Lopez 0a5f2bc3e2 sanity.bbclass: Remove check if /tmp is writable
The check would be managed using BB_DISKMON_DIRS so this
removes the check from the sanity class.

[YOCTO #8000]

(From OE-Core rev: a1e8fa70f6990926b5db976fa1c333073c4f6d8d)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-21 23:53:44 +01:00
Mariano Lopez 45772bab32 sanity.bbclass: Check if /tmp is writable
Used mkstemp instead of raw open file call.
Also added the exception message to the output of
the sanity check.

[YOCTO #7922]

(From OE-Core rev: c101201b3aa7378e4c65a879040fe6f509e7cdcd)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-16 15:09:16 +01:00
Mariano Lopez cea20425a3 sanity.bbclass: Check if /tmp is writable
If /tmp can't be written, bitbake gaves an unrelated error.
This checks if /tmp can be written in every build.

[YOCTO #7922]

(From OE-Core rev: 10c7cf0683494ea1bf2cc6de9b121abf2a04b253)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-02 23:08:39 +01:00