[packages/evlog] - updated to 1.6.1 - added am,gcc,glibc,nptl,link,linux patch (misc build fixes) - removed obsolete
qboosh
qboosh at pld-linux.org
Sun Mar 24 08:00:25 CET 2013
commit 4d3896baad04061d03c36919c578c52b9e4b2ca9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Mar 24 08:00:23 2013 +0100
- updated to 1.6.1
- added am,gcc,glibc,nptl,link,linux patch (misc build fixes)
- removed obsolete ksyms2.4 patch
evlog-am.patch | 11 +++++++
evlog-gcc.patch | 72 ++++++++++++++++++++++++++++++++++++++++
evlog-glibc.patch | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++
evlog-ksyms2.4.patch | 89 --------------------------------------------------
evlog-link.patch | 11 +++++++
evlog-linux.patch | 19 +++++++++++
evlog-nptl.patch | 22 +++++++++++++
evlog.spec | 90 +++++++++++++++++++++++++++++++++++++-------------
8 files changed, 295 insertions(+), 111 deletions(-)
---
diff --git a/evlog.spec b/evlog.spec
index 5dabee8..449a389 100644
--- a/evlog.spec
+++ b/evlog.spec
@@ -1,16 +1,28 @@
+# TODO: PLDify init scripts
Summary: Linux Event Logging for Enterprise-Class Systems
Summary(pl.UTF-8): Linuksowe logowanie zdarzeń dla systemów klasy enterprise
Name: evlog
-Version: 1.6.0
-%define bver alpha
-Release: 0.%{bver}.0.1
-License: LGPL (library), GPL (utils)
+Version: 1.6.1
+Release: 0.1
+License: LGPL v2.1+ (library), GPL v2+ (utils)
Group: Libraries
-Source0: http://dl.sourceforge.net/evlog/%{name}-%{version}-%{bver}.tar.gz
-# Source0-md5: 47142eabd0fdf59faf6b28cd5a748e45
-Patch0: %{name}-ksyms2.4.patch
+Source0: http://downloads.sourceforge.net/evlog/%{name}-%{version}.tar.gz
+# Source0-md5: b4cf6d696c827bf72b67532950c3bf9f
+#Patch0: %{name}-ksyms2.4.patch
+Patch0: %{name}-am.patch
+Patch1: %{name}-gcc.patch
+Patch2: %{name}-glibc.patch
+Patch3: %{name}-nptl.patch
+Patch4: %{name}-link.patch
+Patch5: %{name}-linux.patch
URL: http://evlog.sourceforge.net/
+BuildRequires: autoconf >= 2.53
+BuildRequires: automake
BuildRequires: binutils-devel
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: libtool
+BuildRequires: zlib-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -20,10 +32,10 @@ offers capabilities and features required in medium-to-large
Enterprise-class systems.
%description -l pl.UTF-8
-evlog dostarcza oparte o otwarty kod źródłowy, niezależne od platformy
-udogodnienia związane z logowaniem zdarzeń dla systemu operacyjnego
-Linux i aplikacji linuksowych, oferujące możliwości i cechy potrzebne
-w średnich i dużych systemach klasy enterprise.
+evlog dostarcza mającą otwarty kod źródłowy, niezależną od platformy
+funkcjonalność logowaniem zdarzeń dla systemu operacyjnego Linux i
+aplikacji linuksowych, oferujące możliwości i cechy potrzebne w
+średnich i dużych systemach klasy enterprise.
%package devel
Summary: Header files for evlog libraries
@@ -52,16 +64,24 @@ Statyczne biblioteki evlog.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+
+%{__sed} -i -e 's/yacc/bison -y/' user/lib/query/Makefile.am
%build
-#%{__libtoolize}
-#%{__aclocal}
-#%{__autoconf}
-#%{__autoheader}
-#%{__automake}
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
# plugins path is ${optdir}/evlog/plugins, so pass %{_libdir}
%configure \
- --with-localstatedir=/var/lib \
+ --with-initdir=/etc/rc.d/init.d \
+ --with-localstatedir=/var/lib/evlog \
--with-optdir=%{_libdir}
%{__make}
@@ -80,8 +100,15 @@ rm -rf $RPM_BUILD_ROOT
%{__make} -C user/cmd/evlogd/udp_rmtlog_be install \
DESTDIR=$RPM_BUILD_ROOT
+# move devel part to /usr
mv -f $RPM_BUILD_ROOT/%{_lib}/libevlsyslog.{a,la} $RPM_BUILD_ROOT%{_libdir}
+%{__rm} $RPM_BUILD_ROOT/%{_lib}/libevlsyslog.so
ln -sf /%{_lib}/libevlsyslog.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libevlsyslog.so
+%{__sed} -i -e "s,^libdir='/%{_lib}',libdir='%{_libdir}'," $RPM_BUILD_ROOT%{_libdir}/libevlsyslog.la
+# dlopened modules
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/evlog/plugins/*.{la,a}
+
+%{__mv} $RPM_BUILD_ROOT%{_docdir}/{packages/evlog,evlog}
%clean
rm -rf $RPM_BUILD_ROOT
@@ -92,19 +119,38 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc CHANGES INSTALL README README.ela
-%attr(755,root,root) /sbin/*
+%attr(755,root,root) /sbin/ela_*
+%attr(755,root,root) /sbin/evl*
+%attr(755,root,root) /sbin/slog_fwd
%attr(755,root,root) /%{_lib}/libevlsyslog.so.*.*.*
+%attr(755,root,root) %ghost /%{_lib}/libevlsyslog.so.0
%attr(755,root,root) %{_libdir}/libevl.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libevl.so.0
%dir %{_libdir}/evlog
%dir %{_libdir}/evlog/plugins
-%attr(755,root,root) %{_libdir}/evlog/plugins/*.so
+%attr(755,root,root) %{_libdir}/evlog/plugins/tcp_rmtlog_be.so
+%attr(755,root,root) %{_libdir}/evlog/plugins/udp_rmtlog_be.so
%attr(755,root,root) %{_datadir}/evlog
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/evlogmgr.cron
-%attr(755,root,root) %dir %{_sysconfdir}/evlog.d
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/evlog.d/*
-%attr(754,root,root) /etc/rc.d/init.d/evl*
+%dir %{_sysconfdir}/evlog.d
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/evlog.d/action_profile
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/evlog.d/action_registry
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/evlog.d/evlhosts
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/evlog.d/evlog.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/evlog.d/evlogrmtd.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/evlog.d/facility_registry
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/evlog.d/libevlsyslog.conf
+%dir %{_sysconfdir}/evlog.d/plugins
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/evlog.d/plugins/tcp_rmtlog_be.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/evlog.d/plugins/udp_rmtlog_be.conf
+%attr(754,root,root) /etc/rc.d/init.d/evlaction
+%attr(754,root,root) /etc/rc.d/init.d/evlnotify
+%attr(754,root,root) /etc/rc.d/init.d/evlog
+%attr(754,root,root) /etc/rc.d/init.d/evlogrmt
%attr(750,root,root) /var/lib/evlog
%{_mandir}/man1/evl*.1*
+%dir %{_docdir}/evlog
+%{_docdir}/evlog/templates
%files devel
%defattr(644,root,root,755)
diff --git a/evlog-am.patch b/evlog-am.patch
new file mode 100644
index 0000000..820fb49
--- /dev/null
+++ b/evlog-am.patch
@@ -0,0 +1,11 @@
+--- evlog-1.6.1/configure.ac.orig 2004-12-28 23:17:43.000000000 +0100
++++ evlog-1.6.1/configure.ac 2013-03-23 13:19:22.276007606 +0100
+@@ -9,7 +9,7 @@
+ AC_CONFIG_AUX_DIR(.)
+
+ AM_INIT_AUTOMAKE
+-AM_CONFIG_HEADER([config.h])
++AC_CONFIG_HEADERS([config.h])
+
+ # Checks for programs.
+ AC_PROG_CXX
diff --git a/evlog-gcc.patch b/evlog-gcc.patch
new file mode 100644
index 0000000..bd1b305
--- /dev/null
+++ b/evlog-gcc.patch
@@ -0,0 +1,72 @@
+--- evlog-1.6.1/user/include/evl_template.h.orig 2004-04-30 02:22:59.000000000 +0200
++++ evlog-1.6.1/user/include/evl_template.h 2013-03-23 13:24:16.339328531 +0100
+@@ -469,7 +469,7 @@
+ extern void _evlTmplSemanticError(const char *fmt, ...);
+ extern tmpl_type_info_t _evlTmplTypeInfo[];
+
+-extern tmpl_arch_type_info_t _evlTmplArchTypeInfo[][];
++extern tmpl_arch_type_info_t _evlTmplArchTypeInfo[][24];
+
+ extern void _evlTmplDprintf(const char *fmt, ...);
+ extern int _evlEndsWith(const char *s, const char *suffix);
+--- evlog-1.6.1/user/lib/template/convert.c.orig 2004-12-15 18:05:46.000000000 +0100
++++ evlog-1.6.1/user/lib/template/convert.c 2013-03-23 13:50:39.955928813 +0100
+@@ -244,7 +244,7 @@
+ memcpy(data, tmp, dest_size);
+ }
+ break;
+- default:
++ default: ;
+ }
+ }
+
+--- evlog-1.6.1/user/lib/util/format.c.orig 2004-04-30 02:27:56.000000000 +0200
++++ evlog-1.6.1/user/lib/util/format.c 2013-03-23 14:14:53.439201281 +0100
+@@ -286,7 +286,7 @@
+ seg->u.fs_attname = nsaName;
+ seg->u2.fs_attribute = NULL;
+ break;
+- default:
++ default: ;
+ }
+ seg->fs_userfmt = attrFmt;
+ if (attrFmt
+@@ -475,7 +475,7 @@
+ */
+ size += _evlGetMaxDumpLen();
+ break;
+- default:
++ default: ;
+ }
+ p = p->li_next;
+ } while (p != head);
+@@ -667,7 +667,7 @@
+ case TY_INT: return TY_UINT;
+ case TY_LONG: return TY_ULONG;
+ case TY_LONGLONG: return TY_ULONGLONG;
+- default:
++ default: ;
+ }
+ return ty;
+ }
+--- evlog-1.6.1/user/include/evlog.h.in.orig 2013-03-23 14:26:33.832505085 +0100
++++ evlog-1.6.1/user/include/evlog.h.in 2013-03-23 19:46:44.581698880 +0100
+@@ -191,8 +191,6 @@
+ char file[128];
+ };
+
+-#define _EVLOG_POS { __LINE__, __FUNCTION__, __FILE__ }
+-
+ struct evlog_info {
+ char format[128+64];
+ char facility[64];
+@@ -202,7 +200,8 @@
+ #define syslogat(priority, fmt, ...) \
+ do { \
+ static struct evlog_info __attribute__((section(".log"),unused)) ___ \
+- = { fmt, __stringify(EVL_FACILITY_NAME), _EVLOG_POS }; \
++ = { fmt, __stringify(EVL_FACILITY_NAME) }; \
++ ___.pos.line = __LINE__; strncpy(___.pos.function, 60, __FUNCTION__); strncpy(___.pos.file, 128, __FILE__); \
+ char *unbraced_fmt = _evl_unbrace(fmt); \
+ if (_evl_syslogat(priority, __stringify(EVL_FACILITY_NAME), \
+ evl_gen_event_type(__FILE__, __FUNCTION__, fmt), \
diff --git a/evlog-glibc.patch b/evlog-glibc.patch
new file mode 100644
index 0000000..1fea3db
--- /dev/null
+++ b/evlog-glibc.patch
@@ -0,0 +1,92 @@
+--- evlog-1.6.1/user/cmd/evlogd/evlogd.c.orig 2004-12-15 18:04:20.000000000 +0100
++++ evlog-1.6.1/user/cmd/evlogd/evlogd.c 2013-03-23 20:30:12.958256334 +0100
+@@ -24,6 +24,9 @@
+ *
+ */
+
++/* for ucred */
++#define _GNU_SOURCE
++
+ #include <stdio.h> /* Defines NULL */
+ #include <stdarg.h> /* Defines va_args */
+ #include <fcntl.h> /* Defines FILE, fopen() */
+--- evlog-1.6.1/user/cmd/evlnotifyd/evlnotifyd.c.orig 2004-03-23 23:18:23.000000000 +0100
++++ evlog-1.6.1/user/cmd/evlnotifyd/evlnotifyd.c 2013-03-23 20:44:21.344887153 +0100
+@@ -24,6 +24,9 @@
+ *
+ */
+
++/* for ucred */
++#define _GNU_SOURCE
++
+ #include <stdio.h>
+ #include <string.h>
+ #include <fcntl.h>
+--- evlog-1.6.1/user/cmd/evlnotifyd/evlnotifyd.c.orig 2013-03-23 20:44:42.268219607 +0100
++++ evlog-1.6.1/user/cmd/evlnotifyd/evlnotifyd.c 2013-03-23 21:14:51.028143701 +0100
+@@ -43,6 +43,7 @@
+ #include <stdlib.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <sys/wait.h>
+
+ #include <sys/syscall.h>
+ #include <syslog.h>
+@@ -674,7 +675,7 @@
+ */
+ if((req->nfyhdr.flags & POSIX_LOG_NFY_DISABLED) == 0 ) {
+ int match;
+- struct siginfo si;
++ siginfo_t si;
+ union sigval val;
+ int ret;
+ if (req->nfy_query.qu_tree != NULL) {
+--- evlog-1.6.1/user/cmd/evlactiond/evlactiond.c.orig 2004-09-08 19:36:36.000000000 +0200
++++ evlog-1.6.1/user/cmd/evlactiond/evlactiond.c 2013-03-23 21:17:42.788136509 +0100
+@@ -24,6 +24,8 @@
+ *
+ */
+
++/* for ucred */
++#define _GNU_SOURCE
+
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -41,6 +43,7 @@
+ #include <assert.h>
+ #include <grp.h>
+ #include <pwd.h>
++#include <limits.h>
+ #include <sys/wait.h>
+
+ #include "config.h"
+@@ -1580,7 +1583,7 @@
+ struct passwd *pw;
+ evl_listnode_t *p;
+
+- fd = open(EVLACTIOND_REG_FILE, O_RDONLY|O_CREAT);
++ fd = open(EVLACTIOND_REG_FILE, O_RDONLY|O_CREAT, S_IRWXU);
+ if ( fd < 0) {
+ perror(EVLACTIOND_REG_FILE);
+ return -1;
+--- evlog-1.6.1/user/cmd/evlnotify/evlnotify.c.orig 2004-03-25 01:30:24.000000000 +0100
++++ evlog-1.6.1/user/cmd/evlnotify/evlnotify.c 2013-03-23 21:18:21.851468158 +0100
+@@ -37,6 +37,7 @@
+ #include <assert.h>
+ #include <pwd.h>
+ #include <grp.h>
++#include <limits.h>
+
+
+ #include "config.h"
+--- evlog-1.6.1/user/cmd/ela/ela_sig_send.c.orig 2004-02-21 04:51:40.000000000 +0100
++++ evlog-1.6.1/user/cmd/ela/ela_sig_send.c 2013-03-23 21:19:49.531464507 +0100
+@@ -51,7 +51,7 @@
+ int recid = -1;
+ pid_t pid = -1;
+ int sub_id = 234; /* just an extra field, that we can use */
+- struct siginfo si;
++ siginfo_t si;
+ union sigval val;
+ int ret;
+ char *flag;
diff --git a/evlog-ksyms2.4.patch b/evlog-ksyms2.4.patch
deleted file mode 100644
index 14e3046..0000000
--- a/evlog-ksyms2.4.patch
+++ /dev/null
@@ -1,89 +0,0 @@
---- evlog-1.6.0/user/cmd/evlogd/ksym_mod.c.orig 2003-06-12 01:03:37.000000000 +0200
-+++ evlog-1.6.0/user/cmd/evlogd/ksym_mod.c 2004-02-25 22:50:06.066152656 +0100
-@@ -94,9 +94,9 @@
- #include <asm/atomic.h>
- #if !defined(__GLIBC__)
- #include <linux/time.h>
--#include <linux/module.h>
-+#include "linux_module.h"
- #else /* __GLIBC__ */
--#include <linux/module.h>
-+#include "linux_module.h"
- extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
- extern int get_kernel_syms __P ((struct kernel_sym *__table));
- #endif /* __GLIBC__ */
---- evlog-1.6.0/user/cmd/evlogd/linux_module.h.orig 1970-01-01 01:00:00.000000000 +0100
-+++ evlog-1.6.0/user/cmd/evlogd/linux_module.h 2004-02-25 22:53:20.042663744 +0100
-@@ -0,0 +1,72 @@
-+/* cut-down <linux/module.h> from 2.4.21 */
-+
-+/*
-+ * Dynamic loading of modules into the kernel.
-+ *
-+ * Rewritten by Richard Henderson <rth at tamu.edu> Dec 1996
-+ */
-+
-+#ifndef _LINUX_MODULE_H
-+#define _LINUX_MODULE_H
-+
-+/* Used by get_kernel_syms, which is obsolete. */
-+struct kernel_sym
-+{
-+ unsigned long value;
-+ char name[60]; /* should have been 64-sizeof(long); oh well */
-+};
-+
-+struct module
-+{
-+ unsigned long size_of_struct; /* == sizeof(module) */
-+ struct module *next;
-+ const char *name;
-+ unsigned long size;
-+
-+ union
-+ {
-+ atomic_t usecount;
-+ long pad;
-+ } uc; /* Needs to keep its size - so says rth */
-+
-+ unsigned long flags; /* AUTOCLEAN et al */
-+
-+ unsigned nsyms;
-+ unsigned ndeps;
-+
-+ struct module_symbol *syms;
-+ struct module_ref *deps;
-+ struct module_ref *refs;
-+ int (*init)(void);
-+ void (*cleanup)(void);
-+ const struct exception_table_entry *ex_table_start;
-+ const struct exception_table_entry *ex_table_end;
-+#ifdef __alpha__
-+ unsigned long gp;
-+#endif
-+ /* Members past this point are extensions to the basic
-+ module support and are optional. Use mod_member_present()
-+ to examine them. */
-+ const struct module_persist *persist_start;
-+ const struct module_persist *persist_end;
-+ int (*can_unload)(void);
-+ int runsize; /* In modutils, not currently used */
-+ const char *kallsyms_start; /* All symbols for kernel debugging */
-+ const char *kallsyms_end;
-+ const char *archdata_start; /* arch specific data for module */
-+ const char *archdata_end;
-+ const char *kernel_data; /* Reserved for kernel internal use */
-+};
-+
-+struct module_info
-+{
-+ unsigned long addr;
-+ unsigned long size;
-+ unsigned long flags;
-+ long usecount;
-+};
-+
-+/* Values for query_module's which. */
-+#define QM_INFO 5
-+
-+#endif /* _LINUX_MODULE_H */
diff --git a/evlog-link.patch b/evlog-link.patch
new file mode 100644
index 0000000..5ec587f
--- /dev/null
+++ b/evlog-link.patch
@@ -0,0 +1,11 @@
+--- evlog-1.6.1/configure.ac.orig 2013-03-23 14:21:49.252517027 +0100
++++ evlog-1.6.1/configure.ac 2013-03-23 14:25:21.132508160 +0100
+@@ -25,8 +25,6 @@
+
+ # FIXME: Replace `main' with a function in `-ldl':
+ AC_CHECK_LIB([dl], [dlopen])
+-# FIXME: Replace `main' with a function in `-lnsl':
+-AC_CHECK_LIB([nsl], [yp_bind])
+ # FIXME: Replace `main' with a function in `-lpthread':
+ AC_CHECK_LIB([pthread], [pthread_join])
+ # FIXME: Replace `main' with a function in `-lz':
diff --git a/evlog-linux.patch b/evlog-linux.patch
new file mode 100644
index 0000000..8a8fb3a
--- /dev/null
+++ b/evlog-linux.patch
@@ -0,0 +1,19 @@
+--- evlog-1.6.1/user/cmd/evlogd/ksym_mod.c.orig 2004-03-16 22:26:24.000000000 +0100
++++ evlog-1.6.1/user/cmd/evlogd/ksym_mod.c 2013-03-23 20:38:50.964901279 +0100
+@@ -91,7 +91,6 @@
+ #include <errno.h>
+ #include <sys/fcntl.h>
+ #include <sys/stat.h>
+-#include <asm/atomic.h>
+ #include <stdarg.h>
+ #include <paths.h>
+
+@@ -114,7 +113,7 @@
+
+ union
+ {
+- atomic_t usecount;
++ struct { int counter; } usecount;
+ long pad;
+ } uc; /* Needs to keep its size - so says rth */
+
diff --git a/evlog-nptl.patch b/evlog-nptl.patch
new file mode 100644
index 0000000..55d02b5
--- /dev/null
+++ b/evlog-nptl.patch
@@ -0,0 +1,22 @@
+--- evlog-1.6.1/user/lib/test/threadTest.c.orig 2002-03-25 22:19:05.000000000 +0100
++++ evlog-1.6.1/user/lib/test/threadTest.c 2013-03-23 14:18:54.202524117 +0100
+@@ -33,7 +33,7 @@
+ *
+ */
+
+-#define MAX_THREADS (PTHREAD_THREADS_MAX-2)
++#define MAX_THREADS (sysconf(_SC_THREAD_THREADS_MAX)-2)
+
+ struct workerStats {
+ pthread_t tid;
+--- evlog-1.6.1/user/lib/test/threadTest2.c.orig 2003-03-17 22:47:17.000000000 +0100
++++ evlog-1.6.1/user/lib/test/threadTest2.c 2013-03-23 14:21:27.025851293 +0100
+@@ -24,7 +24,7 @@
+ * (which in turn calls posix_log_vprintf).
+ */
+
+-#define MAX_THREADS (PTHREAD_THREADS_MAX-2)
++#define MAX_THREADS (sysconf(_SC_THREAD_THREADS_MAX)-2)
+
+ struct workerStats {
+ pthread_t tid;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/evlog.git/commitdiff/4d3896baad04061d03c36919c578c52b9e4b2ca9
More information about the pld-cvs-commit
mailing list