Skip to content

Commit c2ef083

Browse files
authored
fix: temporary fix for broken luarocks server (#12277)
1 parent f1630d2 commit c2ef083

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

.github/workflows/code-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
2525
sudo -E ./ci/linux-install-openresty.sh
2626
./utils/linux-install-luarocks.sh
27-
sudo -E luarocks install luacheck
27+
sudo -E luarocks install --only-server https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/daab2726276e3282dc347b89a42a5107c3500567 luacheck
2828
2929
- name: Script
3030
run: |

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ deps: install-runtime
133133
$(ENV_LUAROCKS) config $(ENV_LUAROCKS_FLAG_LOCAL) variables.OPENSSL_LIBDIR $(addprefix $(ENV_OPENSSL_PREFIX), /lib); \
134134
$(ENV_LUAROCKS) config $(ENV_LUAROCKS_FLAG_LOCAL) variables.OPENSSL_INCDIR $(addprefix $(ENV_OPENSSL_PREFIX), /include); \
135135
$(ENV_LUAROCKS) config $(ENV_LUAROCKS_FLAG_LOCAL) variables.YAML_DIR $(ENV_LIBYAML_INSTALL_PREFIX); \
136-
$(ENV_LUAROCKS) install apisix-master-0.rockspec --tree deps --only-deps $(ENV_LUAROCKS_SERVER_OPT); \
136+
# --only-server is a temporary fix until https://github.com/luarocks/luarocks/issues/1797 is resolved. \
137+
# NOTE: This fix is taken from https://github.com/luarocks/luarocks/issues/1797#issuecomment-2927856212 \
138+
# and no packages after 29th May 2025 can be installed. This is to be removed as soon as the luarocks issue is fixed \
139+
$(ENV_LUAROCKS) install --only-server https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/daab2726276e3282dc347b89a42a5107c3500567 apisix-master-0.rockspec --tree deps --only-deps $(ENV_LUAROCKS_SERVER_OPT); \
137140
else \
138141
$(call func_echo_warn_status, "WARNING: You're not using LuaRocks 3.x; please remove the luarocks and reinstall it via https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh"); \
139142
exit 1; \

autodocs/generate.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ build() {
2525
apt-get -y update --fix-missing
2626
apt-get -y install lua5.1 liblua5.1-0-dev
2727
curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash -
28-
luarocks install ldoc
28+
# --only-server is a temporary fix until https://github.com/luarocks/luarocks/issues/1797 is resolved. \
29+
# NOTE: This fix is taken from https://github.com/luarocks/luarocks/issues/1797#issuecomment-2927856212 \
30+
# and no packages after 29th May 2025 can be installed. This is to be removed as soon as the luarocks issue is fixed \
31+
luarocks install --only-server https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/daab2726276e3282dc347b89a42a5107c3500567 ldoc
2932

3033
# generate docs
3134
rm -rf autodocs/output || true

ci/common.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ create_lua_deps() {
3535
make deps
3636

3737
# just for jwt-auth test
38-
luarocks install lua-resty-openssl --tree deps
38+
# --only-server is a temporary fix until https://github.com/luarocks/luarocks/issues/1797 is resolved. \
39+
# NOTE: This fix is taken from https://github.com/luarocks/luarocks/issues/1797#issuecomment-2927856212 \
40+
# and no packages after 29th May 2025 can be installed. This is to be removed as soon as the luarocks issue is fixed \
41+
luarocks install --only-server https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/daab2726276e3282dc347b89a42a5107c3500567 lua-resty-openssl --tree deps
3942

4043
# maybe reopen this feature later
4144
# luarocks install luacov-coveralls --tree=deps --local > build.log 2>&1 || (cat build.log && exit 1)

ci/linux_apisix_current_luarocks_runner.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ script() {
3636
sudo rm -rf /usr/local/share/lua/5.1/apisix
3737

3838
# install APISIX with local version
39-
luarocks install apisix-master-0.rockspec --only-deps > build.log 2>&1 || (cat build.log && exit 1)
39+
# --only-server is a temporary fix until https://github.com/luarocks/luarocks/issues/1797 is resolved. \
40+
# NOTE: This fix is taken from https://github.com/luarocks/luarocks/issues/1797#issuecomment-2927856212 \
41+
# and no packages after 29th May 2025 can be installed. This is to be removed as soon as the luarocks issue is fixed \
42+
luarocks install --only-server https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/daab2726276e3282dc347b89a42a5107c3500567 apisix-master-0.rockspec --only-deps > build.log 2>&1 || (cat build.log && exit 1)
4043
luarocks make apisix-master-0.rockspec > build.log 2>&1 || (cat build.log && exit 1)
4144
# ensure all files under apisix is installed
4245
diff -rq apisix /usr/local/share/lua/5.1/apisix

0 commit comments

Comments
 (0)