nss_mysql

2011-08-19 Thread Paweł Lęcznar
witam, musiałem takie coś u siebie uruchomić więc poprawiłem źródła i 
speca (łaty w załączniku), na x86_64 buduje się i działa, wszelkie uwagi 
mile widziane, jeśli wszystko jest ok to proszę o dodanie do repo, 
pozdrawiam
diff -uNr nss-mysql-1.0.orig/src/group.c nss-mysql-1.0/src/group.c
--- nss-mysql-1.0.orig/src/group.c	2011-08-19 10:29:29.0 +0200
+++ nss-mysql-1.0/src/group.c	2011-08-19 11:05:51.0 +0200
@@ -519,7 +519,7 @@
 _nss_mysql_log(LOG_ERR,"initgroups: not enough memory to escape"
 " the user string");
 *errnop = EAGAIN;
-my_thread_end();
+mysql_thread_end();
 return NSS_STATUS_TRYAGAIN;
 }
 
@@ -627,7 +627,7 @@
 _nss_mysql_free_groups(&goptions);
 _nss_mysql_free_users(&options);
 mysql_free_result(result);
-my_thread_end();
+mysql_thread_end();
 return NSS_STATUS_SUCCESS;
 }
 
@@ -678,7 +678,7 @@
 _nss_mysql_free_groups(&goptions);
 _nss_mysql_free_users(&options);
 *errnop = 0;
-my_thread_end();
+mysql_thread_end();
 return NSS_STATUS_SUCCESS;
 
 out_nomem:
@@ -688,7 +688,7 @@
 _nss_mysql_free_groups(&goptions);
 _nss_mysql_free_users(&options);
 *errnop = EAGAIN;
-my_thread_end();
+mysql_thread_end();
 return NSS_STATUS_TRYAGAIN;
 
 out_unavail:
@@ -698,7 +698,7 @@
 _nss_mysql_free_groups(&goptions);
 _nss_mysql_free_users(&options);
 *errnop = ENOENT;
-my_thread_end();
+mysql_thread_end();
 return NSS_STATUS_UNAVAIL;
 }
 
diff -uNr nss-mysql-1.0.orig/src/lib.c nss-mysql-1.0/src/lib.c
--- nss-mysql-1.0.orig/src/lib.c	2011-08-19 10:29:29.0 +0200
+++ nss-mysql-1.0/src/lib.c	2011-08-19 11:04:37.0 +0200
@@ -582,7 +582,7 @@
 _nss_mysql_log(LOG_ERR,"_nss_mysql_check_"
 "connection: pinging %p",
 m->mysql);
-my_thread_init();
+mysql_thread_init();
 if (mysql_ping(m->mysql)) {
 if (DEBUG) 
 _nss_mysql_log(LOG_ERR,
--- nss_mysql.old/nss_mysql.spec	2007-02-13 08:16:49.0 +0100
+++ nss_mysql/nss_mysql.spec	2011-08-19 22:30:19.0 +0200
@@ -9,6 +9,7 @@
 Source0:	http://savannah.nongnu.org/download/nss-mysql/nss-mysql-%{version}.tar.gz
 # Source0-md5:	a1bacf9bcdd8c5172b8074e268af1436
 Patch0:		%{name}-m4.patch
+Patch1:		%{name}-mysql_thread.patch
 URL:		http://www.freesoftware.fsf.org/nss-mysql/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -31,6 +32,7 @@
 %prep
 %setup -q -n nss-mysql-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__libtoolize}
@@ -41,8 +43,8 @@
 	%{?debug:--enable-debug} \
 	--enable-group \
 	--enable-shadow \
-	--with-mysql-lib=/usr/%{_lib} \
-	--with-mysql-include=/usr/include/mysql
+	--with-mysql-lib=/usr%{_libdir} \
+	--with-mysql-include=%{_includedir}/mysql
 
 %install
 rm -rf $RPM_BUILD_ROOT
___
pld-devel-pl mailing list
pld-devel-pl@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl


Re: nss_mysql

2011-08-19 Thread Tomasz Pala
On Fri, Aug 19, 2011 at 22:41:39 +0200, Paweł Lęcznar wrote:

> witam, musiałem takie coś u siebie uruchomić więc poprawiłem źródła i 
> speca (łaty w załączniku), na x86_64 buduje się i działa, wszelkie uwagi 
> mile widziane, jeśli wszystko jest ok to proszę o dodanie do repo, 

1. mamy wersję 1.0, czemu już nie aktualizowałeś do 1.5? Też zabytek,
ale zawsze trochę nowszy... http://libnss-mysql.sourceforge.net/

2. czemu ma służyć poniższa zmiana:

> - --with-mysql-lib=/usr/%{_lib} \
> + --with-mysql-lib=/usr%{_libdir} \

przy zdefiniowanym _libdir na /%{_lib}?

-- 
Tomasz Pala 
___
pld-devel-pl mailing list
pld-devel-pl@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl