From 00927b704c78023096e1004a31869085f659def7 Mon Sep 17 00:00:00 2001 From: Jan Pokorný Date: Dec 12 2016 14:49:09 +0000 Subject: Add infrastructure for setting POSIX/bash-like shells ...to be subsequently used for shebangs in "pcs commands" form of an output. Signed-off-by: Jan Pokorný --- diff --git a/__root__/setup.cfg b/__root__/setup.cfg index 5576caf..d056e34 100644 --- a/__root__/setup.cfg +++ b/__root__/setup.cfg @@ -3,6 +3,8 @@ [pkg_prepare] ccs_flatten = /usr/libexec/clufter/ccs_flatten editor = nano +shell_posix = /bin/sh +shell_bashlike = /bin/bash hashalgo = md5 ra_metadata_dir = /usr/share/cluster ra_metadata_ext = metadata diff --git a/__root__/setup.py b/__root__/setup.py index d75394d..181164a 100644 --- a/__root__/setup.py +++ b/__root__/setup.py @@ -519,6 +519,8 @@ pkg_name = pkg.package_name() pkg_prepare = setup_pkg_prepare(pkg_name, ( ('ccs_flatten', "location of bundled helper ccs_flatten"), ('editor', "which editor to use if EDITOR env variable not set"), + ('shell_posix', "POSIX compliant shell for shebangs"), + ('shell_bashlike', "bash-like shell (process subst.) for shebangs"), ('hashalgo', "which hash algorithm to use to generate output name"), ('ra_metadata_dir', "location of RGManager agents/metadata"), ('ra_metadata_ext', "extension used for RGManager agents' metadata"), diff --git a/defaults.py.in b/defaults.py.in index 741d3b6..20180e1 100644 --- a/defaults.py.in +++ b/defaults.py.in @@ -7,10 +7,14 @@ __author__ = "Jan Pokorný " # trailing bang subsequently removed, prevents premature ''' lex. match in value -EDITOR = '''@EDITOR@!'''[:-1] -CCS_FLATTEN = '''@CCS_FLATTEN@!'''[:-1] +EDITOR = '''@EDITOR@!'''[:-1] +CCS_FLATTEN = '''@CCS_FLATTEN@!'''[:-1] + +SHELL_POSIX = '''@SHELL_POSIX@!'''[:-1] +# this is required to cope with process substitution +SHELL_BASHLIKE = '''@SHELL_BASHLIKE@!'''[:-1] # also configurable via respective env. variables (see getenv_namespaced) -HASHALGO = '''@HASHALGO@!'''[:-1] # not for security +HASHALGO = '''@HASHALGO@!'''[:-1] # not for security -REPORT_BUGS = '''@REPORT_BUGS@!'''[:-1] +REPORT_BUGS = '''@REPORT_BUGS@!'''[:-1] diff --git a/misc/clufter.spec b/misc/clufter.spec index 86b3487..a279532 100644 --- a/misc/clufter.spec +++ b/misc/clufter.spec @@ -39,6 +39,8 @@ # Python package customizations %{!?clufter_ccs_flatten: %global clufter_ccs_flatten %{_libexecdir}/%{clufter_source}/ccs_flatten} %{!?clufter_editor: %global clufter_editor %{_bindir}/nano} +%{!?clufter_shell_posix: %global clufter_shell_posix %{_bindir}/sh} +%{!?clufter_shell_bashlike: %global clufter_shell_bashlike %{_bindir}/bash} %{!?clufter_ra_metadata_dir: %global clufter_ra_metadata_dir %{_datadir}/cluster} %{!?clufter_ra_metadata_ext: %global clufter_ra_metadata_ext metadata}