Add package Prosody
PATCH 1/1 Add package Prosody
Description from website:
Prosody is a modern XMPP communication server. It aims to be easy to set up and configure, and efficient with system resources.
This installs the base system with certificates for two domains:
localhost and example.com
--- DEVELOPERS | 3 +++ package/Config.in | 1 + package/prosody/Config.in | 19 +++++++++++++++++ package/prosody/prosody.hash | 5 +++++ package/prosody/prosody.mk | 51 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 79 insertions(+) create mode 100644 package/prosody/Config.in create mode 100644 package/prosody/prosody.hash create mode 100644 package/prosody/prosody.mk
DEVELOPERS +3 -0
@@ -485,6 +485,9 @@ F: package/nss-pam-ldapd/ F: package/sp-oops-extract/ F: package/unscd/ +N: Dushara Jayasinghe <[email protected]> +F: package/prosody/ + N: Ed Swierk <[email protected]> F: package/xxhash/
package/Config.in +1 -0
@@ -1716,6 +1716,7 @@ endif source "package/pptp-linux/Config.in" source "package/privoxy/Config.in" source "package/proftpd/Config.in" + source "package/prosody/Config.in" source "package/proxychains-ng/Config.in" source "package/ptpd/Config.in" source "package/ptpd2/Config.in"
package/prosody/Config.in new file +19 -0
@@ -0,0 +1,19 @@ +config BR2_PACKAGE_PROSODY + bool "prosody" + depends on BR2_PACKAGE_LUA_5_1 || BR2_PACKAGE_LUAJIT + 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" + depends on !BR2_PACKAGE_LUA_5_1 && !BR2_PACKAGE_LUAJIT
package/prosody/prosody.hash new file +5 -0
@@ -0,0 +1,5 @@ +# Hashes from: https://prosody.im/downloads/source/{MD5,SHA1,SHA256,SHA512}SUMS +md5 d743adea6cfbaacc3a24cc0c3928bb1b prosody-0.9.12.tar.gz +sha1 1ee224263a5b3d67960e12edbbe6b2f16b95d147 prosody-0.9.12.tar.gz +sha256 1a59a322b71928a21985522aa00d0eab3552208d7bf9ecb318542a1b2fee3e8d prosody-0.9.12.tar.gz +sha512 e87b5f3b3e327722cec9d8d0470684e2ec2788a1c5ae623c4f505a00572ef21f65afe84cd5b7de47d6a65fe8872506fe34e5e8886e20979ff84710669857ca76 prosody-0.9.12.tar.gz
package/prosody/prosody.mk new file +51 -0
51 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH 1/1 Add package Prosody
So I stuffed it up...
The following was meant to go along with the email:
This is my first use of git send-email so please excuse any stuff ups.
I'm hoping this will be a reply to
http://lists.busybox.net/pipermail/buildroot/2017-September/201799.html
Some additional comments:
Quoted 2 lines
* Do you really need Lua 5.1 specifically? Other versions of Lua, or LuaJIT are not suitable ?
According to Zach from the prosody dev mailing list, this version of prosody requires lua 5.1
Quoted 3 lines
* The license information should be more specific than MIT/X11. Is it MIT *or* X11, or a combination of both MIT code and X11 code ? If so, which part is under which license ?
This was bit unclear, based on the COPYING file it matches the MIT license as specified in Wikipedia, so I'm going with that.
PATCH 1/1 Add package Prosody
In reply to Dushara JayasingheDushara, All,
A few comments about this patch.
On 2017-09-09 08:18 +1000, Dushara Jayasinghe spake thusly:
Quoted 8 lines
Description from website:
Prosody is a modern XMPP communication server. It aims to be easy to set up and configure, and efficient with system resources.
This installs the base system with certificates for two domains:
localhost and example.com
The commit log here mostly repeats what is in the help text. This is fine, but not very useful.
Instead, a commit log should explain the technical details, like what problems were encountered and how they were solved, if it is not obvious from the code.
For example, you could have added in the commit log that prosody only works with lua-5.1 or luajit, and add a pointer to the relevant mailing list discussion (which you allude to in your second mail); *this* is a very interesting information to have in a commit log.
Another information you could have added is the licensing issue. The COPYING file contains the text for the MIT license, but all the source files contain the sentence "This project is MIT/X11 licensed." Thus, the license is MIT/X11.
Finally, you need to sign-off your patch. A signed-off-by line is a legally-binding statement that you are allowed to provide the patch:
https://developercertificate.org/
So, what about a commit log that reads as:
package/prosody: new package
As stated by the upstram developpers, Prosody only supports lua-5.1 or luajit (which is a lua-5.1 interpreter):
[add URL here if publicly available]
The license terms are not very consistent: the source files all state to be "MIT/X11 licensed" and defer to the COPYING file for details, but that file only has the text for the MIT license. Thus, we believe the license to be MIT/X11, as stated in the source files.
Also, see the manual:
https://buildroot.org/downloads/manual/manual.html#submitting-patches
A few more nit-picks below...
[--SNIP--]
Quoted 7 lines
package/prosody/Config.in new file +1
-0@@ -0,0 +1,19 @@ +config BR2_PACKAGE_PROSODY
package/prosody/Config.in line 11
Quoted 10 lines
package/prosody/Config.in new file +10
-0+ bool "prosody" + depends on BR2_PACKAGE_LUA_5_1 || BR2_PACKAGE_LUAJIT + 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
There is a useless empty line before the help entry.
package/prosody/Config.in line 14
Quoted 3 lines
package/prosody/Config.in new file +3
-0+ Prosody is a modern XMPP communication server. It aims to be + easy to set up and configure, and efficient with system + resources.
Line 2 and 3 above have three elading space, only two needed.
Quoted 27 lines
package/prosody/Config.in new file +5
-0+ + https://prosody.im + +comment "prosody needs the lua interpreter" + depends on !BR2_PACKAGE_LUA_5_1 && !BR2_PACKAGE_LUAJITpackage/prosody/prosody.hash new file +5
-0@@ -0,0 +1,5 @@ +# Hashes from: https://prosody.im/downloads/source/{MD5,SHA1,SHA256,SHA512}SUMS +md5 d743adea6cfbaacc3a24cc0c3928bb1b prosody-0.9.12.tar.gz +sha1 1ee224263a5b3d67960e12edbbe6b2f16b95d147 prosody-0.9.12.tar.gz +sha256 1a59a322b71928a21985522aa00d0eab3552208d7bf9ecb318542a1b2fee3e8d prosody-0.9.12.tar.gz +sha512 e87b5f3b3e327722cec9d8d0470684e2ec2788a1c5ae623c4f505a00572ef21f65afe84cd5b7de47d6a65fe8872506fe34e5e8886e20979ff84710669857ca76 prosody-0.9.12.tar.gzpackage/prosody/prosody.mk new file +5
-0@@ -0,0 +1,51 @@ +################################################################################ +# +# prosody +# +################################################################################
package/prosody/prosody.mk line 15
Quoted 10 lines
package/prosody/prosody.mk new file +10
-0+ +PROSODY_VERSION = 0.9.12 +PROSODY_SOURCE = prosody-$(PROSODY_VERSION).tar.gz +PROSODY_SITE = https://prosody.im/downloads/source +PROSODY_LICENSE = MIT +PROSODY_LICENSE_FILES = COPYING +PROSODY_DEPENDENCIES = openssl libidn + +ifeq ($(BR2_PACKAGE_LUA_5_1),y) + PROSODY_DEPENDENCIES += lua
Don't indent the DEPENDENCIES line (yes, that is a weird rule, but that is for consistency with all the rest of Buildroot, which does not indent in such situations).
package/prosody/prosody.mk line 19
Quoted 4 lines
package/prosody/prosody.mk new file +4
-0+endif + +ifeq ($(BR2_PACKAGE_LUAJIT),y) + PROSODY_DEPENDENCIES += luajit
Ditto.
package/prosody/prosody.mk line 32
Quoted 13 lines
package/prosody/prosody.mk new file +13
-0+endif + +define PROSODY_CONFIGURE_CMDS + (cd $(@D) && \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure --prefix=/usr \ + --c-compiler=$(TARGET_CC) \ + --cflags="$(TARGET_CFLAGS)" \ + --linker=$(TARGET_CC) \ + --ldflags="$(TARGET_LDFLAGS) -shared" \ + --sysconfdir=/etc/prosody \ + --with-lua=$(STAGING_DIR)/usr \ + )
No need for the parenthesis here.
Regards,
Yann E. MORIN.
Quoted 26 lines
package/prosody/prosody.mk new file +19
-0+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 + +# 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))Signature · 6 lines
2.1.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 1/1 package/prosody: new package
In reply to Dushara JayasingheAs stated by the upstream developers, Prosody only supports lua-5.1 or luajit (which is a lua-5.1 interpreter):
Quoted 7 lines
Response from zash at zash.se:
Quoted 2 lines
I pegged the package to lua 5,1 based on the contents of the INSTALL file. Is this a hard requirement?
Up until Prosody 0.9 Lua 5.1 is required. However LuaJIT implements Lua 5.1 so it works.
The license terms are not very consistent: the source files all state to be "MIT/X11 licensed" and defer to the COPYING file for details, but that file only has the text for the MIT license. Thus, we believe the license to be MIT/X11, as stated in the source files.
This installs the base system with certificates for two domains:
localhost and example.com
The default runtime configuration is tweaked during installation to properly setup logging and pid-file directories.
Prosody doesn't like being executed as root, and thus the daemon is executed as the user prosody. The startup script creates the pid file write location with appropriate permissions.
--- DEVELOPERS | 3 + package/Config.in | 1 + package/prosody/Config.in | 18 ++++ package/prosody/S50prosody | 38 +++++++++ package/prosody/prosody.cfg.lua | 184 ++++++++++++++++++++++++++++++++++++++++ package/prosody/prosody.hash | 5 ++ package/prosody/prosody.mk | 70 +++++++++++++++ 7 files changed, 319 insertions(+) create mode 100644 package/prosody/Config.in create mode 100644 package/prosody/S50prosody create mode 100644 package/prosody/prosody.cfg.lua create mode 100644 package/prosody/prosody.hash create mode 100644 package/prosody/prosody.mk
DEVELOPERS +3 -0
@@ -485,6 +485,9 @@ F: package/nss-pam-ldapd/ F: package/sp-oops-extract/ F: package/unscd/ +N: Dushara Jayasinghe <[email protected]> +F: package/prosody/ + N: Ed Swierk <[email protected]> F: package/xxhash/
package/Config.in +1 -0
@@ -1716,6 +1716,7 @@ endif source "package/pptp-linux/Config.in" source "package/privoxy/Config.in" source "package/proftpd/Config.in" + source "package/prosody/Config.in" source "package/proxychains-ng/Config.in" source "package/ptpd/Config.in" source "package/ptpd2/Config.in"
package/prosody/Config.in new file +18 -0
@@ -0,0 +1,18 @@ +config BR2_PACKAGE_PROSODY + bool "prosody" + depends on BR2_PACKAGE_LUA_5_1 || BR2_PACKAGE_LUAJIT + 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" + depends on !BR2_PACKAGE_LUA_5_1 && !BR2_PACKAGE_LUAJIT
package/prosody/S50prosody new file +38 -0
@@ -0,0 +1,38 @@ +#! /bin/sh + +NAME=prosody +DAEMON=/usr/bin/$NAME +PIDDIR=/var/run/$NAME + +# Gracefully exit if the package has been removed. +test -x $DAEMON || exit 0 + +case "$1" in + start) + printf "Starting $NAME: " + mkdir -p $PIDDIR + chown $NAME $PIDDIR + start-stop-daemon -S -c $NAME -q -x $DAEMON + [ $? = 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 add the prosody + # user as a match criteria when stopping the service + start-stop-daemon -K -n lua -u $NAME + [ $? = 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
package/prosody/prosody.cfg.lua new file +184 -0
184 lines not on this page · raw message
package/prosody/prosody.hash new file +5 -0
@@ -0,0 +1,5 @@ +# Hashes from: https://prosody.im/downloads/source/{MD5,SHA1,SHA256,SHA512}SUMS +md5 d743adea6cfbaacc3a24cc0c3928bb1b prosody-0.9.12.tar.gz +sha1 1ee224263a5b3d67960e12edbbe6b2f16b95d147 prosody-0.9.12.tar.gz +sha256 1a59a322b71928a21985522aa00d0eab3552208d7bf9ecb318542a1b2fee3e8d prosody-0.9.12.tar.gz +sha512 e87b5f3b3e327722cec9d8d0470684e2ec2788a1c5ae623c4f505a00572ef21f65afe84cd5b7de47d6a65fe8872506fe34e5e8886e20979ff84710669857ca76 prosody-0.9.12.tar.gz
package/prosody/prosody.mk new file +70 -0
70 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v2 1/1 package/prosody: new package
I wanted to add a cover letter with the changes but the command didn't work out as expected so here it is:
v1 -> v2
* Changes as proposed by Yann
* Added init.d startup script
* Override distributed runtime config file with tweaks to suit buildroot
Dushara
PATCH v2 1/1 package/prosody: new package
In reply to Dushara JayasingheAs stated by the upstream developers, Prosody only supports lua-5.1 or luajit (which is a lua-5.1 interpreter):
Quoted 7 lines
Response from zash at zash.se:
Quoted 2 lines
I pegged the package to lua 5,1 based on the contents of the INSTALL file. Is this a hard requirement?
Up until Prosody 0.9 Lua 5.1 is required. However LuaJIT implements Lua 5.1 so it works.
The license terms are not very consistent: the source files all state to be "MIT/X11 licensed" and defer to the COPYING file for details, but that file only has the text for the MIT license. Thus, we believe the license to be MIT/X11, as stated in the source files.
This installs the base system with certificates for two domains:
localhost and example.com
The default runtime configuration is tweaked during installation to properly setup logging and pid-file directories.
Prosody doesn't like being executed as root, and thus the daemon is executed as the user prosody. The startup script creates the pid file write location with appropriate permissions.
--- DEVELOPERS | 3 + package/Config.in | 1 + package/prosody/Config.in | 18 ++++ package/prosody/S50prosody | 38 +++++++++ package/prosody/prosody.cfg.lua | 184 ++++++++++++++++++++++++++++++++++++++++ package/prosody/prosody.hash | 5 ++ package/prosody/prosody.mk | 70 +++++++++++++++ 7 files changed, 319 insertions(+) create mode 100644 package/prosody/Config.in create mode 100644 package/prosody/S50prosody create mode 100644 package/prosody/prosody.cfg.lua create mode 100644 package/prosody/prosody.hash create mode 100644 package/prosody/prosody.mk
DEVELOPERS +3 -0
@@ -485,6 +485,9 @@ F: package/nss-pam-ldapd/ F: package/sp-oops-extract/ F: package/unscd/ +N: Dushara Jayasinghe <[email protected]> +F: package/prosody/ + N: Ed Swierk <[email protected]> F: package/xxhash/
package/Config.in +1 -0
@@ -1716,6 +1716,7 @@ endif source "package/pptp-linux/Config.in" source "package/privoxy/Config.in" source "package/proftpd/Config.in" + source "package/prosody/Config.in" source "package/proxychains-ng/Config.in" source "package/ptpd/Config.in" source "package/ptpd2/Config.in"
package/prosody/Config.in new file +18 -0
@@ -0,0 +1,18 @@ +config BR2_PACKAGE_PROSODY + bool "prosody" + depends on BR2_PACKAGE_LUA_5_1 || BR2_PACKAGE_LUAJIT + 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" + depends on !BR2_PACKAGE_LUA_5_1 && !BR2_PACKAGE_LUAJIT
package/prosody/S50prosody new file +38 -0
@@ -0,0 +1,38 @@ +#! /bin/sh + +NAME=prosody +DAEMON=/usr/bin/$NAME +PIDDIR=/var/run/$NAME + +# Gracefully exit if the package has been removed. +test -x $DAEMON || exit 0 + +case "$1" in + start) + printf "Starting $NAME: " + mkdir -p $PIDDIR + chown $NAME $PIDDIR + start-stop-daemon -S -c $NAME -q -x $DAEMON + [ $? = 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 add the prosody + # user as a match criteria when stopping the service + start-stop-daemon -K -n lua -u $NAME + [ $? = 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
package/prosody/prosody.cfg.lua new file +184 -0
184 lines not on this page · raw message
package/prosody/prosody.hash new file +5 -0
@@ -0,0 +1,5 @@ +# Hashes from: https://prosody.im/downloads/source/{MD5,SHA1,SHA256,SHA512}SUMS +md5 d743adea6cfbaacc3a24cc0c3928bb1b prosody-0.9.12.tar.gz +sha1 1ee224263a5b3d67960e12edbbe6b2f16b95d147 prosody-0.9.12.tar.gz +sha256 1a59a322b71928a21985522aa00d0eab3552208d7bf9ecb318542a1b2fee3e8d prosody-0.9.12.tar.gz +sha512 e87b5f3b3e327722cec9d8d0470684e2ec2788a1c5ae623c4f505a00572ef21f65afe84cd5b7de47d6a65fe8872506fe34e5e8886e20979ff84710669857ca76 prosody-0.9.12.tar.gz
package/prosody/prosody.mk new file +70 -0
70 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v2 1/1 package/prosody: new package
Hi all,
Is there anything else I need to address in this patch?
Dushara
PATCH v2 1/1 package/prosody: new package
In reply to Dushara JayasingheAs stated by the upstream developers, Prosody only supports lua-5.1 or luajit (which is a lua-5.1 interpreter):
Quoted 7 lines
Response from zash at zash.se:
Quoted 2 lines
I pegged the package to lua 5,1 based on the contents of the INSTALL file. Is this a hard requirement?
Up until Prosody 0.9 Lua 5.1 is required. However LuaJIT implements Lua 5.1 so it works.
The license terms are not very consistent: the source files all state to be "MIT/X11 licensed" and defer to the COPYING file for details, but that file only has the text for the MIT license. Thus, we believe the license to be MIT/X11, as stated in the source files.
This installs the base system with certificates for two domains:
localhost and example.com
The default runtime configuration is tweaked during installation to properly setup logging and pid-file directories.
Prosody doesn't like being executed as root, and thus the daemon is executed as the user prosody. The startup script creates the pid file write location with appropriate permissions.
--- DEVELOPERS | 3 + package/Config.in | 1 + package/prosody/Config.in | 18 ++++ package/prosody/S50prosody | 38 +++++++++ package/prosody/prosody.cfg.lua | 184 ++++++++++++++++++++++++++++++++++++++++ package/prosody/prosody.hash | 5 ++ package/prosody/prosody.mk | 70 +++++++++++++++ 7 files changed, 319 insertions(+) create mode 100644 package/prosody/Config.in create mode 100644 package/prosody/S50prosody create mode 100644 package/prosody/prosody.cfg.lua create mode 100644 package/prosody/prosody.hash create mode 100644 package/prosody/prosody.mk
DEVELOPERS +3 -0
@@ -485,6 +485,9 @@ F: package/nss-pam-ldapd/ F: package/sp-oops-extract/ F: package/unscd/ +N: Dushara Jayasinghe <[email protected]> +F: package/prosody/ + N: Ed Swierk <[email protected]> F: package/xxhash/
package/Config.in +1 -0
@@ -1716,6 +1716,7 @@ endif source "package/pptp-linux/Config.in" source "package/privoxy/Config.in" source "package/proftpd/Config.in" + source "package/prosody/Config.in" source "package/proxychains-ng/Config.in" source "package/ptpd/Config.in" source "package/ptpd2/Config.in"
package/prosody/Config.in new file +18 -0
@@ -0,0 +1,18 @@ +config BR2_PACKAGE_PROSODY + bool "prosody" + depends on BR2_PACKAGE_LUA_5_1 || BR2_PACKAGE_LUAJIT + 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" + depends on !BR2_PACKAGE_LUA_5_1 && !BR2_PACKAGE_LUAJIT
package/prosody/S50prosody new file +38 -0
@@ -0,0 +1,38 @@ +#! /bin/sh + +NAME=prosody +DAEMON=/usr/bin/$NAME +PIDDIR=/var/run/$NAME + +# Gracefully exit if the package has been removed. +test -x $DAEMON || exit 0 + +case "$1" in + start) + printf "Starting $NAME: " + mkdir -p $PIDDIR + chown $NAME $PIDDIR + start-stop-daemon -S -c $NAME -q -x $DAEMON + [ $? = 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 add the prosody + # user as a match criteria when stopping the service + start-stop-daemon -K -n lua -u $NAME + [ $? = 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
package/prosody/prosody.cfg.lua new file +184 -0
184 lines not on this page · raw message
package/prosody/prosody.hash new file +5 -0
@@ -0,0 +1,5 @@ +# Hashes from: https://prosody.im/downloads/source/{MD5,SHA1,SHA256,SHA512}SUMS +md5 d743adea6cfbaacc3a24cc0c3928bb1b prosody-0.9.12.tar.gz +sha1 1ee224263a5b3d67960e12edbbe6b2f16b95d147 prosody-0.9.12.tar.gz +sha256 1a59a322b71928a21985522aa00d0eab3552208d7bf9ecb318542a1b2fee3e8d prosody-0.9.12.tar.gz +sha512 e87b5f3b3e327722cec9d8d0470684e2ec2788a1c5ae623c4f505a00572ef21f65afe84cd5b7de47d6a65fe8872506fe34e5e8886e20979ff84710669857ca76 prosody-0.9.12.tar.gz
package/prosody/prosody.mk new file +70 -0
70 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v2 1/1 package/prosody: new package
Dushara, All,
On 2017-09-11 22:18 +1000, Dushara Jayasinghe spake thusly:
Quoted 20 lines
As stated by the upstream developers, Prosody only supports lua-5.1 or luajit (which is a lua-5.1 interpreter):
Quoted 7 lines
Response from zash at zash.se:
Quoted 2 lines
I pegged the package to lua 5,1 based on the contents of the INSTALL file. Is this a hard requirement?
Up until Prosody 0.9 Lua 5.1 is required. However LuaJIT implements Lua 5.1 so it works.
The license terms are not very consistent: the source files all state to be "MIT/X11 licensed" and defer to the COPYING file for details, but that file only has the text for the MIT license. Thus, we believe the license to be MIT/X11, as stated in the source files.
This installs the base system with certificates for two domains:
localhost and example.com
Quoted 8 lines
The default runtime configuration is tweaked during installation to properly setup logging and pid-file directories.
Prosody doesn't like being executed as root, and thus the daemon is executed as the user prosody. The startup script creates the pid file write location with appropriate permissions.
Signed-off-by Dushara Jayasinghe <[email protected]>
But one minor nit, see below...
[--SNIP--]
Quoted 6 lines
package/prosody/prosody.mk new file +0
-0
package/prosody/prosody.mk line 8
Quoted 8 lines
package/prosody/prosody.mk new file +8
-0@@ -0,0 +1,70 @@ +################################################################################ +# +# prosody +# +################################################################################ + +PROSODY_VERSION = 0.9.12 +PROSODY_SOURCE = prosody-$(PROSODY_VERSION).tar.gz
This is the default, so is not needed.
There is no need for you to respin just for that. It can be fixed by the comitter.
Regards,
Yann E. MORIN.
Quoted 69 lines
package/prosody/prosody.mk new file +62
-0+PROSODY_SITE = https://prosody.im/downloads/source +PROSODY_LICENSE = MIT +PROSODY_LICENSE_FILES = COPYING +PROSODY_DEPENDENCIES = openssl libidn + +ifeq ($(BR2_PACKAGE_LUA_5_1),y) +PROSODY_DEPENDENCIES += lua +endif + +ifeq ($(BR2_PACKAGE_LUAJIT),y) +PROSODY_DEPENDENCIES += luajit +endif + +define PROSODY_CONFIGURE_CMDS + cd $(@D) && \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure --prefix=/usr \ + --c-compiler=$(TARGET_CC) \ + --cflags="$(TARGET_CFLAGS)" \ + --linker=$(TARGET_CC) \ + --ldflags="$(TARGET_LDFLAGS) -shared" \ + --sysconfdir=/etc/prosody \ + --with-lua=$(STAGING_DIR)/usr +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 nogroup -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 + +# 1. Enable posix functionality +# 2. Log to syslog +# 3. Specify pid file write location +# 4. Enable virtual host example.com +define PROSODY_TWEAK_DEFAULT_CONF + $(INSTALL) -D package/prosody/prosody.cfg.lua \ + $(TARGET_DIR)/etc/prosody/prosody.cfg.lua +endef + +PROSODY_POST_INSTALL_TARGET_HOOKS += PROSODY_TWEAK_DEFAULT_CONF + +$(eval $(generic-package))Signature · 6 lines
2.1.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 1/1 package/prosody: new package
In reply to Dushara JayasingheAs stated by the upstream developers, Prosody only supports lua-5.1 or luajit (which is a lua-5.1 interpreter):
Quoted 7 lines
Response from zash at zash.se:
Quoted 2 lines
I pegged the package to lua 5,1 based on the contents of the INSTALL file. Is this a hard requirement?
Up until Prosody 0.9 Lua 5.1 is required. However LuaJIT implements Lua 5.1 so it works.
The license terms are not very consistent: the source files all state to be "MIT/X11 licensed" and defer to the COPYING file for details, but that file only has the text for the MIT license. Thus, we believe the license to be MIT/X11, as stated in the source files.
This installs the base system with certificates for two domains:
localhost and example.com
The default runtime configuration is tweaked during installation to properly setup logging and pid-file directories.
Prosody doesn't like being executed as root, and thus the daemon is executed as the user prosody. The startup script creates the pid file write location with appropriate permissions.
---
Chanes v2 -> v3:
- Create prosody group for patch file
- Use pidfile in service termination
- Remove superfluous _SOURCE line (Suggested by Yann E. Morin)
DEVELOPERS | 3 + package/Config.in | 1 + package/prosody/Config.in | 18 ++++ package/prosody/S50prosody | 44 ++++++++++ package/prosody/prosody.cfg.lua | 184 ++++++++++++++++++++++++++++++++++++++++ package/prosody/prosody.hash | 5 ++ package/prosody/prosody.mk | 69 +++++++++++++++ 7 files changed, 324 insertions(+) create mode 100644 package/prosody/Config.in create mode 100644 package/prosody/S50prosody create mode 100644 package/prosody/prosody.cfg.lua create mode 100644 package/prosody/prosody.hash create mode 100644 package/prosody/prosody.mk
DEVELOPERS +3 -0
@@ -485,6 +485,9 @@ F: package/nss-pam-ldapd/ F: package/sp-oops-extract/ F: package/unscd/ +N: Dushara Jayasinghe <[email protected]> +F: package/prosody/ + N: Ed Swierk <[email protected]> F: package/xxhash/
package/Config.in +1 -0
@@ -1716,6 +1716,7 @@ endif source "package/pptp-linux/Config.in" source "package/privoxy/Config.in" source "package/proftpd/Config.in" + source "package/prosody/Config.in" source "package/proxychains-ng/Config.in" source "package/ptpd/Config.in" source "package/ptpd2/Config.in"
package/prosody/Config.in new file +18 -0
@@ -0,0 +1,18 @@ +config BR2_PACKAGE_PROSODY + bool "prosody" + depends on BR2_PACKAGE_LUA_5_1 || BR2_PACKAGE_LUAJIT + 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" + depends on !BR2_PACKAGE_LUA_5_1 && !BR2_PACKAGE_LUAJIT
package/prosody/S50prosody new file +44 -0
44 lines not on this page · raw message
package/prosody/prosody.cfg.lua new file +184 -0
184 lines not on this page · raw message
package/prosody/prosody.hash new file +5 -0
@@ -0,0 +1,5 @@ +# Hashes from: https://prosody.im/downloads/source/{MD5,SHA1,SHA256,SHA512}SUMS +md5 d743adea6cfbaacc3a24cc0c3928bb1b prosody-0.9.12.tar.gz +sha1 1ee224263a5b3d67960e12edbbe6b2f16b95d147 prosody-0.9.12.tar.gz +sha256 1a59a322b71928a21985522aa00d0eab3552208d7bf9ecb318542a1b2fee3e8d prosody-0.9.12.tar.gz +sha512 e87b5f3b3e327722cec9d8d0470684e2ec2788a1c5ae623c4f505a00572ef21f65afe84cd5b7de47d6a65fe8872506fe34e5e8886e20979ff84710669857ca76 prosody-0.9.12.tar.gz
package/prosody/prosody.mk new file +69 -0
69 lines not on this page · raw message
Signature · 1 line
2.1.4
Thomas Petazzoni
AppliedPATCH v3 1/1 package/prosody: new package
Hello,
Quoted 27 lines · Dushara Jayasinghe
As stated by the upstream developers, Prosody only supports lua-5.1 or luajit (which is a lua-5.1 interpreter):
Quoted 7 lines
Response from zash at zash.se:
Quoted 2 lines
I pegged the package to lua 5,1 based on the contents of the INSTALL file. Is this a hard requirement?
Up until Prosody 0.9 Lua 5.1 is required. However LuaJIT implements Lua 5.1 so it works.
The license terms are not very consistent: the source files all state to be "MIT/X11 licensed" and defer to the COPYING file for details, but that file only has the text for the MIT license. Thus, we believe the license to be MIT/X11, as stated in the source files.
This installs the base system with certificates for two domains:
localhost and example.comThe default runtime configuration is tweaked during installation to properly setup logging and pid-file directories.
Prosody doesn't like being executed as root, and thus the daemon is executed as the user prosody. The startup script creates the pid file write location with appropriate permissions.
Quoted 7 lines
Signed-off-by Dushara Jayasinghe <[email protected]>Reviewed-by "Yann E. MORIN" <[email protected]>---
Chanes v2 -> v3:
- Create prosody group for patch file
- Use pidfile in service termination
- Remove superfluous_SOURCEline (Suggested by Yann E. Morin)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com