Bug 2342438

Summary: does firefox package need /usr/lib64/firefox/firefox-bin ?
Product: [Fedora] Fedora Reporter: skierpage <info>
Component: firefoxAssignee: Gecko Maintainer <gecko-bugs-nobody>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 41CC: erack, gecko-bugs-nobody, jhorak, klaas, rstrode, stransky, suraj.ghimire7
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
URL: https://src.fedoraproject.org/rpms/firefox/blob/rawhide/f/firefox.spec
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description skierpage 2025-01-27 22:54:52 UTC
In Fedora 41, `/usr/bin/firefox` is a script that invokes `/usr/lib64/firefox/firefox`. But there is also a `/usr/lib64/firefox/firefox-bin` binary of identical size, but different contents. Why?

This seems an artifact of history. Mozillabug 658850 suggests firefox used to be a script that ran firefox-bin (it still is on MacOS X?), and Mozilla kept both rather than making symlinks to avoid bugs with Mozilla updates. But Fedora's firefox package doesn't do in-browser check for updates and never seems to invoke firefox-bin.

Reproducible: Always

Steps to Reproduce:
1. Run /usr/bin/firefox
2. Search process tree for firefox-bin
3. Run lsof /usr/lib64/firefox/firefox-bin
4. Run /usr/lib64/firefox/firefox-bin --new-instance &
Actual Results:  
Normal firefox operation doesn't involve the firefox-bin binary.

Expected Results:  
Maybe /usr/lib64/firefox/firefox-bin is unnecessary in Fedora.

This is a minor thing but it's been confusing users for years, and besides the extra 500kB on-disk, it takes time to build.

I looked at a huge firefox x86_64 build.log and it copies dist/bin/firefox to dist/bin/firefox-bin twice, but again my /usr/lib64/firefox and firefox-bin binaries differ and `ldd shows the same libaries at different addresses.

(Edited: tiny comment fixes.)

Comment 1 Martin Stransky 2025-01-28 06:55:59 UTC
Yes, we don't need firefox-bin, it's just a copy of firefox binary. Not sure why it's here.

Comment 2 skierpage 2025-01-29 09:19:35 UTC
thunderbird has the same issue: /usr/lib64/thunderbird/thunderbird-bin is the same size as /usr/lib64/thunderbird/thunderbird , but the binary differs and the library offsets are different. Mozillabug 697218.

(In reply to Martin Stransky from comment #1)
> Yes, we don't need firefox-bin, it's just a copy of firefox binary. Not sure
> why it's here.

If you remove firefox-bin from the spec file would it no longer be installed? Mozillabug 658850 comment 12 has patches to remove the -bin file from the build, though they don't seem to remove the intentional copy of $(MOZ_APP_NAME) to $(MOZ_APP_NAME)-bin in browser/app/Makefile.in. I haven't figured out what modifies one of the binaries slightly after this copy.

I noticed the firefox.1 man page in the package is wrong, it describes firefox-bin instead of firefox. I filed bug 2342756.