Closed
Bug 957497
Opened 10 years ago
Closed 10 years ago
Allow include of uncompressed data files in the package apps
Categories
(Firefox OS Graveyard :: Gaia, defect)
Tracking
(blocking-b2g:1.3T+, b2g-v1.3T fixed, b2g-v1.4 fixed)
RESOLVED
FIXED
blocking-b2g | 1.3T+ |
People
(Reporter: timdream, Assigned: yurenju)
References
Details
Attachments
(3 files, 2 obsolete files)
+++ This bug was initially created as a clone of Bug #945152 +++ Bug 945152 will introduce a feature allowing TypedArrays to be backed by file in the disk instead of a block of memory. We should change Gaia build system accordingly to put these files in the zip uncompressed so we could benefit from it (although according to Bug 945152 comment 37 the file will be extracted by Gecko too if included compressed) Please implement the feature in build script so that -- Apps could explicitly specify which files should be included in the zip uncompressed (no more regexp on file name magic, please) -- This feature can be turned off altogether with a pref (if a certain vendor thinks ROM space is more valuable than memory). Thanks!
Flags: needinfo?(yurenju.mozilla)
Comment 1•10 years ago
|
||
Given that we also have restrictions on the /system partition size, we need to be careful with what we do there.
Comment 2•10 years ago
|
||
will Yuren be able to take this bug? thanks
Assignee | ||
Comment 3•10 years ago
|
||
sure.
Assignee: nobody → yurenju.mozilla
Flags: needinfo?(yurenju.mozilla)
Assignee | ||
Comment 4•10 years ago
|
||
I would like to introduce a build.config in app directory with below format:
> {
> "zip": {
> "COMPRESSION_NONE": [
> "filepath-without-slash-prefix",
> "files-in-shared-also-need-to-add",
> "resources/icc.json",
> "shared/resources/languages.json"
> ]
> }
> }
and we can read those configration in webapp-zip.js for each app.
Fabrice & Tim, does it make sense?
Flags: needinfo?(timdream)
Flags: needinfo?(fabrice)
Reporter | ||
Comment 5•10 years ago
|
||
Discussed offline. We should use |metadata.json| instead of creating another JSON config file that doesn't even end with |.json|. The way we handle external-apps needs to be changed too because the current build script thinks the existence of such file makes the app an external app. So: metadata.json { external: false, zip: { no_compression: [ ... ] } } PS please keep everything lower case and underlined.
Flags: needinfo?(timdream)
Comment 6•10 years ago
|
||
Per bug 945152 comment 47, the file stored in zip package need to be page aligned for ArrayBuffer. I think we need to modify zip tool to achieve this.
Comment 7•10 years ago
|
||
That looks a lot more complicated now... I'm wondering if we should not do something drastically different for that app:// protocol instead. I'll run some experiments and come back with results.
Flags: needinfo?(fabrice)
Comment 8•10 years ago
|
||
(In reply to Shian-Yow Wu [:shianyow] from comment #6) > Per bug 945152 comment 47, the file stored in zip package need to be page > aligned for ArrayBuffer. > I think we need to modify zip tool to achieve this. I filed bug 959047 for this.
Reporter | ||
Comment 9•10 years ago
|
||
Given the new alignment requirement, maybe s/no_compression/store_and_align/g in my comment 5 proposal?
Assignee | ||
Comment 10•10 years ago
|
||
This is the part 1 pull request for specifying files to add into zip without compression. part 2 pull request for page aligned for ArrayBuffer should be a one line patch to call zip.alignStoredFiles(4096).
Attachment #8361583 -
Flags: review?(timdream)
Assignee | ||
Comment 11•10 years ago
|
||
BTW, webapp-zip.js should be refactoring since there are too much rules in the code, I wrote a document to figure out how webapp-zip.js works, but this issue is critual so I'll file another bug for it.
Assignee | ||
Comment 12•10 years ago
|
||
docuemnt for webapp-zip.js: https://gist.github.com/yurenju/8452422
Assignee | ||
Comment 13•10 years ago
|
||
Tim discussed with me about the integration test because the test case will be failed if anyone touch something in system which does not make sense. I'll remove it on next pull reqeust.
Assignee | ||
Comment 14•10 years ago
|
||
I have removed the integration test for webapp-zip.js.
Reporter | ||
Comment 15•10 years ago
|
||
Comment on attachment 8361583 [details] [review] github PR: https://github.com/mozilla-b2g/gaia/pull/15450 Looks good. If you make and modification based on my suggestions, please make sure you have test the new patch thoroughly. Thank you!
Attachment #8361583 -
Flags: review?(timdream) → review+
Assignee | ||
Comment 16•10 years ago
|
||
Discussed with Tim offline for naming that property, there are some canidates: 1. no_compression: missing align meaning 2. store_and_align: "stored" is the name of compression method without any compession[1] 3. no_compression_and_align: too long 4. mmap_files: shorter and more explicit for implmentation details. so we decided to use mmap_files. [1] https://en.wikipedia.org/wiki/Zip_%28file_format%29#Compression_methods
Assignee | ||
Comment 17•10 years ago
|
||
Assignee | ||
Comment 18•10 years ago
|
||
unzip -v profile/webapps/system.gaiamobile.org/application.zip
> Archive: profile/webapps/system.gaiamobile.org/application.zip
> Length Method Size Ratio Date Time CRC-32 Name
> -------- ------ ------- ----- ---- ---- ------ ----
> ...
> 17084 Stored 17084 0% 01-01-70 08:00 057d826b resources/sounds/unlock.ogg
> ...
Assignee | ||
Comment 19•10 years ago
|
||
some integration test failed, I'm investigating...
Assignee | ||
Comment 20•10 years ago
|
||
The problem is properties files are concated into locales-obj/ and no longer exists in zip, we need modify test cases to access /loacles-obj/en-US.json instead of /locales/matcher.en-US.properties.
Assignee | ||
Comment 21•10 years ago
|
||
merged. https://github.com/mozilla-b2g/gaia/commit/fd157cf37c851fdbd97075f414ea07e8e8f28b52 I would not close this bug because we're still waiting gecko patch for page align on bug 959047 for now. once gecko patch is landed I'll send a one line patch for enabling page align.
Assignee | ||
Comment 22•10 years ago
|
||
TBPL: https://tbpl.mozilla.org/?tree=B2g-Inbound&rev=b9f34744a7bc
Assignee | ||
Comment 23•10 years ago
|
||
feaure detect for nsIZipWriter.alignStoredFiles()
Attachment #8362771 -
Flags: review?(timdream)
Reporter | ||
Comment 24•10 years ago
|
||
Comment on attachment 8362771 [details] [review] github PR: https://github.com/mozilla-b2g/gaia/pull/15539 Ouch, I didn't realize you were intend to merge two patch separately on the same bug. We should never do that unless it's absolute necessary to make sure the bug status is either fixed with merged patch or unfixed with no patch merged. That said, I guess this one is still safe enough. Please don't do that next time.
Attachment #8362771 -
Flags: review?(timdream) → review+
Comment 25•10 years ago
|
||
This commit has caused error when trying to |make install-gaia APP=XXX| on Windows. All the filenames in the zip has prefix '\' , I guess it's the problem... https://github.com/yurenju/gaia/commit/3eb52bf51d1ce57cdbbf9ee8cade488d77985ef1
Flags: needinfo?(yurenju.mozilla)
Assignee | ||
Comment 26•10 years ago
|
||
Tim, got it and sorry for that, I won't do it again. George, I filed bug 962938 for it. since part 1 pr was landed, I'll land part pull request and solve the problem on bug 962938.
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(yurenju.mozilla)
Resolution: --- → FIXED
Assignee | ||
Comment 27•10 years ago
|
||
Merged. https://github.com/mozilla-b2g/gaia/commit/00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9
Reporter | ||
Comment 28•10 years ago
|
||
Yuren, 1. Does this patch automatically flags locales-obj/{{lang}}.data as mmap_files? (the files we are going to create in bug 958440). If not please file a follow-up bug or ask Evelyn to do so in her bug. 2. The patches here did not change/create any of the metadata.json. Does that means we are now recognizing marketplace app as non-external app? 3. I need to create another bug to create metadata.json for IME data files right?
Flags: needinfo?(yurenju.mozilla)
Assignee | ||
Comment 29•10 years ago
|
||
1. no and bug 962983 is filed 2. no, we don't, if an app doesn't contain metadata.json, we assume it's a non-external app. if contains a metadata.json but there is no "external" property, we assume it's an external app, we have a function in |build/utils.js@isExternalApp()| 3. yes
Flags: needinfo?(yurenju.mozilla)
Reporter | ||
Comment 30•10 years ago
|
||
(In reply to Yuren Ju [:yurenju][:小朱] from comment #29) > 2. no, we don't, if an app doesn't contain metadata.json, we assume it's a > non-external app. if contains a metadata.json but there is no "external" > property, we assume it's an external app, we have a function in > |build/utils.js@isExternalApp()| Sorry for not getting this in review, but I would say the rule here is a bit of confusing. An app dir gets to be recognized as internal by default, external if comes with metadata.json, and internal again if you explicitly set external:false in metadata? https://github.com/mozilla-b2g/gaia/commit/fd157cf37c851fdbd97075f414ea07e8e8f28b52#diff-2b31def028024b968babe1d78830dfafR44 We should employ easier logic here unless you want to keep the backward comparability (to out-of-tree apps maybe?)
Flags: needinfo?(yurenju.mozilla)
Assignee | ||
Comment 32•10 years ago
|
||
revert commits: https://github.com/mozilla-b2g/gaia/commit/87c66e243ab66164d207301ba551c1df75e204ca https://github.com/mozilla-b2g/gaia/commit/127aa58c777e81fe857bba1d45a9aaf9d32799cd
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 33•10 years ago
|
||
Travis-ci: https://travis-ci.org/mozilla-b2g/gaia/builds/18254658 root cause is |addToZip()| is no longer support add a directory, so we need to use utils.ls(FILE, true) to get all files in directory. the major changes is webapp-zip.js:L584-L592 https://github.com/mozilla-b2g/gaia/pull/15961/files#diff-8d06cf2fa60a709d7fe1324030517ce8R584 Tim, could you review it again? thank you.
Attachment #8361583 -
Attachment is obsolete: true
Attachment #8362771 -
Attachment is obsolete: true
Attachment #8370601 -
Flags: review?(timdream)
Reporter | ||
Comment 34•10 years ago
|
||
Comment on attachment 8370601 [details] [review] github PR: https://github.com/mozilla-b2g/gaia/pull/15961 Look like we have a conflict here.
Attachment #8370601 -
Flags: review?(timdream) → review+
Assignee | ||
Comment 35•10 years ago
|
||
Merged again. https://github.com/mozilla-b2g/gaia/commit/8328d81840dd74bbb7268a653cad215bd8739a60
Assignee | ||
Updated•10 years ago
|
Status: REOPENED → RESOLVED
Closed: 10 years ago → 10 years ago
Resolution: --- → FIXED
Comment 36•10 years ago
|
||
nominate 1.3T? because of bug 945152, we need the patch here to make bug 945152 work.
blocking-b2g: --- → 1.3T?
Comment 38•10 years ago
|
||
hi Evelyn, during the triage, we talked about doing further test on this. do we still need this for tarako? Thanks
Flags: needinfo?(ehung)
Comment 39•10 years ago
|
||
yeah, I did the test but can't tell anything better... I need someone to further evaluate the result. Will ping :shianyow to see if any tool can produce a fair report.
Flags: needinfo?(ehung)
Comment 40•10 years ago
|
||
ping again to see if we have further updates. thanks
Flags: needinfo?(ehung)
Comment 41•10 years ago
|
||
Tested but found some problems, waiting :shianyow's further fix on bug 945152.
Flags: needinfo?(ehung)
Comment 42•10 years ago
|
||
945152 is close to getting fixed and this will be needed, hence blocking
blocking-b2g: 1.3T? → 1.3T+
Comment 43•10 years ago
|
||
Hi Ying Xu, heard that you will be doing uplifts to 1.3T branch. After you completed the uplift, can you please set status-b2g-v1.3T to fixed? please let us know if you have problems with it. thanks
Flags: needinfo?(ying.xu)
Comment 44•10 years ago
|
||
Hi,yuren. Would you please rebase your patch on v1.3t branch? There're some huge conflicts I can not handle them. # 未合并的路径: # (酌情使用 "git add/rm <file>..." 标记解决方案) # # 由我们删除: build/multilocale.js # 由我们删除: build/test/integration/multilocale.test.js # 由我们删除: build/utils-xpc.js # 双方修改: build/utils.js # 双方修改: build/webapp-zip.js
Flags: needinfo?(ying.xu) → needinfo?(yurenju.mozilla)
Assignee | ||
Comment 45•10 years ago
|
||
talked to evelyn and she has a pull request for 1.3t.
Flags: needinfo?(yurenju.mozilla)
Comment 47•10 years ago
|
||
This patch is for 1.3t. Since build script in between master and 1.3t differs a lot, ask for review again.
Attachment #8391815 -
Flags: review?(yurenju.mozilla)
Flags: needinfo?(ehung)
Assignee | ||
Comment 48•10 years ago
|
||
Comment on attachment 8391815 [details] [review] point to https://github.com/mozilla-b2g/gaia/pull/17218 looks good to me but we should have test case for it, filed follow up bug 984212.
Attachment #8391815 -
Flags: review?(yurenju.mozilla) → review+
Reporter | ||
Comment 49•10 years ago
|
||
v1.3t: https://github.com/mozilla-b2g/gaia/commit/b517d8300c0808a9c437e56c3938e37b66ed3483
status-b2g-v1.3T:
--- → fixed
Updated•10 years ago
|
status-b2g-v1.4:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•