Skip to contentSkip to conversation

Using A Proprietary Closed License Inside A Layer & Its Recipes

DISCUSSION Thomas A. F. Thorne MEng AUS MIET 4 participants 7 messages Jun 15, 2017 – Jun 19, 2017

lore
Share & tools
lore
#0 lore raw

Good afternoon,

I am putting together a meta-company-name layer to hold some internal code. This will contain a few BSPs for our units, some internally developed applications and a few config file patches. I am having trouble getting recipes to be related to the proprietary license.

I have added "LICENSE" file to the root of the layer. I have also added a "licenses" directory that contains a single "companyname" file that has our standard copyright boiler plate in it. In the layer.conf file I have added
LICENSE_PATH += "${LAYERDIR}/licenses"

When inside a recipe.bb file set:
LICENSE = "companyname"
LIC_FILES_CHKSUM = "file://companyname;md5=260e42b87d2e3235853331775b597ad3"

I get set of errors from bitbake:
NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: recipe-0.1-r0 do_configure: QA Issue: recipe: LIC_FILES_CHKSUM
points to an invalid file:
/home/thomasthorne/work/yocto/build-lib/tmp/work/all-poky-linux/recipe/0.1-r0/companyname [license-checksum]
ERROR: recipe-0.1-r0 do_configure: Fatal QA errors found, failing task.
ERROR: recipe-0.1-r0 do_configure: Function failed: do_qa_configure
ERROR: Logfile of failure stored in:
/home/thomasthorne/work/yocto/build/tmp/work/all-poky-linux/recipe/0.1-r0/temp/log.do_configure.13583
ERROR: Task 487 (/home/thomasthorne/work/yocto/meta-companyname/recipes-companyname/recipe/recipe_0.1.bb, do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1557 tasks of which 1556 didn't need to
be rerun and 1 failed.

Should I be including a copy of the license in each recipe separately instead and then using LIC_FILES_CHKSUM = "file://companyname;md5=260e42b87d2e3235853331775b597ad3" (or pointing at a header with the beginline=5; endline=10 syntax)?

Is it only possible to use the special
LICENSE = "CLOSED"
license for licenses not already placed in the main license directory?

Any help or pointers would be very gratefully received. I have been having a confusing couple of hours with this so far.

Regards,

Signature · 1 line
Thomas Thorne  Software Engineer  Net2Edge Limited
#1 lore raw
Quoted 4 lines · Thomas A. F. Thorne MEng AUS MIET

Is it only possible to use the special
LICENSE = "CLOSED"
license for licenses not already placed in the main license directory?

Yes, there's special-case logic for 'CLOSED'. Can you not just use that for your internal pieces? It's special-cased in a few places.

Ross

#2 lore raw
Quoted 5 lines
Quoted 3 lines

Is it only possible to use the special
LICENSE = "CLOSED"
license for licenses not already placed in the main license directory?

Yes, there's special-case logic for 'CLOSED'. Can you not just use that for your internal pieces? It's special-cased in a few places.

I can use CLOSED. I just wanted to ensure I was following the recommended or best practice.

As this is an internal thing it should be OK for now. I was wondering what would happen if a closed licenses was updated, as nothing would currently note the md5 change.

The mega manual mentions CLOSED in 7 places. One of those places also lists "Proprietary" as a value so I could used either in some cases. Based on my reading of the manual "Proprietary" would not be exempt from setting up the LIC_FILES_CHKSUM, but CLOSED would be.

#3 lore raw
Quoted 6 lines · Thomas Thorne
Quoted 3 lines
Quoted 3 lines

Is it only possible to use the special
LICENSE = "CLOSED"
license for licenses not already placed in the main license

directory?

Quoted 2 lines

Yes, there's special-case logic for 'CLOSED'.  Can you not just use

Quoted 8 lines

that for your internal pieces?  It's special-cased in a few places.
I can use CLOSED.  I just wanted to ensure I was following the recommended or best practice.

As this is an internal thing it should be OK for now.  I was wondering what would happen if a closed licenses was updated, as nothing would currently note the md5 change.

FWIW: We created a proprietary license file called files/common- licenses/company.txt in our proprietary layer, then added the following to layer.conf:

COMPANY_COMMON_LICENSES := '${@os.path.normpath("${LAYERDIR}/files/com
mon-licenses")}'
BB_HASHBASE_WHITELIST_append = " COMPANY_COMMON_LICENSES"

Then a recipe can get the "standard" proprietary license by doing:

LIC_FILES_CHKSUM =
"file://${COMPANY_COMMON_LICENSES}/company.txt;md5=9b1139fa1fcb869069db eecca44350a5"

It works pretty well and also make it clear what license the recipe is under. I believe that the BB_HASHBASE_WHITELIST was necessary at the time to prevent changes in the project working path from causing a full rebuild of the all proprietary packages and so that the sstate signatures would match regardless, but I might be wrong about it being necessary.

Quoted 6 lines



The mega manual mentions CLOSED in 7 places.  One of those places also lists "Proprietary" as a value so I could used either in some cases.  Based on my reading of the manual "Proprietary" would not be exempt from setting up the LIC_FILES_CHKSUM, but CLOSED would be.

#4 lore raw
Quoted 30 lines · Joshua Watt
Quoted 6 lines · Thomas Thorne
Quoted 3 lines
Quoted 3 lines

Is it only possible to use the special
LICENSE = "CLOSED"
license for licenses not already placed in the main license

directory?

Quoted 2 lines

Yes, there's special-case logic for 'CLOSED'. Can you not just use

Quoted 8 lines

that for your internal pieces? It's special-cased in a few places.

I can use CLOSED. I just wanted to ensure I was following the recommended or best practice.

As this is an internal thing it should be OK for now. I was wondering what would happen if a closed licenses was updated, as nothing would currently note the md5 change.

FWIW: We created a proprietary license file called files/common- licenses/company.txt in our proprietary layer, then added the following to layer.conf:

COMPANY_COMMON_LICENSES := '${@os.path.normpath("${LAYERDIR}/files/com
mon-licenses")}'
BB_HASHBASE_WHITELIST_append = " COMPANY_COMMON_LICENSES"

Then a recipe can get the "standard" proprietary license by doing:

LIC_FILES_CHKSUM =
"file://${COMPANY_COMMON_LICENSES}/company.txt;md5=9b1139fa1fcb869069db eecca44350a5"

Quoted 6 lines

It works pretty well and also make it clear what license the recipe is under. I believe that the BB_HASHBASE_WHITELIST was necessary at the time to prevent changes in the project working path from causing a full rebuild of the all proprietary packages and so that the sstate signatures would match regardless, but I might be wrong about it being necessary.

is this still the case with latest master ?

#5 lore raw
Quoted 49 lines · Khem Raj
Quoted 37 lines · Joshua Watt
Quoted 9 lines · Thomas Thorne
Quoted 3 lines
Quoted 3 lines

Is it only possible to use the special
LICENSE = "CLOSED"
license for licenses not already placed in the main license

directory?

Quoted 3 lines

Yes, there's special-case logic for 'CLOSED'.  Can you not just use

Quoted 9 lines

that for your internal pieces?  It's special-cased in a few places.

I can use CLOSED.  I just wanted to ensure I was following the recommended or best practice.

As this is an internal thing it should be OK for now.  I was wondering what would happen if a closed licenses was updated, as nothing would currently note the md5 change.

FWIW: We created a proprietary license file called files/common- licenses/company.txt in our proprietary layer, then added the following
to layer.conf:

 COMPANY_COMMON_LICENSES := '${@os.path.normpath("${LAYERDIR}/files /com
mon-licenses")}'
 BB_HASHBASE_WHITELIST_append = " COMPANY_COMMON_LICENSES"

Then a recipe can get the "standard" proprietary license by doing:

 LIC_FILES_CHKSUM = "file://${COMPANY_COMMON_LICENSES}/company.txt;md5=9b1139fa1fcb8690 69db
eecca44350a5"

Quoted 10 lines

It works pretty well and also make it clear what license the recipe is
under. I believe that the BB_HASHBASE_WHITELIST was necessary at the
time to prevent changes in the project working path from causing a full
rebuild of the all proprietary packages and so that the sstate signatures would match regardless, but I might be wrong about it being
necessary.

Quoted 1 line

is this still the case with latest master ?

I don't actually know, and I don't think I should hazard a guess. We made this change all the way back in 1.6 (which was embarrassingly recent for us) and I haven't bother to check (mostly because I forgot about it until now).

Also as an aside, I think someone would probably tell me to use BB_HASHBASE_WHITELIST += "COMPANY_COMMON_LICENSES" these days instead of _append. When I was younger I had trouble knowing when to use one or the other ;)

