diff options
author | wiz <wiz> | 2015-09-05 22:12:04 +0000 |
---|---|---|
committer | wiz <wiz> | 2015-09-05 22:12:04 +0000 |
commit | ba485930117f1ff3184e0665bb3e9994fef60daf (patch) | |
tree | caddf228fbecc31b44fa38d85f2d7ebf9d2aa4af /sysutils | |
parent | daee940730854488ac86e49fbab9c3f129673d80 (diff) | |
download | pkgsrc-ba485930117f1ff3184e0665bb3e9994fef60daf.tar.gz |
Import lnav-0.7.3 as sysutils/lnav.
An advanced log file viewer for the small-scale. Watch and analyze
your log files from a terminal.
Many logging tools, like Splunk, provide great features but are
optimized for large-scale deployments. They require installing
and configuring servers before they can be effectively used. There
is still a need for a robust log file analyzer for the terminal.
Just point lnav to a directory and it will take care of the rest.
File formats are automatically detected and compressed files are
unpacked on the fly.
Log files are a wealth of information, lnav can help highlight the
parts that are important and filter out the noise.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/lnav/DESCR | 14 | ||||
-rw-r--r-- | sysutils/lnav/Makefile | 24 | ||||
-rw-r--r-- | sysutils/lnav/PLIST | 3 | ||||
-rw-r--r-- | sysutils/lnav/distinfo | 10 | ||||
-rw-r--r-- | sysutils/lnav/patches/patch-src_data__parser.hh | 24 | ||||
-rw-r--r-- | sysutils/lnav/patches/patch-src_grep__proc.cc | 14 | ||||
-rw-r--r-- | sysutils/lnav/patches/patch-src_log__format.hh | 27 | ||||
-rw-r--r-- | sysutils/lnav/patches/patch-src_pretty__printer.hh | 19 | ||||
-rw-r--r-- | sysutils/lnav/patches/patch-src_test__override.c | 15 |
9 files changed, 150 insertions, 0 deletions
diff --git a/sysutils/lnav/DESCR b/sysutils/lnav/DESCR new file mode 100644 index 00000000000..0b9f801eee6 --- /dev/null +++ b/sysutils/lnav/DESCR @@ -0,0 +1,14 @@ +An advanced log file viewer for the small-scale. Watch and analyze +your log files from a terminal. + +Many logging tools, like Splunk, provide great features but are +optimized for large-scale deployments. They require installing +and configuring servers before they can be effectively used. There +is still a need for a robust log file analyzer for the terminal. + +Just point lnav to a directory and it will take care of the rest. +File formats are automatically detected and compressed files are +unpacked on the fly. + +Log files are a wealth of information, lnav can help highlight the +parts that are important and filter out the noise. diff --git a/sysutils/lnav/Makefile b/sysutils/lnav/Makefile new file mode 100644 index 00000000000..5616488bc08 --- /dev/null +++ b/sysutils/lnav/Makefile @@ -0,0 +1,24 @@ +# $NetBSD: Makefile,v 1.1 2015/09/05 22:12:04 wiz Exp $ + +DISTNAME= lnav-0.7.3 +CATEGORIES= textproc +MASTER_SITES= ${MASTER_SITE_GITHUB:=tstack/} +GITHUB_RELEASE= v${PKGVERSION_NOREV} +EXTRACT_SUFX= .tar.bz2 + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://lnav.org/ +COMMENT= Log file navigator, an enhanced log viewer +LICENSE= 2-clause-bsd + +GNU_CONFIGURE= yes +USE_LANGUAGES= c c++ + +.include "../../archivers/bzip2/buildlink3.mk" +.include "../../databases/sqlite3/buildlink3.mk" +.include "../../devel/pcre/buildlink3.mk" +.include "../../devel/readline/buildlink3.mk" +.include "../../devel/zlib/buildlink3.mk" +.include "../../lang/python/application.mk" +.include "../../devel/ncursesw/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/sysutils/lnav/PLIST b/sysutils/lnav/PLIST new file mode 100644 index 00000000000..3aee01bdb78 --- /dev/null +++ b/sysutils/lnav/PLIST @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1 2015/09/05 22:12:04 wiz Exp $ +bin/lnav +man/man1/lnav.1 diff --git a/sysutils/lnav/distinfo b/sysutils/lnav/distinfo new file mode 100644 index 00000000000..f741392fb03 --- /dev/null +++ b/sysutils/lnav/distinfo @@ -0,0 +1,10 @@ +$NetBSD: distinfo,v 1.1 2015/09/05 22:12:04 wiz Exp $ + +SHA1 (lnav-0.7.3.tar.bz2) = 561d440bde7461db7f4dfbfbf3ce47fc58aeccf1 +RMD160 (lnav-0.7.3.tar.bz2) = 8b1795ed44448dd1eb11a51c2a89816ba1634899 +Size (lnav-0.7.3.tar.bz2) = 399142 bytes +SHA1 (patch-src_data__parser.hh) = 0f976ff3df94af045d6d2be53cef964060f507ce +SHA1 (patch-src_grep__proc.cc) = f8d23f8c2abf8d99ae27d71dedd9d76ff4ad4a87 +SHA1 (patch-src_log__format.hh) = 14b081db5e839da23dedac624a571a9cc5dffef8 +SHA1 (patch-src_pretty__printer.hh) = fa28e901539fdddfb69875d39efe6f1c74b83b0d +SHA1 (patch-src_test__override.c) = 67c3fa4785a75eae1bfc8a9ed725276b37eca4ec diff --git a/sysutils/lnav/patches/patch-src_data__parser.hh b/sysutils/lnav/patches/patch-src_data__parser.hh new file mode 100644 index 00000000000..14aa208ee5e --- /dev/null +++ b/sysutils/lnav/patches/patch-src_data__parser.hh @@ -0,0 +1,24 @@ +$NetBSD: patch-src_data__parser.hh,v 1.1 2015/09/05 22:12:04 wiz Exp $ + +Remove unused variables. + +--- src/data_parser.hh.orig 2015-03-31 13:30:23.000000000 +0000 ++++ src/data_parser.hh +@@ -437,8 +437,6 @@ private: + } + + if (iter->e_token == this->dp_format->df_terminator) { +- std::vector<element> key_copy; +- + value.SPLICE(value.end(), + key_comps, + key_comps.begin(), +@@ -480,8 +478,6 @@ private: + } + else if (key_iter->e_token == + this->dp_format->df_terminator) { +- std::vector<element> key_copy; +- + value.SPLICE(value.end(), + key_comps, + key_comps.begin(), diff --git a/sysutils/lnav/patches/patch-src_grep__proc.cc b/sysutils/lnav/patches/patch-src_grep__proc.cc new file mode 100644 index 00000000000..a6e7bb674d4 --- /dev/null +++ b/sysutils/lnav/patches/patch-src_grep__proc.cc @@ -0,0 +1,14 @@ +$NetBSD: patch-src_grep__proc.cc,v 1.1 2015/09/05 22:12:04 wiz Exp $ + +stdout is not an lvalue, and if it was, this looks idempotent. + +--- src/grep_proc.cc.orig 2015-04-09 03:40:09.000000000 +0000 ++++ src/grep_proc.cc +@@ -159,7 +159,6 @@ void grep_proc::child_loop(void) + char outbuf[BUFSIZ * 2]; + string line_value; + +- stdout = fdopen(STDOUT_FILENO, "w"); + /* Make sure buffering is on, not sure of the state in the parent. */ + if (setvbuf(stdout, outbuf, _IOFBF, BUFSIZ * 2) < 0) { + perror("setvbuf"); diff --git a/sysutils/lnav/patches/patch-src_log__format.hh b/sysutils/lnav/patches/patch-src_log__format.hh new file mode 100644 index 00000000000..ff9422aa06e --- /dev/null +++ b/sysutils/lnav/patches/patch-src_log__format.hh @@ -0,0 +1,27 @@ +$NetBSD: patch-src_log__format.hh,v 1.1 2015/09/05 22:12:04 wiz Exp $ + +To avoid this error on NetBSD: +In file included from logfile.hh:47:0, + from logfile.cc:47: +log_format.hh: In member function 'const string logline_value::to_string() const': +log_format.hh:411:50: error: expected ')' before 'PRId64' + snprintf(buffer, sizeof(buffer), "%" PRId64, this->lv_number.i); + ^ +log_format.hh:411:75: warning: spurious trailing '%' in format [-Wformat=] + snprintf(buffer, sizeof(buffer), "%" PRId64, this->lv_number.i); + ^ +log_format.hh:411:75: warning: too many arguments for format [-Wformat-extra-args] +log_format.hh:411:75: warning: spurious trailing '%' in format [-Wformat=] +log_format.hh:411:75: warning: too many arguments for format [-Wformat-extra-args] + +--- src/log_format.hh.orig 2015-04-11 05:56:05.000000000 +0000 ++++ src/log_format.hh +@@ -408,7 +408,7 @@ public: + } + + case VALUE_INTEGER: +- snprintf(buffer, sizeof(buffer), "%" PRId64, this->lv_number.i); ++ snprintf(buffer, sizeof(buffer), "%ld", this->lv_number.i); + break; + + case VALUE_FLOAT: diff --git a/sysutils/lnav/patches/patch-src_pretty__printer.hh b/sysutils/lnav/patches/patch-src_pretty__printer.hh new file mode 100644 index 00000000000..6d9d8cd68ce --- /dev/null +++ b/sysutils/lnav/patches/patch-src_pretty__printer.hh @@ -0,0 +1,19 @@ +$NetBSD: patch-src_pretty__printer.hh,v 1.1 2015/09/05 22:12:04 wiz Exp $ + +Avoid name conflict with included header. + +--- src/pretty_printer.hh.orig 2015-04-11 02:51:00.000000000 +0000 ++++ src/pretty_printer.hh +@@ -171,10 +171,10 @@ private: + + void ascend() { + if (this->pp_depth > 0) { +- int lines = this->pp_body_lines.top(); ++ int clines = this->pp_body_lines.top(); + this->pp_depth -= 1; + this->pp_body_lines.pop(); +- this->pp_body_lines.top() += lines; ++ this->pp_body_lines.top() += clines; + } + else { + this->pp_body_lines.top() = 0; diff --git a/sysutils/lnav/patches/patch-src_test__override.c b/sysutils/lnav/patches/patch-src_test__override.c new file mode 100644 index 00000000000..44b7715c842 --- /dev/null +++ b/sysutils/lnav/patches/patch-src_test__override.c @@ -0,0 +1,15 @@ +$NetBSD: patch-src_test__override.c,v 1.1 2015/09/05 22:12:04 wiz Exp $ + +Match NetBSD version of gettimeofday(). + +--- src/test_override.c.orig 2015-04-04 10:42:12.000000000 +0000 ++++ src/test_override.c +@@ -47,7 +47,7 @@ time_t time(time_t *loc) + return retval; + } + +-int gettimeofday(struct timeval *tv, struct timezone *tz) ++int gettimeofday(struct timeval *tv, void *tz) + { + tv->tv_sec = 1370546000; + tv->tv_usec = 123456; |