aboutsummaryrefslogtreecommitdiff
path: root/sysutils/cronolog
diff options
context:
space:
mode:
authorShaun Amott <shaun@FreeBSD.org>2006-12-11 01:00:20 +0000
committerShaun Amott <shaun@FreeBSD.org>2006-12-11 01:00:20 +0000
commitfb8e207814bc9e58a322215087c284950b18a141 (patch)
tree14515e5356e576af6695719e24db770f36685b97 /sysutils/cronolog
parent80c95baf7acff109ae59ffc8415d3a775d18010f (diff)
downloadports-fb8e207814bc9e58a322215087c284950b18a141.tar.gz
ports-fb8e207814bc9e58a322215087c284950b18a141.zip
Fix bug in symlinked log file handling.
PR: ports/104919 Submitted by: David Wood <david@wood2.org.uk> Obtained from: http://cronolog.org/patches/cronolog-missing-symlink-patch.txt
Notes
Notes: svn path=/head/; revision=179449
Diffstat (limited to 'sysutils/cronolog')
-rw-r--r--sysutils/cronolog/Makefile12
-rw-r--r--sysutils/cronolog/files/extrapatch-src_cronoutils.c11
2 files changed, 18 insertions, 5 deletions
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 <bsd.port.pre.mk>
.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 <bsd.port.post.mk>
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);