Closed
Bug 899079
Opened 11 years ago
Closed 11 years ago
[User Story] Build process customization
Categories
(Firefox OS Graveyard :: Gaia::System, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: noemi, Assigned: albert)
References
Details
(Whiteboard: [FT:systems-fe, KOI:P1])
Attachments
(3 files, 2 obsolete files)
As an operator I'd need OEMs to customize the build process to include all the third party apps specified by several associated operators. The apps will be separated into two sets, a Common set (apps that are common to all the associated operators) and several Local sets (one per operator)
Acceptance Criteria:
* There's a way to specify at build time a set of associated operators (SAO) to which the build applies. The operators will be identified by MCC and MNC
* There's a way to specify at build time a set of common third party apps (SCTPA) for the SAO
* There's a way to specify at build time a set of local third party apps (SLTPA) for each of the operators included in the SAO
* There will be a single SAO per build, a single SCTPA per build, and as many SLTPAs as operators included in the SAO
* The apps will be identified at build time only by their manifest URLs
* All the specified apps will be automatically downloaded at build time, and installed on the appropiate directory on the device
Comment 1•11 years ago
|
||
I think Yuren is currently working on a customer/operator facing UI.
Assignee: nobody → yurenju.mozilla
Updated•11 years ago
|
Assignee: yurenju.mozilla → nobody
Comment 2•11 years ago
|
||
This is not the UI... I think the UI Yuren is working on will provide a easier way to create the configuration files for the build. This build is to use those configuration files (created manually or with Yuren's tool) to create the image that get flashed on the phone.
Please correct me if I'm wrong :)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → acperez
Assignee | ||
Comment 3•11 years ago
|
||
Manifest url should be changed by the server where the manifests are served
Assignee | ||
Comment 4•11 years ago
|
||
Assignee | ||
Comment 5•11 years ago
|
||
If installing gaia only sync with https://github.com/telefonicaid/firefoxos-gaia-spain repo and follow the README or copy the repo to $GAIA_HOME/distribution.
If making a build copy repo content to $GAIA_HOME/distribution and build as usuall with ./build.sh
Attachment #786197 -
Flags: feedback?(cjc)
Assignee | ||
Updated•11 years ago
|
Attachment #786190 -
Flags: review?(jmcf)
Comment 6•11 years ago
|
||
Fabrice, IIRC we have discussed about fetching app on build time and you didn't like this idea, but I don't remeber the reason. maybe you can give some feedback on this issue.
Flags: needinfo?(fabrice)
Comment 7•11 years ago
|
||
and we have preload apps management mechanism for picking apps into gaia. FYI: https://wiki.mozilla.org/B2G/MarketCustomizations#Preload_App_management
Comment 8•11 years ago
|
||
Comment on attachment 786197 [details] [diff] [review]
Patch
Review of attachment 786197 [details] [diff] [review]:
-----------------------------------------------------------------
This looks good to me, thanks Albert.
::: Android.mk
@@ +84,4 @@
> rm -rf $(GAIA_PATH)/profile/indexedDB; \
> + fi; \
> + if [ -d $(GAIA_PATH)/profile/svoperapps ]; then \
> + rm -rf $(GAIA_PATH)/profile/svoperapps; \
Why are you deleting this? webapps isn't deleted and this directory should have the same treatment, shouldn't it?
::: build/local-apps.py
@@ +27,5 @@
> +
> + """ Download manifest """
> + print 'Download manifest ', manifest_url
> + manifest_raw = (urllib2.urlopen(manifest_url)).read()
> + manifest = json.loads(manifest_raw)
I've had some problems with Python json library and JSONs that are written with DOS endline or endfile characters. Have you tested this with those kind of files?
@@ +118,5 @@
> +
> + if not options.local_apps_path:
> + parser.error('local-aps-path not given')
> +
> + if not options.profile_path:
Nit: trailing white spaces
Attachment #786197 -
Flags: feedback?(cjc) → feedback+
Comment 9•11 years ago
|
||
Thanks Yuren!
This isn't strictly related with 3rd party apps, though, this is to include on the device a set of apps that will be, or won't be installed, depending on the actual SIM card used on the first run of the device. This allows us to have a single image for a set of operators that want to have different apps preinstalled on the device. So a static list as the one you referenced won't cut it.
Comment 10•11 years ago
|
||
OK, and don't forget to document it on wiki when this change landed :D
Comment 11•11 years ago
|
||
Noemi Freire changed story state to started in Pivotal Tracker
Assignee | ||
Comment 12•11 years ago
|
||
(In reply to Carmen Jimenez Cabezas from comment #8)
> Comment on attachment 786197 [details] [diff] [review]
> Patch
>
> Review of attachment 786197 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> This looks good to me, thanks Albert.
>
> ::: Android.mk
> @@ +84,4 @@
> > rm -rf $(GAIA_PATH)/profile/indexedDB; \
> > + fi; \
> > + if [ -d $(GAIA_PATH)/profile/svoperapps ]; then \
> > + rm -rf $(GAIA_PATH)/profile/svoperapps; \
>
> Why are you deleting this? webapps isn't deleted and this directory should
> have the same treatment, shouldn't it?
It is deleted to clean profile, if you configure 4 apps and next time 3 and it is not cleaned, you will have 4 apps again. webapps is cleaned in other line.
> ::: build/local-apps.py
> @@ +27,5 @@
> > +
> > + """ Download manifest """
> > + print 'Download manifest ', manifest_url
> > + manifest_raw = (urllib2.urlopen(manifest_url)).read()
> > + manifest = json.loads(manifest_raw)
>
> I've had some problems with Python json library and JSONs that are written
> with DOS endline or endfile characters. Have you tested this with those kind
> of files?
Written in linux and tested.
Assignee | ||
Updated•11 years ago
|
Attachment #786190 -
Attachment description: JSON file example to configure apps for operators depending on the mcc and mnc → SPAIN JSON file example to configure apps for operators depending on the mcc and mnc
Assignee | ||
Comment 13•11 years ago
|
||
Attachment #786867 -
Flags: review?(jmcf)
Assignee | ||
Updated•11 years ago
|
Attachment #786193 -
Attachment is obsolete: true
Updated•11 years ago
|
Attachment #786190 -
Flags: review?(jmcf) → review+
Updated•11 years ago
|
Attachment #786867 -
Flags: review?(jmcf) → review+
Comment 14•11 years ago
|
||
(In reply to Yuren Ju [:yurenju] from comment #6)
> Fabrice, IIRC we have discussed about fetching app on build time and you
> didn't like this idea, but I don't remeber the reason. maybe you can give
> some feedback on this issue.
I don't like relying on remote network resources during the build phase. Is this what we are doing here?
Flags: needinfo?(fabrice)
Comment 15•11 years ago
|
||
This is something that will be used only for the operator variants and what it does is download the apps if they haven't been downloaded yet or use the downloaded ones otherwise (or that's what it should do anyway). So... it's akind to what we do with the xulrunner actually. And those resources don't belong on the Gaia repo (since they're third party apps) and must be downloaded somehow anyway.
Assignee | ||
Comment 16•11 years ago
|
||
Attachment #786197 -
Attachment is obsolete: true
Attachment #788090 -
Flags: review?(timdream)
Comment 17•11 years ago
|
||
Comment on attachment 788090 [details]
Patch
I decline to review this massive patch because it tried to do too many things at once. Please, file dependent engineering bugs and land your patches there, instead of putting everything on a user story bug.
Reading all the way down and the code briefly I found that you are trying to do at least this many things _in Gaia_:
A) Having Gaia to parse a JSON file in distribution repo and download apps if it does not exist locally.
B) Having Gaia to generate the same JSON file and generate a singlevariantconf.json for homescreen so that it could hide/show app based on mmc/mnc.
I would against using the same JSON for both purpose, AND using the same Python script for both purpose too. (B) should really go to applications-data.js as all current customization do, and (A) should be kept in the external preload.py until we figure out what we should do.
We would need to address (B) in Settings app too. Hiding an app has security implication and should be dealt in a clear way so we don't mess up.
Nice work on heavy lifting everything though, but I wish patch is written before everyone is happy with the apporach.
Attachment #788090 -
Flags: review?(timdream)
Assignee | ||
Updated•11 years ago
|
Reporter | ||
Comment 18•11 years ago
|
||
Per comment 17 the following bugs have been opened:
Bug 904004 - [Single Variant] Manage custom single variant apps
Bug 904005 - [Single Variant] Generate single variant JSON
Bug 904006 - [Single Variant] Integrate single variant in Gaia build scripts
Updated•11 years ago
|
Whiteboard: [FT:systems-fe, KOI:P1]
Assignee | ||
Comment 19•11 years ago
|
||
Dependencies resolved
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 20•11 years ago
|
||
ALBERTO CRESPELL PEREZ changed story state to accepted in Pivotal Tracker
Updated•11 years ago
|
QA Contact: jsmith
Updated•11 years ago
|
Flags: in-moztrap?(rafael.marquez)
Updated•11 years ago
|
Flags: in-moztrap?(rafael.marquez)
You need to log in
before you can comment on or make changes to this bug.
Description
•