Skip to content
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

nixos/fonts: Fix nested quotes in fontconfig.nix #338815

Merged
merged 1 commit into from
Sep 1, 2024
Merged

Conversation

ejls
Copy link
Contributor

@ejls ejls commented Sep 1, 2024

Description of changes

A sed with nested double quotes is inserting malformed XML into /etc/fonts/fonts.conf, this commit put the sed command into single quotes to properly insert double quotes to enclose the XML attribute.
Without this change fontconfig-using programs trigger the following error:

Fontconfig error: "/etc/fonts/fonts.conf", line 5: not well-formed (invalid token)
Fontconfig error: Cannot load config file from /etc/fonts/fonts.conf

The error appeared 2 days ago with PR #338326 (ping @K900)

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

A sed with nested double quotes is inserting malformed XML into /etc/fonts/fonts.conf, this commit put the sed command into single quotes to properly insert double quotes to enclose the XML attribute.
@ejls ejls changed the title Fix nested quotes in fontconfig.nix nixos/fonts: Fix nested quotes in fontconfig.nix Sep 1, 2024
@K900
Copy link
Contributor

K900 commented Sep 1, 2024

Huh, how did it work in my testing.

@K900 K900 merged commit c7d8545 into NixOS:master Sep 1, 2024
18 of 19 checks passed
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tests-are-failing-due-to-missing-fontconfig-config/51487/9

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tests-are-failing-due-to-missing-fontconfig-config/51487/12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants