这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Ra2-IFV
Copy link
Contributor

@Ra2-IFV Ra2-IFV commented Oct 16, 2025

CI won't pass because current docker image doesn't have lua5.4

Also includes a small fix for linting on different branches, triggered by whatever

@Ra2-IFV Ra2-IFV force-pushed the feat_luarocks_final branch from 0269f9e to e0a418f Compare October 16, 2025 18:50
@Ra2-IFV
Copy link
Contributor Author

Ra2-IFV commented Oct 16, 2025

While this PR is simple it took me a whole night to understand how termux build system works. RTFM

Copy link
Member

@robertkirkman robertkirkman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are no other packages that depended on the termux-package-builder container having lua 5.1 in /usr (as opposed to the termux package lua 5.1 in $TERMUX_PREFIX), so lua 5.1 can be safely removed from setup-ubuntu.sh.

@TomJo2000
Copy link
Member

What's the benefit of building Luarocks against Lua5.4 anyway?
It's probably worth doing just on its own merit but is there any larger impetus for doing so?

LuaJIT does seem to be supported as a Lua 5.1 implementation, so would that be another option here or is there something I'm missing?
https://github.com/luarocks/luarocks/blob/v3.12.2/configure#L352-L354

@Ra2-IFV
Copy link
Contributor Author

Ra2-IFV commented Oct 16, 2025

Benefits? No, I didn't take that into consideration. Just bump to a newer version, and that's all.
Official installation guide uses latest lua release btw

@TomJo2000
Copy link
Member

Yeah that's fine, just wanted to know if there was some other motivation for it.

Signed-off-by: Ryan Keane <the.ra2.ifv@gmail.com>
Prerequisite for bumping lua version from 5.1 to 5.4 for luarocks.

Signed-off-by: Ryan Keane <the.ra2.ifv@gmail.com>
@TomJo2000 TomJo2000 force-pushed the feat_luarocks_final branch from e0a418f to 2820aeb Compare October 17, 2025 02:38
@TomJo2000
Copy link
Member

I've rebased this PR against the latest state of the master branch and reworded the commit messages to follow our standard format.
https://github.com/termux/termux-packages/blob/master/CONTRIBUTING.md#commit-guidelines
Don't worry if you missed this section earlier.

Copy link
Member

@TomJo2000 TomJo2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good to merge, I'm just waiting for the I to finish on the latest rebase.

@TomJo2000 TomJo2000 merged commit 639a9f2 into termux:master Oct 17, 2025
12 of 18 checks passed
@TomJo2000
Copy link
Member

The CI seems to have hit a fluke failure state on the master branch,
https://github.com/termux/termux-packages/actions/runs/18581004881
I'm rerunning a build for luarocks manually.
https://github.com/termux/termux-packages/actions/runs/18581061027

@robertkirkman
Copy link
Member

The CI seems to have hit a fluke failure state on the master branch, https://github.com/termux/termux-packages/actions/runs/18581004881 I'm rerunning a build for luarocks manually. https://github.com/termux/termux-packages/actions/runs/18581061027

Unfortunately, the update seems to still not have reached the server:

https://packages.termux.dev/apt/termux-main/pool/main/l/luarocks/

image

@TomJo2000
Copy link
Member

Reminder to self, do not merge stuff immediately before going to bed.

@Ra2-IFV
Copy link
Contributor Author

Ra2-IFV commented Oct 17, 2025

I've rebased this PR against the latest state of the master branch and reworded the commit messages to follow our standard format. https://github.com/termux/termux-packages/blob/master/CONTRIBUTING.md#commit-guidelines Don't worry if you missed this section earlier.

I even didn't take a look at it, sry

@Ra2-IFV Ra2-IFV deleted the feat_luarocks_final branch October 17, 2025 11:52
@Ra2-IFV
Copy link
Contributor Author

Ra2-IFV commented Oct 17, 2025

Network issue? E: Failed to fetch xxx

@Ra2-IFV
Copy link
Contributor Author

Ra2-IFV commented Oct 17, 2025

https://github.com/termux/termux-packages/actions/runs/18581061027
This one fails because docker image hadn't finish building yet...

@Ra2-IFV
Copy link
Contributor Author

Ra2-IFV commented Oct 17, 2025

