Comment 1 for bug 616452

Revision history for this message
Thomas Berezansky (tsbere) wrote :

Patch quick notes:

Added updates folder with scripts, Makefile.am
Autoconf addition for enabling/disabling installing of said folder
Added a block to the example apache eg.conf file for the updates folder. !!!IMPORTANT - when updating and wanting to use the auto update feature, make sure you add this to your config!!!
Autoconf addition of --with-updateshost=hostname for setting an auto update host at configure time. (sets AUTOUPDATE_HOST default for staff client builds, otherwise no effect currently)
Changed the staff client build process:
 STAFF_CLIENT_BUILD_ID split into three variables:
  STAFF_CLIENT_BUILD_ID still generated via date string automatically, only used in application.ini now
  STAFF_CLIENT_VERSION generated from README file. If trunk, generated from svn info. Applied to application.ini, install.rdf, constants.js
  STAFF_CLIENT_STAMP_ID generated from STAFF_CLIENT_VERSION. Used for all xul/server URL replacements instead of STAFF_CLIENT_BUILD_ID, applied to constants.js
 I suggest that with this patch one does NOT specify STAFF_CLIENT_BUILD_ID when running make.
 Added substitution rules for when AUTOUPDATE_HOST is specified at end of stamp process. Note that this can be set at configure time (see above) or via "make AUTOUPDATE_HOST=hostname build"
Changed staff client's main.js:
 Uses CLIENT_VERSION and CLIENT_STAMP constants added to constants.js for version variable now
 Added code for "Check for Upgrades" menu item showing/hiding/functionality
Changed staff client's main.xul:
 Changed "About" menu to "Help" menu - TRANSLATION NEEDED!
 Added "About" to "Help" menu (using previous about button translation)
 Added "Contents" to "Help" menu - No code running it, disabled by default, I don't have a page to send it to yet, etc. - TRANSLATION NEEDED!
 Added "Check for Upgrades" to "Help" menu - TRANSLATION NEEDED!
Changed staff client's auth/controller.js:
 Added a check - If we have a function for checking for upgrades (set in main.js) and the server version is incompatible, prompt for checking for upgrades instead of normal error. - TRANSLATION NEEDED!
Added/Changed staff client make targets:
 clients - runs make win-client, linux-client, and generic-client (individually)
 client_dir - Builds a client directory from the build directory, without doing a rebuild. This mainly amounts to "copy everything but server/".
 client_app - Prereq client_dir, Removes install.rdf from client directory so that an app bundle can't be installed as an extension
 client_ext - Prereq client_dir, Removes application.ini, autoupdate.js, standalone_xul_app.js from client directory so that an extension won't break firefox
 extension - Prereq client_ext, Re-written to use client_ext.
 generic-client - Prereq client_app, Makes an xpi suitable for xulrunner --install-app usage
 win-xulrunner - Prereq client_app, adds windows xulrunner to the client build
 linux-xulrunner - Prereq client_app, adds linux xulrunner to the client build
 win-client - Prereq win-xulrunner, builds a setup exe (requires that nsis package be installed, will add options for automatic update if configured and developer options if client build was a "make devbuild")
 linux-client - Prereq linux_xulrunner, builds a tar.bz2 bundle of the linux client
 [generic-|win-|linux-|extension-]updates[-client] - Calls external/make_updates.sh to build full and partial updates. generic/win/linux/extension prefix limit to that distribution. Adding the -client builds clients and copies them to a subdirectory of the updates folder as well. extension-updates-client doesn't exist.

AUTOMATIC UPDATE GOTCHAS:
 https:// on CLIENT updates is recommended, not required. Any cert that requires an exception will NOT work for automatic updating. To get my code to spit out http:// urls specify host as http://hostname instead of hostname.
 https:// on EXTENSION updates is required UNLESS you sign update.rdf with McCoy. McCoy has no official command line support right now, but providing an install.mccoy.rdf file with the public key installed in it in the staff_client folder will use that rdf instead of install.rdf. update.rdf then has to have the hostname substituted and signature applied before it will be considered valid over http://. Same bit for getting http:// links via my code, specify as http://hostname.

Additonal details/"why did I do that" stuff:

Splitting STAFF_CLIENT_VERSION off from STAFF_CLIENT_BUILD_ID was needed to make the version at least default to something valid according to:
https://developer.mozilla.org/en/Toolkit_version_format
This is apparently required for automatic extension updates to function properly. With trunk it attempts to make "0trunk.revision" where revision is the last changed revision of the staff client. If using git svn instead of just svn you can tell it that with a "SVN=git svn" option to make.

The STAFF_CLIENT_STAMP_ID is then generated off of that by replacing all . with _. If nothing but numbers and _ are left it prepends rel_, which gets us our previous recommended BUILD_ID setting on release builds. On trunk you will have the word trunk in there, which will stop the rel_ prepending.

The client changes (for version checking in particular) serve multiple purposes. For one, they move a xul/server reference out of main.js, making updates slightly more efficient. For two, the version variable now gets a 1.2.3.4 string on release builds instead of a rel_1_2_3_4 string.

DCO:

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Signed-off-by: Thomas Berezansky <email address hidden>