Bug 192280

Summary: [patch] net-im/prosody and 3 other ports *UNBREAK*
Product: Ports & Packages Reporter: Nikolai Lifanov <lifanov>
Component: Individual Port(s)Assignee: David Thiel <lx>
Status: Closed FIXED    
Severity: Affects Some People CC: js
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
unbreak prosody, dependencies
none
unbreak prosody, dependencies
none
prosody at 5.1, slave luafilesystem
none
prosody at 5.1, slave luafilesystem none

Description Nikolai Lifanov 2014-07-30 22:16:20 UTC
Created attachment 145167 [details]
unbreak prosody, dependencies

Latest devel/luafilesystem update (r363096) broke build of net-im/prosody, since in bsd.default-versions.mk Lua is 5.2 and Prosody hardcodes the dependency to 5.1.

This patch updates security/luasec, net/luasocket, textproc/luaexpat to allow build with the default Lua version of 5.2.

This also adds ${STRIP_CMD} all over the place for stage-qa.

Please test, commit, and unbreak.
Comment 1 John Marino freebsd_committer freebsd_triage 2014-07-30 22:20:25 UTC
I'm not sure if it's better to have 4 separate PRs where the last one depends on the first 3, or like this.

Let the maintainer decide (lx@)
Comment 2 Nikolai Lifanov 2014-07-30 22:39:29 UTC
Created attachment 145168 [details]
unbreak prosody, dependencies

Forgot --with-lua-include for Prosody proper.
I had Lua 5.1 installed locally, so configure worked for the wrong reason.

Discovered by: Redports
Comment 3 David Thiel freebsd_committer freebsd_triage 2014-07-30 23:48:55 UTC
Unfortunately, Prosody doesn't actually support Lua 5.2, which is why it's hardcoded.

I guess I'll need to make an UPDATING entry telling folks to use 

DEFAULT_VERSIONS= lua=5.2

in make.conf, and leave prosody hardcoded on lua51, unless anyone has a brighter idea?
Comment 4 David Thiel freebsd_committer freebsd_triage 2014-07-31 00:34:12 UTC
(In reply to David Thiel from comment #3)
> DEFAULT_VERSIONS= lua=5.2

I mean 5.1, of course.
Comment 5 Nikolai Lifanov 2014-07-31 03:32:12 UTC
You are right about Prosody not working with 5.2.
I just found that out by trying to upgrade to it.

Since there is only one dependency that has a non-hardcoded Lua version (versus 5.1), and as far as I can tell, the 5.1 and 5.2 version of luafilesystem can coexist, could we make a slave port for luafilesystem that sets USES=lua:5.1 and depend on this explicitly?
Comment 6 Nikolai Lifanov 2014-07-31 03:47:13 UTC
Created attachment 145172 [details]
prosody at 5.1, slave luafilesystem

Here is a sample patch that will do just this: Prosody dependency on luafilesystem is met, Lua stays at 5.1, and package names are what they used to be (no-op for people that didn't recompile), and no need to change other ports.
Comment 7 Nikolai Lifanov 2014-07-31 03:49:01 UTC
Created attachment 145173 [details]
prosody at 5.1, slave luafilesystem

Wrong patch first time, sorry.
Comment 8 js 2014-08-05 16:15:20 UTC
Any update on this? I just broke prosody on my server using pkg upgrade...
Comment 9 David Thiel freebsd_committer freebsd_triage 2014-08-05 18:10:09 UTC
I've committed the last patch with a few tweaks, and verified it works in my jail. Please test and let me know.
Comment 10 Nikolai Lifanov 2014-08-05 19:20:22 UTC
I verified that now Prosody package building and runtime works for me.
Comment 11 Nikolai Lifanov 2014-08-05 19:33:55 UTC
I still need to test what happens when both lua51-luafilesystem and lua52-luafilesystem exist in the same repository and someone does "pkg install prosody".
Comment 12 Nikolai Lifanov 2014-08-05 19:57:01 UTC
Tested! "pkg install prosody" with both lua51-luafilesystem and lua52-luafilesystem available in the same repository picks the right one.
Comment 13 David Thiel freebsd_committer freebsd_triage 2014-08-05 22:31:13 UTC
Excellent. Thanks!