Yocto上的程序包组和映像的许可证 [英] Licenses for packagegroups and images on Yocto

查看:127
本文介绍了Yocto上的程序包组和映像的许可证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建包含标准配方和我自己的配方的图像.我想列出所有包含的软件包中使用的许可证,然后再检查是否可以将其用于商业应用.例如

I am creating an image containing standard recipes and my owns. I wanted to list the licenses I use in all of the included packages and later check if I can use them for commercial application for example.

让我感到非常惊讶的是,包装组已经有一个LICENSE标志.我注意到它在做

I had the bad surprise packagegroups have a LICENSE flag already. I noticed it doing:

bitbake -e -n -v core-image-minimal | grep "LICENSE"

由于它是在bb文件中定义的,因此它返回 LICENSE = MIT .

It returns LICENSE=MIT since it is defined in the bb file.

但是我没有所有包含的软件包的信息.该MIT已手动放置在core-image-minimal.bb中,但我会对所有依赖项感兴趣.我的.bb文件有相同的问题.

But I have no information about all the included packages. This MIT has been put manually in the core-image-minimal.bb, but I'd be interested in all dependencies. I have the same issue for my .bb file.

方法1

一种解决方案是将每个许可证都设为INCOMPATIBLE_LICENSE,然后

A solution would be to put every license as INCOMPATIBLE_LICENSE and then

bitbake -k -n -e -v <recipe> | grep "incompatible with license"

然后检查弹出的那个,将它们添加到LICENSE_FLAGS_WHITELIST中,然后将它们从INCOMPATIBLE_LICENSE中删除并进行迭代.问题是,每次完成后,它都会再次解析整个工作空间,并且需要很长时间.

then check which one pops out, add them in LICENSE_FLAGS_WHITELIST and removing them from INCOMPATIBLE_LICENSE and iterate. Problem is, each time it's done, it parses again the whole workspace, and it takes ages.

在某处是否有脚本可以方便地进行检查?像Yocto一样的python总是如此.

Is there a script somewhere to check that easily? A python one like Yocto always does.

方法2 我编辑了meta/classes/license.bbclass并添加了

Approach 2 I edited meta/classes/license.bbclass and added

bb.warn('%s license is %s' %(pn, licenses))

在check_license_format函数的for循环中

.现在,它会为每个软件包打印许可证,但我想总结一下

in the for loop of check_license_format function. Now it prints license for each package, but I'd like to have sort of sum up

好的方法

因此,由于程序包管理"功能当前不适用于deb程序包,因此我无法编译整个配方(请阅读

So, I couldn't compile my whole recipe since the "package-management" feature doesn't currently work with deb packages (read here). Please adapt your image recipe and use @Roman Khimov's method down there. It's the clean way to do it.

推荐答案

您无需执行任何特殊操作,只需构建图像并查看build/tmp/deploy/licenses/$IMAGE_NAME-$MACHINE-$DATE/license.manifest中的清单文件(当然,如果您没有't重新定义LICENSE_DIRECTORY).

You don't need to do anything special, just build your image and look at the resulting manifest file in build/tmp/deploy/licenses/$IMAGE_NAME-$MACHINE-$DATE/license.manifest (if, of course, you didn't redefine LICENSE_DIRECTORY).

例如,如果我为自己的generic-amd64机器构建core-image-minimal,则会在build/tmp-musl/deploy/licenses/core-image-minimal-generic-amd64-20160818141324/license.manifest中得到结果:

For example, if I build core-image-minimal for my own generic-amd64 MACHINE I get the result in build/tmp-musl/deploy/licenses/core-image-minimal-generic-amd64-20160818141324/license.manifest:

PACKAGE NAME: base-files
PACKAGE VERSION: 3.0.14
RECIPE NAME: base-files
LICENSE: GPLv2

PACKAGE NAME: base-passwd
PACKAGE VERSION: 3.5.29
RECIPE NAME: base-passwd
LICENSE: GPLv2+
...

这篇关于Yocto上的程序包组和映像的许可证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