apache mod_dbd and mysql (mariadb)
Is this a new report?
Yes
System Info
Void 5.18.19_1 x86_64 GenuineIntel notuptodate rrmFFFFFFFFF
Package(s) Affected
apr_dbd_mysql
Does a report exist for this bug with the project's home (upstream) and/or another distro?
not sure if I have 1000% identified the issue tried reaching out on reddit - no response there are some issues upstream that might or might not be pertinent but equally could just confuse the issue.
Expected behaviour
mod_dbd should work with mysql (mariadb)
Actual behaviour
on using mod_dbd with mysql I see
Can't load driver file apr_dbd_mysql.so
Steps to reproduce
configure mod_dbd to use mysql (httpd.conf)
attempt to open a connection using mod_dbd (from another module)
note that
strings /usr/lib/apr-util-1/apr_dbd_mysql.so
includes
my_init
which isn't in libmariadb.so
to be sure apr_dbd_mysql wasn't linking to something like libmysql.so or similar I checked
ldd /usr/lib/apr-util-1/apr_dbd_mysql.so
which shows
libmariadb.so.3 => /usr/lib/libmariadb.so.3
from this I conclude that apr_dbd_mysql is possibly currently non-functioning
I have confirmed the mod_dbd is working with for example with sqlite (mod_dbd DBDriver sqlite3) and apr_dbd_sqlite
Thank you for taking the time to read this.
also reported here
I tried fixing this but couldn't actually get xbps-src to install anything so I could test it, couldn't find a tutorial with anything but superficial help, so bit stuck...
I do note however that this issue might be fixed in 1.7 series of apr and although the package name says 1.7 its using apr-util-mysql-1.6.1 sources.
If anyone can give me a little support with somewhat opaque xbps-src I could probably fix this...
the build process does complain about not being able to find my_init, so its a confirmed bug for this reason, let alone that its using the wrong version of the source for the package version ???
ignore my comment about the source version I was getting confused with apr and apr-util ! sheesh! go figure...
Tested the same code using sqlite3 and pgsql drivers and it works fine, so there is definitely an issue with the mysql driver
I've managed to fix the issue on my system its just a case of commenting a single line I'm struggling with xbps-src still I had to edit the source in masterdir/builddir/apr-util-1.6.1/ I presume I need to make some sort of patch that can be added to the template ??? I have been unable to find any documentation for this workflow can anyone help ?
yes, you'll want to create a patch, then just put it in srcpkgs/apr-util/patches/ and xbps-src will take care of it. I recommend using unpatch to generate it, e.g. (from the repo root dir):
$ mkdir srcpkgs/apr-util/patches
$ ./xbps-src clean apr-util && ./xbps-src extract apr-util
$ cp masterdir/builddir/apr-util-1.6.1/PATH/TO/FILE{,.orig}
$ # edit masterdir/builddir/apr-util-1.6.1/PATH/TO/FILE
$ unpatch -g -p3 masterdir/builddir/apr-util-1.6.1/PATH/TO/FILE > srcpkgs/apr-util/patches/DESCRIPTIVE-NAME.patch
$ ./xbps-src clean apr-util && ./xbps-src pkg apr-util
unpatch spews to console what looks like a patch, but then says
Can't unpatch 'srcpkgs/apr-util-mysql/patches/issue39510.patch'.
I ended up just using diff
diff -Naur masterdir/builddir/apr-util-1.6.1/dbd/apr_dbd_mysql.c.orig masterdir/builddir/apr-util-1.6.1/dbd/apr_dbd_mysql.c > srcpkgs/apr-util-mysql/patches/issue39510.patch
issue39510.patch.txt (rename to .patch github only let me upload .txt files)
alas it didn't seem to apply the patch, and managed to wipe out all the source code, xps-src sure isn't KISS!
could someone else please pick up the patch and fix the package so it can hit the repo - hopefully others won't have to suffer this bug then, I'm thoroughly sick of bashing my head against a brick wall with xps-src, mind you given the length of time this issue has been open and add on the length of time since the package was released I'm probably the only one using this package....
time for bed!
gah now its refusing to even rebuild stuff - no error message just a much shorter "build" well at least I had it working at one point....
I'm going to backport this from upstream: https://svn.apache.org/viewvc/apr/apr/trunk/dbd/apr_dbd_mysql.c?r1=1872059&r2=1872060&diff_format=h, seems to solve the issue properly (same way you did)
thank you so much!
out of interest how long before this hits the repo normally ?
should be there already, maybe up to a few hours if you don't use an official mirror
https://build.voidlinux.org/builders/x86_64_builder/builds/40182