summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarrat2021-06-20 23:28:14 +0200
committerNarrat2021-06-20 23:28:14 +0200
commit6af9fe3f4d9658a43489b892d36e1642a3da09b6 (patch)
tree6cde71998d80b22325e9e644e120c9684f3d7f77
parent27242a924b99247c66ffb5fb7696b90c8b1100bd (diff)
downloadaur-6af9fe3f4d9658a43489b892d36e1642a3da09b6.tar.gz
prosody-hg-stable: use current stable branch (0.11)
The changes are based upon the PKGBUILD from the official repos, which should reduce the maintenace burden a lot.
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD102
-rw-r--r--prosody.install9
-rw-r--r--prosody.service24
-rw-r--r--prosody.tmpfile.d1
5 files changed, 94 insertions, 74 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3551186bfdd0..3a3e4e5a30fc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,6 @@
-# Generated by mksrcinfo v8
-# Fri Dec 1 23:00:28 UTC 2017
pkgbase = prosody-hg-stable
- pkgdesc = Lightweight and extensible Jabber/XMPP server written in Lua (stable build from 0.10-branch)
- pkgver = 0.10.r7499+.3d21c63ec03f+
+ pkgdesc = Lightweight and extensible Jabber/XMPP server written in Lua (latest from stable-branch)
+ pkgver = 0.11.r9896+.6e67872bcba4+
pkgrel = 1
url = https://prosody.im/
install = prosody.install
@@ -11,26 +9,26 @@ pkgbase = prosody-hg-stable
arch = armv7h
license = MIT
makedepends = mercurial
- depends = lua51
- depends = lua51-socket
- depends = lua51-expat
- depends = lua51-filesystem
+ depends = lua52
+ depends = lua52-socket
+ depends = lua52-expat
+ depends = lua52-filesystem
depends = libidn
depends = openssl
- optdepends = lua51-sec: TLS encryption support
- optdepends = lua51-bitop: websocket support
- optdepends = lua51-event: libevent support
+ optdepends = lua52-sec: TLS encryption support
+ optdepends = lua52-dbi: SQL storage support
provides = prosody
conflicts = prosody
backup = etc/prosody/prosody.cfg.lua
- source = prosody-hg::hg+https://hg.prosody.im/0.10
+ source = prosody-stable::hg+https://hg.prosody.im/0.11
source = prosody.tmpfile.d
+ source = prosody.logrotated
source = sysuser.conf
source = prosody.service
- md5sums = SKIP
- md5sums = dc8405a6a235b83dc8a0dcdf7b71cbaa
- md5sums = 385ca73d9f6046f3636266ce9bf38797
- md5sums = e74045f27cb60908d535969906781f75
+ sha256sums = SKIP
+ sha256sums = 0753bd9260f1cfdce6e18e01a61e320b396acfe9fca8ccf3250653bfa6af997e
+ sha256sums = 5a2466b73bd069fb73be97a4e23b24e4c8dd1adb7db871cb8f5ab4094c1f967f
+ sha256sums = e5c30ffbb066f0ed3444475b3313490c535d8c9df018726f6cecf9e3ddfd2e48
+ sha256sums = e9d6abc4c53bd9e7b1d2acc56c7513416751f9436bf382ed52d703d29b13bfaa
pkgname = prosody-hg-stable
-
diff --git a/PKGBUILD b/PKGBUILD
index 6df4c49a8148..ede05137ef6d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,91 +1,101 @@
-# $Id: PKGBUILD 143420 2015-10-08 11:02:55Z spupykin $
+# Maintainer: Daurnimator <daurnimator@archlinux.org>
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
-# Maintainer: Dwayne Bent <dbb@dbb.io>
-# Maintainer: Tilman Vatteroth <tilman.vatteroth@uni-dortmund.de>
+# Old Maintainer: Dwayne Bent <dbb@dbb.io>
+# Old Maintainer: Tilman Vatteroth <tilman.vatteroth@uni-dortmund.de>
# Contributor: Paul-Sebastian Manole <brokenthorn@gmail.com>
# Contributor: Timothée Ravier <tim@siosm.fr>
# Contributor: Christoph Stahl <christoph.stahl@uni-dortmund.de>
pkgname=prosody-hg-stable
+pkgver=0.11.r9896+.6e67872bcba4+
pkgrel=1
-pkgver=0.10.r7499+.3d21c63ec03f+
-pkgver() {
- cd "$srcdir/prosody-hg"
- printf "0.10.r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
-}
-pkgdesc="Lightweight and extensible Jabber/XMPP server written in Lua (stable build from 0.10-branch)"
+pkgdesc="Lightweight and extensible Jabber/XMPP server written in Lua (latest from stable-branch)"
arch=('i686' 'x86_64' 'armv7h')
url="https://prosody.im/"
license=('MIT')
-depends=('lua51' 'lua51-socket' 'lua51-expat' 'lua51-filesystem' 'libidn'
+depends=('lua52'
+ 'lua52-socket'
+ 'lua52-expat'
+ 'lua52-filesystem'
+ 'libidn'
'openssl')
makedepends=('mercurial')
conflicts=('prosody')
provides=('prosody')
-optdepends=(
-'lua51-sec: TLS encryption support'
-'lua51-bitop: websocket support'
-'lua51-event: libevent support'
-)
+optdepends=('lua52-sec: TLS encryption support'
+# 'lua52-event: libevent support'
+ 'lua52-dbi: SQL storage support')
install=prosody.install
backup=('etc/prosody/prosody.cfg.lua')
-source=("prosody-hg::hg+https://hg.prosody.im/0.10"
+source=("prosody-stable::hg+https://hg.prosody.im/0.11"
'prosody.tmpfile.d'
+ 'prosody.logrotated'
'sysuser.conf'
'prosody.service')
+sha256sums=('SKIP'
+ '0753bd9260f1cfdce6e18e01a61e320b396acfe9fca8ccf3250653bfa6af997e'
+ '5a2466b73bd069fb73be97a4e23b24e4c8dd1adb7db871cb8f5ab4094c1f967f'
+ 'e5c30ffbb066f0ed3444475b3313490c535d8c9df018726f6cecf9e3ddfd2e48'
+ 'e9d6abc4c53bd9e7b1d2acc56c7513416751f9436bf382ed52d703d29b13bfaa')
+
+
+pkgver() {
+ cd prosody-stable
+ printf "0.11.r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
+}
prepare() {
- cd prosody-hg
+ cd prosody-stable
# disable logging to output and activate syslog
- sed -i s/"info = "/"-- info = "/g prosody.cfg.lua.dist
- sed -i s/"error = "/"-- error = "/g prosody.cfg.lua.dist
- sed -i s/"--\ \"\*syslog\"\;"/"\"*syslog\"\;"/g prosody.cfg.lua.dist
-
+ sed -i s/"info = "/"-- info = "/g prosody.cfg.lua.dist
+ sed -i s/"error = "/"-- error = "/g prosody.cfg.lua.dist
+ sed -i s/"--\ \"\*syslog\"\;"/"info = \"*syslog\"\;"/g prosody.cfg.lua.dist
# add pidfile and daemonize
# daemonize is important for systemd!
- mv prosody.cfg.lua.dist prosody.cfg.lua.old
+ mv prosody.cfg.lua.dist prosody.cfg.lua.old
- echo --Important for systemd >> prosody.cfg.lua.dist
- echo -- daemonize is important for systemd. if you set this to false the systemd startup will freeze. >> prosody.cfg.lua.dist
- echo daemonize = true >> prosody.cfg.lua.dist
- echo 'pidfile = "/run/prosody/prosody.pid"'>> prosody.cfg.lua.dist
- echo "" >> prosody.cfg.lua.dist
- cat prosody.cfg.lua.old >> prosody.cfg.lua.dist
- rm prosody.cfg.lua.old
+ echo --Important for systemd >> prosody.cfg.lua.dist
+ echo -- daemonize is important for systemd. if you set this to false the systemd startup will freeze. >> prosody.cfg.lua.dist
+ echo daemonize = true >> prosody.cfg.lua.dist
+ echo 'pidfile = "/run/prosody/prosody.pid"'>> prosody.cfg.lua.dist
+ echo "" >> prosody.cfg.lua.dist
+ cat prosody.cfg.lua.old >> prosody.cfg.lua.dist
+ rm prosody.cfg.lua.old
+
+ #sed -i 's|sock, err = socket.udp();|sock, err = (socket.udp4 or socket.udp)();|g' net/dns.lua
}
build() {
- cd prosody-hg
- ./configure --ostype=linux --prefix=/usr --sysconfdir=/etc/prosody \
- --datadir=/var/lib/prosody --with-lua-include=/usr/include/lua5.1 \
- --cflags="${CFLAGS} -fPIC -Wall -Wextra -D_GNU_SOURCE" \
- --ldflags="${LDFLAGS} -shared" --no-example-certs \
- --runwith=lua5.1 \
- --lua-version=5.1
+ cd prosody-stable
+ ./configure \
+ --ostype=linux \
+ --prefix=/usr \
+ --sysconfdir=/etc/prosody \
+ --datadir=/var/lib/prosody \
+ --with-lua-include=/usr/include/lua5.2 \
+ --cflags="${CPPFLAGS} ${CFLAGS} -fPIC -D_GNU_SOURCE" \
+ --ldflags="${LDFLAGS} -shared" \
+ --no-example-certs \
+ --runwith=lua5.2
make
}
package() {
- cd prosody-hg
+ cd prosody-stable
make DESTDIR="${pkgdir}" install
make DESTDIR="${pkgdir}" install -C tools/migration
- install -Dm 0644 $srcdir/prosody.tmpfile.d "${pkgdir}"/usr/lib/tmpfiles.d/prosody.conf
- install -Dm 0644 $srcdir/prosody.service "${pkgdir}"/usr/lib/systemd/system/prosody.service
- install -Dm644 $srcdir/sysuser.conf "$pkgdir"/usr/lib/sysusers.d/prosody.conf
+ install -Dm 0644 "$srcdir"/prosody.tmpfile.d "${pkgdir}"/usr/lib/tmpfiles.d/prosody.conf
+ install -Dm 0644 "$srcdir"/prosody.service "${pkgdir}"/usr/lib/systemd/system/prosody.service
+ install -Dm644 "$srcdir"/sysuser.conf "$pkgdir"/usr/lib/sysusers.d/prosody.conf
for i in tools/*.lua; do
install -Dm 0644 ${i} "${pkgdir}"/usr/share/prosody/${i}
done
install -Dm 0644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/COPYING
+ install -Dm 0644 "$srcdir"/prosody.logrotated "${pkgdir}"/etc/logrotate.d/prosody
rm "${pkgdir}"/etc/prosody/certs/*
}
-
-# vim: ft=sh syn=sh ts=2 sw=2
-md5sums=('SKIP'
- 'dc8405a6a235b83dc8a0dcdf7b71cbaa'
- '385ca73d9f6046f3636266ce9bf38797'
- 'e74045f27cb60908d535969906781f75')
diff --git a/prosody.install b/prosody.install
index d94d5431620e..0edbaa425836 100644
--- a/prosody.install
+++ b/prosody.install
@@ -1,11 +1,6 @@
post_install() {
- systemd-sysusers prosody.conf
- systemd-tmpfiles --create prosody.conf
-
- chown prosody:jabber var/lib/prosody
- [ -d var/log/prosody ] && chown prosody:jabber var/log/prosody
-
- echo ">> Documentation: https://wiki.archlinux.org/index.php/Prosody"
+ echo ">> Documentation: http://wiki.archlinux.org/index.php/Prosody"
+ echo ">> Probably you need to do 'chown prosody:jabber /var/lib/prosody'"
}
post_upgrade() {
diff --git a/prosody.service b/prosody.service
index f54159f551cf..5f5a65aeeec8 100644
--- a/prosody.service
+++ b/prosody.service
@@ -1,13 +1,29 @@
[Unit]
Description=XMPP (Jabber) Server
After=network.target
+Documentation=https://prosody.im/doc
+Documentation=https://wiki.archlinux.org/index.php/Prosody
[Service]
-Type=forking
+Type=simple
+ExecStart=/usr/bin/prosody -F
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abnormal
PIDFile=/run/prosody/prosody.pid
-ExecStart=/usr/bin/prosodyctl start
-ExecStop=/usr/bin/prosodyctl stop
+User=prosody
+Group=prosody
+UMask=0027
+
+RuntimeDirectory=prosody
+ConfigurationDirectory=prosody
+StateDirectory=prosody
+StateDirectoryMode=0750
+LogsDirectory=prosody
+WorkingDirectory=~
+StandardInput=null
+StandardOutput=journal
+StandardError=inherit
+AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target
-
diff --git a/prosody.tmpfile.d b/prosody.tmpfile.d
index 786fa9e96d0e..1d71faa040f6 100644
--- a/prosody.tmpfile.d
+++ b/prosody.tmpfile.d
@@ -1 +1,2 @@
d /run/prosody 0755 prosody jabber -
+d /var/lib/prosody 0750 prosody jabber -