UPDATE: sysutils/ansible-2.7.1

2018-11-05 Thread Edward Lopez-Acosta

Minor update but lots of fixes.

Was able to remove the patch for the reboot action as it was merged 
upstream.


Notable changes:
- user module - do not pass ssh_key_passphrase on cmdline (CVE-2018-16837)
- reboot - add support for OpenBSD
- Fixed: Appropriate code to expand value was missing so assigning SSL 
certificate is not working as described in the documentation. 
https://github.com/ansible/ansible/pull/45830


Full changelog:
https://github.com/ansible/ansible/blob/stable-2.7/changelogs/CHANGELOG-v2.7.rst#v2-7-1

If ok can a dev please merge this?
--
Edward Lopez-Acosta
diff --git a/sysutils/ansible/Makefile b/sysutils/ansible/Makefile
index 3b282bbc5e1..c0d0ead8732 100644
--- a/sysutils/ansible/Makefile
+++ b/sysutils/ansible/Makefile
@@ -3,7 +3,7 @@
 COMMENT-main =		ssh based config management framework
 COMMENT-html =		offline Ansible documentation in HTML format
 
-MODPY_EGG_VERSION =	2.7.0
+MODPY_EGG_VERSION =	2.7.1
 DISTNAME =		ansible-${MODPY_EGG_VERSION}
 PKGNAME-main =		${PKGNAME}
 PKGNAME-html =		ansible-html-${MODPY_EGG_VERSION}
@@ -38,6 +38,7 @@ NO_TEST =		Yes
 
 DOCDIR =		${PREFIX}/share/doc/ansible
 EXDIR =			${PREFIX}/share/examples/ansible
+SCRIPTDIR =		${EXDIR}/scripts
 PLUGINDIR =		${PREFIX}/share/ansible_plugins
 
 pre-configure:
@@ -56,8 +57,9 @@ post-build:
 	  ${WRKSRC}/docs/docsite/_build/html/_static/css/theme.min.css
 
 post-install:
