1. 02 May, 2019 2 commits
  2. 26 Apr, 2019 2 commits
  3. 25 Apr, 2019 8 commits
  4. 23 Apr, 2019 3 commits
  5. 17 Apr, 2019 5 commits
    • Benjamin Drung's avatar
      Release salt 2018.3.4+dfsg1-2 · bb195236
      Benjamin Drung authored
      bb195236
    • Benjamin Drung's avatar
      Fix some more spelling mistakes · 191b14cc
      Benjamin Drung authored
      lintian found more spelling mistakes.
      191b14cc
    • Benjamin Drung's avatar
      Expose tornado4 as tornado for zmq.eventloop.ioloop · bca69df0
      Benjamin Drung authored
      The salt master/minion will show following deprecation warning on
      startup:
      
      ```
      [WARNING ] /usr/lib/python3/dist-packages/salt/transport/zeromq.py:40:
      VisibleDeprecationWarning: zmq.eventloop.minitornado is deprecated in
      pyzmq 14.0 and will be removed.
          Install tornado itself to use zmq with the tornado IOLoop.
      
        import zmq.eventloop.ioloop
      ```
      
      Fix this warning by exposing tornado4 as tornado for
      zmq.eventloop.ioloop.
      
      Closes: #924763
      Signed-off-by: Benjamin Drung's avatarBenjamin Drung <benjamin.drung@profitbricks.com>
      bca69df0
    • Benjamin Drung's avatar
      Fix double spaces in tornado4 patch · 033e68cc
      Benjamin Drung authored
      0002-Explicitly-import-attributes-from-tornado.patch introduces double
      spaces after an equal sign. Remove the duplicate.
      033e68cc
    • Benjamin Drung's avatar
      Fix test_xen_virtual on kernels with no Xen support · ff043708
      Benjamin Drung authored
      The latest version of salt is failing its autopkgtests on ppc64el and s390x
      architectures in Ubuntu:
      
      ```
      [...]
      FAIL: test_xen_virtual (unit.grains.test_core.CoreGrainsTestCase)
      [CPU:0.0%|MEM:53.3%]
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "tests/unit/grains/test_core.py", line 701, in test_xen_virtual
          'Xen PV DomU'
      AssertionError: None != 'Xen PV DomU'
      
      ----------------------------------------------------------------------
      Ran 7575 tests in 3249.235s
      [...]
      ```
      
        (http://autopkgtest.ubuntu.com/packages/s/salt/disco/ppc64el)
      
      The cause of this failure is an improper test which mocks up an isfile check
      for /sys/bus/xen/drivers/xenconsole, but which doesn't also mock up the
      check for the /sys/bus/xen directory; so if run on a kernel with no Xen
      support at all, the test will fail.
      
      The test happens to pass on the other architectures on which Ubuntu runs
      autopkgtests, because these happen to be architectures which have Xen
      support and Xen happens to be enabled in the kernels on these architectures.
      But it's a bad test that depends on the kernel instead of actually unit
      testing the code.
      
      Therefore also mock `os.path.isdir` to return `True` for the path
      `/sys/bus/xen`.
      
      Closes: #922352
      Forwarded: https://github.com/saltstack/salt/pull/52582Signed-off-by: Benjamin Drung's avatarBenjamin Drung <benjamin.drung@cloud.ionos.com>
      ff043708
  6. 05 Apr, 2019 3 commits
    • Benjamin Drung's avatar
      Release salt 2018.3.4+dfsg1-1 · 8de2969f
      Benjamin Drung authored
      8de2969f
    • Benjamin Drung's avatar
      Remove unused minified documentation CSS files · 4193aa6f
      Benjamin Drung authored
      The minified documentation CSS files are not used. Therefore remove them
      before building the documentation.
      Signed-off-by: Benjamin Drung's avatarBenjamin Drung <benjamin.drung@profitbricks.com>
      4193aa6f
    • Benjamin Drung's avatar
      Run tests with LC_ALL=C.UTF-8 · 98d474c7
      Benjamin Drung authored
      Seven test cases fail when using ASCII encoding:
      
      ```
      ======================================================================
      ERROR: setUpClass (unit.fileserver.test_gitfs.GitPythonTest)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "tests/unit/fileserver/test_gitfs.py", line 428, in setUpClass
          repo.index.add([x for x in os.listdir(TMP_REPO_DIR)
        File "/usr/lib/python3/dist-packages/git/index/base.py", line 804, in add
          self.write(ignore_extension_data=not write_extension_data)
        File "/usr/lib/python3/dist-packages/git/index/base.py", line 216, in write
          self._serialize(stream, ignore_extension_data)
        File "/usr/lib/python3/dist-packages/git/index/base.py", line 181, in _serialize
          write_cache(entries, stream, extension_data)
        File "/usr/lib/python3/dist-packages/git/index/fun.py", line 139, in write_cache
          path = force_bytes(path, encoding=defenc)
        File "/usr/lib/python3/dist-packages/gitdb/utils/encoding.py", line 16, in force_bytes
          return data.encode(encoding)
      UnicodeEncodeError: 'utf-8' codec can't encode character '\udcd0' in position 0: surrogates not allowed
      ```
      
      These test cases use Unicode in the filenames on the disk and Python's
      `os.listdir` fail to retreive them correcty when using the ASCII
      encoding.
      Signed-off-by: Benjamin Drung's avatarBenjamin Drung <benjamin.drung@profitbricks.com>
      98d474c7
  7. 03 Apr, 2019 4 commits
    • Benjamin Drung's avatar
      Skip ExtendTestCase if templates directory is missing · 60c7c13d
      Benjamin Drung authored
      The release tarball does not contain the `templates` directory.
      Therefore `ExtendTestCase` will fail:
      
      ```
      ======================================================================
      ERROR: test_run (unit.utils.test_extend.ExtendTestCase)
      [CPU:0.0%|MEM:53.9%]
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "tests/unit/utils/test_extend.py", line 40, in test_run
          out = salt.utils.extend.run('test', 'test', 'this description', integration.CODE_DIR, False)
        File "salt/utils/extend.py", line 242, in run
          MODULE_OPTIONS = _fetch_templates(os.path.join(salt_dir, 'templates'))
        File "salt/utils/extend.py", line 76, in _fetch_templates
          for item in os.listdir(src):
      FileNotFoundError: [Errno 2] No such file or directory: ' templates'
      ```
      
      Forwarded: https://github.com/saltstack/salt/pull/52403Signed-off-by: Benjamin Drung's avatarBenjamin Drung <benjamin.drung@cloud.ionos.com>
      60c7c13d
    • Benjamin Drung's avatar
      Skip SampleConfTest if sample conf directories are missing · ba560c34
      Benjamin Drung authored
      The release tarball does not contain `conf/cloud.profiles.d`,
      `conf/cloud.providers.d`, and `conf/cloud.maps.d`. Therefore the test
      cases will fail:
      
      ```
      ======================================================================
      ERROR: test_conf_cloud_maps_d_files_are_commented (unit.test_config.SampleConfTest)
      [CPU:0.0%|MEM:53.9%]
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "tests/unit/test_config.py", line 236, in test_conf_cloud_maps_d_files_are_commented
          cloud_sample_files = os.listdir(SAMPLE_CONF_DIR + 'cloud.maps.d/')
      FileNotFoundError: [Errno 2] No such file or directory: 'conf/cloud.maps.d/'
      
      ======================================================================
      ERROR: test_conf_cloud_profiles_d_files_are_commented (unit.test_config.SampleConfTest)
      [CPU:0.0%|MEM:53.9%]
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "tests/unit/test_config.py", line 200, in test_conf_cloud_profiles_d_files_are_commented
          cloud_sample_files = os.listdir(SAMPLE_CONF_DIR + 'cloud.profiles.d/')
      FileNotFoundError: [Errno 2] No such file or directory: 'conf/cloud.profiles.d/'
      
      ======================================================================
      ERROR: test_conf_cloud_providers_d_files_are_commented (unit.test_config.SampleConfTest)
      [CPU:0.0%|MEM:53.9%]
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "tests/unit/test_config.py", line 218, in test_conf_cloud_providers_d_files_are_commented
          cloud_sample_files = os.listdir(SAMPLE_CONF_DIR + 'cloud.providers.d/')
      FileNotFoundError: [Errno 2] No such file or directory: 'conf/cloud.providers.d/'
      ```
      
      Forwarded: https://github.com/saltstack/salt/pull/52403Signed-off-by: Benjamin Drung's avatarBenjamin Drung <benjamin.drung@cloud.ionos.com>
      ba560c34
    • Benjamin Drung's avatar
      Revert "Add NOTICE to salt-common" · 88e1bea6
      Benjamin Drung authored
      The upstream tarball does not ship the NOTICE file (it is just in their
      git repository).
      
      This reverts commit 02969e4a.
      88e1bea6
    • Benjamin Drung's avatar
      Refresh patches · 164e55d5
      Benjamin Drung authored
      Signed-off-by: Benjamin Drung's avatarBenjamin Drung <benjamin.drung@profitbricks.com>
      164e55d5
  8. 28 Feb, 2019 2 commits
  9. 12 Feb, 2019 1 commit
  10. 08 Feb, 2019 10 commits
    • Benjamin Drung's avatar
      Release salt 2018.3.4~git20180207+dfsg1-1 · 999e7d0c
      Benjamin Drung authored
      999e7d0c
    • Benjamin Drung's avatar
      Skip test_module_name_source_match · e3f38ad5
      Benjamin Drung authored
      Running the unittest with autopkgtest against the installed version of
      salt fails:
      
      ```
      ======================================================================
      FAIL: test_module_name_source_match
      (unit.test_module_names.BadTestModuleNamesTestCase)
      [CPU:0.0%|MEM:66.8%]
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "tests/unit/test_module_names.py", line 233, in
      test_module_name_source_match
          assert not errors, _format_errors(errors)
      AssertionError: The following 787 test module(s) could not be matched to
      a source code file:
      
      unit.test_minion (expected: salt/minion.py)
      unit.test_version (expected: salt/version.py)
      unit.test_transport (expected: salt/transport.py)
      unit.test_template (expected: salt/template.py)
      unit.test_state (expected: salt/state.py)
      unit.test_spm (expected: salt/spm.py)
      unit.test_pillar (expected: salt/pillar.py)
      unit.test_payload (expected: salt/payload.py)
      unit.test_master (expected: salt/master.py)
      unit.test_log (expected: salt/log.py)
      [...]
      ```
      
      Therefore just skip test_module_name_source_match since this test is
      just for the naming convention.
      Signed-off-by: Benjamin Drung's avatarBenjamin Drung <benjamin.drung@cloud.ionos.com>
      e3f38ad5
    • Benjamin Drung's avatar
      Add NOTICE to salt-common · 02969e4a
      Benjamin Drung authored
      Lintian complains:
      
      The package appears to be licensed under the Apache 2.0 license and a
      NOTICE file (or similar) exists in the source tree. However, no files
      called NOTICE or NOTICE.txt are installed in any of the binary
      packages.
      
      The Apache 2.0 license requires distributing of such files:
      
       (d) If the Work includes a "NOTICE" text file as part of its
           distribution, then any Derivative Works that You distribute must
           include a readable copy of the attribution notices contained
           within such NOTICE file [..]
      
      Therefore add NOTICE to salt-common since salt/cloud/clouds/gce.py is
      in this package.
      02969e4a
    • Benjamin Drung's avatar
      5b4cb833
    • Benjamin Drung's avatar
      tests: Also copy scripts and templates · 250e3428
      Benjamin Drung authored
      Some tests needs to access files in the scripts and templates directory.
      250e3428
    • Benjamin Drung's avatar
      Do not load zyppnotify file on module import · aabf570e
      Benjamin Drung authored
      The call imp.load_source() could fail (i.e. when the specified
      zyppnotify does not exist). To prevent an import failure in that case,
      move the loading of the zyppnotify file into the test case.
      
      Forwarded: https://github.com/saltstack/salt/pull/51558Signed-off-by: Benjamin Drung's avatarBenjamin Drung <benjamin.drung@cloud.ionos.com>
      aabf570e
    • Benjamin Drung's avatar
      Fix tornado4 patch to show its version in 'salt -V' · cbb48728
      Benjamin Drung authored
      When listing salt version information, and python3-tornado4 is
      installed, no Tornado version is listed.
      
      Try to import 'tornado4' before falling back to 'tornado' when
      determining the version.
      
      Closes: #921632
      cbb48728
    • Benjamin Drung's avatar
      gitfs: Fix use of deprecated pygit2 function · 9d8c893f
      Benjamin Drung authored
      0.27.4 removed pygit2.Reference.get_object()
      
      Closes: #921567
      9d8c893f
    • Benjamin Drung's avatar
      Silence linux_distribution deprecation warning · 86445497
      Benjamin Drung authored
      The salt master log is flooded with deprecation warnings:
      
      ```
      Feb 07 10:45:34 debian salt-master[1657]: [WARNING ]
      /usr/lib/python3/dist-packages/salt/grains/core.py:1759:
      DeprecationWarning: dist() and linux_distribution() functions are
      deprecated in Python 3.5
      Feb 07 10:45:34 debian salt-master[1657]:
      linux_distribution(supported_dists=_supported_dists)]
      Feb 07 10:45:34 debian salt-master[1657]: [WARNING ]
      /usr/lib/python3/dist-packages/salt/grains/core.py:1759:
      DeprecationWarning: dist() and linux_distribution() functions are
      deprecated in Python 3.5
      ```
      
      Since the import statement already falls back to use
      distro.linux_distribution, silence the deprecation warning.
      
      Closes: #921630
      Forwarded: https://github.com/saltstack/salt/pull/51541Signed-off-by: Benjamin Drung's avatarBenjamin Drung <benjamin.drung@cloud.ionos.com>
      86445497
    • Benjamin Drung's avatar
      test_argspec_report: Fix expected argspec_report result · ebc75314
      Benjamin Drung authored
      The test_argspec_report test fails on Debian testing/unstable:
      
      ```
      ======================================================================
      FAIL: test_argspec_report (unit.utils.test_args.ArgsTestCase)
      [CPU:100.0%|MEM:21.2%]
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "tests/unit/utils/test_args.py", line 134, in test_argspec_report
          {'kwargs': True, 'args': None, 'defaults': None, 'varargs': True}})
      AssertionError: {'tes[18 chars]': {'args': ['arg1', 'arg2', 'kwarg1'],
      'defau[43 chars]one}} != {'tes[18 chars]': {'kwargs': True, 'args':
      None, 'defaults': [18 chars]rue}}
      - {'test_module.test_spec': {'args': ['arg1', 'arg2', 'kwarg1'],
      + {'test_module.test_spec': {'args': None,
      -                            'defaults': (None,),
      ?                                        -     --
      
      +                            'defaults': None,
      -                            'kwargs': None,
      ?                                      ^^^
      
      +                            'kwargs': True,
      ?                                      ^^^
      
      -                            'varargs': None}}
      ?                                       ^^^
      
      +                            'varargs': True}}
      ?                                       ^^^
      ```
      
      Adjust the expected result of argspec_report() to the argument
      specification of the _test_spec() function.
      
      Bug: https://github.com/saltstack/salt/issues/51555
      Forwarded: https://github.com/saltstack/salt/pull/51560Signed-off-by: Benjamin Drung's avatarBenjamin Drung <benjamin.drung@cloud.ionos.com>
      ebc75314