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
=== added directory 'click-src/aggregator/aarch64-linux-gnu'
=== added file 'click-src/aggregator/aarch64-linux-gnu/libcom.canonical.scopes.aggregator_aggregator.so'
0Binary 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 differ0Binary 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
=== added directory 'click-src/aggregator/arm-linux-gnueabihf'
=== added file 'click-src/aggregator/arm-linux-gnueabihf/libcom.canonical.scopes.aggregator_aggregator.so'
1Binary 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 differ1Binary 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
=== removed file 'click-src/aggregator/libcom.canonical.scopes.aggregator_aggregator.so'
2Binary 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 differ2Binary 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
=== modified file 'make-click.sh'
--- make-click.sh 2016-07-13 15:20:38 +0000
+++ make-click.sh 2016-07-26 09:34:45 +0000
@@ -12,6 +12,7 @@
12APP="unity-scope-news"12APP="unity-scope-news"
13TITLE="News"13TITLE="News"
14DESC="News from many sources"14DESC="News from many sources"
15FRAMEWORK="ubuntu-sdk-15.04.4"
15VERSION="4.9.0"16VERSION="4.9.0"
1617
17# definition for test18# definition for test
@@ -49,7 +50,7 @@
49TEST_PREVIEWBUTTONCOLOR="False"50TEST_PREVIEWBUTTONCOLOR="False"
50GETTEXT_DOMAIN="aggregator"51GETTEXT_DOMAIN="aggregator"
51# pkg name52# pkg name
52CLICK_PKG="${PKG}_${VERSION}_armhf.click"53CLICK_PKG="${PKG}_${VERSION}_multi.click"
5354
54# scope ini55# scope ini
55DISPLAY_NAME="News"56DISPLAY_NAME="News"
@@ -88,6 +89,7 @@
88sed -i 's_TITLE_'"${TITLE}"'_g' $TARGET/manifest.json89sed -i 's_TITLE_'"${TITLE}"'_g' $TARGET/manifest.json
89sed -i 's_DESC_'"${DESC}"'_g' $TARGET/manifest.json90sed -i 's_DESC_'"${DESC}"'_g' $TARGET/manifest.json
90sed -i 's_VERSION_'"${VERSION}"'_g' $TARGET/manifest.json91sed -i 's_VERSION_'"${VERSION}"'_g' $TARGET/manifest.json
92sed -i 's_FRAMEWORK_'"${FRAMEWORK}"'_g' $TARGET/manifest.json
9193
92#test94#test
93sed 's/@PKG_PREFIX@/'"${PREFIX}"'/g' $TEST/test_generic.py.in > $TEST/test_generic.py95sed 's/@PKG_PREFIX@/'"${PREFIX}"'/g' $TEST/test_generic.py.in > $TEST/test_generic.py
@@ -138,7 +140,14 @@
138cp $SOURCE/aggregator/settings.ini $TARGET/$APP/${PKG}_${APP}-settings.ini140cp $SOURCE/aggregator/settings.ini $TARGET/$APP/${PKG}_${APP}-settings.ini
139141
140# binary142# binary
141cp $SOURCE/aggregator/libcom.canonical.scopes.aggregator_aggregator.so $TARGET/$APP/lib${PKG}_${APP}.so143for ARCH in aarch64-linux-gnu arm-linux-gnueabihf i386-linux-gnu x86_64-linux-gnu
144do
145 if [ -d "${SOURCE}/aggregator/${ARCH}" ]; then
146 mkdir ${TARGET}/${APP}/${ARCH}
147 cp $SOURCE/aggregator/${ARCH}/libcom.canonical.scopes.aggregator_aggregator.so $TARGET/$APP/${ARCH}/lib${PKG}_${APP}.so
148 fi
149done
150
142151
143#child_scoess.json152#child_scoess.json
144cp $SOURCE/aggregator/child_scopes.json $TARGET/$APP/child_scopes.json153cp $SOURCE/aggregator/child_scopes.json $TARGET/$APP/child_scopes.json
145154
=== modified file 'manifest.json'
--- manifest.json 2015-07-01 13:22:01 +0000
+++ manifest.json 2016-07-26 09:34:45 +0000
@@ -1,8 +1,8 @@
1{1{
2 "name": "PKG",2 "name": "PKG",
3 "description": "DESC",3 "description": "DESC",
4 "framework": "ubuntu-sdk-15.04",4 "framework": "FRAMEWORK",
5 "architecture": "armhf",5 "architecture": ["armhf", "arm64", "i386", "amd64"],
6 "title": "TITLE",6 "title": "TITLE",
7 "hooks": {7 "hooks": {
8 "APP": {8 "APP": {

Subscribers

People subscribed via source and target branches

to all changes: