[OE-core] automated license reporting

Khem Raj raj.khem at gmail.com
Fri May 10 19:56:39 UTC 2019



On 5/3/19 4:14 AM, Rob Walton wrote:
> Hi,
> 
> 
> We're working with OpenEmbedded/yocto in a project; we're trying to 
> create an HTML license report for our users, leveraging the 
> license.manifest files output from license_image.bbclass.
> 
> 
> However some relatively crucial information relevant to the report isn't 
> provided in the manifests. The extra information I'm interested in is 
> the contents of the HOMEPAGE and SUMMARY variables for each package/blob 
> recorded by the manifest.
> 
> 
> I'm proposing to submit a patch to add the following to 
> `write_license_files`:
> 
> 
> -                license_file.write("LICENSE: %s\n\n" % 
> pkg_dic[pkg]["LICENSE"])
> -
> +                license_file.write("LICENSE: %s\n" % 
> pkg_dic[pkg]["LICENSE"])
> +                license_file.write("SUMMARY: %s\n" % 
> pkg_dic[pkg].get("SUMMARY", ""))
> +                license_file.write("HOMEPAGE: %s\n\n" % 
> pkg_dic[pkg].get("HOMEPAGE", ""))
> 
> At the moment it isn't a problem for us if this extra information is 
> missing for /some/ packages, as long as it is included at least once per 
> recipe (which is the case).
> 
> 
> The above patch would rely on another patch to add extra output in 
> package.bbclass::emit_pkg_data
> 
> 
> +        write_if_exists(sf, pkg, 'HOMEPAGE')
> 
> We also have a bbclass to convert the license.manifest(s) to JSON format 
> for easier machine readability, so we can automate this process in our 
> build system. This bbclass is also potentially upstreamable.

Please propose it for review.

> 
> My questions are: Would members of the community object to these 
> patches? Are there any other suggestions for grabbing this extra info 
> without submitting the patches? Would anyone else in the community find 
> this useful?

These are probably fine, as there is no standard manifest requirements 
around what this proposal is achieving, but having it covered via a knob
(variable) and turned off by default is probably fine. Eventually if it
is deemed useful we can make it default, this is to consider the fact 
that people might have their own post processing tools which are built 
around current format of the manifest file.

> 
> 
> Thanks,
> 
> 
> Rob
> 
> IMPORTANT NOTICE: The contents of this email and any attachments are 
> confidential and may also be privileged. If you are not the intended 
> recipient, please notify the sender immediately and do not disclose the 
> contents to any other person, use it for any purpose, or store or copy 
> the information in any medium. Thank you.
> 


More information about the Openembedded-core mailing list