From 375b0068149972ffdba234cdaa5726e50e1ff914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sara=20Aim=C3=A9e=20Smiseth?= <51710585+SaraSmiseth@users.noreply.github.com> Date: Sun, 9 Jul 2023 09:59:41 +0200 Subject: [PATCH] Update to debian bookworm (#54) --- CHANGELOG.md | 2 +- Dockerfile | 12 ++++++------ tests/requirements.txt | 4 ++-- update-dependencies.sh | 14 ++++++++++++++ 4 files changed, 23 insertions(+), 9 deletions(-) create mode 100755 update-dependencies.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 60f5c54..82941db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -* Nothing +* Update to debian bookworm ## v1.2.8 diff --git a/Dockerfile b/Dockerfile index f973ab6..9058210 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bullseye-slim +FROM debian:bookworm-slim ARG BUILD_DATE ARG VCS_REF @@ -7,7 +7,7 @@ ARG VERSION ARG LUAROCKS_VERSION=3.9.2 ARG PROSODY_VERSION=0.12.3 -ARG LUAROCKS_SHA256=bca6e4ecc02c203e070acdb5f586045d45c078896f6236eb46aa33ccd9b94edb +ARG LUAROCKS_SHA256="bca6e4ecc02c203e070acdb5f586045d45c078896f6236eb46aa33ccd9b94edb" ARG PROSODY_DOWNLOAD_SHA256=35da0d031ff46040a2d638e004d4255e249b6323fe6212db9ddd76b401db2101 LABEL luarocks.version="${LUAROCKS_VERSION}" @@ -26,13 +26,14 @@ LABEL prosody.version="${PROSODY_VERSION}" RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y \ libevent-dev `# this is no build dependency, but needed for luaevent` \ - libicu67 \ - libidn11 \ + libicu72 \ + libidn2-0 \ libpq-dev \ libsqlite3-0 \ lua5.2 \ lua-bitop \ lua-dbi-mysql \ + lua-dbi-postgresql \ lua-expat \ lua-filesystem \ lua-ldap \ @@ -43,7 +44,7 @@ RUN apt-get update \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -RUN buildDeps='gcc git libc6-dev libidn11-dev liblua5.2-dev libsqlite3-dev libssl-dev libicu-dev make unzip' \ +RUN buildDeps='gcc git libc6-dev libidn2-dev liblua5.2-dev libsqlite3-dev libssl-dev libicu-dev make unzip' \ && set -x \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends \ && rm -rf /var/lib/apt/lists/* \ @@ -71,7 +72,6 @@ RUN buildDeps='gcc git libc6-dev libidn11-dev liblua5.2-dev libsqlite3-dev libss && luarocks install luaevent \ && luarocks install luadbi \ `#&& luarocks install luadbi-mysql MYSQL_INCDIR=/usr/include/mariadb/` \ - && luarocks install luadbi-postgresql POSTGRES_INCDIR=/usr/include/postgresql/ \ && luarocks install luadbi-sqlite3 \ && luarocks install stringy \ \ diff --git a/tests/requirements.txt b/tests/requirements.txt index cfbef74..dbe0b29 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,4 +1,4 @@ aioxmpp==0.13.3 -pip-chill==1.0.1 +pip-chill==1.0.3 pytest-asyncio==0.21.0 -pytz==2022.7.1 +pytz==2023.3 diff --git a/update-dependencies.sh b/update-dependencies.sh new file mode 100755 index 0000000..2dc6188 --- /dev/null +++ b/update-dependencies.sh @@ -0,0 +1,14 @@ +#!/bin/zsh + +update_luarocks() { + # Get latest luarocks version and calculate sha256 hash of the tarball + local LUAROCKS_VER=$(wget -q -O - 'https://api.github.com/repos/luarocks/luarocks/tags' | jq -r ".[0].name") + local LUAROCKS_VER=${LUAROCKS_VER#v} + local LUAROCKS_SHA256_HASH=$(wget -q -O - "https://luarocks.org/releases/luarocks-$LUAROCKS_VER.tar.gz" | sha256sum --zero | perl -lane 'print $F[0]') + + # Update Dockerfile + perl -pi -e "s/LUAROCKS_VERSION=\K.*/$LUAROCKS_VER/" Dockerfile + perl -pi -e "s/LUAROCKS_SHA256=\K.*/\"$LUAROCKS_SHA256_HASH\"/" Dockerfile +} + +update_luarocks