Comment 2 for bug 1979933

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Hi Matthew,

Thanks for the debdiff; sponsored to focal!

I just fixed the Description: field in the patch DEP3 headers,
which isn't as free-form as Subject: line + unstructured text.
(Please see sample in DEP-3 [1] and multiline fields/paragraph
separators in Debian Policy [2] for details, if you'd like it.)

Everything else looks excellent, and I'll just document checks.

cheers,
Mauricio

- Built successfully on all architectures with focal-proposed [0].

- Upstream source code remains the same as with this change,
as of commit 4d43fbd64a07 ("Makefile.in: Only build the fuzzing tests in regular mode").

- Focal's MySQL source code, of course, defines the relied upon
function mysql_options():

    int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
                              const void *arg);

- Supported releases after Focal already have the fix:

 $ git describe --contains 011342d8e453b9e0585bf77f659d80c648df8c9f
 v5.8.1.pre1~91

 $ rmadison --arch=source net-snmp
 ...
  net-snmp | 5.8+dfsg-2ubuntu2 | focal | source
  net-snmp | 5.8+dfsg-2ubuntu2.3 | focal-security | source
  net-snmp | 5.8+dfsg-2ubuntu2.3 | focal-updates | source
  net-snmp | 5.9.1+dfsg-1ubuntu2 | jammy | source
  net-snmp | 5.9.1+dfsg-1ubuntu2.1 | jammy-updates | source
  net-snmp | 5.9.1+dfsg-4ubuntu1 | kinetic | source

- The backport delta (thanks for noting it in DEP-3's Origin:)
is 2 context lines:

 - /* Define to 1 if you have the <my_global.h> header file. */
 - #undef HAVE_MY_GLOBAL_H
 + /* Define if MY_INIT() is availabe in libmysqlclient */
 + #undef HAVE_MY_INIT

- The patch seems to no longer accept command line arguments to
specify connection parameters to MySQL, but it looks like that
was never the purpose (just some flexibility, I guess) per:

* the original code commit

* the comment "load .my.cnf values" in the failing / now disabled calls:

     /** load .my.cnf values */
 #if HAVE_MY_LOAD_DEFAULTS
     my_load_defaults ("my", _sql.groups, &not_argc, &not_argv, 0);
 #elif defined(HAVE_LOAD_DEFAULTS)
     load_defaults ("my", _sql.groups, &not_argc, &not_argv);

* the usage of mysql_options(MYSQL_READ_DEFAULT_GROUP) [3]:

   MYSQL_READ_DEFAULT_GROUP (argument type: char *)

   Read options from the named group from my.cnf or the file specified with MYSQL_READ_DEFAULT_FILE.

* Most importantly, the project's README.sql file:

 net-snmp-5.8+dfsg$ head -n15 README.sql
 snmptrapd MySQL Logging
 -----------------------

 A trap handler for logging traps to a MySQL database was added
 in release 5.5.0.

 The MySQL database location and password must be configured in
 /root/.my.cnf:

  [snmptrapd]
  host=localhost
  password=sql

 User may also be configured, if using a MySQL user besides root.

[0] https://launchpad.net/~mfo/+archive/ubuntu/lp1979933
[1] https://dep-team.pages.debian.net/deps/dep3/
[2] https://www.debian.org/doc/debian-policy/ch-controlfields.html#syntax-of-control-files
[3] https://dev.mysql.com/doc/c-api/8.0/en/mysql-options.html