Bug 2225112 - /etc/profile.d/gmpopenh264.sh script overwrites MOZ_GMP_PATH unconditionally
Summary: /etc/profile.d/gmpopenh264.sh script overwrites MOZ_GMP_PATH unconditionally
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: openh264
Version: 38
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kalev Lember
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2221317
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-24 10:47 UTC by Dominik 'Rathann' Mierzejewski
Modified: 2023-08-17 15:21 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dominik 'Rathann' Mierzejewski 2023-07-24 10:47:19 UTC
The /etc/profile.d/gmpopenh264.sh script[1] shipped with mozilla-openh264 subpackage sets MOZ_GMP_PATH without regard to existing MOZ_GMP_PATH value.
This interferes with other system-wide scripts in /etc/profile.d trying to add something to MOZ_GMP_PATH, e.g. to configure a system-wide installation of widevine-cdm.

[1] https://src.fedoraproject.org/rpms/openh264/blob/rawhide/f/openh264.spec#_130

The relevant line in /etc/profile.d/gmpopenh264.sh should read:

MOZ_GMP_PATH="${MOZ_GMP_PATH}${MOZ_GMP_PATH:+:}/usr/lib64/mozilla/plugins/gmp-gmpopenh264/system-installed"

instead of:

MOZ_GMP_PATH="/usr/lib64/mozilla/plugins/gmp-gmpopenh264/system-installed"

Reproducible: Always

Steps to Reproduce:
1. echo 'export MOZ_GMP_PATH="${MOZ_GMP_PATH}${MOZ_GMP_PATH:+:}/usr/lib64/mozilla/plugins/gmp-widevinecdm/system-installed"' > /etc/profile.d/cdm.sh
2. Install mozilla-openh264
3. Re-login
4. echo $MOZ_GMP_PATH
Actual Results:  
/usr/lib64/mozilla/plugins/gmp-gmpopenh264/system-installed

Expected Results:  
/usr/lib64/mozilla/plugins/gmp-widevinecdm/system-installed:/usr/lib64/mozilla/plugins/gmp-gmpopenh264/system-installed


This was masked by bug 2221317 in firefox launcher script, which is now fixed.

I can work around this issue by renaming my script so that it gets executed after /etc/profile.d/gmpopenh264.sh, but I really shouldn't have to.

Comment 1 Kalev Lember 2023-07-24 11:30:38 UTC
Oh nice, thanks for catching that! Do you want to do a PR for the package?

Comment 2 Dominik 'Rathann' Mierzejewski 2023-08-17 13:20:43 UTC
https://src.fedoraproject.org/rpms/openh264/pull-request/1

Comment 3 Kalev Lember 2023-08-17 15:21:07 UTC
Thanks a lot! I left a question in the PR.


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