On [08/04/18] [10:30P], Stuart Henderson wrote:
CVSROOT: /cvs
Module name: ports
Changes by: st...@cvs.openbsd.org 2018/04/08 04:30:32
Modified files:
sysutils/apachetop: Makefile
Added files:
sysutils/apachetop/patches: patch-src_apachetop_cc
patch-src_display_cc
patch-src_hits_circle_cc
patch-src_log_cc
Log message:
add clang6 patches from Matthew Martin
update homepage while there, someone should look at updating this,
the newest release (2017-04) includes a buffer overflow fix
Yes, I was working on that.
Moving to git, and update to the last version with the clang6 fix.
Diff attached.
OK? Comments?
Cheers.-
--
Sending from my toaster.
Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/apachetop/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- Makefile 8 Apr 2018 10:30:32 -0000 1.11
+++ Makefile 9 Apr 2018 10:13:05 -0000
@@ -2,8 +2,9 @@
COMMENT = top-like monitor for Apache
-DISTNAME = apachetop-0.12.6
-REVISION = 3
+GH_ACCOUNT = tessus
+GH_PROJECT = apachetop
+GH_TAGNAME = 0.17.4
CATEGORIES = sysutils
MAINTAINER = Gonzalo L. R. <gonz...@openbsd.org>
@@ -15,12 +16,16 @@ PERMIT_PACKAGE_CDROM= Yes
MASTER_SITES = http://www.webta.org/apachetop/
-CONFIGURE_STYLE = autoconf
-AUTOCONF_VERSION = 2.59
+CONFIGURE_STYLE = autoconf automake
+AUTOCONF_VERSION = 2.65
+AUTOMAKE_VERSION = 1.15
-CONFIGURE_ARGS = --disable-fam \
- --with-logfile=/var/www/logs/access_log
+CONFIGURE_ARGS = --with-logfile=/var/www/logs/access_log
-WANTLIB += c m ncurses readline ${COMPILER_LIBCXX}
+WANTLIB += c m curses readline ${COMPILER_LIBCXX}
+
+post-patch:
+ cd ${WRKSRC} && ${SETENV} AUTOCONF_VERSION=${AUTOCONF_VERSION} \
+ AUTOMAKE_VERSION=${AUTOMAKE_VERSION} ./autogen.sh
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/sysutils/apachetop/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo 18 Jan 2015 03:15:09 -0000 1.2
+++ distinfo 9 Apr 2018 10:13:05 -0000
@@ -1,2 +1,2 @@
-SHA256 (apachetop-0.12.6.tar.gz) = hQBiQUUXBV6rJEC3iLUD1F6+mykNSy4Cel+IetcPPyk=
-SIZE (apachetop-0.12.6.tar.gz) = 126930
+SHA256 (apachetop-0.17.4.tar.gz) = iS7TuDtF6ziBHnTQaAibHow0cHeH8kDOEz2MkxmNf/A=
+SIZE (apachetop-0.17.4.tar.gz) = 42729
Index: patches/patch-src_log_cc
===================================================================
RCS file: /cvs/ports/sysutils/apachetop/patches/patch-src_log_cc,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_log_cc
--- patches/patch-src_log_cc 8 Apr 2018 10:30:32 -0000 1.1
+++ patches/patch-src_log_cc 9 Apr 2018 10:13:05 -0000
@@ -6,13 +6,13 @@ Index: src/log.cc
@@ -37,7 +37,7 @@ int CommonLogParser::parse(char *logline, struct logbi
if (!bufcp)
return -1;
-
+
- *bufcp = (char) NULL;
+ *bufcp = '\0';
++bufcp;
/* quickly figure out if this is an IP or a host. We do this by
-@@ -172,7 +172,7 @@ int CommonLogParser::parse(char *logline, struct logbi
+@@ -176,7 +176,7 @@ int CommonLogParser::parse(char *logline, struct logbi
/* find the end of referrer and null it */
if (!(bufcp = strchr(bufsp, '"')))
return -1;
@@ -21,7 +21,7 @@ Index: src/log.cc
/* unless they want to keep it, skip over the protocol, ie http:// */
if ((cf.preserve_ref_protocol == 0) && (bufcp = strstr(bufsp, "://")))
-@@ -230,7 +230,7 @@ char *LogParser::processURL(char **buf) /* {{{ */
+@@ -234,7 +234,7 @@ char *LogParser::processURL(char **buf) /* {{{ */
return NULL;
/* null the space in front of it */
@@ -30,7 +30,7 @@ Index: src/log.cc
/* TODO maybe we can use the protocol someday.. */
-@@ -258,7 +258,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
+@@ -262,7 +262,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
char *bufcp, *endptr, *workptr;
endptr = *url + *length;
@@ -39,7 +39,7 @@ Index: src/log.cc
/* do we want to keep the query string? */
if (!cf.keep_querystring)
-@@ -273,7 +273,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
+@@ -277,7 +277,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
if (workptr < endptr)
{
/* we're ok */
@@ -48,7 +48,7 @@ Index: src/log.cc
bufcp = workptr+1;
}
}
-@@ -308,7 +308,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
+@@ -312,7 +312,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
if (workptr == endptr)
bufcp = workptr;
}