mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
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
This commit is contained in:
parent
80c95baf7a
commit
fb8e207814
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=179449
2 changed files with 18 additions and 5 deletions
|
@ -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>
|
||||
|
|
11
sysutils/cronolog/files/extrapatch-src_cronoutils.c
Normal file
11
sysutils/cronolog/files/extrapatch-src_cronoutils.c
Normal file
|
@ -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);
|
Loading…
Add table
Reference in a new issue