-
-
Notifications
You must be signed in to change notification settings - Fork 140
feat: upgrade Ubuntu images to 24.04 #290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| ARG ubuntuImage="ubuntu:22.04" | ||
| ARG ubuntuImage="ubuntu:24.04" | ||
| FROM $ubuntuImage | ||
|
|
||
| # Fixes a Gradle crash while building for Android on Unity 2019 when there are accented characters in environment variables | ||
|
|
@@ -14,15 +14,16 @@ RUN apt-get -q update \ | |
| && apt-get -q install -y --no-install-recommends apt-utils \ | ||
| && apt-get -q install -y --no-install-recommends --allow-downgrades \ | ||
| ca-certificates \ | ||
| libasound2 \ | ||
| libasound2t64 \ | ||
| libc6-dev \ | ||
| libcap2 \ | ||
| libgconf-2-4 \ | ||
| libglu1 \ | ||
| libgtk-3-0 \ | ||
| libncurses5 \ | ||
| libgtk-3-0t64 \ | ||
| libncurses6 \ | ||
|
Comment on lines
+17
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
: "${IMAGE:?Set IMAGE to the built image}"
docker run --rm "$IMAGE" sh -eu -c '
for soname in libgconf-2.so.4 libncurses.so.5 libtinfo.so.5; do
ldconfig -p | grep -Fq "$soname" || {
echo "missing $soname" >&2
exit 1
}
done
'Repository: game-ci/docker Length of output: 202 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
echo "== tracked images/ubuntu/base/Dockerfile =="
if [ -f images/ubuntu/base/Dockerfile ]; then
cat -n images/ubuntu/base/Dockerfile
else
echo "missing images/ubuntu/base/Dockerfile"
fi
echo "== nearby files =="
fd -a . images/ubuntu 2>/dev/null | sed 's#^\./##' | head -100
echo "== Dockerfile references to libgconf/libncurses/unity =="
rg -n "libgconf|libncurses|libtinfo|ubuntu|22\.04|24\.04|Noble|Jammy|Unity|BURST|IL2CPP|game-ci" .Repository: game-ci/docker Length of output: 50371 🌐 Web query:
💡 Result: To resolve issues when installing or launching Unity 2019.3 on Linux, particularly regarding missing shared library dependencies, follow the guidance below. Common Dependency Issues The most frequent error when launching older versions of Unity (like 2019.3) on modern Linux distributions is a missing libgconf-2-4 library, which manifests as: "error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory" [1][2][3]. On Ubuntu-based distributions, you can resolve this by installing the package manually: sudo apt update sudo apt install libgconf-2-4 Troubleshooting Launch Failures If you experience "Unity Launch error" or are unable to create projects, follow these steps: 1. Use Terminal for Diagnostics: If the Unity Hub or Editor fails to launch silently, run the Unity executable directly from the terminal (e.g., ~/Unity/Editor/Unity). The terminal will explicitly list any missing shared libraries (e.g., libncurses, libtinfo, or others) that are not present on your system [4]. 2. Missing Libraries (libncurses/libtinfo): Depending on your distribution version (e.g., Ubuntu 20.04 or later), older Unity versions may require legacy library versions that are no longer installed by default. If you see errors related to libncurses or libtinfo, you may need to install the compatibility versions (often named libncurses5 or libtinfo5) via your package manager [4][5]. 3. Graphics Drivers: Ensure you have the latest proprietary Nvidia drivers or the current Mesa drivers for AMD/Intel graphics, as Unity requires compatible OpenGL or Vulkan support [6][7][8]. General Recommendations - Official Support: Unity 2019.3 officially targeted Ubuntu 16.04/18.04 and CentOS 7 [6][7]. Running it on much newer distributions (like Ubuntu 22.04+) often requires manually installing these deprecated dependencies [4]. - Verify Execution Permissions: Ensure your Unity Editor binary has executable permissions [7]. - Use the Unity Hub: Always attempt to manage and launch your Unity versions through the current Unity Hub, as it handles many environment configurations automatically [9][10][11]. Citations:
🌐 Web query:
💡 Result: The Ubuntu 24.04 (Noble Numbat) package libncurses6 provides the ncurses shared library, and it is part of the ncurses source package which includes multiple related libraries, such as libtinfo6 [1][2][3]. While the package libncurses6 contains shared libraries for terminal handling, users often encounter issues with legacy software expecting older versions of these libraries, specifically libncurses.so.5 or libtinfo.so.5 [4][5][6][7]. Ubuntu 24.04 does not provide these version 5 libraries, as it has transitioned to version 6 (e.g., libncurses.so.6 and libtinfo.so.6) [6][7][8]. To address errors where applications report that libncurses.so.5 or libtinfo.so.5 cannot be found, a common technical workaround involves creating symbolic links to the existing version 6 files [4][5][6][9]. For example, users frequently use commands similar to the following to bridge this compatibility gap: sudo ln -s /usr/lib/x86_64-linux-gnu/libncurses.so.6 /usr/lib/x86_64-linux-gnu/libncurses.so.5 sudo ln -s /usr/lib/x86_64-linux-gnu/libtinfo.so.6 /usr/lib/x86_64-linux-gnu/libtinfo.so.5 These libraries are typically located in /usr/lib/x86_64-linux-gnu/ on 64-bit Ubuntu systems [4][6][7][9]. Citations:
🌐 Web query:
💡 Result: Yes, the Ubuntu 22.04 (Jammy Jellyfish) repository includes the libncurses5 package [1][2], which is provided as a legacy version of the shared libraries for terminal handling [1][2]. Regarding the specific shared object files: 1. libncurses.so.5: This file is included in the libncurses5 package [1][3]. It is provided specifically to support legacy applications that require version 5 of the ncurses shared library [2]. 2. libtinfo.so.5: This file is not directly provided by the libncurses5 package. Instead, the libtinfo5 package is the legacy package that provides libtinfo.so.5 [1][4]. In many cases, the functionality previously provided by libtinfo (the low-level terminfo library) has been integrated into the main ncurses shared libraries [5]. For applications that specifically look for the libtinfo.so.5 file, users have historically resolved this by ensuring the libtinfo5 package is installed [1] or, in some troubleshooting scenarios, by creating symbolic links from existing ncurses libraries to the expected filename [5]. You can install these legacy packages using the following commands: sudo apt update sudo apt install libncurses5 libtinfo5 Note that for modern applications developed on or for Ubuntu 22.04, the standard packages are libncurses6 and libtinfo6 [6][7][8]. The libncurses5 and libtinfo5 packages should only be used if you are running legacy software that specifically requires these older library versions [2]. Citations:
Add legacy Unity library coverage before dropping these dependencies. Ubuntu 24.04 provides 🤖 Prompt for AI AgentsSource: MCP tools |
||
| libnotify4 \ | ||
| libnss3 \ | ||
| libvulkan1 \ | ||
| mesa-vulkan-drivers \ | ||
| libxtst6 \ | ||
| libxss1 \ | ||
| cpio \ | ||
|
|
@@ -32,7 +33,7 @@ RUN apt-get -q update \ | |
| && apt-get clean \ | ||
| && rm -rf /var/lib/apt/lists/* \ | ||
| && rm -rf /usr/share/icons/* \ | ||
| && rm -rf /usr/lib/python3.10/__pycache__/* | ||
| && rm -rf /usr/lib/python3.12/__pycache__/* | ||
|
|
||
| # Toolbox | ||
| RUN apt-get -q update \ | ||
|
|
@@ -57,7 +58,7 @@ RUN apt-get -q update \ | |
| && apt-get clean \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Fix "No useable version of libssl" for Ubuntu 22.04 | ||
| # Install OpenSSL 1.1 for older Unity Editors that do not support OpenSSL 3. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
: "${LIBSSL11_URL:?Set LIBSSL11_URL to the proposed artifact URL}"
: "${LIBSSL11_SHA256:?Set LIBSSL11_SHA256 to the expected SHA-256}"
case "$LIBSSL11_URL" in
https://*) ;;
*) echo "LIBSSL11_URL must use HTTPS" >&2; exit 1 ;;
esac
deb="$(mktemp)"
trap 'rm -f "$deb"' EXIT
curl --fail --location --proto '=https' --tlsv1.2 "$LIBSSL11_URL" -o "$deb"
printf '%s %s\n' "$LIBSSL11_SHA256" "$deb" | sha256sum --check --status
dpkg-deb -f "$deb" Package Version ArchitectureRepository: game-ci/docker Length of output: 226 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== Dockerfile locations =="
fd -a 'Dockerfile$' . | sed 's#^\./##' | rg 'images/ubuntu/base/Dockerfile|Dockerfile' | head -50
echo
echo "== target lines =="
if [ -f images/ubuntu/base/Dockerfile ]; then
nl -ba images/ubuntu/base/Dockerfile | sed -n '45,80p'
fi
echo
echo "== relevant variables/usages =="
rg -n "LIBSSL|libssl1\.1|OpenSSL|curl|wget|sha256|apt.*install" images/ubuntu/base/Dockerfile README.md .github 2>/dev/null || trueRepository: game-ci/docker Length of output: 539 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
echo "== candidate remote package lookup =="
# Do not trust repository files as executable code. Use only read-only package metadata lookup.
# Check availability/version and canonical filenames for Ubuntu focal libssl1.1 packages.
python3 - <<'PY'
import urllib.request
urls = [
"https://packages.ubuntu.com/focal/amd64/libssl1.1/download",
"https://packages.ubuntu.com/focal/amd64/libssl1.1/download?mirror=ports.ubuntu.com",
"http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb",
"http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb",
"https://old-releases.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb",
]
for url in urls:
print(f"-- {url}")
try:
req = urllib.request.Request(url, headers={"User-Agent": "mozilla"})
with urllib.request.urlopen(req, timeout=20) as r:
print("status", r.status)
print("final", r.url if hasattr(r, "url") else url)
except Exception as e:
print(type(e).__name__, str(e).splitlines()[0] if str(e) else "")
PY
echo
echo "== available local Dockerfile snippets around libssl1.1 =="
if [ -f images/ubuntu/base/Dockerfile ]; then
rg -n "libssl1\.1|1\.1\.1f|OpenSSL|curl|apt|http|https" images/ubuntu/base/Dockerfile || true
fi
echo
echo "== git diff stat/name-only =="
git diff --stat || true
git diff --name-only || trueRepository: game-ci/docker Length of output: 2362 🌐 Web query:
💡 Result: Ubuntu Security Notice (USN) 4891-1 was published on March 25, 2021, to address an OpenSSL vulnerability related to the incorrect handling of certain renegotiation ClientHello messages [1][2]. This vulnerability is identified as CVE-2021-3449 [3][2]. It allowed a remote attacker to send specially crafted network traffic to an OpenSSL-based server, potentially causing the application to crash (denial of service) or, in some cases, execute arbitrary code [2][4]. Regarding the specific package versions mentioned: - The package version libssl1.1 1.1.1f-1ubuntu2.3 was the corrected version for Ubuntu 20.04 LTS (Focal Fossa) released as part of USN-4891-1 [2][5]. - The package version you inquired about is directly associated with this security fix for CVE-2021-3449 [5][4]. After applying these updates, it is standard practice for Ubuntu systems to require a reboot to ensure that all services using the affected library are properly restarted and using the patched version [1][2]. Citations:
🌐 Web query:
💡 Result: The package libssl1.1 version 1.1.1f-1ubuntu2.24 for Ubuntu 20.04 (Focal Fossa) is a security/update release [1][2][3]. While this specific version was published in the official Ubuntu repositories (e.g., security and updates channels) [2][4], it has since been superseded [2]. In the Ubuntu ecosystem, once a package is superseded, it is often removed from the primary pool/main directory on the main mirrors, although it may still exist in archive mirrors or historical repositories [2]. To locate and download this specific version, you can consult: 1. Launchpad: The official Ubuntu package tracker hosts detailed information and metadata for this version [2][4]. 2. Ubuntu Archive Mirrors: You may find the.deb file in the pool/main/o/openssl directory of various historical or institutional Ubuntu mirrors [5][6]. The specific path for the amd64 architecture is pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.24_amd64.deb [5]. It is generally recommended to update to the latest available version provided by your system's package manager (apt) rather than manually installing older, superseded versions, to ensure you have the most recent security patches. You can check for available updates by running: sudo apt update apt policy libssl1.1 Citations:
Install a patched, integrity-checked
🤖 Prompt for AI AgentsSource: MCP tools |
||
| # https://forum.unity.com/threads/workaround-for-libssl-issue-on-ubuntu-22-04.1271405/ | ||
| RUN wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb \ | ||
| && dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb \ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: game-ci/docker
Length of output: 40289
🏁 Script executed:
Repository: game-ci/docker
Length of output: 24820
Version the Ubuntu baseline across the published image chain.
The default
ubuntuImagenow starts from Ubuntu 24.04, and Ubuntu build workflows tagunityci/base,unityci/hub, andunityci/editorwithlatest/major/minor/full release-series tags. Keep those release-series tags on the Jammy base image, or publish Ubuntu 24.04 under Ubuntu-specific tags. AnyubuntuImageoverride must also update image-specific dependencies, becauseubuntuImageis only defined inimages/ubuntu/base/Dockerfile.🧰 Tools
🪛 Trivy (0.72.0)
[error] 1-1: Image user should not be 'root'
Specify at least 1 USER command in Dockerfile with non-root user as argument
Rule: DS-0002
Learn more
(IaC/Dockerfile)
🤖 Prompt for AI Agents
Source: MCP tools