Commit Graph
5 Commits
Author SHA1 Message Date
Lauri Ojansivu c61a1b7f41 build.sh and releases/*.sh work on Arch Linux and Omarchy.
Omarchy (https://omarchy.org) is Arch with Hyprland: pacman, the Arch
repositories and yay for the AUR. The shared detector in
releases/ensure-tools.sh now names Omarchy and the other Arch derivatives
(EndeavourOS, CachyOS, Manjaro) explicitly, and what the scripts did there
is fixed:

- No more `pacman -Sy <package>`: that is a partial upgrade, which Arch does
  not support. _et_pacman installs with `-S --needed`, does a full `-Syu`
  only when pacman has never synced (a fresh archlinux container) or when
  WEKAN_PACMAN_SYU=1 asks for it, and otherwise says to update first, naming
  omarchy-update on Omarchy.
- 7zip instead of p7zip, which Arch has replaced.
- snapcraft: snapd from the AUR with yay or paru (never as root), then
  snapd.socket, /snap and the snapcraft snap, instead of only an error.
- The SSH server menu entries use sshd.service outside Debian/Ubuntu, where
  the unit is not called ssh.
- Playwright: `install --with-deps` runs apt-get, so outside Debian/Ubuntu
  the browser libraries come from pacman (or dnf) and the browsers are
  installed without --with-deps. WebKit, which Playwright builds for
  Debian/Ubuntu only, runs in the Playwright Docker image on Arch when
  Docker is there.
- The en_US.UTF-8 locale note gives the Arch/Omarchy steps too.

tests/archOmarchyScripts.test.cjs drives the helpers offline with stubbed
sudo/pacman/yay, and its negative test fails if any tracked shell script
does a `pacman -Sy` partial upgrade or installs p7zip.

Thanks to xet7 !
2026-11-06 01:57:00 +02:00
Lauri Ojansivu 433e58a618 Tests pass shell paths through the environment, not into bash -c scripts.
GitHub CodeQL code scanning alerts #549 and #550
(js/shell-command-injection-from-environment): tests/snapSettingsKeys and
tests/snapSocketDenied ran `bash -c` with a script that interpolated an
absolute path built from __dirname (`source "${configPath}"`,
`source "${helper}"`). A checkout path containing a quote, `$(` or a
backtick would change the command that runs. tests/linuxPackageManagers
and tests/snapCaddyNofile6552 had the same shape without an alert yet.

All four now pass the path (and the soft limit, and the wekan-control
function under test) in environment variables, so every script text is
constant. tests/testShellPathsFromEnv.test.cjs fails on any test that
sources an interpolated value, and checks it catches the flagged forms.
These are test files run on a developer machine or CI, so no attack can be
attempted against a running WeKan and nothing is logged in Admin Panel ->
Problems.

Thanks to GitHub CodeQL and xet7 !
2026-10-08 00:16:24 +03:00
Lauri Ojansivu ef8b1043e4 Support macOS zsh script invocation.
Thanks to xet7 !
2026-08-22 23:50:27 +03:00
Lauri Ojansivu 6d6c574cd0 Configure EPEL for snapd on enterprise Linux.
Thanks to xet7 !
2026-08-22 23:50:27 +03:00
Lauri Ojansivu 87252792f7 Support additional Linux package managers.
Thanks to xet7 !
2026-08-22 23:50:27 +03:00