Repository navigation
Many fixes, come inside for a better explanation #383
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
Merged
Lord-Kamina
merged 36 commits into
AppImageCrafters:main
from
Lord-Kamina:fix-deps-final
Nov 9, 2026
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
2f34118
Make workflows a bit saner.
Lord-Kamina d430e1a
fix stdin maybe?
Lord-Kamina 4203343
update requirements.txt
Lord-Kamina 8f665c4
Fix compression
Lord-Kamina 0d2c1b5
Fix invalid escape sequence in loader regex
Lord-Kamina 9a878da
Make sure bin folder exists
Lord-Kamina 25273b3
Don’t try to parse invalid versions
Lord-Kamina b08b041
Add actual python version to environment.
Lord-Kamina 2c21cf7
Add `APPIMAGE_BUILDER_REMOTE_REPO_OWNER` env variable
Lord-Kamina c5299bb
Update test environments
Lord-Kamina 70ddb25
Leftover references to old OS versions
Lord-Kamina 9cc101c
Get rid of setup.py
Lord-Kamina 0daed53
Use a venv to run tests in containers.
Lord-Kamina 9af6adb
AppRun2: Add symlink to fix compat runtime in Ubuntu
Lord-Kamina e7fea7a
Fix bash recipes
Lord-Kamina 671aa57
Don't create broken symlinks in AppImageBuilder recipe
Lord-Kamina a95a20b
AppImageBuilder recipe:Add comp
Lord-Kamina 782f2c7
DRY, saner, and more importantly: WORKING CI
Lord-Kamina 0feb4b0
Add AppImage with debug runtime to artifacts.
Lord-Kamina cc5ac5f
Remove version from filename
Lord-Kamina fd60393
git safe.directory
Lord-Kamina d68bde2
Fix arch test failure
Lord-Kamina 46c8aa3
Revert "Fix setup_runtime to use only versions…”
Lord-Kamina e898a44
CI: Bump version of canned actions
Lord-Kamina 0582bc1
Update canned actions and OS images again.
Lord-Kamina 45d90b1
Update requirements.txt again.
Lord-Kamina 1b09a7b
Use lief instead of spawning readelf.
Lord-Kamina c2610ee
Hopefully fix paths inside artifacts
Lord-Kamina e52afb3
Use patchelf from repository instead of compiling manually.
Lord-Kamina 6823a33
Explicitly use gnu-coreutils
Lord-Kamina 79fb145
Fix logic for determining executables
Lord-Kamina 2e8d86f
Add squashfs-root to gitignore
Lord-Kamina 3996ef6
Extra pretty debug on top.
Lord-Kamina 15272b1
set _PYTHON_SUBPROCESS_USE_POSIX_SPAWN=0
Lord-Kamina 532abfb
Use script to nuke uutils
Lord-Kamina c83ae2f
https on recipes.
Lord-Kamina File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,217 @@ | ||
| #!/usr/bin/env bash | ||
| # Building embedded images is broken under stock Ubuntu 26, | ||
| # because the rust coreutils version is severely broken, and doesnt react to bugreports. | ||
| # UEFI files get corrupted e.g. | ||
| # https://computingforgeeks.com/ubuntu-2604-rust-coreutils-guide/ is quite ok, but not fully. | ||
| # | ||
| # Replace Ubuntu 26's uutils selector with GNU coreutils while keeping | ||
| # build-essential dependent on the implementation-neutral coreutils package. | ||
| # Tested in a fresh Ubuntu-26.04 container | ||
|
|
||
| set -Eeuo pipefail | ||
| export DEBIAN_FRONTEND=${DEBIAN_FRONTEND:-noninteractive} | ||
|
|
||
| usage() { | ||
| cat <<'EOF' | ||
| Usage: sudo ./replace-uutils-with-gnu-coreutils-ubuntu26.sh [options] | ||
|
|
||
| Options: | ||
| --build-only Build the corrected build-essential package; do not install it. | ||
| --output-dir DIR Keep the corrected package in DIR (default: /var/tmp). | ||
| -h, --help Show this help. | ||
| EOF | ||
| } | ||
|
|
||
| build_only=false | ||
| output_dir=/var/tmp | ||
|
|
||
| while (($#)); do | ||
| case "$1" in | ||
| --build-only) | ||
| build_only=true | ||
| shift | ||
| ;; | ||
| --output-dir) | ||
| (($# >= 2)) || { printf 'error: --output-dir requires a directory\n' >&2; exit 2; } | ||
| output_dir=$2 | ||
| shift 2 | ||
| ;; | ||
| -h|--help) | ||
| usage | ||
| exit 0 | ||
| ;; | ||
| *) | ||
| printf 'error: unknown option: %s\n' "$1" >&2 | ||
| usage >&2 | ||
| exit 2 | ||
| ;; | ||
| esac | ||
| done | ||
|
|
||
| if [[ ! -r /etc/os-release ]]; then | ||
| printf 'error: /etc/os-release is unavailable\n' >&2 | ||
| exit 1 | ||
| fi | ||
| # shellcheck disable=SC1091 | ||
| . /etc/os-release | ||
| if [[ ${ID:-} != ubuntu || ${VERSION_ID:-} != 26.* ]]; then | ||
| printf 'error: this recipe is only for Ubuntu 26.x; found %s %s\n' \ | ||
| "${ID:-unknown}" "${VERSION_ID:-unknown}" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| if ! $build_only && ((EUID != 0)); then | ||
| printf 'error: run the installation with sudo (or use --build-only)\n' >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| for command in apt-cache apt-get awk dpkg dpkg-deb dpkg-query mktemp; do | ||
| command -v "$command" >/dev/null || { | ||
| printf 'error: required command not found: %s\n' "$command" >&2 | ||
| exit 1 | ||
| } | ||
| done | ||
|
|
||
| is_installed() { | ||
| [[ $(dpkg-query -W -f='${db:Status-Abbrev}' "$1" 2>/dev/null || true) == ii* ]] | ||
| } | ||
|
|
||
| installed_build_essential_depends=$(dpkg-query -W -f='${Depends}' build-essential 2>/dev/null || true) | ||
| if ! $build_only \ | ||
| && [[ $installed_build_essential_depends == *coreutils* ]] \ | ||
| && [[ $installed_build_essential_depends != *coreutils-from-uutils* ]] \ | ||
| && is_installed coreutils-from-gnu; then | ||
| printf 'Already configured: build-essential uses coreutils and coreutils-from-gnu is installed.\n' | ||
| exit 0 | ||
| fi | ||
|
|
||
| if ! $build_only; then | ||
| apt-get update | ||
| fi | ||
|
|
||
| archive_version=$(apt-cache madison build-essential | awk 'NR == 1 { print $3 }') | ||
| if [[ -z $archive_version ]]; then | ||
| printf 'error: no archive version of build-essential is available\n' >&2 | ||
| exit 1 | ||
| fi | ||
| local_version="${archive_version}+coreutilsgnu1" | ||
| architecture=$(dpkg --print-architecture) | ||
|
|
||
| work_dir=$(mktemp -d "${TMPDIR:-/tmp}/build-essential-coreutils-gnu.XXXXXXXX") | ||
| cleanup() { | ||
| rm -rf "$work_dir" | ||
| } | ||
| trap cleanup EXIT | ||
| chmod 0755 "$work_dir" | ||
| download_dir=$work_dir/download | ||
| mkdir "$download_dir" | ||
| if ((EUID == 0)) && id -u _apt >/dev/null 2>&1; then | ||
| chown _apt:root "$download_dir" | ||
| fi | ||
|
|
||
| ( | ||
| cd "$download_dir" | ||
| apt-get download "build-essential=$archive_version" | ||
| ) | ||
|
|
||
| shopt -s nullglob | ||
| downloaded_packages=("$download_dir"/build-essential_*.deb) | ||
| shopt -u nullglob | ||
| if ((${#downloaded_packages[@]} != 1)); then | ||
| printf 'error: expected one downloaded build-essential package, found %d\n' \ | ||
| "${#downloaded_packages[@]}" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| package_root=$work_dir/package | ||
| dpkg-deb --raw-extract "${downloaded_packages[0]}" "$package_root" | ||
| control_file=$package_root/DEBIAN/control | ||
| original_depends=$(dpkg-deb -f "${downloaded_packages[0]}" Depends) | ||
| if [[ $original_depends != *coreutils-from-uutils* ]]; then | ||
| printf 'error: archive build-essential no longer depends on coreutils-from-uutils; refusing to rewrite unexpected metadata\n' >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| awk -v version="$local_version" ' | ||
| /^Version: / { | ||
| print "Version: " version | ||
| next | ||
| } | ||
| /^Maintainer: / { | ||
| print "Maintainer: Local Administrator <root@localhost>" | ||
| next | ||
| } | ||
| /^Depends: / { | ||
| if (sub(/coreutils-from-uutils([[:space:]]*\([^)]*\))?/, "coreutils") != 1) { | ||
| exit 42 | ||
| } | ||
| next | ||
| } | ||
| { print } | ||
| ' "$control_file" >"$control_file.new" || { | ||
| status=$? | ||
| printf 'error: failed to rewrite build-essential control metadata (status %d)\n' "$status" >&2 | ||
| exit "$status" | ||
| } | ||
| mv "$control_file.new" "$control_file" | ||
|
|
||
| mkdir -p "$output_dir" | ||
| output_dir=$(cd "$output_dir" && pwd -P) | ||
| version_for_filename=${local_version//:/%3a} | ||
| output_package=$output_dir/build-essential_${version_for_filename}_${architecture}.deb | ||
| dpkg-deb --root-owner-group --build "$package_root" "$output_package" | ||
|
|
||
| rebuilt_depends=$(dpkg-deb -f "$output_package" Depends) | ||
| rebuilt_version=$(dpkg-deb -f "$output_package" Version) | ||
| if [[ $rebuilt_version != "$local_version" \ | ||
| || $rebuilt_depends == *coreutils-from-uutils* \ | ||
| || $rebuilt_depends != *coreutils* ]]; then | ||
| printf 'error: rebuilt package failed metadata validation\n' >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| printf 'Built corrected package: %s\n' "$output_package" | ||
| printf 'Depends: %s\n' "$rebuilt_depends" | ||
|
|
||
| if $build_only; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| # Unpack first so this also works on minimal images where build-essential's | ||
| # compiler dependencies are not installed yet. Resolve those dependencies while | ||
| # uutils still satisfies coreutils' selector pre-dependency. | ||
| dpkg --unpack "$output_package" | ||
| apt-get --fix-broken install -y | ||
|
|
||
| # These selector packages conflict through their shared coreutils-from virtual | ||
| # package. Name the removal explicitly so APT can solve the handoff. Ubuntu marks | ||
| # the uutils selector Protected, so noninteractive replacement requires | ||
| # --allow-remove-essential; coreutils-from-gnu is installed in the same APT | ||
| # transaction and performs the supported diversion handoff. | ||
| apt-get install -y --allow-remove-essential \ | ||
| coreutils-from-gnu coreutils-from-uutils- | ||
| apt-get check | ||
|
|
||
| if ! is_installed build-essential \ | ||
| || ! is_installed coreutils-from-gnu \ | ||
| || is_installed coreutils-from-uutils; then | ||
| printf 'error: package transition did not complete\n' >&2 | ||
| exit 1 | ||
| fi | ||
| installed_build_essential_depends=$(dpkg-query -W -f='${Depends}' build-essential) | ||
| if [[ $installed_build_essential_depends == *coreutils-from-uutils* \ | ||
| || $installed_build_essential_depends != *coreutils* ]]; then | ||
| printf 'error: installed build-essential has unexpected dependencies: %s\n' \ | ||
| "$installed_build_essential_depends" >&2 | ||
| exit 1 | ||
| fi | ||
| if ! /usr/bin/ls --version 2>/dev/null | awk 'NR == 1 { found = /GNU coreutils/ } END { exit !found }'; then | ||
| printf 'error: /usr/bin/ls is not provided by GNU coreutils after the transition\n' >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| printf 'Transition complete.\n' | ||
| printf ' build-essential: %s\n' "$(dpkg-query -W -f='${Version}' build-essential)" | ||
| printf ' selector: coreutils-from-gnu %s\n' "$(dpkg-query -W -f='${Version}' coreutils-from-gnu)" | ||
| printf ' active ls: %s\n' "$(readlink -f /usr/bin/ls)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,155 @@ | ||
| name: Run tests | ||
|
|
||
| on: | ||
| workflow_call: | ||
| env: | ||
| APPIMAGE_BUILDER_REMOTE_REPO_OWNER: ${{ github.repository_owner }} | ||
|
|
||
| jobs: | ||
| pytest-ubuntu-container: | ||
| name: Run tests on Ubuntu 26.04 (Docker) | ||
| runs-on: ubuntu-26.04 | ||
| container: ubuntu:26.04 | ||
| steps: | ||
| - name: Install dependencies | ||
| run: | | ||
| apt-get -y update | ||
| apt-get install -y fakeroot lsb-release binutils patchelf git python3-dev python3-pip python3-venv libffi-dev | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Set up a virtualenv | ||
| run: | | ||
| python3 -m venv .venv | ||
| - name: Install appimage-builder and run tests | ||
| run: | | ||
| git config --global --add safe.directory $PWD | ||
| . .venv/bin/activate | ||
| pip install pytest | ||
| pip install -e .[dev] | ||
| pytest tests | ||
|
|
||
| pytest-archlinux: | ||
| name: Run tests on ArchLinux (Docker) | ||
| runs-on: ubuntu-26.04 | ||
| container: archlinux | ||
| steps: | ||
| - name: Install dependencies | ||
| run: pacman -Syu --noconfirm binutils fakeroot lsb-release strace patchelf git python-pip gcc | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Set up a virtualenv | ||
| run: | | ||
| python3 -m venv .venv | ||
| - name: Install appimage-builder and run tests | ||
| run: | | ||
| git config --global --add safe.directory $PWD | ||
| . .venv/bin/activate | ||
| pip install pytest | ||
| pip install -e .[dev] | ||
| pytest tests | ||
|
|
||
| pytest-ubuntu-runner: | ||
| name: Run tests on Ubuntu 26.04 with python 3.14. | ||
| runs-on: ubuntu-26.04 | ||
| steps: | ||
| - name: Install dependencies | ||
| run: | | ||
| sudo apt-get -y update | ||
| sudo apt-get install -y fakeroot lsb-release binutils patchelf git libffi-dev | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Clear Python cache | ||
| run: | | ||
| sudo rm -rf /__t/Python | ||
| - name: Install python | ||
| uses: actions/setup-python@v7 | ||
| with: | ||
| python-version: '3.14' | ||
| cache: 'pip' | ||
| - name: Install appimage-builder and run tests | ||
| run: | | ||
| pip install pytest | ||
| pip install -e .[dev] | ||
| python3 -m pytest tests | ||
|
|
||
| build-pack-bash: | ||
| runs-on: ubuntu-26.04 | ||
| needs: [ pytest-ubuntu-container, pytest-ubuntu-runner, pytest-archlinux ] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Install dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| chmod +x .github/replace-uutils-with-gnu-coreutils-ubuntu26.sh | ||
| sudo ./.github/replace-uutils-with-gnu-coreutils-ubuntu26.sh | ||
| sudo apt-get install -y gnu-coreutils coreutils-from-gnu coreutils-from-uutils- rust-coreutils- coreutils patchelf desktop-file-utils libgdk-pixbuf-2.0-dev fakeroot strace git lsb-release python3-build python3-setuptools adwaita-icon-theme libffi-dev | ||
|
|
||
| sudo wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool | ||
| sudo chmod +x /usr/local/bin/appimagetool | ||
| - name: Build Python Wheel | ||
| run: | | ||
| cd ${{ github.workspace }} | ||
| python3 -m build | ||
| - name: Install appimage-builder | ||
| run: | | ||
| pip install --ignore-installed --user --break-system-packages . | ||
| - name: Build AppImage | ||
| run: | | ||
| cd ${{ github.workspace }}/recipes/appimage-builder | ||
| export APPIMAGE_BUILDER_VERSION=$(appimage-builder --version | head -1 | cut -f 2 -d" ") | ||
| echo "APPIMAGE_BUILDER_VERSION=${APPIMAGE_BUILDER_VERSION}" >> $GITHUB_ENV | ||
| appimage-builder --skip-test | ||
| - name: Pack bash | ||
| run: | | ||
| # build bash | ||
| BUILDER_PATH=$(find $PWD -name appimage-builder-*.AppImage) | ||
| chmod +x "$BUILDER_PATH" | ||
| cd ${{ github.workspace }}/recipes/bash/ | ||
| "$BUILDER_PATH" --skip-test | ||
| - name: Test bash | ||
| run: | | ||
| cd ${{ github.workspace }}/recipes/bash/ | ||
| ./bash*.AppImage --appimage-extract-and-run -c "echo Hello World" | ||
| - name: Build AppImage (DEBUG runtime) | ||
| run: | | ||
| cd ${{ github.workspace }}/recipes/appimage-builder | ||
| appimage-builder --skip-test --recipe ./AppImageBuilder-debug.yml | ||
| - name: Compress Assets | ||
| run: | | ||
| cd ${{ github.workspace }}/recipes/appimage-builder | ||
| tar -cvf appimage-builder_x86_64-AppImage.tar -C ${{ github.workspace }}/recipes/appimage-builder/ *x86_64.AppImage* | ||
| tar -cvf appimage-builder_x86_64-AppImage-DEBUG.tar -C ${{ github.workspace }}/recipes/appimage-builder/ *-DEBUG.AppImage* | ||
| tar -cvf ${{ github.workspace }}/appimage-builder_python-dist.tar -C ${{ github.workspace }}/dist . | ||
| - name: Upload AppImageBuilder AppImage | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: appimage-builder.AppImage | ||
| path: '${{ github.workspace }}/recipes/appimage-builder/appimage-builder_x86_64-AppImage.tar' | ||
| retention-days: 7 | ||
| - name: Upload AppImageBuilder Debug AppImage | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: appimage-builder-DEBUG.AppImage | ||
| path: '${{ github.workspace }}/recipes/appimage-builder/appimage-builder_x86_64-AppImage-DEBUG.tar' | ||
| retention-days: 7 | ||
| - name: Upload AppImageBuilder Python dist | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: appimage-builder-pydist | ||
| path: '${{ github.workspace }}/appimage-builder_python-dist.tar' | ||
| retention-days: 7 | ||
| - name: Upload Bash AppImage | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: bash.AppImage | ||
| path: '${{ github.workspace }}/recipes/bash/*.AppImage*' | ||
| retention-days: 7 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| name: "CI Build" | ||
|
|
||
| on: | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build-and-test: | ||
| name: "Build and test" | ||
| uses: ./.github/workflows/build-test.yml |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
backout the sudo change and use
git config --global --add safe.directory $PWDyou dropped that command which is why you're seeing the ci errors about dubious ownership. I know its not optimal/feels dirty to have, but will get us over the initial merge hump and then it'll becomes my problem. =)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.
I'm trying out changes in the main branch of my fork. I am also going to update the canned action versions but I want to get this fixed first. I am now having another issue on arch, which seems stem from it trying to download non-existing signatures. I'm not really familiar enough with Arch to understand how to fix this:
https://github.com/Lord-Kamina/appimage-builder/actions/runs/25603560688/job/75161484580
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.
oi. interesting. most likely that mirror is out of sync/bad. since I actually run arch here is my current mirror list on my system. jsut replace it with some from here for now. that'll likely fix it.
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.
From what I was reading, it's a config issue because those sig files do not actually exist on mirrors.
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.
oh dear. well I'm more interested in ubuntu passing atm than arch. I'll happily cleanup arch after merging this.