Skip to content

Commit d724dad

Browse files
author
Dominique Quatravaux
committed
[depends] libxmlsec1, + downgradey bugware for Mac
As per xmlsec/python-xmlsec#254 (comment)
1 parent d82ccef commit d724dad

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

xaasible

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ cd "$(cd $(dirname "$0"); /bin/pwd)"
1919

2020
ensure_ansible () {
2121
if ! test -f ansible-deps-cache/.versions 2>/dev/null; then
22+
ensure_libxmlsec1
2223
curl https://raw.githubusercontent.com/epfl-si/ansible.suitcase/master/install.sh | \
2324
SUITCASE_DIR=$PWD/ansible-deps-cache \
24-
SUITCASE_PIP_EXTRA="bcrypt passlib kubernetes pyvmomi ldap3" \
25+
SUITCASE_PIP_EXTRA="bcrypt passlib kubernetes pyvmomi ldap3 python3-saml" \
2526
SUITCASE_ANSIBLE_VERSION=6.3.0 \
2627
SUITCASE_ANSIBLE_REQUIREMENTS=requirements.yml \
2728
bash -x
@@ -31,6 +32,43 @@ ensure_ansible () {
3132
ensure_ansible_runtime
3233
}
3334

35+
ensure_libxmlsec1 () {
36+
local xmlsec1_version="$(pkg-config --print-provides xmlsec1)"
37+
local macosx_downgrade_bugware_explainer="
38+
Because of some (temporary?) lack of maintenance in python-xmlsec (see
39+
https://github.com/xmlsec/python-xmlsec/issues/254 ), you have to make
40+
sure to install an older version:
41+
42+
wget -O /tmp/libxmlsec1.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/7f35e6ede954326a10949891af2dba47bbe1fc17/Formula/libxmlsec1.rb
43+
brew install --formula /tmp/libxmlsec1.rb
44+
brew pin libxmlsec1
45+
46+
"
47+
case "$xmlsec1_version" in
48+
"")
49+
cat >&2 <<'PLEASE_INSTALL_XMLSEC1'
50+
Fatal: libxmlsec1 (+ development kit) is required for python3-saml.
51+
PLEASE_INSTALL_XMLSEC1
52+
case "$(uname -s)" in
53+
Linux)
54+
echo >&2; echo >&2 'Bailing out.' ;;
55+
Darwin)
56+
echo >&2 "$macosx_downgrade_bugware_explainer" ;;
57+
esac
58+
exit 1;;
59+
60+
*"= 1.3."*)
61+
case "$(uname -s)" in
62+
Darwin)
63+
cat >&2 <<"PLEASE_DOWNGRADE_XMLSEC1"
64+
Fatal: version 1.3.x of xmlsec1 detected; please downgrade.
65+
$macosx_downgrade_bugware_explainer
66+
PLEASE_DOWNGRADE_XMLSEC1
67+
exit 1 ;;
68+
esac ;;
69+
esac
70+
}
71+
3472
ensure_oc () {
3573
oc --help > /dev/null || fatal <<'PLEASE_INSTALL_OC'
3674

0 commit comments

Comments
 (0)