Initial Commit
- initial default booting image
This commit is contained in:
25
package/prosody/0001-enable-syslog.patch
Normal file
25
package/prosody/0001-enable-syslog.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From 267b5d195be0f3a8f00ccf4ccb62e25a9c4e48eb Mon Sep 17 00:00:00 2001
|
||||
From: Francois Perrad <francois.perrad@gadz.org>
|
||||
Date: Sun, 22 Oct 2017 08:44:01 +0200
|
||||
Subject: [PATCH] enable syslog
|
||||
|
||||
note: the posix module is auto-loaded by default
|
||||
|
||||
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
|
||||
|
||||
diff --git a/prosody.cfg.lua.dist b/prosody.cfg.lua.dist
|
||||
index a0fc6c9e..af3cc0e4 100644
|
||||
--- a/prosody.cfg.lua.dist
|
||||
+++ b/prosody.cfg.lua.dist
|
||||
@@ -166,7 +166,7 @@ archive_expires_after = "1w" -- Remove archived messages after 1 week
|
||||
log = {
|
||||
info = "prosody.log"; -- Change 'info' to 'debug' for verbose logging
|
||||
error = "prosody.err";
|
||||
- -- "*syslog"; -- Uncomment this for logging to syslog
|
||||
+ "*syslog"; -- Uncomment this for logging to syslog
|
||||
-- "*console"; -- Log to the console, useful for debugging with daemonize=false
|
||||
}
|
||||
|
||||
--
|
||||
2.11.0
|
||||
|
||||
26
package/prosody/0002-add-pidfile.patch
Normal file
26
package/prosody/0002-add-pidfile.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
From 124d479195ac8ec1747b5b89fe4860d0e92c2aae Mon Sep 17 00:00:00 2001
|
||||
From: Francois Perrad <francois.perrad@gadz.org>
|
||||
Date: Sun, 22 Oct 2017 08:58:11 +0200
|
||||
Subject: [PATCH] add pidfile
|
||||
|
||||
see https://prosody.im/doc/configure#posix-only_options
|
||||
|
||||
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
|
||||
|
||||
diff --git a/prosody.cfg.lua.dist b/prosody.cfg.lua.dist
|
||||
index af3cc0e4..675db12f 100644
|
||||
--- a/prosody.cfg.lua.dist
|
||||
+++ b/prosody.cfg.lua.dist
|
||||
@@ -187,6 +187,9 @@ log = {
|
||||
-- HTTPS currently only supports a single certificate, specify it here:
|
||||
--https_certificate = "certs/localhost.crt"
|
||||
|
||||
+-- This must match the PIDFILE used in S50prosody
|
||||
+pidfile = "/var/run/prosody/prosody.pid"
|
||||
+
|
||||
----------- Virtual hosts -----------
|
||||
-- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
|
||||
-- Settings under each VirtualHost entry apply *only* to that host.
|
||||
--
|
||||
2.11.0
|
||||
|
||||
26
package/prosody/Config.in
Normal file
26
package/prosody/Config.in
Normal file
@@ -0,0 +1,26 @@
|
||||
config BR2_PACKAGE_PROSODY
|
||||
bool "prosody"
|
||||
depends on BR2_USE_MMU # fork
|
||||
depends on BR2_PACKAGE_HAS_LUAINTERPRETER
|
||||
depends on !BR2_PACKAGE_LUA_5_4
|
||||
depends on !BR2_STATIC_LIBS # luaexpat, luasec, luasocket, luafilesystem
|
||||
select BR2_PACKAGE_LUABITOP if BR2_PACKAGE_LUA_5_1 # runtime
|
||||
select BR2_PACKAGE_LUAEXPAT # runtime
|
||||
select BR2_PACKAGE_LUASEC # runtime
|
||||
select BR2_PACKAGE_LUASOCKET # runtime
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
select BR2_PACKAGE_LIBIDN
|
||||
select BR2_PACKAGE_LUAFILESYSTEM # runtime
|
||||
help
|
||||
Prosody is a modern XMPP communication server. It aims to be
|
||||
easy to set up and configure, and efficient with system
|
||||
resources.
|
||||
|
||||
https://prosody.im
|
||||
|
||||
comment "prosody needs the lua interpreter, dynamic library"
|
||||
depends on !BR2_PACKAGE_HAS_LUAINTERPRETER || BR2_STATIC_LIBS
|
||||
depends on BR2_USE_MMU
|
||||
|
||||
comment "prosody needs a Lua <= 5.3"
|
||||
depends on BR2_PACKAGE_LUA_5_4
|
||||
40
package/prosody/S50prosody
Normal file
40
package/prosody/S50prosody
Normal file
@@ -0,0 +1,40 @@
|
||||
#! /bin/sh
|
||||
|
||||
NAME=prosody
|
||||
|
||||
# This must match the pidfile field in
|
||||
# /etc/prosody/prosody.cfg.lua
|
||||
|
||||
PIDDIR=/var/run/$NAME
|
||||
PIDFILE=$PIDDIR/$NAME.pid
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting $NAME: "
|
||||
mkdir -p $PIDDIR
|
||||
chown $NAME:$NAME $PIDDIR
|
||||
start-stop-daemon -S -q -o -x /usr/bin/prosody -c $NAME
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping $NAME: "
|
||||
# The standard method of identifying the name doesn't
|
||||
# work as the process name is lua. So use the pidfile
|
||||
# which is created by the service itself as a match
|
||||
# criteria when stopping the service
|
||||
start-stop-daemon -K -q -o -p "$PIDFILE"
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
restart|reload)
|
||||
echo "Restarting $NAME: "
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
8
package/prosody/prosody.hash
Normal file
8
package/prosody/prosody.hash
Normal file
@@ -0,0 +1,8 @@
|
||||
# Locally computed:
|
||||
md5 93665d86c47e99c9c525610ac53400fb prosody-0.11.14.tar.gz
|
||||
sha1 abbd0ad42e2b30051f4d3f198c54a52b4e9f39d0 prosody-0.11.14.tar.gz
|
||||
sha256 ec0c7447ec07ed336b6912d06a2f533439cb16d60d8d3bffa8ce46269ee52c87 prosody-0.11.14.tar.gz
|
||||
sha512 128e12427ae0b5080fd3cc2380974c04570b16f0f79de7b39ef85cec6e8f579bee2d1150ce70ca731222c487dba646cbcd48bdb4a102a14395644eb5f19f1c88 prosody-0.11.14.tar.gz
|
||||
|
||||
# Hash for license file:
|
||||
sha256 bbbdc1c5426e5944cf869fc0faeaf19d88a220cd2b39ea98b7b8e86b0e88a2ef COPYING
|
||||
63
package/prosody/prosody.mk
Normal file
63
package/prosody/prosody.mk
Normal file
@@ -0,0 +1,63 @@
|
||||
################################################################################
|
||||
#
|
||||
# prosody
|
||||
#
|
||||
################################################################################
|
||||
|
||||
PROSODY_VERSION = 0.11.14
|
||||
PROSODY_SITE = https://prosody.im/downloads/source
|
||||
PROSODY_LICENSE = MIT
|
||||
PROSODY_LICENSE_FILES = COPYING
|
||||
PROSODY_CPE_ID_VENDOR = prosody
|
||||
PROSODY_DEPENDENCIES = host-luainterpreter luainterpreter libidn openssl
|
||||
|
||||
PROSODY_CFLAGS = $(TARGET_CFLAGS) -fPIC -std=c99 \
|
||||
$(if BR2_TOOLCHAIN_USES_MUSL,-DWITHOUT_MALLINFO)
|
||||
|
||||
PROSODY_CONF_OPTS = \
|
||||
--with-lua-bin=$(HOST_DIR)/bin \
|
||||
--with-lua=$(STAGING_DIR)/usr \
|
||||
--lua-version=$(LUAINTERPRETER_ABIVER) \
|
||||
--c-compiler=$(TARGET_CC) \
|
||||
--cflags="$(PROSODY_CFLAGS)" \
|
||||
--linker=$(TARGET_CC) \
|
||||
--ldflags="$(TARGET_LDFLAGS) -shared" \
|
||||
--sysconfdir=/etc/prosody \
|
||||
--prefix=/usr
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LUAJIT),y)
|
||||
PROSODY_CONF_OPTS += --runwith=luajit
|
||||
endif
|
||||
|
||||
define PROSODY_CONFIGURE_CMDS
|
||||
cd $(@D) && \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
./configure $(PROSODY_CONF_OPTS)
|
||||
endef
|
||||
|
||||
define PROSODY_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
|
||||
endef
|
||||
|
||||
define PROSODY_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install
|
||||
endef
|
||||
|
||||
define PROSODY_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 package/prosody/S50prosody \
|
||||
$(TARGET_DIR)/etc/init.d/S50prosody
|
||||
endef
|
||||
|
||||
define PROSODY_USERS
|
||||
prosody -1 prosody -1 * - - - Prosody user
|
||||
endef
|
||||
|
||||
# make install installs a Makefile and meta data to generate certs
|
||||
define PROSODY_REMOVE_CERT_GENERATOR
|
||||
rm -f $(TARGET_DIR)/etc/prosody/certs/Makefile
|
||||
rm -f $(TARGET_DIR)/etc/prosody/certs/*.cnf
|
||||
endef
|
||||
|
||||
PROSODY_POST_INSTALL_TARGET_HOOKS += PROSODY_REMOVE_CERT_GENERATOR
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user