Bug 174769 - emulators/vboxtool make PREFIX safe
Summary: emulators/vboxtool make PREFIX safe
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pawel Pekala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-28 15:00 UTC by Pawel Pekala
Modified: 2013-01-16 19:50 UTC (History)
0 users

See Also:


Attachments
file.diff (4.29 KB, patch)
2012-12-28 15:00 UTC, Pawel Pekala
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Pekala freebsd_committer freebsd_triage 2012-12-28 15:00:00 UTC
This patch makes sure port is working properly when installed to
PREFIX != /usr/local. Also make it more clever about finding bash
by using env(1) utility. Changes are simple so I thought it's
better to use REINPLACE_CMD and save few inodes in process.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-12-28 15:00:08 UTC
Maintainer of emulators/vboxtool,

Please note that PR ports/174769 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/174769

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-12-28 15:00:09 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Pawel Pekala freebsd_committer freebsd_triage 2012-12-28 15:36:40 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pawel

Mine
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-01-16 19:45:24 UTC
Author: pawel
Date: Wed Jan 16 19:45:12 2013
New Revision: 310520
URL: http://svnweb.freebsd.org/changeset/ports/310520

Log:
  - Make port PREFIX-safe (don't hardcode paths with /usr/local)
  - Use REINPLACE_CMD to save few inodes
  
  PR:		ports/174769
  Submitted by:	myself
  Approved by:	maintainer timeout (2 weeks+)

Deleted:
  head/emulators/vboxtool/files/patch-script-vboxtool
  head/emulators/vboxtool/files/patch-script-vboxtoolinit
Modified:
  head/emulators/vboxtool/Makefile

Modified: head/emulators/vboxtool/Makefile
==============================================================================
--- head/emulators/vboxtool/Makefile	Wed Jan 16 19:38:54 2013	(r310519)
+++ head/emulators/vboxtool/Makefile	Wed Jan 16 19:45:12 2013	(r310520)
@@ -1,12 +1,9 @@
-# New ports collection makefile for:	oneko
-# Date created:        14 December 2012
-# Whom:                pjm
-#
+# Created by: pjm
 # $FreeBSD$
-#
 
 PORTNAME=	vboxtool
 PORTVERSION=	0.5
+PORTREVISION=	1
 CATEGORIES=	emulators
 MASTER_SITES=	SF
 
@@ -27,6 +24,12 @@ USE_ZIP=	yes
 
 SAMPLESDIR=	${PREFIX}/share/${PORTNAME}
 
+post-patch:
+	@${REINPLACE_CMD} -e 's|!/bin/bash|!/usr/bin/env bash|' \
+		-e 's|/etc/|${PREFIX}&|g' \
+		${WRKSRC}/script/vboxtool \
+		${WRKSRC}/script/vboxtoolinit
+
 do-install:
 	@if  [ ! -f ${PREFIX}/etc/${PORTNAME} ]; then \
 		${MKDIR}  	${PREFIX}/etc/${PORTNAME};\
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Pawel Pekala freebsd_committer freebsd_triage 2013-01-16 19:47:00 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!