packages: pcsc-lite/pcsc-lite.spec, pcsc-lite/debuglog-pid.patch (NEW) - in...

glen glen at pld-linux.org
Wed Jan 12 01:12:12 CET 2011


Author: glen                         Date: Wed Jan 12 00:12:12 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- include pid in daemon logs, also log it to debug facility, not info

---- Files affected:
packages/pcsc-lite:
   pcsc-lite.spec (1.51 -> 1.52) , debuglog-pid.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/pcsc-lite/pcsc-lite.spec
diff -u packages/pcsc-lite/pcsc-lite.spec:1.51 packages/pcsc-lite/pcsc-lite.spec:1.52
--- packages/pcsc-lite/pcsc-lite.spec:1.51	Wed Jan 12 01:10:59 2011
+++ packages/pcsc-lite/pcsc-lite.spec	Wed Jan 12 01:12:07 2011
@@ -18,6 +18,7 @@
 Patch0:		%{name}-fhs.patch
 Patch1:		%{name}-any.patch
 Patch2:		noautostart.patch
+Patch3:		debuglog-pid.patch
 URL:		http://www.linuxnet.com/middle.html
 BuildRequires:	autoconf >= 2.58
 BuildRequires:	automake >= 1:1.8
@@ -102,6 +103,7 @@
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 %{__libtoolize}
@@ -206,6 +208,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.52  2011/01/12 00:12:07  glen
+- include pid in daemon logs, also log it to debug facility, not info
+
 Revision 1.51  2011/01/12 00:10:59  glen
 - disable auto powerdown
 

================================================================
Index: packages/pcsc-lite/debuglog-pid.patch
diff -u /dev/null packages/pcsc-lite/debuglog-pid.patch:1.1
--- /dev/null	Wed Jan 12 01:12:13 2011
+++ packages/pcsc-lite/debuglog-pid.patch	Wed Jan 12 01:12:07 2011
@@ -0,0 +1,31 @@
+--- pcsc-lite-1.6.6/src/debuglog.c~	2010-06-30 15:40:58.000000000 +0300
++++ pcsc-lite-1.6.6/src/debuglog.c	2011-01-12 01:58:18.693291099 +0200
+@@ -104,6 +104,8 @@
+ {
+ 	char DebugBuffer[DEBUG_BUF_SIZE];
+ 	va_list argptr;
++	// boolean not to do openlog several times
++	static int syslog_opened = 0;
+ 
+ 	if ((LogSuppress != DEBUGLOG_LOG_ENTRIES)
+ 		|| (priority < LogLevel) /* log priority lower than threshold? */
+@@ -114,13 +116,18 @@
+ 	vsnprintf(DebugBuffer, DEBUG_BUF_SIZE, fmt, argptr);
+ 	va_end(argptr);
+ 
++	if (DEBUGLOG_SYSLOG_DEBUG == LogMsgType && !syslog_opened) {
++		openlog(NULL, LOG_PID, LOG_DAEMON);
++		syslog_opened = 1;
++	}
++
+ 	log_line(priority, DebugBuffer);
+ } /* log_msg */
+ 
+ static void log_line(const int priority, const char *DebugBuffer)
+ {
+ 	if (DEBUGLOG_SYSLOG_DEBUG == LogMsgType)
+-		syslog(LOG_INFO, "%s", DebugBuffer);
++		syslog(LOG_DEBUG, "%s", DebugBuffer);
+ 	else
+ 	{
+ 		if (LogDoColor)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/pcsc-lite/pcsc-lite.spec?r1=1.51&r2=1.52&f=u



More information about the pld-cvs-commit mailing list