From 0838a7ed482f29ddf71cf05e7ec6cf7c2728ce34 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 18 Jun 2012 00:01:40 +0000 Subject: Mon Jun 18 00:01:40 UTC 2012 --- community-testing/prosody/ChangeLog | 398 +++++++++++++++++++++++++++ community-testing/prosody/PKGBUILD | 60 ++++ community-testing/prosody/fix-config.patch | 32 +++ community-testing/prosody/prosody.install | 35 +++ community-testing/prosody/prosody.logrotated | 9 + community-testing/prosody/prosody.rcd | 93 +++++++ community-testing/prosody/prosody.service | 13 + community-testing/prosody/prosody.tmpfile.d | 1 + 8 files changed, 641 insertions(+) create mode 100644 community-testing/prosody/ChangeLog create mode 100644 community-testing/prosody/PKGBUILD create mode 100644 community-testing/prosody/fix-config.patch create mode 100644 community-testing/prosody/prosody.install create mode 100644 community-testing/prosody/prosody.logrotated create mode 100644 community-testing/prosody/prosody.rcd create mode 100644 community-testing/prosody/prosody.service create mode 100644 community-testing/prosody/prosody.tmpfile.d (limited to 'community-testing/prosody') diff --git a/community-testing/prosody/ChangeLog b/community-testing/prosody/ChangeLog new file mode 100644 index 000000000..45f3a05fd --- /dev/null +++ b/community-testing/prosody/ChangeLog @@ -0,0 +1,398 @@ +2009-11-23 Dwayne Bent + + * .hgtags: + Added tag v0.6.0-1 for changeset 6c5b7e66bee4 + [d573d1d7a403] [tip] + + * .hgtags: + Removed tag v0.6.0-1 + [6c5b7e66bee4] [v0.6.0-1] + + * PKGBUILD: + Use correct package name and version + [1e65e6a877d3] + + * .hgtags: + Added tag v0.6.0-1 for changeset ad52fee15148 + [8196689dd4c4] + + * PKGBUILD, prosody.cfg.lua: + Included mod_compression in example configuration file + [ad52fee15148] + + * ChangeLog: + Updated ChangeLog + [34b6046aca14] + + * PKGBUILD: + Updated checksums + [3b4c28f28321] + + * PKGBUILD, prosody.cfg.lua: + New upstream version + [9d201755b63d] + +2009-10-22 Dwayne Bent + + * .hgtags: + Added tag v0.6.0rc1-1 for changeset c0a99ab935a8 + [a0e2015435b6] + + * ChangeLog, PKGBUILD: + New upstream version + [c0a99ab935a8] [v0.6.0rc1-1] + + * PKGBUILD: + Removed conflicts + [0f0560190a81] + + * PKGBUILD: + Removed makedepends for gcc, the base-devel group is assumed to + exist + [4160ed469fa4] + + * PKGBUILD: + Fix typo in PKGBUILD + [85d988c7e4a5] + +2009-09-28 Dwayne Bent + + * ChangeLog, PKGBUILD: + New upstream version + [3e4ffcdc887a] + +2009-07-29 Dwayne Bent + + * .hgtags: + Added tag v0.5.1-1 for changeset 1be51884e580 + [74f32914279c] + + * ChangeLog, PKGBUILD: + New upstream version + [1be51884e580] [v0.5.1-1] + +2009-07-20 Dwayne Bent + + * .hgtags: + Corrected tag name + [d9662df69ab4] + + * .hgtags: + Added tag v0.5.0 for changeset d228983b5873 + [a350368643eb] + + * PKGBUILD: + New upstream version + [d228983b5873] [v0.5.0-1] + + * ChangeLog: + Updated ChangeLog + [111cf16bfc8b] + +2009-07-14 Dwayne Bent + + * .hgtags: + Added tag v0.5.0rc2-1 for changeset 701e6c5ed639 + [828bb0fc4e5e] + + * PKGBUILD: + New upstream version + [701e6c5ed639] [v0.5.0rc2-1] + + * ChangeLog: + Updated ChangeLog + [7616eaf8b835] + + * prosody.cfg.lua: + Enabled PEP in default configuration + [c8a7c4d15e38] + +2009-07-11 Dwayne Bent + + * prosody.cfg.lua: + Cleaned up and added new modules to default configuration file + [07fdc8fd8ff9] + + * PKGBUILD: + Added luasec back as hard dependency + [9506bff48c77] + + * .hgtags: + Added tag v0.5.0rc1-2 for changeset a252809a03a3 + [803ace20879a] + + * ChangeLog, PKGBUILD: + New release version + [a252809a03a3] [v0.5.0rc1-2] + + * PKGBUILD: + Added make before make install + + This should fix Prosody not correctly reporting version. + [881eca5b8e0e] + + * .hgtags: + Added tag v0.5.0rc1-1 for changeset f1d918d4779e + [1fc8dbc498d5] + + * ChangeLog: + New upstream version + [f1d918d4779e] [v0.5.0rc1-1] + + * PKGBUILD, prosody.rcd: + Redid indent alignment and silenced successful output of prosodyctl + [de9bdd756bd8] + + * PKGBUILD, prosody-datadir.diff: + Converted to prosody-devel package + [92e5e98529dd] + +2009-06-30 Dwayne Bent + + * PKGBUILD, prosody.cfg.lua: + Moved luasec from depends to optdepends + + Since luasec is not strictly required for Prosody to operate it is + now an optional dependency. + [7079ec87eef5] + +2009-06-27 Dwayne Bent + + * .hgtags: + Added tag v0.4.2-4 for changeset 0345a59e8495 + [1e488e1c03eb] + + * PKGBUILD: + New release version + [0345a59e8495] [v0.4.2-4] + + * prosody.install: + Added note about ChangeLog to install script + [c683ef309b6a] + + * PKGBUILD, prosody.rcd: + Use prosodyctl to start/stop daemon + [eaf4c26bb29f] + + * PKGBUILD, prosody.rcd: + Refactored start, stop, reload in rc.d script + + Start, stop, reload will not display a friendly error message if + Prosody is not running when you attempt to stop or reload, or if + Prosody is already running when you attempt to start. Reload also + now utilizes the get_pid function. + [9873d5256a42] + + * PKGBUILD, prosody.logrotated: + Use explicit log filenames in logrotate script + + This fixes an issue where if you do not have olddir enabled, rotated + logs will be rotated again. + [38ea11efacb9] + +2009-06-22 Dwayne Bent + + * PKGBUILD, prosody.rcd: + Added status command to rc.d usage + [1b31e88d992d] + + * PKGBUILD, prosody.rcd: + Added reload command + [62e3cbdff1d5] + + * prosody.install: + Updated leftover olddir path + [e91b3fc2a9ee] + + * PKGBUILD, prosody.rcd: + Use explicit source command + [b790c098d519] + + * prosody.install: + Removed tab characters + [870316274137] + +2009-06-20 Dwayne Bent + + * PKGBUILD: + Updated md5 sums + [74ce2ab8a96b] + + * prosody.logrotated: + Changed default olddir path + [cef8226473c2] + + * prosody.rcd: + Removed sleep delay in restart + [a94167e59091] + +2009-06-10 Dwayne Bent + + * prosody.cfg.lua: + Removed per-host certificate entry in example configuration + + Until Issue #30 + [http://code.google.com/p/lxmppd/issues/detail?id=30] is fixed per- + host certificates have no effect. + [d00e35979450] + +2009-06-05 Dwayne Bent + + * ChangeLog: + Added ChangeLog + [7298c4da135a] + +2009-06-03 Dwayne Bent + + * .hgtags: + Added tag v0.4.2-3 for changeset 028183ffeba8 + [7dbfd040e908] + + * PKGBUILD: + New release version + [028183ffeba8] [v0.4.2-3] + + * PKGBUILD: + Removed superfluous make command + [3d96c98bac26] + + * PKGBUILD: + More consistent use of quote marks + [f6bd5b595b2d] + + * PKGBUILD, prosody.logrotated: + Correct PID file location in logrotate script + [cec60904c739] + +2009-05-30 Dwayne Bent + + * .hgtags: + Added tag v0.4.2-2 for changeset 37268dd0d4fd + [a8a197635bb6] + + * PKGBUILD: + New release version + [37268dd0d4fd] [v0.4.2-2] + + * PKGBUILD: + Use install instead of mkdir in PKGBUILD + [8e48108bbe9a] + + * PKGBUILD, prosody-datadir.diff: + Apply patch to fix world-readable data directory + [2c706dda941c] + +2009-05-23 Dwayne Bent + + * .hgtags: + Added tag v0.4.2-1 for changeset 1d29ea2dc519 + [e2d2962de3f7] + + * PKGBUILD: + New upstream release + [1d29ea2dc519] [v0.4.2-1] + + * prosody.cfg.lua: + Aesthetic changes to the configuration file + [d5d848a58965] + +2009-05-22 Dwayne Bent + + * prosody.cfg.lua: + Removed extraneous semicolon in configuration file + [9a002c74edc2] + + * PKGBUILD: + Cleaned up PKGBUILD license + [82cb66a84de8] + +2009-05-21 Dwayne Bent + + * prosody.install: + Changed formatting of leftover path messages. + [ac6069de93c9] + + * prosody.install: + Moved prosody user removal to post_remove. + [2c60e27d0c13] + + * PKGBUILD, prosody.cfg.lua: + Added comment about pidfile in prosody configuration file. + [8b9fa4da48ca] + + * .hgtags: + Added tag v0.4.1-5 for changeset 69962178bcae + [01812099521b] + + * PKGBUILD: + New release version. + [69962178bcae] [v0.4.1-5] + + * PKGBUILD, prosody.cfg.lua, prosody.install, prosody.rcd: + Refactored rc.d daemon script. + + Prosody now writes its own PID file to /var/run/prosody/prosody.pid. + rc.d script now uses '/bin/kill -0' to check for running process + instead of awkward combination of 'ps' and 'awk'. + [4f0e937c5148] + + * prosody.install: + Added post_install message with link to Arch Wiki documentation. + [88d99267ad19] + +2009-05-19 Dwayne Bent + + * PKGBUILD: + Add logrotate script to backup array. + [d4f5445707f7] + +2009-05-11 Dwayne Bent + + * prosody.install: + Fixed install script attempting to add prosody group when it already + exists. + [7d7807aa5d30] + + * .hgtags: + Added tag v0.4.1-4 for changeset 442f62077f30 + [389c885a35c5] + + * PKGBUILD: + New release version. + [442f62077f30] [v0.4.1-4] + + * PKGBUILD: + Generated correct checksums for source files. + [162859c9e287] + + * .hgtags: + Added tag v0.4.1-3 for changeset b629392e4716 + [f3d11fbd0b45] + + * PKGBUILD: + New release version. + [b629392e4716] [v0.4.1-3] + + * prosody.logrotated: + Fixed wrong PID file path in logrotate script. + [0871a4a12392] + +2009-05-07 Dwayne Bent + + * prosody.cfg.lua, prosody.rcd: + Removed trailing whitespace. + [7c86c073650e] + + * prosody.cfg.lua: + Added logging timestamps to default configuration. + [46f9111d47ce] + + * .hgtags: + Added tag v0.4.1-2 for changeset 24b9dee19e65 + [5240b39d76d7] + + * PKGBUILD, prosody.cfg.lua, prosody.install, prosody.logrotated, + prosody.rcd: + Initial commit. + [24b9dee19e65] [v0.4.1-2] + diff --git a/community-testing/prosody/PKGBUILD b/community-testing/prosody/PKGBUILD new file mode 100644 index 000000000..3e4947701 --- /dev/null +++ b/community-testing/prosody/PKGBUILD @@ -0,0 +1,60 @@ +# $Id: PKGBUILD 72560 2012-06-16 17:10:57Z dreisner $ +# Maintainer: Sergej Pupykin +# Maintainer: Dwayne Bent +# Contributor: Paul-Sebastian Manole + +pkgname=prosody +pkgver=0.8.2 +pkgrel=4 +pkgdesc="Lightweight and extensible Jabber/XMPP server written in Lua." +arch=('i686' 'x86_64') +url="http://prosody.im/" +license=('MIT') +depends=('lua>=5.1' 'luasocket' 'luaexpat' 'luafilesystem' 'libidn>=0.5.18' 'openssl') +optdepends=('luasec: TLS encryption support' + 'lua-zlib: compression support' + 'luadbi: SQL storage support') +install=prosody.install +backup=('etc/logrotate.d/prosody' + 'etc/prosody/prosody.cfg.lua') +source=("http://prosody.im/depot/${pkgver}/prosody-${pkgver}.tar.gz" + 'prosody.rcd' + 'prosody.logrotated' + 'fix-config.patch' + 'prosody.tmpfile.d' + 'prosody.service') +md5sums=('6e907bf0d0acf24f1011083020ba6ffb' + 'd2b5f9c8e42bb31819e715eb1756ee53' + '26466fdbea87963a3ca6f48f76fe4a29' + '59a1bf2dfd0bd386cef6fa646e2a3752' + 'e2f5a1df410b05696a30dcb058841084' + 'e74045f27cb60908d535969906781f75') + +build() { + cd "$srcdir/prosody-$pkgver" + patch -p1 <$srcdir/fix-config.patch + ./configure --prefix=/usr --sysconfdir=/etc/prosody \ + --datadir=/var/lib/prosody + make +} + +package() { + cd "$srcdir/prosody-$pkgver" + + make DESTDIR="$pkgdir" install + + rm $pkgdir/etc/prosody/certs/* + + install -d "$pkgdir/etc/rc.d" + install -d "$pkgdir/etc/logrotate.d" + install -d "$pkgdir/var/log/prosody" + + install -o root -g root -m 755 "$srcdir/prosody.rcd" \ + "$pkgdir/etc/rc.d/prosody" + install -o root -g root -m 644 "$srcdir/prosody.logrotated" \ + "$pkgdir/etc/logrotate.d/prosody" + + install -Dm0644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING + install -Dm0644 $srcdir/prosody.tmpfile.d $pkgdir//usr/lib/tmpfiles.d/prosody.conf + install -Dm0644 $srcdir/prosody.service $pkgdir/usr/lib/systemd/system/prosody.service +} diff --git a/community-testing/prosody/fix-config.patch b/community-testing/prosody/fix-config.patch new file mode 100644 index 000000000..8856bfb92 --- /dev/null +++ b/community-testing/prosody/fix-config.patch @@ -0,0 +1,32 @@ +diff -wbBur prosody-0.8.0/prosody.cfg.lua.dist prosody-0.8.0.my/prosody.cfg.lua.dist +--- prosody-0.8.0/prosody.cfg.lua.dist 2011-04-05 13:47:06.000000000 +0000 ++++ prosody-0.8.0.my/prosody.cfg.lua.dist 2011-04-07 16:03:42.000000000 +0000 +@@ -21,6 +21,8 @@ + -- (see http://prosody.im/doc/creating_accounts for info) + -- Example: admins = { "user1@example.com", "user2@example.net" } + admins = { } ++daemonize = true ++pidfile = "/var/run/prosody/prosody.pid" + + -- Enable use of libevent for better performance under high load + -- For more information see: http://prosody.im/doc/libevent +@@ -59,7 +61,7 @@ + --"admin_telnet"; -- Opens telnet console interface on localhost port 5582 + + -- Other specific functionality +- --"posix"; -- POSIX functionality, sends server to background, enables syslog, etc. ++ "posix"; -- POSIX functionality, sends server to background, enables syslog, etc. + --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP" + --"httpserver"; -- Serve static files from a directory over HTTP + --"groups"; -- Shared roster support +@@ -123,8 +125,8 @@ + -- Logging configuration + -- For advanced logging see http://prosody.im/doc/logging + log = { +- info = "prosody.log"; -- Change 'info' to 'debug' for verbose logging +- error = "prosody.err"; ++ info = "/var/log/prosody/prosody.log"; -- Change 'info' to 'debug' for verbose logging ++ error = "/var/log/prosody/prosody.err"; + -- "*syslog"; -- Uncomment this for logging to syslog + -- "*console"; -- Log to the console, useful for debugging with daemonize=false + } diff --git a/community-testing/prosody/prosody.install b/community-testing/prosody/prosody.install new file mode 100644 index 000000000..f935e3d63 --- /dev/null +++ b/community-testing/prosody/prosody.install @@ -0,0 +1,35 @@ +post_install() { + if [ -z "`grep '^prosody:' /etc/group`" ]; then + groupadd -g 412 prosody + fi + if [ -z "`grep '^prosody:' /etc/passwd`" ]; then + useradd -u 412 -d /var/lib/prosody -g prosody -s /bin/false prosody + fi + + chown prosody:prosody var/lib/prosody + chown prosody:prosody var/log/prosody + + echo ">> Documentation: http://wiki.archlinux.org/index.php/Prosody" +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + userdel prosody + + paths=(/etc/prosody /var/lib/prosody /var/log/prosody + /var/log/old/prosody) + + first=true + for path in ${paths[@]}; do + if [ -d $path ]; then + if $first; then + first=false + echo "==> Leftover Paths:" + fi + echo "==> $path" + fi + done +} diff --git a/community-testing/prosody/prosody.logrotated b/community-testing/prosody/prosody.logrotated new file mode 100644 index 000000000..5659ba01f --- /dev/null +++ b/community-testing/prosody/prosody.logrotated @@ -0,0 +1,9 @@ +/var/log/prosody/prosody.log /var/log/prosody/prosody.err { + # olddir /var/log/old/prosody + create 644 prosody prosody + sharedscripts + missingok + postrotate + /bin/kill -HUP `cat /var/run/prosody/prosody.pid 2> /dev/null` 2> /dev/null || true + endscript +} diff --git a/community-testing/prosody/prosody.rcd b/community-testing/prosody/prosody.rcd new file mode 100644 index 000000000..afaf77903 --- /dev/null +++ b/community-testing/prosody/prosody.rcd @@ -0,0 +1,93 @@ +#!/bin/bash + +daemon_name=prosody +pid_file=/var/run/$daemon_name/$daemon_name.pid + +source /etc/rc.conf +source /etc/rc.d/functions + +get_pid() { + if [ -f $pid_file ]; then + /bin/kill -0 $(cat $pid_file) + if [ $? == 0 ]; then + cat $pid_file + fi + fi +} + +case "$1" in + start) + stat_busy "Starting $daemon_name daemon" + + [ -d /var/run/$daemon_name ] || { mkdir -p /var/run/$daemon_name ; chown prosody:prosody /var/run/prosody; } + PID=$(get_pid) + if [ -z "$PID" ]; then + [ -f $pid_file ] && rm -f $pid_file + mkdir -p `dirname $pid_file` + prosodyctl start 1>/dev/null 2>/dev/null + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + add_daemon $daemon_name + stat_done + fi + else + stat_fail + printhl "$daemon_name is already running" + exit 1 + fi + ;; + + stop) + stat_busy "Stopping $daemon_name daemon" + PID=$(get_pid) + if [ ! -z "$PID" ]; then + prosodyctl stop 1>/dev/null 2>/dev/null + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + rm -f $pid_file &> /dev/null + rm_daemon $daemon_name + stat_done + fi + else + stat_fail + printhl "$daemon_name is not running" + exit 1 + fi + ;; + + restart) + $0 stop + $0 start + ;; + + reload) + stat_busy "Reloading $daemon_name" + PID=$(get_pid) + if [ ! -z "$PID" ]; then + /bin/kill -HUP $PID 2> /dev/null + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + stat_done + fi + else + stat_fail + printhl "$daemon_name is not running" + fi + ;; + + status) + stat_busy "Checking $daemon_name status"; + ck_status $daemon_name + ;; + + *) + echo "usage: $0 {start|stop|restart|reload|status}" + esac + +exit 0 diff --git a/community-testing/prosody/prosody.service b/community-testing/prosody/prosody.service new file mode 100644 index 000000000..f54159f55 --- /dev/null +++ b/community-testing/prosody/prosody.service @@ -0,0 +1,13 @@ +[Unit] +Description=XMPP (Jabber) Server +After=network.target + +[Service] +Type=forking +PIDFile=/run/prosody/prosody.pid +ExecStart=/usr/bin/prosodyctl start +ExecStop=/usr/bin/prosodyctl stop + +[Install] +WantedBy=multi-user.target + diff --git a/community-testing/prosody/prosody.tmpfile.d b/community-testing/prosody/prosody.tmpfile.d new file mode 100644 index 000000000..5f6de657d --- /dev/null +++ b/community-testing/prosody/prosody.tmpfile.d @@ -0,0 +1 @@ +d /run/prosody 0755 412 412 -- cgit v1.2.3-54-g00ecf