Bug 60703 - apachetop looks for logfiles in unusual place
Summary: apachetop looks for logfiles in unusual place
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pav Lucistnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-29 20:00 UTC by andreas
Modified: 2003-12-30 00:52 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andreas freebsd_committer freebsd_triage 2003-12-29 20:00:39 UTC
	
	root@titan[ttyp2]{218} ~ apachetop
	opening /var/httpd/apache_log: No such file or directory
	No input files could be opened

Fix: 

The apache ports i.e. /var/db/pkg/apache-1.3.29_1
	per default put their logfiles into
	/var/log
	-rw-r--r--  1 root  wheel  89032 Nov 23 13:16 httpd-access.log
	-rw-r--r--  1 root  wheel  21565 Dec 26 21:56 httpd-error.log

	Apachetop *should* use the default paths of the standard apache
	port. Not local preferences of the author.
How-To-Repeat: 	cd /usr/ports/sysutils/apachetop
	make install clean
	apachetop
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2003-12-29 20:03:58 UTC
State Changed
From-To: open->feedback

Can you provide a patch? Have you discussed this with 
a maintainer? 


Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2003-12-29 20:03:58 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

Watch this.
Comment 3 Sebastian Yepes 2003-12-30 00:37:22 UTC
Adds the Apache default log


Fix.Patch::

//---
diff -urN apachetop.old/Makefile apachetop/Makefile
--- apachetop.old/Makefile	Fri Dec 26 14:21:47 2003
+++ apachetop/Makefile	Tue Dec 30 01:22:36 2003
@@ -7,6 +7,7 @@
 
 PORTNAME=	apachetop
 PORTVERSION=	0.9
+PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	http://clueful.shagged.org/apachetop/files/
 DISTNAME=	${PORTNAME}-${PORTVERSION}
@@ -26,5 +27,9 @@
 		-e 's/--run autoconf$$/--run autoconf257/' \
 		-e 's/--run autoheader$$/--run autoheader257/' \
 		${WRKSRC}/Makefile
+
+post-install:
+	@${ECHO_MSG}
+	@${CAT}	${PKGMESSAGE}
 
 .include <bsd.port.mk>
diff -urN apachetop.old/files/patch-apachetop.h apachetop/files/patch-apachetop.
h
--- apachetop.old/files/patch-apachetop.h	Thu Jan  1 01:00:00 1970
+++ apachetop/files/patch-apachetop.h	Tue Dec 30 01:04:46 2003
@@ -0,0 +1,11 @@
+--- src/apachetop.h.orig	Tue Dec 30 01:03:05 2003
++++ src/apachetop.h	Tue Dec 30 01:03:32 2003
+@@ -190,7 +190,7 @@
+ #define DEBUG_OUTPUT "/tmp/atop.debug"
+ 
+ #ifndef DEFAULT_LOGFILE
+-# define DEFAULT_LOGFILE "/var/httpd/apache_log"
++# define DEFAULT_LOGFILE "/var/log/httpd-access.log"
+ #endif
+ #define DEFAULT_CIRCLE_SIZE 30
+ #define DEFAULT_CIRCLE_MODE TIMED_CIRCLE
diff -urN apachetop.old/pkg-message apachetop/pkg-message
--- apachetop.old/pkg-message	Thu Jan  1 01:00:00 1970
+++ apachetop/pkg-message	Tue Dec 30 01:15:08 2003
@@ -0,0 +1,5 @@
+**************************************************
+NOTE:
+	To Change the default Apache Log File[/var/log/httpd-access.log]
+	Use: apachetop -f /PathTo/New/LogFile
+
---//

----

www:
 http://www.x123.info

Contect:			FingerPrint:
 esn aT x123.info		 0D42 F870 F650 6B86 CA9E
 esn aT freshpkgsrc.org		 E199 A57D 3824 F8AA A934
 sebastian.yepes aT hp.com
*/
Comment 4 Pav Lucistnik freebsd_committer freebsd_triage 2003-12-30 00:52:11 UTC
State Changed
From-To: feedback->closed

Fixed in revision 0.9_1