Univention Bugzilla – Bug 22149
pykota für UCS 3.0
Last modified: 2011-12-13 15:50:48 CET
pykota muss für UCS 3.0 importiert und ggf. auf Python 2.6 angepasst werden.
pykota sollte auch aktualisiert werden.
pykota-1.26+fixes_official ist in UCS 3.0 importiert.
(In reply to comment #2) > pykota-1.26+fixes_official ist in UCS 3.0 importiert. Die Versionsnummer beinhaltet unofficial, allerdings ist dies ein offizielles Release. Das sollte nochmal angepasst werden: $ head -n 1 pykota-1.26_fixes_official/debian/changelog pykota (1.26_unofficial) unstable; urgency=low
Bei der Installation von univention-prinquotadb kommt es im postinst zu einem Fehler: Setting up univention-printquotadb (4.0.0-2.39.201105201602) ... Multifile: /etc/postgresql/8.3/main/pg_hba.conf Multifile: /etc/postgresql/7.4/main/pg_hba.conf Reloading PostgreSQL 8.4 database server: main. psql:/usr/share/pykota/postgresql/pykota-postgresql.sql:33: FEHLER: neue Kodierung (UTF8) ist inkompatibel mit der Kodierung der Template-Datenbank (SQL_ASCII) TIP: Verwenden Sie die gleiche Kodierung wie die Template-Datenbank oder verwenden Sie template0 als Template. psql:/usr/share/pykota/postgresql/pykota-postgresql.sql:45: \connect: FATAL: Datenbank >>pykota<< existiert nicht psql: FATAL: Datenbank >>pykota<< existiert nicht psql: FATAL: Datenbank >>pykota<< existiert nicht Setting up univention-printquota (4.0.0-2.39.201105201602) ... File: /etc/pykota/pykotadmin.conf /usr/share/pykota/postgresql/pykota-postgresql.sql kommt aus dem Paket pykota.
Bei der Übernahme muss für die folgenden vier Patches geprüft werden, ob sie weiterhin übernommen werden müssen: ./pykota/2.4-0-0-ucs/1.22/omit-chsh.patch ./pykota/2.4-0-0-ucs/1.22/sql.patch ./pykota/2.4-0-0-ucs/1.22/20_preinst.patch ./pykota/2.4-0-0-ucs/1.22/updatescript.patch (Die zwei anderen Patches aus 2.4 sind nicht mehr nötig)
1. omit-chsh.patch - verworfen diff -aur pykota-1.22.orig/debian/preinst pykota-1.22/debian/preinst --- pykota-1.22.orig/debian/preinst 2005-06-16 13:20:54.000000000 +0200 +++ pykota-1.22/debian/preinst 2007-08-09 10:09:35.000000000 +0200 @@ -9,7 +9,7 @@ fi if ! id -u pykota > /dev/null 2>&1 ; then adduser --system --home /etc/pykota --ingroup pykota pykota - chsh -s /bin/sh pykota +# chsh -s /bin/sh pykota fi if [ "$1" = "upgrade" ]; then cp -a /etc/pykota/pykota.conf /etc/pykota/pykota.conf.saved 2>/dev/null Nur in pykota-1.22/debian: preinst.~1.1.2.1.~. "chsh -s /bin/sh pykota" funktioniert 2. 20_preinst.patch - verworfen diff -Nur pykota-1.22.orig/debian/preinst pykota-1.22/debian/preinst --- pykota-1.22.orig/debian/preinst 2005-06-16 13:20:54.000000000 +0200 +++ pykota-1.22/debian/preinst 2009-10-24 20:17:20.411462659 +0200 @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh # $Id: preinst,v 1.1.2.1 2005/06/16 11:20:54 stefan Exp $ . /usr/share/debconf/confmodule 3. sql.patch - verworfen Änderungen sind upstream 4. updatescript.patch - verworfen Das waren Änderungen für ein Update auf pykto 1.21 (wohl UCS 1.3 -> X). Das sollte bei einer Neuinstallation von UCS 3.0 oder einem Update von 2.4-x auf 3.0 keine Rolle mehr spielen. KEINE Patches übernommen.
Neuer Patch für die das SQL Skript zum Anlegen der Datenbank. Hier wird nun template0 als Template verwendet, da ein encoding angeben wird (siehe Bug 22592).
(In reply to comment #3) > (In reply to comment #2) > > pykota-1.26+fixes_official ist in UCS 3.0 importiert. > > Die Versionsnummer beinhaltet unofficial, allerdings ist dies ein offizielles > Release. Das sollte nochmal angepasst werden: > > $ head -n 1 pykota-1.26_fixes_official/debian/changelog > pykota (1.26_unofficial) unstable; urgency=low Das Paket enthält immer noch "unofficial" in der Version /var/univention/buildsystem2/apt/ucs_3.0-0/all/pykota_1.26+unofficial.24.201108020859_all.deb
Das Changelog wurde per Patch angepasst.
(In reply to comment #9) > Das Changelog wurde per Patch angepasst. Versionsnummer ist angepasst und ChangeLog existiert
Der Build von pykota wurde auf "dh_pysupport" umgestellt, damit die Python Module an der richtigen Stelle landen. pkipplib (http://www.pykota.com/software/pkipplib) wird benötigt und wurde nun paketiert.
univention-printserver/cups-printers.py wurde so angepasst, dass die Drucker, für die das quota deaktiviert wird, auch in pykota gelöscht werden.
Folgende Änderungen waren noch an univention-printquota nötig, damit das Druckquota überhaupt wieder funktioniert: * added dependency to pkipplib and pkpgcounter (Bug #21649) * added server password change hook * added postgres 8.4 pg_hba.conf subfile template * use univention.uldap.getMachineConnection instead of univention.uldap.access in univention-printquota-setuser * added listener pykota-groups.py to manage groups in pykota * added listener pykota-users.py to manage users in pykota Achtung, bisher und immer noch werden DruckQuota Richtlinien in pykota nicht aktualisiert, das wird aber an Bug #24065 behandelt.
Ich hoffe das hier ist der richtige Bug. Es scheint noch etwas mit der Einrichtung der pykota-Datenbank nicht zu stimmen root@master:~/crunchy/univention-directory-manager-modules# repykota -Plp0 ERROR: PyKota v1.26_fixes_official ERROR: repykota failed ERROR: Traceback (most recent call last): ERROR: File "/usr/bin/repykota", line 139, in <module> ERROR: reportTool.deferredInit() ERROR: File "/usr/lib/pymodules/python2.6/pykota/tool.py", line 457, in deferredInit ERROR: self.storage = storage.openConnection(self) ERROR: File "/usr/lib/pymodules/python2.6/pykota/storage.py", line 866, in openConnection ERROR: return storagebackend.Storage(pykotatool, host, database, admin, adminpw) ERROR: File "/usr/lib/pymodules/python2.6/pykota/storages/pgstorage.py", line 60, in __init__ ERROR: raise PGError, msg ERROR: Error: FATAL: Passwort-Authentifizierung f?r Benutzer >>pykotaadmin<< fehlgeschlagen ERROR: FATAL: Passwort-Authentifizierung f?r Benutzer >>pykotaadmin<< fehlgeschlagen ERROR: --- the most probable cause of your problem is that PostgreSQL is down, or doesn't accept incoming connections because you didn't configure it as explained in PyKota's documentation. r
(In reply to comment #14) > Ich hoffe das hier ist der richtige Bug. Es scheint noch etwas mit der > Einrichtung der pykota-Datenbank nicht zu stimmen > > root@master:~/crunchy/univention-directory-manager-modules# repykota -Plp0 > ERROR: PyKota v1.26_fixes_official > ERROR: repykota failed > ERROR: Traceback (most recent call last): > ERROR: File "/usr/bin/repykota", line 139, in <module> > ERROR: reportTool.deferredInit() > ERROR: File "/usr/lib/pymodules/python2.6/pykota/tool.py", line 457, in > deferredInit > ERROR: self.storage = storage.openConnection(self) > ERROR: File "/usr/lib/pymodules/python2.6/pykota/storage.py", line 866, in > openConnection > ERROR: return storagebackend.Storage(pykotatool, host, database, admin, > adminpw) > ERROR: File "/usr/lib/pymodules/python2.6/pykota/storages/pgstorage.py", line > 60, in __init__ > ERROR: raise PGError, msg > ERROR: Error: FATAL: Passwort-Authentifizierung f?r Benutzer >>pykotaadmin<< > fehlgeschlagen > ERROR: FATAL: Passwort-Authentifizierung f?r Benutzer >>pykotaadmin<< > fehlgeschlagen > ERROR: --- the most probable cause of your problem is that PostgreSQL is down, > or doesn't accept incoming connections because you didn't configure it as > explained in PyKota's documentation. > r Im Postinst wird eigentlich das Passwort aus "/etc/pykota/pykota.secret" für den Benutzer "pykotaadmin" gesetzt, das scheint aber nicht (mehr) zu klappen. Als Workaround kann erstmal folgendes gemacht werden: su - postgres -c "echo \"ALTER USER pykotaadmin PASSWORD '$(< /etc/pykota/pykota.secret)';\" |psql -d pykota"
Im postinst von "univention-printquotadb" wird dass Passwort für den postgres Benutzer "pykotaadmin" gesetzt. su - postgres -c "echo \"ALTER USER pykotaadmin PASSWORD '$secret';\" |psql -d pykota" Dann aber gleich wieder gelöscht su - postgres -c "echo \"ALTER USER pykotaadmin PASSWORD '';\" |psql -d pykota" Das ist natürlich Quatsch. Der zweite "ALTER USER" Befehl wurde nun entfernt.
(In reply to comment #16) Das funktioniert jetzt
UCS 3.0-0 wurde veröffentlicht. Sollte der hier beschriebene Bug mit einer neueren Version von UCS erneut auftreten, so sollte dieser Bug dupliziert werden: "Clone This Bug"