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/phpfpm: Change phpOptions to structural options #318740

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

onny
Copy link
Contributor

@onny onny commented Jun 10, 2024

Description of changes

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.

Copy link
Member

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need a release notes entry.

nixos/tests/php/pcre.nix Outdated Show resolved Hide resolved
nixos/modules/services/web-servers/phpfpm/default.nix Outdated Show resolved Hide resolved
Copy link
Member

@jopejoe1 jopejoe1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are a few more dots that should be quoted.

nixos/modules/services/monitoring/librenms.nix Outdated Show resolved Hide resolved
nixos/modules/services/web-apps/moodle.nix Outdated Show resolved Hide resolved
nixos/modules/services/web-servers/phpfpm/default.nix Outdated Show resolved Hide resolved
nixos/modules/services/web-servers/phpfpm/default.nix Outdated Show resolved Hide resolved
nixos/modules/services/misc/zoneminder.nix Outdated Show resolved Hide resolved
nixos/modules/services/web-apps/zabbix.nix Outdated Show resolved Hide resolved
nixos/modules/services/web-apps/zabbix.nix Outdated Show resolved Hide resolved
nixos/modules/services/web-apps/zabbix.nix Outdated Show resolved Hide resolved
Copy link
Member

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking now due to lack of testing.

(there are far too many instances of foo.bar where it should've been "foo.bar" and given that said option does attrsOf (oneOf [str int]), this shouldn't even evaluate.

@onny onny force-pushed the phpfpm-options branch 2 times, most recently from 98bc0c5 to 9193254 Compare June 14, 2024 16:31
@onny
Copy link
Contributor Author

onny commented Jun 14, 2024

failing tests

  • librenms
  • castopod

missing test

  • bookstack
  • flarum
  • zabbix

need to test

  • php-fpm
  • php pcre
  • httpd

@onny
Copy link
Contributor Author

onny commented Jun 15, 2024

Somehow the phpOptions attribute set doesn't get appended to the php.ini of the php-fpm pool.

I'm not sure what this function actually do:

  phpIni = poolOpts: pkgs.runCommand "php.ini" {
    inherit (poolOpts) phpPackage;
    phpOptions = toKeyValue cfg.phpOptions;
    preferLocalBuild = true;
    passAsFile = [ "phpOptions" ];
  } ''
    cat ${poolOpts.phpPackage}/etc/php.ini $phpOptionsPath > $out
  '';

I guess php.ini is a command that gets executed and returns a path to a php.ini-file? Where does $phpOptionsPath come from? Which function uses all these parameters phpOptions, preferLocalBuild, phpPackage, etc.?

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.

6 participants