dl9pf / meta-spdxscanner

SPDX scanner support
MIT License
9 stars 10 forks source link

How to add meta-spdxscanner and analyze scancode in pocky. #21

Open soimkim opened 4 years ago

soimkim commented 4 years ago

I tried to analyze scancode by adding meta-spdxscanner in pocky, git://git.yoctoproject.org/poky.git (branch : master).

As I did below, I succeeded in building scancode-toolkit-native. Would you please let me know if there is a better way?

pocky$git clone git://git.openembedded.org/meta-python2 
pocky$ vi meta-python2/conf/layer.conf  
#LAYERDEPENDS_meta-python2
(Comment by adding the following variable #.)

poky/build$ vi conf/bblayers.conf
(Add meta-python2)

pocky$cd build
pock/build$ bitbake scancode-toolkit-native 

When the following error occurs: ERROR: scancode-toolkit-native-3.1.1-r0 do_configure: Execution of '/poky/build/tmp/work/x8
6_64-linux/scancode-toolkit-native/3.1.1-r0/temp/run.do_configure.8563' failed with exit code 127:
* Configuring ScanCode for first use...
/poky/build/tmp/work/x86_64-linux/scancode-toolkit-native/3.1.1-r0/git/configure: line 31:
python: command not found

-> 
pocky$ vi meta-spdxscanner/recipes-devtools/scancode-toolkit/scancode-toolkit-native_3.1.1.bb 
 Add  export PYTHON_EXE=${HOSTTOOLS_DIR}/python2 to do_configure
pocky$ vi meta/conf/bitbake.conf 
Add python2 to HOSTTOOLS 
leimaohui commented 4 years ago

Poky gave up python2, so I'm going to try make scancode-toolkit-native work under python3 environment. Please wait for a few days. By the way, meta-spdxscanner has been moved to http://git.yoctoproject.org, and doesn't maintained on github anymore. If you have patches, you can send your patch to yocto@lists.yoctoproject.org with [meta-spdxscanner] in the subject.

leimaohui commented 4 years ago

I updated the scancode-toolkit-native_3.1.1.bb, and works well on Ubuntu18.04. Can you have a try agin?

koansoftware commented 3 years ago

I am trying to understand how meta-spdxscanner works. I'd like to test it without any external service (no Fossology) therefore I am trying the INHERIT += "scancode-tk" approach.

I am testing it with a dunfell version and I noticed a lot of errors so I switched to master and the bitbake build started but again I am facing to a problem

ERROR: bash-completion-2.10-r0 do_get_report: Could not invoke scancode Command

I'd like to have advice from you to understand if is it possible to test it without any external service and discover what kind of artefacts are generated into deploy/spdx.