Age | Commit message (Collapse) | Author | Files |
|
The license_create_manifest function contains bashism, this will lead
to unexpected results on ubuntu build host, as sh is linked to dash on
ubuntu. Even if COPY_LIC_MANIFEST and COPY_LIC_DIRS are enabled, the
license files will still be missing on target.
This patch fixes the above problem.
[YOCTO #5549]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
The expected usage of COPY_LIC_MANIFEST and COPY_LIC_DIRS appears to be
to set them to "1" to enable; however the test here is just testing
whether they have a value at all, so setting them to "0" would also
enable them which is somewhat disingenuous. Actually check if they are
set to "1" instead in order to fix this.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
It's LICENSE_FLAGS, LICENSE_FLAG is invalid.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
bb.fetch.decodeurl() will throw if it doesn't like the look of the URL that
it's given. (Bitbake's idea of what constitutes a valid URL is somewhat
idiosyncratic so it is fairly easy to trip over this by mistake when writing
a recipe.)
If these exceptions are allowed to propagate all the way up to better_exec()
then we will get a large amount of python stack trace spew when they are
finally caught. Avoid that by catching them locally and throwing
bb.build.FuncFailed() with a suitable explanation instead.
Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
bb.utils.copyfile is for a specific purpose and more complicated than needed
here, so just use shutil.copyfile.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
directory
Currently we have a hierarchy of pkgdata directories and the code has to put together
a search path and look through each in turn until it finds the data it needs.
This has lead to a number of hardcoded paths and file globing which
is unpredictable and undesirable. Worse, certain tricks that should be
easy like a GL specific package architecture become problematic with the
curretn search paths.
With the modern sstate code, we can do better and construct a single pkgdata
directory for each machine in just the same way as we do for the sysroot. This
is already tried and well tested. With such a single directory, all the code that
iterated through multiple pkgdata directories and simply be removed and give
a significant simplification of the code. Even existing build directories adapt
to the change well since the package contents doesn't change, just the location
they're installed to and the stamp for them.
The only complication is the we need a different shlibs directory for each
multilib. These are only used by package.bbclass and the simple fix is to
add MLPREFIX to the shlib directory name. This means the multilib packages will
repackage and the sstate checksum will change but an existing build directory
will adapt to the changes safely.
It is close to release however I believe the benefits this patch give us
are worth consideration for inclusion and give us more options for dealing
with problems like the GL one. It also sets the ground work well for
shlibs improvements in 1.6.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
These have been deprecated for a long time, convert the remaining
references to the correct modules and prepare for removal of the
compatibility support from bitbake.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
When we don't have a generic license file for the license in question, we can
warn, but we should still include it in the manifest, otherwise the manifest
doesn't reflect reality. Failing to include a license listed in the recipe in
the manifest can't be allowed.
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Package listing was implemented in the deb backend some time ago.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* as reported by Enrico on #oe
11:06:50 < ensc|w> JaMa: might this be caused by dc78ef91a2bf01efb8028c9afbe69e506e016265
which checks for 'd.getVar('LICENSE_CREATE_PACKAGE', True)' evaluating to 'True' for every
string (including the default 0)
(From OE-Core rev: bc42585ad9ca3a9891459ec3234893dff420b95b)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
is enabled
[YOCTO #3743]
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
function
* move it from do_populate_lic to find_license_files so we can reuse it
to populate license in package itself
[YOCTO #3743]
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
This gives us an error message (bb.fatal) rather than a traceback due to the
uncaught LicenseError.
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This was causing it to only obey the last of the elements in
INCOMPATIBLE_LICENSE.
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Recipes define the latter, as that's what goes into the binary packages, not
the former.
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Allow INCOMPATIBLE_LICENSE to be a whitespace-separated list of
incompatible license strings and/or glob patterns.
Also fix wildcarding: the string in INCOMPATIBLE_LICENSE was clearly
intended to match with wildcards (e.g. "*GPLv3" to match both GPLv3
and LGPLv3), but this was broken because of a bug in return_spdx()
which would die with a runtime error when there was no SPDXLICENSEMAP
entry for the string.
Signed-off-by: Andy Ross <andy.ross@windriver.com>
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
As locale packages are installed on the image, we should
be including them in the package/license manifest.
This ensures that the manifests are accurate and complete.
[ YOCTO #2461 ]
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Touch a file that is later greped to make sure it exists.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
Some bad logic in license.bbclass misses certain package level
LICENSEs.
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
do_package
This change means we have more flexibility about when to schedule the license
task and if it changes, we don't repackage everything (which is pointless).
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This requires the changes to bitbake.conf that allow parsing of
license.conf.
As we should now be parsing license.conf, we can move some globals
out of license.bblcass and into the conf file.
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
The variable mentioned in license.conf is LICENSE_PATH. The variable
used in license.bbclass is LICENSE_DIR. Conforming to what is in
license.conf
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
oe-core removed the prerequisite to have sh as bash. POSIX doesn't define
any options and furthermore allows 'echo -e' to be the default behavior.
This means that in dash 'echo -e' will actually print '-e' and interpret
backslashes by default. We use instead 'printf' builtin command with or
without '\n' to simulate 'echo -e' or 'echo -n'.
'printf' needs format while 'echo' can be used without any arguments. So
'echo >' was replaced by 'printf "" >'.
'echo' without '-n' flag adds a new line by default so to keep the same
behavior of two new lines while using 'echo "\n"', 'printf "\n\n"' is
used.
[YOCTO #3138]
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Cosmetic change, settle all found licenses into one line and report warning
about missing licenses loudly.
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
Trivial change, do not cut off plus symbol from license name, otherwise
information about package license is corrupted.
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
Trivial change, process LICENSE_${pkg} and LICENSE values. This fixes multiple
cases, when license is not specified at all in license.manifest
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
Cosmetic change, which improves code perception. Also check for locale
packages firstly, this shall improve performance a little.
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
Trivial typo bugfix, avoid multiple records in license.manifest.
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
Cosmetic change, saves space and reduces code line length.
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
non-SPDX license name in license.bbclass
Signed-off-by: Florin Sarbu <florin.sarbu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
While generating license.manifest package information is searched in:
filename=`ls ${TMPDIR}/pkgdata/*/runtime/${pkg}| head -1`
This is ok as long as package name is the same as the package name
after packaging.
For example dbus is packaged as dbus-1. So, searching
ls ${TMPDIR}/pkgdata/*/runtime/dbus-1 will fail because there is no file
with this package name.
Create a symlink to the pkgdata file in a runtime-reverse directory so
that these reverse lookups are possible.
Fixes [YOCTO #2638].
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
The bb and os modules are always imported so having these extra import calls
are a waste of space/execution time. They also set a bad example for people
copy and pasting code so clean them up.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Prepend the license manifest creation call to ROOTFS_POSTPROCESS_COMMAND
instead of appending to ROOTFS_POSTINSTALL_COMMAND. The latter is not
implemented for the deb backend (and probably ought to just be removed
completely), and by using _prepend we can still ensure it occurs before
package info is removed (and before buildhistory in case it is needed
there in future).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
|
This fixes an ugly way I was trying to find pkg runtime
data for package and license manifest creation.
rootfs generation times for core-image-minimal:
Prior to patch
real 0m41.570s
user 1m40.466s
sys 0m6.768s
With patch
real 0m27.527s
user 0m9.833s
sys 0m3.496s
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Conflicts:
meta/classes/license.bbclass
|
|
Per request, adding the package version to the package manifest
file.
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
|
|
A cleaner way to check if copyfile suceeded is to use os.path.isfile.
In this way we can omit warns in some python versions where copyfile
return the same non-0 value even is this action is successfull.
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
|
|
without this fix, we append license each time we build again the same image,
ending with a large not up to date file.
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
4 spaces. Correcting some bash whitespace in license to comply
with the style guide.
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This adds a few things to the incompatible license functionality
1. INCOMPATIBLE_LICENSE was unable to distinguish any variation
within LICENSE (e.g. GPLv3 v. GPLv3.0). This now utilizes the
SPDXLICENSEMAP of the license indicated as INCOMPATIBLE_LICENSE
2. Given a recipe where the main LICENSE was incompatible but
a package of the recipe was compatible, the entire recipe would
be excluded. This allows us some finer grained control over what
exactly gets excluded.
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Removing tabs within check_license_flags to standardize to
4 space tabbing
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Perl is GPL-1.0. For consistency sake, adding an spdx map for
GPLv1
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Fix a couple common typoes, all contained within comments so there
should be no effect on functionality.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Using "1" with getVar is bad coding style and "True" is preferred.
This patch is a sed over the meta directory of the form:
sed \
-e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \
-e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \
-i `grep -ril getVar *`
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This is to reduce the size of licenses added to images. With this
commit license.manifest, original license and generic license
adds about .5M to a core-image-minimal image, substantially less
than what is currently occuring when COPY_LIC_MANIFEST and
COPY_LIC_DIRS are set.
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We should look for LICENSE at a package level first. If it's
not found, we should use the recipe level LICENSE. This adds a
bit more granularity to license manifests where needed.
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
LICENSE_FLAGS are a per-recipe replacement for the COMMERCIAL_LICENSE
mechanism.
In the COMMERCIAL_LICENSE mechanism, any package name mentioned in the
global COMMERCIAL_LICENSE list is 'blacklisted' from being included in
an image. To allow the blacklisted package into the image, the
corresponding packages need to be removed from the COMMERCIAL_LICENSE
list. This mechanism relies on a global list defined in
default-distrovars.inc.
The LICENSE_FLAGS mechanism essentially implements the same thing but
turns the global blacklist into a per-recipe whitelist. Any recipe
can optionally define one or more 'license flags'; if defined, each of
the license flags defined for a recipe must have matching entries in a
global LICENSE_FLAGS_WHITELIST variable.
The definition of 'matching' is simple, but there are a couple things
users need to know in order to correctly and effectively use it.
Before we test a flag against the whitelist, we append _${PN} to it,
thus automatically making each LICENSE_FLAG recipe-specific. We then
try to match that string against the whitelist. So if the user
specifies LICENSE_FLAGS = 'commercial' for recipe 'foo', the string
'commercial_foo' should be specified in the whitelist in order for it
to match.
However, the user can also broaden the match by putting any
'_'-separated beginning subset of a LICENSE_FLAG in the whitelist,
which will also match e.g. simply specifying 'commercial' in the
whitelist would match any expanded LICENSE_FLAG starting with
'commercial' such as 'commercial_foo' and 'commercial_bar' which are
the strings that would have been automatically generated if those
recipes had simply specified LICENSE_FLAGS = 'commercial'
This allows for a range of specificity for the items in the whitelist,
from more general to perfectly specific. So users have the choice of
exhaustively enumerating each license flag in the whitelist to allow
only those specific recipes into the image, or of using a more general
string to pick up anything matching just the first component(s).
Note that this scheme works even if the flag already has _pn appended
- the extra _pn is redundant, but doesn't affect the outcome e.g. a
license flag of 'commercial_1.2_foo' would turn into
'commercial_1.2_foo_foo' and would match both the general 'commercial'
and the specific 'commercial_1.2_foo' as expected (it would also match
commercial_1.2_foo_foo' and 'commercial_1.2', which don't make much
sense as far as something a user would think of specifying in the
whitelist). For a versioned string, the user could instead specify
'commercial_foo_1.2', which would turn into 'commercial_foo_1.2_foo',
but which would as expected allow the user to pick up this package
along with anything else 'commercial' by specifying 'commercial' in
the whitelist, or anything with a 'commercial_foo' license regardless
of version by using 'commercial_foo' in the whitelist, or
'commercial_foo_1.1' to be completely specific about package and
version.
The current behavior of COMMERCIAL_LICENSE is replicated as mentioned
above by having the current set of COMMERCIAL_LICENSE flags
implemented using LICENSE_FLAGS = "commercial".
That being the case, the current COMMERCIAL_LICENSE can equivalently
be specified in the new scheme by putting the below in local.conf:
# This is a list of packages that require a commercial license to ship
# product. If shipped as part of an image these packages may have
# implications so they are disabled by default. To enable them,
# un-comment the below as appropriate.
#LICENSE_FLAGS_WHITELIST = "commercial_gst-fluendo-mp3 \
# commercial_gst-openmax \
# commercial_gst-plugins-ugly \
# commercial_lame \
# commercial_libmad \
# commercial_libomxil \
# commercial_mpeg2dec \
# commercial_qmmp"
The above allows all of the current COMMERCIAL_LICENSE packages in -
to disallow a particular package from appearing in the image, simply
remove it from the whitelist. To allow them all in, you could also
specify LICENSE_FLAGS_WHITELIST = "commercial".
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
|
|
SPDX license names
A new function was defined in license.bbclass in order to correctly exclude packages where OE-Style licence naming
is used. In this way licenses as GPL-3, GPLv3, GPLv3.0 etc will be excluded from a non-GPLv3 build. This function
takes into consideration if 'or' operand is used.
The function defined in license.bbclass is called in base.bbclass where packages are excluded based on
INCOMPATIBLE_LICENSE variable.
[YOCTO #1884]
[YOCTO #1844]
Signed-off-by: Andrei Gherzan <andrei at gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The manifest conditionals COPY_LIC_MANIFEST and COPY_LIC_DIRS
were returning true due to missing quotes in the bash test. This
made images larger than expected.
Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|