Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on luarocks.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/luarocks.e>
#           or at <http://angg.twu.net/e/luarocks.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######



# Install with:
# (find-es "lua5" "luarocks-git")


# «.debian»			(to "debian")
# «.debian-package-fmitha»	(to "debian-package-fmitha")
# «.luarocks-switch-version»	(to "luarocks-switch-version")
# «.lua-vs-python-luarocks»	(to "lua-vs-python-luarocks")
# «.config»			(to "config")
# «.path»			(to "path")
# «.path-debugger»		(to "path-debugger")
# «.LUAROCKS_DO»		(to "LUAROCKS_DO")
# «.global-dirs»		(to "global-dirs")




#####
#
# debian
# 2023nov04
#
#####

# «debian»  (to ".debian")
# (find-status   "luarocks")
# (find-vldifile "luarocks.list")
# (find-udfile   "luarocks/")
# (find-fline "/etc/luarocks/config.lua")
# (find-fline "/usr/bin/luarocks")
# (find-fline "/usr/bin/luarocks-admin")





#####
#
# debian-package-fmitha
# 2020jan18
#
#####

# «debian-package-fmitha» (to ".debian-package-fmitha")
# https://github.com/luarocks/luarocks/issues/1033

Hi fmitha,

well, I am interested in working on that, for several reasons... I
want to learn more about luarocks and about the new ways of creating
Debian packages (<- short-term goals), I want to earn karma points
with the luarocks developers (a medium-term goal), I want to have
better support for luarocks in Debian (long-term (?) goal), and I want
to produce "executable notes" for most of that, in the sense of this
presentation,

  http://angg.twu.net/emacsconf2019.html

mainly the ideas between 14:18 and 16:34...

What parts of the package have you done? Do you have a skeleton that
needs a lot of work, or not even that?

  Cheers!
    Eduardo Ochs
    http://angg.twu.net/dednat6.html
    http://angg.twu.net/emacsconf2019.html
    http://angg.twu.net/#eev
    http://angg.twu.net/contact.html





Can y





; I sent some e-mails to
the lua mailing list 



#####
#
# Switch between the luarocks from Debian and from git
# 2020jan16
#
#####

# «luarocks-switch-version» (to ".luarocks-switch-version")

# (find-sh "find ~/.cache/luarocks/ ~/.luarocks/ | sort")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
sudo apt-get remove luarocks

# Clean all the stuff from previous uses of luarocks
rm -Rfv ~/.cache/luarocks/
rm -Rfv ~/.luarocks/

cd ~/usrc/luarocks/

export PAGER=cat
git branch --list -a
git checkout 3.2.1
git reset

./configure
make
sudo make install

which luarocks
luarocks --version


* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/usrc/luarocks/
sudo make uninstall

# Clean all the stuff from previous uses of luarocks
rm -Rfv ~/.cache/luarocks/
rm -Rfv ~/.luarocks/

sudo apt-get install luarocks

which luarocks
luarocks --version



export PATH=/usr/local/bin:$PATH
which luarocks
luarocks --version

luarocks --local install luasec
apti libssl-dev
locate openssl/ssl.h





#####
#
# "[Lua vs Python] Luarocks" - an e-mail to lua-l
# 2020jan18
#
#####

# «lua-vs-python-luarocks» (to ".lua-vs-python-luarocks")
# https://mail.google.com/mail/ca/u/0/?q=lua-l#sent/KtbxLvHHlTCVCsXtfbJdrKTFvddLflQdNV
# http://lua-users.org/lists/lua-l/2020-01/msg00144.html
[Lua vs Python] Luarocks

Hi list,

here are my 2 cents about the Lua vs Python discussion - in a new
thread.


1) It is unrealistic to ask Roberto and Luiz to choose among rocks
   that they've never used and bless some of them. Some people use
   luarocks very little or not at all, and Roberto and Luiz may be
   some of these people.


