-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Dolibarr #185258
Dolibarr #185258
Conversation
5841ba3
to
f4b0cb1
Compare
f4b0cb1
to
d3a8f12
Compare
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/advice-for-packaging-a-web-app/20777/6 |
There are a number of issues with this. I'll try to find some time to highlight in the next few days. |
The selenium change seems fine to me. |
I'm actually working on this during my currently limited free time. Hopefully comments and results soon. |
myphp = pkgs.php; | ||
version = "15.0.3"; | ||
configFile = "/etc/${app}/conf.php"; | ||
dolibarr = with pkgs; stdenvNoCC.mkDerivation { |
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.
A separate package should be created for dollibar listing the proper dependencies.
''; | ||
in stringAfter [ "etc" "groups" "users" ] '' | ||
# Setup folders in /var/lib/${app}/documents | ||
mkdir -p /var/lib/${app}/documents/{mycompany,medias,users,facture,propale,ficheinter,produit,doctemplates} |
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 see some french folder names here. Is it expected or is this some company specific remnants?
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 would assume this is because the author is french but it might be otherwise.
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.
This is a fresh install and I'm sure it wasn't influenced by the LANG env var.
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.
Ok, I would not be surprised, that typical of french author to leave some untranslated traces ;)
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.
We should use tmpfiles.d for that.
]; | ||
}; | ||
|
||
system.activationScripts.dolibarr-init-script = let |
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.
Is there a good reason to run this as an activation script rather than as a service init script?
head -n 100 /dev/random| md5sum | cut -d' ' -f1 > $tmp_hash | ||
[ ! -f /etc/${app}/conf.php ] && \ | ||
echo ${escapeShellArg initConfig} > /etc/${app}/conf.php && \ | ||
${pkgs.replace-secret}/bin/replace-secret '${passwordPlaceholder}' '${cfg.initialDbPasswordFile}' /etc/${app}/conf.php && \ |
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.
No cfg.initialDbPasswordFile != null
guard same as above? Any reason why?
@@ -31,6 +32,11 @@ buildPythonPackage rec { | |||
cd py | |||
''; | |||
|
|||
postInstall = '' | |||
install -Dm 755 ../rb/lib/selenium/webdriver/atoms/getAttribute.js $out/${python.sitePackages}/selenium/webdriver/remote/getAttribute.js |
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.
Might be worth adding the ref to upstream issue (SeleniumHQ/selenium#9917) as part of the changeset's comment so that we can easily check (using blame) when this workaround is no longer required.
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.
It might be a good idea to create a separate PR for the selenium change as it as more chances to get merged faster.
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.
Might be worth adding the ref to upstream issue (SeleniumHQ/selenium#9917) as part of the changeset's comment so that we can easily check (using blame) when this workaround is no longer required.
The real problem is that we can't easily run their bazel build infrastructure and I fail to understand what needs to be run to only install those files.
as part of the changeset's comment
I am not sure what you mean by that. You want to add it to this commit?
@@ -0,0 +1,12228 @@ | |||
-- MariaDB dump 10.19 Distrib 10.6.8-MariaDB, for Linux (x86_64) |
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.
This is a quite huge file. I do not think it would be a good idea to add this to already bloated nixpkgs. Can this instead be fetched from an external location using a fetcher derivation?
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.
Or alternatively generated?
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.
Yes, we must do something about this file.
I took some time to read through I believe I came up with an ideal solution for packaging this application. I pushed my code here. I didn't finish the code, but I did test it a fair bit before making a few changes and pushing. A number of If you're interested in adopting this code and putting on the finishing touches please feel free to run with it. I have no interest in this application but thought it would be a good example of how to package some If you have any questions, comments, or need a hand to finish things up please don't hesitate to ask or ping me. |
I'm quite interested into this package & module, @SCOTT-HAMILTON do you want to adapt the work of @aanderse or would you let me open a new PR to move forward this (of course, I can put you maintainer too) ? |
I'm running short on time right now so feel free to open a new PR and to adapt @aanderse 's work. I will probably close this PR and open a new you one for the selenium fix. |
@@ -31,6 +32,11 @@ buildPythonPackage rec { | |||
cd py | |||
''; | |||
|
|||
postInstall = '' | |||
install -Dm 755 ../rb/lib/selenium/webdriver/atoms/getAttribute.js $out/${python.sitePackages}/selenium/webdriver/remote/getAttribute.js |
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.
Might be worth adding the ref to upstream issue (SeleniumHQ/selenium#9917) as part of the changeset's comment so that we can easily check (using blame) when this workaround is no longer required.
The real problem is that we can't easily run their bazel build infrastructure and I fail to understand what needs to be run to only install those files.
as part of the changeset's comment
I am not sure what you mean by that. You want to add it to this commit?
machine.wait_for_unit("multi-user.target") | ||
machine.wait_for_unit("nginx.service") | ||
machine.wait_for_unit("mysql.service") |
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.
machine.wait_for_unit("multi-user.target") | |
machine.wait_for_unit("nginx.service") | |
machine.wait_for_unit("mysql.service") |
This shouldn't be necessary if dolibarr sets its systemd options correct and we miss a testing potential here.
machine.succeed("echo passwordfile is='${passwordFile}' >&2") | ||
machine.succeed("cat ${passwordFile} >&2") | ||
machine.succeed("cat ${mysqlCreds} >&2") | ||
machine.succeed( | ||
"echo 'SELECT User,Host,Password FROM mysql.user;' | mysql -u root >&2" | ||
) | ||
machine.succeed( | ||
"echo 'SHOW DATABASES;' | mysql --defaults-extra-file=${mysqlCreds} -u dolibarr -N >&2" | ||
) | ||
machine.succeed("cat /etc/dolibarr/conf.php >&2") |
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.
This looks like debugging leftover to me.
machine.succeed("${pkgs.mariadb}/bin/mysqldump -u root dolibarr > /tmp/dolibarr-db.sql") | ||
machine.copy_from_vm("/tmp/dolibarr-db.sql") |
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.
Why do we dump this sql file? What do we do with it?
@@ -0,0 +1,12228 @@ | |||
-- MariaDB dump 10.19 Distrib 10.6.8-MariaDB, for Linux (x86_64) |
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.
Yes, we must do something about this file.
description = '' | ||
Whether to preinstall dolibarr or not. | ||
|
||
<note><para> | ||
The database is automatically configured with the following credentials: | ||
|
||
|
||
<itemizedlist> | ||
<listitem><para>login is <literal>dolibarrlogin</literal></para></listitem> | ||
<listitem><para>password is <literal>123dolibarrlogin_pass</literal></para></listitem> | ||
</itemizedlist> | ||
</para></note> | ||
''; |
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.
This should use mkDoc
with lib; { | ||
options.services.dolibarr = { | ||
enable = mkEnableOption "Dolibarr ERP & CRM"; | ||
preInstalled = mkEnableOption "Preinstall dolibarr"// { |
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.
preInstalled = mkEnableOption "Preinstall dolibarr"// { | |
preInstalled = mkEnableOption "Preinstall dolibarr" // { |
dolibarr = with pkgs; stdenvNoCC.mkDerivation { | ||
pname = "dolibarr-src"; | ||
inherit version; | ||
src = fetchFromGitHub { | ||
owner = "Dolibarr"; | ||
repo = "dolibarr"; | ||
rev = version; | ||
sha256 = "sha256-HMOYj93ZvqM0FQjt313yuGj/r9ELqQlnNkg/CxrBjRM="; | ||
}; | ||
postPatch = '' | ||
sed -i \ | ||
-e 's|\$conffile = .*|\$conffile = "${configFile}";|g' \ | ||
-e 's|\$conffiletoshow = .*|\$conffiletoshow = "${configFile}";|g' \ | ||
htdocs/filefunc.inc.php | ||
sed -i \ | ||
-e 's|\$conffile = .*|\$conffile = "${configFile}";|g' \ | ||
-e 's|\$conffiletoshow = .*|\$conffiletoshow = "${configFile}";|g' \ | ||
htdocs/install/inc.php | ||
''; | ||
dontBuild = true; | ||
installPhase = '' | ||
mkdir -p "$out" | ||
cp -r * $out | ||
''; | ||
}; |
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.
THis should be in pkgs.
version = "15.0.3"; | ||
configFile = "/etc/${app}/conf.php"; | ||
dolibarr = with pkgs; stdenvNoCC.mkDerivation { | ||
pname = "dolibarr-src"; |
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.
pname = "dolibarr-src"; | |
pname = "dolibarr"; |
{ config, lib, pkgs, options, ... }: | ||
let | ||
cfg = config.services.dolibarr; | ||
app = "dolibarr"; |
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.
What is the intention to use this variable in a lot of places? It makes the code less readable.
FWIW this PR can be closed as we merged another Dolibarr PR.
Le dim. 4 sept. 2022 à 18:47, Sandro ***@***.***> a écrit :
… ***@***.**** commented on this pull request.
------------------------------
In nixos/tests/dolibarr.nix
<#185258 (comment)>:
> + machine.wait_for_unit("multi-user.target")
+ machine.wait_for_unit("nginx.service")
+ machine.wait_for_unit("mysql.service")
⬇️ Suggested change
- machine.wait_for_unit("multi-user.target")
- machine.wait_for_unit("nginx.service")
- machine.wait_for_unit("mysql.service")
This shouldn't be necessary if dolibarr sets its systemd options correct
and we miss a testing potential here.
------------------------------
In nixos/tests/dolibarr.nix
<#185258 (comment)>:
> + machine.succeed("echo passwordfile is='${passwordFile}' >&2")
+ machine.succeed("cat ${passwordFile} >&2")
+ machine.succeed("cat ${mysqlCreds} >&2")
+ machine.succeed(
+ "echo 'SELECT User,Host,Password FROM mysql.user;' | mysql -u root >&2"
+ )
+ machine.succeed(
+ "echo 'SHOW DATABASES;' | mysql --defaults-extra-file=${mysqlCreds} -u dolibarr -N >&2"
+ )
+ machine.succeed("cat /etc/dolibarr/conf.php >&2")
This looks like debugging leftover to me.
------------------------------
In nixos/tests/dolibarr.nix
<#185258 (comment)>:
> + machine.succeed("${pkgs.mariadb}/bin/mysqldump -u root dolibarr > /tmp/dolibarr-db.sql")
+ machine.copy_from_vm("/tmp/dolibarr-db.sql")
Why do we dump this sql file? What do we do with it?
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> + echo ${escapeShellArg initConfig} > /etc/${app}/conf.php && \
+ ${pkgs.replace-secret}/bin/replace-secret '${passwordPlaceholder}' '${cfg.initialDbPasswordFile}' /etc/${app}/conf.php && \
+ ${pkgs.replace-secret}/bin/replace-secret '${uniqueIdPlaceholder}' $tmp_hash /etc/${app}/conf.php && \
+ chown ${app}:${app} /etc/${app}/conf.php && \
+ chmod 0600 /etc/${app}/conf.php
+ rm -f $tmp_hash
+ '';
+
+ users.users.${app} = {
+ isSystemUser = true;
+ createHome = true;
+ home = "/etc/${app}";
+ group = app;
+ };
+ users.groups.${app} = { };
+ networking.firewall.allowedTCPPorts = [ 80 ];
This should be an option.
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> + ${pkgs.replace-secret}/bin/replace-secret '${passwordPlaceholder}' '${cfg.initialDbPasswordFile}' /etc/${app}/conf.php && \
+ ${pkgs.replace-secret}/bin/replace-secret '${uniqueIdPlaceholder}' $tmp_hash /etc/${app}/conf.php && \
+ chown ${app}:${app} /etc/${app}/conf.php && \
+ chmod 0600 /etc/${app}/conf.php
+ rm -f $tmp_hash
+ '';
+
+ users.users.${app} = {
+ isSystemUser = true;
+ createHome = true;
+ home = "/etc/${app}";
+ group = app;
+ };
+ users.groups.${app} = { };
+ networking.firewall.allowedTCPPorts = [ 80 ];
+ environment.systemPackages = [ myphp ];
Is this some management tool?
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> + # Setup config file
+ tmp_hash=$(mktemp)
+ head -n 100 /dev/random| md5sum | cut -d' ' -f1 > $tmp_hash
+ [ ! -f /etc/${app}/conf.php ] && \
+ echo ${escapeShellArg initConfig} > /etc/${app}/conf.php && \
+ ${pkgs.replace-secret}/bin/replace-secret '${passwordPlaceholder}' '${cfg.initialDbPasswordFile}' /etc/${app}/conf.php && \
+ ${pkgs.replace-secret}/bin/replace-secret '${uniqueIdPlaceholder}' $tmp_hash /etc/${app}/conf.php && \
+ chown ${app}:${app} /etc/${app}/conf.php && \
+ chmod 0600 /etc/${app}/conf.php
+ rm -f $tmp_hash
+ '';
+
+ users.users.${app} = {
+ isSystemUser = true;
+ createHome = true;
+ home = "/etc/${app}";
That is a weird home.
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> + chown -R ${app}:${app} /var/lib/${app}
+ chmod -R 0700 /var/lib/${app}
This can also easily be handled by tmpfiles.d
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> + $dolibarr_nocsrfcheck='0';
+ $dolibarr_main_instance_unique_id='${uniqueIdPlaceholder}';
+ $dolibarr_mailing_limit_sendbyweb='0';
+ $dolibarr_main_distrib='standard';
+ '';
+ in stringAfter [ "etc" "groups" "users" ] ''
+ # Setup folders in /var/lib/${app}/documents
+ mkdir -p /var/lib/${app}/documents/{mycompany,medias,users,facture,propale,ficheinter,produit,doctemplates}
+ chown -R ${app}:${app} /var/lib/${app}
+ chmod -R 0700 /var/lib/${app}
+
+ # Setup config file
+ tmp_hash=$(mktemp)
+ head -n 100 /dev/random| md5sum | cut -d' ' -f1 > $tmp_hash
+ [ ! -f /etc/${app}/conf.php ] && \
+ echo ${escapeShellArg initConfig} > /etc/${app}/conf.php && \
Why are we not copying this file?
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> + tmp_hash=$(mktemp)
+ head -n 100 /dev/random| md5sum | cut -d' ' -f1 > $tmp_hash
Do we need to handle this id securely? Does it need to be an md5 hash?
Otherwise we could simplify this be using uuidgen.
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> + $dolibarr_main_restrict_os_commands='mysqldump, mysql, pg_dump, pgrestore';
+ $dolibarr_nocsrfcheck='0';
+ $dolibarr_main_instance_unique_id='${uniqueIdPlaceholder}';
+ $dolibarr_mailing_limit_sendbyweb='0';
+ $dolibarr_main_distrib='standard';
+ '';
+ in stringAfter [ "etc" "groups" "users" ] ''
+ # Setup folders in /var/lib/${app}/documents
+ mkdir -p /var/lib/${app}/documents/{mycompany,medias,users,facture,propale,ficheinter,produit,doctemplates}
+ chown -R ${app}:${app} /var/lib/${app}
+ chmod -R 0700 /var/lib/${app}
+
+ # Setup config file
+ tmp_hash=$(mktemp)
+ head -n 100 /dev/random| md5sum | cut -d' ' -f1 > $tmp_hash
+ [ ! -f /etc/${app}/conf.php ] && \
This would be simpler done in an if ; then; done
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> + $dolibarr_main_db_host='localhost';
+ $dolibarr_main_db_port='3306';
+ $dolibarr_main_db_name='${app}';
+ $dolibarr_main_db_prefix='llx_';
The host, port and prefix should be configurable.
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> + $dolibarr_main_prod='0';
+ $dolibarr_main_force_https='0';
+ $dolibarr_main_restrict_os_commands='mysqldump, mysql, pg_dump, pgrestore';
+ $dolibarr_nocsrfcheck='0';
Why are those security features off?
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> + };
+
+ systemd.services.dolibarr-mysql-db-init = {
+ description = "Initialize mysql db for ${app}";
+ wants = [ "mysql.service" ];
+ after = [ "mysql.service" ];
+ serviceConfig = let
+ script = let
+ mysqlPasswordActivation = let
+ initialScript = ''
+ CREATE USER IF NOT EXISTS '${app}'@'localhost' IDENTIFIED BY '${passwordPlaceholder}';
+ GRANT ALL PRIVILEGES ON ${app}.* TO '${app}'@'localhost';
+ '';
+ in (if (cfg.initialDbPasswordFile != null) then ''
+ tmp_script_file=$(mktemp)
+ echo ${escapeShellArg initialScript} > $tmp_script_file
This should be copied.
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> + include ${pkgs.nginx}/conf/fastcgi_params;
+ include ${pkgs.nginx}/conf/fastcgi.conf;
⬇️ Suggested change
- include ${pkgs.nginx}/conf/fastcgi_params;
- include ${pkgs.nginx}/conf/fastcgi.conf;
+ include ${config.services.nginx.package}/conf/fastcgi_params;
+ include ${config.services.nginx.package}/conf/fastcgi.conf;
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> + virtualHosts."${app}.com" = {
+ listen = [{
+ addr = "0.0.0.0";
+ port = 80;
+ }];
+ root = "${webroot}";
+ locations."/" = {
+ tryFiles = "$uri $uri/ $uri.php";
+ index = "index.php";
+ };
+ locations."~ \\.php$" = {
+ tryFiles = "$uri =404";
+ fastcgiParams = {
+ SCRIPT_FILENAME = "$document_root$fastcgi_script_name";
+ SERVER_NAME = "$http_host";
+ PHP_VALUE = "upload_max_filesize=5M \\n post_max_size=5M";
This should be configurable
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> + "php_admin_value[error_log]" = "stderr";
+ "php_admin_flag[log_errors]" = true;
+ "catch_workers_output" = true;
+ };
+ phpEnv = {
+ "PATH" = lib.makeBinPath [ myphp ];
+ };
+ };
+ services.nginx = {
+ enable = true;
+ virtualHosts."${app}.com" = {
+ listen = [{
+ addr = "0.0.0.0";
+ port = 80;
+ }];
+ root = "${webroot}";
⬇️ Suggested change
- root = "${webroot}";
+ root = webroot;
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> + description = ''
+ Whether to preinstall dolibarr or not.
+
+ <note><para>
+ The database is automatically configured with the following credentials:
+
+
+ <itemizedlist>
+ <listitem><para>login is <literal>dolibarrlogin</literal></para></listitem>
+ <listitem><para>password is <literal>123dolibarrlogin_pass</literal></para></listitem>
+ </itemizedlist>
+ </para></note>
+ '';
This should use mkDoc
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> + htdocs/install/inc.php
+ '';
+ dontBuild = true;
+ installPhase = ''
+ mkdir -p "$out"
+ cp -r * $out
+ '';
+ };
+ webroot = "${dolibarr}/htdocs";
+ passwordPlaceholder = "__PLACEHOLDER_PASSWORD__";
+ uniqueIdPlaceholder = "__PLACEHOLDER_UNIQUE_ID__";
+in
+with lib; {
+ options.services.dolibarr = {
+ enable = mkEnableOption "Dolibarr ERP & CRM";
+ preInstalled = mkEnableOption "Preinstall dolibarr"// {
⬇️ Suggested change
- preInstalled = mkEnableOption "Preinstall dolibarr"// {
+ preInstalled = mkEnableOption "Preinstall dolibarr" // {
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> + dolibarr = with pkgs; stdenvNoCC.mkDerivation {
+ pname = "dolibarr-src";
+ inherit version;
+ src = fetchFromGitHub {
+ owner = "Dolibarr";
+ repo = "dolibarr";
+ rev = version;
+ sha256 = "sha256-HMOYj93ZvqM0FQjt313yuGj/r9ELqQlnNkg/CxrBjRM=";
+ };
+ postPatch = ''
+ sed -i \
+ -e 's|\$conffile = .*|\$conffile = "${configFile}";|g' \
+ -e 's|\$conffiletoshow = .*|\$conffiletoshow = "${configFile}";|g' \
+ htdocs/filefunc.inc.php
+ sed -i \
+ -e 's|\$conffile = .*|\$conffile = "${configFile}";|g' \
+ -e 's|\$conffiletoshow = .*|\$conffiletoshow = "${configFile}";|g' \
+ htdocs/install/inc.php
+ '';
+ dontBuild = true;
+ installPhase = ''
+ mkdir -p "$out"
+ cp -r * $out
+ '';
+ };
THis should be in pkgs.
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> @@ -0,0 +1,237 @@
+{ config, lib, pkgs, options, ... }:
+let
+ cfg = config.services.dolibarr;
+ app = "dolibarr";
+
+ myphp = pkgs.php;
+ version = "15.0.3";
+ configFile = "/etc/${app}/conf.php";
+ dolibarr = with pkgs; stdenvNoCC.mkDerivation {
+ pname = "dolibarr-src";
⬇️ Suggested change
- pname = "dolibarr-src";
+ pname = "dolibarr";
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> @@ -0,0 +1,237 @@
+{ config, lib, pkgs, options, ... }:
+let
+ cfg = config.services.dolibarr;
+ app = "dolibarr";
What is the intention to use this variable in a lot of places? It makes
the code less readable.
------------------------------
In nixos/modules/services/web-apps/dolibarr/default.nix
<#185258 (comment)>:
> + $dolibarr_main_db_pass='${passwordPlaceholder}';
+ $dolibarr_main_db_type='mysqli';
+ $dolibarr_main_db_character_set='utf8';
+ $dolibarr_main_db_collation='utf8_unicode_ci';
+ $dolibarr_main_authentication='${app}';
+ $dolibarr_main_prod='0';
+ $dolibarr_main_force_https='0';
+ $dolibarr_main_restrict_os_commands='mysqldump, mysql, pg_dump, pgrestore';
+ $dolibarr_nocsrfcheck='0';
+ $dolibarr_main_instance_unique_id='${uniqueIdPlaceholder}';
+ $dolibarr_mailing_limit_sendbyweb='0';
+ $dolibarr_main_distrib='standard';
+ '';
+ in stringAfter [ "etc" "groups" "users" ] ''
+ # Setup folders in /var/lib/${app}/documents
+ mkdir -p /var/lib/${app}/documents/{mycompany,medias,users,facture,propale,ficheinter,produit,doctemplates}
We should use tmpfiles.d for that.
------------------------------
In pkgs/development/python-modules/selenium/default.nix
<#185258 (comment)>:
> @@ -31,6 +32,11 @@ buildPythonPackage rec {
cd py
'';
+ postInstall = ''
+ install -Dm 755 ../rb/lib/selenium/webdriver/atoms/getAttribute.js $out/${python.sitePackages}/selenium/webdriver/remote/getAttribute.js
Might be worth adding the ref to upstream issue (SeleniumHQ/selenium#9917
<SeleniumHQ/selenium#9917>) as part of the
changeset's comment so that we can easily check (using blame) when this
workaround is no longer required.
The real problem is that we can't easily run their bazel build
infrastructure and I fail to understand what needs to be run to only
install those files.
as part of the changeset's comment
I am not sure what you mean by that. You want to add it to this commit?
------------------------------
In nixos/modules/services/web-apps/dolibarr/preinstalled-db.sql
<#185258 (comment)>:
> @@ -0,0 +1,12228 @@
+-- MariaDB dump 10.19 Distrib 10.6.8-MariaDB, for Linux (x86_64)
Yes, we must do something about this file.
—
Reply to this email directly, view it on GitHub
<#185258 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACMZRCC4UIBVQGHVPFTQRTV4THDHANCNFSM55WD6QYA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
In favor of #189635. |
Description of changes
Fixes #184752
Fixes #181035
Things done
getAttribute.js
andisDisplayed.js
files to selenium, here is the upstream issue 4.0.0 release is missing sdist tarball on pypi SeleniumHQ/selenium#9917.Documentation regarding the module and the test can be found on nixos.wiki
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