Skip to content

Commit

Permalink
[depends] libxmlsec1, + downgradey bugware for Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominique Quatravaux committed Oct 2, 2023
1 parent d87b379 commit 50bcd84
Showing 1 changed file with 48 additions and 1 deletion.
49 changes: 48 additions & 1 deletion xaasible
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ cd "$(cd $(dirname "$0"); /bin/pwd)"

ensure_ansible () {
if ! test -f ansible-deps-cache/.versions 2>/dev/null; then
ensure_libxmlsec1
curl https://raw.githubusercontent.com/epfl-si/ansible.suitcase/master/install.sh | \
SUITCASE_DIR=$PWD/ansible-deps-cache \
SUITCASE_PIP_EXTRA="bcrypt passlib kubernetes pyvmomi ldap3" \
SUITCASE_PIP_EXTRA="bcrypt passlib kubernetes pyvmomi ldap3 python3-saml" \
SUITCASE_ANSIBLE_VERSION=6.3.0 \
SUITCASE_ANSIBLE_REQUIREMENTS=requirements.yml \
bash -x
Expand All @@ -31,6 +32,52 @@ ensure_ansible () {
ensure_ansible_runtime
}

ensure_libxmlsec1 () {
local xmlsec1_version="$(pkg-config --print-provides xmlsec1)"
case "$xmlsec1_version" in
"")
cat >&2 <<'PLEASE_INSTALL_XMLSEC1'
Fatal: libxmlsec1 (+ development kit) is required for python3-saml.
PLEASE_INSTALL_XMLSEC1
case "$(uname -s)" in
Linux)
echo >&2 'Bailing out.' ; exit 1 ;;
Darwin)
cat >&2 <<'PLEASE_INSTALL_XMLSEC1_DARWIN'
Because of some (temporary?) lack of maintenance in python-xmlsec (see
https://github.com/xmlsec/python-xmlsec/issues/254 ), you have to make
sure to install an older version:
wget -O /tmp/libxmlsec1.rb "https://raw.githubusercontent.com/Homebrew/homebrew-core/7f35e6ede954326a10949891af2dba47bbe1fc17/Formula/libxmlsec1.rb
brew install --formula /tmp/libxmlsec1.rb
brew pin libxmlsec1
PLEASE_INSTALL_XMLSEC1_DARWIN
exit 1 ;;
esac ;;

*"= 1.3."*)
case "$(uname -s)" in
Darwin)
cat >&2 <<'PLEASE_DOWNGRADE_XMLSEC1'
Fatal: version 1.3.x of xmlsec1 detected; please downgrade.
Because of some (temporary?) lack of maintenance in python-xmlsec (see
https://github.com/xmlsec/python-xmlsec/issues/254 ), you have to make
sure to install an older version:
brew uninstall libxmlsec1
wget -O /tmp/libxmlsec1.rb "https://raw.githubusercontent.com/Homebrew/homebrew-core/7f35e6ede954326a10949891af2dba47bbe1fc17/Formula/libxmlsec1.rb
brew install --formula /tmp/libxmlsec1.rb
brew pin libxmlsec1
PLEASE_DOWNGRADE_XMLSEC1
exit 1 ;;
esac ;;
esac
}

ensure_oc () {
oc --help > /dev/null || fatal <<'PLEASE_INSTALL_OC'
Expand Down

0 comments on commit 50bcd84

Please sign in to comment.