Bug 358

Summary: Add a test which scans a non-v3 build for any v3 code
Product: [QA/Testing] Test Plans/Suite Reporter: Dave Stewart <david.c.stewart>
Component: test-plans/suiteAssignee: Jiajun Xu <jiajun.xu>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: jessica.zhang, julie.n.fleischer, sgw, yp.test.watcher, yp.watcher
Version: unspecified   
Target Milestone: 1.0 M4   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Program Management Documentation change: ---

Description Dave Stewart 2010-09-28 14:57:29 UTC
You can make a version of Linux with no GPL v3 code in it. Would like a tool which you can run against a non-v3 build and ensure that there is no v3 licensed code in it.
Comment 1 Jessica 2010-09-28 15:30:19 UTC
target for 1.0 M1
Comment 2 Jiajun Xu 2011-02-12 07:55:10 UTC
After talking with Saul, we came to the conclusion to use rpm command to check the license version for all the packages in image. I will create a script to automate such check.

Meanwhile, currently the non-v3 build is blocked by the bug 712.
Comment 3 Jiajun Xu 2011-02-16 21:47:44 UTC
Following is a simple script to scan gplv3 code in target, supposing to use it in future testing.

##################
#!/bin/sh

temp=`mktemp`
rpm -qa > $temp
ret=0

for i in `cat $temp`
do
        rpm -qi $i | grep License | grep -i gplv3 > /dev/null 2>&1
        if [ $? -eq 0 ]; then
                license=`rpm -qi $i | grep License | awk -F"License:" '{print $2}'`
                echo "package $i has inconsistent license: $license"
                ret=1
        fi
done

rm -rf $temp
exit $ret
###################
Comment 4 Jiajun Xu 2011-02-24 17:44:20 UTC
I think we could mark the bug as fixed now. I include a test case for non-v3 code check in v1.0 M4 test plan. And the test script I pasted as above could check the v3 packages in image.
Comment 5 Jiajun Xu 2011-02-24 17:44:34 UTC
Verify the bug.