Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0 SPEC
Hi Simon > Where do we stand: > - v1 of patch submitted > - comment to create/use dosocs-native tp avoid the separate install (well, +1) > - comment that "the following direct dependencies that not belong to oe-core" Sorry, I mean it's difficult to add them all into oe-core, because as you know, oe-core only contains base layer of recipes. But I don't think these recipes are base enough. So, I think it's easier to let user install dosocs themselves. > @Lei: can you find where those dependencies are ? > (https://layers.openembedded.org/layerindex/branch/morty/recipes/) The situation of these dependences is the following: PostgreSQL - meta-oe python-psycopg2 - meta-openstack jinja2 - meta-python/meta-openstack docopt - not found SQLAlchemy - meta-python Best regards Lei > -Original Message- > From: Jan-Simon Möller [mailto:dl...@gmx.de] > Sent: Thursday, November 03, 2016 5:06 PM > To: Lei, Maohui > Cc: Maxin B. John; openembedded-core@lists.openembedded.org > Subject: Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0 SPEC > > Hi Lei, Maxin! > > Where do we stand: > - v1 of patch submitted > - comment to create/use dosocs-native tp avoid the separate install (well, +1) > - comment that "the following direct dependencies that not belong to oe-core" > > Did I summarize that correctly ? > > @Maxin: what would you propose, work on the dependencies or let the user > install ? > @Lei: can you find where those dependencies are ? > (https://layers.openembedded.org/layerindex/branch/morty/recipes/) > > Best, > Jan-Simon > > Am Donnerstag, 3. November 2016, 04:02:42 schrieb Lei, Maohui: > > Ping. > > > > > > > > > -Original Message- > > > From: openembedded-core-boun...@lists.openembedded.org > > > [mailto:openembedded- > core-boun...@lists.openembedded.org] On Behalf Of > > > Lei, Maohui > > > Sent: Monday, October 17, 2016 9:04 AM > > > To: Maxin B. John; Jan-Simon Möller > > > Cc: jsmoel...@linuxfoundation.org; > > > openembedded-core@lists.openembedded.org > Subject: Re: [OE-core] [PATCH > > > v2 1/1] Make yocto-spdx support spdx2.0 SPEC Hi Maxin, Simon > > > > > > > > > > > Instead of requesting the user to install the DoSOCSv2 from github > > > > > or other repos, can we make the spdx.bbclass depend on > > > > > "dosocs-native" > > > > > > > > or > > > > > > > > > similar and make that "DoSOCSv2" recipe available in oe-core ? > > > > > > > > > > > > > > > > That's a good idea. I will try. > > > > > > > > > I tried to make DoSOCSv2 recipe to oe-core, and find that there are at > > > least > the following direct dependencies that not belong to oe-core. > > > > > > PostgreSQL > > > python-psycopg2 > > > jinja2 > > > python-magic > > > docopt > > > SQLAlchemy > > > psycopg2 > > > > > > I think it difficult to add them all into oe-core and it's the reason that > > > why > the original spdx module didn't add fossology into oe-core. > > > > > > > > > > > > Best regards > > > Lei > > > > > > > > > > > > > -Original Message- > > > > From: openembedded-core-boun...@lists.openembedded.org > > > > [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of > > > > Lei, Maohui > > > > Sent: Thursday, September 22, 2016 10:19 AM > > > > To: Maxin B. John; Jan-Simon Möller > > > > Cc: jsmoel...@linuxfoundation.org; openembedded- > > > > c...@lists.openembedded.org > > > > Subject: Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0 > > > > SPEC > > > > > > > > > > > > > > > > Hi Maxin, Simon > > > > > > > > > > > > > > > > > It would be nice to include the reason for change from fossology to > > > > > dosocs2 in the commit message too (from cover letter) > > > > > > > > > > > > > > > > OK, I will add the reasons into the commit message in v3. > > > > > > > > > > > > > > > > > Instead of requesting the user to install the DoSOCSv2 from github > > > > > or other repos, can we make the spdx.bbclass depend on > > > > > "dosocs-native" &
Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0 SPEC
Hi Lei, Maxin! Where do we stand: - v1 of patch submitted - comment to create/use dosocs-native tp avoid the separate install (well, +1) - comment that "the following direct dependencies that not belong to oe-core" Did I summarize that correctly ? @Maxin: what would you propose, work on the dependencies or let the user install ? @Lei: can you find where those dependencies are ? (https://layers.openembedded.org/layerindex/branch/morty/recipes/) Best, Jan-Simon Am Donnerstag, 3. November 2016, 04:02:42 schrieb Lei, Maohui: > Ping. > > > > > -Original Message- > > From: openembedded-core-boun...@lists.openembedded.org > > [mailto:openembedded- core-boun...@lists.openembedded.org] On Behalf Of > > Lei, Maohui > > Sent: Monday, October 17, 2016 9:04 AM > > To: Maxin B. John; Jan-Simon Möller > > Cc: jsmoel...@linuxfoundation.org; > > openembedded-core@lists.openembedded.org Subject: Re: [OE-core] [PATCH > > v2 1/1] Make yocto-spdx support spdx2.0 SPEC > > Hi Maxin, Simon > > > > > > > > Instead of requesting the user to install the DoSOCSv2 from github > > > > or other repos, can we make the spdx.bbclass depend on > > > > "dosocs-native" > > > > > > or > > > > > > > similar and make that "DoSOCSv2" recipe available in oe-core ? > > > > > > > > > > > > That's a good idea. I will try. > > > > > > I tried to make DoSOCSv2 recipe to oe-core, and find that there are at > > least the following direct dependencies that not belong to oe-core. > > > > PostgreSQL > > python-psycopg2 > > jinja2 > > python-magic > > docopt > > SQLAlchemy > > psycopg2 > > > > I think it difficult to add them all into oe-core and it's the reason that > > why the original spdx module didn't add fossology into oe-core. > > > > > > > > Best regards > > Lei > > > > > > > > > -Original Message- > > > From: openembedded-core-boun...@lists.openembedded.org > > > [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of > > > Lei, Maohui > > > Sent: Thursday, September 22, 2016 10:19 AM > > > To: Maxin B. John; Jan-Simon Möller > > > Cc: jsmoel...@linuxfoundation.org; openembedded- > > > c...@lists.openembedded.org > > > Subject: Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0 > > > SPEC > > > > > > > > > > > > Hi Maxin, Simon > > > > > > > > > > > > > It would be nice to include the reason for change from fossology to > > > > dosocs2 in the commit message too (from cover letter) > > > > > > > > > > > > OK, I will add the reasons into the commit message in v3. > > > > > > > > > > > > > Instead of requesting the user to install the DoSOCSv2 from github > > > > or other repos, can we make the spdx.bbclass depend on > > > > "dosocs-native" > > > > > > or > > > > > > > similar and make that "DoSOCSv2" recipe available in oe-core ? > > > > > > > > > > > > That's a good idea. I will try. > > > > > > > > > > > > > > > Best Regards > > > Lei > > > > > > > > > > > > > > > > -Original Message- > > > > From: Maxin B. John [mailto:maxin.j...@intel.com] > > > > Sent: Monday, September 19, 2016 6:58 PM > > > > To: Lei, Maohui > > > > Cc: openembedded-core@lists.openembedded.org; > > > > jsmoel...@linuxfoundation.org > > > > Subject: Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support > > > > spdx2.0 SPEC > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > Please find my comments below: > > > > > > > > > > > > > > > > On Mon, Sep 19, 2016 at 04:39:50PM +0800, Lei Maohui wrote: > > > > > > > > > More: > > > > > - change spdx tool from fossology to dosocs2 > > > > > > > > > > > > > > > > It would be nice to include the reason for change from fossology to > > > > dosocs2 in the commit message too (from cover letter) > > > > > > > > > > > > > > > > > Signed-of
Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0 SPEC
Ping. > -Original Message- > From: openembedded-core-boun...@lists.openembedded.org [mailto:openembedded- > core-boun...@lists.openembedded.org] On Behalf Of Lei, Maohui > Sent: Monday, October 17, 2016 9:04 AM > To: Maxin B. John; Jan-Simon Möller > Cc: jsmoel...@linuxfoundation.org; openembedded-core@lists.openembedded.org > Subject: Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0 SPEC > > Hi Maxin, Simon > > > > Instead of requesting the user to install the DoSOCSv2 from github > > > or other repos, can we make the spdx.bbclass depend on "dosocs-native" > > or > > > similar and make that "DoSOCSv2" recipe available in oe-core ? > > > > That's a good idea. I will try. > > I tried to make DoSOCSv2 recipe to oe-core, and find that there are at least > the following direct dependencies that not belong to oe-core. > > PostgreSQL > python-psycopg2 > jinja2 > python-magic > docopt > SQLAlchemy > psycopg2 > > I think it difficult to add them all into oe-core and it's the reason that why > the original spdx module didn't add fossology into oe-core. > > > > Best regards > Lei > > > > -Original Message- > > From: openembedded-core-boun...@lists.openembedded.org > > [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of > > Lei, Maohui > > Sent: Thursday, September 22, 2016 10:19 AM > > To: Maxin B. John; Jan-Simon Möller > > Cc: jsmoel...@linuxfoundation.org; openembedded- > > c...@lists.openembedded.org > > Subject: Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0 > > SPEC > > > > Hi Maxin, Simon > > > > > It would be nice to include the reason for change from fossology to > > > dosocs2 in the commit message too (from cover letter) > > > > OK, I will add the reasons into the commit message in v3. > > > > > Instead of requesting the user to install the DoSOCSv2 from github > > > or other repos, can we make the spdx.bbclass depend on "dosocs-native" > > or > > > similar and make that "DoSOCSv2" recipe available in oe-core ? > > > > That's a good idea. I will try. > > > > > > Best Regards > > Lei > > > > > > > -Original Message- > > > From: Maxin B. John [mailto:maxin.j...@intel.com] > > > Sent: Monday, September 19, 2016 6:58 PM > > > To: Lei, Maohui > > > Cc: openembedded-core@lists.openembedded.org; > > > jsmoel...@linuxfoundation.org > > > Subject: Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support > > > spdx2.0 SPEC > > > > > > Hi, > > > > > > Please find my comments below: > > > > > > On Mon, Sep 19, 2016 at 04:39:50PM +0800, Lei Maohui wrote: > > > > More: > > > > - change spdx tool from fossology to dosocs2 > > > > > > It would be nice to include the reason for change from fossology to > > > dosocs2 in the commit message too (from cover letter) > > > > > > > Signed-off-by: Lei Maohui <leimao...@cn.fujitsu.com> > > > > --- > > > > meta/classes/spdx.bbclass | 505 > > > > ++-- > > > -- > > > > meta/conf/licenses.conf | 67 +- > > > > 2 files changed, 198 insertions(+), 374 deletions(-) > > > > > > > > diff --git a/meta/classes/spdx.bbclass b/meta/classes/spdx.bbclass > > > > index 0c92765..27c0fa0 100644 > > > > --- a/meta/classes/spdx.bbclass > > > > +++ b/meta/classes/spdx.bbclass > > > > @@ -1,365 +1,252 @@ > > > > # This class integrates real-time license scanning, generation of > > > > SPDX standard # output and verifiying license info during the > > > building process. > > > > -# It is a combination of efforts from the OE-Core, SPDX and > > > Fossology projects. > > > > +# It is a combination of efforts from the OE-Core, SPDX and > > > > +DoSOCSv2 > > > projects. > > > > # > > > > -# For more information on FOSSology: > > > > -# http://www.fossology.org > > > > -# > > > > -# For more information on FOSSologySPDX commandline: > > > > -# https://github.com/spdx-tools/fossology-spdx/wiki/Fossology- > > > SPDX-Web-API > > > > +# For more information on DoSOCSv2: > > > > +# https://github.com/DoSOCSv2 > > > > > > Instead of requesting the user to install the
Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0 SPEC
Hi Maxin, Simon > > Instead of requesting the user to install the DoSOCSv2 from github or > > other repos, can we make the spdx.bbclass depend on "dosocs-native" > or > > similar and make that "DoSOCSv2" recipe available in oe-core ? > > That's a good idea. I will try. I tried to make DoSOCSv2 recipe to oe-core, and find that there are at least the following direct dependencies that not belong to oe-core. PostgreSQL python-psycopg2 jinja2 python-magic docopt SQLAlchemy psycopg2 I think it difficult to add them all into oe-core and it's the reason that why the original spdx module didn't add fossology into oe-core. Best regards Lei > -Original Message- > From: openembedded-core-boun...@lists.openembedded.org > [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of > Lei, Maohui > Sent: Thursday, September 22, 2016 10:19 AM > To: Maxin B. John; Jan-Simon Möller > Cc: jsmoel...@linuxfoundation.org; openembedded- > c...@lists.openembedded.org > Subject: Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0 > SPEC > > Hi Maxin, Simon > > > It would be nice to include the reason for change from fossology to > > dosocs2 in the commit message too (from cover letter) > > OK, I will add the reasons into the commit message in v3. > > > Instead of requesting the user to install the DoSOCSv2 from github or > > other repos, can we make the spdx.bbclass depend on "dosocs-native" > or > > similar and make that "DoSOCSv2" recipe available in oe-core ? > > That's a good idea. I will try. > > > Best Regards > Lei > > > > -Original Message- > > From: Maxin B. John [mailto:maxin.j...@intel.com] > > Sent: Monday, September 19, 2016 6:58 PM > > To: Lei, Maohui > > Cc: openembedded-core@lists.openembedded.org; > > jsmoel...@linuxfoundation.org > > Subject: Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0 > > SPEC > > > > Hi, > > > > Please find my comments below: > > > > On Mon, Sep 19, 2016 at 04:39:50PM +0800, Lei Maohui wrote: > > > More: > > > - change spdx tool from fossology to dosocs2 > > > > It would be nice to include the reason for change from fossology to > > dosocs2 in the commit message too (from cover letter) > > > > > Signed-off-by: Lei Maohui <leimao...@cn.fujitsu.com> > > > --- > > > meta/classes/spdx.bbclass | 505 > > > ++-- > > -- > > > meta/conf/licenses.conf | 67 +- > > > 2 files changed, 198 insertions(+), 374 deletions(-) > > > > > > diff --git a/meta/classes/spdx.bbclass b/meta/classes/spdx.bbclass > > > index 0c92765..27c0fa0 100644 > > > --- a/meta/classes/spdx.bbclass > > > +++ b/meta/classes/spdx.bbclass > > > @@ -1,365 +1,252 @@ > > > # This class integrates real-time license scanning, generation of > > > SPDX standard # output and verifiying license info during the > > building process. > > > -# It is a combination of efforts from the OE-Core, SPDX and > > Fossology projects. > > > +# It is a combination of efforts from the OE-Core, SPDX and > > > +DoSOCSv2 > > projects. > > > # > > > -# For more information on FOSSology: > > > -# http://www.fossology.org > > > -# > > > -# For more information on FOSSologySPDX commandline: > > > -# https://github.com/spdx-tools/fossology-spdx/wiki/Fossology- > > SPDX-Web-API > > > +# For more information on DoSOCSv2: > > > +# https://github.com/DoSOCSv2 > > > > Instead of requesting the user to install the DoSOCSv2 from github or > > other repos, can we make the spdx.bbclass depend on "dosocs-native" > or > > similar and make that "DoSOCSv2" recipe available in oe-core ? > > > > That might make it easy to use this class. > > > > > # For more information on SPDX: > > > # http://www.spdx.org > > > # > > > +# Note: > > > +# 1) Make sure DoSOCSv2 has beed installed in your host # 2) By > > > +default,spdx files will be output to the path which is defined > > as[SPDX_MANIFEST_DIR] > > > +#in ./meta/conf/licenses.conf. > > > > > > -# SPDX file will be output to the path which is defined > > > as[SPDX_MANIFEST_DIR] -# in ./meta/conf/licenses.conf. > > > +SPDXOUTPUTDIR = "${WORKDIR}/spdx_output_dir" > > > SPDXSSTATEDIR = "${WORKDIR}/spdx_sstate_dir" > > > > > >
Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0 SPEC
Hi Maxin, Simon > It would be nice to include the reason for change from fossology to dosocs2 > in the commit message too (from cover letter) OK, I will add the reasons into the commit message in v3. > Instead of requesting the user to install the DoSOCSv2 from github or > other repos, can we make the spdx.bbclass depend on "dosocs-native" or > similar and make that "DoSOCSv2" recipe available in oe-core ? That's a good idea. I will try. Best Regards Lei > -Original Message- > From: Maxin B. John [mailto:maxin.j...@intel.com] > Sent: Monday, September 19, 2016 6:58 PM > To: Lei, Maohui > Cc: openembedded-core@lists.openembedded.org; > jsmoel...@linuxfoundation.org > Subject: Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0 > SPEC > > Hi, > > Please find my comments below: > > On Mon, Sep 19, 2016 at 04:39:50PM +0800, Lei Maohui wrote: > > More: > > - change spdx tool from fossology to dosocs2 > > It would be nice to include the reason for change from fossology to > dosocs2 in the commit message too (from cover letter) > > > Signed-off-by: Lei Maohui <leimao...@cn.fujitsu.com> > > --- > > meta/classes/spdx.bbclass | 505 ++-- > -- > > meta/conf/licenses.conf | 67 +- > > 2 files changed, 198 insertions(+), 374 deletions(-) > > > > diff --git a/meta/classes/spdx.bbclass b/meta/classes/spdx.bbclass > > index 0c92765..27c0fa0 100644 > > --- a/meta/classes/spdx.bbclass > > +++ b/meta/classes/spdx.bbclass > > @@ -1,365 +1,252 @@ > > # This class integrates real-time license scanning, generation of > > SPDX standard # output and verifiying license info during the > building process. > > -# It is a combination of efforts from the OE-Core, SPDX and > Fossology projects. > > +# It is a combination of efforts from the OE-Core, SPDX and DoSOCSv2 > projects. > > # > > -# For more information on FOSSology: > > -# http://www.fossology.org > > -# > > -# For more information on FOSSologySPDX commandline: > > -# https://github.com/spdx-tools/fossology-spdx/wiki/Fossology- > SPDX-Web-API > > +# For more information on DoSOCSv2: > > +# https://github.com/DoSOCSv2 > > Instead of requesting the user to install the DoSOCSv2 from github or > other repos, can we make the spdx.bbclass depend on "dosocs-native" or > similar and make that "DoSOCSv2" recipe available in oe-core ? > > That might make it easy to use this class. > > > # For more information on SPDX: > > # http://www.spdx.org > > # > > +# Note: > > +# 1) Make sure DoSOCSv2 has beed installed in your host # 2) By > > +default,spdx files will be output to the path which is defined > as[SPDX_MANIFEST_DIR] > > +#in ./meta/conf/licenses.conf. > > > > -# SPDX file will be output to the path which is defined > > as[SPDX_MANIFEST_DIR] -# in ./meta/conf/licenses.conf. > > +SPDXOUTPUTDIR = "${WORKDIR}/spdx_output_dir" > > SPDXSSTATEDIR = "${WORKDIR}/spdx_sstate_dir" > > > > # If ${S} isn't actually the top-level source directory, set SPDX_S > > to point at # the real top-level directory. > > + > > SPDX_S ?= "${S}" > > > > python do_spdx () { > > import os, sys > > -import json, shutil > > - > > -info = {} > > -info['workdir'] = d.getVar('WORKDIR', True) > > -info['sourcedir'] = d.getVar('SPDX_S', True) > > -info['pn'] = d.getVar('PN', True) > > -info['pv'] = d.getVar('PV', True) > > -info['spdx_version'] = d.getVar('SPDX_VERSION', True) > > -info['data_license'] = d.getVar('DATA_LICENSE', True) > > - > > -sstatedir = d.getVar('SPDXSSTATEDIR', True) > > -sstatefile = os.path.join(sstatedir, info['pn'] + info['pv'] + > ".spdx") > > +import json > > > > -manifest_dir = d.getVar('SPDX_MANIFEST_DIR', True) > > -info['outfile'] = os.path.join(manifest_dir, info['pn'] + > ".spdx" ) > > +## It's no necessary to get spdx files for *-native > > +if d.getVar('PN', True) == d.getVar('BPN', True) + "-native": > > +return None > > > > -info['spdx_temp_dir'] = d.getVar('SPDX_TEMP_DIR', True) > > -info['tar_file'] = os.path.join(info['workdir'], info['pn'] + > ".tar.gz" ) > > +## gcc is too big to get spdx file. > > +if 'gcc' in d.getVar('PN', True): > > +return None > > > > -# Make sure important dirs exist > > -try: > >
Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0 SPEC
Hi Lei, Maxin, * ! I think this patch is very useful and should be considered for inclusion in OE-core. Maxin's comment on making the class depend on a "dosocs-native" recipe is good. @Lei: Could you follow-up with a v2 applying this enhancement as proposed by Maxin? -- Dipl.-Ing. Jan-Simon Möller jansimon.moel...@gmx.de > Instead of requesting the user to install the DoSOCSv2 from github or other > repos, can we make the spdx.bbclass depend on "dosocs-native" or similar > and make that "DoSOCSv2" recipe available in oe-core ? > > That might make it easy to use this class. -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0 SPEC
Hi, Please find my comments below: On Mon, Sep 19, 2016 at 04:39:50PM +0800, Lei Maohui wrote: > More: > - change spdx tool from fossology to dosocs2 It would be nice to include the reason for change from fossology to dosocs2 in the commit message too (from cover letter) > Signed-off-by: Lei Maohui> --- > meta/classes/spdx.bbclass | 505 > ++ > meta/conf/licenses.conf | 67 +- > 2 files changed, 198 insertions(+), 374 deletions(-) > > diff --git a/meta/classes/spdx.bbclass b/meta/classes/spdx.bbclass > index 0c92765..27c0fa0 100644 > --- a/meta/classes/spdx.bbclass > +++ b/meta/classes/spdx.bbclass > @@ -1,365 +1,252 @@ > # This class integrates real-time license scanning, generation of SPDX > standard > # output and verifiying license info during the building process. > -# It is a combination of efforts from the OE-Core, SPDX and Fossology > projects. > +# It is a combination of efforts from the OE-Core, SPDX and DoSOCSv2 > projects. > # > -# For more information on FOSSology: > -# http://www.fossology.org > -# > -# For more information on FOSSologySPDX commandline: > -# https://github.com/spdx-tools/fossology-spdx/wiki/Fossology-SPDX-Web-API > +# For more information on DoSOCSv2: > +# https://github.com/DoSOCSv2 Instead of requesting the user to install the DoSOCSv2 from github or other repos, can we make the spdx.bbclass depend on "dosocs-native" or similar and make that "DoSOCSv2" recipe available in oe-core ? That might make it easy to use this class. > # For more information on SPDX: > # http://www.spdx.org > # > +# Note: > +# 1) Make sure DoSOCSv2 has beed installed in your host > +# 2) By default,spdx files will be output to the path which is defined > as[SPDX_MANIFEST_DIR] > +#in ./meta/conf/licenses.conf. > > -# SPDX file will be output to the path which is defined > as[SPDX_MANIFEST_DIR] > -# in ./meta/conf/licenses.conf. > +SPDXOUTPUTDIR = "${WORKDIR}/spdx_output_dir" > SPDXSSTATEDIR = "${WORKDIR}/spdx_sstate_dir" > > # If ${S} isn't actually the top-level source directory, set SPDX_S to point > at > # the real top-level directory. > + > SPDX_S ?= "${S}" > > python do_spdx () { > import os, sys > -import json, shutil > - > -info = {} > -info['workdir'] = d.getVar('WORKDIR', True) > -info['sourcedir'] = d.getVar('SPDX_S', True) > -info['pn'] = d.getVar('PN', True) > -info['pv'] = d.getVar('PV', True) > -info['spdx_version'] = d.getVar('SPDX_VERSION', True) > -info['data_license'] = d.getVar('DATA_LICENSE', True) > - > -sstatedir = d.getVar('SPDXSSTATEDIR', True) > -sstatefile = os.path.join(sstatedir, info['pn'] + info['pv'] + ".spdx") > +import json > > -manifest_dir = d.getVar('SPDX_MANIFEST_DIR', True) > -info['outfile'] = os.path.join(manifest_dir, info['pn'] + ".spdx" ) > +## It's no necessary to get spdx files for *-native > +if d.getVar('PN', True) == d.getVar('BPN', True) + "-native": > +return None > > -info['spdx_temp_dir'] = d.getVar('SPDX_TEMP_DIR', True) > -info['tar_file'] = os.path.join(info['workdir'], info['pn'] + ".tar.gz" ) > +## gcc is too big to get spdx file. > +if 'gcc' in d.getVar('PN', True): > +return None > > -# Make sure important dirs exist > -try: > -bb.utils.mkdirhier(manifest_dir) > -bb.utils.mkdirhier(sstatedir) > -bb.utils.mkdirhier(info['spdx_temp_dir']) > -except OSError as e: > -bb.error("SPDX: Could not set up required directories: " + str(e)) > -return > +info = {} > +info['workdir'] = (d.getVar('WORKDIR', True) or "") > +info['pn'] = (d.getVar( 'PN', True ) or "") > +info['pv'] = (d.getVar( 'PV', True ) or "") > +info['package_download_location'] = (d.getVar( 'SRC_URI', True ) or "") > +if info['package_download_location'] != "": > +info['package_download_location'] = > info['package_download_location'].split()[0] > +info['spdx_version'] = (d.getVar('SPDX_VERSION', True) or '') > +info['data_license'] = (d.getVar('DATA_LICENSE', True) or '') > +info['creator'] = {} > +info['creator']['Tool'] = (d.getVar('CREATOR_TOOL', True) or '') > +info['license_list_version'] = (d.getVar('LICENSELISTVERSION', True) or > '') > +info['package_homepage'] = (d.getVar('HOMEPAGE', True) or "") > +info['package_summary'] = (d.getVar('SUMMARY', True) or "") > +info['package_summary'] = info['package_summary'].replace("\n","") > +info['package_summary'] = info['package_summary'].replace("'"," ") > + > +spdx_sstate_dir = (d.getVar('SPDXSSTATEDIR', True) or "") > +manifest_dir = (d.getVar('SPDX_MANIFEST_DIR', True) or "") > +info['outfile'] = os.path.join(manifest_dir, info['pn'] + "-" + > info['pv'] + ".spdx" ) > +sstatefile = os.path.join(spdx_sstate_dir, > +info['pn'] + "-" + info['pv'] + ".spdx" )