Skip to content

update sharun to 3.7.1, deploy its dash and notice, and build demos on riscv64, loongarch64, ppc64le and ppc64 - #964

Closed
Nemo-010 wants to merge 6 commits into
pkgforge-dev:mainfrom
Nemo-010:sharun-3.7.0-dash
Closed

Nemo-010 wants to merge 6 commits into
pkgforge-dev:mainfrom
Nemo-010:sharun-3.7.0-dash

Conversation

@Nemo-010

@Nemo-010 Nemo-010 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Greetings from Port Edwards. Updates quick-sharun to sharun 3.7.1 and turns on the emulated arches for four demos.

sharun 3.7.1

3.7.0 reverted the embedded shell of 3.6.0 and ships the same patched dash as a dash file inside sharun+helper-libs-<arch>.tar. sharun runs AppRun.sh with <sharun dir>/dash when it is executable, and falls back to the host shells otherwise. 3.7.1 adds the BSD-3-Clause notice for dash to the tarball as dash-COPYING. All six tarball checksums are updated, and each was checked against the release's own .sha256 files.

That matters for the second half of this PR: the embedded dash of 3.6.0 was a foreign-arch ELF in a memfd, so under qemu user emulation binfmt_misc had to run it, and the kernel refuses to hand a close-on-exec fd to an interpreter. Every emulated AppImage died in AppRun.sh before the app started. With the dash shipped as a plain file next to sharun, that path is gone.

quick-sharun now deploys dash. It only extracted sharun, so without this the dash never reached the AppDir and the shell was silently looked up on the host again, which is the /bin/sh dependency the dash exists to remove:

  • _get_sharun extracts dash into the AppDir root next to sharun and chmods both.
  • dash is extracted separately from sharun. It is not in tarballs older than 3.7.0, and asking tar for a member that is not there fails the whole extraction. If it is missing the build warns and continues instead of dying.
  • The early return checks dash too. With only sharun present it used to skip the download entirely, so an AppDir built by an older quick-sharun would never get a dash.
  • _add_helper_libs keeps deleting dash from the preload dir, since it belongs next to sharun, not in lib/sharun-preload.
  • dash-COPYING goes to APPDIR/share/licenses/, not the AppDir root. The directory is only created when the tarball has the notice, so tarballs older than 3.7.1 do not leave an empty share/licenses behind.

Checked each of those against the real 3.7.1 tarball: sharun and dash land in the AppDir root executable, the notice lands in share/licenses, a 3.5.1 tarball warns and keeps the working sharun without leaving an empty directory, an AppDir with only sharun gets its dash, and lib/sharun-preload ends up with only the helper libs.

Emulated arches

A new build-additional-cpu-arches matrix builds the gtk3, gtk4, sdl and vkcube+glxgears demos for riscv64, loongarch64, ppc64le and ppc64 through qemu user emulation, and runs them. The binfmt handlers are registered before the container starts, with the script of anylinux-setup-action, because docker/setup-qemu-action ships no ppc64 (BE) handler. The release job now waits for that matrix too, using the same !cancelled() guard as the template so a disabled matrix does not block a release.

ppc64le, loongarch64 and riscv64 do have vulkan drivers in their repos, we just do not bundle them, so vkcube works there; only BE ppc64 predates vulkan and makes glxgears its main binary. vulkan-swrast is installed for the test on every arch, it is packaged for powerpc64 too.

On the four emulated arches the debloated mesa still ships the files that upstream now splits into vulkan-mesa-implicit-layers, which vulkan-swrast depends on, so installing it dies with a file conflict against its own mesa. Those two paths are passed to --overwrite; x86_64 and aarch64 do not carry them in the debloated mesa.

The sdl demo keeps plain sdl2: sdl2-compat provides sdl2 on riscv64 and loongarch64, so pacman resolves it.

Tested with a full matrix run on my fork: all five vkcube jobs green, including ppc64 with vulkan-swrast installed, and the emulated --test step runs again now that the shell is a real file next to sharun. The remaining failures were a transient mirror reset on loongarch64 and gtk3-demo (ppc64le) exiting with code 0 inside the test window, which it did before these changes too.

The notice was added to the tarball by pkgforge-dev/Anylinux-sharun#42, which shipped as 3.7.1.


We aim to provide the software that shapes the world of tomorrow.


Requested by Samueru via errand.
Conversation: https://discord.com/channels/1313385177703256064/1561764843965649021

…le and ppc64

3.7.0 reverts the embedded shell of 3.6.0 and ships the same patched dash as
a `dash` file inside sharun+helper-libs-<arch>.tar. sharun runs AppRun.sh
with it when it sits next to sharun, and falls back to the host shells
otherwise. That removes the reason the embedded design could not work under
qemu user emulation: the embedded dash was a foreign-arch ELF in a memfd, so
binfmt_misc had to run it and the kernel refuses to hand a close-on-exec fd
to an interpreter. All six per-arch tarballs and checksums are updated.

_get_sharun now extracts both sharun and dash into the AppDir root, and
_add_helper_libs removes dash from the preload dir along with sharun, so it
does not end up in lib/sharun-preload where nothing looks for it.

A new build-additional-cpu-arches matrix builds the gtk3, gtk4, sdl and
vkcube+glxgears demos for riscv64, loongarch64, ppc64le and ppc64 through
qemu user emulation, and runs them: with the shipped dash they start, which
they could not do before. The binfmt handlers are registered before the
container starts, with the script of anylinux-setup-action, because
docker/setup-qemu-action ships no ppc64 (BE) handler. The release job now
also waits for that matrix, using the same !cancelled() guard as the
template so a disabled matrix does not block a release.

There are no vulkan drivers on those arches, neither in the distro repos nor
in archlinux-pkgs-debloated, so the vkcube demo makes glxgears its main
binary there and skips the vulkan-swrast install that only matters when
vkcube is what gets launched.

