From 28e80d022beb20d823b970821d0d24fa824737ef Mon Sep 17 00:00:00 2001 From: Teja Swaroop Pothala Date: Fri, 25 Apr 2025 06:37:10 -0400 Subject: [PATCH] change pinta base to noble, dynamically get latest stable version and build from source --- ci-scripts/template-vars.yaml | 2 +- src/ubuntu/install/pinta/install_pinta.sh | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ci-scripts/template-vars.yaml b/ci-scripts/template-vars.yaml index 2d799f3..6ce7a4a 100644 --- a/ci-scripts/template-vars.yaml +++ b/ci-scripts/template-vars.yaml @@ -146,7 +146,7 @@ multiImages: - src/ubuntu/install/slack/** - name: pinta singleapp: true - base: core-ubuntu-jammy + base: core-ubuntu-noble dockerfile: dockerfile-kasm-pinta changeFiles: - dockerfile-kasm-pinta diff --git a/src/ubuntu/install/pinta/install_pinta.sh b/src/ubuntu/install/pinta/install_pinta.sh index 9192b40..c13010b 100644 --- a/src/ubuntu/install/pinta/install_pinta.sh +++ b/src/ubuntu/install/pinta/install_pinta.sh @@ -3,22 +3,24 @@ set -ex # Install Pinta # For Jammy, build pinta from source because standard package is buggy -if grep -q Jammy /etc/os-release; then +if grep -q Jammy /etc/os-release || grep -q Noble /etc/os-release; then # install requirements for building pinta from source apt update -y apt-get install -y dotnet-sdk-8.0 apt-get install -y libgtk-3-dev - apt install -y autotools-dev autoconf-archive gettext intltool libadwaita-1-dev - # download and install pinta 2.1.2 source - wget -q https://github.com/PintaProject/Pinta/releases/download/2.1.2/pinta-2.1.2.tar.gz -O /tmp/pinta-2.1.2.tar.gz - tar -xvzf /tmp/pinta-2.1.2.tar.gz -C /tmp/ - cd /tmp/pinta-2.1.2 + apt install -y autotools-dev autoconf-archive gettext intltool libadwaita-1-dev jq build-essential + # download and install pinta latest non-beta version from source. Use GitHub API to get the latest non-beta release + PINTA_VERSION=$(curl -s https://api.github.com/repos/PintaProject/Pinta/releases | jq -r '[.[] | select(.prerelease == false and (.name | test("(?i)beta") | not))][0].tag_name') + PINTA_DOWNLOAD_URL=$(curl -s https://api.github.com/repos/PintaProject/Pinta/releases | jq -r '[.[] | select(.prerelease == false and (.name | test("(?i)beta") | not))][0].assets[] | select(.name | endswith(".tar.gz")).browser_download_url') + wget -q ${PINTA_DOWNLOAD_URL} -O /tmp/pinta-${PINTA_VERSION}.tar.gz + tar -xvzf /tmp/pinta-${PINTA_VERSION}.tar.gz -C /tmp + cd /tmp/pinta-${PINTA_VERSION} ./configure --prefix=/usr/local make install # cleanup to reduce image size - rm -rf /tmp/pinta-2.1.2.tar.gz /tmp/pinta-2.1.2 - apt remove -y libgtk-3-dev autotools-dev autoconf-archive gettext intltool libadwaita-1-dev + rm -rf /tmp/pinta.tar.gz /tmp/pinta + apt remove -y libgtk-3-dev autotools-dev autoconf-archive gettext intltool libadwaita-1-dev jq build-essential apt autoremove -y # create desktop file