ports/140045: [patch] sysutils/zfs-snapshot-mgmt: respect ${PREFIX} and ${LOCALBASE}

Anonymous swell.k at gmail.com
Wed Oct 28 12:00:14 UTC 2009


>Number:         140045
>Category:       ports
>Synopsis:       [patch] sysutils/zfs-snapshot-mgmt: respect ${PREFIX} and ${LOCALBASE}
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 28 12:00:08 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Anonymous
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD 9.0-CURRENT #0 198464M: Sun Oct 25 10:34:20 UTC 2009     holo at raphael.local:/a/objdir/a/dirty_build/sys/PHOENIX  amd64
>Description:
The port assumes that LOCALBASE is /usr/local:
- it'll not find ruby installed under different LOCALBASE
- it'll not find config file installed under different PREFIX
>How-To-Repeat:
>Fix:
--- respect_PREFIX_and_LOCALBASE.diff begins here ---
Index: sysutils/zfs-snapshot-mgmt/Makefile
===================================================================
RCS file: /a/.cvsup/ports/sysutils/zfs-snapshot-mgmt/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- sysutils/zfs-snapshot-mgmt/Makefile	31 Jul 2009 17:47:57 -0000	1.3
+++ sysutils/zfs-snapshot-mgmt/Makefile	28 Oct 2009 11:39:36 -0000
@@ -22,6 +22,12 @@ MAN8=		zfs-snapshot-mgmt.8
 SUB_FILES=	pkg-message
 PKGMESSAGE=	${WRKDIR}/pkg-message
 
+post-patch:	.SILENT
+	${FIND} ${WRKSRC} -type f -exec ${REINPLACE_CMD} \
+		-e 's|/usr/local|${PREFIX}|g' \
+		-e 's|${PREFIX}\(/bin/ruby\)|${LOCALBASE}\1|g' \
+		{} +
+
 do-install:
 	@${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
 	@${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.8 ${MANPREFIX}/man/man8
Index: sysutils/zfs-snapshot-mgmt/files/pkg-message.in
===================================================================
RCS file: /a/.cvsup/ports/sysutils/zfs-snapshot-mgmt/files/pkg-message.in,v
retrieving revision 1.1
diff -u -p -r1.1 pkg-message.in
--- sysutils/zfs-snapshot-mgmt/files/pkg-message.in	16 Jul 2008 21:30:30 -0000	1.1
+++ sysutils/zfs-snapshot-mgmt/files/pkg-message.in	28 Oct 2009 11:22:34 -0000
@@ -3,7 +3,7 @@ To actually turn on the automatic snapsh
 
 1. Add an appropriate crontab entry, e.g.:
 
-    echo "*/5 * * * *	root   /usr/local/bin/zfs-snapshot-mgmt" >> /etc/crontab
+    echo "*/5 * * * *	root   %%PREFIX%%/bin/zfs-snapshot-mgmt" >> /etc/crontab
 
 See zfs-snapshot-mgmt(8) manpage for more details.
 
--- respect_PREFIX_and_LOCALBASE.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list