-	${INSTALL_DATA_DIR} ${EXDIR} ${DOCDIR}
-	${INSTALL_DATA} ${WRKSRC}/examples/* ${EXDIR}
+	${INSTALL_DATA_DIR} ${EXDIR} ${DOCDIR} ${SCRIPTDIR}
+	${INSTALL_SCRIPT} ${WRKSRC}/examples/scripts/* ${SCRIPTDIR}
+	${INSTALL_DATA} ${WRKSRC}/examples/{ansible.cfg,hosts} ${EXDIR}
 	${SUBST_CMD} ${EXDIR}/hosts
 	${INSTALL_DATA} ${WRKSRC}/docs/man/man1/*.1 ${PREFIX}/man/man1
 	cp -R ${WRKBUILD}/docs/docsite/_build/html ${DOCDIR}
diff --git a/sysutils/ansible/distinfo b/sysutils/ansible/distinfo
index 0796987e9c0..c87a9264788 100644
--- a/sysutils/ansible/distinfo
+++ b/sysutils/ansible/distinfo
@@ -1,2 +1,2 @@
-SHA256 (ansible-2.7.0.tar.gz) = oauODxPnmiBmGtZUb0WhQq/q62ZN6ywpDjI2LYrlthg=
-SIZE (ansible-2.7.0.tar.gz) = 11773769
+SHA256 (ansible-2.7.1.tar.gz) = 55U0cjR/zG3KEIOREbV2qfeQ4ABWNE8tz0SObEUv6Tk=
+SIZE (ansible-2.7.1.tar.gz) = 11738557
diff --git a/sysutils/ansible/patches/patch-lib_ansible_plugins_action_reboot_py b/sysutils/ansible/patches/patch-lib_ansible_plugins_action_reboot_py
deleted file mode 100644
index fb931422600..000
--- a/sysutils/ansible/patches/patch-lib_ansible_plugins_action_reboot_py
+++ /dev/null
@@ -1,84 +0,0 @@
-$OpenBSD: patch-lib_ansible_plugins_action_reboot_py,v 1.1 2018/10/19 11:46:42 danj Exp $
-
-Backport until 2.7.1
-https://github.com/ansible/ansible/commit/26de4f97493adeb388c1c8fad7a266bb7652bac6
-https://github.com/ansible/ansible/commit/a0f38bdab5ae0e183cb960fe9e964bf1edf7c326
-
-Index: lib/ansible/plugins/action/reboot.py
 lib/ansible/plugins/action/reboot.py.orig
-+++ lib/ansible/plugins/action/reboot.py
-@@ -28,7 +28,7 @@ class TimedOutException(Exception):
- 
- class ActionModule(ActionBase):
- TRANSFERS_FILES = False
--_VALID_ARGS = frozenset(('connect_timeout', 'msg', 'post_reboot_delay', 'pre_reboot_delay', 'test_command'))
-+_VALID_ARGS = frozenset(('connect_timeout', 'msg', 'post_reboot_delay', 'pre_reboot_delay', 'test_command', 'reboot_timeout'))
- 
- DEFAULT_REBOOT_TIMEOUT = 600
- DEFAULT_CONNECT_TIMEOUT = None
-@@ -42,18 +42,24 @@ class ActionModule(ActionBase):
- 
- DEPRECATED_ARGS = {}
- 
-+BOOT_TIME_COMMANDS = {
-+'openbsd': "/sbin/sysctl kern.boottime",
-+}
-+
- SHUTDOWN_COMMANDS = {
- 'linux': DEFAULT_SHUTDOWN_COMMAND,
- 'freebsd': DEFAULT_SHUTDOWN_COMMAND,
- 'sunos': '/usr/sbin/shutdown',
- 'darwin': '/sbin/shutdown',
-+'openbsd': DEFAULT_SHUTDOWN_COMMAND,
- }
- 
- SHUTDOWN_COMMAND_ARGS = {
- 'linux': '-r {delay_min} "{message}"',
- 'freebsd': '-r +{delay_sec}s "{message}"',
- 'sunos': '-y -g {delay_sec} -r "{message}"',
--'darwin': '-r +{delay_min_macos} "{message}"'
-+'darwin': '-r +{delay_min_macos} "{message}"',
-+'openbsd': '-r +{delay_min} "{message}"',
- }
- 
- def __init__(self, *args, **kwargs):
-@@ -94,18 +100,37 @@ class ActionModule(ActionBase):
- return reboot_command
- 
- def get_system_boot_time(self):
--command_result = self._low_level_execute_command(self.DEFAULT_BOOT_TIME_COMMAND, sudoable=self.DEFAULT_SUDOABLE)
-+stdout = u''
-+stderr = u''
- 
-+# Determine the system distribution in order to use the correct shutdown command arguments
-+uname_result = self._low_level_execute_command('uname')
-+distribution = uname_result['stdout'].strip().lower()
-+
-+boot_time_command = self.BOOT_TIME_COMMANDS.get(distribution, self.DEFAULT_BOOT_TIME_COMMAND)
-+command_result = self._low_level_execute_command(boot_time_command, sudoable=self.DEFAULT_SUDOAB

Fwd: UPDATE: sysutils/ansible-2.7.1

2018-11-14 Thread Edward Lopez-Acosta
Ping?
There are security fixes, Open bad compatibility, and a major bug with the
yum module fixed in this update.

-- Forwarded message --
From: Edward Lopez-Acosta 
Date: Monday, November 5, 2018
Subject: UPDATE: sysutils/ansible-2.7.1
To: ports@openbsd.org


Minor update but lots of fixes.

Was able to remove the patch for the reboot action as it was merged
upstream.

Notable changes:
- user module - do not pass ssh_key_passphrase on cmdline (CVE-2018-16837)
- reboot - add support for OpenBSD
- Fixed: Appropriate code to expand value was missing so assigning SSL
certificate is not working as described in the documentation.
https://github.com/ansible/ansible/pull/45830

Full changelog:
https://github.com/ansible/ansible/blob/stable-2.7/changelogs/CHANGELOG-v2.7.rst#v2-7-1

If ok can a dev please merge this?
--
Edward Lopez-Acosta
diff --git a/sysutils/ansible/Makefile b/sysutils/ansible/Makefile
index 3b282bbc5e1..c0d0ead8732 100644
--- a/sysutils/ansible/Makefile
+++ b/sysutils/ansible/Makefile
@@ -3,7 +3,7 @@
 COMMENT-main =		ssh based config management framework
 COMMENT-html =		offline Ansible documentation in HTML format
 
-MODPY_EGG_VERSION =	2.7.0
+MODPY_EGG_VERSION =	2.7.1
 DISTNAME =		ansible-${MODPY_EGG_VERSION}
 PKGNAME-main =		${PKGNAME}
 PKGNAME-html =		ansible-html-${MODPY_EGG_VERSION}
@@ -38,6 +38,7 @@ NO_TEST =		Yes
 
 DOCDIR =		${PREFIX}/share/doc/ansible
 EXDIR =			${PREFIX}/share/examples/ansible
+SCRIPTDIR =		${EXDIR}/scripts
 PLUGINDIR =		${PREFIX}/share/ansible_plugins
 
 pre-configure:
@@ -56,8 +57,9 @@ post-build:
 	  ${WRKSRC}/docs/docsite/_build/html/_static/css/theme.min.css
 
 post-install:
-	${INSTALL_DATA_DIR} ${EXDIR} ${DOCDIR}
-	${INSTALL_DATA} ${WRKSRC}/examples/* ${EXDIR}
+	${INSTALL_DATA_DIR} ${EXDIR} ${DOCDIR} ${SCRIPTDIR}
+	${INSTALL_SCRIPT} ${WRKSRC}/examples/scripts/* ${SCRIPTDIR}
+	${INSTALL_DATA} ${WRKSRC}/examples/{ansible.cfg,hosts} ${EXDIR}
 	${SUBST_CMD} ${EXDIR}/hosts
 	${INSTALL_DATA} ${WRKSRC}/docs/man/man1/*.1 ${PREFIX}/man/man1
 	cp -R ${WRKBUILD}/docs/docsite/_build/html ${DOCDIR}
diff --git a/sysutils/ansible/distinfo b/sysutils/ansible/distinfo
index 0796987e9c0..c87a9264788 100644
--- a/sysutils/ansible/distinfo
+++ b/sysutils/ansible/distinfo
@@ -1,2 +1,2 @@
-SHA256 (ansible-2.7.0.tar.gz) = oauODxPnmiBmGtZUb0WhQq/q62ZN6ywpDjI2LYrlthg=
-SIZE (ansible-2.7.0.tar.gz) = 11773769
+SHA256 (ansible-2.7.1.tar.gz) = 55U0cjR/zG3KEIOREbV2qfeQ4ABWNE8tz0SObEUv6Tk=
+SIZE (ansible-2.7.1.tar.gz) = 11738557
diff --git a/sysutils/ansible/patches/patch-lib_ansible_plugins_action_reboot_py b/sysutils/ansible/patches/patch-lib_ansible_plugins_action_reboot_py
deleted file mode 100644
index fb931422600..000
--- a/sysutils/ansible/patches/patch-lib_ansible_plugins_action_reboot_py
+++ /dev/null
@@ -1,84 +0,0 @@
-$OpenBSD: patch-lib_ansible_plugins_action_reboot_py,v 1.1 2018/10/19 11:46:42 danj Exp $
-
-Backport until 2.7.1
-https://github.com/ansible/ansible/commit/26de4f97493adeb388c1c8fad7a266bb7652bac6
-https://github.com/ansible/ansible/commit/a0f38bdab5ae0e183cb960fe9e964bf1edf7c326
-
-Index: lib/ansible/plugins/action/reboot.py
 lib/ansible/plugins/action/reboot.py.orig
-+++ lib/ansible/plugins/action/reboot.py
-@@ -28,7 +28,7 @@ class TimedOutException(Exception):
- 
- class ActionModule(ActionBase):
- TRANSFERS_FILES = False
--_VALID_ARGS = frozenset(('connect_timeout', 'msg', 'post_reboot_delay', 'pre_reboot_delay', 'test_command'))
-+_VALID_ARGS = frozenset(('connect_timeout', 'msg', 'post_reboot_delay', 'pre_reboot_delay', 'test_command', 'reboot_timeout'))
- 
- DEFAULT_REBOOT_TIMEOUT = 600
- DEFAULT_CONNECT_TIMEOUT = None
-@@ -42,18 +42,24 @@ class ActionModule(ActionBase):
- 
- DEPRECATED_ARGS = {}
- 
-+BOOT_TIME_COMMANDS = {
-+'openbsd': "/sbin/sysctl kern.boottime",
-+}
-+
- SHUTDOWN_COMMANDS = {
- 'linux': DEFAULT_SHUTDOWN_COMMAND,
- 'freebsd': DEFAULT_SHUTDOWN_COMMAND,
- 'sunos': '/usr/sbin/shutdown',
- 'darwin': '/sbin/shutdown',
-+'openbsd': DEFAULT_SHUTDOWN_COMMAND,
- }
- 
- SHUTDOWN_COMMAND_ARGS = {
- 'linux': '-r {delay_min} "{message}"',
- 'freebsd': '-r +{delay_sec}s "{message}"',
- 'sunos': '-y -g {delay_sec} -r "{message}"',
--'darwin': '-r +{delay_min_macos} "{message}"'
-+'darwin': '-r +{delay_min_macos} "{message}"',
-+'openbsd': '-r +{delay_min} "{message}"',
- }
- 
- def __init__(self, *args, **kwargs):
-@@ -94,18 +100,37 @@ class ActionModule(ActionBase):
- return reboot_comma

Re: UPDATE: sysutils/ansible-2.7.1

2018-11-14 Thread Daniel Jakots
On Wed, 14 Nov 2018 08:22:53 -0600, Edward Lopez-Acosta
 wrote:

> Ping?
> There are security fixes, Open bad compatibility, and a major bug
> with the yum module fixed in this update.

https://marc.info/?l=openbsd-ports-cvs&m=154219792904802&w=2

Cheers,
Daniel



Re: UPDATE: sysutils/ansible-2.7.1

2018-11-14 Thread Edward Lopez-Acosta
Thanks Daniel. Didn't see the ok or that it was committed when reviewing
the thread.

On Wednesday, November 14, 2018, Edward Lopez-Acosta 
wrote:
> Ping?
> There are security fixes, Open bad compatibility, and a major bug with
the yum module fixed in this update.
>
> -- Forwarded message --
> From: Edward Lopez-Acosta 
> Date: Monday, November 5, 2018
> Subject: UPDATE: sysutils/ansible-2.7.1
> To: ports@openbsd.org
>
>
> Minor update but lots of fixes.
>
> Was able to remove the patch for the reboot action as it was merged
upstream.
>
> Notable changes:
> - user module - do not pass ssh_key_passphrase on cmdline (CVE-2018-16837)
> - reboot - add support for OpenBSD
> - Fixed: Appropriate code to expand value was missing so assigning SSL
certificate is not working as described in the documentation.
https://github.com/ansible/ansible/pull/45830
>
> Full changelog:
>
https://github.com/ansible/ansible/blob/stable-2.7/changelogs/CHANGELOG-v2.7.rst#v2-7-1
>
> If ok can a dev please merge this?
> --
> Edward Lopez-Acosta
>
>


Re: UPDATE: sysutils/ansible-2.7.1

2018-11-14 Thread Stuart Henderson
On 2018/11/14 08:43, Edward Lopez-Acosta wrote:
> Thanks Daniel. Didn't see the ok or that it was committed when reviewing
> the thread.

Better to check with "cvs up" before sending a "ping" mail, you often won't see
that on-list.