-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed debian release #63
Conversation
Thanks for the bug fix! A quick grep over the LuaRocks codebase shows that they’ve switched to
I’d escape the whole path, just in case. Do you want to fix this, or should I do it? If you do, you can rebase Thanks! |
I can fix it, thanks for the feedback. |
f1d9a34
to
2de38ef
Compare
…uaposix chmod. Changed the debian script to also use the luaposix chmod.
@@ -109,7 +110,8 @@ function s.script(project) | |||
"love '"..loveFileDeb:gsub("'", "\\'").."'\n", | |||
true | |||
) | |||
assert(fs.chmod(tempDir.."/usr/bin/"..project.package, "+x")) | |||
|
|||
assert(posix.chmod(tempDir.."/usr/bin/"..project.package, 'u+x')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really u+x
? If the package is installed as root, then only root will be able to execute the game, right ?
I think that a better perm would be rwxr-xr-x
(0755).
… and I can’t compile LuaPosix. |
My installation of luaposix also failed initially with luarocks so I used their luke file to install it -> https://github.com/luaposix/luaposix/tree/master/build-aux |
I think I’m gonna go with diff --git a/src/scripts/debian.lua b/src/scripts/debian.lua
index 24ddf8e..e3b1578 100644
--- a/src/scripts/debian.lua
+++ b/src/scripts/debian.lua
@@ -109,7 +109,8 @@ function s.script(project)
"love '"..loveFileDeb:gsub("'", "\\'").."'\n",
true
)
- assert(fs.chmod(tempDir.."/usr/bin/"..project.package, "+x"))
+ assert(fs.set_permissions(fs.Q(tempDir.."/usr/bin/"..project.package)),
+ "exec", "all") -- 755
-- /usr/share/games/${PACKAGE}/${LOVE_FILE}
copyFile(project.releaseDirectory.."/"..script.loveFile, loveFileDeb, true) |
Yes, that's better |
I get weird results with chmod and cfg = require("luarocks.core.cfg")
cfg.init()
fs = require("luarocks.fs")
fs.init()
fs.set_permissions("test", "exec", "all") -- works
fs.set_permissions("'test'", "exec", "all") -- does not work |
Changed chmod call to an execute call because fs.chmod was removed from luarocks.fs in version 3.