Subject: [Pkg-cacti-maint] Bug#933683: cacti: Cacti needs fixes in order to work with newer MySQL versions to be merged

From: Rafael David Tinoco <[email-masked]>
Date: Thu, 01 Aug 2019 19:49:07 +0000

Package: cacti
Severity: normal
Tags: patch upstream

Hello, I'm opening this bug to track the merge request made at:

https://salsa.debian.org/cacti-team/cacti/merge_requests/1

Where the changelog tells history about why it is needed:

  * dbc_authplugin parameter for dbconfig-common:
    - debian/cacti.config changes default MySQL authentication
      plugin to a compatible (to PHP PDO and PHP mysqli) one.

  * Instructions have to contain workaround for NO_AUTO_CREATE_USER
    - debian/README.Debian

  * General instructions have to contain workaround for NO_AUTO_CREATE_USER
    - docs-source/General-Installing-Instructions.md

  * Fix MySQL keyword usage in table "aggregate_graph_templates"
    - cacti.sql

It goes together with dbconfig fixes proposed at:

https://salsa.debian.org/debian/dbconfig-common/merge_requests/3

in order to make both packages to work with recent MySQL versions.

Thank you very much in advance for reviewing and considering this.

Best Regards

Rafael D. Tinoco
[email-masked]

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.0.0-21-generic (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages cacti depends on:
pn  dbconfig-common                      <none>
pn  dbconfig-mysql | dbconfig-no-thanks  <none>
ii  debconf [debconf-2.0]                1.5.72
ii  fonts-dejavu-core                    2.37-1
pn  fonts-dejavu-extra                   <none>
pn  fonts-fork-awesome                   <none>
ii  javascript-common                    11
pn  libapache2-mod-php | php             <none>
pn  libjs-c3                             <none>
pn  libjs-chart.js                       <none>
pn  libjs-d3                             <none>
ii  libjs-jquery                         3.3.1~dfsg-3
ii  libjs-jquery-colorpicker             1.2.17-1
pn  libjs-jquery-cookie                  <none>
pn  libjs-jquery-hotkeys                 <none>
ii  libjs-jquery-jstree                  3.3.7+dfsg1-1
pn  libjs-jquery-metadata                <none>
pn  libjs-jquery-tablesorter             <none>
pn  libjs-jquery-timepicker              <none>
ii  libjs-jquery-ui                      1.12.1+dfsg-5
ii  libjs-jquery-ui-theme-smoothness     1.12.1+dfsg-1
ii  libjs-jquery-ui-theme-south-street   1.12.1+dfsg-1
ii  libjs-jquery-ui-theme-ui-darkness    1.12.1+dfsg-1
pn  libjs-jquery-ui-touch-punch          <none>
pn  libphp-phpmailer                     <none>
ii  perl                                 5.28.1-6
pn  php-cli                              <none>
pn  php-gd                               <none>
pn  php-gmp                              <none>
pn  php-json                             <none>
pn  php-ldap                             <none>
pn  php-mbstring                         <none>
pn  php-mysql                            <none>
pn  php-phpseclib                        <none>
pn  php-snmp                             <none>
pn  php-twig                             <none>
pn  php-xml                              <none>
pn  rrdtool                              <none>
pn  snmp                                 <none>
ii  ucf                                  3.0038+nmu1

Versions of packages cacti recommends:
pn  apache2 | lighttpd | nginx | httpd           <none>
pn  default-mysql-server | virtual-mysql-server  <none>
ii  iputils-ping                                 3:20190515-2
ii  logrotate                                    3.14.0-4

Versions of packages cacti suggests:
pn  cacti-spine  <none>
pn  moreutils    <none>
pn  snmpd        <none>

---

From: Paul Gevers <[email-masked]>
Date: Thu, 12 May 2022 09:00:49 +0200

Hi Athos, Rafael,

On 12-05-2022 06:16, Launchpad Bug Tracker wrote:
> This bug was fixed in the package cacti - 1.2.20+ds1-2ubuntu1
> 
> ---------------
> cacti (1.2.20+ds1-2ubuntu1) kinetic; urgency=medium
> 
>    * Merge with Debian unstable (LP: #1972833). Remaining changes:
>      - General installing instructions update for NO_AUTO_CREATE_USER.
>      - Use new dbconfig "dbc_authplugin" variable to mitigate MySQL 8 issues.
> 
>   -- Athos Ribeiro <[email-masked]>  Tue, 10 May 2022
> 10:03:33 -0300
> 
> ** Changed in: cacti (Ubuntu)
>         Status: In Progress => Fix Released

As Debian has MySQL 8+ for some time now, wouldn't it make sense to 
merge this back into Debian now. Are these changes compatible with 
MariaDB, and if not, what would it take to make them compatible?

Paul

---

From: Paul Gevers <[email-masked]>
Date: Thu, 14 Jul 2022 17:01:12 +0200

Hi,

> MariaDB, and if not, what would it take to make them compatible?

I guess the required changes are not compatible with MariaDB? Can you 
confirm?

paul@mulciber ~/packages/cacti/cacti $ sudo mysql -e "create user 
'bla'@'localhost';"
paul@mulciber ~/packages/cacti/cacti $ sudo mysql -e "alter user 
'bla'@'localhost' identified with 'sha256_password';"
ERROR 1396 (HY000) at line 1: Operation ALTER USER failed for 
'bla'@'localhost'

Paul

---

From: Athos Ribeiro <[email-masked]>
Date: Sat, 26 Nov 2022 20:46:16 -0300

> Hi,

Hi Paul,

> ERROR 1396 (HY000) at line 1: Operation ALTER USER failed for 

Maria DB does not seem to support 'sha256_password' [1]. Still, MySQL
default seems to use sha2 instead of sha1. It seems that removing the
line changing the auth method would be enough to support both DBs. Would
that be enough for us to merge the changes? If so, I can rebase the
latest Rafael's changes and prepare a MR in salsa.

Sorry for the delay on replying on this one :)

[1] https://mariadb.com/kb/en/authentication-plugin-sha-256/
[2]  https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password

-- 
Athos Ribeiro

---

From: Paul Gevers <[email-masked]>
Date: Sun, 27 Nov 2022 07:47:15 +0100

Hi,

On 27-11-2022 00:46, Athos Ribeiro wrote:
> that be enough for us to merge the changes?

I haven't checked recently, but I guess yes.

> If so, I can rebase the

I think it would be good for the Debian/Ubuntu ecosystem to reduce the 
diff between the two, so I'd be in favor of being in sync.

Paul

---

From: Athos Ribeiro <[email-masked]>
Date: Sun, 27 Nov 2022 22:34:53 -0300

>diff between the two, so I'd be in favor of being in sync.

I filed a MR here:

https://salsa.debian.org/cacti-team/cacti/-/merge_requests/3

It just removes the sha2 changes, making it compatible with both DBs.
I believe this should be enough to keep the packages in sync.

-- 
Athos Ribeiro

---

From: "Debian Bug Tracking System" <[email-masked]>
Date: Wed, 04 Jan 2023 19:33:03 +0000

Your message dated Wed, 4 Jan 2023 20:29:29 +0100
with message-id <[email-masked]>
and subject line Re: Bug#933683: [Bug 1972833] Re: Merge cacti from Debian unstable for kinetic
has caused the Debian Bug report #933683,
regarding cacti: Cacti needs fixes in order to work with newer MySQL versions to be merged
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email-masked]
immediately.)

-- 
933683: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=933683
Debian Bug Tracking System
Contact [email-masked] with problems

Subject: cacti: Cacti needs fixes in order to work with newer MySQL versions to be merged
From: Rafael David Tinoco <[email-masked]>
To: Debian Bug Tracking System <[email-masked]>
Date: Thu, 01 Aug 2019 19:49:07 +0000

Package: cacti
Severity: normal
Tags: patch upstream

Best Regards

Rafael D. Tinoco
[email-masked]

-- System Information:

Subject: Re: Bug#933683: [Bug 1972833] Re: Merge cacti from Debian unstable for kinetic
From: Paul Gevers <[email-masked]>
To: [email-masked]
Date: Wed, 4 Jan 2023 20:29:29 +0100

Version: 1.2.22+ds1-3

> I believe this should be enough to keep the packages in sync.

And that was merged and uploaded a while ago.

Paul