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

Marc Portier (JIRA) issues at cocoondev.org
Fri Oct 27 18:04:47 CDT 2006


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

Marc Portier commented on DSY-366:
----------------------------------

Actually, after this there is another difference between debian and ubuntu:

DEBIAN:
mysql>  show grants for 'debian-sys-maint'@'localhost';
+---------------------------------------------------------------------------------------------------------------------------+
| Grants for debian-sys-maint at localhost                 |
+---------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY PASSWORD '3a37b9a22cd33f6a' WITH GRANT OPTION |
+---------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)


UBUNTU:
mysql> show grants for 'debian-sys-maint'@'localhost';
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for debian-sys-maint at localhost                                                                                                            |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY PASSWORD '663a75b13dd9131b' WITH GRANT OPTION |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)


as a consequence the grant ALL that the postinst script tries to execute fails: (on ubuntu debian-sys-maint doesn't have ALL, so it can't share that grant with the actual user...)


Suggested fix:

limit to the (non-global) priviliges: 

DB_USER=debian-sys-maint
DB_PASSWORD=`cat /etc/mysql/debian.cnf | grep password | head -1 | sed -e 's/password = //'`
DB_PRIVILEGES="SELECT, INSERT, UPDATE, DELETE, CREATE, DROP,   REFERENCES, INDEX, ALTER,  CREATE TEMPORARY TABLES, LOCK TABLES"

> 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

>
> 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