Merge lp:~pundiramit/linaro-android-build-tools/access_private_manifests into lp:linaro-android-build-tools
Status: | Merged |
---|---|
Merged at revision: | 554 |
Proposed branch: | lp:~pundiramit/linaro-android-build-tools/access_private_manifests |
Merge into: | lp:linaro-android-build-tools |
Diff against target: |
157 lines (+46/-18) 2 files modified
build-scripts/build-android (+6/-0) build-scripts/create-user-build-script (+40/-18) |
To merge this branch: | bzr merge lp:~pundiramit/linaro-android-build-tools/access_private_manifests |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Данило Шеган (community) | 2013-01-23 | Approve on 2013-01-28 | |
Review via email:
|
Description of the change
Prompt for login/access-id when user try to download private manifests.
Amit Pundir (pundiramit) wrote : | # |
I did try to read userID from .bashrc/
I can certainly rename ID to a much understandable LINARO_
I did not understand the last concern.
I'm initializing ID with "default-bot", which is a default unauthorised bot and do not have access to any private gits. I can very well leave ID uninitialized as well.
Once user provide correct access ID, I override "default-bot" with user provided ID and then replace "*-bot" e.g. "linaro-
Данило Шеган (danilo) wrote : | # |
I think it's fine not to try to guess the user ID. What I meant was that it should be possible for someone to simply do something like:
export LINARO_
./linaro_
If you unconditionally set the variable in the script, that will not be possible. You can do that by setting the variable in the script as (hyphen to separate the variable name and default value):
VARNAME=
eg.
LINARO_
Then, someone would be able to put "export LINARO_
- 555. By Amit Pundir on 2013-01-23
-
user build script: check for already exported access ID
Amit Pundir (pundiramit) wrote : | # |
Script fixed to check for already exported LINARO_
Данило Шеган (danilo) wrote : | # |
This looks good, did you perhaps test it out (a link to a test build would be nice) to confirm escaping works as expected (it's all too easy to make a typo somewhere, and a best test is to get a runnable script out :).
Amit Pundir (pundiramit) wrote : | # |
I did test the changes separately on a local script. The best way, indeed, is to get a runnable script out and test it to confirm that escaping work as expected.
- 556. By Amit Pundir on 2013-01-24
-
user build script: make SOURCE_OVERLAY optional
- 557. By Amit Pundir on 2013-01-24
-
user build script: invoke apt-get install only for missing packages
Amit Pundir (pundiramit) wrote : | # |
Pushed a couple of more/unrelated changes to this branch:
1) Make source_overlay optional.
2) Invoke apt-get, only for missing packages. This fixes an issue on hackbox where "apt-get install" returns exit code 1, when trying to install already installed packages.
Данило Шеган (danilo) wrote : | # |
The changes for LINARO_
However, as I said in the previous MP at
https:/
I don't want us to allow builds on android-
- 558. By Amit Pundir on 2013-01-24
-
user build script: protect source overlay usage with a flag
Amit Pundir (pundiramit) wrote : | # |
Ok. With this new patchset, I changed how I was handling SOURCE_OVERLAY variable. Since SOURCE_OVERLAY variable is something which may or may not be directly used by jenkins for build purpose, I'm not playing around it anymore.
What I did this time is that I introduced a new flag SOURCE_
Let me know if you have any concerns on this one.
Данило Шеган (danilo) wrote : | # |
This generally looks good. I think only one thing is missing: what happens when someone puts the SOURCE_
Since the config file is generated on the build with the script
based on the data passed in from android-
- 559. By Amit Pundir on 2013-01-25
-
build android: make sure no one sets SOURCE_
OVERLAY_ OPTIONAL in official build configurations
Amit Pundir (pundiramit) wrote : | # |
So I figured out that even this script "build-
-------
$ bzr diff
=== modified file 'build-
--- build-scripts/
+++ build-scripts/
@@ -14,6 +14,12 @@
exit 1
fi
+if [ "$SOURCE_
+ echo "ERROR: SOURCE_
+ echo " It is meant to be set only in local build scripts to bypass overlays."
+ exit 1
+fi
+
source "${BUILD_
trap infrastructure_
$
-------
Данило Шеган (danilo) wrote : | # |
Yeah, this looks good. I am testing your branch now with https:/
Данило Шеган (danilo) wrote : | # |
Ok, I tested a few cases (based on galaxynexus-linaro build):
1. SOURCE_OVERLAY missing, SOURCE_
https:/
Ok, fails with SOURCE_OVERLAY missing.
2. SOURCE_OVERLAY present, SOURCE_
https:/
OK, fails with your new error message.
3. SOURCE_OVERLAY present, no SOURCE_
https:/
Just starting now. If that one builds ok, I'll merge your branch asap.
Does it not make sense to read ID from some environment variable as well? (so people can simply set it in their .bashrc or .profile to ensure the same ID is used going forward)
Of course, if you make it an environment variable, I suppose naming it like LINARO_ ANDROID_ ACCESS_ ID would be better than just "ID".
Btw, what are the reasons to replace ".*-bot" with ${ID}, and not simply replace "default-bot"?