On Mon, Mar 5, 2012 at 3:23 PM, Hisham <[email protected]> wrote:
> 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?

Good.

>
>> 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

This seems to work (with the patch applied). In some days i would like
to make a lua-websockets release. Is it sufficient to link the github
rockspec in this case or do you prefer a "rock" as created above?

regards,
gerhard

>
> 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

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
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-d2d
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to