Comments (15)
After some digging, I think I found it. Looks like you're using LuaPosix and, to my surprise, it doesn't support octal mode setting. I've just pushed a change to use the textual notation. This should be more "portable".
Please confirm if this fixes your issue.
from luarocks.
Thanks for fast response, though now I got something new:
user@ubuntu:~/projects/pk-hb/server/lib/pk-tools$ sudo luarocks make rockspec/pk-tools.pk-ensure-nginx-site-enabled-scm-1.rockspec Error: LuaRocks 2.0.7 bug (please report at [email protected]). /usr/local/share/lua/5.1//luarocks/dir.lua:12: assertion failed! stack traceback: [C]: in function 'assert' /usr/local/share/lua/5.1//luarocks/dir.lua:12: in function 'base_name' /usr/local/share/lua/5.1//luarocks/build.lua:59: in function 'install_files' /usr/local/share/lua/5.1//luarocks/build.lua:206: in function (tail call): ? (tail call): ? [C]: in function 'xpcall' /usr/local/share/lua/5.1//luarocks/command_line.lua:151: in function 'run_command' /usr/local/bin/luarocks:23: in main chunk [C]: ?
from luarocks.
I committed a fix for that. Please let me know how things go. If things run smoothly I'll pack a release in the coming days.
from luarocks.
Thanks alot, new code worked for me!
from luarocks.
I'm getting this error in luarocks 2.2.0
/usr/bin/lua: /usr/share/lua/5.2/luarocks/fs/lua.lua:740: bad argument #2 to 'chmod' (bad mode)
stack traceback:
[C]: in function 'error'
/home/amr/.luarocks/share/lua/5.2/posix/_argcheck.lua:20: in function 'argerror'
/home/amr/.luarocks/share/lua/5.2/posix/compat.lua:150: in function </home/amr/.luarocks/share/lua/5.2/posix/compat.lua:146>
(...tail calls...)
/usr/share/lua/5.2/luarocks/fs/lua.lua:740: in function 'chmod'
/usr/share/lua/5.2/luarocks/tools/tar.lua:136: in function 'untar'
csagent.lua:78: in function 'download_jumpscripts'
csagent.lua:113: in main chunk
[C]: in ?
from luarocks.
Can you run the luarocks command again, with --verbose flag, and paste the results here?
from luarocks.
This actually happens while using luarocks as a Lua module in my application, not while running the luarocks executable. It's during calling luarocks.tools.tar.untar()
which I passed two strings.
from luarocks.
Ok, can you add
util.printerr("file: ".. tostring(file) .. " mode: " .. tostring(mode))
before line 740?
The first argument seems to require a valid path. Let's check that too.
Also, which version of LuaPosix are you using?
from luarocks.
I'm using luarocks 2.2.0, and LuaPosix 33.2.1. The first argument is indeed a valid file path.
file: /tmp/csagent-1421841817/jumpscripts/luajumpscripts/jumpscale/test/lua_echo.lua mode: ---------rw-r--r--
/usr/bin/lua: /usr/share/lua/5.2/luarocks/fs/lua.lua:741: bad argument #2 to 'chmod' (bad mode)
stack traceback:
[C]: in function 'error'
/home/amr/.luarocks/share/lua/5.2/posix/_argcheck.lua:20: in function 'argerror'
/home/amr/.luarocks/share/lua/5.2/posix/compat.lua:150: in function </home/amr/.luarocks/share/lua/5.2/posix/compat.lua:146>
(...tail calls...)
/usr/share/lua/5.2/luarocks/fs/lua.lua:741: in function 'chmod'
/usr/share/lua/5.2/luarocks/tools/tar.lua:136: in function 'untar'
csagent.lua:70: in function 'download_jumpscripts'
csagent.lua:143: in function 'main'
csagent.lua:167: in main chunk
[C]: in ?
from luarocks.
Try that in a script:
local posix = require "posix"
local file = "/tmp/csagent-1421841817/jumpscripts/luajumpscripts/jumpscale/test/lua_echo.lua"
local mode = "---------rw-r--r--"
print( posix.chmod(file, mode) )
According to http://luaposix.github.io/luaposix/modules/posix.html#chmod it seems that your mode string is not valid. All those dashes at the start are valid?
Also, which version of LuaPosix (not LuaRocks) are you using?
from luarocks.
LuaPosix 33.2.1 (latest atm), but I'm not calling posix.chmod()
. It's LuaRocks's tar.untar()
function that calls it on files that got extracted from the tar archive. Is it a problem with how the permissions are stored in that specific tar archive?
from luarocks.
Do you have a tar file that works so we can compare them and see if that's
indeed the problem?
from luarocks.
We have code in lua.lua that converts octal notation to rwx notation because of an old LuaPosix bug. Looks like tar is giving out lots of zeros in its mode string ("000644").
from luarocks.
I pushed a fix for that, @amrhassan, please take a look.
from luarocks.
That seems to fix it. Thank you @hishamhm :)
from luarocks.
Related Issues (20)
- luarocks/cmd.lua:738: attempt to concatenate a table value (field 'root_dir') HOT 2
- luarocks pack creates macosx-x86_64.rock entry on m1 mac HOT 2
- install a luarock in Debian wsl2 HOT 2
- 3.10.0 release build paralyzation issue HOT 4
- `sudo luarocks install` right after `configure && make && sudo make install` targets the local project dir HOT 3
- Feature Request: Userspace local directory restructure? HOT 1
- I can't build mime during luasocket installing HOT 4
- Invalid Debian Installation HOT 1
- Support applying patches created with `diff -Naur`
- Bug: Adding entries to .gitignore ... HOT 1
- when using luarocks3.11 config,it goes wrong HOT 1
- Could this third-party toolkit be any harder on windows? I've never done anything this hard
- Error: LuaRocks 3.11.0 bug - win32-x86_64 (fs_use_modules = true) (binary) - when installing a package that transitively depends on LuaFileSystem HOT 3
- cannot force reinstall package on v3.11.0
- enable ssl cert check by default
- How does luarocks check wether a dependency exists ? HOT 8
- API failure when uploading rockspec HOT 4
- luarocks.lock in cwd not respected by `luarocks install`
- Purl specification for Lua (Sofwtare supply chain) HOT 1
- transfer ownership of lua-vips to a new maintainer HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luarocks.