saknopper / libnss-mysql Goto Github PK
View Code? Open in Web Editor NEWA fork from http://libnss-mysql.sourceforge.net/
License: GNU General Public License v2.0
A fork from http://libnss-mysql.sourceforge.net/
License: GNU General Public License v2.0
First, thanks for the overhaul of libnss-mysql!
Taking the latest version (47be7bb), tested on Alpine and CentOS 8:
/ # git clone https://github.com/saknopper/libnss-mysql.git
Cloning into 'libnss-mysql'...
remote: Enumerating objects: 2080, done.
remote: Total 2080 (delta 0), reused 0 (delta 0), pack-reused 2080
Receiving objects: 100% (2080/2080), 544.12 KiB | 1.27 MiB/s, done.
Resolving deltas: 100% (1375/1375), done.
/ # cd libnss-mysql/
/libnss-mysql # autoreconf -f -i
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:32: installing 'build-aux/ar-lib'
configure.ac:29: installing 'build-aux/compile'
configure.ac:34: installing 'build-aux/config.guess'
configure.ac:34: installing 'build-aux/config.sub'
configure.ac:25: installing 'build-aux/install-sh'
configure.ac:25: installing 'build-aux/missing'
src/Makefile.am: installing 'build-aux/depcomp'
/libnss-mysql # ./configure
[...]
checking for mysql_config executable... /usr/bin/mysql_config
/usr/bin/mysql_config: unrecognized option: variable=pkgincludedir
grep: /mysql_version.h: No such file or directory
grep: /mysql_version.h: No such file or directory
checking for getsockname in -lsocket... no
[...]
/libnss-mysql # make
make all-recursive
make[1]: Entering directory '/libnss-mysql'
Making all in src
make[2]: Entering directory '/libnss-mysql/src'
make[2]: *** No rule to make target 'version.c', needed by 'libnss_mysql_la-version.lo'. Stop.
make[2]: Leaving directory '/libnss-mysql/src'
make[1]: *** [Makefile:419: all-recursive] Error 1
make[1]: Leaving directory '/libnss-mysql'
make: *** [Makefile:351: all] Error 2
There is no version.c file in the tree, but I also found that version.c is explicitly ignored in the gitignore:
./.gitignore:version.c
Creating an empty version.c suffices to proceed with the build:
touch src/version.c
Whats the proper way to proceed here?
I encounter this error in the named combination.
mysql.c: In function ‘_nss_mysql_connect_sql’:
mysql.c:239:14: error: ‘MYSQL’ {aka ‘struct st_mysql’} has no member named ‘reconnect’
ci.link.reconnect = 0; /* Safety: We can't let MySQL assume socket is
^
And was able to quick-fix that as follows:
diff --git a/src/mysql.c b/src/mysql.c
index 4693966..bb6d25d 100644
--- a/src/mysql.c
+++ b/src/mysql.c
@@ -236,8 +236,10 @@ _nss_mysql_connect_sql (MYSQL_RES **mresult)
DSRETURN (NSS_UNAVAIL)
}
ci.valid = true;
+#if MYSQL_VERSION_ID < 50013
ci.link.reconnect = 0; /* Safety: We can't let MySQL assume socket is
still valid; see _nss_mysql_validate_socket */
+#endif
DSRETURN (NSS_SUCCESS)
}
_nss_mysql_log (LOG_ALERT, "Connection to server '%s' failed: %s",
Is that the way to go? If yes, I would create a pull request for that.
Reference: https://jira.mariadb.org/browse/MDEV-12950
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.