File tree 6 files changed +129
-16
lines changed
6 files changed +129
-16
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,6 @@ EXTRA_DIST =
25
25
test : all-recursive
26
26
$(MAKE ) -C test/ test
27
27
28
- loadtest : all-recursive
29
- $( MAKE ) -C test/ loadtest
30
-
28
+ docker-test :
29
+ docker-compose build debian-sid
30
+ docker-compose run debian-sid
Original file line number Diff line number Diff line change 1
1
version : ' 3.7'
2
2
services :
3
- debian-test :
3
+ debian-sid :
4
4
# build and run tests in a debian sid container
5
- image : ${DOCKER_REGISTRY}/mod-tls-debian-test :0.0.1
6
- container_name : mod-tls-debian-test
5
+ image : ${DOCKER_REGISTRY}/mod-tls-debian-sid :0.0.1
6
+ container_name : mod-tls-debian-sid
7
7
build :
8
8
context : .
9
- dockerfile : docker/debian-test /Dockerfile
9
+ dockerfile : docker/debian-sid /Dockerfile
10
10
labels :
11
- - " description=mod_tls debian test server"
11
+ - " description=mod_tls debian sid server"
12
12
13
13
expose :
14
14
- " 5010"
15
15
- " 5011"
16
16
volumes :
17
- - mod-tls-debian-test-data:/abetterinternet/data
17
+ - mod-tls-debian-sid-data:/abetterinternet/data
18
+ ports :
19
+ - " 5010"
20
+ - " 5011"
21
+
22
+ ubuntu-focal :
23
+ # build and run tests in a debian sid container
24
+ image : ${DOCKER_REGISTRY}/mod-tls-ubuntu-focal:0.0.1
25
+ container_name : mod-tls-ubuntu-focal
26
+ build :
27
+ context : .
28
+ dockerfile : docker/ubuntu-focal/Dockerfile
29
+ labels :
30
+ - " description=mod_tls ubuntu-focal server"
31
+
32
+ expose :
33
+ - " 5010"
34
+ - " 5011"
35
+ volumes :
36
+ - mod-tls-ubuntu-focal-data:/abetterinternet/data
18
37
ports :
19
38
- " 5010"
20
39
- " 5011"
21
40
22
41
volumes :
23
- mod-tls-debian-test-data :
24
- name : mod-tls-debian-test-data
42
+ mod-tls-debian-sid-data :
43
+ name : mod-tls-debian-sid-data
44
+ labels :
45
+ - " description=debian sid data for mod_tls"
46
+
47
+ mod-tls-ubuntu-focal-data :
48
+ name : mod-tls-ubuntu-focal-data
25
49
labels :
26
- - " description=debian test data for mod_tls"
50
+ - " description=ubuntu-focal data for mod_tls"
27
51
28
52
53
+
Original file line number Diff line number Diff line change @@ -10,8 +10,9 @@ RUN apt-get install -y apt-listchanges \
10
10
RUN pip install pytest tqdm pycurl cryptography
11
11
12
12
RUN apt-get install -y apache2 apache2-dev libapache2-mod-md
13
+ RUN apt-get install -y cbindgen
13
14
14
- COPY docker/debian-test /bin/* /abetterinternet/bin/
15
+ COPY docker/debian-sid /bin/* /abetterinternet/bin/
15
16
COPY configure.ac Makefile.am NEWS README* AUTHORS ChangeLog COPYING LICENSE /abetterinternet/mod_tls/
16
17
COPY src /abetterinternet/mod_tls/src
17
18
COPY test/Makefile.am test/conftest.py /abetterinternet/mod_tls/test/
Original file line number Diff line number Diff line change @@ -38,9 +38,8 @@ rm -f $LOG_DIR/*
38
38
# fi
39
39
40
40
cd $DATADIR
41
- if test ! -d rustls-ffi; then
42
- git clone https://github.com/rustls/rustls-ffi.git rustls-ffi
43
- fi
41
+ rm -rf rustls-ffi
42
+ git clone https://github.com/rustls/rustls-ffi.git rustls-ffi
44
43
cd rustls-ffi
45
44
git fetch origin
46
45
git checkout tags/v0.8.2
Original file line number Diff line number Diff line change
1
+ FROM ubuntu:focal
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
+ RUN apt-get update; apt-get upgrade -y
5
+ RUN apt-get install -y apt-listchanges \
6
+ make openssl libssl-dev libcurl4 libcurl4-openssl-dev \
7
+ gcc subversion git cargo python3 iputils-ping \
8
+ libapr1-dev libaprutil1-dev libnghttp2-dev pip \
9
+ autoconf libtool libtool-bin libpcre3-dev libjansson-dev curl rsync nghttp2-client
10
+
11
+ RUN pip install pytest tqdm pycurl cryptography
12
+
13
+ RUN apt-get install -y apache2 apache2-dev libapache2-mod-md
14
+ RUN apt-get install -y cbindgen
15
+
16
+ COPY docker/ubuntu-focal/bin/* /abetterinternet/bin/
17
+ COPY configure.ac Makefile.am NEWS README* AUTHORS ChangeLog COPYING LICENSE /abetterinternet/mod_tls/
18
+ COPY src /abetterinternet/mod_tls/src
19
+ COPY test/Makefile.am test/conftest.py /abetterinternet/mod_tls/test/
20
+ COPY test/modules /abetterinternet/mod_tls/test/modules
21
+ COPY test/pyhttpd /abetterinternet/mod_tls/test/pyhttpd
22
+ COPY m4 /abetterinternet/mod_tls/m4
23
+
24
+ CMD ["/bin/bash" , "-c" , "/abetterinternet/bin/update.sh" ]
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ TOP=/abetterinternet
4
+ DATADIR=$TOP /data
5
+
6
+ fail () {
7
+ echo " $@ "
8
+ exit 1
9
+ }
10
+
11
+ needs_update () {
12
+ local ref_file=" $1 "
13
+ local check_dir=" $2 "
14
+ if test ! -f " $ref_file " ; then
15
+ return 0
16
+ fi
17
+ find " $check_dir " -type f -a -newer " $ref_file " -o -type d -name .git -prune -a -false |
18
+ while read fname; do
19
+ return 0
20
+ done
21
+ return 1
22
+ }
23
+
24
+ PREFIX=$( apxs -q exec_prefix)
25
+ if test ! -d $PREFIX ; then
26
+ fail " apache install prefix not found: $PREFIX "
27
+ fi
28
+
29
+ # remove some stuff that accumulates
30
+ LOG_DIR=$( apxs -q logfiledir)
31
+ rm -f $LOG_DIR /*
32
+
33
+ # cd $DATADIR
34
+ # if test ! -f rustup.sh.run; then
35
+ # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup.sh ||rm -f rustup.sh
36
+ # /bin/bash rustup.sh -y ||fail
37
+ # touch rustup.sh.run
38
+ # fi
39
+
40
+ cd $DATADIR
41
+ rm -rf rustls-ffi
42
+ git clone https://github.com/rustls/rustls-ffi.git rustls-ffi
43
+ cd rustls-ffi
44
+ git fetch origin
45
+ git checkout tags/v0.8.2
46
+ make install DESTDIR=$PREFIX || fail
47
+
48
+ cd " $TOP /mod_tls" || fail
49
+ if needs_update .installed . ; then
50
+ rm -f .installed
51
+ if test ! -f configure -o configure.ac -nt configure; then
52
+ autoreconf -i || fail
53
+ fi
54
+ if test ! -d Makefile -o ./configure -nt Makefile; then
55
+ ./configure || fail
56
+ touch ./configure
57
+ fi
58
+ make clean|| fail
59
+ make || fail
60
+ find .
61
+ make install || fail
62
+ touch .installed
63
+ fi
64
+ pytest
You can’t perform that action at this time.
0 commit comments