View | Details | Raw Unified | Return to bug 241619 | Differences between
and this patch

Collapse All | Expand All

(-)prosody/Makefile (-30 / +22 lines)
Lines 1-9 Link Here
1
# Created by: Andrew Lewis <freeghb@gmail.com>
1
# Created by: Andrew Lewis <freeghb@gmail.com>
2
# $FreeBSD: head/net-im/prosody/Makefile 497546 2019-04-02 03:35:54Z yuri $
2
# $FreeBSD: head/net-im/prosody/Makefile 507372 2019-07-26 20:46:53Z gerald $
3
3
4
PORTNAME=	prosody
4
PORTNAME=	prosody
5
PORTVERSION=	0.11.2
5
PORTVERSION=	0.11.3
6
PORTREVISION=	1
6
PORTREVISION=	0
7
CATEGORIES=	net-im
7
CATEGORIES=	net-im
8
MASTER_SITES=	http://prosody.im/downloads/source/ \
8
MASTER_SITES=	http://prosody.im/downloads/source/ \
9
		http://redundancy.redundancy.org/mirror/
9
		http://redundancy.redundancy.org/mirror/
Lines 14-66 Link Here
14
LICENSE=	MIT
14
LICENSE=	MIT
15
LICENSE_FILE=	${WRKSRC}/COPYING
15
LICENSE_FILE=	${WRKSRC}/COPYING
16
16
17
RUN_DEPENDS=	${LUA_MODLIBDIR}/socket/core.so:net/luasocket-51 \
17
RUN_DEPENDS=	${LUA_MODLIBDIR}/socket/core.so:net/luasocket \
18
		${LUA_MODLIBDIR}/ssl.so:security/luasec-51 \
18
		${LUA_MODLIBDIR}/ssl.so:security/luasec \
19
		${LUA_MODLIBDIR}/lxp.so:textproc/luaexpat-51 \
19
		${LUA_MODLIBDIR}/lxp.so:textproc/luaexpat \
20
		${LUA_MODLIBDIR}/lfs.so:devel/luafilesystem-51 \
20
		${LUA_MODLIBDIR}/lfs.so:devel/luafilesystem \
21
		${LUA_MODLIBDIR}/bit.so:devel/lua51-bitop
21
		${LUA_MODLIBDIR}/bit.so:devel/lua-bitop
22
LIB_DEPENDS=	libidn.so:dns/libidn
22
LIB_DEPENDS=	libidn.so:dns/libidn
23
23
24
USES=		compiler:c11 cpe gmake lua:51 shebangfix ssl
24
USES=		compiler:c11 cpe gmake lua:52 ssl
25
SHEBANG_FILES=	prosody prosodyctl
26
LUA_PREMK=	yes
25
LUA_PREMK=	yes
27
HAS_CONFIGURE=	yes
26
HAS_CONFIGURE=	yes
28
CFLAGS+=	-I${OPENSSLINC}
27
CONFIGURE_ARGS=	--prefix="${PREFIX}" \
29
LDFLAGS+=	-L${OPENSSLLIB}
28
		--datadir="/var/db/prosody" \
30
CONFIGURE_ARGS=	--ostype=freebsd \
29
		--lua-version="${LUA_VER}" \
31
		--c-compiler="${CC}" \
32
		--linker="${CC}" \
33
		--with-lua-include="${LUA_INCDIR}" \
34
		--lua-suffix="${LUA_VER_STR}" \
30
		--lua-suffix="${LUA_VER_STR}" \
35
		--with-lua-include="${LUA_INCDIR}" \
31
		--with-lua-include="${LUA_INCDIR}" \
36
		--with-lua-lib="${LUA_LIBDIR}" \
32
		--with-lua-lib="${LUA_LIBDIR}" \
37
		--prefix="${PREFIX}" 
33
		--with-random=arc4random \
34
		--c-compiler="${CC}" \
35
		--cflags="${CFLAGS}" \
36
		--add-cflags="-fPIC -std=c99 -I/usr/local/include -I${OPENSSLINC}" \
37
		--linker="${CC}" \
38
		--ldflags="${LDFLAGS}" \
39
		--add-ldflags="-shared -L/usr/local/lib -L${OPENSSLLIB}" \
40
		--no-example-certs
