From: tierno Date: Fri, 10 Jul 2020 10:52:56 +0000 (+0000) Subject: fix 1138 forcing cryptography version 2.5 or higher X-Git-Tag: release-v9.0-start~24 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=366c26074542c8febf28075bf2a4832ac612101c;p=osm%2FRO.git fix 1138 forcing cryptography version 2.5 or higher Some fixing in devops-stages/stage-build Use US18.04 for Dockerfile used for devops-stages Change-Id: Ia2cb09e21efe11a22013de48b2404f5ead949a71 Signed-off-by: tierno --- diff --git a/Dockerfile b/Dockerfile index ee707b00..9ed97d6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,15 +17,14 @@ # # Use Dockerfile-local for running osm/RO in a docker container from source -FROM ubuntu:16.04 +FROM ubuntu:18.04 RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get --yes install git tox make python-all python3 python3-pip debhelper wget && \ - DEBIAN_FRONTEND=noninteractive apt-get --yes install python3-all libssl-dev apt-utils && \ - DEBIAN_FRONTEND=noninteractive python3 -m pip install -U setuptools setuptools-version-command stdeb && \ - DEBIAN_FRONTEND=noninteractive apt-get --yes install libmysqlclient-dev mysql-client - - # needed for tests: libmysqlclient-dev mysql-client tox + DEBIAN_FRONTEND=noninteractive apt-get --yes install git tox make python3 python3-pip debhelper wget \ + python3-all apt-utils libmysqlclient-dev mysql-client && \ + DEBIAN_FRONTEND=noninteractive python3 -m pip install -U setuptools setuptools-version-command stdeb + # needed for tests: libmysqlclient-dev mysql-client tox + # TODO remove apt # libssl-dev # TODO py3 comment # Uncomment this block to generate automatically a debian package and show info # # Set the working directory to /app @@ -33,4 +32,3 @@ RUN apt-get update && \ # # Copy the current directory contents into the container at /app # ADD . /app # CMD /app/devops-stages/stage-build.sh && find deb_dist -name "*.deb" -exec dpkg -I {} ";" - diff --git a/NG-RO/debian/python3-osm-ng-ro.postinst b/NG-RO/debian/python3-osm-ng-ro.postinst index 09b59d2e..87416ac9 100755 --- a/NG-RO/debian/python3-osm-ng-ro.postinst +++ b/NG-RO/debian/python3-osm-ng-ro.postinst @@ -21,5 +21,4 @@ echo "POST INSTALL OSM-RO-NG" echo "Installing python dependencies via pip..." # python3 -m pip install -U pip -python3 -m pip install cherrypy==18.1.2 - +python3 -m pip install -U "cherrypy==18.1.2" "cryptography>=2.5" diff --git a/NG-RO/setup.py b/NG-RO/setup.py index a0018361..a6cf47a8 100644 --- a/NG-RO/setup.py +++ b/NG-RO/setup.py @@ -40,7 +40,7 @@ setup( 'jsonschema', 'PyYAML', 'requests', - 'cryptography', + 'cryptography', # >=2.5 installed right version with the debian post-install script 'osm-im @ git+https://osm.etsi.org/gerrit/osm/IM.git#egg=osm-im', "osm-ro-plugin @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin", ], diff --git a/RO/Makefile b/RO/Makefile index b41748d3..15dce714 100644 --- a/RO/Makefile +++ b/RO/Makefile @@ -28,6 +28,7 @@ package: # apt-get install -y python-stdeb python3 setup.py --command-packages=stdeb.command sdist_dsc cp debian/python3-osm-ro.postinst deb_dist/osm-ro*/debian/ + # cd deb_dist/osm-nbi*/debian && echo "cryptography python3-cryptography (>= 1.9)" > py3dist-overrides cd deb_dist/osm-ro*/ && dpkg-buildpackage -rfakeroot -uc -us # mkdir -p .build # cp build/deb_dist/python-*.deb .build/ diff --git a/RO/debian/python3-osm-ro.postinst b/RO/debian/python3-osm-ro.postinst index 02f356b7..877a496c 100755 --- a/RO/debian/python3-osm-ro.postinst +++ b/RO/debian/python3-osm-ro.postinst @@ -18,4 +18,5 @@ ## echo "POST INSTALL OSM-RO" -# nothing to do +# Ensure a proper version of cryptography, needed by paramiko +python3 -m pip install "cryptography>=2.5" -U diff --git a/RO/setup.py b/RO/setup.py index 4bd22232..836f6f22 100755 --- a/RO/setup.py +++ b/RO/setup.py @@ -36,7 +36,6 @@ _requirements = [ "jsonschema", "paramiko", "mysqlclient", - #"MySQLdb", # common to VIMS "requests", diff --git a/devops-stages/stage-build.sh b/devops-stages/stage-build.sh index d14f8d92..5ac3f7a9 100755 --- a/devops-stages/stage-build.sh +++ b/devops-stages/stage-build.sh @@ -17,7 +17,7 @@ rm -rf deb_dist/* mkdir -p deb_dist # main RO module -make -C RO clean package BRANCH=master +make -C RO clean package cp RO/deb_dist/python3-osm-ro_*.deb deb_dist/ # RO client @@ -28,6 +28,10 @@ cp RO-client/deb_dist/python3-osm-roclient_*.deb deb_dist/ make -C RO-plugin clean package cp RO-plugin/deb_dist/python3-osm-ro-plugin_*.deb deb_dist/ +# NG-RO +make -C NG-RO clean package +cp NG-RO/deb_dist/python3-osm-ng-ro_*.deb deb_dist/ + # VIM plugings: vmware, openstack, AWS, fos, azure, Opennebula, for vim_plugin in RO-VIM-* do diff --git a/test-docker/Dockerfile-devops b/test-docker/Dockerfile-devops index 855ef813..5f094ab0 100644 --- a/test-docker/Dockerfile-devops +++ b/test-docker/Dockerfile-devops @@ -24,7 +24,7 @@ RUN apt-get update && apt-get -y install curl software-properties-common git tox && python3 -m pip install --upgrade pip && python3 -m pip install pyangbind networking-l2gw ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian -ARG RELEASE=ReleaseSIX-daily +ARG RELEASE=ReleaseEIGHT-daily ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg ARG REPOSITORY=testing diff --git a/test-docker/test-gen-devops.sh b/test-docker/test-gen-devops.sh index a8690317..3b85166f 100755 --- a/test-docker/test-gen-devops.sh +++ b/test-docker/test-gen-devops.sh @@ -26,7 +26,7 @@ Options: --no-cache Use if found problems looking for packages --update Use to update OSM, RO docker with this image" && exit 0 -[[ "$*" == *--no-cache* ]] && no_cache="--no_cache" || no_cache="" +[[ "$*" == *--no-cache* ]] && no_cache="--no-cache" || no_cache="" [[ "$*" == *--update* ]] && update_osm="k8s" || update_osm="" HERE=$(dirname $(readlink -f ${BASH_SOURCE[0]}))