enhance(main/neovim{,-nightly},main/vim,x11/vim-gtk): document has('termux') feature flag#28681
enhance(main/neovim{,-nightly},main/vim,x11/vim-gtk): document has('termux') feature flag#28681TomJo2000 wants to merge 3 commits intotermux:masterfrom
has('termux') feature flag#28681Conversation
52b92df to
50e987f
Compare
|
The build currently seems to die on this right here. termux-packages/build-package.sh Lines 652 to 662 in f9bc63a Which would indicate that the flock is not being properly released in this instance.I can replicate the issue locally so this is probably not directly related to AppArmor. |
|
I have a feeling we accidentally disallowed the container from using the That would have been introduced by 221ce1f#diff-6f419dc9863f442f8b508a38b040ec549d82031311653f4b372243adc3653987, but I don't know how I could test that to verify. More eyes would be appreciated on this. |
|
I don't have apparmor so I'm not sure if I will be a lot of help in this case, but thunder-coding does and will be able to locally troubleshoot this. |
You are running apparmor locally as well, though, aren't you? |
Nope. |
|
Oh, I misunderstood and I thought you had AppArmor. I'll try to reproduce this |
|
I wasn't able to reproduce this when just using |
Is your docker container up to date? |
I was able to replicate this locally in some instances, but during later testing they went away, so I thought it was just some weird codepath that didn't trigger when I completed my PR. And this is affecting CI as well now. So will try digging into after python rebuilds are complete |
Yes |
|
It may not be related to flock, maybe just because that fuse-overlayfs has not stopped running. |
|
4fd4e48 should fix this |
50e987f to
e91addb
Compare
|
We need to explicitly run the |
e91addb to
fd88be6
Compare
/home/builder/.termux-build/neovim/src/.deps/build/src/libuv/src/unix/linux.c:2331:36: error: use of undeclared identifier 'LLONG_MAX'
2331 | constraint->quota_per_period = LLONG_MAX;
| ^
1 error generated.
gmake[6]: *** [CMakeFiles/uv_a.dir/build.make:513: CMakeFiles/uv_a.dir/src/unix/linux.c.o] Error 1
gmake[6]: Leaving directory '/home/builder/.termux-build/neovim/src/.deps/build/src/libuv-build'
gmake[5]: *** [CMakeFiles/Makefile2:87: CMakeFiles/uv_a.dir/all] Error 2
gmake[5]: Leaving directory '/home/builder/.termux-build/neovim/src/.deps/build/src/libuv-build'
gmake[4]: *** [Makefile:136: all] Error 2
gmake[4]: Leaving directory '/home/builder/.termux-build/neovim/src/.deps/build/src/libuv-build'
gmake[3]: *** [CMakeFiles/libuv.dir/build.make:86: build/src/libuv-stamp/libuv-build] Error 2
gmake[3]: Leaving directory '/home/builder/.termux-build/neovim/src/.deps'
gmake[2]: *** [CMakeFiles/Makefile2:158: CMakeFiles/libuv.dir/all] Error 2
gmake[2]: Leaving directory '/home/builder/.termux-build/neovim/src/.deps'
gmake[1]: *** [Makefile:91: all] Error 2
gmake[1]: Leaving directory '/home/builder/.termux-build/neovim/src/.deps'
make: *** [Makefile:108: deps] Error 2Yeah I got nothing... |
|
Moving it to Apparently running |
dc5c67a to
760c3e8
Compare
|
Moving the We can just patch the pre-generated docs in the tarball, it's fine. |
27f4b8e to
978717b
Compare
| +--- android Alias for has('termux') | ||
| +--- termux Termux environment (The *termux* and *android* |
There was a problem hiding this comment.
Not an objection, just curious: does vim.uv.os_uname() return enough info to achieve this?
There was a problem hiding this comment.
I don't think that's gonna be terribly useful unfortunately.
-- package version: neovim 0.11.6-2
-- nvim --clean
{
machine = "aarch64",
release = "5.4.274-qgki-g6ef38bd89f5c",
sysname = "Linux",
version = "#1 SMP PREEMPT Wed Jan 28 16:01:13 CST 2026"
}I get the same result with neovim-nightly (0.12.0~dev-2508+g61f166ec40)
There was a problem hiding this comment.
Anything else come to mind that could be a useful proxy?
For compile time Android checking we usually use #ifdef __ANDROID__ and/or __TERMUX__.
We should be able to apply that to the src/nvim/eval/funcs.c part of this patch at least.
Which is taken from this prior original patch
https://github.com/termux/termux-packages/blob/994dcc0/packages/neovim/src-nvim-eval-funcs.c.patch
- Originally introduced in Make has(android/termux) return true in neovim/vim #7545
An equivalent patch also exists for our vim/vim-gtk package, so I should at least update that patch to include documentation of the feature flags as well.
I'm not sure how we could cleanly extrapolate the presence of those definitions from the C preprocessor to the doc generation,
or if we can use an equivalent proxy for that.
There was a problem hiding this comment.
We could add a build flag so that has('foo') works for an arbitrary build-time value, but yeah the docs are less obvious.
There was a problem hiding this comment.
I'm working on updating the vim patch right now,
but yeah I'm still drawing a blank for making that conditional for the docs.
There was a problem hiding this comment.
actually, we can just update the docs directly upstream. PR would be appreciated
mention this issue/PR so we have a reference
There was a problem hiding this comment.
Guess I'm making a PR to Vim and Neovim then.
I just finished reworking the vim patch as well.
I'm guessing specific wording can be worked out there, what I have here is just the first things that came to mind.
With the C pre-proc macro checks this also decouples the termux and android feature flags.
So if some other project wants to compile Vim/Neovim on Android they wouldn't necessarily inherit the termux feature, since the __TERMUX__ macro is added as part of out Android NDK patches.
termux-packages/ndk-patches/29/sys-cdefs.h.patch
Lines 1 to 9 in 0c87916
978717b to
b356259
Compare
has('termux') feature flaghas('termux') feature flag
|
Superseded by: |

This PR replaces the
src-nvim-eval-funcs.c.patchfor theneovim/neovim-nightlypackages with a more comprehensive version,has-termux.patch.The renamed and expanded patch adds documentation of the
has('termux')andhas('android')feature flags added by the original patch.In addition the added documentation also makes available the
:h termuxand:h androidhelp tags, pointing to the additional information about the feature flags.The syntax and style guide for the vimdoc documentation format are documented in:
:h help-writingand:h dev-docThe formatting on the help file is a bit wonky in the patch, however I have confirmed manually that it is indented identically to the rest of the section.
(Contrast of indentation guides enhanced manually for visual clarity.)