From 3f73bd6896c6633fe875e318f051b2c07735e51f Mon Sep 17 00:00:00 2001 From: Clint Savage Date: Thu, 17 Jan 2013 00:30:06 -0700 Subject: [PATCH] update to upstream release 0.12.0 --- 0003-Late-stage-jinja2-dependency.patch | 39 +++++++++++++++++++++ 0004-Jinja2-no-longer-build-dep.patch | 45 +++++++++++++++++++++++++ salt.spec | 11 +++++- 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 0003-Late-stage-jinja2-dependency.patch create mode 100644 0004-Jinja2-no-longer-build-dep.patch diff --git a/0003-Late-stage-jinja2-dependency.patch b/0003-Late-stage-jinja2-dependency.patch new file mode 100644 index 0000000..9163bcc --- /dev/null +++ b/0003-Late-stage-jinja2-dependency.patch @@ -0,0 +1,39 @@ +From 7a5a8b54b4a2c7ce8fa972a70693959835e65db8 Mon Sep 17 00:00:00 2001 +From: Pedro Algarvio +Date: Wed, 16 Jan 2013 19:34:15 +0000 +Subject: [PATCH] Defer imports to a later stage so Jinja2 does not become a + build dependency. Fixes #3293. + +--- + salt/utils/__init__.py | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/salt/utils/__init__.py b/salt/utils/__init__.py +index 290339d..11f428d 100644 +--- a/salt/utils/__init__.py ++++ b/salt/utils/__init__.py +@@ -30,8 +30,6 @@ + HAS_FNCTL = False + + # Import salt libs +-import salt.minion +-import salt.payload + from salt.exceptions import SaltClientError, CommandNotFoundError + + +@@ -196,6 +194,12 @@ def daemonize_if(opts, **kwargs): + data[key[6:]] = val + if not 'jid' in data: + return ++ ++ # Late import salt libs to overcome circular imports and to allow building ++ # salt without making Jinja2 a build dependency ++ import salt.minon ++ import salt.payload ++ + serial = salt.payload.Serial(opts) + proc_dir = salt.minion.get_proc_dir(opts['cachedir']) + fn_ = os.path.join(proc_dir, data['jid']) +-- +1.7.10 + diff --git a/0004-Jinja2-no-longer-build-dep.patch b/0004-Jinja2-no-longer-build-dep.patch new file mode 100644 index 0000000..22d026c --- /dev/null +++ b/0004-Jinja2-no-longer-build-dep.patch @@ -0,0 +1,45 @@ +From 56cf893eb2fb61a6010235eda2f35170cd81fefa Mon Sep 17 00:00:00 2001 +From: Pedro Algarvio +Date: Wed, 16 Jan 2013 20:14:43 +0000 +Subject: [PATCH] Jinja2 is no longer a build dependency. Fixes #3293. + +--- + salt/utils/templates.py | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/salt/utils/templates.py b/salt/utils/templates.py +index a75bcb4..60631ce 100644 +--- a/salt/utils/templates.py ++++ b/salt/utils/templates.py +@@ -12,14 +12,10 @@ + import tempfile + import traceback + +-# Import third party libs +-import jinja2 +-import jinja2.ext +- + # Import salt libs + import salt.utils + import salt.exceptions +-from salt.utils.jinja import SaltCacheLoader as JinjaSaltCacheLoader ++ + + log = logging.getLogger(__name__) + +@@ -72,6 +68,12 @@ def render_tmpl(tmplsrc, from_str=False, to_str=False, + + + def render_jinja_tmpl(tmplstr, context, tmplpath=None): ++ # Late import Jinja2 to allow building salt without making it a build ++ # dependency ++ import jinja2 ++ import jinja2.ext ++ from salt.utils.jinja import SaltCacheLoader as JinjaSaltCacheLoader ++ + opts = context['opts'] + env = context['env'] + loader = None +-- +1.7.10 + diff --git a/salt.spec b/salt.spec index 1ae128a..f6e3a5b 100644 --- a/salt.spec +++ b/salt.spec @@ -9,7 +9,7 @@ %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} Name: salt -Version: 0.11.1 +Version: 0.12.0 Release: 1%{?dist} Summary: A parallel remote execution system @@ -24,6 +24,9 @@ Source4: %{name}-master.service Source5: %{name}-syndic.service Source6: %{name}-minion.service Source7: README.fedora +Patch0: 0003-Late-stage-jinja2-dependency.patch +Patch1: 0004-Jinja2-no-longer-build-dep.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -117,6 +120,9 @@ Salt minion is queried and controlled from the master. %prep %setup -q +%patch0 -p1 +%patch1 -p1 + %build @@ -290,6 +296,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Wed Jan 16 2013 Clint Savage - 0.12.0-1 +- Upstream release 0.12.0 + * Fri Dec 14 2012 Clint Savage - 0.11.1-1 - Upstream patch release 0.11.1 - Fixes security vulnerability (https://github.com/saltstack/salt/issues/2916)