From b2a203f32662928a5daf34af4420ea03ddf0c4e2 Mon Sep 17 00:00:00 2001 From: shaun Date: Mon, 11 Dec 2006 01:00:20 +0000 Subject: Fix bug in symlinked log file handling. PR: ports/104919 Submitted by: David Wood Obtained from: http://cronolog.org/patches/cronolog-missing-symlink-patch.txt --- sysutils/cronolog/Makefile | 12 +++++++----- sysutils/cronolog/files/extrapatch-src_cronoutils.c | 11 +++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 sysutils/cronolog/files/extrapatch-src_cronoutils.c (limited to 'sysutils') diff --git a/sysutils/cronolog/Makefile b/sysutils/cronolog/Makefile index 6700d0b50782..69db330a5ac6 100644 --- a/sysutils/cronolog/Makefile +++ b/sysutils/cronolog/Makefile @@ -7,7 +7,7 @@ PORTNAME= cronolog PORTVERSION= 1.6.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= http://cronolog.org/download/ @@ -21,18 +21,20 @@ GNU_CONFIGURE= yes OPTIONS= SETUID_PATCH "Build with setuid functionality" On +EXTRA_PATCHES= ${FILESDIR}/extrapatch-src_cronoutils.c +PATCH_STRIP= -p1 + .include .if !defined(WITHOUT_SETUID_PATCH) -MASTER_SITES+= http://cronolog.org/patches/:patches +MASTER_SITES+= http://cronolog.org/patches/:patches DISTFILES= ${DISTNAME}${EXTRACT_SUFX} cronolog-setugid-patch.txt:patches EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} -EXTRA_PATCHES= ${WRKDIR}/cronolog-setugid-patch.txt -PATCH_WRKSRC= ${WRKDIR} +EXTRA_PATCHES+= ${WRKDIR}/cronolog-setugid-patch.txt USE_DOS2UNIX= ../cronolog-setugid-patch.txt post-extract: - ${CP} ${DISTDIR}/cronolog-setugid-patch.txt ${WRKDIR}/ + @${CP} ${DISTDIR}/cronolog-setugid-patch.txt ${WRKDIR}/ .endif .include diff --git a/sysutils/cronolog/files/extrapatch-src_cronoutils.c b/sysutils/cronolog/files/extrapatch-src_cronoutils.c new file mode 100644 index 000000000000..ec02a8ae8566 --- /dev/null +++ b/sysutils/cronolog/files/extrapatch-src_cronoutils.c @@ -0,0 +1,11 @@ +--- cronolog-1.6.2/src/cronoutils.c.orig Thu May 3 17:43:21 2001 ++++ cronolog-1.6.2/src/cronoutils.c Mon Dec 11 00:48:23 2006 +@@ -199,7 +199,7 @@ + { + unlink(prevlinkname); + } +- if (stat(linkname, &stat_buf) == 0) ++ if (lstat(linkname, &stat_buf) == 0) + { + if (prevlinkname) { + rename(linkname, prevlinkname); -- cgit