Last Comment Bug 528413 - sed used in non-portable way in configure-related -- breaks on Solaris 10
: sed used in non-portable way in configure-related -- breaks on Solaris 10
[fixed RC1 build 2]
: fixed-seamonkey2.0.1
Product: MailNews Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: Sun Solaris
: -- major (vote)
: Thunderbird 3
Assigned To: Jens Hatlak (:InvisibleSmiley)
Depends on: 480515
  Show dependency treegraph
Reported: 2009-11-12 19:23 PST by Jeff Wieland
Modified: 2010-01-13 07:50 PST (History)
8 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

caret first (1.60 KB, patch)
2009-11-13 13:36 PST, Jens Hatlak (:InvisibleSmiley)
standard8: review+
standard8: approval‑thunderbird3+
standard8: approval‑seamonkey2.0.1+
Details | Diff | Splinter Review

Description Jeff Wieland 2009-11-12 19:23:58 PST
User-Agent:       Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv: Gecko/20090908 SeaMonkey/1.1.18 Firefox/2.0
Build Identifier:

When I compile SeaMonkey 2.0 from source on Solaris 10, it identifies
itself as:

$ seamonkey2 -v
Mozilla SeaMonkey 2.1a1pre, Copyright (c) 1998-2009

Reproducible: Always

Steps to Reproduce:
1.  Build SeaMonkey 2.0 on Solaris 10

Actual Results:  
$ seamonkey2 -v
Mozilla SeaMonkey 2.1a1pre, Copyright (c) 1998-2009

Expected Results:  
$ seamonkey2 -v
Mozilla SeaMonkey 2.0, Copyright (c) 1998-2009

There are three instances of the following code:

MOZILLA_BRANCH_VERSION=`echo ${MOZILLA_VERSION} | sed -e 's/^\([0-9]\.[0-9]\.[0-9]\).*/\1/;'`

found in suite/, mail/, and

For instance from suite/

# Needed for the mozilla-central build side of the system.
MOZILLA_BRANCH_VERSION=`echo ${MOZILLA_VERSION} | sed -e 's/\(^[0-9]\.[0-9]\.[0-9]\).*/\1/;'`
if test "$MOZILLA_BRANCH_VERSION" = "1.9.1"; then
  MOZ_APP_VERSION=`cat $topsrcdir/$MOZ_BUILD_APP/config/version-191.txt`
  MOZ_APP_VERSION=`cat $topsrcdir/$MOZ_BUILD_APP/config/version.txt`

Assuming that MOZILLA_VERSION is set to from the contents of
milestone.txt file, on Solaris 10 I can run:

$ echo | sed -e 's/\(^[0-9]\.[0-9]\.[0-9]\).*/\1/;'

If I use the GNU version of sed:

$ echo | /opt/gnu-coreutils/bin/sed -e \ 's/\(^[0-9]\.[0-9]\.[0-9]\).*/\1/;'

So it appears to be relying on a behavior that grep on Solaris
does not have.

This may not cover all of the cases, but from what's in the
milestone.txt file now, one could use the following:


I have the GNU core utilities installed in a separate directory,
and prepending that to my patch allows the correct version to
be found.  These would not be found on a standard Solaris 10 
Comment 1 Jeff Wieland 2009-11-12 20:02:47 PST
Note that this affects Thunderbird as well as Seamonkey.
Comment 2 Phil Ringnalda (:philor) 2009-11-12 20:41:17 PST
Yeah, but the significant thing is that it doesn't affect Firefox - if it's not in mozilla-central, it's not a Core bug.
Comment 3 Jeff Wieland 2009-11-12 20:47:05 PST
Thanks -- that makes sense.  I haven't submitted a bug here in years.
Comment 4 Ginn Chen 2009-11-13 00:55:12 PST
The 3 instance are not the same.

I fixed it for of comm-central.
See Bug 480515.

You should apply the patch to
Comment 5 Philip Chee 2009-11-13 02:30:05 PST
So basically we need to backport Bug 480515 to comm-1.9.1.
Comment 6 Mark Banner (:standard8, afk until Dec) 2009-11-13 02:44:43 PST
(In reply to comment #5)
> So basically we need to backport Bug 480515 to comm-1.9.1.

No, we need to do the fix of bug 480515 (which was to comm-central's to the files.
Comment 7 Jens Hatlak (:InvisibleSmiley) 2009-11-13 13:36:39 PST
Created attachment 412282 [details] [diff] [review]
caret first

Patch applies cleanly on both c-c and c-191.

Jeff, please check whether this works for you (just to be sure).

Mark, feel free to pass on the review request if need be (the bug 480515 attachment was reviewed by KaiRo who is on vacation until the end of the month); AFAIK you have the authority to review both TB and SM parts which I combined in the patch.
Comment 8 Mark Banner (:standard8, afk until Dec) 2009-11-14 08:42:25 PST
Comment on attachment 412282 [details] [diff] [review]
caret first

r=Standard8. Please land on comm-central.

I need to figure out some things on the Thunderbird side, as to when this can/should land, so I'll do both the approvals in a couple of days.
Comment 9 Jeff Wieland 2009-11-14 10:08:34 PST
This works for me.  Thanks!
Comment 10 Jens Hatlak (:InvisibleSmiley) 2009-11-14 13:00:48 PST
Comment on attachment 412282 [details] [diff] [review]
caret first
Comment 11 Stefan [:stefanh] (away until December 6) 2009-11-14 14:34:27 PST
Jens, is this fixed on trunk? If it is, please resolve it as fixed.
Comment 12 Mark Banner (:standard8, afk until Dec) 2009-11-16 14:29:53 PST
Comment on attachment 412282 [details] [diff] [review]
caret first

a=Standard8 for comm-1.9.1 (both SM + TB parts).

I'm pushing a set of things to comm-1.9.1 anyway and want to make sure this gets in, so will push it in a few minutes.
Comment 13 Mark Banner (:standard8, afk until Dec) 2009-11-16 14:47:04 PST
Comment on attachment 412282 [details] [diff] [review]
caret first

Checked in:
Comment 14 Mark Banner (:standard8, afk until Dec) 2009-11-17 03:44:43 PST
Checked in for build 2 of RC1:
Comment 15 Ludovic Hirlimann [:Usul] 2009-11-18 03:07:34 PST
Brian can you comment on the fact that you can build out of the box and that the patch is applied an works on sun - as I don't have a sun box to build on to verify the bug ?
Comment 16 Ludovic Hirlimann [:Usul] 2010-01-08 03:19:06 PST
Brian ping for comment
Comment 17 Ludovic Hirlimann [:Usul] 2010-01-08 04:42:38 PST
(In reply to comment #16)
> Brian ping for comment
Asking Ginn , can you confirm that building on solaris doesn't require sed tricks ?
Comment 18 Ginn Chen 2010-01-08 19:04:02 PST
I built comm-1.9.1 and thunderbird --version shows

 Thunderbird 3.0.1pre, Copyright (c) 1998-2010

So I think it is fixed.

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