-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
firefox: warn users that drmSupport=false argument does nothing #171929
Conversation
Hm, I'm a bit surprised, as that would mean I misunderstood the config options. I thought that if they offer an |
I think the problem is that EME is just not supported on aarch64 on Linux, and that's why setting the option at all fails for you. https://github.com/mozilla/gecko-dev/blob/master/toolkit/moz.configure#L767-L778 https://github.com/mozilla/gecko-dev/blob/master/toolkit/moz.configure#L795 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can build w and w/o drmSupport on x86_64-linux, so this is just a target specific limitation that has existed for a long time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message feels a bit too wordy to me. Maybe just keep the last part about the policy file?
Let's set aarch64 aside for a second, I regret mentioning it. I only brought that up because it's how I noticed this problem in the first place. |
What's left here when we exclude the aarch64 problem? I reject your assertion message based on testing done here and in #166078 on x86_64-linux. Also shaming someone publicly should be done with great care. |
Of course. But you still got |
On mobile currently, so can't check, but I understand the flag only sets the default runtime configuration these days, which can be overridden again from within about: config. |
This is the whole problem.
Mozilla then removed the ability to do that. Instead of alerting users with an error message indicating that they had removed this ability, they silently redefined what it means. I absolutely think that this is shameful and am not afraid to say it. However in a certain sense the commit messages in the nixpkgs repo speak for all the contributors, and I shouldn't ascribe my own take on the situation to the other contributors. I have removed the text "Shame on Mozilla for silently ignoring this flag instead of, at minimum, warning users that they have decided to stop responding to it." from the commit message. In any event, I don't think nixpkgs should do the same thing Mozilla did. Besides, what's the point of having a compile-time option in that case? A compile-time flag to set the default value of a runtime option? Really? I can't think of any other examples of those anywhere in nixpkgs... I'd be shocked if there were any of them in packages as widely-used as a web browser. And it's totally inconsistent with the nixpkgs naming scheme, where |
Ok, how does this look? I really want to keep a link to the commit because it really is the best and only objective evidence that a silent and radical behavior change was made. Otherwise we get long discussions and hemming and hawing about "oh, I forgot about that, hey, it never worked anyway" etc etc. Frankly if the Nixpkgs Dieties declared that this |
Please let us know when you get back to your desk and take a look. And although it is strictly tangential to this particular PR, you'll notice that |
To make it a preference that is still user-overridable without having to recompile. This is all about user choice! I have other duties to attend to, so I'll reply to other comments later. |
I think we're in violent agreement here: DRM is no longer a compile-time choice for firefox. Therefore, it makes no sense for nixpkgs to have a compile-time option for this functionality -- especially because the option now does nothing (like the goggles).
::rolls eyes:: |
The nixpkgs drmSupport?true option to the firefox package causes compilation with --disable-eme. This flag has been silently ignored by Firefox since September of 2016. I only noticed because some recent change caused --disable-eme on aarch64 to cause a build failure (shown below). We should not mislead users into thinking that it is possible to turn off EME at compile time. This commit asserts `drmSupport` and prints an explanation of the situation if that assertion fails. I recommend we leave this assertion for one release cycle to warn anybody who might have been using it, and then drop the option in the following release. 0:11.70(B Traceback (most recent call last):(B 0:11.70(B File "/build/firefox-91.8.0/configure.py", line 226, in <module>(B 0:11.71(B sys.exit(main(sys.argv))(B 0:11.71(B File "/build/firefox-91.8.0/configure.py", line 50, in main(B 0:11.71(B sandbox.run(os.path.join(os.path.dirname(__file__), "moz.configure"))(B 0:11.71(B File "/build/firefox-91.8.0/python/mozbuild/mozbuild/configure/__init__.py", line 507, in run(B 0:11.71(B self._value_for(option)(B 0:11.71(B File "/build/firefox-91.8.0/python/mozbuild/mozbuild/configure/__init__.py", line 612, in _value_for(B 0:11.71(B return self._value_for_option(obj)(B 0:11.71(B File "/build/firefox-91.8.0/python/mozbuild/mozbuild/util.py", line 1050, in method_call(B 0:11.72(B cache[args] = self.func(instance, *args)(B 0:11.72(B File "/build/firefox-91.8.0/python/mozbuild/mozbuild/configure/__init__.py", line 679, in _value_for_option(B 0:11.72(B raise InvalidOptionError((B 0:11.72(B mozbuild.configure.options.InvalidOptionError: --disable-eme is not available in this configuration(B Error running mach: ['configure', '--prefix=/nix/store/4s2hn4hnm96frmdh6bd6qzxsphvsdf1y-firefox-esr-unwrapped-91.8.0esr', '--disable-tests', '--disable-updater', '--enable-application=browser', '--enable-default-toolkit=cairo-gtk3-wayland', '--enable-system-pixman', '--with-libclang-path=/nix/store/cggszyf7mjlzrp9vxrlffvdr9nqjjd13-clang-14.0.1-lib/lib', '--with-system-ffi', '--with-system-icu', '--disable-dbus', '--disable-accessibility', '--with-system-jpeg', '--with-system-libevent', '--with-system-libvpx', '--with-system-nspr', '--with-system-nss', '--with-system-png', '--with-system-webp', '--with-system-zlib', '--enable-lto=cross', '--enable-linker=lld', '--enable-alsa', '--disable-pulseaudio', '--enable-ffmpeg', '--enable-jemalloc', '--disable-necko-wifi', '--enable-negotiateauth', '--disable-webrtc', '--disable-crashreporter', '--disable-eme', '--disable-debug', '--enable-optimize', '--enable-release', '--enable-debug-symbols', '--disable-strip', '--disable-install-strip', '--enable-official-branding'] The error occurred in code that was called by the mach command. This is either a bug in the called code itself or in the way that mach is calling it. You can invoke |./mach busted| to check if this issue is already on file. If it isn't, please use |./mach busted file configure| to report it. If |./mach busted| is misbehaving, you can also inspect the dependencies of bug 1543241. If filing a bug, please include the full output of mach, including this error message. The details of the failure are as follows: Exception: Process executed with non-0 exit code 1: ['/nix/store/s6lwpx258l9ypq8phghzdhrnidnfgjk3-python3-3.9.12/bin/python3', '/build/firefox-91.8.0/configure.py', '--prefix=/nix/store/4s2hn4hnm96frmdh6bd6qzxsphvsdf1y-firefox-esr-unwrapped-91.8.0esr', '--disable-tests', '--disable-updater', '--enable-application=browser', '--enable-default-toolkit=cairo-gtk3-wayland', '--enable-system-pixman', '--with-libclang-path=/nix/store/cggszyf7mjlzrp9vxrlffvdr9nqjjd13-clang-14.0.1-lib/lib', '--with-system-ffi', '--with-system-icu', '--disable-dbus', '--disable-accessibility', '--with-system-jpeg', '--with-system-libevent', '--with-system-libvpx', '--with-system-nspr', '--with-system-nss', '--with-system-png', '--with-system-webp', '--with-system-zlib', '--enable-lto=cross', '--enable-linker=lld', '--enable-alsa', '--disable-pulseaudio', '--enable-ffmpeg', '--enable-jemalloc', '--disable-necko-wifi', '--enable-negotiateauth', '--disable-webrtc', '--disable-crashreporter', '--disable-eme', '--disable-debug', '--enable-optimize', '--enable-release', '--enable-debug-symbols', '--disable-strip', '--disable-install-strip', '--enable-official-branding'] File "/build/firefox-91.8.0/python/mozbuild/mozbuild/build_commands.py", line 185, in configure return driver.configure( File "/build/firefox-91.8.0/python/mozbuild/mozbuild/controller/building.py", line 1528, in configure status = self._run_command_in_objdir( File "/build/firefox-91.8.0/python/mozbuild/mozbuild/base.py", line 845, in _run_command_in_objdir return self.run_process(cwd=self.topobjdir, **args) File "/build/firefox-91.8.0/python/mach/mach/mixin/process.py", line 176, in run_process raise Exception( note: keeping build directory '/tmp/nix-build-firefox-esr-unwrapped-91.8.0esr.drv-1'
Torbrowser noticed the same thing, and found a way to restore the old Bug 16285: Exclude ClearKey system for now
|
With the benefit of hindsight, the tone of this PR was... less than tactful. When I have more time available I will try again using a more diplomatic approach. |
Description of changes
When nixpkgs
drmSupport?true
option is set tofalse
, it causes firefox to compile with--disable-eme
. This flag has been silently ignored by Firefox since September of 2016.We should not mislead users into thinking that it is still possible to turn off EME at compile time.
Since firefox no longer provides any way for nixpkgs to implement
drmSupport==false
, this commit assertsdrmSupport==true
and prints an explanation of the situation if that assertion fails. I recommend we leave this assertion for one release cycle to warn anybody who might have been using it, and then drop the option in the following release.I only noticed because some recent change caused
--disable-eme
on aarch64 to cause a build failure (shown below).Shame on Mozilla for silently ignoring this flag instead of, at minimum, warning users that they have decided to stop responding to it.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes