Github messages for voidlinux
 help / color / mirror / Atom feed
From: jbenden <jbenden@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] ansible: update to 2.9.7.
Date: Wed, 29 Apr 2020 18:48:53 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-21476@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 479 bytes --]

There is a new pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages ansible-2.9.7
https://github.com/void-linux/void-packages/pull/21476

ansible: update to 2.9.7.
Upgrade Ansible to current stable release.

Fixed a xlint warning.

Tested locally and works.

> Also includes a bug fix for the OpenBSD `syspatch` module.


A patch file from https://github.com/void-linux/void-packages/pull/21476.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ansible-2.9.7-21476.patch --]
[-- Type: text/x-diff, Size: 5223 bytes --]

From deb612b013eef0080be403c8cec817688ef34b20 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Mon, 27 Apr 2020 14:30:45 -0700
Subject: [PATCH] ansible: update to 2.9.7.

Signed-off-by: Joseph Benden <joe@benden.us>
---
 ...f5e4b300aa8ce6c88a967298fc26ee471e42.patch | 94 +++++++++++++++++++
 srcpkgs/ansible/template                      |  6 +-
 2 files changed, 97 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/ansible/patches/e74cf5e4b300aa8ce6c88a967298fc26ee471e42.patch

diff --git a/srcpkgs/ansible/patches/e74cf5e4b300aa8ce6c88a967298fc26ee471e42.patch b/srcpkgs/ansible/patches/e74cf5e4b300aa8ce6c88a967298fc26ee471e42.patch
new file mode 100644
index 00000000000..8ce65ae9bd2
--- /dev/null
+++ b/srcpkgs/ansible/patches/e74cf5e4b300aa8ce6c88a967298fc26ee471e42.patch
@@ -0,0 +1,94 @@
+From e74cf5e4b300aa8ce6c88a967298fc26ee471e42 Mon Sep 17 00:00:00 2001
+From: Andrew Klaus <andrew@aklaus.ca>
+Date: Sun, 24 Nov 2019 21:15:15 -0700
+Subject: [PATCH] Fix: OpenBSD syspatch module bug (#57259)
+
+* Append is not a list
+
+* Adding new example. Renaming reboot var to match other modules
+
+* syspatch: Fixing if statement logic issue to properly compare integer
+
+* Syspatch: Using get_bin_path to find path. Revert to reboot_needed instead of reboot_required.
+
+* syspatch: Fix wording in playbook example
+---
+ lib/ansible/modules/system/syspatch.py | 28 +++++++++++++++++---------
+ 1 file changed, 19 insertions(+), 9 deletions(-)
+
+diff --git a/lib/ansible/modules/system/syspatch.py b/lib/ansible/modules/system/syspatch.py
+index 017cfbc7d603f..3c75f2f2c0b7c 100644
+--- a/lib/ansible/modules/system/syspatch.py
++++ b/lib/ansible/modules/system/syspatch.py
+@@ -52,6 +52,16 @@
+ - name: Revert all patches
+   syspatch:
+     revert: all
++
++# NOTE: You can reboot automatically if a patch requires it:
++- name: Apply all patches and store result
++  syspatch:
++    apply: true
++  register: syspatch
++
++- name: Reboot if patch requires it
++  reboot:
++  when: syspatch.reboot_needed
+ '''
+ 
+ RETURN = r'''
+@@ -82,7 +92,7 @@
+ def run_module():
+     # define available arguments/parameters a user can pass to the module
+     module_args = dict(
+-        apply=dict(type='bool', default=False),
++        apply=dict(type='bool'),
+         revert=dict(type='str', choices=['all', 'one'])
+     )
+ 
+@@ -98,7 +108,7 @@ def run_module():
+ 
+ 
+ def syspatch_run(module):
+-    cmd = ['/usr/sbin/syspatch']
++    cmd = module.get_bin_path('syspatch', True)
+     changed = False
+     reboot_needed = False
+     warnings = []
+@@ -116,7 +126,7 @@ def syspatch_run(module):
+         run_flag = []
+ 
+     # Run check command
+-    rc, out, err = module.run_command(cmd + check_flag)
++    rc, out, err = module.run_command([cmd] + check_flag)
+ 
+     if rc != 0:
+         module.fail_json(msg="Command %s failed rc=%d, out=%s, err=%s" % (cmd, rc, out, err))
+@@ -131,21 +141,21 @@ def syspatch_run(module):
+     if module.check_mode:
+         changed = change_pending
+     elif change_pending:
+-        rc, out, err = module.run_command(cmd + run_flag)
++        rc, out, err = module.run_command([cmd] + run_flag)
+ 
+         # Workaround syspatch ln bug:
+         # http://openbsd-archive.7691.n7.nabble.com/Warning-applying-latest-syspatch-td354250.html
+         if rc != 0 and err != 'ln: /usr/X11R6/bin/X: No such file or directory\n':
+             module.fail_json(msg="Command %s failed rc=%d, out=%s, err=%s" % (cmd, rc, out, err))
+-        elif out.lower().find('create unique kernel'):
++        elif out.lower().find('create unique kernel') > 0:
+             # Kernel update applied
+             reboot_needed = True
+-        elif out.lower().find('syspatch updated itself'):
+-            warnings.append['Syspatch was updated. Please run syspatch again.']
++        elif out.lower().find('syspatch updated itself') > 0:
++            warnings.append('Syspatch was updated. Please run syspatch again.')
+ 
+         # If no stdout, then warn user
+-        if len(out) > 0:
+-            warnings.append['syspatch had suggested changes, but stdout was empty.']
++        if len(out) == 0:
++            warnings.append('syspatch had suggested changes, but stdout was empty.')
+ 
+         changed = True
+     else:
diff --git a/srcpkgs/ansible/template b/srcpkgs/ansible/template
index f29aca6789b..c34b6874426 100644
--- a/srcpkgs/ansible/template
+++ b/srcpkgs/ansible/template
@@ -1,10 +1,9 @@
 # Template file for 'ansible'
 pkgname=ansible
-version=2.9.3
+version=2.9.7
 revision=1
 archs=noarch
 build_style=python3-module
-pycompile_module="ansible"
 hostmakedepends="python3-setuptools"
 depends="${hostmakedepends} python3-cryptography python3-Jinja2 python3-paramiko
  python3-yaml"
@@ -14,7 +13,8 @@ maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="https://www.ansible.com/"
 distfiles="https://releases.ansible.com/ansible/${pkgname}-${version}.tar.gz"
-checksum=36f501a17fb15d210722b649d53582acf47835ea0bbda7eab79e13c945e4eac2
+checksum=7222ce925536a25b2912364e13b03a3e21dbf2f96799ebff304f48509324de7b
+patch_args="-Np1"
 
 post_install() {
 	vsconf examples/ansible.cfg

             reply	other threads:[~2020-04-29 16:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 16:48 jbenden [this message]
2020-05-09 16:47 ` [PR PATCH] [Updated] " jbenden
2020-05-14  8:14 ` NicoWde
2020-05-14  8:43 ` [PR PATCH] [Updated] " jbenden
2020-05-14  8:45 ` ansible: update to 2.9.9 jbenden
2020-10-03 23:51 ` the-maldridge
2020-10-03 23:51 ` [PR PATCH] [Closed]: " the-maldridge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-21476@inbox.vuxu.org \
    --to=jbenden@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).