Last Comment Bug 408190 - Make automatic updates work with SeaMonkey (AUS)
: Make automatic updates work with SeaMonkey (AUS)
Status: VERIFIED FIXED
:
Product: SeaMonkey
Classification: Client Software
Component: Build Config (show other bugs)
: Trunk
: All All
: -- normal with 3 votes (vote)
: seamonkey2.0a1
Assigned To: Mark Banner (:standard8)
:
:
Mentors:
Depends on: 381420 410627 432040 536057
Blocks: 445790
  Show dependency treegraph
 
Reported: 2007-12-13 06:26 PST by Robert Kaiser
Modified: 2009-12-20 08:47 PST (History)
19 users (show)
kairo: blocking‑seamonkey2.0a1+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Client integration v1 (10.87 KB, patch)
2007-12-22 01:41 PST, Mark Banner (:standard8)
no flags Details | Diff | Splinter Review
Client integration v2 (10.98 KB, patch)
2007-12-22 02:09 PST, Mark Banner (:standard8)
no flags Details | Diff | Splinter Review
[checked in] Add update channel preference file (1.02 KB, patch)
2008-01-14 11:42 PST, Mark Banner (:standard8)
neil: review+
Details | Diff | Splinter Review
Client integration v3 (11.23 KB, patch)
2008-01-14 14:16 PST, Mark Banner (:standard8)
neil: superreview-
Details | Diff | Splinter Review
[checked in] Include the updater in packages (1.37 KB, patch)
2008-01-17 11:45 PST, Mark Banner (:standard8)
neil: review+
Details | Diff | Splinter Review
[checked in] Client integration v4 (11.57 KB, patch)
2008-01-18 05:11 PST, Mark Banner (:standard8)
neil: review+
Details | Diff | Splinter Review
[checked in] Fix Menu display for um.activeUpdate (883 bytes, patch)
2008-01-21 09:37 PST, Mark Banner (:standard8)
neil: review+
Details | Diff | Splinter Review
(408190-Dv1) <utilityOverlay.js> (FF->SM nit, + space/tab cleanup) [Checkin: Comment 30] (4.89 KB, patch)
2008-01-26 06:25 PST, Serge Gautherie (:sgautherie)
neil: review+
Details | Diff | Splinter Review

Description Robert Kaiser 2007-12-13 06:26:06 PST
In bug 381420, a new aus2-community server was created for community projects using the automatic update service (AUS).

We now need to make SeaMonkey work with AUS2, using this server.
Comment 1 Robert Kaiser 2007-12-19 09:08:40 PST
So, ause from the Sunbird team (who are using aus2-community already) is telling me the first step we need is to create full .mar files in tinderboxes, which should be just a tinder-config change, I'll look into that.
Partial .mar updates need bug 404768 fixed, ause has a review pending there.

The next step after generating the full .mar files will be to figure out uploading - "the user, the key, the tree and so on" as ause calls it.
Comment 2 Robert Kaiser 2007-12-21 13:46:19 PST
FYI, status of this is as follows:

I added those settings to tinder-config.pl (only platform varies between win/linux/mac):
-------------------------------------------
$update_package = 1;
$update_product = "SeaMonkey";
$update_version = "trunk";
$update_platform = "Linux_x86-gcc3";
$update_hash = "sha1";
$update_filehost = "ftp.mozilla.org";
$update_ver_file = 'suite/config/version.txt';
$update_pushinfo = 0;

# override tinder-defaults.pl to use community server
$update_aus_host = 'aus2-community.mozilla.org';
-------------------------------------------

Those additions were made to mozconfigs (MOZ_CO_MODULE has been extended where it was already defined):
-------------------------------------------
mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
ac_add_options --enable-update-channel=nightly
ac_add_options --enable-update-packaging
-------------------------------------------

Additionally, the following line had to be added to mozilla/suite/confvars.sh:
-------------------------------------------
MOZ_UPDATER=1
-------------------------------------------

With this, we hopefully should have complete MARs for the nightlies the first time in a few hours, but the info is not pushed to the AUS server yet, that's the next thing to figure out when this first step is confirmed complete.
Comment 3 Robert Kaiser 2007-12-21 13:53:08 PST
Ah, we just found out that we also needed to add mozilla/suite/locales/en-US/updater/updater.ini
Comment 4 Robert Kaiser 2007-12-21 16:42:39 PST
The first builds that include updater have been generated now, as well as the first complete MARs. All that can't be really used yet though, as we need to figure out the server side and push info there (see $update_pushinfo in comment #2) - and I guess we also need some client-side integration of updater in the SeaMonkey app as well.
Comment 5 Mark Banner (:standard8) 2007-12-22 01:41:26 PST
Created attachment 294337 [details] [diff] [review]
Client integration v1

