client/tools/rhncfg/actions/script.py | 9 +++++++++ client/tools/rhncfg/config_client/rhncfg-client.conf | 3 +++ client/tools/rhncfg/rhncfg.spec | 6 +++++- rel-eng/packages/rhncfg | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-)
New commits: commit a6bdf07ed14dc93de109080cc8810b785dd30511 Author: Jan Pazdziora jpazdziora@redhat.com Date: Thu Jun 16 10:27:39 2011 +0200
Automatic commit of package [rhncfg] release [5.10.7-1].
diff --git a/client/tools/rhncfg/rhncfg.spec b/client/tools/rhncfg/rhncfg.spec index 8edca3e..6b5fd48 100644 --- a/client/tools/rhncfg/rhncfg.spec +++ b/client/tools/rhncfg/rhncfg.spec @@ -8,7 +8,7 @@ Group: Applications/System License: GPLv2 and Python URL: https://fedorahosted.org/spacewalk Source0: https://fedorahosted.org/releases/s/p/spacewalk/%%7Bname%7D-%%7Bversion%7D.t... -Version: 5.10.6 +Version: 5.10.7 Release: 1%{?dist} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -105,6 +105,9 @@ rm -rf $RPM_BUILD_ROOT
# $Id$ %changelog +* Thu Jun 16 2011 Jan Pazdziora 5.10.7-1 +- temp script file customizable dedicated directory (matteo.sessa@dbmsrl.com) + * Tue May 31 2011 Jan Pazdziora 5.10.6-1 - Fix python import (matteo.sessa@dbmsrl.com)
diff --git a/rel-eng/packages/rhncfg b/rel-eng/packages/rhncfg index d3ac0e1..b0a6256 100644 --- a/rel-eng/packages/rhncfg +++ b/rel-eng/packages/rhncfg @@ -1 +1 @@ -5.10.6-1 client/tools/rhncfg/ +5.10.7-1 client/tools/rhncfg/
commit be9c7586090e42f56f06fea67512c625883434b3 Author: Matteo Sessa matteo.sessa@dbmsrl.com Date: Tue May 31 11:04:21 2011 +0200
temp script file customizable dedicated directory
diff --git a/client/tools/rhncfg/actions/script.py b/client/tools/rhncfg/actions/script.py index 58afb28..957e7ab 100644 --- a/client/tools/rhncfg/actions/script.py +++ b/client/tools/rhncfg/actions/script.py @@ -31,6 +31,10 @@ except ImportError:
# this is ugly, hopefully it will be natively supported in up2date from configfiles import _local_permission_check, _perm_error +from config_common import local_config + +sys.path.append('/usr/share/rhn') +from up2date_client import config
# this is a list of the methods that get exported by a module @@ -76,6 +80,11 @@ def _create_script_file(script, uid=None, gid=None):
def run(action_id, params, cache_only=None): + + cfg = config.initUp2dateConfig() + local_config.init('rhncfg-client', defaults=dict(cfg.items())) + + tempfile.tempdir = local_config.get('script_tmp_dir') if cache_only: return (0, "no-ops for caching", {})
diff --git a/client/tools/rhncfg/config_client/rhncfg-client.conf b/client/tools/rhncfg/config_client/rhncfg-client.conf index 1a1b93a..be2b3b6 100644 --- a/client/tools/rhncfg/config_client/rhncfg-client.conf +++ b/client/tools/rhncfg/config_client/rhncfg-client.conf @@ -7,6 +7,9 @@ systemid = /etc/sysconfig/rhn/systemid # increase for debugging output debug_level = 0
+# Default directory for remote command temporary script file. +# If not set it will default to None and it will fallback to python's default tempdir search algorithm +script_tmp_dir = /var/spool/rhn
# don't change this... used in substitutions below. # if you get rid of the '%(server_handler)s' bits below, diff --git a/client/tools/rhncfg/rhncfg.spec b/client/tools/rhncfg/rhncfg.spec index ec949fe..8edca3e 100644 --- a/client/tools/rhncfg/rhncfg.spec +++ b/client/tools/rhncfg/rhncfg.spec @@ -77,6 +77,7 @@ rm -rf $RPM_BUILD_ROOT %dir %{_sharedstatedir} %endif %dir %{_sharedstatedir}/rhncfg +%dir %{_localstatedir}/spool/rhn %{rhnroot}/config_common %{_sharedstatedir}/rhncfg/backups %doc LICENSE PYTHON-LICENSES.txt
spacewalk-commits@lists.fedorahosted.org