[OE-core] [jethro][PATCH v2] license.bbclass: fix host contamination warnings for license files
Jagadeesh Krishnanjanappa
jkrishnanjanappa at mvista.com
Fri Nov 27 11:20:53 UTC 2015
>
>
>> >>> WARNING: Could not copy license file
>> >>>
>> /data/poky-master/tmp/work/corei7-64-poky-linux/gmp/6.0.0-r0/gmp-6.0.0/COPYING.LESSERv3
>> >>> to
>> >>>
>> /data/poky-master/tmp/work/corei7-64-poky-linux/gmp/6.0.0-r0/license-destdir/gmp/COPYING.LESSERv3:
>> >>> [Errno 1] Operation not permitted:
>> >>>
>> '/data/poky-master/tmp/work/corei7-64-poky-linux/gmp/6.0.0-r0/license-destdir/gmp/COPYING.LESSERv3'
>> >
>> > The above warning comes up during do_populate_lic task, and this task
>> > is not being executed in pseudo environment. So changing ownership of
>> > license files to root user (explicitly via "0") fails, as normal user
>> > doesn't have permissions to do so.
>> >
>> > In this case, use of os.getuid() and os.getgid() behaves correctly, by
>> > giving normal user id and solving this warning. So this is one
>> > advantage of using os.getuid() and os.getgid() over explicit "0".
>>
>> The real fix would be put this to run under pseudo, it seems.
>>
>>
> Running populate_lic under pseudo will solve this warning. I will send v3,
> if other members are fine with this solution.
>
> Update:
Running do_populate_lic task under pseudo is going solve "[Errno 1]
Operation not permitted:" warnings for target packages, but native packages
are going to have this warnings, as native packages
tasks are not executed under pseudo.
Example:
-- snip --
WARNING: Could not copy license file
/opt/work_jagadeesh/poky-jethro-14.0.0/build/tmp/work/x86_64-linux/zlib-native/1.2.8-r0/zlib-1.2.8/zlib.h
to
/opt/work_jagadeesh/poky-jethro-14.0.0/build/tmp/work/x86_64-linux/zlib-native/1.2.8-r0/license-destdir/zlib-native/zlib.h:
[Errno 1] Operation not permitted:
'/opt/work_jagadeesh/poky-jethro-14.0.0/build/tmp/work/x86_64-linux/zlib-native/1.2.8-r0/license-destdir/zlib-native/zlib.h'
WARNING: Could not copy license file
/opt/work_jagadeesh/poky-jethro-14.0.0/meta/files/common-licenses/Zlib to
/opt/work_jagadeesh/poky-jethro-14.0.0/build/tmp/work/x86_64-linux/zlib-native/1.2.8-r0/license-destdir/zlib-native/generic_Zlib:
[Errno 1] Operation not permitted:
'/opt/work_jagadeesh/poky-jethro-14.0.0/build/tmp/work/x86_64-linux/zlib-native/1.2.8-r0/license-destdir/zlib-native/generic_Zlib'
-- CUT --
Regards,
Jagadeesh
>> Otavio Salvador O.S. Systems
>> http://www.ossystems.com.br http://code.ossystems.com.br
>> Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20151127/ac799faa/attachment-0002.html>
More information about the Openembedded-core
mailing list