forked from pool/lua-shell-games
Compare commits
3 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
|
b443b8da2b
|
|||
|
ef1e230fb7
|
|||
|
848effada5
|
@@ -1,5 +1,5 @@
|
|||||||
<multibuild>
|
<multibuild>
|
||||||
<package>lua51</package>
|
<package>luajit</package>
|
||||||
<package>lua53</package>
|
<package>lua53</package>
|
||||||
<package>lua54</package>
|
<package>lua54</package>
|
||||||
</multibuild>
|
</multibuild>
|
||||||
|
|||||||
@@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 24 14:51:00 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||||
|
|
||||||
|
- Switch off building lua51 build of the package.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Oct 12 21:51:09 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||||
|
|
||||||
|
- Make the package buildable with LuaJIT.
|
||||||
|
- Add luajit-w-capture_combined_spec-with-new-shell.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jan 25 10:52:05 UTC 2023 - Michal Suchanek <msuchanek@suse.de>
|
Wed Jan 25 10:52:05 UTC 2023 - Michal Suchanek <msuchanek@suse.de>
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ License: MIT
|
|||||||
Group: Development/Libraries/Other
|
Group: Development/Libraries/Other
|
||||||
URL: https://github.com/GUI/lua-shell-games
|
URL: https://github.com/GUI/lua-shell-games
|
||||||
Source: https://github.com/GUI/lua-shell-games/archive/v%{version}.tar.gz#/lua-%{mod_name}-%{version}.tar.gz
|
Source: https://github.com/GUI/lua-shell-games/archive/v%{version}.tar.gz#/lua-%{mod_name}-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM Fix-capture_combined_spec-with-new-shell.patch mcepl@suse.com
|
||||||
Patch1: Fix-capture_combined_spec-with-new-shell.patch
|
Patch1: Fix-capture_combined_spec-with-new-shell.patch
|
||||||
|
# PATCH-FIX-UPSTREAM luajit-w-capture_combined_spec-with-new-shell.patch gh#GUI/lua-shell-games!5 mcepl@suse.com
|
||||||
|
Patch2: luajit-w-capture_combined_spec-with-new-shell.patch
|
||||||
BuildRequires: %{flavor}-busted
|
BuildRequires: %{flavor}-busted
|
||||||
BuildRequires: %{flavor}-devel
|
BuildRequires: %{flavor}-devel
|
||||||
BuildRequires: %{flavor}-luacheck
|
BuildRequires: %{flavor}-luacheck
|
||||||
@@ -57,6 +60,7 @@ When executing shell commands, shell-games wraps either os.execute or io.popen
|
|||||||
%autosetup -p1 -n lua-%{mod_name}-%{version}
|
%autosetup -p1 -n lua-%{mod_name}-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
:
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -m 0755 -p -d %{buildroot}%{lua_noarchdir}
|
install -m 0755 -p -d %{buildroot}%{lua_noarchdir}
|
||||||
@@ -64,10 +68,14 @@ install -v -D -m 0644 -p -t %{buildroot}%{lua_noarchdir} lib/%{mod_name}.lua
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
ln -sfv lib/%{mod_name}.lua .
|
ln -sfv lib/%{mod_name}.lua .
|
||||||
%if "%{flavor}" == "lua51"
|
%if "%{flavor}" == "luajit"
|
||||||
REFUTE_LUA52_BEHAVIOR=true \
|
export REFUTE_LUA52_BEHAVIOR="true"
|
||||||
%endif
|
%endif
|
||||||
EXPECTED_LUA_VERSION="Lua %{lua_version}" make %{?_make_output_sync} %{?_smp_mflags} test
|
%if "%{flavor}" == "luajit"
|
||||||
|
export EXPECTED_LUAJIT_VERSION="LuaJIT 2.1"
|
||||||
|
%endif
|
||||||
|
export EXPECTED_LUA_VERSION="Lua %{lua_version}"
|
||||||
|
busted --lua="/usr/bin/lua"
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
|
|||||||
22
luajit-w-capture_combined_spec-with-new-shell.patch
Normal file
22
luajit-w-capture_combined_spec-with-new-shell.patch
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
spec/capture_combined_spec.lua | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
Index: lua-shell-games-1.1.0/spec/capture_combined_spec.lua
|
||||||
|
===================================================================
|
||||||
|
--- lua-shell-games-1.1.0.orig/spec/capture_combined_spec.lua 2025-10-12 23:42:07.932450126 +0200
|
||||||
|
+++ lua-shell-games-1.1.0/spec/capture_combined_spec.lua 2025-10-12 23:45:53.594608925 +0200
|
||||||
|
@@ -77,10 +77,10 @@
|
||||||
|
if string.match(result["output"], "cd: line 1") then
|
||||||
|
assert.are.same({
|
||||||
|
command = [[sh -c 'cd '"'"'spec/tmp/not existent with spaces'"'"' && ls -1 chdir.txt' 2>&1]],
|
||||||
|
- status = 2,
|
||||||
|
- output = "sh: cd: line 1: can't cd to spec/tmp/not existent with spaces: No such file or directory\n",
|
||||||
|
+ status = 1,
|
||||||
|
+ output = "sh: line 1: cd: spec/tmp/not existent with spaces: No such file or directory\n",
|
||||||
|
}, result)
|
||||||
|
- assert.are.equal("Executing command failed (exit code 2): sh -c 'cd '\"'\"'spec/tmp/not existent with spaces'\"'\"' && ls -1 chdir.txt' 2>&1\nOutput: sh: cd: line 1: can't cd to spec/tmp/not existent with spaces: No such file or directory\n", err)
|
||||||
|
+ assert.are.equal("Executing command failed (exit code 1): sh -c 'cd '\"'\" 'spec/tmp/not existent with spaces'\"'\"' && ls -1 chdir.txt' 2>&1\nOutput: sh: line 1: cd: spec/tmp/not existent with spaces: No such file or directory\n", err)
|
||||||
|
elseif string.match(result["output"], "sh: line 1") then
|
||||||
|
assert.are.same({
|
||||||
|
command = [[sh -c 'cd '"'"'spec/tmp/not existent with spaces'"'"' && ls -1 chdir.txt' 2>&1]],
|
||||||
Reference in New Issue
Block a user