Hi,
I have a package *almost* ready to fix this bug, plus a few others. The
changelog currently has this to say:
* fixing compatibility with PostgreSQL 8.3 (closes: #510342)
* man page structural typo (closes: #509969)
* fix roundup-demo argument parsing (closes: #509973)
* create temporary directory (pidfile etc) (closes: #506004)
#510342 requires a one-line patch in two places (ie, wrap 'str' around
an integer expression). I use this, or rather 1.4.6 which
already has this patch, in production.
#506004 only affects the startup file (/etc/init.d/roundup).
*Almost* means, that I'll be able to upload a fixed package today.
I can leave out #509973, which requires some 5-10 lines changes, and
also #506004, which requires a two-line addition, if so desired.
Is there any chance that I can get this package into Lenny?
Otherwise, roundup, as released with Lenny, will not be usable together
with PostgreSQL, which I'd consider a major drawback.
The patches for #506004 and #510342 look like this:
Make roundup Pg8.3 compatible (#510342):
diff -urNad roundup-1.4.4~/roundup/backends/back_postgresql.py roundup-1.4.4/roundup/backends/back_postgresql.py
--- roundup-1.4.4~/roundup/backends/back_postgresql.py 2007-10-05 05:06:28.000000000 +0200
+++ roundup-1.4.4/roundup/backends/back_postgresql.py 2009-01-19 00:09:13.000000000 +0100
@@ -261,7 +261,7 @@
def newid(self, classname):
sql = "select nextval('_%s_ids') from dual"%classname
self.sql(sql)
- return self.cursor.fetchone()[0]
+ return str(self.cursor.fetchone()[0])
def setid(self, classname, setid):
sql = "select setval('_%s_ids', %s) from dual"%(classname, int(setid))
diff -urNad roundup-1.4.4~/roundup/backends/rdbms_common.py roundup-1.4.4/roundup/backends/rdbms_common.py
--- roundup-1.4.4~/roundup/backends/rdbms_common.py 2008-02-27 09:21:49.000000000 +0100
+++ roundup-1.4.4/roundup/backends/rdbms_common.py 2009-01-19 00:09:13.000000000 +0100
@@ -1920,7 +1920,7 @@
# sqlite)
sql = "select id from _%s where _%s=%s and __retired__=%s"%(
self.classname, self.key, self.db.arg, self.db.arg)
- self.db.sql(sql, (keyvalue, 0))
+ self.db.sql(sql, (str(keyvalue), 0))
# see if there was a result that's not retired
row = self.db.sql_fetchone()
Create the directory for the pid file (#506004):
--- debian/roundup.init.orig 2008-11-17 17:18:50.000000000 +0000
+++ debian/roundup.init 2008-11-17 17:20:00.000000000 +0000
@@ -58,6 +58,8 @@
case "$1" in
start)
printf "Starting $DESC:"
+ install -o root -g root -m 755 -d /var/run/roundup
+
start-stop-daemon --start --oknodo --quiet \
--pidfile $PIDFILE \
--exec $EXECUTABLE $OPTIONS
Kind regards,
--Toni++
Attachment:
signature.asc
Description: Digital signature