The sdl demo uses sdl2-compat on riscv64 and loongarch64, where the sdl2
package is gone and sdl2-compat provides it.
sharun 3.7.0 ships the patched dash inside sharun+helper-libs-<arch>.tar
instead of embedding it, and runs AppRun.sh with <sharun dir>/dash when that
file is executable. quick-sharun only extracted sharun, so the dash never
reached the AppDir and the shell was silently looked up on the host again.

_get_sharun now extracts both into the AppDir root and chmods them, so the
AppImage keeps working on systems with no /bin/sh. dash is extracted
separately from sharun: it is not in tarballs older than 3.7.0, and asking
tar for a member that is not there fails the whole extraction.

The early return also checks dash now. With only sharun present it used to
skip the download entirely, so an AppDir built by an older quick-sharun
would never get a dash.

_add_helper_libs keeps deleting dash from the preload dir, since it belongs
next to sharun and not in lib/sharun-preload.
Comment thread useful-tools/demo/sdl-demo-appimage.sh Outdated
Comment thread useful-tools/demo/vkcube-glxgears-appimage.sh Outdated
pacman resolves the sdl2 package name to sdl2-compat on riscv64 and
loongarch64, since sdl2-compat provides sdl2, so the explicit case was not
needed.

ppc64le, loongarch64 and riscv64 do have vulkan drivers in their repos, we
just do not bundle them, so vkcube works there and only BE ppc64 predates
vulkan. vulkan-swrast is packaged for powerpc64 too, so it is installed
unconditionally again.
@Samueru-sama

Copy link
Copy Markdown
Member

@Nemo-010

Not addressed here: licenses/dash-COPYING is not in the tar, and BSD-3-Clause asks for the notice to travel with binary redistribution. That is in the sharun repo, so it is a separate change.

Open a PR to anylinux-sharun doing this.

3.7.1 adds the BSD-3-Clause notice to the tarball as dash-COPYING, so
quick-sharun deploys it next to dash in the AppDir root and drops it from
the preload dir along with sharun and dash.

It is extracted with its own tar call and failure ignored, since tarballs
older than 3.7.1 do not have it and asking tar for a missing member fails
the whole extraction.
ppc64le, loongarch64 and riscv64 do have vulkan drivers in their repos, we
just do not bundle them, so vkcube works there and only BE ppc64 predates
vulkan. vulkan-swrast is packaged for powerpc64 as well, so it is installed
unconditionally again and only ppc64 changes MAIN_BIN to glxgears.

On the four emulated arches the debloated mesa still ships the files that
upstream now splits into vulkan-mesa-implicit-layers, which vulkan-swrast
depends on, so the transaction dies with a file conflict against its own
mesa. Those two paths are passed to --overwrite; x86_64 and aarch64 do not
need it and are unaffected.
The BSD-3-Clause notice that ships with dash belongs with the other license
files, not in the AppDir root next to the binary, so it goes to
APPDIR/share/licenses/dash-COPYING.

The directory is only created when the tarball actually has the notice, so
tarballs older than 3.7.1 do not leave an empty share/licenses behind.
@Nemo-010

Copy link
Copy Markdown
Contributor Author

Both fixed, plus two things the changes surfaced.

sdl2 — done, dropped the case entirely. Confirmed on the riscv64 and loong64 repos that sdl2-compat carries provides sdl2=2.32.74, so pacman -S sdl2 resolves to it.

vkcube — you were right and I was wrong. I had only checked the debloated repo, not the distro repos; vulkan-radeon, vulkan-virtio and vulkan-swrast are all packaged for riscv64, loong64, powerpc64 and powerpc64le. Only BE ppc64 changes MAIN_BIN now, and vulkan-swrast is installed unconditionally again — it is packaged for powerpc64 too.

Two things came out of running it:

  1. Installing vulkan-swrast on the four emulated arches died with vulkan-mesa-implicit-layers: /usr/lib/libVkLayer_MESA_anti_lag.so exists in filesystem (owned by mesa). The debloated mesa for those arches still ships the implicit-layer files that upstream now splits into vulkan-mesa-implicit-layers, which vulkan-swrast depends on, so the transaction collides with its own mesa. Those two paths are passed to --overwrite. x86_64 and aarch64 do not carry those files in the debloated mesa and are unaffected.

  2. sharun 3.7.1 shipped with dash-COPYING in the tarball (my Bug: When running quick-sharun twice, PATH_MAPPING_HARDCODED tmp vars are appended twice to .env #42), so quick-sharun deploys it, and it now goes to APPDIR/share/licenses/dash-COPYING rather than the AppDir root.

Both versions are updated: 3.7.0 → 3.7.1, all six checksums verified against the release's own .sha256 files.

Verified with a full matrix run on my fork: all five vkcube jobs green, including ppc64 with vulkan-swrast installed, and the emulated --test step runs again now that the shell is a real file next to sharun. Remaining failures in that run were a transient mirror reset on loongarch64 and gtk3-demo (ppc64le) exiting with code 0 inside the test window — same as before these changes.

@Nemo-010 Nemo-010 changed the title update sharun to 3.7.0, deploy its dash, and build demos on riscv64, loongarch64, ppc64le and ppc64 update sharun to 3.7.1, deploy its dash and notice, and build demos on riscv64, loongarch64, ppc64le and ppc64 Oct 20, 2026
@Nemo-010

Copy link
Copy Markdown
Contributor Author

Superseded by #969, which is rebased on current main and opens from Nemo-010:main as requested.

@Nemo-010 Nemo-010 closed this Oct 21, 2026
@Nemo-010
Nemo-010 deleted the sharun-3.7.0-dash branch October 21, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants