Closed Bug 384304 Opened 17 years ago Closed 17 years ago

/usr/bin/firefox is not able to handle symlinks due to error in script

Categories

(Toolkit :: Startup and Profile System, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla1.9beta1

People

(Reporter: hmontoliu, Assigned: hmontoliu)

References

Details

(Keywords: fixed-seamonkey1.1.8, verified1.8.1.10)

Attachments

(3 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20061201 Firefox/2.0.0.4 (Ubuntu-feisty)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070601 Ubuntu/7.10 (gutsy) Firefox/2.0.0.4

If you call firefox through a symlink, e.g. /etc/alternatives/x-www-browser you get the error:

(gutsy_chroot)hjmf@paleo:/$ x-www-browser

run-mozilla.sh: Cannot execute /usr/lib/firefox/x-www-browser-bin.

The link in alternatives is OK:

(gutsy_chroot)hjmf@paleo:/$ ls -l /etc/alternatives/x-www-browser
lrwxrwxrwx 1 root root 16 Jun 11 14:06 /etc/alternatives/x-www-browser -> /usr/bin/firefox

After looking at /usr/bin/firefox script the error seems to be:  in the part that deals with symlinks, seems that somebody missed to pass back the resulting "$progbase" variable to the main process.

Possible patch can be:
--- /usr/bin/firefox	2007-06-13 15:37:26.000000000 +0200
+++ /usr/bin/firefox	2007-06-13 16:23:40.000000000 +0200
@@ -111,6 +111,7 @@
     bn=`basename "$progname"`
     cd `dirname "$progname"`
     progname=`/bin/ls -l "$bn" | sed -e 's/^.* -> //' `
+    progbase=`basename "$progname"`
     if [ ! -x "$progname" ]; then
       break
     fi





Reproducible: Always

Steps to Reproduce:
1. create a symlink to /usr/bin/firefox; e.g. ln -s ./foo /usr/bin/firefox
2. execute the symlink: ./foo
Actual Results:  
the error that raises is:
run-mozilla.sh: Cannot execute /usr/lib/firefox/foo-bin.

Expected Results:  
Should launch the browser as it was meant in the script
This is for source MOZILLA_1_8_BRANCH -- last build I've made:

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.5pre) Gecko/20070607 BonEcho/2.0.0.5pre
Forgot to mention that this issue is dealt too at ubuntu's bug tracker:

https://bugs.launchpad.net/firefox/+bug/117575
confirmed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 268233 [details] [diff] [review]
The same patch but against ./browser/app/mozilla.in

Chris, got time for this one? I'm a little lost in here
Attachment #268233 - Flags: review?(cls)
Assignee: nobody → hjmf
Attachment #268233 - Flags: review?(cls) → review+
Attachment #268233 - Flags: approval1.9?
Attachment #268233 - Flags: approval1.8.1.9?
Attachment #268233 - Flags: approval1.8.1.8?
Note that Ubuntu has taken this patch downstream already (https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/117575).
Attachment #268233 - Flags: approval1.8.1.8?
Attachment #268233 - Flags: approval1.9? → approval1.9+
Thanks for the patch!

Checking in browser/app/mozilla.in;
/cvsroot/mozilla/browser/app/mozilla.in,v  <--  mozilla.in
new revision: 1.16; previous revision: 1.15
done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Summary: /usr/bin/firefox is not able to handle symlinks due error in the script → /usr/bin/firefox is not able to handle symlinks due to error in script
Target Milestone: --- → Firefox 3 M9
Comment on attachment 268233 [details] [diff] [review]
The same patch but against ./browser/app/mozilla.in

approved for 1.8.1.10, a=dveditz for release-drivers
Attachment #268233 - Flags: approval1.8.1.10? → approval1.8.1.10+
Keywords: checkin-needed
MOZILLA_1_8_BRANCH:

Checking in browser/app/mozilla.in;
/cvsroot/mozilla/browser/app/mozilla.in,v  <--  mozilla.in
new revision: 1.12.8.2; previous revision: 1.12.8.1
done
Verified for branch in Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.10) Gecko/2007111504 Firefox/2.0.0.10 (the RC1 for 2.0.0.10). I can reproduce this with 2.0.0.9 but not the 2.0.0.10 build.
asac noticed that this same change wasn't made to the three other mozilla.in files in the tree.
Attachment #268232 - Attachment is obsolete: true
Attachment #295488 - Flags: review?(cls)
This is a blocker for Linux distros.
Status: RESOLVED → REOPENED
Flags: blocking-firefox3?
Resolution: FIXED → ---
Attachment #295488 - Flags: review?(cls) → review+
Attachment #295488 - Flags: approval1.9?
Attachment #295488 - Flags: approval1.8.1.12?
Comment on attachment 295488 [details] [diff] [review]
patch mail, sunbird, and xulrunner, too!

a=beltzner for 1.9
Attachment #295488 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
Checking in mail/app/mozilla.in;
/cvsroot/mozilla/mail/app/mozilla.in,v  <--  mozilla.in
new revision: 1.8; previous revision: 1.7
done
Checking in calendar/sunbird/app/mozilla.in;
/cvsroot/mozilla/calendar/sunbird/app/mozilla.in,v  <--  mozilla.in
new revision: 1.11; previous revision: 1.10
done
Checking in xulrunner/app/mozilla.in;
/cvsroot/mozilla/xulrunner/app/mozilla.in,v  <--  mozilla.in
new revision: 1.4; previous revision: 1.3
done
Status: REOPENED → RESOLVED
Closed: 17 years ago17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Shouldn't have http://mxr.mozilla.org/mozilla/source/suite/app/seamonkey.in been patched as well?
(In reply to comment #15)
> Shouldn't have http://mxr.mozilla.org/mozilla/source/suite/app/seamonkey.in
> been patched as well?

It wasn't named mozilla.in, so I didn't find it. I blame SeaMonkey. :)
Attached patch SeaMonkey patchSplinter Review
Just going to carry over r=cls since it's really just the same file as the others but in a different place.

KaiRo, can I get branch approval for this, too?
Attachment #295904 - Flags: review+
Checking in suite/app/seamonkey.in;
/cvsroot/mozilla/suite/app/seamonkey.in,v  <--  seamonkey.in
new revision: 1.3; previous revision: 1.2
done
Comment on attachment 295904 [details] [diff] [review]
SeaMonkey patch

a-sm1.1.8=me for that SeaMonkey patch - but note that it's at mozilla/xpfe/bootstrap/mozilla.in on branch.
Flags: blocking1.8.1.12?
Not blocking, but we'll look at approvals.
Flags: blocking1.8.1.12? → blocking1.8.1.12-
Blocks: 411710
Comment on attachment 295488 [details] [diff] [review]
patch mail, sunbird, and xulrunner, too!

Bug 411710 filed to track landing this on the 1.8 branch, as per request from drivers.
Attachment #295488 - Flags: approval1.8.1.12?
Checking in xpfe/bootstrap/mozilla.in;
/cvsroot/mozilla/xpfe/bootstrap/Attic/mozilla.in,v  <--  mozilla.in
new revision: 1.8.8.8; previous revision: 1.8.8.7
done
Flags: blocking-firefox3? → blocking-firefox3+
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: