<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/license.bbclass, branch uninative-1.4</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-1.4</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-1.4'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2016-08-25T21:54:49+00:00</updated>
<entry>
<title>license.bbclass: do not process LICENSE_pn variables</title>
<updated>2016-08-25T21:54:49+00:00</updated>
<author>
<name>Markus Lehtonen</name>
<email>markus.lehtonen@linux.intel.com</email>
</author>
<published>2016-08-03T13:32:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=831e98325195f5631b977365fd61c3910a2c23a5'/>
<id>urn:sha1:831e98325195f5631b977365fd61c3910a2c23a5</id>
<content type='text'>
The loop iterating over LICENSE_pn variables has never worked. In
addition, the LICENSE variable is supposed to contain all licenses
defined in LICENSE_pn variables. Thus, it is simpler just to use LICENSE
as the data we get is essentially the same.

[YOCTO #9499]

(From OE-Core rev: d7229489c7dfd35164fd107d7944f3c273776118)

Signed-off-by: Markus Lehtonen &lt;markus.lehtonen@linux.intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>license: improve handling of license files with identical basenames</title>
<updated>2016-08-10T09:46:32+00:00</updated>
<author>
<name>Markus Lehtonen</name>
<email>markus.lehtonen@linux.intel.com</email>
</author>
<published>2016-08-05T10:23:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a48fea275b08ff3d3dfc9a928aeb04768db35873'/>
<id>urn:sha1:a48fea275b08ff3d3dfc9a928aeb04768db35873</id>
<content type='text'>
Previously, find_license_files() in license.bbclass just blindly assumed
that all different licenses specified in LIC_FILES_CHKSUM have unique
filenames. As a consequence, only the last one of these similarly named
license files was copied and the rest were "lost". This patch changes
the behavior so that all license files get copied. However, if multiple
identically named files are found, they are renamed to &lt;file&gt;.0,
&lt;file&gt;.1 etc.

The patch also changes the handling of NO_GENERIC_LICENSE slightly.
Previously, only basenames of NO_GENERIC_LICENSE and LIC_FILES_CHKSUM
were compared when searching for the correct license file. After this
patch NO_GENERIC_LICENSE must have the full path, matching what is
specified in LIC_FILES_CHKSUM. This is required in order to be able
to handle identical filenames (basenames) consistently. For example, if
you have:
LICENSE = "my-custom-license"
LIC_FILES_CHKSUM = "file://src/LICENCE;md5=d41d8cd98f00b204e9800998ecf8427e"

you must specify:
NO_GENERIC_LICENSE[my-custom-license] = "src/LICENCE"

[YOCTO #9663]

(From OE-Core rev: d5e1375884e509ec745bac43f1f7f7950f62f280)

Signed-off-by: Markus Lehtonen &lt;markus.lehtonen@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/license.bbclass: don't set [dirs] and [cleandirs]</title>
<updated>2016-07-20T09:28:49+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@intel.com</email>
</author>
<published>2016-07-07T13:34:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4fdfee4a78c9a30483eb5ccc01448fbce06afe9c'/>
<id>urn:sha1:4fdfee4a78c9a30483eb5ccc01448fbce06afe9c</id>
<content type='text'>
There's no need to set these as the restore from sstate will create the
directories as required.

(From OE-Core rev: 3ab3ebc06d22f0776091e39237235ea50c4503b2)

Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/license: handle EXDEV if hard link to license fails</title>
<updated>2016-06-15T17:05:22+00:00</updated>
<author>
<name>Manuel Huber</name>
<email>Manuel.h87@gmail.com</email>
</author>
<published>2016-06-11T07:50:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=66c5a4ad6232d7892fa893f596f4e8526ac83dc9'/>
<id>urn:sha1:66c5a4ad6232d7892fa893f596f4e8526ac83dc9</id>
<content type='text'>
Hard links can still fail even if st_dev is the same for source
and destination. In case of EXDEV error, fall back to copying.

(From OE-Core rev: c00423d6bab9849e331beadf4d3cee90e04fe295)

Signed-off-by: Manuel Huber &lt;manuel.h87@gmail.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/lib: Update to explictly create lists where needed</title>
<updated>2016-06-02T07:24:00+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2016-05-20T10:53:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=44e9a0d2fa759dea281fc32b602cd7878000c277'/>
<id>urn:sha1:44e9a0d2fa759dea281fc32b602cd7878000c277</id>
<content type='text'>
Iterators now return views, not lists in python3. Where we need
lists, handle this explicitly.

(From OE-Core rev: caebd862bac7eed725e0f0321bf50793671b5312)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/lib: Update to match python3 iter requirements</title>
<updated>2016-06-02T07:24:00+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2016-05-20T10:49:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8587bce564f715e46e7317218b5c190813d3a939'/>
<id>urn:sha1:8587bce564f715e46e7317218b5c190813d3a939</id>
<content type='text'>
python3 standardises its use of iteration operations. Update
the code to match the for python3 requires.

(From OE-Core rev: 2476bdcbef591e951d11d57d53f1315848758571)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>license.bbclass: make sure that image manifest dir exists</title>
<updated>2016-04-22T15:28:57+00:00</updated>
<author>
<name>Markus Lehtonen</name>
<email>markus.lehtonen@linux.intel.com</email>
</author>
<published>2016-04-21T11:03:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a9b503b268e94d311f892fa00c5d6bd9ffdb228e'/>
<id>urn:sha1:a9b503b268e94d311f892fa00c5d6bd9ffdb228e</id>
<content type='text'>
Previously, write_deploy_manifest() was relying on
write_package_manifest() to create the subdirectory for the manifest
file. However, do_rootfs may be an empty function so that
write_package_manifest() will not be called and the manifest
subdirectory will not be created, causing a build failure. This patch
fixes that by creating the directory hierarchy inside
write_deploy_manifest().

[YOCTO #9446]

(From OE-Core rev: e2dbe5eb869b8336b91023b83d7ca866197efa73)

Signed-off-by: Markus Lehtonen &lt;markus.lehtonen@linux.intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>license.bbclass: do write_deploy_manifest in image postprocessing</title>
<updated>2016-04-19T20:11:24+00:00</updated>
<author>
<name>Markus Lehtonen</name>
<email>markus.lehtonen@linux.intel.com</email>
</author>
<published>2016-04-19T11:17:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=98bf7dea84bb6ef960ff6e8755476f50779ee35c'/>
<id>urn:sha1:98bf7dea84bb6ef960ff6e8755476f50779ee35c</id>
<content type='text'>
Call write_deploy_manifest() in image postprocessing phase, instead of
rootfs postprocessing. The reason being that not necessarily all
do_deploy tasks are dependencies of the do_rootfs and we might miss
something.

[YOCTO #9446]

(From OE-Core rev: 1f35b05d60f4e84554c5ee837cb071815e12c91c)

Signed-off-by: Markus Lehtonen &lt;markus.lehtonen@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>license.bbclass: fix warnings when run in unprivileged "container" env</title>
<updated>2016-04-06T09:29:23+00:00</updated>
<author>
<name>Bjørn Forsman</name>
<email>bjorn.forsman@gmail.com</email>
</author>
<published>2016-04-04T19:02:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f7fed7ce75457a270443fba926eaf0fdcffbf998'/>
<id>urn:sha1:f7fed7ce75457a270443fba926eaf0fdcffbf998</id>
<content type='text'>
An unprivileged "container" environment like this[1] doesn't have root
account (uid 0) which causes tons of "Invalid argument" warnings:

  $ bitbake ...
  ...
  WARNING: Could not copy license file [src] to [dest]: [Errno 22] Invalid argument: '[src]'
  WARNING: Could not copy license file [src] to [dest]: [Errno 22] Invalid argument: '[src]'
  WARNING: Could not copy license file [src] to [dest]: [Errno 22] Invalid argument: '[src]'
  ...

Fix it by handling EINVAL similar to existing handling of EPERM (which
was added for when not running under pseudo).

[1]: The real environemnt is buildFHSUserEnv from NixOS/nixpkgs, but a
  demonstration of the issue can be done like this:

    $ touch f
    $ unshare --user --mount chown 0:0 f
    chown: changing ownership of ‘f’: Invalid argument

(From OE-Core rev: d00b2250a6afebd7d1373c04b4006290f0cd4043)

Signed-off-by: Bjørn Forsman &lt;bjorn.forsman@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>license.bbclass: fix host contamination warnings for license files</title>
<updated>2016-03-09T16:58:12+00:00</updated>
<author>
<name>Jagadeesh Krishnanjanappa</name>
<email>jkrishnanjanappa@mvista.com</email>
</author>
<published>2015-11-28T08:09:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b051a953fc249785cf1f1852a7791e59dee1707c'/>
<id>urn:sha1:b051a953fc249785cf1f1852a7791e59dee1707c</id>
<content type='text'>
We get below host contamination warnings of license files for
each recipe, when we try to create a separate ${PN}-lic package (which
contains license files), by setting LICENSE_CREATE_PACKAGE equal to "1"
in local.conf.

-- snip --
WARNING: QA Issue: libcgroup: /libcgroup-lic/usr/share/licenses/libcgroup/generic_LGPLv2.1 is owned by uid 5001, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]
WARNING: QA Issue: attr: /attr-lic/usr/share/licenses/attr/libattr.c is owned by uid 5001, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]
WARNING: QA Issue: bash: /bash-lic/usr/share/licenses/bash/COPYING is owned by uid 5001, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]
-- CUT --

Since the license files from source and OE-core, are populated in a normal
shell environment rather in pseudo environment (fakeroot); the ownership of
these files will be same as host user running bitbake. During the do_package
task (which runs in pseudo environment (fakeroot)), os.link preserves the
ownership of these license files as host user instead of root user.
This causes license files to have UID same as host user id and resulting in
above warnings during do_package_qa task.

Changing ownership of license files to root user (which has UID and GID as 0)
under pseudo environment will solve above warnings, and on exiting pseudo
environment the license files will continue to be owned by host user. Perform
this manipulation within try/except statements, as tasks which are not exected
under pseudo (such as do_populate_lic) result in OSError when trying to
change ownership of license files.

(From OE-Core rev: a411e96c3989bc9ffbd870b54cd6a7ad2e9f2c61)

Signed-off-by: Jagadeesh Krishnanjanappa &lt;jkrishnanjanappa@mvista.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
