Diff options
| -rw-r--r-- | custom/extensions/about-render.lua | 8 | |
| -rw-r--r-- | custom/extensions/auth-file.lua | 36 | |
| -rw-r--r-- | custom/extensions/auth-inline.lua | 36 | |
| -rw-r--r-- | custom/extensions/email-gravatar.lua | 25 | |
| -rw-r--r-- | custom/extensions/email-libravatar.lua | 25 | |
| -rw-r--r-- | custom/extensions/syntax-highlight.lua | 23 |
6 files changed, 81 insertions, 72 deletions
diff --git a/custom/extensions/about-render.lua b/custom/extensions/about-render.lua index e3747ec..b0afa4a 100644 --- a/custom/extensions/about-render.lua +++ b/custom/extensions/about-render.lua @@ -13,12 +13,12 @@ -- against. Without it both fall back to escaped plain text, and the error -- log says so. -- --- # Debian and Ubuntu +-- # Debian and Ubuntu, for Lua 5.1 to 5.4 and LuaJIT -- sudo apt install lua-lpeg --- # Fedora +-- # Fedora, for Lua 5.4, or lua5.1-lpeg for LuaJIT -- sudo dnf install lua-lpeg --- # Alpine --- sudo apk add lua5.1-lpeg +-- # Alpine, named for the Lua version, 5.1 for LuaJIT +-- sudo apk add lua5.5-lpeg -- # or with LuaRocks, matched to your Lua version -- sudo luarocks --lua-version 5.1 install lpeg local has_lpeg, lpeg = pcall(require, "lpeg") diff --git a/custom/extensions/auth-file.lua b/custom/extensions/auth-file.lua index 81c5710..fc6d2fc 100644 --- a/custom/extensions/auth-file.lua +++ b/custom/extensions/auth-file.lua @@ -14,7 +14,8 @@ -- The script runs on Lua 5.1 through 5.5 and LuaJIT, and the runtime has to be -- the same Lua that cgit was built against. On 5.5 it needs luaossl 20260910 --- or later, since earlier builds fail to load there. +-- or later, or a build patched for 5.5 such as Alpine's, since earlier +-- releases fail to load there. -- -- The session cookie is marked Secure by default, so a browser only sends -- it back over HTTPS. On an instance served over plain HTTP login loops @@ -22,27 +23,24 @@ -- the web server does not pass HTTPS=on, so one behind a proxy that ends TLS -- should set that by hand. -- --- Two libraries are needed. luaossl provides openssl.rand and openssl.hmac and --- lives at <https://github.com/wahern/luaossl>, and luaposix provides --- posix.sys.stat and posix.unistd and lives at --- <https://github.com/luaposix/luaposix>. The reliable cross-platform way to --- install them is LuaRocks matched to your Lua version, and luaossl also needs --- the OpenSSL development headers present. Each is loaded only once a request --- needs it, so a public repository is served without them while a protected --- one is refused. +-- Two libraries are needed, built for that same Lua. luaossl provides +-- openssl.rand and openssl.hmac and lives at +-- <https://github.com/wahern/luaossl>, and luaposix provides posix.sys.stat +-- and posix.unistd and lives at <https://github.com/luaposix/luaposix>. Each +-- is loaded only once a request needs it, so a public repository is served +-- without them while a protected one is refused. -- --- # Debian and Ubuntu --- sudo apt install luarocks libssl-dev --- sudo luarocks --lua-version 5.1 install luaossl --- sudo luarocks --lua-version 5.1 install luaposix +-- # Debian and Ubuntu, for Lua 5.1 to 5.4 and LuaJIT +-- sudo apt install lua-luaossl lua-posix -- --- # Fedora --- sudo dnf install luarocks openssl-devel --- sudo luarocks --lua-version 5.1 install luaossl luaposix +-- # Fedora, for Lua 5.4 +-- sudo dnf install lua-luaossl lua-posix +-- +-- # Alpine, named for the Lua version, 5.1 for LuaJIT +-- sudo apk add lua5.5-ossl lua5.5-posix -- --- # Alpine --- sudo apk add luarocks openssl-dev --- sudo luarocks-5.1 install luaossl luaposix +-- # elsewhere, LuaRocks matched to that Lua, with the OpenSSL headers +-- sudo luarocks --lua-version 5.1 install luaossl luaposix -- -- # macOS with Homebrew -- brew install luarocks openssl diff --git a/custom/extensions/auth-inline.lua b/custom/extensions/auth-inline.lua index cb9802c..87c2a8a 100644 --- a/custom/extensions/auth-inline.lua +++ b/custom/extensions/auth-inline.lua @@ -16,7 +16,8 @@ -- The script runs on Lua 5.1 through 5.5 and LuaJIT, and the runtime has to be -- the same Lua that cgit was built against. On 5.5 it needs luaossl 20260910 --- or later, since earlier builds fail to load there. +-- or later, or a build patched for 5.5 such as Alpine's, since earlier +-- releases fail to load there. -- -- The session cookie is marked Secure by default, so a browser only sends -- it back over HTTPS. On an instance served over plain HTTP login loops @@ -24,27 +25,24 @@ -- the web server does not pass HTTPS=on, so one behind a proxy that ends TLS -- should set that by hand. -- --- Two libraries are needed. luaossl provides openssl.rand and openssl.hmac and --- lives at <https://github.com/wahern/luaossl>, and luaposix provides --- posix.sys.stat and posix.unistd and lives at --- <https://github.com/luaposix/luaposix>. The reliable cross-platform way to --- install them is LuaRocks matched to your Lua version, and luaossl also needs --- the OpenSSL development headers present. Each is loaded only once a request --- needs it, so a public repository is served without them while a protected --- one is refused. +-- Two libraries are needed, built for that same Lua. luaossl provides +-- openssl.rand and openssl.hmac and lives at +-- <https://github.com/wahern/luaossl>, and luaposix provides posix.sys.stat +-- and posix.unistd and lives at <https://github.com/luaposix/luaposix>. Each +-- is loaded only once a request needs it, so a public repository is served +-- without them while a protected one is refused. -- --- # Debian and Ubuntu --- sudo apt install luarocks libssl-dev --- sudo luarocks --lua-version 5.1 install luaossl --- sudo luarocks --lua-version 5.1 install luaposix +-- # Debian and Ubuntu, for Lua 5.1 to 5.4 and LuaJIT +-- sudo apt install lua-luaossl lua-posix -- --- # Fedora --- sudo dnf install luarocks openssl-devel --- sudo luarocks --lua-version 5.1 install luaossl luaposix +-- # Fedora, for Lua 5.4 +-- sudo dnf install lua-luaossl lua-posix +-- +-- # Alpine, named for the Lua version, 5.1 for LuaJIT +-- sudo apk add lua5.5-ossl lua5.5-posix -- --- # Alpine --- sudo apk add luarocks openssl-dev --- sudo luarocks-5.1 install luaossl luaposix +-- # elsewhere, LuaRocks matched to that Lua, with the OpenSSL headers +-- sudo luarocks --lua-version 5.1 install luaossl luaposix -- -- # macOS with Homebrew -- brew install luarocks openssl diff --git a/custom/extensions/email-gravatar.lua b/custom/extensions/email-gravatar.lua index c89da79..23fb508 100644 --- a/custom/extensions/email-gravatar.lua +++ b/custom/extensions/email-gravatar.lua @@ -7,21 +7,24 @@ -- email-filter=lua:/path/to/email-gravatar.lua -- -- Runs on Lua 5.1 through 5.5 and LuaJIT, where 5.5 needs luaossl 20260910 or --- later, since earlier builds fail to load there. +-- later, or a build patched for 5.5 such as Alpine's, since earlier releases +-- fail to load there. -- -- The one dependency is luaossl, the OpenSSL binding that provides --- openssl.digest, from <https://github.com/wahern/luaossl>. The reliable --- cross-platform install is LuaRocks, matched to the Lua version cgit is built --- against, and it needs the OpenSSL development headers present. Without it --- the filter draws no icons, leaving the names as they are, and says so in the --- error log. +-- openssl.digest, from <https://github.com/wahern/luaossl>, built for the Lua +-- cgit is linked against. Without it the filter draws no icons, leaving the +-- names as they are, and says so in the error log. -- --- # Debian and Ubuntu --- sudo apt install luarocks libssl-dev --- sudo luarocks --lua-version 5.1 install luaossl +-- # Debian and Ubuntu, for Lua 5.1 to 5.4 and LuaJIT +-- sudo apt install lua-luaossl +-- +-- # Fedora, for Lua 5.4, or lua5.1-luaossl for LuaJIT +-- sudo dnf install lua-luaossl +-- +-- # Alpine, named for the Lua version, 5.1 for LuaJIT +-- sudo apk add lua5.5-ossl -- --- # Fedora --- sudo dnf install luarocks openssl-devel +-- # elsewhere, LuaRocks matched to that Lua, with the OpenSSL headers -- sudo luarocks --lua-version 5.1 install luaossl -- -- # macOS with Homebrew diff --git a/custom/extensions/email-libravatar.lua b/custom/extensions/email-libravatar.lua index 79794a7..edf4733 100644 --- a/custom/extensions/email-libravatar.lua +++ b/custom/extensions/email-libravatar.lua @@ -6,21 +6,24 @@ -- email-filter=lua:/path/to/email-libravatar.lua -- -- Runs on Lua 5.1 through 5.5 and LuaJIT, where 5.5 needs luaossl 20260910 or --- later, since earlier builds fail to load there. +-- later, or a build patched for 5.5 such as Alpine's, since earlier releases +-- fail to load there. -- -- The one dependency is luaossl, the OpenSSL binding that provides --- openssl.digest, from <https://github.com/wahern/luaossl>. The reliable --- cross-platform install is LuaRocks, matched to the Lua version cgit is built --- against, and it needs the OpenSSL development headers present. Without it --- the filter draws no icons, leaving the names as they are, and says so in the --- error log. +-- openssl.digest, from <https://github.com/wahern/luaossl>, built for the Lua +-- cgit is linked against. Without it the filter draws no icons, leaving the +-- names as they are, and says so in the error log. -- --- # Debian and Ubuntu --- sudo apt install luarocks libssl-dev --- sudo luarocks --lua-version 5.1 install luaossl +-- # Debian and Ubuntu, for Lua 5.1 to 5.4 and LuaJIT +-- sudo apt install lua-luaossl +-- +-- # Fedora, for Lua 5.4, or lua5.1-luaossl for LuaJIT +-- sudo dnf install lua-luaossl +-- +-- # Alpine, named for the Lua version, 5.1 for LuaJIT +-- sudo apk add lua5.5-ossl -- --- # Fedora --- sudo dnf install luarocks openssl-devel +-- # elsewhere, LuaRocks matched to that Lua, with the OpenSSL headers -- sudo luarocks --lua-version 5.1 install luaossl -- -- # macOS with Homebrew diff --git a/custom/extensions/syntax-highlight.lua b/custom/extensions/syntax-highlight.lua index 2928250..eac7387 100644 --- a/custom/extensions/syntax-highlight.lua +++ b/custom/extensions/syntax-highlight.lua @@ -25,18 +25,25 @@ local scintillua_env = "CGIT_SCINTILLUA_PATH" -- Directories probed for the lexers when that variable is not set, tried -- after the directory of $CGIT_CONFIG, so placing or symlinking a scintillua --- directory next to cgitrc is enough for it to be found. The lexers come --- from https://orbitalquark.github.io/scintillua/ and need lpeg, built for --- the Lua cgit is linked against. Forgetting that is the usual reason +-- directory next to cgitrc is enough for it to be found. The lexers are the +-- lexers directory of a release zip from +-- https://github.com/orbitalquark/scintillua/releases and need lpeg, built +-- for the Lua cgit is linked against. Forgetting that is the usual reason -- nothing is coloured. A file is coloured only when Scintillua's detect() --- names its lexer, so an older Scintillua without detect() colours nothing. +-- names its lexer, so a Scintillua older than 6.0, which lacks detect(), +-- colours nothing. -- --- # Debian and Ubuntu +-- # Scintillua, into the first directory below +-- unzip scintillua_*.zip +-- sudo mkdir -p /usr/local/share/scintillua +-- sudo cp -R scintillua/lexers /usr/local/share/scintillua/ +-- +-- # Debian and Ubuntu, for Lua 5.1 to 5.4 and LuaJIT -- sudo apt install lua-lpeg --- # Fedora +-- # Fedora, for Lua 5.4, or lua5.1-lpeg for LuaJIT -- sudo dnf install lua-lpeg --- # Alpine --- sudo apk add lua5.1-lpeg +-- # Alpine, named for the Lua version, 5.1 for LuaJIT +-- sudo apk add lua5.5-lpeg -- # or with LuaRocks, matched to your Lua version -- sudo luarocks --lua-version 5.1 install lpeg -- |
