https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40901
--- Comment #198 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 205952 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205952&action=edit Bug 40901: (QA follow-up) Fix Z39.50 option expansion and honour the indexer defaults Two problems in how the units consume koha-generate-env's output: 1. [email protected] passed ${Z3950_ADDITIONAL_OPTS}. In systemd unit files "${VAR}" always expands to exactly one argument, and to a single empty argument when the variable is empty; only unbraced "$VAR" is word-split. So a configured value like "--add-item-status k -t 5" reached z3950_responder.pl as one unknown option, and the default empty value reached it as a "" listener address. Verified with systemd-run: ${X}="--a --b" gives ["--a --b"], ${Y}="" gives [""], $X gives ["--a"] ["--b"]. Use the unbraced form. 2. [email protected] hardcoded rebuild_zebra.pl -daemon -sleep, ignoring ALTERNATE_INDEXER_DAEMON and INDEXER_PARAMS from /etc/default/koha-common that the SysV path honours. koha-generate-env now resolves INDEXER_DAEMON and INDEXER_PARAMS exactly like koha-indexer and the unit runs them through /usr/bin/env, so any configured indexer works. koha-generate-env is also tightened up: numeric values are validated and fall back to their defaults, every value is forced onto one line without quote characters so the EnvironmentFile always parses, the debug_mode test matches is_debug_mode, Z3950_ADDITIONAL_OPTS is read from /etc/default/koha-common first (as before this patchset), the Z39.50 config dir uses the same config.xml test as is_z3950_enabled, the env dir is created with the instance's ownership if it does not exist yet, and unknown services get an empty env file instead of a chmod failure. The responder is invoked through /usr/bin/perl like the other Perl daemons. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Martin Renvoize <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
