The default bug view has changed. See this FAQ.

sed used in non-portable way in configure-related -- breaks on Solaris 10

VERIFIED FIXED in Thunderbird 3

Status

MailNews Core
Build Config
--
major
VERIFIED FIXED
8 years ago
7 years ago

People

(Reporter: Jeff Wieland, Assigned: InvisibleSmiley)

Tracking

({fixed-seamonkey2.0.1})

Trunk
Thunderbird 3
Sun
Solaris
fixed-seamonkey2.0.1

Thunderbird Tracking Flags

(thunderbird3.0 .1-fixed)

Details

(Whiteboard: [fixed RC1 build 2])

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8.1.23) Gecko/20090908 SeaMonkey/1.1.18 Firefox/2.0
Build Identifier: http://releases.mozilla.org/pub/mozilla.org/seamonkey/releases/2.0/source/seamonkey-2.0.source.tar.bz2

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 mozilla.org


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 mozilla.org

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

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/confvars.sh, mail/confvars.sh, and configure.in

For instance from suite/confvars.sh

# 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`
else
  MOZ_APP_VERSION=`cat $topsrcdir/$MOZ_BUILD_APP/config/version.txt`
fi

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

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

If I use the GNU version of sed:

$ echo 1.9.1.4 | /opt/gnu-coreutils/bin/sed -e \ 's/\(^[0-9]\.[0-9]\.[0-9]\).*/\1/;'
1.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:

MOZILLA_BRANCH_VERSION=`echo ${MOZILLA_VERSION} | cut -f3 -d.`

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 
system.
(Reporter)

Updated

8 years ago
Version: unspecified → 1.9.1 Branch
(Reporter)

Comment 1

8 years ago
Note that this affects Thunderbird as well as Seamonkey.
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.
Component: Build Config → Build Config
Product: Core → MailNews Core
QA Contact: build-config → build-config
Version: 1.9.1 Branch → Trunk
(Reporter)

Comment 3

8 years ago
Thanks -- that makes sense.  I haven't submitted a bug here in years.

Updated

8 years ago
Component: Build Config → Build Config
Product: MailNews Core → Core
QA Contact: build-config → build-config
Version: Trunk → 1.9.1 Branch

Updated

8 years ago
Component: Build Config → Build Config
Product: Core → MailNews Core
QA Contact: build-config → build-config
Version: 1.9.1 Branch → Trunk

Comment 4

8 years ago
The 3 instance are not the same.

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

You should apply the patch to confvars.sh.

Comment 5

8 years ago
So basically we need to backport Bug 480515 to comm-1.9.1.
Status: UNCONFIRMED → NEW
Depends on: 480515
Ever confirmed: true
Version: Trunk → 1.9.1 Branch
(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 configure.in) to the confvars.sh files.
(Assignee)

Comment 7

8 years ago
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.
Assignee: nobody → jh
Status: NEW → ASSIGNED
Attachment #412282 - Flags: review?(bugzilla)
Attachment #412282 - Flags: approval-thunderbird3?
Attachment #412282 - Flags: approval-seamonkey2.0.1?
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.
Attachment #412282 - Flags: review?(bugzilla) → review+
(Reporter)

Comment 9

8 years ago
This works for me.  Thanks!
(Assignee)

Comment 10

8 years ago
Comment on attachment 412282 [details] [diff] [review]
caret first

http://hg.mozilla.org/comm-central/rev/7303c85436dc
Attachment #412282 - Attachment description: caret first → caret first [Checkin: comment 10]

Comment 11

8 years ago
Jens, is this fixed on trunk? If it is, please resolve it as fixed.
Version: 1.9.1 Branch → Trunk
(Assignee)

Updated

8 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.1a1
Attachment #412282 - Flags: approval-thunderbird3?
Attachment #412282 - Flags: approval-thunderbird3+
Attachment #412282 - Flags: approval-seamonkey2.0.1?
Attachment #412282 - Flags: approval-seamonkey2.0.1+
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 on attachment 412282 [details] [diff] [review]
caret first

Checked in:
http://hg.mozilla.org/releases/comm-1.9.1/rev/963e984965dd
Attachment #412282 - Attachment description: caret first [Checkin: comment 10] → caret first
Checked in for build 2 of RC1:
http://hg.mozilla.org/releases/comm-1.9.1/rev/621fbfb5b48c
Whiteboard: [fixed RC1 build 2]
Target Milestone: Thunderbird 3.1a1 → Thunderbird 3
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 ?
Whiteboard: [fixed RC1 build 2] → [fixed RC1 build 2][fixedtb301]
status-thunderbird3.0: --- → .1-fixed
Whiteboard: [fixed RC1 build 2][fixedtb301] → [fixed RC1 build 2]

Updated

7 years ago
Keywords: fixed-seamonkey2.0.1
Brian ping for comment
(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

7 years ago
I built comm-1.9.1 and thunderbird --version shows

 Thunderbird 3.0.1pre, Copyright (c) 1998-2010 mozilla.org

So I think it is fixed.
Status: RESOLVED → VERIFIED
Keywords: verified-thunderbird3.0
You need to log in before you can comment on or make changes to this bug.