Quoted 1 line
#6 lore raw
Quoted 16 lines
Quoted 16 lines

FWIW: We created a proprietary license file called files/common- licenses/company.txt in our proprietary layer, then added the following to layer.conf:

COMPANY_COMMON_LICENSES := '${@os.path.normpath("${LAYERDIR}/files
/com
mon-licenses")}'
BB_HASHBASE_WHITELIST_append = " COMPANY_COMMON_LICENSES"

Then a recipe can get the "standard" proprietary license by doing:

LIC_FILES_CHKSUM =
"file://${COMPANY_COMMON_LICENSES}/company.txt;md5=9b1139fa1fcb8690 69db
eecca44350a5"

Quoted 6 lines
Quoted 6 lines

It works pretty well and also make it clear what license the recipe is under. I believe that the BB_HASHBASE_WHITELIST was necessary at the time to prevent changes in the project working path from causing a full rebuild of the all proprietary packages and so that the sstate signatures would match regardless, but I might be wrong about it being necessary.

Thank you. Adding the COMPANY_COMMON_LICENSES and BB_HASHTABLE_WHITELIST_append worked great for me.

Quoted 1 line

is this still the case with latest master ?

I also tried commenting the "BB_HASHTABLE_WHITELIST_append = "COMPANY_COMMON_LICENSES"" line in the layer.conf file and it all worked fine still without any warnings besides the one for using Ubuntu 16.04.