summary refs log tree commit diff
path: root/gnu/packages/admin.scm
diff options
context:
space:
mode:
authorAndreas Enge <andreas@enge.fr>2023-04-17 19:17:39 +0200
committerAndreas Enge <andreas@enge.fr>2023-04-17 19:17:39 +0200
commit216d7bdb738e05675bbb128d582851bdc9b85aaa (patch)
tree0535efa1427ebc5b14ac10ccf03be17673a8c909 /gnu/packages/admin.scm
parentd3c7ca3c40fd613cfb3fb8f41e8ea064b438414a (diff)
parent50dd91bc30634c75c0001cfd38bbcc2fbbeb894e (diff)
downloadguix-216d7bdb738e05675bbb128d582851bdc9b85aaa.tar.gz
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'gnu/packages/admin.scm')
-rw-r--r--gnu/packages/admin.scm52
1 files changed, 35 insertions, 17 deletions
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 5185ffd198..1ad3f93dfc 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -35,7 +35,7 @@
 ;;; Copyright © 2020, 2021, 2022 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
-;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
 ;;; Copyright © 2021 qblade <qblade@protonmail.com>
@@ -2785,13 +2785,13 @@ specified directories.")
 (define-public ansible-core
   (package
     (name "ansible-core")
-    (version "2.11.6")
+    (version "2.14.4")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "ansible-core" version))
        (sha256
-        (base32 "0fih7nxszni8imi5sywsifd976v77ydhip43pzg7dd65qy1h5mck"))))
+        (base32 "057g87smxcn6zc558xk4zr6ga4q8clmkyxghn5gx60a94sy61clh"))))
     (build-system python-build-system)
     (arguments
      `(#:modules ((guix build python-build-system)
@@ -2827,10 +2827,25 @@ sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
                                (and (eq? 'symlink (stat:type (lstat x)))
                                     (string-prefix? "ansible-" x)
                                     (string=? "ansible" (readlink x)))))))))
+         (add-after 'unpack 'skip-controller-tests
+           (lambda _
+             ;; XXX: This disables all the controller tests, which fail for
+             ;; unknown reasons, seemingly while attempting to set the
+             ;; locale to en_US.UTF-8.
+             (substitute* "test/lib/ansible_test/_internal/commands\
+/units/__init__.py"
+               (("^            if test_context == TestContext.controller:.*"
+                 all)
+                (string-append all "                continue\n")))))
          (add-after 'unpack 'preserve-pythonpath
            (lambda _
              (substitute* "test/lib/ansible_test/_internal/ansible_util.py"
                (("PYTHONPATH=get_ansible_python_path\\(args\\)" all)
+                (string-append all "+ ':' + os.environ['GUIX_PYTHONPATH']")))
+             (substitute* "test/lib/ansible_test/_internal/commands\
+/units/__init__.py"
+               (("PYTHONPATH=get_units_ansible_python_path\\(args, \
+test_context)" all)
                 (string-append all "+ ':' + os.environ['GUIX_PYTHONPATH']")))))
          (add-after 'unpack 'patch-paths
            (lambda* (#:key inputs outputs #:allow-other-keys)
@@ -2842,18 +2857,10 @@ sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
                (("/usr/bin/python")
                 (which "python")))))
          (replace 'check
-           ;; The environment for the test suite can be tricky to get right.
-           ;; The environment used for Ansible's CI defined in the following
-           ;; Dockerfile can be used as a reference:
-           ;; https://raw.githubusercontent.com/ansible/
-           ;; default-test-container/master/Dockerfile.
            (lambda* (#:key inputs outputs tests? #:allow-other-keys)
              (when tests?
                ;; Otherwise Ansible fails to create its config directory.
                (setenv "HOME" "/tmp")
-               (setenv "PATH" (string-append (getenv "PATH") ":"
-                                             (assoc-ref outputs "out") "/bin"))
-               (add-installed-pythonpath inputs outputs)
                ;; This test module messes up with sys.path and causes many
                ;; test failures.
                (delete-file "test/units/_vendor/test_vendor.py")
@@ -2862,11 +2869,23 @@ sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
                (delete-file "test/units/utils/test_display.py")
                ;; This test fail for reasons unknown.
                (delete-file "test/units/cli/test_adhoc.py")
+               ;; These tests fail in the container; it appears that the
+               ;; mocking of the absolute file names such as /usr/bin/svcs do
+               ;; not work as intended there.
+               (delete-file "test/units/modules/test_iptables.py")
+               (delete-file "test/units/modules/test_service.py")
+               ;; These tests fail with a "unsupported locale setting" error
+               ;; when invoking 'locale.setlocale(locale.LC_ALL, '')'
+               (delete-file "test/units/module_utils/basic/\
+test_command_nonexisting.py")
+               (delete-file "test/units/module_utils/basic/test_tmpdir.py")
                ;; The test suite needs to be run with 'ansible-test', which
                ;; does some extra environment setup.  Taken from
                ;; https://raw.githubusercontent.com/ansible/ansible/\
                ;; devel/test/utils/shippable/shippable.sh.
-               (invoke "ansible-test" "units" "-v")))))))
+               (invoke "ansible-test" "units" "-v"
+                       "--num-workers" (number->string
+                                        (parallel-job-count)))))))))
     (native-inputs
      (list openssh
            openssl
@@ -2884,7 +2903,7 @@ sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
      (list python-cryptography
            python-jinja2
            python-pyyaml
-           python-packaging ;for version number parsing
+           python-packaging             ;for version number parsing
            python-resolvelib-0.5))
     (home-page "https://www.ansible.com/")
     (synopsis "Radically simple IT automation")
@@ -2912,16 +2931,15 @@ provides the following commands:
 (define-public ansible
   (package
     (name "ansible")
-    (version "4.7.0")
+    (version "7.4.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "ansible" version))
        (sha256
-        (base32 "0aab9id6dqfw2111r731c7y1p77dpzczynmgl4d989p3a7n54z0b"))))
+        (base32 "142barhwz0wx5kn74xi0bfl21iwq2yq3jp14kxajsg9nggndcr09"))))
     (build-system python-build-system)
-    (propagated-inputs
-     (list ansible-core))
+    (propagated-inputs (list ansible-core))
     ;; The Ansible collections are found by ansible-core via the Python search
     ;; path; the following search path ensures that they are found even when
     ;; Python is not present in the profile.