Switch to higher compression of GUI source

Bug #1218888 reported by Gary Poster
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-gui
Fix Released
High
Gary Poster

Bug Description

With this diff to the GUI...

=== modified file 'Makefile'
--- Makefile 2013-08-16 20:16:31 +0000
+++ Makefile 2013-08-30 12:29:50 +0000
@@ -95,7 +95,7 @@
 LAUNCHPAD_API_ROOT=staging
 endif
 RELEASE_NAME=juju-gui-$(RELEASE_VERSION)
-RELEASE_FILE=releases/$(RELEASE_NAME).tgz
+RELEASE_FILE=releases/$(RELEASE_NAME).xz
 RELEASE_SIGNATURE=releases/$(RELEASE_NAME).asc
 NPM_CACHE_VERSION=$(BZR_REVNO)
 NPM_CACHE_FILE=$(CURDIR)/releases/npm-cache-$(NPM_CACHE_VERSION).tgz

...we get a release that is 30% smaller than the current version.

ls -l releases/
total 63788
-rw-r--r-- 1 gary gary 38348212 Aug 30 08:29 juju-gui-0.9.0+build.992.tgz
-rw-r--r-- 1 gary gary 26965680 Aug 30 08:31 juju-gui-0.9.0+build.992.xz

With this diff to the charm...

=== modified file 'hooks/utils.py'
--- hooks/utils.py 2013-08-26 15:53:22 +0000
+++ hooks/utils.py 2013-08-30 12:40:15 +0000
@@ -677,7 +677,7 @@
     release_dir = os.path.join(CURRENT_DIR, 'release')
     cmd_log(run('rm', '-rf', release_dir))
     os.mkdir(release_dir)
- uncompress = command('tar', '-x', '-z', '-C', release_dir, '-f')
+ uncompress = command('tar', '-x', '-a', '-C', release_dir, '-f')
     cmd_log(uncompress(release_tarball))
     # Link the Juju GUI dir to the contents of the release tarball.
     cmd_log(run('ln', '-sf', first_path_in_dir(release_dir), JUJU_GUI_DIR))

...the charm should be able to transparently handle tgz or xz release (diff is untested).

Seems like an easy win to me, yeah?

This can be done in addition to/separately from making the tarball leaner in terms of what we include.

This xz change could also be applied to our npm cache stuff, but that affects fewer people.

Doing this might be nice to support bug 1218871.

Related branches

Gary Poster (gary)
Changed in juju-gui:
assignee: nobody → Gary Poster (gary)
status: Triaged → In Progress
importance: Low → High
Gary Poster (gary)
Changed in juju-gui:
status: In Progress → Fix Committed
Changed in juju-gui:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.