aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--classes/spdx-dosocs.bbclass14
-rw-r--r--recipes-devtools/fossology/fossology-nomos-native_git.bb6
-rw-r--r--recipes-devtools/fossology/fossology-nomos/0001-Add-rpath-to-fix-error-as-following.patch28
-rw-r--r--recipes-devtools/python/python-dosocs2-native_0.16.1.bb11
-rw-r--r--recipes-devtools/python/python-dosocs2-natives34
6 files changed, 53 insertions, 43 deletions
diff --git a/README.md b/README.md
index 64f7059..70e1545 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,10 @@ SPDX scanner(DoSOCSv2) support
- inherit the folowing class in your conf/local.conf for all of recipes or
in some recipes which you want.
+
+```
inherit spdx-dosocs
+```
- Redefine SPDX_DEPLOY_DIR in conf/local.conf:
SPDX_DEPLOY_DIR = "$PATH_DEST/$SPDX_DESTDIR"
diff --git a/classes/spdx-dosocs.bbclass b/classes/spdx-dosocs.bbclass
index 2fc9035..446cd9b 100644
--- a/classes/spdx-dosocs.bbclass
+++ b/classes/spdx-dosocs.bbclass
@@ -31,7 +31,8 @@ python do_spdx () {
## gcc is too big to get spdx file.
if 'gcc' in d.getVar('PN', True):
- return None
+ return None
+
info = {}
info['workdir'] = (d.getVar('WORKDIR', True) or "")
info['pn'] = (d.getVar( 'PN', True ) or "")
@@ -79,7 +80,7 @@ python do_spdx () {
remove_dir_tree(git_path)
## Get spdx file
- bb.warn(' run_dosocs2 ...... ')
+ #bb.warn(' run_dosocs2 ...... ')
invoke_dosocs2(info['sourcedir'],sstatefile)
if get_cached_spdx( sstatefile ) != None:
write_cached_spdx( info,sstatefile,cur_ver_code )
@@ -89,6 +90,11 @@ python do_spdx () {
bb.warn('Can\'t get the spdx file ' + info['pn'] + '. Please check your dosocs2.')
d.setVar('WORKDIR', info['workdir'])
}
+python () {
+ deps = ' python-dosocs2-native:do_populate_sysroot'
+ d.appendVarFlag('do_spdx', 'depends', deps)
+}
+
## Get the src after do_patch.
python do_get_spdx_s() {
@@ -122,7 +128,7 @@ python do_get_spdx_s() {
}
addtask get_spdx_s after do_patch before do_configure
-addtask spdx after do_get_spdx_s before do_configure
+addtask spdx after do_get_spdx_s before do_package
def invoke_dosocs2( OSS_src_dir, spdx_file):
import subprocess
@@ -131,8 +137,6 @@ def invoke_dosocs2( OSS_src_dir, spdx_file):
import codecs
cmd = "dosocs2 oneshot %s" % (OSS_src_dir)
- bb.note("*********dosocs cmd = %s" % cmd)
-
p = subprocess.Popen(cmd.split(),
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
dosocs2_output, dosocs2_error = p.communicate()
diff --git a/recipes-devtools/fossology/fossology-nomos-native_git.bb b/recipes-devtools/fossology/fossology-nomos-native_git.bb
index 2f55ed1..e034a34 100644
--- a/recipes-devtools/fossology/fossology-nomos-native_git.bb
+++ b/recipes-devtools/fossology/fossology-nomos-native_git.bb
@@ -4,11 +4,13 @@ SECTION = "devel/python"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://GenCodeCopyright;md5=7296ec131dbd040718b64fb843d63048"
-DEPENDS = "glib-2.0-native"
+DEPENDS = "glib-2.0-native libpcre-native"
SRCREV = "34467fd530b832f08c095936a72c22c40fa13278"
BRANCH = "release/${PV}/master"
-SRC_URI = "git://github.com/fossology/fossology.git"
+SRC_URI = "git://github.com/fossology/fossology.git \
+ file://0001-Add-rpath-to-fix-error-as-following.patch \
+ "
S = "${WORKDIR}/git/src/nomos/agent"
diff --git a/recipes-devtools/fossology/fossology-nomos/0001-Add-rpath-to-fix-error-as-following.patch b/recipes-devtools/fossology/fossology-nomos/0001-Add-rpath-to-fix-error-as-following.patch
new file mode 100644
index 0000000..4052b1c
--- /dev/null
+++ b/recipes-devtools/fossology/fossology-nomos/0001-Add-rpath-to-fix-error-as-following.patch
@@ -0,0 +1,28 @@
+From b81cced8566406c85b38a1c3c71858982a3dd4a5 Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Wed, 1 Mar 2017 10:23:03 +0900
+Subject: [PATCH] Add rpath to fix error as following:
+
+/usr/bin/ld: warning: libpcre.so.1, needed by tmp/sysroots/x86_64-linux/usr/lib/libglib-2.0.so, not found (try using -rpath or -rpath-link)
+
+Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
+---
+ Makefile.sa | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.sa b/Makefile.sa
+index 24a16ca..f39bdd6 100644
+--- a/Makefile.sa
++++ b/Makefile.sa
+@@ -26,7 +26,7 @@ all: encode nomos
+ debug: nomos-gl
+
+ nomos: nomos.o $(OBJS) $(GENOBJS)
+- $(CC) nomos.o $(OBJS) $(GENOBJS) $(CFLAGS_LOCAL) -o $(EXE)
++ $(CC) nomos.o $(OBJS) $(GENOBJS) $(CFLAGS_LOCAL) -o $(EXE) -Wl,-rpath,${libdir}
+
+ nomos.o: nomos.c $(HDRS) $(DB) $(REPO) $(AGENTLIB) $(VARS)
+ $(CC) -c $< $(CFLAGS_LOCAL) $(DEFS)
+--
+1.8.4.2
+
diff --git a/recipes-devtools/python/python-dosocs2-native_0.16.1.bb b/recipes-devtools/python/python-dosocs2-native_0.16.1.bb
index 60f3029..2c7f124 100644
--- a/recipes-devtools/python/python-dosocs2-native_0.16.1.bb
+++ b/recipes-devtools/python/python-dosocs2-native_0.16.1.bb
@@ -18,8 +18,15 @@ S = "${WORKDIR}/DoSOCSv2-${PV}/"
inherit distutils native
-DEPENDS += "python-jinja2-native python-native"
-DEPENDS += "python-psycopg2-native python-docopt-native python-sqlalchemy-native file-native"
+DEPENDS += "python-jinja2-native \
+ python-native \
+ python-psycopg2-native \
+ python-docopt-native \
+ python-sqlalchemy-native \
+ file-native \
+ fossology-nomos-native \
+ python-markupsafe-native \
+ python-magic-native "
python do_dosocs2_init(){
import os
diff --git a/recipes-devtools/python/python-dosocs2-natives b/recipes-devtools/python/python-dosocs2-natives
deleted file mode 100644
index 41f6bb2..0000000
--- a/recipes-devtools/python/python-dosocs2-natives
+++ /dev/null
@@ -1,34 +0,0 @@
-From d282ba074625922d12615af676ac1f0e922db88f Mon Sep 17 00:00:00 2001
-From: Lei Maohui <leimaohui@cn.fujitsu.com>
-Date: Wed, 15 Feb 2017 23:23:53 +0900
-Subject: [PATCH] setup.py: delete the depends install
-
-Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
----
- setup.py | 7 -------
- 1 file changed, 7 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 527b161..b35863f 100644
---- a/setup.py
-+++ b/setup.py
-@@ -3,16 +3,9 @@ from setuptools import setup
- _dosocs2_version = '0.16.1'
-
- install_requires=[
-- 'jinja2',
-- 'python-magic',
-- 'docopt',
-- 'SQLAlchemy',
-- 'psycopg2'
- ]
-
- tests_require=[
-- 'pytest',
-- 'mock'
- ]
-
- setup(
---
-1.8.4.2
-