Bug 188223

Summary: net-im/prosody update to 0.9.4 and optional support for LUAJIT
Product: Ports & Packages Reporter: Benjamin Podszun <dar>
Component: Individual Port(s)Assignee: David Thiel <lx>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
prosody-rc.diff
none
prosody-0.9.4.diff none

Description Benjamin Podszun 2014-04-03 14:00:00 UTC
Prosody 0.9.4 was released, attached is a patch against SVN that

- bumps the version
- adds an OPTION for luajit
- removes the shebang hack and passes the correct value to configure instead

Another unrelated patch supports a configuration that sets daemonize to false (that is, prosody stays in the foreground) in the rc script.
daemonize = false is a requirement for the libevent / kqueue backend according to upstream:

--- prosody.in.orig	2014-04-03 14:51:43.646052463 +0200
+++ prosody.in	2014-04-03 14:53:32.746004035 +0200
@@ -25,14 +25,25 @@
 
 extra_commands="status"
 
-start_cmd="prosody_cmd start"
+start_cmd="prosody_start"
 stop_cmd="prosody_cmd stop"
 restart_cmd="$stop_cmd; $start_cmd"
 status_cmd="prosody_cmd status"
 
+prosody_start()
+{
+	config="%%PREFIX%%/etc/prosody/prosody.cfg.lua"
+	if grep -q '^daemonize[[:blank:]]*=[[:blank:]]*false' $config; then
+		# Prosody's not going to daemonize on its own, use daemon(8)
+		daemon $command start
+	else
+		$command start
+	fi
+}
+
 prosody_cmd()
 {
-	%%PREFIX%%/bin/prosodyctl $1
+	$command $1
 }
 
 run_rc_command "$1"

Fix: Patch attached with submission follows:
How-To-Repeat: No problem, just an update
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-04-03 14:00:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->lx

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Benjamin Podszun 2014-04-03 14:37:39 UTC
Inline patches are crap and (sorry 'bout that, only just noticed) 
discouraged.

Attached the optional 'support daemonize = false in the rc script' patch.
Comment 3 Benjamin Podszun 2014-04-03 17:16:09 UTC
What the..
I don't even know how the first .diff ended up like that. Must've linked an 
old one. Sorry for the noise.

Attached the real 0.9.4 patch, with the luajit integration.

So, first diff is crap, please ignore. Second diff is optional, supports 
daemonize = false, the following diff is the actual port bump. My bad.

Comment 4 commit-hook freebsd_committer freebsd_triage 2014-06-04 22:56:39 UTC
A commit references this bug:

Author: lx
Date: Wed Jun  4 22:56:35 UTC 2014
New revision: 356555
URL: http://svnweb.freebsd.org/changeset/ports/356555

Log:
  Update to 0.9.4, rc file notice about daemonize, and support for LUAJIT.

  PR:		188223
  Submitted by:	dar

Changes:
  head/net-im/prosody/Makefile
  head/net-im/prosody/distinfo
  head/net-im/prosody/files/prosody.in
Comment 5 David Thiel freebsd_committer freebsd_triage 2014-06-04 23:00:19 UTC
Committed with a few tweaks. Thanks!