Bug#466530: [Debconf-devel] [Fwd: Handling values with db_get in case of translation]
On Thu, 28 Feb 2008, Olivier Berger wrote: Hi. Any news on this issue ? I don't think I got a return on my previous message (bellow) :( Ping? I just tried to install a sympa server with postgresql for a customer and really the situation sucks, fixing this would warrant a stable update. I'm unable to setup the Pg database just by answering the debconf questions even if I use use LANG=C apt-get install sympa. It fails trying to create the database because the sympa user doesn't have the right to create the database. The upstream code tries to create the database even though /usr/share/sympa/db/install-pg-db has already created it... in the upstream script, the creation is always done: # grep CREATE DATA /usr/lib/sympa/bin/create_db.Pg CREATE DATABASE sympa; And this is run with user sympa that doesn't have the right to create database (it has been created that way by /usr/share/sympa/db/install-pg-db). Has this ever worked for someone ? Did someone install a fresh sympa server with postgresql successfully ? BTW README.Debian is full of outdated information as well. Cheers, -- Raphaël Hertzog -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#466530: [Debconf-devel] [Fwd: Handling values with db_get in case of translation]
Hi, On Mon, Sep 07, 2009 at 07:33:42PM +0200, Raphael Hertzog wrote: On Thu, 28 Feb 2008, Olivier Berger wrote: Any news on this issue ? I don't think I got a return on my previous message (bellow) :( Ping? I just tried to install a sympa server with postgresql for a customer and really the situation sucks, fixing this would warrant a stable update. Did you try using stable/testing or unstable? In other words, with which version of the Sympa package is above experience og yours? Has this ever worked for someone ? Did someone install a fresh sympa server with postgresql successfully ? I am pretty certain that sympa in Lenny and Squeeze works only with MySQL (if with that at all). I do not volunteer to try hack on that old code. I would recommend putting work into shaping up the major packaging rewrite in Sid. BTW README.Debian is full of outdated information as well. Yeah, I am aware of that, but thanks for reminding anyway. Lintian also has a bunch of relevant hints. Help shaping up sympa is much appreciated! - Jonas -- * Jonas Smedegaard - idealist Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private signature.asc Description: Digital signature
Bug#466530: [Debconf-devel] [Fwd: Handling values with db_get in case of translation]
On Mon, 07 Sep 2009, Jonas Smedegaard wrote: Ping? I just tried to install a sympa server with postgresql for a customer and really the situation sucks, fixing this would warrant a stable update. Did you try using stable/testing or unstable? In other words, with which version of the Sympa package is above experience og yours? I tried stable here, it's for a customer and don't install unstable for my customers. Has this ever worked for someone ? Did someone install a fresh sympa server with postgresql successfully ? I am pretty certain that sympa in Lenny and Squeeze works only with MySQL (if with that at all). Looks like so. I did work around by setting up the DB manually. I do not volunteer to try hack on that old code. I would recommend putting work into shaping up the major packaging rewrite in Sid. Understandable but still a pity that we ship something not working in stable. Help shaping up sympa is much appreciated! I know why I orphaned it a long time ago! :-) Cheers, -- Raphaël Hertzog -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#466530: [Debconf-devel] [Fwd: Handling values with db_get in case of translation]
Hi. Any news on this issue ? I don't think I got a return on my previous message (bellow) :( Thanks in advance. Le jeudi 21 février 2008 à 10:59 +0100, Olivier Berger a écrit : Le jeudi 21 février 2008 à 09:05 +, Colin Watson a écrit : On Wed, Feb 20, 2008 at 03:12:34PM +0100, Olivier Berger wrote: However, it seems that the db_get results depend on the locale, and return Basée sur ident instead of Ident-based when with french locale... That's odd; it's definitely supposed to be translated back to the English text before being stored in the database, so GET should always return the untranslated text from Choices rather than the translated text from Choices-fr.UTF-8. I can't reproduce this with the sympa package in unstable with LANG=fr_FR.UTF-8: debconf (developer): -- INPUT medium sympa/db_authtype debconf (developer): -- 0 question will be asked debconf (developer): -- GO debconf (developer): -- 0 ok debconf (developer): -- GET sympa/db_authtype debconf (developer): -- 0 Ident-based I did need the following patch to fix some broken code in the config script before I could get anywhere, though. Racke, perhaps you could apply this while we figure out the rest of it? SNIP Applied that one patch and tested with a modified package installation. Olivier, exactly which locale are you using (output of 'locale'), and which debconf frontend are you using (output of 'echo GET debconf/frontend | debconf-communicate')? The result is still the same. See traces of adding set -x in /usr/share/sympa/db/prepare_db : vserver1:~# vi /usr/share/sympa/db/prepare_db vserver1:~# dpkg-reconfigure sympa Stopping Sympa mailing list manager: sympa. + case $db_type in + db_get sympa/db_authtype + _db_cmd 'GET sympa/db_authtype' + IFS=' ' + printf '%s\n' 'GET sympa/db_authtype' + IFS=' ' + read -r _db_internal_line + RET='Basée sur ident' + case ${_db_internal_line%%[ ]*} in + return 0 + '[' 'Basée sur ident' = Ident-based ']' + /usr/share/sympa/db/install-pg-db -w sympa -a /tmp/filejOJiLb -d sympa -h localhost -u /tmp/filelcCU9b DBI connect('dbname=template1','postgres',...) failed: FATAL: authentification Ident échouée pour l'utilisateur « postgres » at /usr/share/sympa/db/install-pg-db line 71 vserver1:~# locale LANG=fr_FR.UTF-8 LC_CTYPE=fr_FR.UTF-8 LC_NUMERIC=fr_FR.UTF-8 LC_TIME=fr_FR.UTF-8 LC_COLLATE=fr_FR.UTF-8 LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8 LC_PAPER=fr_FR.UTF-8 LC_NAME=fr_FR.UTF-8 LC_ADDRESS=fr_FR.UTF-8 LC_TELEPHONE=fr_FR.UTF-8 LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=fr_FR.UTF-8 LC_ALL= # echo GET debconf/frontend | debconf-communicate 0 Dialog Hope this helps, -- Olivier BERGER [EMAIL PROTECTED] (*NEW ADDRESS*) http://www-inf.it-sudparis.eu/~olberger/ - OpenPGP-Id: 1024D/6B829EEC Ingénieur Recherche - Dept INF Institut TELECOM / TELECOM Management SudParis (http://www.it-sudparis.eu/), Evry
Bug#466530: [Debconf-devel] [Fwd: Handling values with db_get in case of translation]
On Wed, Feb 20, 2008 at 03:12:34PM +0100, Olivier Berger wrote: I'm wondering how would one write postinst script tests, in the case of select debconf configuration values, which are translated in the templates. Let's say that a package's template contains something like : Template: sympa/db_authtype Type: select Choices: Ident-based, Password ... Choices-fr.UTF-8: Basée sur ident, Mot de passe If issueing 'db_get sympa/db_authtype', and wanting to test the results, I would expect some code like the following to be correct : db_get sympa/db_authtype if [ $RET = Ident-based ]; then ... However, it seems that the db_get results depend on the locale, and return Basée sur ident instead of Ident-based when with french locale... That's odd; it's definitely supposed to be translated back to the English text before being stored in the database, so GET should always return the untranslated text from Choices rather than the translated text from Choices-fr.UTF-8. I can't reproduce this with the sympa package in unstable with LANG=fr_FR.UTF-8: debconf (developer): -- INPUT medium sympa/db_authtype debconf (developer): -- 0 question will be asked debconf (developer): -- GO debconf (developer): -- 0 ok debconf (developer): -- GET sympa/db_authtype debconf (developer): -- 0 Ident-based I did need the following patch to fix some broken code in the config script before I could get anywhere, though. Racke, perhaps you could apply this while we figure out the rest of it? diff -u sympa-5.3.4/debian/config sympa-5.3.4/debian/config --- sympa-5.3.4/debian/config +++ sympa-5.3.4/debian/config @@ -198,6 +198,8 @@ if [ $use_db = true ]; then db_input high sympa/db_type || [ $? -eq 30 ] db_go +db_get sympa/db_type +db_type=$RET db_input high sympa/db_hostname || [ $? -eq 30 ] db_go @@ -222,7 +224,7 @@ db_go db_get sympa/db_authtype - if [ $RET eq Ident-based ]; then + if [ $RET = Ident-based ]; then IDENT=1 fi @@ -280,8 +282,6 @@ db_go # Ask for the admin password - db_get sympa/db_type - db_type=$RET db_subst sympa/db_adminpasswd database $db_type db_input critical sympa/db_adminpasswd || [ $? -eq 30 ] Olivier, exactly which locale are you using (output of 'locale'), and which debconf frontend are you using (output of 'echo GET debconf/frontend | debconf-communicate')? -- Colin Watson [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#466530: [Debconf-devel] [Fwd: Handling values with db_get in case of translation]
Colin Watson wrote: On Wed, Feb 20, 2008 at 03:12:34PM +0100, Olivier Berger wrote: I'm wondering how would one write postinst script tests, in the case of select debconf configuration values, which are translated in the templates. Let's say that a package's template contains something like : Template: sympa/db_authtype Type: select Choices: Ident-based, Password ... Choices-fr.UTF-8: Basée sur ident, Mot de passe If issueing 'db_get sympa/db_authtype', and wanting to test the results, I would expect some code like the following to be correct : db_get sympa/db_authtype if [ $RET = Ident-based ]; then ... However, it seems that the db_get results depend on the locale, and return Basée sur ident instead of Ident-based when with french locale... That's odd; it's definitely supposed to be translated back to the English text before being stored in the database, so GET should always return the untranslated text from Choices rather than the translated text from Choices-fr.UTF-8. I can't reproduce this with the sympa package in unstable with LANG=fr_FR.UTF-8: debconf (developer): -- INPUT medium sympa/db_authtype debconf (developer): -- 0 question will be asked debconf (developer): -- GO debconf (developer): -- 0 ok debconf (developer): -- GET sympa/db_authtype debconf (developer): -- 0 Ident-based I did need the following patch to fix some broken code in the config script before I could get anywhere, though. Racke, perhaps you could apply this while we figure out the rest of it? Yes. I was able to reproduce the problem with export LANG=de_DE. debconf-show sympa displayed the German translation. The template looks like that: Template: sympa/db_authtype Type: select __Choices: Ident-based, Password _Default: Ident-based _Description: Which authentication method? Please specify which authentication method PostgreSQL uses for the database superuser. The default configuration for PostgreSQL is ident-based authentication. Grüße Racke -- LinuXia Systems = http://www.linuxia.de/ Expert Interchange Consulting and System Administration ICDEVGROUP = http://www.icdevgroup.org/ Interchange Development Team -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#466530: [Debconf-devel] [Fwd: Handling values with db_get in case of translation]
Le jeudi 21 février 2008 à 09:05 +, Colin Watson a écrit : On Wed, Feb 20, 2008 at 03:12:34PM +0100, Olivier Berger wrote: However, it seems that the db_get results depend on the locale, and return Basée sur ident instead of Ident-based when with french locale... That's odd; it's definitely supposed to be translated back to the English text before being stored in the database, so GET should always return the untranslated text from Choices rather than the translated text from Choices-fr.UTF-8. I can't reproduce this with the sympa package in unstable with LANG=fr_FR.UTF-8: debconf (developer): -- INPUT medium sympa/db_authtype debconf (developer): -- 0 question will be asked debconf (developer): -- GO debconf (developer): -- 0 ok debconf (developer): -- GET sympa/db_authtype debconf (developer): -- 0 Ident-based I did need the following patch to fix some broken code in the config script before I could get anywhere, though. Racke, perhaps you could apply this while we figure out the rest of it? SNIP Applied that one patch and tested with a modified package installation. Olivier, exactly which locale are you using (output of 'locale'), and which debconf frontend are you using (output of 'echo GET debconf/frontend | debconf-communicate')? The result is still the same. See traces of adding set -x in /usr/share/sympa/db/prepare_db : vserver1:~# vi /usr/share/sympa/db/prepare_db vserver1:~# dpkg-reconfigure sympa Stopping Sympa mailing list manager: sympa. + case $db_type in + db_get sympa/db_authtype + _db_cmd 'GET sympa/db_authtype' + IFS=' ' + printf '%s\n' 'GET sympa/db_authtype' + IFS=' ' + read -r _db_internal_line + RET='Basée sur ident' + case ${_db_internal_line%%[ ]*} in + return 0 + '[' 'Basée sur ident' = Ident-based ']' + /usr/share/sympa/db/install-pg-db -w sympa -a /tmp/filejOJiLb -d sympa -h localhost -u /tmp/filelcCU9b DBI connect('dbname=template1','postgres',...) failed: FATAL: authentification Ident échouée pour l'utilisateur « postgres » at /usr/share/sympa/db/install-pg-db line 71 vserver1:~# locale LANG=fr_FR.UTF-8 LC_CTYPE=fr_FR.UTF-8 LC_NUMERIC=fr_FR.UTF-8 LC_TIME=fr_FR.UTF-8 LC_COLLATE=fr_FR.UTF-8 LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8 LC_PAPER=fr_FR.UTF-8 LC_NAME=fr_FR.UTF-8 LC_ADDRESS=fr_FR.UTF-8 LC_TELEPHONE=fr_FR.UTF-8 LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=fr_FR.UTF-8 LC_ALL= # echo GET debconf/frontend | debconf-communicate 0 Dialog Hope this helps, -- Olivier BERGER [EMAIL PROTECTED] (*NEW ADDRESS*) http://www-inf.it-sudparis.eu/~olberger/ - OpenPGP-Id: 1024D/6B829EEC Ingénieur Recherche - Dept INF Institut TELECOM / TELECOM Management SudParis (http://www.it-sudparis.eu/), Evry