diff options
Diffstat (limited to 'coin/provisioning/common/shared/testserver')
25 files changed, 195 insertions, 211 deletions
diff --git a/coin/provisioning/common/shared/testserver/apache2/Dockerfile b/coin/provisioning/common/shared/testserver/apache2/Dockerfile index b39eb21e..c3dc5d59 100644 --- a/coin/provisioning/common/shared/testserver/apache2/Dockerfile +++ b/coin/provisioning/common/shared/testserver/apache2/Dockerfile @@ -1,7 +1,8 @@ -FROM ubuntu:16.04 -ARG packages="apache2 libcgi-session-perl wget avahi-daemon" +FROM qt_ubuntu_16.04 +ARG packages="avahi-daemon apache2 libcgi-session-perl" RUN apt-get update && apt-get install -y $packages && dpkg -l $packages EXPOSE 80 443 # install configurations and test data -RUN wget https://tools.ietf.org/rfc/rfc3252.txt + +COPY rfc3252.txt . diff --git a/coin/provisioning/common/shared/testserver/apache2_18.04/Dockerfile b/coin/provisioning/common/shared/testserver/apache2_18.04/Dockerfile index dff9fe43..1a629c47 100644 --- a/coin/provisioning/common/shared/testserver/apache2_18.04/Dockerfile +++ b/coin/provisioning/common/shared/testserver/apache2_18.04/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 -ARG packages="apache2 libcgi-session-perl avahi-daemon" +FROM qt_ubuntu_18.04 +ARG packages="avahi-daemon apache2 libcgi-session-perl" RUN apt-get update && apt-get install -y $packages && dpkg -l $packages EXPOSE 80 443 diff --git a/coin/provisioning/common/shared/testserver/californium/Dockerfile b/coin/provisioning/common/shared/testserver/californium/Dockerfile index 90722510..81d27f9b 100644 --- a/coin/provisioning/common/shared/testserver/californium/Dockerfile +++ b/coin/provisioning/common/shared/testserver/californium/Dockerfile @@ -1,15 +1,15 @@ -FROM ubuntu:18.04 - -RUN apt-get update && apt-get -y install git maven default-jdk avahi-daemon - -RUN mkdir -p /root/src/ +FROM qt_ubuntu_18.04 +ARG packages="avahi-daemon maven default-jdk patch" +RUN apt-get update && apt-get -y install $packages # Get californium-based CoAP test server WORKDIR /root/src -RUN git clone https://github.com/selart/californium.git +ADD californium-*.tar.gz . +RUN mv californium-* californium WORKDIR /root/src/californium +ADD qt_changes.patch ./ +RUN patch -p1 < qt_changes.patch RUN mvn clean install -q -DskipTests - WORKDIR / EXPOSE 5683/udp 5684/udp diff --git a/coin/provisioning/common/shared/testserver/californium/qt_changes.patch b/coin/provisioning/common/shared/testserver/californium/qt_changes.patch new file mode 100644 index 00000000..732c0daa --- /dev/null +++ b/coin/provisioning/common/shared/testserver/californium/qt_changes.patch @@ -0,0 +1,43 @@ +diff -ruN californium_3.8.0/demo-apps/cf-plugtest-server/src/main/java/org/eclipse/californium/plugtests/PlugtestServer.java californium/demo-apps/cf-plugtest-server/src/main/java/org/eclipse/californium/plugtests/PlugtestServer.java +--- californium_3.8.0/demo-apps/cf-plugtest-server/src/main/java/org/eclipse/californium/plugtests/PlugtestServer.java 2023-07-21 11:16:21.142201240 +0200 ++++ californium/demo-apps/cf-plugtest-server/src/main/java/org/eclipse/californium/plugtests/PlugtestServer.java 2023-07-21 11:16:51.074210378 +0200 +@@ -100,6 +100,14 @@ + import org.eclipse.californium.unixhealth.NetSocketHealthLogger; + import org.eclipse.californium.unixhealth.NetStatLogger; + ++import org.eclipse.californium.scandium.DTLSConnector; ++import org.eclipse.californium.scandium.config.DtlsConnectorConfig; ++import org.eclipse.californium.scandium.dtls.pskstore.AdvancedSinglePskStore; ++import org.eclipse.californium.core.network.CoapEndpoint; ++ ++import java.net.InetSocketAddress; ++import java.net.InetAddress; ++ + import picocli.CommandLine; + import picocli.CommandLine.ArgGroup; + import picocli.CommandLine.Command; +@@ -437,7 +445,23 @@ + // server.addEndpoint(new CoAPEndpoint(new InetSocketAddress("127.0.0.1", port))); + // server.addEndpoint(new CoAPEndpoint(new InetSocketAddress("2a01:c911:0:2010::10", port))); + // server.addEndpoint(new CoAPEndpoint(new InetSocketAddress("10.200.1.2", port))); +- server.addEndpoints(config); ++ // server.addEndpoints(config); ++ ++ CoapEndpoint.Builder endpointBuilder = new CoapEndpoint.Builder(); ++ endpointBuilder.setPort(5683); ++ server.addEndpoint(endpointBuilder.build()); ++ ++ AdvancedSinglePskStore pskStore = new AdvancedSinglePskStore("Client_identity", "secretPSK".getBytes()); ++ ++ DtlsConnectorConfig.Builder builder = new DtlsConnectorConfig.Builder(new Configuration()); ++ builder.setAddress(new InetSocketAddress(5684)); ++ builder.setAdvancedPskStore(pskStore); ++ DTLSConnector dtlsConnector = new DTLSConnector(builder.build()); ++ ++ endpointBuilder = new CoapEndpoint.Builder(); ++ endpointBuilder.setConnector(dtlsConnector); ++ server.addEndpoint(endpointBuilder.build()); ++ + if (server.getEndpoints().isEmpty()) { + System.err.println("no endpoint available!"); + System.exit(ERR_INIT_FAILED); diff --git a/coin/provisioning/common/shared/testserver/cyrus/Dockerfile b/coin/provisioning/common/shared/testserver/cyrus/Dockerfile index 55486175..4708ef5b 100644 --- a/coin/provisioning/common/shared/testserver/cyrus/Dockerfile +++ b/coin/provisioning/common/shared/testserver/cyrus/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:16.04 -ARG packages="cyrus-imapd avahi-daemon" +FROM qt_ubuntu_16.04 +ARG packages="avahi-daemon cyrus-imapd" RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y $packages && dpkg -l $packages EXPOSE 143 993 diff --git a/coin/provisioning/common/shared/testserver/cyrus_18.04/Dockerfile b/coin/provisioning/common/shared/testserver/cyrus_18.04/Dockerfile index 2e525ec6..c20ed4f9 100644 --- a/coin/provisioning/common/shared/testserver/cyrus_18.04/Dockerfile +++ b/coin/provisioning/common/shared/testserver/cyrus_18.04/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 -ARG packages="cyrus-imapd avahi-daemon" +FROM qt_ubuntu_18.04 +ARG packages="avahi-daemon cyrus-imapd" RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y $packages && dpkg -l $packages EXPOSE 143 993 diff --git a/coin/provisioning/common/shared/testserver/danted/Dockerfile b/coin/provisioning/common/shared/testserver/danted/Dockerfile index 67c1159b..0d3ca461 100644 --- a/coin/provisioning/common/shared/testserver/danted/Dockerfile +++ b/coin/provisioning/common/shared/testserver/danted/Dockerfile @@ -1,8 +1,9 @@ -FROM ubuntu:16.04 -ARG packages="gdebi-core wget avahi-daemon" +FROM qt_ubuntu_16.04 +ARG packages="avahi-daemon" RUN apt-get update && apt-get install -y $packages && dpkg -l $packages -RUN wget http://ppa.launchpad.net/dajhorn/dante/ubuntu/pool/main/d/dante/dante-server_1.4.1-1_amd64.deb -RUN gdebi -n dante-server_1.4.1-1_amd64.deb +COPY dante-server_1.4.1-1_amd64.deb . +RUN apt -y install ./dante-server_1.4.1-1_amd64.deb \ + && rm -f ./dante-server_1.4.1-1_amd64.deb EXPOSE 1080-1081 # install configurations and test data diff --git a/coin/provisioning/common/shared/testserver/danted_18.04/Dockerfile b/coin/provisioning/common/shared/testserver/danted_18.04/Dockerfile index f48794af..ba732bff 100644 --- a/coin/provisioning/common/shared/testserver/danted_18.04/Dockerfile +++ b/coin/provisioning/common/shared/testserver/danted_18.04/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 -ARG packages="dante-server avahi-daemon" +FROM qt_ubuntu_18.04 +ARG packages="avahi-daemon dante-server" RUN apt-get update && apt-get install -y $packages && dpkg -l $packages EXPOSE 1080-1081 diff --git a/coin/provisioning/common/shared/testserver/docker_images.sh b/coin/provisioning/common/shared/testserver/docker_images.sh index 1d467f7b..e4782a72 100755 --- a/coin/provisioning/common/shared/testserver/docker_images.sh +++ b/coin/provisioning/common/shared/testserver/docker_images.sh @@ -1,45 +1,14 @@ #!/usr/bin/env bash +# Copyright (C) 2019 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -############################################################################# -## -## Copyright (C) 2019 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ -## -## This file is part of the provisioning scripts of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL21$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see http://www.qt.io/terms-conditions. For further -## information use the contact form at http://www.qt.io/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 2.1 or version 3 as published by the Free -## Software Foundation and appearing in the file LICENSE.LGPLv21 and -## LICENSE.LGPLv3 included in the packaging of this file. Please review the -## following information to ensure the GNU Lesser General Public License -## requirements will be met: https://www.gnu.org/licenses/lgpl.html and -## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -## -## As a special exception, The Qt Company gives you certain additional -## rights. These rights are described in The Qt Company LGPL Exception -## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -## -## $QT_END_LICENSE$ -## -############################################################################# - -set -ex - -[ -x "$(command -v realpath)" ] && FILE=$(realpath ${BASH_SOURCE[0]}) || FILE=${BASH_SOURCE[0]} -case $FILE in - */*) SERVER_PATH="${FILE%/*}" ;; - *) SERVER_PATH="." ;; -esac +set -e + +PROVISIONING_DIR="$(dirname "$0")/../../../" +# shellcheck source=../../../common/unix/common.sourced.sh +source "$PROVISIONING_DIR"/common/unix/common.sourced.sh +# shellcheck source=../../../common/unix/DownloadURL.sh +source "$PROVISIONING_DIR"/common/unix/DownloadURL.sh # Sort files by their SHA-1, and then return the accumulated result sha1tree () { @@ -47,24 +16,81 @@ sha1tree () { [ -x "$(command -v sha1sum)" ] || SHASUM=shasum find "$@" -type f -print0 | \ - xargs -0 ${SHASUM-sha1sum} | cut -d ' ' -f 1 | \ - sort | ${SHASUM-sha1sum} | cut -d ' ' -f 1 + xargs -0 "${SHASUM-sha1sum}" | cut -d ' ' -f 1 | \ + sort | "${SHASUM-sha1sum}" | cut -d ' ' -f 1 } -# A tag labels a specific image version. In the docker compose file -# (docker-compose.yml) that launches the containers, the tag used is -# "latest". Here the images are also tagged with the SHA1 of each server -# context, so if needed we can modify docker-compose.yml to launch a very -# specific image, thus providing a way to stage backwards-incompatible changes -# across repositories. + +SERVER_PATH="$PROVISIONING_DIR/common/shared/testserver" source "$SERVER_PATH/settings.sh" + +# Download all necessary dependencies outside of the dockerfiles, so that we +# can use provisioning functionality for cached and verified downloads. In the +# dockerfiles we just do COPY to put them where needed. + +echo 'Downloading support files for the docker images' + +DownloadURL \ + http://ci-files01-hki.ci.qt.io/input/docker/rfc3252.txt \ + https://tools.ietf.org/rfc/rfc3252.txt \ + 50c323dedce95e4fdc2db35cd1b8ebf9d74711bf5296ef438b88d186d7dd082d +cp rfc3252.txt "$SERVER_PATH/vsftpd/" +cp rfc3252.txt "$SERVER_PATH/apache2/" + +DownloadURL \ + http://ci-files01-hki.ci.qt.io/input/docker/dante-server_1.4.1-1_amd64.deb \ + http://ppa.launchpad.net/dajhorn/dante/ubuntu/pool/main/d/dante/dante-server_1.4.1-1_amd64.deb \ + 674a06f356cebd92c64920cec38a6687650a6f880198fbbad05aaaccca5c0a21 +mv dante-server_1.4.1-1_amd64.deb "$SERVER_PATH/danted/" + +DownloadURL \ + http://ci-files01-hki.ci.qt.io/input/docker/FreeCoAP-0.7.tar.gz \ + https://github.com/keith-cullen/FreeCoAP/archive/v0.7.tar.gz \ + fa6602e27dc8eaee6e34ff53400c0519da0c5c7cd47bf6f13acb564f52a693ee \ + FreeCoAP-0.7.tar.gz +mv FreeCoAP-0.7.tar.gz "$SERVER_PATH/freecoap/" + +# Eclipse Californium 3.8.0, requires to apply a custom patch from +# $SERVER_PATH/californium/ before usage +DownloadURL \ + http://ci-files01-hki.ci.qt.io/input/docker/californium-3.8.0.tar.gz \ + https://github.com/eclipse-californium/californium/archive/refs/tags/3.8.0.tar.gz \ + 24f8ca393f26c922739462e4586b8ced1ff75f99bfa795defa34a967b5a4a5a0 \ + californium-3.8.0.tar.gz +mv californium-3.8.0.tar.gz "$SERVER_PATH/californium/" + + +echo 'Building the docker images...' + +# Build the 2 base layers: qt_ubuntu_1604, qt_ubuntu_1804. +# These are the base for all other docker images. +for image in qt_ubuntu_16.04 qt_ubuntu_18.04 +do + docker build -t $image \ + --build-arg COIN_RUNS_IN_QT_COMPANY="$COIN_RUNS_IN_QT_COMPANY" \ + "$SERVER_PATH/$image" +done + + for server in $testserver do + + # We label each docker image with `-t name:tag`. + # A tag labels a specific image version. In the docker compose file + # (docker-compose.yml) that launches the containers, the tag used is + # "latest". Here the images are additionally tagged with the SHA1 of each + # image directory (context), so that if needed we can modify + # docker-compose.yml and modify "latest" to a SHA in order to launch a + # very specific image, thus providing a way to stage + # backwards-incompatible changes across repositories. + context="$SERVER_PATH/$server" - tag=$(sha1tree $context) - docker build -t qt-test-server-$server:$tag -t qt-test-server-$server:latest $context + tag=$(sha1tree "$context") + docker build -t "qt-test-server-$server:latest" \ + -t "qt-test-server-$server:$tag" \ + "$context" done docker images diff --git a/coin/provisioning/common/shared/testserver/docker_machine.sh b/coin/provisioning/common/shared/testserver/docker_machine.sh index 8d791074..9abf0caa 100755 --- a/coin/provisioning/common/shared/testserver/docker_machine.sh +++ b/coin/provisioning/common/shared/testserver/docker_machine.sh @@ -1,53 +1,22 @@ #!/usr/bin/env bash - -############################################################################# -## -## Copyright (C) 2019 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ -## -## This file is part of the provisioning scripts of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL21$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see http://www.qt.io/terms-conditions. For further -## information use the contact form at http://www.qt.io/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 2.1 or version 3 as published by the Free -## Software Foundation and appearing in the file LICENSE.LGPLv21 and -## LICENSE.LGPLv3 included in the packaging of this file. Please review the -## following information to ensure the GNU Lesser General Public License -## requirements will be met: https://www.gnu.org/licenses/lgpl.html and -## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -## -## As a special exception, The Qt Company gives you certain additional -## rights. These rights are described in The Qt Company LGPL Exception -## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -## -## $QT_END_LICENSE$ -## -############################################################################# +# Copyright (C) 2019 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only set -ex TestMachine='qt-test-server' # Deploy docker virtual machine (Boot2Docker) into VirtualBox only if it doesn't exist -if [ -z $(docker-machine ls -q --filter "name=$TestMachine") ] +if [ -z "$(docker-machine ls -q --filter "name=$TestMachine")" ] then - docker-machine create $@ $TestMachine - docker-machine ip $TestMachine + docker-machine create "$@" "$TestMachine" + docker-machine ip "$TestMachine" else # Otherwise, start the docker machine and update with new TLS certificates. - docker-machine start $TestMachine && docker-machine regenerate-certs -f $TestMachine + docker-machine start "$TestMachine" && docker-machine regenerate-certs -f "$TestMachine" fi # Switch the docker engine to $TestMachine -eval $(docker-machine env $TestMachine) +eval "$(docker-machine env "$TestMachine")" docker-machine ls diff --git a/coin/provisioning/common/shared/testserver/docker_testserver.sh b/coin/provisioning/common/shared/testserver/docker_testserver.sh index 3a7c87e8..7e743a80 100755 --- a/coin/provisioning/common/shared/testserver/docker_testserver.sh +++ b/coin/provisioning/common/shared/testserver/docker_testserver.sh @@ -1,41 +1,10 @@ #!/usr/bin/env bash - -############################################################################# -## -## Copyright (C) 2019 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ -## -## This file is part of the provisioning scripts of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL21$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see http://www.qt.io/terms-conditions. For further -## information use the contact form at http://www.qt.io/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 2.1 or version 3 as published by the Free -## Software Foundation and appearing in the file LICENSE.LGPLv21 and -## LICENSE.LGPLv3 included in the packaging of this file. Please review the -## following information to ensure the GNU Lesser General Public License -## requirements will be met: https://www.gnu.org/licenses/lgpl.html and -## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -## -## As a special exception, The Qt Company gives you certain additional -## rights. These rights are described in The Qt Company LGPL Exception -## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -## -## $QT_END_LICENSE$ -## -############################################################################# +# Copyright (C) 2019 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only set -ex -[ -x "$(command -v realpath)" ] && FILE=$(realpath ${BASH_SOURCE[0]}) || FILE=${BASH_SOURCE[0]} +[ -x "$(command -v realpath)" ] && FILE=$(realpath "${BASH_SOURCE[0]}") || FILE="${BASH_SOURCE[0]}" case $FILE in */*) SERVER_PATH="${FILE%/*}" ;; *) SERVER_PATH="." ;; @@ -54,4 +23,4 @@ esac docker info # Create images -$SERVER_PATH/docker_images.sh +"$SERVER_PATH/docker_images.sh" diff --git a/coin/provisioning/common/shared/testserver/echo/Dockerfile b/coin/provisioning/common/shared/testserver/echo/Dockerfile index 653ca714..a20419c6 100644 --- a/coin/provisioning/common/shared/testserver/echo/Dockerfile +++ b/coin/provisioning/common/shared/testserver/echo/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:16.04 -ARG packages="xinetd avahi-daemon" +FROM qt_ubuntu_16.04 +ARG packages="avahi-daemon xinetd" RUN apt-get update && apt-get install -y $packages && dpkg -l $packages EXPOSE 7 7/UDP 13 diff --git a/coin/provisioning/common/shared/testserver/echo_18.04/Dockerfile b/coin/provisioning/common/shared/testserver/echo_18.04/Dockerfile index 37f488cb..e86357a2 100644 --- a/coin/provisioning/common/shared/testserver/echo_18.04/Dockerfile +++ b/coin/provisioning/common/shared/testserver/echo_18.04/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 -ARG packages="xinetd avahi-daemon" +FROM qt_ubuntu_18.04 +ARG packages="avahi-daemon xinetd" RUN apt-get update && apt-get install -y $packages && dpkg -l $packages EXPOSE 7 7/UDP 13 diff --git a/coin/provisioning/common/shared/testserver/freecoap/Dockerfile b/coin/provisioning/common/shared/testserver/freecoap/Dockerfile index 2c665bd5..7b2a27a7 100644 --- a/coin/provisioning/common/shared/testserver/freecoap/Dockerfile +++ b/coin/provisioning/common/shared/testserver/freecoap/Dockerfile @@ -1,20 +1,14 @@ -FROM ubuntu:18.04 +FROM qt_ubuntu_18.04 +ARG packages="avahi-daemon autoconf automake libtool make libgnutls28-dev" +RUN apt-get update && apt-get -y install $packages -RUN apt-get update && apt-get -y install git avahi-daemon autoconf automake libtool make libgnutls28-dev - -RUN mkdir -p /root/src/ - -# Get FreeCoAP test server WORKDIR /root/src -RUN git clone https://github.com/keith-cullen/FreeCoAP.git +ADD FreeCoAP-*.tar.gz . +RUN mv FreeCoAP-* FreeCoAP WORKDIR /root/src/FreeCoAP -RUN autoreconf --install -RUN ./configure +RUN autoreconf --install && ./configure && make && make install +WORKDIR sample/time_server RUN make -RUN make install -WORKDIR /root/src/FreeCoAP/sample/time_server -RUN make - WORKDIR / EXPOSE 5685/udp diff --git a/coin/provisioning/common/shared/testserver/ftp-proxy/Dockerfile b/coin/provisioning/common/shared/testserver/ftp-proxy/Dockerfile index c719c1eb..de3e5b86 100644 --- a/coin/provisioning/common/shared/testserver/ftp-proxy/Dockerfile +++ b/coin/provisioning/common/shared/testserver/ftp-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:16.04 -ARG packages="ftp-proxy avahi-daemon" +FROM qt_ubuntu_16.04 +ARG packages="avahi-daemon ftp-proxy" RUN apt-get update && apt-get install -y $packages && dpkg -l $packages EXPOSE 2121 diff --git a/coin/provisioning/common/shared/testserver/ftp-proxy_18.04/Dockerfile b/coin/provisioning/common/shared/testserver/ftp-proxy_18.04/Dockerfile index 0e7146ba..383ba140 100644 --- a/coin/provisioning/common/shared/testserver/ftp-proxy_18.04/Dockerfile +++ b/coin/provisioning/common/shared/testserver/ftp-proxy_18.04/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 -ARG packages="ftp-proxy avahi-daemon" +FROM qt_ubuntu_18.04 +ARG packages="avahi-daemon ftp-proxy" RUN apt-get update && apt-get install -y $packages && dpkg -l $packages EXPOSE 2121 diff --git a/coin/provisioning/common/shared/testserver/iptables/Dockerfile b/coin/provisioning/common/shared/testserver/iptables/Dockerfile index cbee61d4..1c2a4b4d 100644 --- a/coin/provisioning/common/shared/testserver/iptables/Dockerfile +++ b/coin/provisioning/common/shared/testserver/iptables/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:16.04 -ARG packages="iptables avahi-daemon" +FROM qt_ubuntu_16.04 +ARG packages="avahi-daemon iptables" RUN apt-get update && apt-get install -y $packages && dpkg -l $packages EXPOSE 1357 diff --git a/coin/provisioning/common/shared/testserver/iptables_18.04/Dockerfile b/coin/provisioning/common/shared/testserver/iptables_18.04/Dockerfile index 5865e9c8..49b277c7 100644 --- a/coin/provisioning/common/shared/testserver/iptables_18.04/Dockerfile +++ b/coin/provisioning/common/shared/testserver/iptables_18.04/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 -ARG packages="iptables avahi-daemon" +FROM qt_ubuntu_18.04 +ARG packages="avahi-daemon iptables" RUN apt-get update && apt-get install -y $packages && dpkg -l $packages EXPOSE 1357 diff --git a/coin/provisioning/common/shared/testserver/qt_ubuntu_16.04/Dockerfile b/coin/provisioning/common/shared/testserver/qt_ubuntu_16.04/Dockerfile new file mode 100644 index 00000000..a9c8b9ef --- /dev/null +++ b/coin/provisioning/common/shared/testserver/qt_ubuntu_16.04/Dockerfile @@ -0,0 +1,5 @@ +FROM ubuntu:16.04 +ARG COIN_RUNS_IN_QT_COMPANY +RUN test x"$COIN_RUNS_IN_QT_COMPANY" = xtrue \ + && sed -i 's;\(archive\|security\)\.ubuntu\.com;repo-clones.ci.qt.io/apt-mirror/mirror;' /etc/apt/sources.list \ + || echo "Internal package repository not found. Using public repositories." diff --git a/coin/provisioning/common/shared/testserver/qt_ubuntu_18.04/Dockerfile b/coin/provisioning/common/shared/testserver/qt_ubuntu_18.04/Dockerfile new file mode 100644 index 00000000..f62a29c6 --- /dev/null +++ b/coin/provisioning/common/shared/testserver/qt_ubuntu_18.04/Dockerfile @@ -0,0 +1,5 @@ +FROM ubuntu:18.04 +ARG COIN_RUNS_IN_QT_COMPANY +RUN test x"$COIN_RUNS_IN_QT_COMPANY" = xtrue \ + && sed -i 's;\(archive\|security\)\.ubuntu\.com;repo-clones.ci.qt.io/apt-mirror/mirror;' /etc/apt/sources.list \ + || echo "Internal package repository not found. Using public repositories." diff --git a/coin/provisioning/common/shared/testserver/settings.sh b/coin/provisioning/common/shared/testserver/settings.sh index 27832773..03276eeb 100644..100755 --- a/coin/provisioning/common/shared/testserver/settings.sh +++ b/coin/provisioning/common/shared/testserver/settings.sh @@ -1,35 +1,6 @@ -############################################################################# -## -## Copyright (C) 2019 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ -## -## This file is part of the provisioning scripts of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL21$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see http://www.qt.io/terms-conditions. For further -## information use the contact form at http://www.qt.io/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 2.1 or version 3 as published by the Free -## Software Foundation and appearing in the file LICENSE.LGPLv21 and -## LICENSE.LGPLv3 included in the packaging of this file. Please review the -## following information to ensure the GNU Lesser General Public License -## requirements will be met: https://www.gnu.org/licenses/lgpl.html and -## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -## -## As a special exception, The Qt Company gives you certain additional -## rights. These rights are described in The Qt Company LGPL Exception -## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -## -## $QT_END_LICENSE$ -## -############################################################################# +#!/usr/bin/env bash +# Copyright (C) 2019 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only set -ex diff --git a/coin/provisioning/common/shared/testserver/squid/Dockerfile b/coin/provisioning/common/shared/testserver/squid/Dockerfile index f0ed68b3..330d3929 100644 --- a/coin/provisioning/common/shared/testserver/squid/Dockerfile +++ b/coin/provisioning/common/shared/testserver/squid/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:16.04 -ARG packages="squid avahi-daemon" +FROM qt_ubuntu_16.04 +ARG packages="avahi-daemon squid" RUN apt-get update && apt-get install -y $packages && dpkg -l $packages EXPOSE 3128-3130 diff --git a/coin/provisioning/common/shared/testserver/squid_18.04/Dockerfile b/coin/provisioning/common/shared/testserver/squid_18.04/Dockerfile index 208feec7..239ea4c8 100644 --- a/coin/provisioning/common/shared/testserver/squid_18.04/Dockerfile +++ b/coin/provisioning/common/shared/testserver/squid_18.04/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 -ARG packages="squid avahi-daemon" +FROM qt_ubuntu_18.04 +ARG packages="avahi-daemon squid" RUN apt-get update && apt-get install -y $packages && dpkg -l $packages EXPOSE 3128-3130 diff --git a/coin/provisioning/common/shared/testserver/vsftpd/Dockerfile b/coin/provisioning/common/shared/testserver/vsftpd/Dockerfile index af6cd7c7..4c2e00e4 100644 --- a/coin/provisioning/common/shared/testserver/vsftpd/Dockerfile +++ b/coin/provisioning/common/shared/testserver/vsftpd/Dockerfile @@ -1,7 +1,7 @@ -FROM ubuntu:16.04 -ARG packages="vsftpd ftp wget avahi-daemon" +FROM qt_ubuntu_16.04 +ARG packages="avahi-daemon vsftpd ftp" RUN apt-get update && apt-get install -y $packages && dpkg -l $packages EXPOSE 20-21 # install configurations and test data -RUN wget https://tools.ietf.org/rfc/rfc3252.txt +COPY rfc3252.txt . diff --git a/coin/provisioning/common/shared/testserver/vsftpd_18.04/Dockerfile b/coin/provisioning/common/shared/testserver/vsftpd_18.04/Dockerfile index 843472fd..8886308c 100644 --- a/coin/provisioning/common/shared/testserver/vsftpd_18.04/Dockerfile +++ b/coin/provisioning/common/shared/testserver/vsftpd_18.04/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 -ARG packages="vsftpd avahi-daemon" +FROM qt_ubuntu_18.04 +ARG packages="avahi-daemon vsftpd" RUN apt-get update && apt-get install -y $packages && dpkg -l $packages EXPOSE 20-21 |