[daisy] [JIRA] Updated: (DSY-366) debian package doesn't work on ubuntu

Marc Portier (JIRA) issues at cocoondev.org
Wed Mar 7 08:18:20 CST 2007


     [ http://issues.cocoondev.org//browse/DSY-366?page=all ]

Marc Portier updated DSY-366:
-----------------------------

    Attachment: patch-dsy366.txt

This patch fixes
- reading only the first password found in /etc/mysql/debian.cnf
- not granting ALL priviliges, but the ones available to the debian-sys-maint

> debian package doesn't work on ubuntu
> -------------------------------------
>
>          Key: DSY-366
>          URL: http://issues.cocoondev.org//browse/DSY-366
>      Project: Daisy
>         Type: Bug
>     Reporter: Marc Portier
>     Priority: Minor
>  Attachments: patch-dsy366.txt
>
> The daisy*.deb package one can create from the [daisy-svn]/distro/debian doesn't seem to work on ubuntu.
> This is caused by the fact that the typical /etc/mysql/debian.cnf contains 2 sections on ubuntu versus only one on the typical debian:
>   # cat /etc/mysql/debian.cnf
>   # Automatically generated for Debian scripts. DO NOT TOUCH!
>   [client]
>   host     = localhost
>   user     = debian-sys-maint
>   password =   RANDOM_secret
>   socket   = /var/run/mysqld/mysqld.sock
>   [mysql_upgrade]
>   user     = debian-sys-maint
>   password =   RANDOM_secret
>   socket   = /var/run/mysqld/mysqld.sock
>   basedir  = /usr
> as a consequence the trick to read the password used in the resources/postinst script returns the password twice (each on an own new line)
>   # cat /etc/mysql/debian.cnf | grep password | sed 's/password = //'
>   
>   RANDOM_secret
>   RANDOM_secret
> the newline in-between leads to mysql-operations to fail:
>   ERROR 1049 (42000): Unknown database 'RANDOM_secret'
>   Creating ActiveMQ Database
>   /usr/bin/mysqladmin: Unknown command: 'RANDOM_secret'
>   ERROR 1049 (42000): Unknown database 'RANDOM_secret'
>   ERROR 1049 (42000): Unknown database 'RANDOM_secret'
>   ERROR 1049 (42000): Unknown database 'RANDOM_secret'
>   Creating Daisy Repository Database
>   /usr/bin/mysqladmin: Unknown command: 'RANDOM_secret'
> Suggested fix:
>   let  resources/postinst read only the first password.
>   # cat /etc/mysql/debian.cnf | grep password | head -1 | sed 's/password = //'
> NOTE: there are more files affected in the same way:       find resources/ |xargs grep -l debian.cnf|grep -v svn
> resources/postinst
> resources/preinst
> resources/postrm

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



More information about the daisy mailing list