From: beierlm Date: Thu, 13 Jan 2022 16:37:31 +0000 (-0500) Subject: Bug 1840: LTS Support X-Git-Tag: v11.0.3 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=a8024de106a22b1ec197ce629a969186158f8e76;p=osm%2Fcommon.git Bug 1840: LTS Support Updates base to Ubuntu 20.04 Updates python to 3.8 Updates pip dependencies to more recent versions Adds apt cache to stage 2 dockerfile Fixes bug 1840 Change-Id: I2cf79d9e697ba1267e2a8d00a180412a2887e1bd Signed-off-by: beierlm --- diff --git a/Dockerfile b/Dockerfile index 8230f42..f99b758 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,19 +21,26 @@ # devops-stages/stage-build.sh # -FROM ubuntu:18.04 +FROM ubuntu:20.04 + +ARG APT_PROXY +RUN if [ ! -z $APT_PROXY ] ; then \ + echo "Acquire::http::Proxy \"$APT_PROXY\";" > /etc/apt/apt.conf.d/proxy.conf ;\ + echo "Acquire::https::Proxy \"$APT_PROXY\";" >> /etc/apt/apt.conf.d/proxy.conf ;\ + fi RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get -y install \ debhelper \ + dh-python \ git \ python3 \ python3-all \ python3-dev \ python3-setuptools -RUN python3 -m easy_install pip==21.0.1 -RUN pip3 install tox==3.22.0 +RUN python3 -m easy_install pip==21.3.1 +RUN pip install tox==3.24.5 ENV LC_ALL C.UTF-8 ENV LANG C.UTF-8 diff --git a/requirements-dist.in b/requirements-dist.in index 11f0a2a..4f8784f 100644 --- a/requirements-dist.in +++ b/requirements-dist.in @@ -14,4 +14,5 @@ # limitations under the License. stdeb -setuptools-version-command \ No newline at end of file +setuptools-version-command +setuptools<60 \ No newline at end of file diff --git a/requirements-dist.txt b/requirements-dist.txt index 7393626..8192b48 100644 --- a/requirements-dist.txt +++ b/requirements-dist.txt @@ -1,10 +1,3 @@ -setuptools-version-command==2.2 - # via -r requirements-dist.in -stdeb==0.10.0 - # via -r requirements-dist.in - -# The following packages are considered to be unsafe in a requirements file: -# setuptools ####################################################################################### # Copyright ETSI Contributors and Others. # @@ -21,3 +14,13 @@ stdeb==0.10.0 # See the License for the specific language governing permissions and # limitations under the License. ####################################################################################### +setuptools-version-command==99.9 + # via -r requirements-dist.in +stdeb==0.10.0 + # via -r requirements-dist.in + +# The following packages are considered to be unsafe in a requirements file: +setuptools==59.8.0 + # via + # -r requirements-dist.in + # setuptools-version-command diff --git a/requirements-test.txt b/requirements-test.txt index 58e185a..bfa751a 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,27 +1,3 @@ -attrs==20.3.0 - # via pytest -coverage==5.5 - # via - # -r requirements-test.in - # nose2 -iniconfig==1.1.1 - # via pytest -nose2==0.10.0 - # via -r requirements-test.in -packaging==20.9 - # via pytest -pluggy==0.13.1 - # via pytest -py==1.10.0 - # via pytest -pyparsing==2.4.7 - # via packaging -pytest==6.2.2 - # via -r requirements-test.in -six==1.15.0 - # via nose2 -toml==0.10.2 - # via pytest ####################################################################################### # Copyright ETSI Contributors and Others. # @@ -38,3 +14,27 @@ toml==0.10.2 # See the License for the specific language governing permissions and # limitations under the License. ####################################################################################### +attrs==21.4.0 + # via pytest +coverage==6.2 + # via + # -r requirements-test.in + # nose2 +iniconfig==1.1.1 + # via pytest +nose2==0.10.0 + # via -r requirements-test.in +packaging==21.3 + # via pytest +pluggy==1.0.0 + # via pytest +py==1.11.0 + # via pytest +pyparsing==3.0.6 + # via packaging +pytest==6.2.5 + # via -r requirements-test.in +six==1.16.0 + # via nose2 +toml==0.10.2 + # via pytest diff --git a/requirements.in b/requirements.in index 1ce6a65..b8e0f2e 100644 --- a/requirements.in +++ b/requirements.in @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -pymongo +pymongo<4 aiokafka -pyyaml +pyyaml==5.4.1 pycrypto dataclasses \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 2ca19f5..5d297e0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,15 +1,3 @@ -aiokafka==0.7.0 - # via -r requirements.in -dataclasses==0.6 - # via -r requirements.in -kafka-python==2.0.2 - # via aiokafka -pycrypto==2.6.1 - # via -r requirements.in -pymongo==3.11.3 - # via -r requirements.in -pyyaml==5.4.1 - # via -r requirements.in ####################################################################################### # Copyright ETSI Contributors and Others. # @@ -26,3 +14,15 @@ pyyaml==5.4.1 # See the License for the specific language governing permissions and # limitations under the License. ####################################################################################### +aiokafka==0.7.2 + # via -r requirements.in +dataclasses==0.6 + # via -r requirements.in +kafka-python==2.0.2 + # via aiokafka +pycrypto==2.6.1 + # via -r requirements.in +pymongo==3.12.3 + # via -r requirements.in +pyyaml==5.4.1 + # via -r requirements.in diff --git a/tox.ini b/tox.ini index 9ab9b46..ce0ffcb 100644 --- a/tox.ini +++ b/tox.ini @@ -23,7 +23,7 @@ toxworkdir = /tmp/.tox [testenv] usedevelop = True -basepython = python3 +basepython = python3.8 setenv = VIRTUAL_ENV={envdir} PYTHONDONTWRITEBYTECODE = 1 deps = -r{toxinidir}/requirements.txt @@ -76,13 +76,18 @@ commands = ####################################################################################### [testenv:pip-compile] -deps = pip-tools==5.5.0 +deps = pip-tools==6.4.0 +skip_install = true +whitelist_externals = bash + [ commands = - - sh -c 'for file in requirements*.in ; do pip-compile -rU --no-header $file ;\ - out=`echo $file | sed "s/.in/.txt/"` ; \ - head -16 tox.ini >> $out ;\ - done' -whitelist_externals = sh + - bash -c "for file in requirements*.in ; do \ + UNSAFE="" ; \ + if [[ $file =~ 'dist' ]] ; then UNSAFE='--allow-unsafe' ; fi ; \ + pip-compile -rU --no-header $UNSAFE $file ;\ + out=`echo $file | sed 's/.in/.txt/'` ; \ + sed -i -e '1 e head -16 tox.ini' $out ;\ + done" ####################################################################################### [testenv:dist]