Bug 2225112

Summary: /etc/profile.d/gmpopenh264.sh script overwrites MOZ_GMP_PATH unconditionally
Product: [Fedora] Fedora Reporter: Dominik 'Rathann' Mierzejewski <dominik>
Component: openh264Assignee: Kalev Lember <klember>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: klember, wtaymans
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
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:
Bug Depends On: 2221317    
Bug Blocks:    

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.