Merge lp:~pundiramit/linaro-android-build-tools/user-build-script into lp:linaro-android-build-tools

Proposed by Amit Pundir
Status: Merged
Approved by: Paul Sokolovsky
Approved revision: 543
Merged at revision: 543
Proposed branch: lp:~pundiramit/linaro-android-build-tools/user-build-script
Merge into: lp:linaro-android-build-tools
Diff against target: 107 lines (+51/-5)
1 file modified
build-scripts/create-user-build-script (+51/-5)
To merge this branch: bzr merge lp:~pundiramit/linaro-android-build-tools/user-build-script
Reviewer Review Type Date Requested Status
Paul Sokolovsky Approve
Linaro Infrastructure Pending
Review via email: mp+139409@code.launchpad.net

Description of the change

This Merge Proposal update user build script to support linaro-android builds on 64 bit Ubuntu 10.04, 12.04 and 12.10 versions.

To post a comment you must log in.
542. By Amit Pundir

Update user build script to clone from linaro-private git repos

543. By Amit Pundir

Update user build script to prompt for login-id

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

Having updated list of packages required for build as well as check for x86_64 is definitely good. But I'm not sure about supporting access to linaro-private. The original idea of user build script was to simplify build process for outside/3rd-party users. But outside users are not supposed to have access to private Linaro repos at all, so I'm not sure if conveniencing access for them makes sense. So, I'd like to know what are the requirements/user stories behind this change.

review: Needs Information
Revision history for this message
Amit Pundir (pundiramit) wrote :

Right now outside/3rd party users can decode http:// link of git projects from manifest files anyways, though they can not access it. How to protect manifest files is a different task all together, which is currently been worked on.

3rd party developers can clone only public projects from linaro Git manifests and they will get public-key denied error for private projects.

Idea behind this change is to facilitate authorized linaro assignees to get access to private-repos and simplify their build experience.

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

