Subject: [alpine-devel] unstable/trac, testing/py-genshi, testing/py-sqlite: Making trac work with edge

From: "Mika Havela" <[email-masked]>
Date: Tue, 01 Jun 2010 09:20:42 +0000

These patches makes trac work with edge.
trac version is updated.
I have not tried backport this to 1.10 (but I would be really glad to have trac in 1.10.4 - if there ever will be a 1.10.4).
py-genshi and py-sqlite is required for trac to work, so please apply theese too.

Running trac as root:
Trac in Alpine 1.8.3 was run as root so nothing has changed there right now.
I think it would be a good idea to have it run as som other user, but I have not had time to do anything about it.
Right now I run trac as root in a test box and it seems to work just fine.
Hopefully somebody else can make a patch that makes trac run as somebody else, or you wait for me to get the time to fix it.

unstable/trac > testing/trac:
I would really love having trac moved to "testing".
If it's ok with you, could you please move trac to testing.

Please review and apply theese patches.

<<mhavela>>

From e0360f5ce503567dd3e89fee9f5dbf71e5951826 Mon Sep 17 00:00:00 2001
From: Mika Havela <[email-masked]>
Date: Tue, 1 Jun 2010 09:07:12 +0000
Subject: [PATCH 4/4] testing/py-sqlite/: new aport

---
 testing/py-sqlite/APKBUILD |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
 create mode 100644 testing/py-sqlite/APKBUILD

diff --git a/testing/py-sqlite/APKBUILD b/testing/py-sqlite/APKBUILD
new file mode 100644
index 0000000..d7619be
--- /dev/null
+++ b/testing/py-sqlite/APKBUILD
@@ -0,0 +1,22 @@
+# Contributor: Mika Havela <[email-masked]>
+# Maintainer: Mika Havela <[email-masked]>
+pkgname=py-sqlite
+_realname=pysqlite
+pkgver=2.6.0
+pkgrel=0
+pkgdesc="A Python DB-API 2.0 interface for the SQLite embedded relational database engine"
+url="http://initd.org/tracker/pysqlite"
+license="unknown"
+depends="python sqlite"
+makedepends="sqlite-dev"
+install=
+source="http://pysqlite.googlecode.com/files/${_realname}-${pkgver}.tar.gz"
+
+_builddir="$srcdir"/$_realname-$pkgver
+
+build() {
+	cd "$_builddir"
+	python setup.py install --root="$pkgdir"
+}
+
+md5sums="fc92618b3b39d02e6ff10dc467c36640  pysqlite-2.6.0.tar.gz"
-- 
1.7.1

From 47bb06fb808a4643ad470ff113a9d68ddcb2c7c4 Mon Sep 17 00:00:00 2001
From: Mika Havela <[email-masked]>
Date: Tue, 1 Jun 2010 09:06:44 +0000
Subject: [PATCH 3/4] testing/py-genshi: new aport

---
 testing/py-genshi/APKBUILD |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
 create mode 100644 testing/py-genshi/APKBUILD

diff --git a/testing/py-genshi/APKBUILD b/testing/py-genshi/APKBUILD
new file mode 100644
index 0000000..966b61e
--- /dev/null
+++ b/testing/py-genshi/APKBUILD
@@ -0,0 +1,22 @@
+# Contributor: Mika Havela <[email-masked]>
+# Maintainer: Mika Havela <[email-masked]>
+pkgname=py-genshi
+_realname=Genshi
+pkgver=0.6
+pkgrel=0
+pkgdesc="Python toolkit for stream-based generation of output for the web."
+url="http://genshi.edgewall.org/"
+license="BSD"
+depends="python"
+makedepends="py-setuptools"
+install=
+source="http://ftp.edgewall.com/pub/genshi/$_realname-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$_realname-$pkgver
+
+build() {
+	cd "$_builddir"
+	python setup.py install --root="$pkgdir"
+}
+
+md5sums="604e8b23b4697655d36a69c2d8ef7187  Genshi-0.6.tar.gz"
-- 
1.7.1

From d0ff38c505d79a88bc27a7133bb0200dd2eacc4d Mon Sep 17 00:00:00 2001
From: Mika Havela <[email-masked]>
Date: Tue, 1 Jun 2010 09:01:02 +0000
Subject: [PATCH 2/4] unstable/trac: Bumped version. Created init.d script, and conf.d config.

---
 unstable/trac/APKBUILD   |   38 ++++++++++++++++++--------------------
 unstable/trac/trac.confd |    9 +++++++++
 unstable/trac/trac.initd |   28 ++++++++++++++++++++++++++++
 3 files changed, 55 insertions(+), 20 deletions(-)
 create mode 100644 unstable/trac/trac.confd
 create mode 100644 unstable/trac/trac.initd

