Skip to content

staging-next 2022-11-05#199725

Merged
vcunat merged 177 commits intomasterfrom
staging-next
Nov 10, 2022
Merged

staging-next 2022-11-05#199725
vcunat merged 177 commits intomasterfrom
staging-next

Conversation

@vcunat
Copy link
Member

@vcunat vcunat commented Nov 5, 2022

Note: this is the last staging-next that will be in 22.11 and at the same time can contain breaking changes (but DEs have exception). You can see this in the schedule: #193585
EDIT: note that another staging-next without breaking changes is planned afterwards.

= and others added 30 commits September 26, 2022 04:58
Nix modifies binaries after they are installed, which results in the wrong
signature. There is no easy way to avoid these modifications, so the best fix
is to simply regenerate the signatures after the fixup phase.
Qt QML is a language for designing user interfaces. QML (and related
JavaScript) source files are compiled into bytecode at runtime before
execution. To save time, this bytecode is cached on disk.

The cache is keyed primarily off the application name and mtime of the
source file. Since application names rarely change, source files that
have passed through the store have their mtimes fixed at 1, and
SOURCE_DATE_EPOCH is also set to 1 during builds, compiled bytecode in
this cache for Qt programs built by Nix is rarely or never invalidated.

This results in programs running with QML bytecode that does not match
their source code, which manifests as a constant source of random and
unreproducible glitches, oddities, and crashes in Qt applications when
they are upgraded. For applications like SDDM and Plasma, the user may
be left with a completely broken system, and sometimes even rolling back
doesn't fix the issue.

This patch resolves the issue by simply patching Qt's QML module in all
supported versions to disable the disk cache by default as if the
environment variable QML_DISABLE_DISK_CACHE were always 1. Patching the
code ensures consistent behavior for all Qt applications in all
environments, including non-NixOS uses.

Simple benchmarking suggests an approximate 10% CPU time penalty when
launching QML-heavy applications, and no measurable penalty to booting
into Plasma. This is considerably more benign than the earlier behavior.

For testing or the performance conscious, use of the cache can be
re-enabled after understanding the risks by setting the environment
variable QML_FORCE_DISK_CACHE to 1. This can be done system-wide using
e.g. the `environment.sessionVariables` NixOS option.

Future work could change the cache key through source code changes or
automatic generation of an appropriate SOURCE_DATE_EPOCH. Until then,
this is a simple change which removes a large class of user frustration
and headache for little penalty.
https://gitlab.gnome.org/GNOME/glib/-/compare/2.74.0...2.74.1

- Docs no longer can be generated in static builds.
- Drop merged patches.
- Add a comment to an undocumented patch.
- Drop huge with statement.
- Drop meson override not needed since a4a300d

Changelog-Reviewed-By: Jan Tojnar <jtojnar@gmail.com>
cc-wrapper: adding a cc-wrapper-hook to the cc-wrapper
python310Packages.build: 0.8.0 -> 0.9.0
python310Packages.psutil: 5.9.2 -> 5.9.3
@vcunat
Copy link
Member Author

vcunat commented Nov 8, 2022

vcunat and others added 7 commits November 8, 2022 11:07
I see only one instance of the warning where *equality* of strings
is tested and char signedness differs.  That one seems perfectly safe.
```
../libvirt-gconfig/libvirt-gconfig-domain-capabilities-os.c: In function 'search_firmwares':
../libvirt-gconfig/libvirt-gconfig-domain-capabilities-os.c:70:26: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness [-Wpointer-sign]
   70 |     if (!g_str_equal(node->name, "enum"))
/nix/store/fmqcm52w0p5jmzdbjjskwjiwyj9kqic9-glib-2.74.1-dev/include/glib-2.0/glib/ghash.h:165:39: note: in definition of macro 'g_str_equal'
  165 | #define g_str_equal(v1, v2) (strcmp ((v1), (v2)) == 0)
      |                                       ^~
```
@vcunat
Copy link
Member Author

vcunat commented Nov 9, 2022

Nothing blocking here, I think: https://hydra.nixos.org/eval/1785087?compare=1785072
... though we might want to wait a while for *-darwin, as it's still missing 25k builds right now.

@mweinelt mweinelt self-requested a review as a code owner November 9, 2022 21:53
@vcunat vcunat requested a review from jtojnar as a code owner November 10, 2022 08:25
@github-actions github-actions bot added the 6.topic: GNOME GNOME desktop environment and its underlying platform label Nov 10, 2022
@vcunat vcunat merged commit 75025ad into master Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: kernel The Linux kernel 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: qt/kde Object-oriented framework for GUI creation 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 6.topic: systemd Software suite that provides an array of system components for Linux operating systems. 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.