Subject: [alpine-devel] testing/trac: Creating users/groups

From: "Mika Havela" <[email-masked]>
Date: Fri, 11 Jun 2010 12:00:53 +0000

I tried creating tracd user/group.
Wouldn't be too surprised if I did it the wrong way (still haven't been able to test it - but I will asap).

Please review this patch and apply.

<<mhavela>>

From f1b474a724e2e03da520e66d33adb216eb9c0a32 Mon Sep 17 00:00:00 2001
From: Mika Havela <[email-masked]>
Date: Fri, 11 Jun 2010 11:58:38 +0000
Subject: [PATCH] Creating tracd user/group

---
 testing/trac/APKBUILD         |    6 ++++--
 testing/trac/trac.pre-install |    5 +++++
 2 files changed, 9 insertions(+), 2 deletions(-)
 create mode 100644 testing/trac/trac.pre-install

diff --git a/testing/trac/APKBUILD b/testing/trac/APKBUILD
index 419fb6e..f45fbce 100644
--- a/testing/trac/APKBUILD
+++ b/testing/trac/APKBUILD
@@ -3,13 +3,15 @@
 pkgname=trac
 _realname=Trac
 pkgver=0.11.7
-pkgrel=0
+pkgrel=1
+pkgusers="trac"
+pkggroups="trac"
 pkgdesc="Trac is a minimalistic web-based project management, wiki and bug/issue tracking system."
 url="http://trac.edgewall.com/"
 license="GPL"
 depends="python py-setuptools py-genshi py-sqlite"
 makedepends="python-dev"
-install=
+install="$pkgname.pre-install"
 source="ftp://ftp.edgewall.com/pub/$pkgname/$_realname-$pkgver.tar.gz
 	tracd.confd
 	tracd.initd"
diff --git a/testing/trac/trac.pre-install b/testing/trac/trac.pre-install
new file mode 100644
index 0000000..05c6595
--- /dev/null
+++ b/testing/trac/trac.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup tracd 2>/dev/null
+adduser -s /bin/false -G tracd -D -H tracd 2>/dev/null
+exit 0
-- 
1.7.1