Yeah, this fails because it was using docker image
sha256:5758c2453391660af537ad23906d4ccb28782f49969c7d36568f5b09cc71abe8, not this one with lua5.4 sha256:538bf45b77dda89b2c64e9482c80ebbfd15bd80d64c54c040a06a50372c8a299
Try again, please

@TomJo2000
Copy link
Member

Okay so we just hit an edge case due to the image rebuild.
Probably something we can look into later.

@robertkirkman
Copy link
Member

robertkirkman commented Oct 17, 2025

Yeah, this fails because it was using docker image sha256:5758c2453391660af537ad23906d4ccb28782f49969c7d36568f5b09cc71abe8, not this one with lua5.4 sha256:538bf45b77dda89b2c64e9482c80ebbfd15bd80d64c54c040a06a50372c8a299 Try again, please

In this situation, I think you should be able to solve this by opening another PR to revision-bump luarocks again, with the name revbump(main/luarocks): 3.12.2-3 and this content:

--- a/packages/luarocks/build.sh
+++ b/packages/luarocks/build.sh
@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Deployment and management system for Lua modules"
 TERMUX_PKG_LICENSE="MIT"
 TERMUX_PKG_MAINTAINER="@termux"
 TERMUX_PKG_VERSION="3.12.2"
-TERMUX_PKG_REVISION=2
+TERMUX_PKG_REVISION=3
 TERMUX_PKG_SRCURL=https://luarocks.org/releases/luarocks-${TERMUX_PKG_VERSION}.tar.gz
 TERMUX_PKG_SHA256=b0e0c85205841ddd7be485f53d6125766d18a81d226588d2366931e9a1484492
 TERMUX_PKG_AUTO_UPDATE=true

you can do it if you want or if you prefer, I can open it

@Ra2-IFV
Copy link
Contributor Author

Ra2-IFV commented Oct 17, 2025

But why? Already bumped and no more changes, we just need a rebuild, using the new docker image

@robertkirkman
Copy link
Member

But why? Already bumped and no more changes, we just need a rebuild, using the new docker image

sometimes in termux-packages, if a package fails to build in CI like this after the merge to master branch, it unfortunately becomes difficult or impossible to successfully "rebuild" it at all in a way that is capable of deploying the update into the apt repository without actually creating another PR:

image

however, if you and Tomjo2000 would like to use this case to investigate whether that is possible, then you can.

@Ra2-IFV
Copy link
Contributor Author

Ra2-IFV commented Oct 17, 2025

Isn't triggering workflow_dispatch enough?

@Ra2-IFV
Copy link
Contributor Author

Ra2-IFV commented Oct 18, 2025

I think any one of "Members" can try re-running this job (Github allows you to do so)
image

Or trigger a new job like this, this should be enough

image

@robertkirkman
Copy link
Member

But why? Already bumped and no more changes, we just need a rebuild, using the new docker image

licy183 ended up doing the thing I said instead, in this:

@robertkirkman
Copy link
Member

There has been a report that unfortunately, this PR caused the 3rd party software "rocks-git.nvim" to begin failing with this error:

ERROR | 2025-11-07 15:30:24.171 | ....local/share/nvim/rocks/rocks_rtp/lua/rocks/luarocks.lua:66 | ln: failed to create hard link '/data/data/com.termux/files/home/.local/share/nvim/rocks/lockfile.lfs' => '/data/data/com.termux/files/home/.local/share/nvim/rocks/.lock.tmp.71836202': Permission denied

I don't personally know how to fix that, but it appears that maybe, the change has caused some component or dependency of the 3rd party software to fail to detect the system luarocks, and maybe resulted in it autodownloading and attempting to use an unpatched vanilla luarocks that lacks this important patch:

I don't personally know how to completely adapt this other distro's luarocks package logic to Termux, but I noticed that Arch Linux appears to contain a luarocks package that is somehow configured to connect to all four different versions of Lua at the same time, rather than being restricted to a single version of Lua:

https://gitlab.archlinux.org/archlinux/packaging/packages/luarocks/-/blob/e9e8810bdd76a9d75f9e3a21528a78fb35f3c5e0/PKGBUILD#L54-L57

However, according to the issues page of the Arch Linux package, it seems like that approach might also not be completely without problems:

https://gitlab.archlinux.org/archlinux/packaging/packages/luarocks/-/issues/4

@Ra2-IFV do you happen to know how to fix that?

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.

3 participants