Package: release.debian.org Severity: normal User: release.debian.org@packages.debian.org Usertags: unblock Please unblock package reclass There's been a bit of difficulty relating to the 1.4 upload to unstable prior to the freeze resulting from another developer uploading an NMU (1.3-2) that was required for another package (boxer-data), which first needed to migrate to testing before we could finally push 1.4-1. And then it turned out that 1.4-1 had a bug, which we fixed by reverting the change upstream, resulting in 1.4.1-1, which missed the freeze window. Due to this being a new upstream release, the diff is a little longer than you'd want it, but I am annotating it and abbreviating all the stuff that is related only to example data files: diff -Nru reclass-1.3/ChangeLog.rst reclass-1.4.1/ChangeLog.rst --- reclass-1.3/ChangeLog.rst 2014-03-01 14:45:02.000000000 +0100 +++ reclass-1.4.1/ChangeLog.rst 2014-10-28 15:52:25.000000000 +0100 @@ -5,6 +5,14 @@ ========= ========== ======================================================== Version Date Changes ========= ========== ======================================================== +1.4.1 2014-10-28 * Revert debug logging, which wasn't fault-free and so + it needs more time to mature. +1.4 2014-10-25 * Add rudimentary debug logging + * Prevent interpolate() from overwriting merged values + * Look for "init" instead of "index" when being fed + a directory. + * Fix error reporting on node name collision across + subdirectories. 1.3 2014-03-01 * Salt: pillar data from previous pillars are now available to reclass parameter interpolation * yaml_fs: classes may be defined in subdirectories diff -Nru reclass-1.3/debian/changelog reclass-1.4.1/debian/changelog --- reclass-1.3/debian/changelog 2014-10-14 11:06:24.000000000 +0200 +++ reclass-1.4.1/debian/changelog 2014-10-28 15:57:42.000000000 +0100 @@ -1,4 +1,18 @@ -reclass (1.3-2) unstable; urgency=medium +reclass (1.4.1-1) unstable; urgency=low + + * New upstream release reverting the logging changes, which weren't ready + yet. + + -- martin f. krafft <madduck@debian.org> Tue, 28 Oct 2014 15:56:59 +0100 + +reclass (1.4-1) unstable; urgency=low + + * New upstream release (closes: #761952). + * Compliant with Debian Policy 3.9.6. + + -- martin f. krafft <madduck@debian.org> Sat, 25 Oct 2014 15:12:25 +0200 + +reclass (1.3-2) UNRELEASED; urgency=medium * Add myself as uploader. * Update Vcs-Git and Vcs-Browser URLs. @@ -6,7 +20,7 @@ * Have python-reclass depend on python-pkg-resources. Closes: bug#757423. - -- Jonas Smedegaard <dr@jones.dk> Tue, 14 Oct 2014 11:06:20 +0200 + -- Jonas Smedegaard <dr@jones.dk> Wed, 17 Sep 2014 10:17:04 +0200 reclass (1.3-1) unstable; urgency=low diff -Nru reclass-1.3/debian/control reclass-1.4.1/debian/control --- reclass-1.3/debian/control 2014-09-17 14:20:00.000000000 +0200 +++ reclass-1.4.1/debian/control 2014-10-25 20:45:57.000000000 +0200 @@ -2,9 +2,9 @@ Section: python Priority: extra Maintainer: martin f. krafft <madduck@debian.org> -Uploader: Jonas Smedegaard <dr@jones.dk> +Uploaders: Jonas Smedegaard <dr@jones.dk> Build-Depends: python-setuptools, python, debhelper (>= 8.9.7), python-sphinx, python-yaml -Standards-Version: 3.9.5 +Standards-Version: 3.9.6 XS-Python-Version: all Homepage: http://reclass.pantsfullofunix.net/ Vcs-Git: git://anonscm.debian.org/collab-maint/reclass.git diff -Nru reclass-1.3/doc/source/extrefs.inc reclass-1.4.1/doc/source/extrefs.inc --- reclass-1.3/doc/source/extrefs.inc 2014-03-01 14:45:02.000000000 +0100 +++ reclass-1.4.1/doc/source/extrefs.inc 2014-10-28 15:52:25.000000000 +0100 @@ -2,5 +2,5 @@ .. _Salt: http://saltstack.com/community .. _Ansible: http://www.ansibleworks.com .. _Hiera: http://projects.puppetlabs.com/projects/hiera -.. _Artistic Licence 2.0: http://www.perlfoundation.org/legal/licenses/artistic-2_0.html +.. _Artistic Licence 2.0: http://opensource.org/licenses/Artistic-2.0 .. _Jinja2: http://jinja.pocoo.org diff -Nru reclass-1.3/doc/source/index.rst reclass-1.4.1/doc/source/index.rst --- reclass-1.3/doc/source/index.rst 2014-03-01 14:45:02.000000000 +0100 +++ reclass-1.4.1/doc/source/index.rst 2014-10-28 15:52:25.000000000 +0100 @@ -34,7 +34,7 @@ Licence ------- -|reclass| is © 2007–2013 by martin f. krafft and released under the terms of +|reclass| is © 2007–2014 by martin f. krafft and released under the terms of the `Artistic Licence 2.0`_. Contents diff -Nru reclass-1.3/doc/source/operations.rst reclass-1.4.1/doc/source/operations.rst --- reclass-1.3/doc/source/operations.rst 2014-03-01 14:45:02.000000000 +0100 +++ reclass-1.4.1/doc/source/operations.rst 2014-10-28 15:52:25.000000000 +0100 @@ -75,8 +75,9 @@ Merging of parameters is done "deeply", meaning that lists and dictionaries are extended (recursively), rather than replaced. However, a scalar value *does* overwrite a dictionary or list value. While the scalar could be -appended to an existing list, there is sane default assumption in the context -of a dictionary, so this behaviour seems the most logical. +appended to an existing list, there is no sane default assumption in the +context of a dictionary, so this behaviour seems the most logical. Plus, it +allows for a dictionary to be erased by overwriting it with the null value. After all classes (and the classes they reference) have been visited, |reclass| finally merges the applications list and parameters defined for the diff -Nru reclass-1.3/doc/source/salt.rst reclass-1.4.1/doc/source/salt.rst --- reclass-1.3/doc/source/salt.rst 2014-03-01 14:45:02.000000000 +0100 +++ reclass-1.4.1/doc/source/salt.rst 2014-10-28 15:52:25.000000000 +0100 @@ -197,9 +197,19 @@ feature is therefore turned off by default and must be explicitly enabled in the Salt master configuration file, like this:: - reclass: &reclass - […] - propagate_pillar_data_to_reclass: True + ext_pillar: + - reclass: + […] + propagate_pillar_data_to_reclass: True + +Unfortunately, to use this, currently you cannot use YAML references (i.e. +``*reclass``) as shown above, as the ``master_tops`` subsystem does not accept +this configuration parameter, and there seems to be no way to extend an alias. +Specifically, the following is not possible — let me know if it is!:: + + ext_pillar: + - reclass: *reclass # WARNING: this does not work! + propagate_pillar_data_to_reclass: True .. include:: substs.inc .. include:: extrefs.inc diff -Nru reclass-1.3/reclass/datatypes/parameters.py reclass-1.4.1/reclass/datatypes/parameters.py --- reclass-1.3/reclass/datatypes/parameters.py 2014-03-01 14:45:02.000000000 +0100 +++ reclass-1.4.1/reclass/datatypes/parameters.py 2014-10-28 15:52:25.000000000 +0100 @@ -70,6 +70,13 @@ return self._base.copy() def _update_scalar(self, cur, new, path): + if isinstance(cur, RefValue) and path in self._occurrences: + # If the current value already holds a RefValue, we better forget + # the occurrence, or else interpolate() will later overwrite + # unconditionally. If the new value is a RefValue, the occurrence + # will be added again further on + del self._occurrences[path] + if self.delimiter is None or not isinstance(new, (types.StringTypes, RefValue)): # either there is no delimiter defined (and hence no references diff -Nru reclass-1.3/reclass/datatypes/tests/test_parameters.py reclass-1.4.1/reclass/datatypes/tests/test_parameters.py --- reclass-1.3/reclass/datatypes/tests/test_parameters.py 2014-03-01 14:45:02.000000000 +0100 +++ reclass-1.4.1/reclass/datatypes/tests/test_parameters.py 2014-10-28 15:52:25.000000000 +0100 @@ -127,6 +127,12 @@ self.assertIn(mock.call(key), b1.get.call_args_list) self.assertIn(mock.call(key, value), b1.__setitem__.call_args_list) + def test_stray_occurrence_overwrites_during_interpolation(self): + p1 = Parameters({'r' : mock.sentinel.ref, 'b': '${r}'}) + p2 = Parameters({'b' : mock.sentinel.goal}) + p1.merge(p2) + p1.interpolate() + self.assertEqual(p1.as_dict()['b'], mock.sentinel.goal) class TestParametersNoMock(unittest.TestCase): diff -Nru reclass-1.3/reclass/errors.py reclass-1.4.1/reclass/errors.py --- reclass-1.3/reclass/errors.py 2014-03-01 14:45:02.000000000 +0100 +++ reclass-1.4.1/reclass/errors.py 2014-10-28 15:52:25.000000000 +0100 @@ -208,4 +208,4 @@ msg = "{0}: Definition of node '{1}' in '{2}' collides with " \ "definition in '{3}'. Nodes can only be defined once " \ "per inventory." - return msg.format(storage, name, uris[1], uris[0]) + return msg.format(self._storage, self._name, self._uris[1], self._uris[0]) diff -Nru reclass-1.3/reclass/storage/yaml_fs/__init__.py reclass-1.4.1/reclass/storage/yaml_fs/__init__.py --- reclass-1.3/reclass/storage/yaml_fs/__init__.py 2014-03-01 14:45:02.000000000 +0100 +++ reclass-1.4.1/reclass/storage/yaml_fs/__init__.py 2014-10-28 15:52:25.000000000 +0100 @@ -27,18 +27,24 @@ super(ExternalNodeStorage, self).__init__(STORAGE_NAME) def name_mangler(relpath, name): - # nodes are identified just by their basename - return name + # nodes are identified just by their basename, so + # no mangling required + return relpath, name self._nodes_uri = nodes_uri self._nodes = self._enumerate_inventory(nodes_uri, name_mangler) def name_mangler(relpath, name): if relpath == '.': - return name + # './' is converted to None + return None, name parts = relpath.split(os.path.sep) - if name != 'index': + if name != 'init': + # "init" is the directory index, so only append the basename + # to the path parts for all other filenames. This has the + # effect that data in file "foo/init.yml" will be registered + # as data for class "foo", not "foo.init" parts.append(name) - return '.'.join(parts) + return relpath, '.'.join(parts) self._classes_uri = classes_uri self._classes = self._enumerate_inventory(classes_uri, name_mangler) @@ -56,13 +62,15 @@ name = os.path.splitext(f)[0] relpath = os.path.relpath(dirpath, basedir) if callable(name_mangler): - name = name_mangler(relpath, name) + relpath, name = name_mangler(relpath, name) uri = os.path.join(dirpath, f) if name in ret: E = reclass.errors.DuplicateNodeNameError - raise E(self._get_storage_name(), name, + raise E(self.name, name, os.path.join(basedir, ret[name]), uri) - ret[name] = os.path.join(relpath, f) + if relpath: + f = os.path.join(relpath, f) + ret[name] = f d = Directory(basedir) d.walk(register_fn) diff -Nru reclass-1.3/reclass/version.py reclass-1.4.1/reclass/version.py --- reclass-1.3/reclass/version.py 2014-03-01 14:45:02.000000000 +0100 +++ reclass-1.4.1/reclass/version.py 2014-10-28 15:52:25.000000000 +0100 @@ -8,7 +8,7 @@ # RECLASS_NAME = 'reclass' DESCRIPTION = 'merge data by recursive descent down an ancestry hierarchy' -VERSION = '1.3' +VERSION = '1.4.1' AUTHOR = 'martin f. krafft' AUTHOR_EMAIL = 'reclass@pobox.madduck.net' COPYRIGHT = 'Copyright © 2007–14 ' + AUTHOR unblock reclass/1.4.1-1 -- System Information: Debian Release: jessie/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.16-2-amd64 (SMP w/8 CPU cores) Locale: LANG=en_NZ, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash -- .''`. martin f. krafft <madduck@d.o> @martinkrafft : :' : proud Debian developer `. `'` http://people.debian.org/~madduck `- Debian - when you have better things to do than fixing systems
Attachment:
digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)