2) At this moment it is not very easy to play with a new rock - and it
   should be!!! Let me give an example. A few days ago I realized that
   I could find a certain bug easily if I had a debugger - I do have
   functions that start REPLs and inspect stack frames, but they are
   quick hacks that I wrote myself and they're not very good, so I
   went to luarocks.org and got this listing:

     https://luarocks.org/search?q=debug

   I chose "debugger", and did:

     luarocks --local install debugger

   and discovered that now I have these files:

     ~/.luarocks/lib/luarocks/rocks/debugger/scm-1/doc/README.md
     ~/.luarocks/share/lua/5.1/debugger.lua

   which is great - this one comes with docs, I don't need to fetch
   the source package! - so I did this,

     lua5.1
     userocks()   -- defined in my LUA_INIT file
     require "debugger"
     -- ...I and got this error:
     --   stdin:1: module 'debugger' not found: [blabla many lines]

   Voila! Another rock that doesn't work out of the box for me...


3) A few days ago I complained that "luarocks unpack" does not work on
   my Debian box. My messages are here:

     http://lua-users.org/lists/lua-l/2020-01/msg00099.html
     http://lua-users.org/lists/lua-l/2020-01/msg00101.html
     http://lua-users.org/lists/lua-l/2020-01/msg00114.html


In an ideal world the problem that I reported in (3) would be
considered EXTREMELY URGENT - *everybody* would know that the first
step towards getting 25 millions of Lua users is to have impeccable
batteries, and the first step towards that is to make luarocks both
super user-friendly and super hacker-friendly... trying a rock should
be something incredibly easy for all kinds of people, including people
who want to look at the source!!!

WE NEED AN ARMY OF LUAROCKS HACKERS.

Cheers,
  Eduardo Ochs
  http://angg.twu.net/dednat6.html
  http://angg.twu.net/emacsconf2019.html
  http://angg.twu.net/#eev





#####
#
# config
# 2020jan18
#
#####

# «config» (to ".config")
# (find-es "lua5" "luarocks.loader")
# (find-sh "locate luarocks | grep config")
# (find-luarocksfile "")
# (find-luarocksfile ".luarocks/")
# (find-luarocksfile ".luarocks/config-5.3.lua")
# (find-luarocksfile ".luarocks/default-lua-version.lua")
# (find-fline "/etc/luarocks/config.lua")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
luarocks
luarocks config
luarocks help config
luarocks config 

luarocks config --lua-incdir
luarocks config --lua-libdir
luarocks config --lua-ver
luarocks config --system-config
luarocks config --user-config
luarocks config --rock-trees




#####
#
# path
# 2020jan18
#
#####

# «path» (to ".path")
# (find-angg "LUA/lua50init.lua" "userocks")
# (find-angg "LUA/Path.lua")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
= Path.from "path"
= Path.from "cpath"

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
luarocks
luarocks help
luarocks help path
luarocks path
luarocks path --lr-path
luarocks path --lr-cpath
luarocks path --lr-bin
luarocks path --lr-path  | tr ';' '\n'
luarocks path --lr-cpath | tr ';' '\n'
luarocks path --lr-bin   | tr ';' '\n'

luarocks list
luarocks help
luarocks show debugger

* (eepitch-lua52)
* (eepitch-kill)
* (eepitch-lua52)
= getoutput "luarocks path --lr-path"
= getoutput "luarocks path --lr-cpath"
= getoutput "luarocks path --lr-bin"
= package.path
= package.cpath

package.path = getoutput("luarocks path --lr-path")..";;"
require "lpegrex"

p = Path.from "path"
p:find "lpegrex"

= Path.find("path", "lpegrex")

Package.path





#####
#
# path-debugger
# 2020jan23 / 2023dec16
#
#####

# «path-debugger» (to ".path-debugger")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
luarocks help
luarocks help path
luarocks path
luarocks path --lr-path
luarocks path --lr-cpath
luarocks path --lr-bin

