4 if [ ! -d .venv
]; then
5 if [ -z "$PYTHON" ]; then
6 if [ ! -z "$(python3 --version | egrep '^Python 3.[6789]' 2>/dev/null)" ]; then
7 # found python3.6 or better
10 # until we have better Linux distribution detection.
15 virtualenv
-p ${PYTHON} .venv
20 if [ `uname -s` == Darwin
]
22 if [ ! -e /usr
/local
/opt
/curl-openssl
]
24 echo Please run
: brew
install curl-openssl
, and try again
27 export PYCURL_CURL_CONFIG
=/usr
/local
/opt
/curl-openssl
/bin
/curl-config
28 export LDFLAGS
=-L/usr
/local
/opt
/openssl
/lib
29 export CPPFLAGS
=-I/usr
/local
/opt
/openssl
/include
32 pip
install -r requirements.txt
34 protoc
-I=..
/pdns
/ --python_out=. ..
/pdns
/dnsmessage.proto
35 protoc
-I=..
/pdns
/ --python_out=. ..
/pdns
/dnstap.proto
39 if [ -z "${DNSDISTBIN}" ]; then
40 DNSDISTBIN
=$
(ls ..
/pdns
/dnsdistdist
/dnsdist-
*/dnsdist
)
45 if [ "${PDNS_DEBUG}" = "YES" ]; then
49 rm -f ca.key ca.pem ca.srl server.csr server.key server.pem server.chain
53 openssl req
-new -x509 -days 1 -extensions v3_ca
-keyout ca.key
-out ca.pem
-nodes -config configCA.conf
54 # Generate a new server certificate request
55 openssl req
-new -newkey rsa
:2048 -nodes -keyout server.key
-out server.csr
-config configServer.conf
56 # Sign the server cert
57 openssl x509
-req -days 1 -CA ca.pem
-CAkey ca.key
-CAcreateserial -in server.csr
-out server.pem
59 cat server.pem ca.pem
> server.chain
61 if ! nosetests
--with-xunit $@
; then
62 for log
in configs
/*.log
; do
69 rm ca.key ca.pem ca.srl server.csr server.key server.pem server.chain