I see, sounds good, and sorry for delay.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'build-scripts/create-user-build-script'
--- build-scripts/create-user-build-script 2012-10-03 12:25:43 +0000
+++ build-scripts/create-user-build-script 2012-12-17 09:50:25 +0000
@@ -14,45 +14,73 @@
14PINNED_MANIFEST_URL=${PINNED_MANIFEST_URL/_/\/}14PINNED_MANIFEST_URL=${PINNED_MANIFEST_URL/_/\/}
1515
16if [ -n "$SOURCE_OVERLAY" ]; then16if [ -n "$SOURCE_OVERLAY" ]; then
17 USAGE_SUM="'Usage: \$0 -m <manifest.xml> -o <overlay.tar> [ -t -d directory ]'"17 USAGE_SUM="'Usage: \$0 -m <manifest.xml> -o <overlay.tar> [ -t -d directory -l login ]'"
18 USAGE_OVERLAY="'\\n -m <manifest> If -t is not used, then using a browser with cookies you\\n must download the pinned manifest from:\\n $PINNED_MANIFEST_URL\\n -o The path to the vendor required overlay.\\n Can be downloaded from http://snapshots.linaro.org/android/binaries/$SOURCE_OVERLAY\\n'"18 USAGE_OVERLAY="'\\n -m <manifest> If -t is not used, then using a browser with cookies you\\n must download the pinned manifest from:\\n $PINNED_MANIFEST_URL\\n -o The path to the vendor required overlay.\\n Can be downloaded from http://snapshots.linaro.org/android/binaries/$SOURCE_OVERLAY\\n'"
19 USAGE_OPTOVERLAY="m:o:"19 USAGE_OPTOVERLAY="m:o:"
20 USAGE_OPTHANDLER="o ) SOURCE_OVERLAY=\$OPTARG;; m ) MANIFEST=\$OPTARG;;"20 USAGE_OPTHANDLER="o ) SOURCE_OVERLAY=\$OPTARG;; m ) MANIFEST=\$OPTARG;;"
21else21else
22 USAGE_SUM="'Usage: \$0 [ -t -d directory ]'"22 USAGE_SUM="'Usage: \$0 [ -t -d directory -l login ]'"
23fi23fi
2424
25header()25header()
26{26{
27 cat <<EOF27 cat <<EOF
28#!/bin/bash28#!/bin/bash
29# Author+=amit.pundir@linaro.org
2930
30set -e31set -e
3132
32EXACT=133EXACT=1
33DIR=android34DIR=android
35ID=default-bot
3436
35usage()37usage()
36{38{
37 echo $USAGE_SUM39 echo $USAGE_SUM
38 echo -e $USAGE_OVERLAY40 echo -e $USAGE_OVERLAY
39 echo " -t Reproduce the from the tip of the branch rather than doing"41 echo " -t Reproduce the build from the tip of the branch rather than doing"
40 echo " an exact replica build"42 echo " an exact replica build"
41 echo " -d <directory> The directory to download code and build from"43 echo " -d <directory> The directory to download code and build from"
42 echo " Default: \${DIR}"44 echo " Default: \${DIR}"
45 echo " -l <login-id> login-id to clone from linaro-private git repositories"
46 echo " If in doubt, kindly raise access request to rt@linaro.org"
47 echo " Default: \${ID}"
43 exit 148 exit 1
44}49}
4550
46while getopts "${USAGE_OPTOVERLAY}d:ht" optn; do51while getopts "${USAGE_OPTOVERLAY}d:l:ht" optn; do
47 case \$optn in52 case \$optn in
48 $USAGE_OPTHANDLER53 $USAGE_OPTHANDLER
49 d ) DIR=\$OPTARG;;54 d ) DIR=\$OPTARG;;
55 l ) ID=\$OPTARG;;
50 t ) EXACT=0;;56 t ) EXACT=0;;
51 h ) usage; exit 1;;57 h ) usage; exit 1;;
52 esac58 esac
53done59done
5460
55PKGS='zip curl flex bison build-essential git-core gnupg gperf zlib1g-dev libx11-dev x11proto-core-dev gcc-multilib g++-multilib libc6-dev-i386 ia32-libs lib32z-dev uboot-mkimage uuid-dev openjdk-6-jdk ant lib32ncurses5-dev'61UBUNTU=`cat /etc/issue.net | cut -d' ' -f2`
62HOST_ARCH=`uname -m`
63if [ $HOST_ARCH == "x86_64" ] ; then
64 PKGS='git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc uboot-mkimage openjdk-6-jdk openjdk-6-jre vim-common'
65else
66 echo "ERROR: Only 64bit Host(Build) machines are supported at the moment."
67 exit 1
68fi
69if [ $UBUNTU == "12.10" ]; then
70 PKGS+=' lib32readline-gplv2-dev'
71elif [ $UBUNTU == "12.04" ] ; then
72 PKGS+=' lib32readline-gplv2-dev'
73elif [ $UBUNTU == "10.04" ] ; then
74 PKGS+=' ia32-libs lib32readline5-dev'
75else
76 echo
77 echo "ERROR: Only Ubuntu 10.04, 12.04 and 12.10 versiona are supported."
78 exit 1
79fi
80
81echo "Checking and installing missing dependencies if any .. .."
82sudo apt-get install $PKGS
83
56MISSING=\`dpkg-query -W -f='\${Status}\n' \${PKGS} 2>&1 | grep 'No packages found matching' | cut -d' ' -f5\`84MISSING=\`dpkg-query -W -f='\${Status}\n' \${PKGS} 2>&1 | grep 'No packages found matching' | cut -d' ' -f5\`
57if [ -n "\$MISSING" ] ; then85if [ -n "\$MISSING" ] ; then
58 echo "Missing required packages:"86 echo "Missing required packages:"
@@ -148,6 +176,24 @@
148 rm .repo/manifest.xml176 rm .repo/manifest.xml
149 $CP_CMD177 $CP_CMD
150fi178fi
179# check for linaro private git repositories
180PRI=`grep -i "linaro-private" .repo/manifests/${MANIFEST_FILENAME} | wc -l`
181if [ $PRI -gt 0 ] ; then
182 if [ "$ID" == "default-bot" ] ; then
183 echo "You must specify valid login/access-id to clone from linaro-private git repositories."
184 echo "Press "y" to continue (which may result in incomplete build), OR"
185 echo "Press "n" to enter login details, OR"
186 echo "Press "h" for help."
187 read NEXT
188 if [ ${NEXT} == n ] ; then
189 echo "Enter login/access-id:"
190 read ID
191 elif [ ${NEXT} == h ] ; then
192 usage
193 fi
194 fi
195 sed -i 's/\/\/.*-bot@/\/\/'"$ID"'@/' .repo/manifests/${MANIFEST_FILENAME}
196fi
151./repo sync197./repo sync
152198
153EOF199EOF

Subscribers

People subscribed via source and target branches