Merge lp:~vishalbhoj/linaro-android-build-tools/license-check into lp:linaro-android-build-tools

Proposed by vishal
Status: Merged
Approved by: Georgy Redkozubov
Approved revision: no longer in the source branch.
Merged at revision: 679
Proposed branch: lp:~vishalbhoj/linaro-android-build-tools/license-check
Merge into: lp:linaro-android-build-tools
Diff against target: 32 lines (+19/-0)
2 files modified
build-scripts/build-android (+4/-0)
build-scripts/license-verification.sh (+15/-0)
To merge this branch: bzr merge lp:~vishalbhoj/linaro-android-build-tools/license-check
Reviewer Review Type Date Requested Status
Georgy Redkozubov Approve
Review via email: mp+189024@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Georgy Redkozubov (gesha) wrote :

For the initial attempt looks good. Some items I would like to address in the future.
1) It's better to have separate MPs for issues not connected with each other. I mean adding LAVA_ADB_CHECK, mapping arndale and checking license are 3 separate issues. At least license check should be in one MP and all other small fixes better to go in another.
2) You have hardcoded groups which is not good in case we decide to add new ones. It might be better to read all requested groups from pinned-manifest.xml and then check against allowed groups from BUILD-INFO.txt.

Revision history for this message
Georgy Redkozubov (gesha) wrote :

Thanks for splitting into separate MPs.
Let's try to address item 2) from last comment, i.e. get rid of hardcoded groups.

Revision history for this message
vishal (vishalbhoj) wrote :

item 2 is also addressed. The groups are not hardcoded.

Revision history for this message
Georgy Redkozubov (gesha) wrote :

Now it looks good. Hope you've tested it on real manifest and build-info.txt

review: Approve
677. By Georgy Redkozubov

[merge] Update repo tool to the latest

678. By Georgy Redkozubov

[merge] map arndale with lamc device

679. By vishal

add license check support

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'build-scripts/build-android'
2--- build-scripts/build-android 2013-08-05 10:26:56 +0000
3+++ build-scripts/build-android 2013-10-05 08:03:13 +0000
4@@ -161,4 +161,8 @@
5 (cd out/; ${BUILD_SCRIPT_ROOT}/create-user-kernel-script)
6 fi
7
8+if [ ! -n "$SKIP_LICENSE_CHECK" ]; then
9+ ${BUILD_SCRIPT_ROOT}/license-verification.sh out/pinned-manifest.xml out/target/product/$TARGET_PRODUCT/BUILD-INFO.txt
10+fi
11+
12 ${BUILD_SCRIPT_ROOT}/../utils/manifest-descriptions/make.sh out/source-manifest.xml out/pinned-manifest.xml
13
14=== added file 'build-scripts/license-verification.sh'
15--- build-scripts/license-verification.sh 1970-01-01 00:00:00 +0000
16+++ build-scripts/license-verification.sh 2013-10-05 08:03:13 +0000
17@@ -0,0 +1,15 @@
18+#! /bin/bash
19+
20+groups=`grep -rni "ssh:" $1 | sed 's/^.*name="//; s/".*$//'`
21+
22+for group in $groups
23+do
24+ if grep -rni "remote=" $1 | grep -Fq $group; then
25+ if grep -Fq $group $2; then
26+ continue
27+ else
28+ echo "ERROR: License mismatch between source and artifacts"
29+ exit 1
30+ fi
31+fi
32+done

Subscribers

People subscribed via source and target branches