feat(nosudo): install tmux without sudo, and stop CI masking the gap - #56
Merged
Merged
Conversation
This repo ships .tmux.conf, .tmux.conf.local and clones tmux plugins, so a host with the configs and no tmux binary is incoherent. That is what a non-sudoer got: nothing in the no-sudo path ever installed tmux. Found on a real fleet host, not in CI. _install_tmux fetches the static AppImage (nelsonenzo/tmux-appimage - third party, because upstream publishes source only) and falls back to --appimage-extract where FUSE is absent. That fallback is not theoretical: it is the path that fires in containers and on the host where this surfaced. apt is still preferred; this runs only when CAN_APT=false. CI could not have caught it. Both no-sudo jobs and Dockerfile.nosudo pre-installed tmux as a root prerequisite, so `has tmux` was true before install.sh ran and 15 green cells said nothing about the missing installer - the environment was supplying the thing under test. Those prerequisites are removed, so the install path must now provide tmux and test.sh must find it. Verified: no-sudo container with no sudo binary and no tmux installs 3.5a via the extract path, starts a real session, and a second run skips; same on almalinux:9. Red-proofed against master, where the probe fails with _install_tmux: command not found. ci-local.sh nosudo-auto passes on both ubuntu:24.04 and alma 9, and inside the built image tmux resolves to ~/.local/bin/tmux -> ~/.local/opt/squashfs-root/usr/bin/tmux.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
A non-sudoer could install these dotfiles and end up with tmux config and tmux
plugins but no tmux binary.
_install_tmuxcloses that, and the no-sudo CIjobs stop pre-installing tmux so the path is actually exercised.
Why it existed, and why CI was never going to find it
Nothing in the no-sudo path installed tmux. The apt branch gets it from apt; the
no-apt branch only printed
tmux not found - install it: <hint>- while the samerun went on to link
.tmux.conf, link.tmux.conf.localand clone tmux plugins.CI reported 15 green no-sudo cells throughout. Both no-sudo jobs and
Dockerfile.nosudoinstalled tmux as a root prerequisite, sohas tmuxwastrue before
install.shran. The test environment was supplying the thing undertest - a green that meant less than it appeared. Removing that prerequisite is the
actual mechanization here; the installer alone would have left the hole open for
the next tool.
Found on a real host (a fleet box where the operator's account is not in sudoers),
not by any check in this repo.
How
_install_tmuxfetches the static AppImage fromnelsonenzo/tmux-appimage. Twothings stated plainly rather than buried:
latest release carries just
tmux-<ver>.tar.gz), and building it needs libeventand ncurses built locally too, so there is no one-command official binary. The
installer verifies the binary runs before linking it and logs where it came from.
--appimage-extractis what actually installs it. That is not a theoreticalfallback: it is the path that fired in every container tested and on the host
where this surfaced.
apt remains preferred; this runs only when
CAN_APT=false. x86_64 only - otherarches get a warning naming the package manager instead.
Verified
Container with no sudo binary and no tmux, unprivileged user:
Same result on
almalinux:9(the RHELCAN_APT=falsepath).Red-proof. The same probe against
masterfails, so it discriminates:Repo gate for install-logic changes (CLAUDE.md requires this):
bash ci-local.sh --ubuntu 24.04 --profile nosudo-auto- PASS 1/1bash ci-local.sh --alma 9 --profile nosudo-auto- PASS 1/1And the green means what it claims -
test.shdoescheck_cmd tmuxand starts areal session with the repo's own config, and inside the built image:
Also:
bash test.sh workstation61/62, 0 failures, 1 skip (unchanged);tests/lint-workflows.shPASSED;tests/ci-gate-covers-all.pypasses; shellcheckclean.
Deliberately not in this PR
update.shhas notmuxentry, so an AppImage-installed tmux is not refreshed byupdate.sh- re-running the install replaces it. Adding a tool entry touches thearg parser and
_KNOWN_TOOLS, which is a separate concern; saying so rather thanleaving it as a silent gap.
batis missing from this repo in the same way. It is a feature rather than abroken promise, so it is not folded in here.