From 3897a8bccfba33d8e6c4be635fb3f348e0675852 Mon Sep 17 00:00:00 2001 From: guihkx <626206+guihkx@users.noreply.github.com> Date: Mon, 22 Jan 2024 17:27:50 -0300 Subject: [PATCH] ci/linux: build AppImage on Ubuntu 22.04 (Python 3.10) Ubuntu 20.04 only has Python 3.8, and because the 'truststore' dependency requires at least Python 3.10, the AppImage package would need to bundle CA certificates from 'certifi' to make HTTPS requests work at all, which is quite an ugly workaround. Unfortunately, as a side effect, building on Ubuntu 22.04 increases the minimum required version of glibc from 2.31 to 2.35. --- .github/workflows/ci.yml | 8 +------- appimage/AppImageBuilder.yml | 14 ++++++-------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe8580f..f1e2ed3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,7 +144,7 @@ jobs: linux-appimage: name: Linux (AppImage) - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout code @@ -156,12 +156,6 @@ jobs: echo "app_version=$(python3 -c 'from version import __version__ as v; print(v)')" >> "${GITHUB_OUTPUT}" echo "sha_short=$(git rev-parse --short HEAD)" >> "${GITHUB_OUTPUT}" - # Ensure Python version - # - name: Set up Python - # uses: actions/setup-python@v4 - # with: - # python-version: ${{env.PYTHON_VERSION}} - - name: Append git revision to project version run: | sed -ri "s/^__version__\s*=\s*\"[^\"]+/\0.${{steps.vars.outputs.sha_short}}/" version.py diff --git a/appimage/AppImageBuilder.yml b/appimage/AppImageBuilder.yml index 3763a30..ba71833 100644 --- a/appimage/AppImageBuilder.yml +++ b/appimage/AppImageBuilder.yml @@ -39,11 +39,11 @@ AppDir: apt: arch: amd64 sources: - - sourceline: deb http://archive.ubuntu.com/ubuntu/ focal main universe - - sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates main universe - - sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-backports main universe - - sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-security main universe - key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32 + - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy main universe + - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-updates main universe + - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-backports main universe + - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-security main universe + key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C include: - gir1.2-appindicator3-0.1 @@ -128,13 +128,11 @@ AppDir: env: PATH: '${APPDIR}/usr/bin:${PATH}' PYTHONHOME: '${APPDIR}/usr' - PYTHONPATH: '${APPDIR}/usr/lib/python3.8/tkinter:${APPDIR}/usr/lib/python3.8/site-packages' + PYTHONPATH: '${APPDIR}/usr/lib/python3.10/tkinter:${APPDIR}/usr/lib/python3.10/site-packages' APPDIR_LIBRARY_PATH: '${APPDIR}/usr/lib:${APPDIR}/usr/lib/x86_64-linux-gnu:${APPDIR}/lib/x86_64-linux-gnu' TCL_LIBRARY: '${APPDIR}/usr/share/tcltk/tcl8.6' TK_LIBRARY: '${APPDIR}/usr/lib/tcltk/x86_64-linux-gnu/tk8.6' TKPATH: '${APPDIR}/usr/lib/tcltk/x86_64-linux-gnu/tk8.6' - # Remove the line below if using Python 3.10+. - SSL_CERT_FILE: '${APPDIR}/usr/lib/python3.8/site-packages/certifi/cacert.pem' # The app seems to have problems running on Wayland at the moment. # See: https://github.com/DevilXD/TwitchDropsMiner/issues/321 GDK_BACKEND: x11