On Thu, Mar 1, 2012 at 6:11 AM, Gerhard Lipp <[email protected]> wrote:
> i patched the luarocks fetch/git.lua file with
>
> if not fs.execute(git_cmd,'submodule','init')
>    return nil, "Failed init submodules git repository."
> end
> if not fs.execute(git_cmd,'submodule','update') then
>    return nil, "Failed update submodules git repository."
> end

Adding this would generate a compatibility issue (rockspecs that would
work with newer versions of LuaRocks only), but I could add this as an
extension, to be made default in a future major version. How does that
sound?

> it works when run without super user privileges:
> luarocks install
> https://github.com/lipp/lua-websockets/raw/master/rockspecs/lua-websockets-scm-1.rockspec
> --local
>
> executed as super user, it fails
> sudo luarocks install
> https://github.com/lipp/lua-websockets/raw/master/rockspecs/lua-websockets-scm-1.rockspec
> i tracked down the error: sudo git submodule update just not works!
>
> following the git docu, it is not recommended to run git as super user at all.
> shouldn't the luarocks fetch operation switch to "normal" user temporarily?

I don't want to play with user permissions from within LuaRocks (from
my experience in previous projects, that is very fragile). What you
could do in that case is:

luarocks pack lua-websockets-scm-1.rockspec
sudo luarocks install lua-websockets-scm-1.src.rock

That will run Git as a regular user and pack a .src.rock file, which
can then be installed as superuser.

-- Hisham

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to