Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 407079 - net-im/prosody-0.11.5: switch from dev-lua/LuaBitOp to || ( >=dev-lang/lua-5.2 dev-lua/lua-bit32 )
Summary: net-im/prosody-0.11.5: switch from dev-lua/LuaBitOp to || ( >=dev-lang/lua-5....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Conrad Kostecki
URL: https://groups.google.com/group/proso...
Whiteboard:
Keywords:
Depends on: 746785
Blocks: lua-5.2
  Show dependency tree
 
Reported: 2012-03-06 09:54 UTC by Tobias Klausmann (RETIRED)
Modified: 2020-10-10 15:57 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed patch to block too-new versions of Lua (prosody_lua_5.2_block.patch,1.52 KB, text/plain)
2012-03-06 10:01 UTC, Tobias Klausmann (RETIRED)
Details
correctly annotated version of patch (prosody_lua_5.2_block.patch,1.52 KB, patch)
2012-03-06 10:03 UTC, Tobias Klausmann (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Klausmann (RETIRED) gentoo-dev 2012-03-06 09:54:23 UTC
Lua 5.2 is very different from 5.1. See discussion at $link.
Comment 1 Tobias Klausmann (RETIRED) gentoo-dev 2012-03-06 10:01:22 UTC
Created attachment 304375 [details]
Proposed patch to block too-new versions of Lua

Added proposed patch to the builds to block newer versions of Lua.
Comment 2 Tobias Klausmann (RETIRED) gentoo-dev 2012-03-06 10:03:00 UTC
Created attachment 304377 [details, diff]
correctly annotated version of patch
Comment 3 Dirkjan Ochtman (RETIRED) gentoo-dev 2012-03-06 10:17:03 UTC
You should add yourself to the maintainers and commit it yourself!
Comment 4 Tobias Klausmann (RETIRED) gentoo-dev 2012-03-06 10:40:55 UTC
Done & done.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2012-03-06 10:42:21 UTC
How is this anykind of patch? lua is _NOT_ slotted
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2012-03-06 10:45:19 UTC
Comment on attachment 304377 [details, diff]
correctly annotated version of patch

bogus
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-07 09:35:25 UTC
What version isn't compatible and how is it incompatible?
Comment 8 Tobias Klausmann (RETIRED) gentoo-dev 2012-08-07 11:19:17 UTC
The details of how/why are at $link, as mentioned.

As for versions: Lua >=5.2 is sufficiently different from <5.2 that Prosody up to and including 0.8.2 (latest release according to http://prosody.im/ ) will not work with it. 

Above mentioned link also has the main dev saying that migrating to being 5.2-compatible is desirable and planned -- but no release has been made since then.
Comment 9 Daniel Kenzelmann 2017-03-14 10:56:27 UTC
It has been 5 years, current prosody version is 0.9.12

Is this really still dependent on lua-5.1 ?
What about others like luasec and lua-zlib (also currently depending on lua:0 in portage)?
Comment 10 schmittlauch 2017-05-11 10:23:59 UTC
Prosody-0.10 will support lua-5.2, although it won't be as well-tested as with 5.1 https://prosody.im/issues/issue/299#comment-6
I suggest migrating to lua-5.2 ince prosody-0.10 is released although this is not recommended by the prosody devs. But getting rid of this lua-5.2 blocker should be quite important.
Comment 11 schmittlauch 2017-10-04 13:36:44 UTC
Good news: prosody-0.10.0 is finally released and includes initial support for lua-5.2! http://blog.prosody.im/prosody-0-10-0-released/

Although the developers still recommend lua-5.1 for stable servers, it might be worth a thought to create at least a use flag for running prosody with lua-5.2 if other packages require lua-5.2. That way we can get rid of the lua blocker while still running prosody as stable as possible with 5.1 if no other packages require a lua-5.2

Is this actually possible with portage?
Comment 12 Daniel Kenzelmann 2017-10-04 14:03:18 UTC
I'd prefer to just remove the blocker and allow lua 5.2
(from what i gathered the 5.1 recommendation in the changelog is just "in case"... )

Maybe adding a local use flag lua51 for now and just could be just dropped later
Comment 13 Tobias Klausmann (RETIRED) gentoo-dev 2018-12-29 09:02:04 UTC
So for Prosody >=0.11 upstream recommends Lua 5.2:

"The recommended Lua version for 0.11 is Lua 5.2, while Lua 5.1 is still supported for the platforms that need it. However the 0.11.x series is the last series that will still support Lua 5.1 (and by extension, LuaJIT)."

(from https://prosody.im/doc/release/0.11.0#lua-5.2)

Thus arguably, this bug can be closed. Note that it is not the last blocker for the 5.2 unmasking bug. I will try and do some testing of Prosody with 5.2 sometime soon and the report back here.
Comment 14 Marek Szuba archtester gentoo-dev 2020-09-01 16:50:22 UTC
As of right now, net-im/prosody-0.11.5 builds fine against lua-5.2.

Regarding 5.3, the ebuild as it stands now pulls in dev-lua/LuaBitOp - which is not and will likely never be (https://www.freelists.org/post/luajit/Port-bitop-to-53,1) compatible with Lua versions newer than 5.2. Fortunately, Prosody can use the module "bit32" instead - which is built into Lua-5.2+ and is available in Gentoo for 5.1 as dev-lua/lua-bit32.
Comment 15 Tobias Klausmann (RETIRED) gentoo-dev 2020-09-02 15:12:49 UTC
Note that I haven't been running Prosody in over a year, and as such the package is maintainer-needed (or -wanted, if you prefer).

I asked on -dev if someone wanted to take over, but nobody stepped up.
Comment 16 Conrad Kostecki gentoo-dev 2020-10-03 14:11:27 UTC
(In reply to Tobias Klausmann from comment #15)
> Note that I haven't been running Prosody in over a year, and as such the
> package is maintainer-needed (or -wanted, if you prefer).
> 
> I asked on -dev if someone wanted to take over, but nobody stepped up.

Haven't seen that, so added myself now as maintainer, since I am running it still.
I've revbumped to far to newest version and overhauled the ebuild.

(In reply to Marek Szuba from comment #14)
> As of right now, net-im/prosody-0.11.5 builds fine against lua-5.2.
> 
> Regarding 5.3, the ebuild as it stands now pulls in dev-lua/LuaBitOp - which
> is not and will likely never be
> (https://www.freelists.org/post/luajit/Port-bitop-to-53,1) compatible with
> Lua versions newer than 5.2. Fortunately, Prosody can use the module "bit32"
> instead - which is built into Lua-5.2+ and is available in Gentoo for 5.1 as
> dev-lua/lua-bit32.

@Marek: Currently Lua 5.2 is masked. What are the plans to unmask? I am not really deep into lua, to let's see what we can do here.

So you suggest to drop dev-lua/LuaBitOp and use dev-lua/lua-bit32 only on lua5.1 versions? I guess, that needs your new eclass for slotting lua, which you recently commited?
Comment 17 Conrad Kostecki gentoo-dev 2020-10-04 11:31:18 UTC
Using dev-lua/lua-bit32 instead of won't launch prosody, as it will fail with: Prosody was unable to find lua-bitops

There is a check inside /usr/lib64/prosody/util/dependencies.lua:

> local bit = _G.bit32 or softreq"bit";
> 
> if not bit then
>         missingdep("lua-bitops", {
>                 ["Debian/Ubuntu"] = "sudo apt-get install lua-bitop";
>                 ["luarocks"] = "luarocks install luabitop";
>                 ["Source"] = "http://bitop.luajit.org/";
>         }, "WebSocket support will not be available");
> end

If I do change that to match bit32 from dev-lua/lua-bit32, this seems to make the error (correctly?) go away. I am a little bit worried, that "_G.bit32" seems to be always false on both packages?

OLD: local bit = _G.bit32 or softreq"bit";
NEW: local bit = _G.bit32 or softreq"bit32";

After those changes, my prosody server seems to run fine. I don't see any error in my log files regarding bit(32) stuff.
Comment 18 Conrad Kostecki gentoo-dev 2020-10-04 11:39:54 UTC
Ah, I guess the check is complete.

Looking into /usr/lib64/prosody/net/websocket/frames.lua, there is a difference check:

> local bit = assert(softreq"bit" or softreq"bit32",
>        "No bit module found. See https://prosody.im/doc/depends#bitop");

I guess, the main check needs to be adjusted.
Comment 19 Larry the Git Cow gentoo-dev 2020-10-10 15:57:35 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21185d1a53f9597691eff67f05f7ac4fa0a3c769

commit 21185d1a53f9597691eff67f05f7ac4fa0a3c769
Author:     Conrad Kostecki <conikost@gentoo.org>
AuthorDate: 2020-10-10 15:53:20 +0000
Commit:     Conrad Kostecki <conikost@gentoo.org>
CommitDate: 2020-10-10 15:57:23 +0000

    net-im/prosody: switch to bit32, update init scripts
    
    Since dev-lua/LuaBitOp is not supported on >=lua-5.2, switching to
    dev-lua/lua-bit32 as an alternative, since it's supported by upstream.
    
    Also updated the init scripts, since starting with prosodyctl is not
    recomended and current init scripts warns about not using it.
    
    Closes: https://bugs.gentoo.org/407079
    Package-Manager: Portage-3.0.8, Repoman-3.0.1
    Signed-off-by: Conrad Kostecki <conikost@gentoo.org>

 net-im/prosody/files/prosody-0.11.7-bit32.patch  | 20 +++++
 net-im/prosody/files/prosody-0.11.7-gentoo.patch | 29 +++++++
 net-im/prosody/files/prosody.initd-r4            | 43 +++++++++++
 net-im/prosody/files/prosody.service-r1          | 13 ++++
 net-im/prosody/files/prosody.tmpfilesd-r1        |  1 +
 net-im/prosody/prosody-0.11.7-r1.ebuild          | 96 ++++++++++++++++++++++++
 6 files changed, 202 insertions(+)