Merge ~lvoytek/ubuntu/+source/mysql-8.0:lp1980466-fix-mysql_secure_installation-kinetic into ubuntu/+source/mysql-8.0:ubuntu/kinetic-devel

Proposed by Lena Voytek
Status: Merged
Merge reported by: Lena Voytek
Merged at revision: 55e75763eb94b3533166b6f914b1ab25fa512af2
Proposed branch: ~lvoytek/ubuntu/+source/mysql-8.0:lp1980466-fix-mysql_secure_installation-kinetic
Merge into: ubuntu/+source/mysql-8.0:ubuntu/kinetic-devel
Diff against target: 60 lines (+38/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/mysql_secure_installation-remove-root-pw-creation.patch (+30/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Lena Voytek (community) Approve
Canonical Server Reporter Pending
Review via email: mp+444431@code.launchpad.net

Description of the change

Fix mysql_secure_installation in Kinetic

The changes here are exactly the same as those in lunar and mantic.
The mantic mp is here: https://code.launchpad.net/~lvoytek/ubuntu/+source/mysql-8.0/+git/mysql-8.0/+merge/442678
The lunar mp is here, the diff is messy though since it was compared against ubuntu/devel: https://code.launchpad.net/~lvoytek/ubuntu/+source/mysql-8.0/+git/mysql-8.0/+merge/440515

PPA: https://launchpad.net/~lvoytek/+archive/ubuntu/mysql-mysql-secure-installation

Testing:

# lxc launch ubuntu:kinetic test-kinetic
# lxc exec test-kinetic bash
# apt update && apt dist-upgrade -y
# add-apt-repository ppa:lvoytek/mysql-mysql-secure-installation
# apt install mysql-server -y
# mysql_secure_installation

To post a comment you must log in.
Revision history for this message
Lena Voytek (lvoytek) wrote :

Uploaded:

dput ubuntu ../mysql-8.0_8.0.33-0ubuntu0.22.10.3_source.changes
D: Setting host argument.
Checking signature on .changes
gpg: ../mysql-8.0_8.0.33-0ubuntu0.22.10.3_source.changes: Valid signature from 34B8AD7D9529E793
Checking signature on .dsc
gpg: ../mysql-8.0_8.0.33-0ubuntu0.22.10.3.dsc: Valid signature from 34B8AD7D9529E793
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading mysql-8.0_8.0.33-0ubuntu0.22.10.3.dsc: done.
  Uploading mysql-8.0_8.0.33-0ubuntu0.22.10.3.debian.tar.xz: done.
  Uploading mysql-8.0_8.0.33-0ubuntu0.22.10.3_source.buildinfo: done.
  Uploading mysql-8.0_8.0.33-0ubuntu0.22.10.3_source.changes: done.
Successfully uploaded packages.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 23612c7..21bd02a 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+mysql-8.0 (8.0.33-0ubuntu0.22.10.3) kinetic; urgency=medium
7+
8+ * d/p/mysql_secure_installation-remove-root-pw-creation.patch: Fix
9+ mysql_secure_installation by removing root password creation (LP: #1980466)
10+
11+ -- Lena Voytek <lena.voytek@canonical.com> Thu, 08 Jun 2023 07:35:13 -0700
12+
13 mysql-8.0 (8.0.33-0ubuntu0.22.10.2) kinetic-security; urgency=medium
14
15 * Fix crash on startup on armhf (LP: #2019203)
16diff --git a/debian/patches/mysql_secure_installation-remove-root-pw-creation.patch b/debian/patches/mysql_secure_installation-remove-root-pw-creation.patch
17new file mode 100644
18index 0000000..22bc248
19--- /dev/null
20+++ b/debian/patches/mysql_secure_installation-remove-root-pw-creation.patch
21@@ -0,0 +1,30 @@
22+Description: Remove the creation of a root password in mysql_secure_installation
23+ Since Ubuntu and Debian use the auth_socket plugin for the root user by default,
24+ and attempting to set a password for it through "SET_PASSWORD" causes an error,
25+ do not create a root password in the mysql_secure_installation script if one
26+ has not been set previously. If the user would like to instead use a password
27+ they can run
28+ ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'password';
29+ in the mysql client.
30+Author: Lena Voytek <lena.voytek@canonical.com>
31+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/1980466
32+Forwarded: no
33+Last-Update: 2023-04-20
34+---
35+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
36+--- a/client/mysql_secure_installation.cc
37++++ b/client/mysql_secure_installation.cc
38+@@ -811,8 +811,11 @@
39+ }
40+
41+ if (!hadpass) {
42+- fprintf(stdout, "Please set the password for %s here.\n", opt_user);
43+- set_opt_user_password(component_set);
44++ fprintf(stdout,
45++ "\nSkipping password set for %s as authentication with auth_socket is used by default.\n"
46++ "If you would like to use password authentication instead, this can be done with the \"ALTER_USER\" command.\n"
47++ "See https://dev.mysql.com/doc/refman/8.0/en/alter-user.html#alter-user-password-management for more information.\n\n"
48++ , opt_user);
49+ } else if (opt_use_default == false) {
50+ char prompt[256];
51+ fprintf(stdout, "Using existing password for %s.\n", opt_user);
52diff --git a/debian/patches/series b/debian/patches/series
53index f36ae9f..dab82cf 100644
54--- a/debian/patches/series
55+++ b/debian/patches/series
56@@ -9,3 +9,4 @@ boost-1.76.0-fix_multiprecision_issue_419-ppc64le.patch
57 disable_timestamping_test.patch
58 revert-be8348a7.patch
59 fix_expired_date_in_test.patch
60+mysql_secure_installation-remove-root-pw-creation.patch

Subscribers

People subscribed via source and target branches