Bug 2342438 - does firefox package need /usr/lib64/firefox/firefox-bin ?
Summary: does firefox package need /usr/lib64/firefox/firefox-bin ?
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 41
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Gecko Maintainer
QA Contact: Fedora Extras Quality Assurance
URL: https://src.fedoraproject.org/rpms/fi...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-01-27 22:54 UTC by skierpage
Modified: 2025-01-29 09:19 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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