Here's what we need for the client-side integration - at least for starters. Obviously I haven't tested this fully yet, but it should be reasonable. Still need to find the correct place for the styling (DOMI won't show the icon on the menuitem when loading an update) - possibly in a new utilityOverlay.css?
Comment 6 Mark Banner (:standard8) 2007-12-22 02:09:40 PST
Created attachment 294339 [details] [diff] [review]
Client integration v2

Fixes some bitrot hopefully.
Comment 7 Robert Kaiser 2008-01-03 11:17:06 PST
blocking-seamonkey2.0a1+ per Council agreement on http://home.kairo.at/blog/2008-01/seamonkey_2_alpha_criteria
Comment 8 Robert Kaiser 2008-01-09 06:41:55 PST
Comment on attachment 294339 [details] [diff] [review]
Client integration v2

>Index: suite/common/utilityOverlay.js
>===================================================================
>+  // If there's an update ready to be applied, show the "Update Downloaded"
>+  // UI instead and let the user know they have to restart the browser for
>+  // the changes to be applied. 
>+  if (um.activeUpdate && um.activeUpdate.state == "pending")
>+    prompter.showUpdateDownloaded(um.activeUpdate, false);

This should now lose the "false" argument per bug 391598
Comment 9 ause 2008-01-14 09:47:43 PST
i found an already existing user "seabld" on aus2-community and set up some directories for uploads.
try to enable pushing and we'll find out what i missed
Comment 10 Robert Kaiser 2008-01-14 10:45:04 PST
ause, thanks for looking into that, I just checked in a change to set $update_pushinfo = 1; on the SeaMonkey tinderboxen, let's see how it works out.
Comment 11 Mark Banner (:standard8) 2008-01-14 11:09:16 PST
General note for when we do get this enabled, kb already has a page listing some information/problems & resolutions with software update:

http://kb.mozillazine.org/Software_Update
Comment 12 Mark Banner (:standard8) 2008-01-14 11:42:32 PST
Created attachment 297015 [details] [diff] [review]
[checked in] Add update channel preference file

Adds the generation of the app.update.channel preference in a channel-prefs.js file. I'm assuming FF does it this way to make it easy for testers to modify the value if they want to.

Note that toolkit reads the default pref branch, so changes in about:config won't apply here (see also the kb.mozillazine.org link I just posted).

I've put it in suite/browser alongside browser-prefs.js as I though that was most sensible, as we don't have <foo>/app/profile etc like the rest do.
Comment 13 Mark Banner (:standard8) 2008-01-14 14:16:14 PST
Created attachment 297069 [details] [diff] [review]
Client integration v3

Updated patch for the menus/preferences etc. Fixes a few bugs from the previous version, also removes the throbber from the menu as the text should be enough (note I left the attributes in, just in case someone wants to play around with it in an extension).
Comment 14 Robert Kaiser 2008-01-14 18:18:42 PST
(In reply to comment #12)
> I've put it in suite/browser alongside browser-prefs.js as I though that was
> most sensible, as we don't have <foo>/app/profile etc like the rest do.

I'd prefer to have it in common/ instead of browser/ if possible...
Comment 15 neil@parkwaycc.co.uk 2008-01-15 07:51:15 PST
Comment on attachment 297069 [details] [diff] [review]
Client integration v3

>@@ -179,18 +179,10 @@
Different bug ;-)

>+  // Disable the UI if the update enabled pref has been locked by the
>+  // administrator or if we cannot update for some other reason 
Nit: trailing space.

I found another reason we cannot update, which isn't covered here ;-)
I'd better file a bug on the updater...

>+  // If there's an active update, substitute its name into the label
>+  // we show for this item, otherwise display a generic label.
What about accesskeys?

>+<!ENTITY updateCmd.label                        "Check for Updates…">
We're not on ellipses yet...
Comment 16 Robert Kaiser 2008-01-16 06:36:00 PST
It looks like aus2-community is now offering update info for SeaMonkey nightlies, see e.g. https://aus2-community.mozilla.org/update/1/SeaMonkey/2.0a1pre/2008011501/Linux_x86-gcc3/en-US/nightly/update.xml
Comment 17 Robert Kaiser 2008-01-17 09:16:06 PST
FYI, bug 302721 comment #43 explains why channel-prefs.js is a separate file and not part of a bigger prefs file.
Comment 18 Mark Banner (:standard8) 2008-01-17 11:45:24 PST
Created attachment 297587 [details] [diff] [review]
[checked in] Include the updater in packages

I've just been trying to get this to work - it helps if we include the updater{,.exe} in our packages.
Comment 19 Mark Banner (:standard8) 2008-01-18 05:11:50 PST
Created attachment 297752 [details] [diff] [review]
[checked in] Client integration v4

Updated client integration patch. Addresses Neil's comments, also removes redundant warning about updates being disabled...
Comment 20 neil@parkwaycc.co.uk 2008-01-19 07:27:20 PST
Comment on attachment 297752 [details] [diff] [review]
[checked in] Client integration v4

>+function buildHelpMenu()
Badly named (although I guess updateUpdateItem() isn't much better).

>+  if (!gUtilityBundle)
>+    gUtilityBundle = document.getElementById("bundle_utilityOverlay");
File a bug on fixing the other users of utilityOverlay.properties?

>+updatesItem_downloading=Downloading %S…
...

>+updatesItem_pendingAccessKey=A
Can't use A (About &brandShortName;); U perhaps?
Comment 21 Mark Banner (:standard8) 2008-01-19 08:04:52 PST
Comment on attachment 297752 [details] [diff] [review]
[checked in] Client integration v4

(In reply to comment #20)
> (From update of attachment 297752 [details] [diff] [review])
> >+function buildHelpMenu()
> Badly named (although I guess updateUpdateItem() isn't much better).

I went with updateCheckUpdatesItem().

> >+  if (!gUtilityBundle)
> >+    gUtilityBundle = document.getElementById("bundle_utilityOverlay");
> File a bug on fixing the other users of utilityOverlay.properties?

Will do in a bit.

Patch checked in.
Comment 22 Serge Gautherie (:sgautherie) 2008-01-21 09:00:02 PST
(In reply to comment #21)
> > >+  if (!gUtilityBundle)
> > >+    gUtilityBundle = document.getElementById("bundle_utilityOverlay");
> > File a bug on fixing the other users of utilityOverlay.properties?
> 
> Will do in a bit.

I don't know if it's the same kind of issue, but I'm getting
[
Error: activeUpdate is not defined
Source File: chrome://communicator/content/utilityOverlay.js
Line: 479
]
when hovering/opening the Help menu while an update is hidden (suspended or in-progress).

Code is
[
  if (um.activeUpdate && um.activeUpdate.name)
    checkForUpdates.label = gUtilityBundle.getFormattedString("updatesItem_" + key,
                                                              [activeUpdate.name]);
]
Missing |um.| on the last line !?
Comment 23 Mark Banner (:standard8) 2008-01-21 09:37:26 PST
Created attachment 298284 [details] [diff] [review]
[checked in] Fix Menu display for um.activeUpdate
Comment 24 Philip Chee 2008-01-23 00:59:36 PST
>+      // If we're downloading an update at present, show the text:
>+      // "Downloading Firefox x.x..." otherwise we're paused, and show
>+      // "Resume Downloading Firefox x.x..."

I don't think we are downloading Firefox. Otherwise something is seriously wrong.
Comment 25 Robert Kaiser 2008-01-24 15:34:45 PST
I have reports from Windows and Linux nightly users at least that they have/had the update dialog popping up on the screen, so I guess this bug is fixed, and we can defer further work to followups.
Comment 26 Mark Banner (:standard8) 2008-01-25 06:12:23 PST
(In reply to comment #25)
> I have reports from Windows and Linux nightly users at least that they have/had
> the update dialog popping up on the screen, so I guess this bug is fixed, and
> we can defer further work to followups.
> 
Ok, I've heard a few good reports as well. Marking as fixed.
Comment 27 Serge Gautherie (:sgautherie) 2008-01-26 05:45:56 PST
Comment on attachment 298284 [details] [diff] [review]
[checked in] Fix Menu display for um.activeUpdate

{{
2008-01-22 09:09	bugzilla%standard8.plus.com 	mozilla/suite/common/utilityOverlay.js 	1.108
}}

This part is V.Fixed in
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9b3pre) Gecko/2008012302 SeaMonkey/2.0a1pre] (nightly) (W2Ksp4)
Comment 28 Serge Gautherie (:sgautherie) 2008-01-26 06:05:26 PST
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9b3pre) Gecko/2008012202 SeaMonkey/2.0a1pre] (nightly) (W2Ksp4)

(Confirming that I got the "popup" and an update (20080125xx) was automatically downloaded then installed on next application startup.)

***

V.Fixed.
(although there may still be 1-2 nits to fix.)
Comment 29 Serge Gautherie (:sgautherie) 2008-01-26 06:25:30 PST
Created attachment 299412 [details] [diff] [review]
(408190-Dv1) <utilityOverlay.js> (FF->SM nit, + space/tab cleanup)
[Checkin: Comment 30]

*Attachment 297752 [details] [diff] comment fix, per comment 24.
*(whole file) Space/Tab cleanup, while we're there.
Comment 30 Reed Loden [:reed] (use needinfo?) 2008-01-29 21:38:52 PST
Checking in suite/common/utilityOverlay.js;
/cvsroot/mozilla/suite/common/utilityOverlay.js,v  <--  utilityOverlay.js
new revision: 1.109; previous revision: 1.108
done
Comment 31 Serge Gautherie (:sgautherie) 2008-07-17 10:07:53 PDT
(In reply to comment #20)
> >+  if (!gUtilityBundle)
> >+    gUtilityBundle = document.getElementById("bundle_utilityOverlay");
> File a bug on fixing the other users of utilityOverlay.properties?

That's now bug 445790.

Note You need to log in before you can comment on or make changes to this bug.