38
41
39
MAKEFILE=       GNUmakefile
42
MAKEFILE=       GNUmakefile
40
USERS=		prosody
43
USERS=		prosody
41
GROUPS=		${USERS}
44
GROUPS=		${USERS}
42
45
43
USE_RC_SUBR=	prosody
46
USE_RC_SUBR=	prosody
44
SUB_FILES=	pkg-deinstall
47
SUB_FILES=	pkg-message
45
SUB_LIST=	USERS=${USERS} GROUPS=${GROUPS}
48
SUB_LIST=	USERS=${USERS} GROUPS=${GROUPS}
46
PLIST_SUB=	PROSODY_USER=${USERS} \
49
PLIST_SUB=	PROSODY_USER=${USERS} \
47
		PROSODY_USER_regex=\b${USERS}\b \
50
		PROSODY_USER_regex=\b${USERS}\b \
48
		PROSODY_GROUP=${GROUPS} \
51
		PROSODY_GROUP=${GROUPS} \
49
		PROSODY_GROUP_regex=\b${GROUPS}\b
52
		PROSODY_GROUP_regex=\b${GROUPS}\b
50
53
51
OPTIONS_DEFINE=	LUAJIT
52
LUAJIT_DESC=		Run prosody using luajit
53
LUAJIT_LIB_DEPENDS=	libluajit-5.1.so:lang/luajit
54
55
.include <bsd.port.options.mk>
56
57
.if ${PORT_OPTIONS:MLUAJIT}
58
lua_CMD=	${LOCALBASE}/bin/luajit
59
.else
60
lua_CMD=	${LOCALBASE}/bin/${LUA_CMD}
61
.endif
62
63
post-install:
54
post-install:
64
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/prosody/util/*.so
55
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/prosody/util/*.so
56
	@${MKDIR} ${STAGEDIR}/var/run/prosody
65
57
66
.include <bsd.port.mk>
58
.include <bsd.port.mk>
(-)prosody/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1548801952
1
TIMESTAMP = 1572266441
2
SHA256 (prosody-0.11.2.tar.gz) = 8911f6dc29b9e0c4edf9e61dc23fa22d77bc42c4caf28b809ab843b2f08e4831
2
SHA256 (prosody-0.11.3.tar.gz) = cfdabd6f42a9fc5db300221967c518c26bd4b6e62def721c1626894d6325bf87
3
SIZE (prosody-0.11.2.tar.gz) = 420689
3
SIZE (prosody-0.11.3.tar.gz) = 424098
(-)prosody/files/patch-GNUmakefile (-3 / +6 lines)
Lines 1-5 Link Here
1
--- GNUmakefile.orig	2018-12-01 14:51:46.042219000 +0000
1
--- GNUmakefile.orig	2019-10-28 19:01:52.415208000 +0100
2
+++ GNUmakefile	2018-12-01 14:52:30.212140000 +0000
2
+++ GNUmakefile	2019-10-28 19:02:47.367580000 +0100
3
@@ -6,7 +6,7 @@
3
@@ -6,7 +6,7 @@
4
 MODULES = $(DESTDIR)$(LIBDIR)/prosody/modules
4
 MODULES = $(DESTDIR)$(LIBDIR)/prosody/modules
5
 SOURCE = $(DESTDIR)$(LIBDIR)/prosody
5
 SOURCE = $(DESTDIR)$(LIBDIR)/prosody
Lines 9-15 Link Here
9
 
9
 
10
 INSTALLEDSOURCE = $(LIBDIR)/prosody
10
 INSTALLEDSOURCE = $(LIBDIR)/prosody
11
 INSTALLEDCONFIG = $(SYSCONFDIR)
11
 INSTALLEDCONFIG = $(SYSCONFDIR)
12
@@ -57,7 +57,7 @@
12
@@ -57,9 +57,10 @@
13
 	$(INSTALL_DATA) plugins/mod_mam/*.lua $(MODULES)/mod_mam
13
 	$(INSTALL_DATA) plugins/mod_mam/*.lua $(MODULES)/mod_mam
14
 	$(INSTALL_DATA) certs/* $(CONFIG)/certs
14
 	$(INSTALL_DATA) certs/* $(CONFIG)/certs
15
 	$(INSTALL_DATA) man/prosodyctl.man $(MAN)/man1/prosodyctl.1
15
 	$(INSTALL_DATA) man/prosodyctl.man $(MAN)/man1/prosodyctl.1
Lines 17-20 Link Here
17
+	$(INSTALL_DATA) prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua.sample
17
+	$(INSTALL_DATA) prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua.sample
18
 	-test -f prosody.version && $(INSTALL_DATA) prosody.version $(SOURCE)/prosody.version
18
 	-test -f prosody.version && $(INSTALL_DATA) prosody.version $(SOURCE)/prosody.version
19
 	$(MAKE) install -C util-src
19
 	$(MAKE) install -C util-src
20
+	$(MAKE) install -C tools/migration
20
 
21
 
22
 clean:
23
 	rm -f prosody.install
(-)prosody/files/patch-migration (+39 lines)
Line 0 Link Here
1
--- tools/migration/Makefile.orig
2
+++ tools/migration/Makefile
3
@@ -3,11 +3,11 @@
4
 
5
 BIN = $(DESTDIR)$(PREFIX)/bin
6
 CONFIG = $(DESTDIR)$(SYSCONFDIR)
7
 SOURCE = $(DESTDIR)$(LIBDIR)/prosody
8
 DATA = $(DESTDIR)$(DATADIR)
9
-MAN = $(DESTDIR)$(PREFIX)/share/man
10
+MAN = $(DESTDIR)$(PREFIX)/man
11
 
12
 INSTALLEDSOURCE = $(LIBDIR)/prosody
13
 INSTALLEDCONFIG = $(SYSCONFDIR)
14
 INSTALLEDMODULES = $(LIBDIR)/prosody/modules
15
 INSTALLEDDATA = $(DATADIR)
16
@@ -20,20 +20,20 @@
17
 	install -d $(BIN) $(CONFIG) $(SOURCE) $(SOURCE)/migrator
18
 	install -d $(MAN)/man1
19
 	install -d $(SOURCE)/migrator
20
 	install -m755 ./prosody-migrator.install $(BIN)/prosody-migrator
21
 	install -m644 $(SOURCE_FILES) $(SOURCE)/migrator
22
-	test -e $(CONFIG)/migrator.cfg.lua || install -m644 migrator.cfg.lua.install $(CONFIG)/migrator.cfg.lua
23
+	install -m644 migrator.cfg.lua.install $(CONFIG)/migrator.cfg.lua.sample
24
 
25
 clean:
26
 	rm -f prosody-migrator.install
27
 	rm -f migrator.cfg.lua.install
28
 
29
 prosody-migrator.install: prosody-migrator.lua
30
-	sed "1s/\blua\b/$(RUNWITH)/; \
31
+	sed "1s/ lua$$/ $(RUNWITH)/; \
32
 		s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|; \
33
 		s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(INSTALLEDCONFIG)';|;" \
34
 			< prosody-migrator.lua > prosody-migrator.install
35
 
36
 migrator.cfg.lua.install: migrator.cfg.lua
37
 	sed "s|^local data_path = .*;$$|local data_path = '$(INSTALLEDDATA)';|;" \
38
 		< migrator.cfg.lua > migrator.cfg.lua.install
39
(-)prosody/files/pkg-deinstall.in (-24 lines)
Lines 1-24 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD: head/net-im/prosody/files/pkg-deinstall.in 348595 2014-03-18 20:19:34Z lx $
4
#
5
6
case $2 in
7
POST-DEINSTALL)
8
	echo "===> post-deinstallation information for $1:"
9
	echo ""
10
	echo "     Note:"
11
	echo "     Prosody related user accounts and groups were not removed."
12
	echo ""
13
	echo "     To remove the user and group which were created by "
14
	echo "     the installation of this package, run:"
15
	echo ""
16
	echo "     pw userdel -n %%USERS%%"
17
	echo "     pw groupdel -n %%GROUPS%%"
18
	echo ""
19
	echo "     and to remove all server data:"
20
	echo "     rm -rf  /usr/local/var/lib/prosody"
21
	echo ""
22
	;;
23
esac
24
exit 0
(-)prosody/files/pkg-message.in (+51 lines)
Line 0 Link Here
1
[
2
{ type: install
3
  message: <<EOM
4
If you're running Prosody in a jail and experience problems, please add
5
the following to the global section of your prosody.cfg.lua:
6
7
interfaces = { 'x.x.x.x' }
8
9
where 'x.x.x.x' is the public IP you wish Prosody to bind to.
10
EOM
11
}
12
{ type: upgrade
13
  maximum_version: 0.11.3
14
  message: <<EOM
15
With 0.11.3, the database-path was changed from 
16
17
%%PREFIX%%/var/lib/prosody
18
19
to
20
21
/var/lib/prosody
22
23
It is recommended that you move your existing data (if necessary)
24
to the new location, e.g. via
25
26
mv /usr/local/var/lib/prosody/* /var/db/prosody/
27
28
Similarly, the PID file location was moved to
29
30
/var/run/prosody/prosody.pid
31
32
If you've set the pidfile directive in your prosody configuration, 
33
please update it accordingly or remove the statement from your 
34
configuration file.
35
EOM
36
}
37
{ type: remove
38
  message: <<EOM
39
Prosody related user accounts and groups were not removed.
40
41
To remove the user and group which were created by
42
the installation of this package, run:
43
44
pw userdel -n %%USERS%%
45
pw groupdel -n %%GROUPS%%
46
47
and to remove all server data:
48
rm -rf  /var/db/prosody
49
EOM
50
}
51
]
(-)prosody/files/prosody.in (-17 / +7 lines)
Lines 15-46 Link Here
15
. /etc/rc.subr
15
. /etc/rc.subr
16
16
17
name="prosody"
17
name="prosody"
18
rcvar=prosody_enable
18
rcvar="prosody_enable"
19
command="%%PREFIX%%/bin/prosodyctl"
19
command="prosodyctl"
20
20
21
load_rc_config $name
21
load_rc_config $name
22
22
23
prosody_enable=${prosody_enable:-"NO"}
23
prosody_enable=${prosody_enable:-"NO"}
24
pidfile=${prosody_pidfile:-"%%PREFIX%%/var/lib/prosody/prosody.pid"}
24
pidfile=${prosody_pidfile:-"/var/run/prosody/prosody.pid"}
25
25
26
extra_commands="reload status"
26
extra_commands="reload"
27
27
start_cmd="prosody_cmd start"
28
start_cmd="prosody_start"
29
stop_cmd="prosody_cmd stop"
28
stop_cmd="prosody_cmd stop"
30
reload_cmd="prosody_cmd reload"
29
reload_cmd="prosody_cmd reload"
31
restart_cmd="$stop_cmd; $start_cmd"
30
restart_cmd="prosody_cmd restart"
32
status_cmd="prosody_cmd status"
31
status_cmd="prosody_cmd status"
33
32
34
prosody_start()
33
export PATH="%%PREFIX%%/bin:$PATH"
35
{
36
	config="%%PREFIX%%/etc/prosody/prosody.cfg.lua"
37
	if grep -q '^daemonize[[:blank:]]*=[[:blank:]]*false' $config; then
38
		# Prosody's not going to daemonize on its own, use daemon(8)
39
		daemon $command start
40
	else
41
		$command start
42
	fi
43
}
44
34
45
prosody_cmd()
35
prosody_cmd()
46
{
36
{
(-)prosody/pkg-message (-14 lines)
Lines 1-14 Link Here
1
2
---
3
4
NOTE:
5
6
    If you're running Prosody in a jail and experience problems, please add
7
    the following to the global section of your prosody.cfg.lua:
8
9
    interfaces = { 'x.x.x.x' }
10
11
    where 'x.x.x.x' is the public IP you wish Prosody to bind to.
12
13
---
14
(-)prosody/pkg-plist (-5 / +9 lines)
Lines 1-13 Link Here
1
bin/prosody
1
bin/prosody
2
bin/prosodyctl
2
bin/prosodyctl
3
bin/prosody-migrator
3
%%ETCDIR%%/certs/GNUmakefile
4
%%ETCDIR%%/certs/GNUmakefile
4
%%ETCDIR%%/certs/example.com.crt
5
%%ETCDIR%%/certs/example.com.key
6
%%ETCDIR%%/certs/localhost.cnf
5
%%ETCDIR%%/certs/localhost.cnf
7
%%ETCDIR%%/certs/localhost.crt
8
%%ETCDIR%%/certs/localhost.key
9
%%ETCDIR%%/certs/makefile
6
%%ETCDIR%%/certs/makefile
10
%%ETCDIR%%/certs/openssl.cnf
7
%%ETCDIR%%/certs/openssl.cnf
8
@sample %%ETCDIR%%/migrator.cfg.lua.sample
11
@sample %%ETCDIR%%/prosody.cfg.lua.sample
9
@sample %%ETCDIR%%/prosody.cfg.lua.sample
12
%%LUA_LIBDIR%%/prosody/core/certmanager.lua
10
%%LUA_LIBDIR%%/prosody/core/certmanager.lua
13
%%LUA_LIBDIR%%/prosody/core/configmanager.lua
11
%%LUA_LIBDIR%%/prosody/core/configmanager.lua
Lines 23-28 Link Here
23
%%LUA_LIBDIR%%/prosody/core/statsmanager.lua
21
%%LUA_LIBDIR%%/prosody/core/statsmanager.lua
24
%%LUA_LIBDIR%%/prosody/core/storagemanager.lua
22
%%LUA_LIBDIR%%/prosody/core/storagemanager.lua
25
%%LUA_LIBDIR%%/prosody/core/usermanager.lua
23
%%LUA_LIBDIR%%/prosody/core/usermanager.lua
24
%%LUA_LIBDIR%%/prosody/migrator/jabberd14.lua
25
%%LUA_LIBDIR%%/prosody/migrator/mtools.lua
26
%%LUA_LIBDIR%%/prosody/migrator/prosody_files.lua
27
%%LUA_LIBDIR%%/prosody/migrator/prosody_sql.lua
26
%%LUA_LIBDIR%%/prosody/modules/adhoc/adhoc.%%LUA_LIBDIR%%.lua
28
%%LUA_LIBDIR%%/prosody/modules/adhoc/adhoc.%%LUA_LIBDIR%%.lua
27
%%LUA_LIBDIR%%/prosody/modules/adhoc/mod_adhoc.lua
29
%%LUA_LIBDIR%%/prosody/modules/adhoc/mod_adhoc.lua
28
%%LUA_LIBDIR%%/prosody/modules/mod_admin_adhoc.lua
30
%%LUA_LIBDIR%%/prosody/modules/mod_admin_adhoc.lua
Lines 144-149 Link Here
144
%%LUA_LIBDIR%%/prosody/util/cache.lua
146
%%LUA_LIBDIR%%/prosody/util/cache.lua
145
%%LUA_LIBDIR%%/prosody/util/caps.lua
147
%%LUA_LIBDIR%%/prosody/util/caps.lua
146
%%LUA_LIBDIR%%/prosody/util/compat.so
148
%%LUA_LIBDIR%%/prosody/util/compat.so
149
%%LUA_LIBDIR%%/prosody/util/crand.so
147
%%LUA_LIBDIR%%/prosody/util/dataforms.lua
150
%%LUA_LIBDIR%%/prosody/util/dataforms.lua
148
%%LUA_LIBDIR%%/prosody/util/datamanager.lua
151
%%LUA_LIBDIR%%/prosody/util/datamanager.lua
149
%%LUA_LIBDIR%%/prosody/util/datetime.lua
152
%%LUA_LIBDIR%%/prosody/util/datetime.lua
Lines 216-219 Link Here
216
%%LUA_LIBDIR%%/prosody/util/xmppstream.lua
219
%%LUA_LIBDIR%%/prosody/util/xmppstream.lua
217
%%LUA_LIBDIR%%/prosody/util/xpcall.lua
220
%%LUA_LIBDIR%%/prosody/util/xpcall.lua
218
man/man1/prosodyctl.1.gz
221
man/man1/prosodyctl.1.gz
219
@dir(%%PROSODY_USER%%,%%PROSODY_GROUP%%,) var/%%LUA_LIBDIR%%/prosody
222
@dir(%%PROSODY_USER%%,%%PROSODY_GROUP%%,) /var/db/prosody
223
@dir(%%PROSODY_USER%%,%%PROSODY_GROUP%%,) /var/run/prosody

Return to bug 241619