# HG changeset patch # User Heiko Schlittermann # Date 1440509413 -7200 # Node ID 0d1bd8c1cf856e2c7069121d910a391e16722dd3 # Parent 06b955c7b6736f5f825e10cc3699e929e32eedf7 Major rework diff -r 06b955c7b673 -r 0d1bd8c1cf85 lib/00-useradd.docker --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/00-useradd.docker Tue Aug 25 15:30:13 2015 +0200 @@ -0,0 +1,8 @@ + +# prepare user environment for running (exim) and testing exim (eximtest) +RUN groupadd --system exim +RUN useradd --system -g exim -c 'Exim User' exim + +RUN groupadd eximtest +RUN useradd --home-dir /home/eximtest -g exim -c 'Exim Test User' -m eximtest + diff -r 06b955c7b673 -r 0d1bd8c1cf85 lib/10-copy-source.docker --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/10-copy-source.docker Tue Aug 25 15:30:13 2015 +0200 @@ -0,0 +1,12 @@ + +# add current working copy +COPY exim/ /home/eximtest/exim/ + +# add additional files +# (sudoers, Local/Makefile) +COPY platforms//root/ / + +# prepare the build - files need to be owned +# by eximtest +WORKDIR /home/eximtest +RUN chown -R eximtest: . diff -r 06b955c7b673 -r 0d1bd8c1cf85 lib/20-build-exim.docker --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/20-build-exim.docker Tue Aug 25 15:30:13 2015 +0200 @@ -0,0 +1,5 @@ +# Build Exim +USER eximtest +WORKDIR /home/eximtest/exim/src +RUN make -j -l 2 + diff -r 06b955c7b673 -r 0d1bd8c1cf85 lib/30-prepare-testsuite.docker --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/30-prepare-testsuite.docker Tue Aug 25 15:30:13 2015 +0200 @@ -0,0 +1,9 @@ +# Prepare/Build the test-suite +WORKDIR /home/eximtest/exim/test +RUN mkdir /tmp/exim +RUN echo $PWD/test-config > /tmp/exim/trusted-configs +RUN autoconf +RUN ./configure +RUN make +RUN rm -f test-config + diff -r 06b955c7b673 -r 0d1bd8c1cf85 platforms/Makefile --- a/platforms/Makefile Mon Aug 24 21:41:18 2015 +0200 +++ b/platforms/Makefile Tue Aug 25 15:30:13 2015 +0200 @@ -6,5 +6,5 @@ all: ${dockerfiles} clean: ; -rm -f ${dockerfiles} -%: %.in +%: %.in ../lib/*.docker ../scripts/din2d $< >$@ diff -r 06b955c7b673 -r 0d1bd8c1cf85 platforms/debian7-gnutls/Dockerfile.in --- a/platforms/debian7-gnutls/Dockerfile.in Mon Aug 24 21:41:18 2015 +0200 +++ b/platforms/debian7-gnutls/Dockerfile.in Tue Aug 25 15:30:13 2015 +0200 @@ -1,3 +1,4 @@ +.platform debian7-gnutls FROM debian:7 .include_if_exists ../../docker.env @@ -13,42 +14,8 @@ libpcre3-dev libgnutls-dev libssl-dev libdb5.1-dev libmysqlclient-dev libpq-dev \ libsqlite3-dev libldap2-dev libperl-dev autoconf \ sudo net-tools \ - less -RUN apt-get install --no-install-recommends -y libidn11-dev - -# prepare user environment for running (exim) and testing exim (eximtest) -RUN useradd --system -c 'Exim User' exim -RUN useradd --home-dir /home/eximtest -G exim -c 'Exim Test User' -m eximtest - -# add additional files -# (sudoers, Local/Makefile) -COPY platforms/debian7/root/ / - -# add current working copy -COPY exim/ /home/eximtest/exim/ - -# prepare the build - files need to be owned -# by eximtest -WORKDIR /home/eximtest -RUN chown -R eximtest: . + less libidn11-dev -# Build Exim -USER eximtest -WORKDIR /home/eximtest/exim/src -RUN make -j -l 1 - - -# Prepare/Build the test-suite -WORKDIR /home/eximtest/exim/test -RUN mkdir /tmp/exim -RUN echo $PWD/test-config > /tmp/exim/trusted-configs -RUN autoconf -RUN ./configure -RUN make -RUN rm -f test-config - -## now finally run the tests -## should be done by you, manually :) -# -> full hostname +.include ../../lib/*.docker ENTRYPOINT ["./runtest", "../src/build-Linux-x86_64/exim", "-FLAVOUR", "debian7"] diff -r 06b955c7b673 -r 0d1bd8c1cf85 platforms/debian7-gnutls/root/home/eximtest/exim/src/Local/Makefile --- a/platforms/debian7-gnutls/root/home/eximtest/exim/src/Local/Makefile Mon Aug 24 21:41:18 2015 +0200 +++ b/platforms/debian7-gnutls/root/home/eximtest/exim/src/Local/Makefile Tue Aug 25 15:30:13 2015 +0200 @@ -422,7 +422,7 @@ # DISABLE_PRDR=yes EXPERIMENTAL_PRDR=yes -# DISABLE_OCSP=yes +DISABLE_OCSP=yes #------------------------------------------------------------------------------ @@ -467,7 +467,7 @@ #CFLAGS += -I/usr/local/include #LDFLAGS += -lopendmarc -EXPERIMENTAL_DANE=yes +#EXPERIMENTAL_DANE=yes EXPERIMENTAL_EVENT=yes EXPERIMENTAL_CERTNAMES=yes EXPERIMENTAL_SOCKS=yes diff -r 06b955c7b673 -r 0d1bd8c1cf85 platforms/debian7-openssl/Dockerfile.in --- a/platforms/debian7-openssl/Dockerfile.in Mon Aug 24 21:41:18 2015 +0200 +++ b/platforms/debian7-openssl/Dockerfile.in Tue Aug 25 15:30:13 2015 +0200 @@ -1,3 +1,4 @@ +.platform debian7-openssl FROM debian:7 .include_if_exists ../../docker.env @@ -13,42 +14,8 @@ libpcre3-dev libgnutls-dev libssl-dev libdb5.1-dev libmysqlclient-dev libpq-dev \ libsqlite3-dev libldap2-dev libperl-dev autoconf \ sudo net-tools \ - less -RUN apt-get install --no-install-recommends -y libidn11-dev - -# prepare user environment for running (exim) and testing exim (eximtest) -RUN useradd --system -c 'Exim User' exim -RUN useradd --home-dir /home/eximtest -G exim -c 'Exim Test User' -m eximtest - -# add additional files -# (sudoers, Local/Makefile) -COPY platforms/debian7/root/ / - -# add current working copy -COPY exim/ /home/eximtest/exim/ - -# prepare the build - files need to be owned -# by eximtest -WORKDIR /home/eximtest -RUN chown -R eximtest: . + less libidn11-dev -# Build Exim -USER eximtest -WORKDIR /home/eximtest/exim/src -RUN make -j -l 1 - - -# Prepare/Build the test-suite -WORKDIR /home/eximtest/exim/test -RUN mkdir /tmp/exim -RUN echo $PWD/test-config > /tmp/exim/trusted-configs -RUN autoconf -RUN ./configure -RUN make -RUN rm -f test-config - -## now finally run the tests -## should be done by you, manually :) -# -> full hostname +.include ../../lib/*.docker ENTRYPOINT ["./runtest", "../src/build-Linux-x86_64/exim", "-FLAVOUR", "debian7"] diff -r 06b955c7b673 -r 0d1bd8c1cf85 platforms/debian8-gnutls/Dockerfile.in --- a/platforms/debian8-gnutls/Dockerfile.in Mon Aug 24 21:41:18 2015 +0200 +++ b/platforms/debian8-gnutls/Dockerfile.in Tue Aug 25 15:30:13 2015 +0200 @@ -1,6 +1,8 @@ +.platform debian8-gnutls FROM debian:8 .include_if_exists ../../docker.env + ENV DEBIAN_FRONTEND noninteractive RUN \ @@ -9,45 +11,11 @@ apt-get dist-upgrade -y && \ apt-get install --no-install-recommends -y \ git gcc make pkg-config \ - libpcre3-dev libgnutls-dev libssl-dev libdb5.3-dev libmysqlclient-dev libpq-dev \ + libpcre3-dev libgnutls28-dev libssl-dev libdb5.3-dev libmysqlclient-dev libpq-dev \ libsqlite3-dev libldap2-dev libperl-dev autoconf \ sudo net-tools \ - less -RUN apt-get install --no-install-recommends -y libidn11-dev - -# prepare user environment for running (exim) and testing exim (eximtest) -RUN useradd --system -c 'Exim User' exim -RUN useradd --home-dir /home/eximtest -G exim -c 'Exim Test User' -m eximtest - -# add additional files -# (sudoers, Local/Makefile) -COPY platforms/debian8/root/ / - -# add current working copy -COPY exim/ /home/eximtest/exim/ - -# prepare the build - files need to be owned -# by eximtest -WORKDIR /home/eximtest -RUN chown -R eximtest: . + less libidn11-dev libgcrypt-dev -# Build Exim -USER eximtest -WORKDIR /home/eximtest/exim/src -RUN make -j -l 1 - - -# Prepare/Build the test-suite -WORKDIR /home/eximtest/exim/test -RUN mkdir /tmp/exim -RUN echo $PWD/test-config > /tmp/exim/trusted-configs -RUN autoconf -RUN ./configure -RUN make -RUN rm -f test-config - -## now finally run the tests -## should be done by you, manually :) -# -> full hostname +.include ../../lib/*.docker ENTRYPOINT ["./runtest", "../src/build-Linux-x86_64/exim", "-FLAVOUR", "debian8"] diff -r 06b955c7b673 -r 0d1bd8c1cf85 platforms/debian8-gnutls/root/home/eximtest/exim/src/Local/Makefile --- a/platforms/debian8-gnutls/root/home/eximtest/exim/src/Local/Makefile Mon Aug 24 21:41:18 2015 +0200 +++ b/platforms/debian8-gnutls/root/home/eximtest/exim/src/Local/Makefile Tue Aug 25 15:30:13 2015 +0200 @@ -467,7 +467,7 @@ #CFLAGS += -I/usr/local/include #LDFLAGS += -lopendmarc -EXPERIMENTAL_DANE=yes +#EXPERIMENTAL_DANE=yes EXPERIMENTAL_EVENT=yes EXPERIMENTAL_CERTNAMES=yes EXPERIMENTAL_SOCKS=yes diff -r 06b955c7b673 -r 0d1bd8c1cf85 platforms/debian8-openssl/Dockerfile.in --- a/platforms/debian8-openssl/Dockerfile.in Mon Aug 24 21:41:18 2015 +0200 +++ b/platforms/debian8-openssl/Dockerfile.in Tue Aug 25 15:30:13 2015 +0200 @@ -1,3 +1,4 @@ +.platform debian8-openssl FROM debian:8 .include_if_exists ../../docker.env @@ -9,45 +10,11 @@ apt-get dist-upgrade -y && \ apt-get install --no-install-recommends -y \ git gcc make pkg-config \ - libpcre3-dev libgnutls-dev libssl-dev libdb5.3-dev libmysqlclient-dev libpq-dev \ + libpcre3-dev libgnutls28-dev libssl-dev libdb5.3-dev libmysqlclient-dev libpq-dev \ libsqlite3-dev libldap2-dev libperl-dev autoconf \ sudo net-tools \ - less -RUN apt-get install --no-install-recommends -y libidn11-dev - -# prepare user environment for running (exim) and testing exim (eximtest) -RUN useradd --system -c 'Exim User' exim -RUN useradd --home-dir /home/eximtest -G exim -c 'Exim Test User' -m eximtest - -# add additional files -# (sudoers, Local/Makefile) -COPY platforms/debian8/root/ / - -# add current working copy -COPY exim/ /home/eximtest/exim/ - -# prepare the build - files need to be owned -# by eximtest -WORKDIR /home/eximtest -RUN chown -R eximtest: . + less libidn11-dev libgcrypt-dev -# Build Exim -USER eximtest -WORKDIR /home/eximtest/exim/src -RUN make -j -l 1 - - -# Prepare/Build the test-suite -WORKDIR /home/eximtest/exim/test -RUN mkdir /tmp/exim -RUN echo $PWD/test-config > /tmp/exim/trusted-configs -RUN autoconf -RUN ./configure -RUN make -RUN rm -f test-config - -## now finally run the tests -## should be done by you, manually :) -# -> full hostname +.include ../../lib/*.docker ENTRYPOINT ["./runtest", "../src/build-Linux-x86_64/exim", "-FLAVOUR", "debian8"] diff -r 06b955c7b673 -r 0d1bd8c1cf85 platforms/fedora21-gnutls/Dockerfile.in --- a/platforms/fedora21-gnutls/Dockerfile.in Mon Aug 24 21:41:18 2015 +0200 +++ b/platforms/fedora21-gnutls/Dockerfile.in Tue Aug 25 15:30:13 2015 +0200 @@ -1,3 +1,4 @@ +.platform fedora21-gnutls FROM fedora:21 .include_if_exists ../../docker.env @@ -13,41 +14,8 @@ RUN yum -y install autoconf sudo less net-tools Run yum -y install perl-ExtUtils-Embed Run yum -y install libidn-devel -RUN yum -y install gnutls-devel - -# prepare user environment for running (exim) and testing exim (eximtest) -RUN useradd --system -c 'Exim User' exim -RUN useradd --home-dir /home/eximtest -G exim -c 'Exim Test User' -m eximtest - -# add additional files -# (sudoers, Local/Makefile) -COPY platforms/fedora21/root/ / - -# add current working copy -COPY exim/ /home/eximtest/exim/ - -# prepare the build - files need to be owned -# by eximtest -WORKDIR /home/eximtest -RUN chown -R eximtest: . +RUN yum -y install gnutls-devel libgcrypt-devel -# Build Exim -USER eximtest -WORKDIR /home/eximtest/exim/src -RUN make -j -l 1 - - -# Prepare/Build the test-suite -WORKDIR /home/eximtest/exim/test -RUN mkdir /tmp/exim -RUN echo $PWD/test-config > /tmp/exim/trusted-configs -RUN autoconf -RUN ./configure -RUN make -RUN rm -f test-config - -## now finally run the tests -## should be done by you, manually :) -# -> full hostname +.include ../../lib/*.docker ENTRYPOINT ["./runtest", "../src/build-Linux-x86_64/exim", "-FLAVOUR", "fedora21"] diff -r 06b955c7b673 -r 0d1bd8c1cf85 platforms/fedora21-gnutls/root/home/eximtest/exim/src/Local/Makefile --- a/platforms/fedora21-gnutls/root/home/eximtest/exim/src/Local/Makefile Mon Aug 24 21:41:18 2015 +0200 +++ b/platforms/fedora21-gnutls/root/home/eximtest/exim/src/Local/Makefile Tue Aug 25 15:30:13 2015 +0200 @@ -467,7 +467,7 @@ #CFLAGS += -I/usr/local/include #LDFLAGS += -lopendmarc -EXPERIMENTAL_DANE=yes +#EXPERIMENTAL_DANE=yes EXPERIMENTAL_EVENT=yes EXPERIMENTAL_CERTNAMES=yes EXPERIMENTAL_SOCKS=yes diff -r 06b955c7b673 -r 0d1bd8c1cf85 platforms/fedora21-openssl/Dockerfile.in --- a/platforms/fedora21-openssl/Dockerfile.in Mon Aug 24 21:41:18 2015 +0200 +++ b/platforms/fedora21-openssl/Dockerfile.in Tue Aug 25 15:30:13 2015 +0200 @@ -1,7 +1,10 @@ +.platform fedora21-openssl FROM fedora:21 .include_if_exists ../../docker.env +# do not use delta rpm because the installed +# packages in the base image may be crippled #RUN yum -y install deltarpm RUN yum -y update RUN yum -y install git gcc make @@ -11,41 +14,8 @@ RUN yum -y install autoconf sudo less net-tools Run yum -y install perl-ExtUtils-Embed Run yum -y install libidn-devel -RUN yum -y install gnutls-devel gcrypt-devel - -# prepare user environment for running (exim) and testing exim (eximtest) -RUN useradd --system -c 'Exim User' exim -RUN useradd --home-dir /home/eximtest -G exim -c 'Exim Test User' -m eximtest - -# add additional files -# (sudoers, Local/Makefile) -COPY platforms/fedora21/root/ / - -# add current working copy -COPY exim/ /home/eximtest/exim/ - -# prepare the build - files need to be owned -# by eximtest -WORKDIR /home/eximtest -RUN chown -R eximtest: . +RUN yum -y install gnutls-devel libgcrypt-devel -# Build Exim -USER eximtest -WORKDIR /home/eximtest/exim/src -RUN make -j -l 1 - - -# Prepare/Build the test-suite -WORKDIR /home/eximtest/exim/test -RUN mkdir /tmp/exim -RUN echo $PWD/test-config > /tmp/exim/trusted-configs -RUN autoconf -RUN ./configure -RUN make -RUN rm -f test-config - -## now finally run the tests -## should be done by you, manually :) -# -> full hostname +.include ../../lib/*.docker ENTRYPOINT ["./runtest", "../src/build-Linux-x86_64/exim", "-FLAVOUR", "fedora21"] diff -r 06b955c7b673 -r 0d1bd8c1cf85 platforms/opensuse-gnutls/Dockerfile.in --- a/platforms/opensuse-gnutls/Dockerfile.in Mon Aug 24 21:41:18 2015 +0200 +++ b/platforms/opensuse-gnutls/Dockerfile.in Tue Aug 25 15:30:13 2015 +0200 @@ -1,3 +1,4 @@ +.platform opensuse-gnutls FROM opensuse .include_if_exists ../../docker.env @@ -10,42 +11,9 @@ RUN zypper -n install --no-recommends sqlite-devel openldap2-devel RUN zypper -n install --no-recommends autoconf sudo less net-tools RUN zypper -n install --no-recommends libidn-devel - -# prepare user environment for running (exim) and testing exim (eximtest) -RUN groupadd --system exim -RUN useradd --system -g exim -c 'Exim User' exim -RUN groupadd eximtest -RUN useradd --home-dir /home/eximtest -g eximtest -G exim -c 'Exim Test User' -m eximtest - -# add additional files -# (sudoers, Local/Makefile) -COPY platforms/opensuse/root/ / - -# add current working copy -COPY exim/ /home/eximtest/exim/ - -# prepare the build - files need to be owned -# by eximtest -WORKDIR /home/eximtest -RUN chown -R eximtest: . +RUN zypper -n install --no-recommends gnutls-devel +RUN zypper -n install --no-recommends libgcrypt-devel -# Build Exim -USER eximtest -WORKDIR /home/eximtest/exim/src -RUN make -j -l 1 - - -# Prepare/Build the test-suite -WORKDIR /home/eximtest/exim/test -RUN mkdir /tmp/exim -RUN echo $PWD/test-config > /tmp/exim/trusted-configs -RUN autoconf -RUN ./configure -RUN make -RUN rm -f test-config - -## now finally run the tests -## should be done by you, manually :) -# -> full hostname +.include ../../lib/*.docker ENTRYPOINT ["./runtest", "../src/build-Linux-x86_64/exim", "-FLAVOUR", "opensuse"] diff -r 06b955c7b673 -r 0d1bd8c1cf85 platforms/opensuse-gnutls/root/home/eximtest/exim/src/Local/Makefile --- a/platforms/opensuse-gnutls/root/home/eximtest/exim/src/Local/Makefile Mon Aug 24 21:41:18 2015 +0200 +++ b/platforms/opensuse-gnutls/root/home/eximtest/exim/src/Local/Makefile Tue Aug 25 15:30:13 2015 +0200 @@ -467,7 +467,7 @@ #CFLAGS += -I/usr/local/include #LDFLAGS += -lopendmarc -EXPERIMENTAL_DANE=yes +#EXPERIMENTAL_DANE=yes EXPERIMENTAL_EVENT=yes EXPERIMENTAL_CERTNAMES=yes EXPERIMENTAL_SOCKS=yes diff -r 06b955c7b673 -r 0d1bd8c1cf85 platforms/opensuse-openssl/Dockerfile.in --- a/platforms/opensuse-openssl/Dockerfile.in Mon Aug 24 21:41:18 2015 +0200 +++ b/platforms/opensuse-openssl/Dockerfile.in Tue Aug 25 15:30:13 2015 +0200 @@ -1,3 +1,4 @@ +.platform opensuse-openssl FROM opensuse .include_if_exists ../../docker.env @@ -10,42 +11,8 @@ RUN zypper -n install --no-recommends sqlite-devel openldap2-devel RUN zypper -n install --no-recommends autoconf sudo less net-tools RUN zypper -n install --no-recommends libidn-devel - -# prepare user environment for running (exim) and testing exim (eximtest) -RUN groupadd --system exim -RUN useradd --system -g exim -c 'Exim User' exim -RUN groupadd eximtest -RUN useradd --home-dir /home/eximtest -g eximtest -G exim -c 'Exim Test User' -m eximtest - -# add additional files -# (sudoers, Local/Makefile) -COPY platforms/opensuse/root/ / - -# add current working copy -COPY exim/ /home/eximtest/exim/ - -# prepare the build - files need to be owned -# by eximtest -WORKDIR /home/eximtest -RUN chown -R eximtest: . +RUN zypper -n install --no-recommends libgcrypt-devel -# Build Exim -USER eximtest -WORKDIR /home/eximtest/exim/src -RUN make -j -l 1 - - -# Prepare/Build the test-suite -WORKDIR /home/eximtest/exim/test -RUN mkdir /tmp/exim -RUN echo $PWD/test-config > /tmp/exim/trusted-configs -RUN autoconf -RUN ./configure -RUN make -RUN rm -f test-config - -## now finally run the tests -## should be done by you, manually :) -# -> full hostname +.include ../../lib/*.docker ENTRYPOINT ["./runtest", "../src/build-Linux-x86_64/exim", "-FLAVOUR", "opensuse"] diff -r 06b955c7b673 -r 0d1bd8c1cf85 scripts/din2d --- a/scripts/din2d Mon Aug 24 21:41:18 2015 +0200 +++ b/scripts/din2d Tue Aug 25 15:30:13 2015 +0200 @@ -1,22 +1,49 @@ #!/usr/bin/perl # Dockerfile.in -> Dockerfile # currently just resolve .include_if_exists .. +# .include +# .platform +# use strict; use warnings; +use 5.14.0; use Cwd qw(abs_path); -use File::Basename qw(dirname); +use File::Basename qw(basename dirname); use Getopt::Long; while (<>) { - /^\.include_if_exists\s+(.+?)\s*$/ or next; - $_ = "# from $1 {{\n" . do { - my $file = abs_path(dirname($ARGV) . "/$1"); - open(my $in, '<', $file) or die "Can't open $file: $!\n"; - local $/ = undef; - <$in>; - } - . "# }}\n"; + state $platform; + + if (/^.platform\s+(\S+)\s*/) { + $platform = $1; + $_ = "# platform is $1\n"; + next; + } + + if (/^(?.include(?_if_exists)?)\s+(?.+?)\s*$/) { + $_ = "# $+{cmd} from $+{file} {{\n" . join('' => do { + my @yield; + my @files = glob abs_path(dirname($ARGV)) . "/$+{file}"; + foreach my $file (@files) { + push @yield, "# from $file\n"; + if (open(my $in, '<', $file)) { + local $/ = undef; + push @yield, <$in>; + } + else { + die "$file: $!\n" if not $+{try}; + } + } + @yield; + }) . "# }}\n"; + } + + if (//) { + die "$0:$ARGV platform not known yet!\n" + if not defined $platform; + s//$platform/g; + } } continue { print if defined;