Browse Source

n/ansible: Upgraded to ansible-2.9.0.

current-20191101
Damien Goutte-Gattat 2 years ago
parent
commit
aefa48401b
  1. 39
      n/ansible/ansible-2.3.1.0-htpasswd.diff
  2. 1
      n/ansible/ansible-2.3.1.0.tar.gz.sha256
  3. 1
      n/ansible/ansible-2.9.0.tar.gz.sha256
  4. 27
      n/ansible/ansible.SlackBuild

39
n/ansible/ansible-2.3.1.0-htpasswd.diff

@ -1,39 +0,0 @@
diff -Naur ansible-2.3.1.0.orig/lib/ansible/modules/web_infrastructure/htpasswd.py ansible-2.3.1.0/lib/ansible/modules/web_infrastructure/htpasswd.py
--- ansible-2.3.1.0.orig/lib/ansible/modules/web_infrastructure/htpasswd.py 2017-06-01 19:00:05.000000000 +0200
+++ ansible-2.3.1.0/lib/ansible/modules/web_infrastructure/htpasswd.py 2017-06-18 19:43:28.946363735 +0200
@@ -104,7 +104,7 @@
import os
import tempfile
-from distutils.version import StrictVersion
+from distutils.version import LooseVersion
try:
from passlib.apache import HtpasswdFile, htpasswd_context
@@ -138,7 +138,7 @@
if check_mode:
return ("Create %s" % dest, True)
create_missing_directories(dest)
- if StrictVersion(passlib.__version__) >= StrictVersion('1.6'):
+ if LooseVersion(passlib.__version__) >= LooseVersion('1.6'):
ht = HtpasswdFile(dest, new=True, default_scheme=crypt_scheme, context=context)
else:
ht = HtpasswdFile(dest, autoload=False, default=crypt_scheme, context=context)
@@ -149,7 +149,7 @@
ht.save()
return ("Created %s and added %s" % (dest, username), True)
else:
- if StrictVersion(passlib.__version__) >= StrictVersion('1.6'):
+ if LooseVersion(passlib.__version__) >= LooseVersion('1.6'):
ht = HtpasswdFile(dest, new=False, default_scheme=crypt_scheme, context=context)
else:
ht = HtpasswdFile(dest, default=crypt_scheme, context=context)
@@ -176,7 +176,7 @@
""" Ensures user is absent
Returns (msg, changed) """
- if StrictVersion(passlib.__version__) >= StrictVersion('1.6'):
+ if LooseVersion(passlib.__version__) >= LooseVersion('1.6'):
ht = HtpasswdFile(dest, new=False)
else:
ht = HtpasswdFile(dest)

1
n/ansible/ansible-2.3.1.0.tar.gz.sha256

@ -1 +0,0 @@
cd4b8f53720fcd0c351156b840fdd15ecfbec22c951b5406ec503de49d40b9f5 ansible-2.3.1.0.tar.gz

1
n/ansible/ansible-2.9.0.tar.gz.sha256

@ -0,0 +1 @@
9f9a9ace1d63cd8a4692ab6ee6ed04823743f1bd339a6ef188860c02cf7f46f1 ansible-2.9.0.tar.gz

27
n/ansible/ansible.SlackBuild

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2015,2016,2017 Damien Goutte-Gattat
# Copyright (C) 2015,2016,2017,2019 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -24,11 +24,11 @@
#
# Latest ansible sourcecode is available at: <http://ansible.com/>.
#
# Depends: l/jinja2, l/python-yaml, l/pycryptodome
# Depends: l/jinja2, l/python-cryptography, l/pyyaml
# Source package infos
NAMESRC=${NAMESRC:-ansible}
VERSION=${VERSION:-2.3.1.0}
VERSION=${VERSION:-2.9.0}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-http://releases.ansible.com/ansible/$ARCHIVE}
@ -69,23 +69,22 @@ cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
# Fix version comparison for latest htpasswd
patch -p 1 < $CWD/ansible-2.3.1.0-htpasswd.diff
python setup.py build
python setup.py install --root=$PKG
# We install the Python modules both for Python 2 and Python 3,
# but we only install the -3.7 executable scripts.
python2 setup.py build
python2 setup.py install --root=$PKG
python3 setup.py build
python3 setup.py install --root=$PKG
# Install and compress man pages
make docs
mkdir -p $PKG/usr/man/man1
for man in docs/man/man1/*.1 ; do
gzip -9 -c $man > $PKG/usr/man/man1/$(basename $man).gz
done
# Install the documentation
mkdir -p $PKG/usr/doc/$NAMESRC-$VERSION
install -m 644 CHANGELOG.md COPYING PKG-INFO README.md $PKG/usr/doc/$NAME
mkdir -p $PKG/usr/doc/$NAME
install -m 644 COPYING README.rst $PKG/usr/doc/$NAME
# Install configuration files
mkdir -p $PKG/etc/ansible
@ -99,8 +98,8 @@ install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh
# Add dependency infos
cat <<EOF > $PKG/install/slack-required
jinja2
python-yaml
pycrypto
python-cryptography
pyyaml
EOF
# Package the tree

Loading…
Cancel
Save