Module: check_mk
Branch: master
Commit: 8fbe7e050aaba594e61928c4a06b79021256c508
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8fbe7e050aaba5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Aug 30 10:26:08 2017 +0200
Added needed modules python-ad and dnspython for "closest DC detection"
Change-Id: Iec638d59b74a926e17c2b2bed3bcbe042edb87c6
---
omd/packages/python-modules/Makefile | 37 ++++++++++++---------
.../patches/0010-python-ad-disable-krb5.dif | 18 ++++++++++
.../python-modules/src/dnspython-1.15.0.zip | Bin 0 -> 252157 bytes
.../python-modules/src/python-ad-0.9.tar.gz | Bin 0 -> 42831 bytes
omd/packages/python-modules/src/python-ad.README | 1 +
5 files changed, 41 insertions(+), 15 deletions(-)
diff --git a/omd/packages/python-modules/Makefile b/omd/packages/python-modules/Makefile
index a91af06..71ff844 100644
--- a/omd/packages/python-modules/Makefile
+++ b/omd/packages/python-modules/Makefile
@@ -84,7 +84,11 @@ MODULES += psutil-5.2.0.tar.gz # needed for mkbench
MODULES += six-1.10.0.tar.gz
MODULES += ipaddress-1.0.18.tar.gz
+
MODULES += netifaces-0.10.6.tar.gz # needed for LDAP (nearest DC detection)
+MODULES += dnspython-1.15.0.zip # needed for LDAP (nearest DC detection)
+MODULES += python-ad-0.9.tar.gz # needed for LDAP (nearest DC detection)
+
MODULES += idna-2.5.tar.gz
ifneq ($(filter $(DISTRO_CODE),el5 lucid sles11sp1 sles11sp2 sles11sp3 sles11sp4
squeeze),)
MODULES += cryptography-1.4.tar.gz
@@ -111,21 +115,7 @@ MODULES+=paramiko-2.1.2.tar.gz
.PHONY: build check-freetds install skel clean
-build: check-python check-freetds
- mkdir -p dest
- cd dest && \
- for M in $(MODULES); do \
- echo "Unpacking $$M..." ; \
- if echo $$M | grep .tar.gz; then \
- tar xvzf ../src/$$M ; \
- else \
- unzip -o ../src/$$M ; \
- fi \
- done
- set -e ; for p in $(PATCHES) ; do \
- echo "applying $$p..." ; \
- patch -p1 -b -d dest < $$p ; \
- done
+build: check-python check-freetds unpack
set -e ; cd dest && \
mkdir -p $(TMP_INSTALL_PATH)/lib || true; \
export PYTHONPATH=$$PYTHONPATH:$(TMP_INSTALL_PATH)/lib ; \
@@ -151,6 +141,23 @@ build: check-python check-freetds
cd .. ; \
done
+unpack:
+ mkdir -p dest
+ cd dest && \
+ for M in $(MODULES); do \
+ echo "Unpacking $$M..." ; \
+ if echo $$M | grep .tar.gz; then \
+ tar xvzf ../src/$$M ; \
+ else \
+ unzip -o ../src/$$M ; \
+ fi \
+ done
+ set -e ; for p in $(PATCHES) ; do \
+ echo "applying $$p..." ; \
+ patch -p1 -b -d dest < $$p ; \
+ done
+
+
check-freetds:
@if [ ! -d ../freetds/freetds-0.95.95 ]; then \
echo "ERROR: You need to build the \"freetds\" package first" ;
\
diff --git a/omd/packages/python-modules/patches/0010-python-ad-disable-krb5.dif
b/omd/packages/python-modules/patches/0010-python-ad-disable-krb5.dif
new file mode 100644
index 0000000..5b43b5d
--- /dev/null
+++ b/omd/packages/python-modules/patches/0010-python-ad-disable-krb5.dif
@@ -0,0 +1,18 @@
+diff -Nur dest.orig/python-ad-0.9/lib/ad/protocol/krb5.py
dest/python-ad-0.9/lib/ad/protocol/krb5.py
+--- dest.orig/python-ad-0.9/lib/ad/protocol/krb5.py 1970-01-01 01:00:00.000000000 +0100
++++ dest/python-ad-0.9/lib/ad/protocol/krb5.py 2017-08-30 10:20:55.613686559 +0200
+@@ -0,0 +1 @@
++# Dummy file to disable krb5 import warning because we don't build krb5 binding.
+diff -Nur dest.orig/python-ad-0.9/setup.py dest/python-ad-0.9/setup.py
+--- dest.orig/python-ad-0.9/setup.py 2008-11-02 15:19:14.000000000 +0100
++++ dest/python-ad-0.9/setup.py 2017-08-30 10:19:13.744199717 +0200
+@@ -22,7 +22,7 @@
+ 'Programming Language :: Python'],
+ package_dir = {'': 'lib'},
+ packages = ['ad', 'ad.core', 'ad.protocol',
'ad.util'],
+- ext_modules = [Extension('ad.protocol.krb5',
['lib/ad/protocol/krb5.c'],
+- libraries=['krb5'])],
++ #ext_modules = [Extension('ad.protocol.krb5',
['lib/ad/protocol/krb5.c'],
++ # libraries=['krb5'])],
+ test_suite = 'nose.collector'
+ )
diff --git a/omd/packages/python-modules/src/dnspython-1.15.0.zip
b/omd/packages/python-modules/src/dnspython-1.15.0.zip
new file mode 100644
index 0000000..be2e7a6
Binary files /dev/null and b/omd/packages/python-modules/src/dnspython-1.15.0.zip differ
diff --git a/omd/packages/python-modules/src/python-ad-0.9.tar.gz
b/omd/packages/python-modules/src/python-ad-0.9.tar.gz
new file mode 100644
index 0000000..23a98fc
Binary files /dev/null and b/omd/packages/python-modules/src/python-ad-0.9.tar.gz differ
diff --git a/omd/packages/python-modules/src/python-ad.README
b/omd/packages/python-modules/src/python-ad.README
new file mode 100644
index 0000000..829ce59
--- /dev/null
+++ b/omd/packages/python-modules/src/python-ad.README
@@ -0,0 +1 @@
+Downloaded from
https://code.google.com/archive/p/python-ad/downloads