FTBFS with mysql 8.0

Bug #1850190 reported by Ondřej Surý
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php7.3 (Ubuntu)
Fix Released
Undecided
Andreas Hasenack

Related branches

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks for this diff. I have that, plus these other changes, to consider:
https://paste.ubuntu.com/p/ZkDXsk9x7W/

The current ftbfs in focal is:
+ chmod go-rx /<<PKGBUILDDIR>>/mysql_db
+ chown mysql: /<<PKGBUILDDIR>>/mysql_db
+ mysql_install_db --no-defaults --user=mysql --datadir=/<<PKGBUILDDIR>>/mysql_db/data
debian/setup-mysql.sh: 47: mysql_install_db: not found
make[1]: *** [debian/rules:361: test-results.txt] Error 127

summary: - MySQL 8.0 support
+ FTBFS with mysql 8.0
tags: added: ftbfs
Revision history for this message
Ondřej Surý (ondrej) wrote :

There are couple more commits in the repository on top of that, and I had a chat with Robie, and the main next culprit is that Oracle decided to disable networking when --skip-grant-tables is in effect, so I am going to try dropping that next and see what happens.

Revision history for this message
Ondřej Surý (ondrej) wrote :

You'll also need abdd0141eb37f1e474626db79e2e05bef571c88f and 170b03fd871c854e67e89a1e8aaefd2ec9cd2d50 (not yet tested though).

tags: added: update-excuse
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Next failure I got was:
+ chown mysql: /home/ubuntu/php7.3/php7.3-7.3.10/mysql_db
+ /usr/sbin/mysqld --no-defaults --skip-grant-tables --user=mysql --bind-address=127.0.0.1 --port=1636 --socket=/home/ubuntu/php7.3/php7.3-7.3.10/mysql_db/mysql.sock --datadir=/home/ubuntu/php7.3/php7.3-7.3.10/mysql_db/data --
initialize-insecure
mysqld: Can't create directory '/home/ubuntu/php7.3/php7.3-7.3.10/mysql_db/data/' (OS errno 13 - Permission denied)

The chown call failed, of course:
$ chown mysql: /home/ubuntu/php7.3/php7.3-7.3.10/mysql_db
chown: changing ownership of '/home/ubuntu/php7.3/php7.3-7.3.10/mysql_db': Operation not permitted

Let me check the other commits you mentioned.

Revision history for this message
Ondřej Surý (ondrej) wrote :

Oh, I never run the builds outside of pbuilder/sbuild, fakeroot should help here.

Also, I can confirm the package builds on with all variety of MySQL/MariaDB, but I haven't seen the test-results.txt file whether the MySQL tests are actually run. (I don't have time for that right now...)

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

hah, it's the apparmor profile:
[Mon Nov 4 13:22:00 2019] audit: type=1400 audit(1572873722.995:988): apparmor="DENIED" operation="mkdir" namespace="root//lxd-andreas-focal-php73-mysql8_<var-snap-lxd-common-lxd>" profile="/usr/sbin/mysqld" name="/home/ubuntu/git/packages/php7.3/php7.3/mysql_db/data/" pid=18671 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=1001000 ouid=1001000

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Build works now in a chroot, because there the chrooted mysqld binary doesn't have an apparmor profile, since the path differs from /usr/sbin/mysqld (it's /var/somechroot/usr/sbin/mysqld).

tags: added: update-excuses
Changed in php7.3 (Ubuntu):
assignee: nobody → Andreas Hasenack (ahasenack)
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package php7.3 - 7.3.10-1ubuntu1

---------------
php7.3 (7.3.10-1ubuntu1) focal; urgency=medium

  [ Ondřej Surý ]
  * debian/setup-mysql.sh: fix FTBFS with MySQL 8 (LP: #1850190)
    - Use mysqld --initialize-insecure for MySQL 8.0 (for Ubuntu 19.10)
    - Remove --skip-grant-tables to fix FTBFS with MySQL 8.0. The tests
      expect mysql listening on localhost, and this option in v8.0 makes
      it listen only on the unix socket.

 -- Andreas Hasenack <email address hidden> Mon, 04 Nov 2019 12:32:15 -0300

Changed in php7.3 (Ubuntu):
status: In Progress → 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.