deb package fails to add user for debian-sys-maint

Bug #454237 reported by Sergey Petrunia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
High
Hakan Küçükyılmaz
OurDelta
Fix Released
High
Arjen Lentz

Bug Description

deb package fails to add user for debian-sys-maint on installation.

This causes package configuration to fail with an error:

ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)

and then this error will show up on any invocation of /etc/init.d/mysql start|stop|etc.

Tags: packaging 5.1

Related branches

Revision history for this message
Sergey Petrunia (sergefp) wrote :

It is possible to connect to the server and there one can see that indeed mysql.user table has no debian-sys-maint user.

Failure to add user is because of the following:

bakery/debian-5.1/dist/Ubuntu/mariadb-server-5.1.postinst has this command:
    replace_query=`/bin/echo -e \
        "USE mysql\n" \
        "REPLACE INTO user SET " \
        " host='localhost', user='debian-sys-maint', password=password('$pass'), " \
        " Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \
        " Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \
        " Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', " \
        " Index_priv='Y', Alter_priv='Y', Super_priv='Y', Show_db_priv='Y', "\
        " Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', "\
        " Repl_slave_priv='Y', Repl_client_priv='Y', Create_view_priv='Y', "\
        " Show_view_priv='Y', Create_routine_priv='Y', Alter_routine_priv='Y', "\
        " Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y' "`;

On a server with all-defaults configuration the command will succeed with three warnings:
  Field 'ssl_cipher' doesn't have a default value
  Field 'x509_issuer' doesn't have a default value
  Field 'x509_subject' doesn't have a default value

However, ourdelta-mariadb51-2/bakery/debian-5.1/additions/my.cnf has this line:

sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL

Which will make those warnings to be errors, and the command won't succeed any more.

Changed in maria:
importance: Undecided → High
Changed in ourdelta:
importance: Undecided → High
Revision history for this message
Sergey Petrunia (sergefp) wrote :

The suggested fix is to add

  ssl_cipher='', x509_issuer='', x509_subject=''

into replace_query.

Changed in maria:
status: New → Confirmed
Changed in maria:
status: Confirmed → Fix Committed
Revision history for this message
Kristian Nielsen (knielsen) wrote :

The fix committed before only works in Ubuntu, there is a typo in the Debian version (missing comma ",").

Have pushed a fix for this to lp:~maria-captains/ourdelta/ourdelta-montyprogram-fixes , will file a merge request.

Changed in ourdelta:
status: New → Fix Committed
assignee: nobody → Arjen Lentz (arjen-lentz)
Revision history for this message
Arjen Lentz (arjen-lentz) wrote :

Resolved in 5.1.39 build.

Changed in ourdelta:
status: Fix Committed → Fix Released
Changed in maria:
assignee: nobody → Hakan Küçükyılmaz (hakan-askmonty)
tags: added: 5.1
tags: added: packaging
Changed in maria:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.