Github messages for voidlinux
 help / color / mirror / Atom feed
From: jcgruenhage <jcgruenhage@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] Ansible 6.0.0
Date: Thu, 30 Jun 2022 17:08:37 +0200	[thread overview]
Message-ID: <20220630150837.4-3Zi9uRpYqljyrVgQmw-2FClLjHbXwo5_XGAWsE_dg@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-37758@inbox.vuxu.org>

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

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages ansible-6.0.0_1
https://github.com/void-linux/void-packages/pull/37758

Ansible 6.0.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO** (Well, I've tested it and it's broken, so not sure what to put here)

Tests blocked(-ish) on https://github.com/ansible/ansible/issues/78169

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

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

From 42e4d2b5ea7c6c7e190ca7aa3419e30f5a4100f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Thu, 30 Jun 2022 13:05:44 +0200
Subject: [PATCH 1/3] New package: python3-straight.plugin-1.5.0

---
 srcpkgs/python3-straight.plugin/template | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 srcpkgs/python3-straight.plugin/template

diff --git a/srcpkgs/python3-straight.plugin/template b/srcpkgs/python3-straight.plugin/template
new file mode 100644
index 000000000000..97d226d31133
--- /dev/null
+++ b/srcpkgs/python3-straight.plugin/template
@@ -0,0 +1,18 @@
+# Template file for 'python3-straight.plugin'
+pkgname=python3-straight.plugin
+version=1.5.0
+revision=1
+wrksrc="${pkgname/python3-/}-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3"
+short_desc="Python plugin loading facility"
+maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
+license="MIT"
+homepage="https://straightplugin.readthedocs.io/"
+distfiles="${PYPI_SITE}/s/${pkgname/python3-/}/${pkgname/python3-/}-${version}.tar.gz"
+checksum=818a7641068932ed6436d0af0a3bb77bbbde29df0a7142c8bd1a249e7c2f0d38
+
+post_install() {
+	vlicense LICENSE
+}

From ec24430983f6b09179779633e26c7770a8e297fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Thu, 30 Jun 2022 13:06:18 +0200
Subject: [PATCH 2/3] ansible-core: update to 2.13.1.

---
 ...mmand-v-instead-of-which-in-Makefile.patch | 32 +++++++++++++
 ...et_bin_path-should-only-look-at-PATH.patch | 39 +++++++++++++++
 srcpkgs/ansible-core/template                 | 48 +++++++++++++------
 3 files changed, 105 insertions(+), 14 deletions(-)
 create mode 100644 srcpkgs/ansible-core/patches/0001-use-command-v-instead-of-which-in-Makefile.patch
 create mode 100644 srcpkgs/ansible-core/patches/0002-fix-get_bin_path-should-only-look-at-PATH.patch

