Bug 358 - Add a test which scans a non-v3 build for any v3 code
Summary: Add a test which scans a non-v3 build for any v3 code
Status: VERIFIED FIXED
Alias: None
Product: Test Plans/Suite
Classification: QA/Testing
Component: test-plans/suite (show other bugs)
Version: unspecified
Hardware: All Multiple
: Medium normal
Target Milestone: 1.0 M4
Assignee: Jiajun Xu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2010-09-28 14:57 UTC by Dave Stewart
Modified: 2011-02-28 10:59 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified: Program Management
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.