You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RemoteOperations::exec_command explicitly transfers LANG, LANGUAGE and LC_* envvars to the server side (#187)
* RemoteOperations::exec_command updated
- Exact enumeration of supported 'cmd' types
- Refactoring
* RemoteOperations::exec_command explicitly transfers LANG, LANGUAGE and LC_* envvars to the server side
It should help resolve a problem with replacing a LANG variable by ssh-server.
History.
On our internal tests we got a problem on the Debian 11 and PostgresPro STD-13.
One test returned the error from initdb:
initdb: error: collations with different collate and ctype values ("en_US.UTF-8" and "C.UTF-8" accordingly) are not supported by ICU
- TestRunner set variable LANG="C"
- Python set variable LC_CTYPE="C.UTF-8"
- Test call inidb through command "ssh test@localhost inidb -D ...."
- SSH-server replaces LANG with value "en_US.UTF-8" (from etc/default/locale)
- initdb calculate collate through this value of LANG variable and get en_US.UTF-8
So we have that:
- ctype is C.UTF-8
- collate is en_US.UTF-8
ICU on the Debuan-11 (uconv v2.1 ICU 67.1) does not suppot this combination and inidb rturns the error.
This patch generates a new command line for ssh:
ssh test@localhost "LANG=\"...\";LC_xxx=\"...\";<command>"
It resolves this problem with initdb and should help resolve other problems with execution of command through SSH.
Amen.
* New tests in TestgresRemoteTests are added
New tests:
- test_init__LANG_С
- test_init__unk_LANG_and_LC_CTYPE
* TestgresRemoteTests.test_init__unk_LANG_and_LC_CTYPE is updated
Let's test bad data with '\' and '"' symbols.
* Static methods are marked with @staticmethod [thanks to Victoria Shepard]
The following methods of RemoteOperations were corrected:
- _make_exec_env_list
- _does_put_envvar_into_exec_cmd
- _quote_envvar
* TestRemoteOperations::_quote_envvar is updated (typification)
0 commit comments