ports/50915: [MAINTAINER] security/logcheck: do not overwrite existing config

Sergei Kolobov sergei at kolobov.com
Sun Apr 13 21:50:14 UTC 2003


>Number:         50915
>Category:       ports
>Synopsis:       [MAINTAINER] security/logcheck: do not overwrite existing config
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 13 14:50:12 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Sergei Kolobov
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD elf.chetwood.ru 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Sun Apr 13 01:13:44 MSD 2003
>Description:
- Do not overwrite the existing config files when installing as a port or 
  as a package
- Bump PORTREVISION

Reported by:	Forrest Aldrich <forrie at forrie.com>
>How-To-Repeat:
>Fix:
--- logcheck-1.1.1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/security/logcheck/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- Makefile	2003/04/09 05:41:27	1.14
+++ Makefile	2003/04/13 21:44:07
@@ -7,7 +7,7 @@
 
 PORTNAME=	logcheck
 PORTVERSION=	1.1.1
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	security
 MASTER_SITES=	ftp://sensimilia.eu.org/pub/software/sys/ \
 		http://www.ukc.mirror.ac.uk/sites/ftp.freebsd.org/pub/FreeBSD/ports/distfiles/ \
@@ -42,14 +42,16 @@
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/src/logtail ${PREFIX}/bin
 	${INSTALL_SCRIPT} ${WRKSRC}/systems/freebsd/logcheck.sh ${PREFIX}/etc
-	${MKDIR} ${EXAMPLESDIR}
-	cd ${WRKSRC}/systems/freebsd && \
-		${INSTALL_DATA} ${CONFIG_FILES} ${EXAMPLESDIR} && \
-		${INSTALL_DATA} ${CONFIG_FILES} ${PREFIX}/etc
+	@${MKDIR} ${EXAMPLESDIR}
+.for file in ${CONFIG_FILES}
+	@${INSTALL_DATA} ${WRKSRC}/systems/freebsd/${file} ${EXAMPLESDIR}
+	@${TEST} -f ${PREFIX}/etc/${file} || \
+	  ${INSTALL_DATA} ${WRKSRC}/systems/freebsd/${file} ${PREFIX}/etc
+.endfor
 	${TEST} -d ${LOGCHECK_TMP} || ${MKDIR} -m 700 ${LOGCHECK_TMP}
 	${CHOWN} root:wheel ${LOGCHECK_TMP}
 .if !defined(NOPORTDOCS)
-	${MKDIR} ${DOCSDIR}
+	@${MKDIR} ${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
 .endif
 
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/security/logcheck/pkg-plist,v
retrieving revision 1.5
diff -u -r1.5 pkg-plist
--- pkg-plist	2003/04/09 05:41:27	1.5
+++ pkg-plist	2003/04/13 21:44:07
@@ -1,13 +1,17 @@
 bin/logtail
 etc/logcheck.sh
-etc/logcheck.hacking
-etc/logcheck.ignore
-etc/logcheck.violations
-etc/logcheck.violations.ignore
 %%EXAMPLESDIR%%/logcheck.hacking
+ at exec test -f %D/etc/%f || cp %D/%f %D/etc
+ at unexec cmp -s %D/etc/%f %D/%F && rm %D/etc/%f
 %%EXAMPLESDIR%%/logcheck.ignore
+ at exec test -f %D/etc/%f || cp %D/%f %D/etc
+ at unexec cmp -s %D/etc/%f %D/%F && rm %D/etc/%f
 %%EXAMPLESDIR%%/logcheck.violations.ignore
+ at exec test -f %D/etc/%f || cp %D/%f %D/etc
+ at unexec cmp -s %D/etc/%f %D/%F && rm %D/etc/%f
 %%EXAMPLESDIR%%/logcheck.violations
+ at exec test -f %D/etc/%f || cp %D/%f %D/etc
+ at unexec cmp -s %D/etc/%f %D/%F && rm %D/etc/%f
 @dirrm %%EXAMPLESDIR%%
 %%PORTDOCS%%%%DOCSDIR%%/CREDITS
 %%PORTDOCS%%%%DOCSDIR%%/INSTALL
--- logcheck-1.1.1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list