Skip to content

Commit

Permalink
ci: workaround luacov-coveralls installation fail
Browse files Browse the repository at this point in the history
GitHub had disabled insecure git clone (see [1]), so we should use
`git+https://` in the rockspec instead of `git://`. The fix is proposed
to the upstream in [2], but is not merged at the moment of writting
this. This patch workarounds the problem on our side.

Recent luarocks (3.8.0) autoreplaces `git://` with `git+https://`, but
we have older luarocks version shipped with tarantool. See [3] for
details.

[1]: https://github.blog/2021-09-01-improving-git-protocol-security-github/
[2]: moteus/luacov-coveralls#30
[3]: tarantool/tarantool#6597
  • Loading branch information
Totktonada committed Apr 4, 2022
1 parent dd9fd7c commit 75bd2b7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,18 @@ tarantoolctl rocks install https://raw.githubusercontent.com/mpeterv/cluacov/mas
tarantoolctl rocks install https://raw.githubusercontent.com/LuaDist/dkjson/master/dkjson-2.5-2.rockspec
tarantoolctl rocks install https://raw.githubusercontent.com/keplerproject/luafilesystem/master/luafilesystem-scm-1.rockspec
tarantoolctl rocks install https://raw.githubusercontent.com/moteus/lua-path/master/rockspecs/lua-path-scm-0.rockspec
tarantoolctl rocks install https://raw.githubusercontent.com/moteus/luacov-coveralls/master/rockspecs/luacov-coveralls-scm-0.rockspec

# Most of this code is the workaround for
# https://github.com/moteus/luacov-coveralls/pull/30
# Remove it, when the pull request will be merged.
TMPDIR="$(mktemp -d)"
LUACOV_COVERALLS_ROCKSPEC_URL="https://raw.githubusercontent.com/moteus/luacov-coveralls/master/rockspecs/luacov-coveralls-scm-0.rockspec"
LUACOV_COVERALLS_ROCKSPEC_FILE="${TMPDIR}/luacov-coveralls-scm-0.rockspec"
curl -fsSL "${LUACOV_COVERALLS_ROCKSPEC_URL}" > "${LUACOV_COVERALLS_ROCKSPEC_FILE}"
sed -i -e 's@git://@git+https://@' "${LUACOV_COVERALLS_ROCKSPEC_FILE}"
tarantoolctl rocks install "${LUACOV_COVERALLS_ROCKSPEC_FILE}"
rm "${LUACOV_COVERALLS_ROCKSPEC_FILE}"
rmdir "${TMPDIR}"

tarantoolctl rocks install cartridge 2.7.3
tarantoolctl rocks install ddl 1.6.0
Expand Down

0 comments on commit 75bd2b7

Please sign in to comment.