diff --git a/srcpkgs/ansible-core/patches/0001-use-command-v-instead-of-which-in-Makefile.patch b/srcpkgs/ansible-core/patches/0001-use-command-v-instead-of-which-in-Makefile.patch
new file mode 100644
index 000000000000..93cb25f91237
--- /dev/null
+++ b/srcpkgs/ansible-core/patches/0001-use-command-v-instead-of-which-in-Makefile.patch
@@ -0,0 +1,32 @@
+From ebb46e78c763836d45cbc82b963946a7cf59b3f3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
+ <jan.christian@gruenhage.xyz>
+Date: Thu, 30 Jun 2022 15:33:46 +0200
+Subject: [PATCH 1/2] use 'command -v' instead of 'which' in Makefile
+
+'which' is not standardized and can even be considered problematic [1]
+
+[1] https://lwn.net/Articles/874049/
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 7641344968..45421e88e0 100644
+--- a/Makefile
++++ b/Makefile
+@@ -18,9 +18,9 @@ SDIST_DIR ?= 'dist'
+ # This doesn't evaluate until it's called. The -D argument is the
+ # directory of the target file ($@), kinda like `dirname`.
+ MANPAGES ?= $(patsubst %.rst.in,%,$(wildcard ./docs/man/man1/ansible*.1.rst.in))
+-ifneq ($(shell which rst2man 2>/dev/null),)
++ifneq ($(shell command -v rst2man 2>/dev/null),)
+ ASCII2MAN = rst2man $< $@
+-else ifneq ($(shell which rst2man.py 2>/dev/null),)
++else ifneq ($(shell command -v rst2man.py 2>/dev/null),)
+ ASCII2MAN = rst2man.py $< $@
+ else
+ ASCII2MAN = @echo "ERROR: rst2man from docutils command is not installed but is required to build $(MANPAGES)" && exit 1
+-- 
+2.36.1
+
diff --git a/srcpkgs/ansible-core/patches/0002-fix-get_bin_path-should-only-look-at-PATH.patch b/srcpkgs/ansible-core/patches/0002-fix-get_bin_path-should-only-look-at-PATH.patch
new file mode 100644
index 000000000000..7c2f0c1d597b
--- /dev/null
+++ b/srcpkgs/ansible-core/patches/0002-fix-get_bin_path-should-only-look-at-PATH.patch
@@ -0,0 +1,39 @@
+From 9e273f9d1151d1c43b7b0206e902905140d15c6c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
+ <jan.christian@gruenhage.xyz>
+Date: Thu, 30 Jun 2022 15:37:16 +0200
+Subject: [PATCH 2/2] fix: get_bin_path should only look at $PATH
+
+get_bin_path, according to it's documentation, is looking for a binary
+in the $PATH. It actually also checks in /sbin, /usr/sbin and
+/usr/local/sbin, which breaks stuff if you explicitly need to not look
+in those directories either
+---
+ lib/ansible/module_utils/common/process.py | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/lib/ansible/module_utils/common/process.py b/lib/ansible/module_utils/common/process.py
+index f128cd9800..970dd99852 100644
+--- a/lib/ansible/module_utils/common/process.py
++++ b/lib/ansible/module_utils/common/process.py
+@@ -20,17 +20,12 @@ def get_bin_path(arg, opt_dirs=None, required=None):
+     '''
+     opt_dirs = [] if opt_dirs is None else opt_dirs
+ 
+-    sbin_paths = ['/sbin', '/usr/sbin', '/usr/local/sbin']
+     paths = []
+     for d in opt_dirs:
+         if d is not None and os.path.exists(d):
+             paths.append(d)
+     paths += os.environ.get('PATH', '').split(os.pathsep)
+     bin_path = None
+-    # mangle PATH to include /sbin dirs
+-    for p in sbin_paths:
+-        if p not in paths and os.path.exists(p):
+-            paths.append(p)
+     for d in paths:
+         if not d:
+             continue
+-- 
+2.36.1
+
diff --git a/srcpkgs/ansible-core/template b/srcpkgs/ansible-core/template
index ef59b9b653a5..7b825fdb71c1 100644
--- a/srcpkgs/ansible-core/template
+++ b/srcpkgs/ansible-core/template
@@ -1,30 +1,50 @@
 # Template file for 'ansible-core'
 pkgname=ansible-core
-version=2.12.6
+version=2.13.1
 revision=1
-build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="${hostmakedepends} python3-cryptography python3-Jinja2 python3-paramiko
- python3-yaml python3-packaging python3-resolvelib"
+hostmakedepends="python3-setuptools python3-wheel python3-packaging"
+depends="python3-cryptography python3-Jinja2 python3-paramiko python3-yaml
+ python3-packaging python3-resolvelib python3-pytz git"
+checkdepends="${depends} python3-pytest python3-pytest-xdist python3-pytest-forked unzip openssh python3-pytest-mock libselinux"
 short_desc="Simple deployment, configuration management and execution framework"
 maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
 license="GPL-3.0-or-later"
 homepage="https://www.ansible.com/"
 distfiles="${PYPI_SITE}/a/ansible-core/ansible-core-${version}.tar.gz"
-checksum=5f366e851159d8f72ce68d32b8c0edda56ee537c01e9f68eca382bd1510af65d
+checksum=abd478ceff1a0aba95e94ceab8dc820f407bcc0f0033dc546840cddc29a36958
 conflicts="ansible<2.10.1_1"
 replaces="ansible-base<2.11.0_1"
-# Tests are currently broken for ansible on python 3.10
-# See https://github.com/ansible/ansible/issues/74658
-# and https://github.com/ansible/ansible/issues/74660
-make_check=no
 
-post_install() {
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends="${pkgname}"
+else
+	hostmakedepends=" python3-straight.plugin python3-docutils"
+fi
+
+do_build() {
+	python setup.py build
+}
+
+do_check() {
+	TEST_FLAGS="${make_check_args}" make tests-py3
+}
+
+do_install() {
+	python setup.py install --root="${DESTDIR}"
+
+	if [ -z "$CROSS_BUILD" ]; then
+		make docs
+		for page in docs/man/man1/*.1; do
+			vman ${m}
+		done
+	else
+		for page in /usr/share/man/man1/ansible*; do
+			vman $page
+		done
+	fi
+
 	vsconf examples/ansible.cfg
 	vsconf examples/hosts
-	for m in docs/man/man1/*.1; do
-		vman ${m}
-	done
 }
 
 ansible-base_package() {

From 4c26d8d068fa6b9483f1a80c2a6cd21e868c8626 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Thu, 30 Jun 2022 13:06:20 +0200
Subject: [PATCH 3/3] ansible: update to 6.0.0.

---
 srcpkgs/ansible/template | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/ansible/template b/srcpkgs/ansible/template
index 4d694f2107c9..2bce297348fd 100644
--- a/srcpkgs/ansible/template
+++ b/srcpkgs/ansible/template
@@ -1,17 +1,15 @@
 # Template file for 'ansible'
 pkgname=ansible
-version=5.9.0
+version=6.0.0
 revision=1
-build_style=python3-module
-hostmakedepends="python3-setuptools"
+build_style="python3-pep517"
+hostmakedepends="python3-setuptools python3-wheel"
 depends="ansible-core"
 short_desc="Simple deployment, configuration management and execution framework"
 maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
 license="GPL-3.0-or-later"
 homepage="https://www.ansible.com/"
 distfiles="${PYPI_SITE}/a/ansible/ansible-${version}.tar.gz"
-checksum=6f2f762fca6cff0401a6d2119b8ba3b2f111ea1a93fd203c86df09bc75570f18
-# Tests are currently broken for ansible on python 3.10
-# See https://github.com/ansible/ansible/issues/74658
-# and https://github.com/ansible/ansible/issues/74660
+checksum=641a2c27bc5768f9a8ad14880f1f6e571c1f2af1d45e76f271d76e3f74754c53
+# Relevant tests happen in ansible-core
 make_check=no

  parent reply	other threads:[~2022-06-30 15:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30 11:07 [PR PATCH] " jcgruenhage
2022-06-30 12:31 ` [PR PATCH] [Updated] " jcgruenhage
2022-06-30 14:47 ` jcgruenhage
2022-06-30 15:08 ` jcgruenhage [this message]
2022-06-30 15:13 ` jcgruenhage
2022-06-30 15:29 ` jcgruenhage
2022-06-30 19:48 ` jcgruenhage
2022-06-30 21:29 ` jcgruenhage
2022-07-01  6:40 ` [PR PATCH] [Merged]: " 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=20220630150837.4-3Zi9uRpYqljyrVgQmw-2FClLjHbXwo5_XGAWsE_dg@z \
    --to=jcgruenhage@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).