Merge lp:~gary-wzl77/news-scope/fat_click_package into lp:news-scope

Proposed by Gary.Wang
Status: Needs review
Proposed branch: lp:~gary-wzl77/news-scope/fat_click_package
Merge into: lp:news-scope
Diff against target: 67 lines (+13/-4)
2 files modified
make-click.sh (+11/-2)
manifest.json (+2/-2)
To merge this branch: bzr merge lp:~gary-wzl77/news-scope/fat_click_package
Reviewer Review Type Date Requested Status
news-scope-team Pending
Review via email: mp+301150@code.launchpad.net

Commit message

generate fat click package when building.

Description of the change

generate fat click package when building.

To post a comment you must log in.
Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

Hey Gary,

I think that because you are doing this same type of "fat package" change to all branches and because you are testing them and you are the expert in this area, you should go ahead commit to trunks with merge proposals (unless there is a special case you want to bring to attention).

Also, I wonder what the overall plan is:
* is a single click package intended to contain the .so files for all architectures?
* or will there be a click package differentiated by file name including the arch for each arch?

Can you please explain this.

Cheers

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

I meant to say "commit to trunk WITHOUT merge proposals" (oops ;)

Revision history for this message
Gary.Wang (gary-wzl77) wrote :

Hi Kyle
Thanks for your question.

* is a single click package intended to contain the .so files for all architectures?
A: Yes, you're right, there's a single click package generated in following name convention after running make_click.sh
   ${PKG}_${SCOPE_NAME}_${VER_NUM}_multi.click
   the trailing string "_multi" indicates this click package contains binary files for all architectures which are declared in manifest.json.in
   ...
   "architecture": ["armhf", "arm64", "i386", "amd64"],
   ...

   As you can see, I added aggregator library(arm64) into a new folder(click-src/aggregator/aarch64-linux-gnu) and moved original armhf binary file into arm-linux-gnueabihf. That allows scope shell to load right binary file according to host architecture.
End user is able to install a single click package to all platform as long as the corresponding binary file can be found for each architecture.
This's how we support multi-architectures for all aggregator scope.

For each stand-alone scope, it's a little bit different.
I deploy a new script(build_fat_click.sh) for each scope.
https://bazaar.launchpad.net/~hanloon-team/hanloon/timeout/revision/52
you can use this script to generate fat click package as long as the declared architectures are created in your chroot.

P.S. You can still use previous way to generate armhf click. It's fine.
     Question: which kind of click we need to create and release on the store in the future, armhf or multi? Personally, I'd tend to the latter. Let's discuss with team members on this.

Unmerged revisions

59. By Gary.Wang

generate fat click package when building.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'click-src/aggregator/aarch64-linux-gnu'
2=== added file 'click-src/aggregator/aarch64-linux-gnu/libcom.canonical.scopes.aggregator_aggregator.so'
3Binary files click-src/aggregator/aarch64-linux-gnu/libcom.canonical.scopes.aggregator_aggregator.so 1970-01-01 00:00:00 +0000 and click-src/aggregator/aarch64-linux-gnu/libcom.canonical.scopes.aggregator_aggregator.so 2016-07-26 09:34:45 +0000 differ
4=== added directory 'click-src/aggregator/arm-linux-gnueabihf'
5=== added file 'click-src/aggregator/arm-linux-gnueabihf/libcom.canonical.scopes.aggregator_aggregator.so'
6Binary files click-src/aggregator/arm-linux-gnueabihf/libcom.canonical.scopes.aggregator_aggregator.so 1970-01-01 00:00:00 +0000 and click-src/aggregator/arm-linux-gnueabihf/libcom.canonical.scopes.aggregator_aggregator.so 2016-07-26 09:34:45 +0000 differ
7=== removed file 'click-src/aggregator/libcom.canonical.scopes.aggregator_aggregator.so'
8Binary files click-src/aggregator/libcom.canonical.scopes.aggregator_aggregator.so 2016-07-13 15:20:38 +0000 and click-src/aggregator/libcom.canonical.scopes.aggregator_aggregator.so 1970-01-01 00:00:00 +0000 differ
9=== modified file 'make-click.sh'
10--- make-click.sh 2016-07-13 15:20:38 +0000
11+++ make-click.sh 2016-07-26 09:34:45 +0000
12@@ -12,6 +12,7 @@
13 APP="unity-scope-news"
14 TITLE="News"
15 DESC="News from many sources"
16+FRAMEWORK="ubuntu-sdk-15.04.4"
17 VERSION="4.9.0"
18
19 # definition for test
20@@ -49,7 +50,7 @@
21 TEST_PREVIEWBUTTONCOLOR="False"
22 GETTEXT_DOMAIN="aggregator"
23 # pkg name
24-CLICK_PKG="${PKG}_${VERSION}_armhf.click"
25+CLICK_PKG="${PKG}_${VERSION}_multi.click"
26
27 # scope ini
28 DISPLAY_NAME="News"
29@@ -88,6 +89,7 @@
30 sed -i 's_TITLE_'"${TITLE}"'_g' $TARGET/manifest.json
31 sed -i 's_DESC_'"${DESC}"'_g' $TARGET/manifest.json
32 sed -i 's_VERSION_'"${VERSION}"'_g' $TARGET/manifest.json
33+sed -i 's_FRAMEWORK_'"${FRAMEWORK}"'_g' $TARGET/manifest.json
34
35 #test
36 sed 's/@PKG_PREFIX@/'"${PREFIX}"'/g' $TEST/test_generic.py.in > $TEST/test_generic.py
37@@ -138,7 +140,14 @@
38 cp $SOURCE/aggregator/settings.ini $TARGET/$APP/${PKG}_${APP}-settings.ini
39
40 # binary
41-cp $SOURCE/aggregator/libcom.canonical.scopes.aggregator_aggregator.so $TARGET/$APP/lib${PKG}_${APP}.so
42+for ARCH in aarch64-linux-gnu arm-linux-gnueabihf i386-linux-gnu x86_64-linux-gnu
43+do
44+ if [ -d "${SOURCE}/aggregator/${ARCH}" ]; then
45+ mkdir ${TARGET}/${APP}/${ARCH}
46+ cp $SOURCE/aggregator/${ARCH}/libcom.canonical.scopes.aggregator_aggregator.so $TARGET/$APP/${ARCH}/lib${PKG}_${APP}.so
47+ fi
48+done
49+
50
51 #child_scoess.json
52 cp $SOURCE/aggregator/child_scopes.json $TARGET/$APP/child_scopes.json
53
54=== modified file 'manifest.json'
55--- manifest.json 2015-07-01 13:22:01 +0000
56+++ manifest.json 2016-07-26 09:34:45 +0000
57@@ -1,8 +1,8 @@
58 {
59 "name": "PKG",
60 "description": "DESC",
61- "framework": "ubuntu-sdk-15.04",
62- "architecture": "armhf",
63+ "framework": "FRAMEWORK",
64+ "architecture": ["armhf", "arm64", "i386", "amd64"],
65 "title": "TITLE",
66 "hooks": {
67 "APP": {

Subscribers

People subscribed via source and target branches

to all changes: