From 898aff301c8f92ba48a528e739a288f59a8d9b18 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ou=C5=A1ek?= <brousek@ics.muni.cz>
Date: Fri, 8 Sep 2023 21:56:29 +0200
Subject: [PATCH] chore: move check_syncrepl_extended to the ldap extra

check_syncrepl_extended is now only installed when using pip install perun.proxy.utils[ldap]

BREAKING CHANGE: usage of check_syncrepl_extended now requires installing with [ldap]
---
 README.md | 19 ++++++++++++++++++-
 setup.py  |  2 +-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 43058c4..e7aaf37 100644
--- a/README.md
+++ b/README.md
@@ -77,7 +77,7 @@ All nagios scripts are located under `nagios` directory.
 
 - example:
 
-```
+```sh
 python3 check_user_logins.py
     -p /var/log/proxyaai/simplesamlphp/simplesamlphp/simplesamlphp.log
     -l 5
@@ -103,6 +103,23 @@ python3 check_user_logins.py
   python3 check_ldap.py --help
   ```
 
+### check_ldap_syncrepl
+
+- check whether an LDAP replica is up to date with the provider
+- to use this check, you must install the ldap extra:
+
+  ```sh
+  pip install perun.proxy.utils[ldap]
+  ```
+
+  and the [build prerequisites of the python-ldap library](https://www.python-ldap.org/en/latest/installing.html#build-prerequisites)
+
+- for usage run:
+
+  ```sh
+  check_ldap_syncrepl --help
+  ```
+
 ### check_privacyidea.py
 
 - check whether privacyidea is available
diff --git a/setup.py b/setup.py
index d8716af..882ef29 100644
--- a/setup.py
+++ b/setup.py
@@ -15,13 +15,13 @@ setuptools.setup(
         "beautifulsoup4~=4.12",
         "requests~=2.31",
         "PyYAML>=5.4,<7.0",
-        "check_syncrepl_extended~=2020.13",
         "check_nginx_status~=1.0",
         "pyotp~=2.9",
     ],
     extras_require={
         "ldap": [
             "ldap3~=2.9.1",
+            "check_syncrepl_extended~=2020.13",
         ],
         "postgresql": [
             "psycopg2-binary~=2.9",
-- 
GitLab