diff --git a/unstable/trac/APKBUILD b/unstable/trac/APKBUILD
index 8292ef9..dd4a1f5 100644
--- a/unstable/trac/APKBUILD
+++ b/unstable/trac/APKBUILD
@@ -1,35 +1,33 @@
 # Contributor: Michael Mason <[email-masked]>
 # Maintainer: Michael Mason <[email-masked]>
 pkgname=trac
-_altname=Trac
-pkgver=0.11.5
+_realname=Trac
+pkgver=0.11.7
 pkgrel=0
 pkgdesc="Trac is a minimalistic web-based project management, wiki and bug/issue tracking system."
 url="http://trac.edgewall.com/"
 license="GPL"
-depends="python"
-makedepends="postgresql-dev"
+depends="python py-setuptools py-genshi py-sqlite"
+makedepends="python-dev"
 install=
-subpackages="$pkgname-dev $pkgname-doc"
-source="ftp://ftp.edgewall.com/pub/$pkgname/$_altname-$pkgver.tar.gz"
+source="ftp://ftp.edgewall.com/pub/$pkgname/$_realname-$pkgver.tar.gz
+	trac.confd
+	trac.initd"
 
-# append extra dependencies to -dev subpackage
-# remove if not used.
-# depends_dev="somepackage-dev"
+_builddir="$srcdir"/$_realname-$pkgver
 
 build() {
-	cd "$srcdir"/$_altname-$pkgver
+	cd "$_builddir"
+	python setup.py install --prefix=/usr --root="$pkgdir"
+}
 
-	./configure --prefix=/usr \
-		--sysconfdir=/etc \
-		--mandir=/usr/share/man \
-		--infodir=/usr/share/info
-	make || return 1
-	make DESTDIR="$pkgdir" install
+package() {
+	cd "$_builddir"
 
-	# remove the 2 lines below (and this) if there is no init.d script
-	# install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
-	# install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/${pkgname}d
+	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/${pkgname}d
 }
 
-md5sums="c8042490096a49478580fd599ad26322  Trac-0.11.5.tar.gz"
+md5sums="3cd96dad0e4f25d977c422fd6e985e99  Trac-0.11.7.tar.gz
+70609adb7403e7badae33f9f4fdc4bf3  trac.confd
+66b91da45fbc5ab25ec2e0e7356020e2  trac.initd"
diff --git a/unstable/trac/trac.confd b/unstable/trac/trac.confd
new file mode 100644
index 0000000..c57cecc
--- /dev/null
+++ b/unstable/trac/trac.confd
@@ -0,0 +1,9 @@
+# Port for tracd
+TRACD_PORT="8000"
+
+# Options for tracd
+TRACD_OPTS=""
+
+# user and group as which to run tracd
+TRACD_USER="root"
+TRACD_GROUP="root"
diff --git a/unstable/trac/trac.initd b/unstable/trac/trac.initd
new file mode 100644
index 0000000..072f269
--- /dev/null
+++ b/unstable/trac/trac.initd
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+
+# Sample init.d file for alpine linux.
+
+name=tracd
+daemon=/usr/bin/python
+
+depend() {
+	need net
+	after firewall
+}
+
+start() {
+	ebegin "Starting ${name}"
+		start-stop-daemon --start --quiet \
+			--pidfile /var/run/${name}.pid --make-pidfile --background \
+			--chuid ${TRACD_USER:-tracd}:${TRACD_GROUP:-tracd} \
+			--exec ${daemon} -- /usr/bin/tracd \
+			-p ${TRACD_PORT:-8000} ${TRACD_OPTS:---env-parent-dir /var/lib/trac/}
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping ${name}"
+		start-stop-daemon --stop --quiet --pidfile /var/run/$name.pid
+	eend $?
+}
+
-- 
1.7.1

---

From: Natanael Copa <[email-masked]>
Date: Tue, 1 Jun 2010 13:48:14 +0200

> These patches makes trac work with edge.

Wonderful!

> I have not tried backport this to 1.10 (but I would be really glad to have trac in 1.10.4 - if there ever will be a 1.10.4).

hum. we need make it *stable* before even considering put it in 1.10.x.

> py-genshi and py-sqlite is required for trac to work, so please apply theese too.

notes on py-sqlite:
* the web page in url does not exist. http://initd.org/tracker/pysqlite
* License is MIT according http://code.google.com/p/pysqlite/
* there is no package() function. Have build() to run: 'python
setup.py build' and package() to run 'python setup.py install
--root="$pkgdir"'
* I don't think you need have sqlite in depends (if you get a warning
about it then please remove it)

> If it's ok with you, could you please move trac to testing.

yes. "unstable" shouldnt have been there in first place. If it builds
then we can move it to testing.

> Please review and apply theese patches.

Can you please fix the following:
1. fix the py-sqlite as menitioned above: fix url, fix license and add
a package() function.
2. add package() functions to py-genshi and trac as well (if possible)
3. move trac to testing

and the resend the patches?

Thanks!

-- 
Natanael Copa

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---