[arch-commits] Commit in prosody/trunk (PKGBUILD prosody.install sysuser.conf)

Sergej Pupykin spupykin at archlinux.org
Tue Feb 10 15:23:30 UTC 2015


    Date: Tuesday, February 10, 2015 @ 16:23:30
  Author: spupykin
Revision: 127469

upgpkg: prosody 0.9.7-2

upd

Added:
  prosody/trunk/sysuser.conf
Modified:
  prosody/trunk/PKGBUILD
  prosody/trunk/prosody.install

-----------------+
 PKGBUILD        |    9 ++++++---
 prosody.install |   17 ++++-------------
 sysuser.conf    |    3 +++
 3 files changed, 13 insertions(+), 16 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-02-10 15:23:21 UTC (rev 127468)
+++ PKGBUILD	2015-02-10 15:23:30 UTC (rev 127469)
@@ -6,7 +6,7 @@
 
 pkgname=prosody
 pkgver=0.9.7
-pkgrel=1
+pkgrel=2
 pkgdesc="Lightweight and extensible Jabber/XMPP server written in Lua"
 arch=('i686' 'x86_64')
 url="http://prosody.im/"
@@ -22,13 +22,15 @@
         'prosody.logrotated'
         'fix-config.patch'
         'prosody.tmpfile.d'
-        'prosody.service')
+        'prosody.service'
+        'sysuser.conf')
 md5sums=('47de7f593279e327792df78cfa93e8a7'
          'SKIP'
          '5b44aee99f1fa9e7f055e067688cafbd'
          '01b6aa0b1e1e3067756c45b0751bee78'
          'e2f5a1df410b05696a30dcb058841084'
-         'e74045f27cb60908d535969906781f75')
+         'e74045f27cb60908d535969906781f75'
+         'af7005df7322c4c92cc0f5c1e56f6f4f')
 
 prepare() {
   cd ${pkgname}-${pkgver}
@@ -53,6 +55,7 @@
 #  install -Dm 0644 $srcdir/prosody.logrotated "${pkgdir}"/etc/logrotate.d/prosody
   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}

Modified: prosody.install
===================================================================
--- prosody.install	2015-02-10 15:23:21 UTC (rev 127468)
+++ prosody.install	2015-02-10 15:23:30 UTC (rev 127469)
@@ -1,17 +1,11 @@
 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
+    systemd-sysusers prosody.conf
+    systemd-tmpfiles --create prosody.conf
 
-    chown prosody:prosody var/lib/prosody
-    [ -d var/log/prosody ] && chown prosody:prosody var/log/prosody
+    chown prosody:jabber var/lib/prosody
+    [ -d var/log/prosody ] && chown prosody:jabber var/log/prosody
 
     echo ">> Documentation: http://wiki.archlinux.org/index.php/Prosody"
-
-    systemd-tmpfiles --create prosody.conf
 }
 
 post_upgrade() {
@@ -20,11 +14,8 @@
 }
 
 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

Added: sysuser.conf
===================================================================
--- sysuser.conf	                        (rev 0)
+++ sysuser.conf	2015-02-10 15:23:30 UTC (rev 127469)
@@ -0,0 +1,3 @@
+g jabber    17     -            -
+u prosody   -      -            /var/lib/prosody
+m prosody   jabber



More information about the arch-commits mailing list