luarocks help
luarocks help show
luarocks help config
luarocks config 
luarocks config --lua-incdir
luarocks config	--lua-libdir
luarocks config	--lua-ver
luarocks config	--system-config
luarocks config	--user-config
luarocks config	--rock-trees

luarocks config
luarocks show debugger
luarocks path --lr-path  | tr ';' '\n'
luarocks path --lr-cpath | tr ';' '\n'

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
= package.path
= (package.path:gsub(";", "\n"))
require "debugger"

addpath  = function (p) package.path  = ee_expand(p)..";"..package.path  end
addcpath = function (p) package.cpath = ee_expand(p)..";"..package.cpath end
addpath "~/.luarocks/share/lua/5.1/?.lua"
addpath "~/.luarocks/share/lua/5.1/?/init.lua"
require "debugger"




#####
#
# LUAROCKS_DO
# 2020jan19
#
#####

# «LUAROCKS_DO» (to ".LUAROCKS_DO")
# (find-angg "LUA/luarocks-extra.lua")

Hi Dennis!

> More than Luarocks being broken, it often seems to me that many rocks
> are just broken and nobody notices, be it because the author doesn't
> even use Luarocks or that it's just a personal project turned rock
> because why not and nobody cares if the version that's on the internet
> doesn't work as long as there's some quick hack to get it working when
> needed.
>
> There could be many solutions for this problem; but all of them would
> require rock authors to spend more time on things that aren't actually
> code and that seems like something the average rock author doesn't want
> to be bothered with, like setting up CI/CD on github or even just
> manually checking that a given project state installs cleanly on a new
> system (VM, container, etc.).

Let me disagree! =)

Debian has this:

  https://packages.debian.org/sid/python-apt

I've never been able to use it - my brain is wired in a way that makes
Python too hard for me - but I have the impression that if luarocks
could be made a bit more hackeable then the people who are complaining
that Lua's batteries are a mess would change their attitude
completely... they would change the tone of their messages and they
would start sending things like "hey, I wrote this script here that
performs the tests such and such in the latest version of all the
existing rocks, and I just discovered that 20% of them fail this test
here..."

By the way, the last line of /usr/bin/luarocks is:

  command_line.run_command(...)

I've just added these two lines before that one,

  local myfile = os.getenv "LUAROCKS_DO"
  if myfile and myfile ~= "" then dofile(myfile) end 


and I am starting to play with that. My first (super-trivial) tests
are here:

  http://angg.twu.net/LUA/luarocks-extra.lua.html

Cheers,
  Eduardo Ochs
  http://angg.twu.net/dednat6.html
  http://angg.twu.net/emacsconf2019.html
  http://angg.twu.net/#eev





#####
#
# The permissions in the global directories
# 2020jun03
#
#####

# «global-dirs» (to ".global-dirs")
# (find-man "1 chown")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
luarocks --local remove debugger
luarocks install debugger   |& tee olid
# (find-fline "/tmp/olid")

# Error: /usr/local/lib/luarocks/rocks-5.1 does not exist and your
# user does not have write permissions in /usr/local/lib -- you may
# want to run as a privileged user or use your local tree with
# --local.

sudo mkdir           /usr/local/lib/luarocks
sudo chown edrx:edrx /usr/local/lib/luarocks

luarocks install debugger   |& tee olid
# (find-fline "/tmp/olid")
# Error: Your user does not have write permissions in
# /usr/local/share/lua/5.1 -- you may want to run as a privileged user
# or use your local tree with --local.

sudo rm -Rfv         /usr/local/lib/luarocks

# (I gave up)





# (find-status   "luarocks")
# (find-vldifile "luarocks.list")
# (find-udfile   "luarocks/")
# (find-asrootfile "/usr/bin/" "luarocks")





#  Local Variables:
#  coding:               utf-8-unix
#  End: