Date: Tuesday, April 11, 2023 @ 14:53:02
  Author: dvzrv
Revision: 1444674

upgpkg: ansible-core 2.14.4-5: Rebuild to update patch for resolvelib 
compatibility.

Also update the requirements.txt so that importlib based requests succeed later 
on.
Run ansible-test in check() (and remove libselinux based test as we don't 
package that (yet)).

Modified:
  ansible-core/trunk/PKGBUILD
  ansible-core/trunk/ansible-core-2.14.4-resolvelib_1.1.patch

------------------------------------------+
 PKGBUILD                                 |   33 ++++++++++-------------------
 ansible-core-2.14.4-resolvelib_1.1.patch |    9 +++++++
 2 files changed, 21 insertions(+), 21 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-04-11 14:41:45 UTC (rev 1444673)
+++ PKGBUILD    2023-04-11 14:53:02 UTC (rev 1444674)
@@ -9,7 +9,7 @@
 
 pkgname=ansible-core
 pkgver=2.14.4
-pkgrel=4
+pkgrel=5
 pkgdesc='Radically simple IT automation platform'
 arch=('any')
 url='https://pypi.org/project/ansible-core'
@@ -34,6 +34,7 @@
 )
 checkdepends=(
   'git'
+  'openssh'
   'python-bcrypt'
   'python-botocore'
   'python-passlib'
@@ -65,9 +66,9 @@
   "$pkgname-2.14.4-resolvelib_1.1.patch"
 )
 
sha512sums=('86164dfded15232174e4f11140a71b91ef5b0d93b40a2df9588930b4b955f20feb419258c2bbf9d6735d298ec626c88c5e9b1c933a51e3273a28b85fac7a3762'
-            
'f69bfd47c7079873c78ca795fb83826ffebfc6b5955759484c08edfd651baf0c9ef136b6df1a9bedceebd80fb26ee0f8b95b07f1fb38ee50506c65b17e2cef5a')
+            
'cdf1335d49ecec7bb4fff6b29cc0217d0dfa50ca9dc23338717bcbf807d06e7db8bb2c8037f8c613299f92d7db8733ce3e08f343dac33def3bf1612bd6e6bfca')
 
b2sums=('ae096debaf676dbd46cb047f0f87af5d09b4265368500964bbd0cf3ac8e58969bee489d66486fb570a697df5b22065fae206f1df361eb911a7fe025628655371'
-        
'87ab3cac6acdefbf265526803ace205ade1caed8a97e244a8e96d5329b1779661defb5fa0d4ebf2ebee7e2bc547a7996aa7adc82126d07d3b226ad2fd133370f')
+        
'712bc0366da99e8176bd80b7abbc2cdc3d9960911a39fedb7f1ae460577151bf13af9ca1225c28fa63c8feae30226cbc686765511459b81bc253745bf28ae246')
 
 prepare() {
   # backport (minus test requirements!) of patch to add resolvelib < 1.1.0 
support
@@ -83,26 +84,16 @@
   make docs
 }
 
-# tests don't find the ansible-core internals: 
https://github.com/ansible/ansible/issues/80472
-# check() {
-#   local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+check() {
+  local python_version=$(python -c 'import sys; print(".".join(map(str, 
sys.version_info[:2])))')
 
-#   cd $pkgname-$pkgver
-#   # install to test location
-#   # python -m installer --destdir=test_dir dist/*.whl
-#   # export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH"
-#   # export PATH="$PWD/test_dir/usr/bin:$PATH"
-#   # pytest -vv test/units/
+  # tests require upstream wrapper to find ansible-core internals: 
https://github.com/ansible/ansible/issues/80472
+  cd $pkgname-$pkgver
+  # we do not have libselinux packaged
+  rm -v test/units/module_utils/basic/test_selinux.py
+  bin/ansible-test units --python $python_version --truncate 0
+}
 
-#   # upstream test wrapper
-#   # bin/ansible-test units
-
-#   # run only locally
-#   # export PYTHONPATH="lib:$PYTHONPATH"
-#   # export PATH="bin:$PATH"
-#   # pytest -vv --ignore test/integration/ --ignore test/ansible_test/
-# }
-
 package() {
   cd $pkgname-$pkgver
   python -m installer --destdir="$pkgdir" dist/*.whl

Modified: ansible-core-2.14.4-resolvelib_1.1.patch
===================================================================
--- ansible-core-2.14.4-resolvelib_1.1.patch    2023-04-11 14:41:45 UTC (rev 
1444673)
+++ ansible-core-2.14.4-resolvelib_1.1.patch    2023-04-11 14:53:02 UTC (rev 
1444674)
@@ -19,6 +19,15 @@
  
          :param identifier: The value returned by ``identify()``.
  
+diff -ruN a/requirements.txt b/requirements.txt
+--- a/requirements.txt 2023-03-27 19:29:13.000000000 +0200
++++ b/requirements.txt 2023-04-11 16:34:09.987613705 +0200
+@@ -12,4 +12,4 @@
+ # NOTE: Ref: https://github.com/sarugaku/resolvelib/issues/69
+ # NOTE: When updating the upper bound, also update the latest version used
+ # NOTE: in the ansible-galaxy-collection test suite.
+-resolvelib >= 0.5.3, < 0.9.0  # dependency resolver used by ansible-galaxy
++resolvelib >= 0.5.3, < 1.1.0  # dependency resolver used by ansible-galaxy
 diff -ruN a/test/lib/ansible_test/_data/requirements/ansible.txt 
b/test/lib/ansible_test/_data/requirements/ansible.txt
 --- a/test/lib/ansible_test/_data/requirements/ansible.txt     2023-03-27 
19:29:13.000000000 +0200
 +++ b/test/lib/ansible_test/_data/requirements/ansible.txt     2023-04-10 
22:11:39.433634202 +0200

Reply via email to