From nobody@FreeBSD.org  Thu Oct 31 09:17:48 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id C19698F7
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 31 Oct 2013 09:17:48 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 9393B2C1F
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 31 Oct 2013 09:17:48 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r9V9HmGk089917
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 31 Oct 2013 09:17:48 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r9V9HmjA089915;
	Thu, 31 Oct 2013 09:17:48 GMT
	(envelope-from nobody)
Message-Id: <201310310917.r9V9HmjA089915@oldred.freebsd.org>
Date: Thu, 31 Oct 2013 09:17:48 GMT
From: Kimmo Paasiala <kpaasial@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: sysutils/kiconvtool installs an rc(8) script that references the stage directory instead of PREFIX
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         183518
>Category:       ports
>Synopsis:       sysutils/kiconvtool installs an rc(8) script that references the stage directory instead of PREFIX
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    amdmi3
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 31 09:20:01 UTC 2013
>Closed-Date:    Thu Oct 31 19:46:40 UTC 2013
>Last-Modified:  Thu Oct 31 19:50:00 UTC 2013
>Originator:     Kimmo Paasiala
>Release:        FreeBSD 10.0-BETA2 stable/10
>Organization:
>Environment:
FreeBSD freebsd10.rdnzl.info 10.0-BETA2 FreeBSD 10.0-BETA2 #0 r257267: Mon Oct 28 22:42:23 EET 2013     kimmo@freebsd10.rdnzl.info:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
sysutils/kiconvtool install a kiconv.sh rc(8) script that incorrectly uses the stage directory path to the kiconvtool binary instead of the correct ${PREFIX}/sbin/ path.
>How-To-Repeat:
Install sysutils/kiconvtool and inspect the "command" variable in the ${PREFIX}/etc/rc.d/kiconv.sh script, it is set to the ${STAGEDIR}${PREFIX}/sbin instead of the correct ${PREFIX}/sbin.
>Fix:
Apply the attached patch that removes the incorrect PREFIX assignment from the port Makefile and adds support for DESTDIR to the actual Makefile of the software.

Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 332203)
+++ Makefile	(working copy)
@@ -12,8 +12,6 @@
 
 USES=		iconv	# used by libkiconv, actually
 
-MAKE_ARGS=	PREFIX="${STAGEDIR}${PREFIX}"
-
 PLIST_FILES=	sbin/${PORTNAME} etc/rc.d/kiconv \
 		man/man8/${PORTNAME}.8.gz
 
Index: files/patch-Makefile
===================================================================
--- files/patch-Makefile	(revision 0)
+++ files/patch-Makefile	(working copy)
@@ -0,0 +1,17 @@
+--- Makefile	2011-10-01 00:25:12.000000000 +0300
++++ Makefile.new	2013-10-31 10:47:12.000000000 +0200
+@@ -11,10 +11,10 @@
+ all: kiconvtool kiconv.sh
+ 
+ install: kiconvtool kiconv.sh
+-	mkdir -p ${PREFIX}/sbin/ ${PREFIX}/etc/rc.d/ ${PREFIX}/man/man8/
+-	${BSD_INSTALL_PROGRAM} kiconvtool ${PREFIX}/sbin/
+-	${BSD_INSTALL_SCRIPT} kiconv.sh ${PREFIX}/etc/rc.d/kiconv
+-	${BSD_INSTALL_MAN} kiconvtool.8 ${PREFIX}/man/man8/
++	mkdir -p ${DESTDIR}${PREFIX}/sbin/ ${DESTDIR}${PREFIX}/etc/rc.d/ ${DESTDIR}${PREFIX}/man/man8/
++	${BSD_INSTALL_PROGRAM} kiconvtool ${DESTDIR}${PREFIX}/sbin/
++	${BSD_INSTALL_SCRIPT} kiconv.sh ${DESTDIR}${PREFIX}/etc/rc.d/kiconv
++	${BSD_INSTALL_MAN} kiconvtool.8 ${DESTDIR}${PREFIX}/man/man8/
+ 
+ kiconvtool: kiconvtool.c
+ 	${CC} ${CFLAGS} $> ${LIBS} -o $@


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->amdmi3 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Oct 31 09:20:24 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=183518 
State-Changed-From-To: open->closed 
State-Changed-By: amdmi3 
State-Changed-When: Thu Oct 31 19:46:39 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=183518 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/183518: commit references a PR
Date: Thu, 31 Oct 2013 19:46:33 +0000 (UTC)

 Author: amdmi3
 Date: Thu Oct 31 19:46:24 2013
 New Revision: 332281
 URL: http://svnweb.freebsd.org/changeset/ports/332281
 
 Log:
   - Update to 0.97
   - Fix rc.d script
   
   PR:		183518
   Submitted by:	Kimmo Paasiala <kpaasial@gmail.com>
 
 Modified:
   head/sysutils/kiconvtool/Makefile
   head/sysutils/kiconvtool/distinfo
 
 Modified: head/sysutils/kiconvtool/Makefile
 ==============================================================================
 --- head/sysutils/kiconvtool/Makefile	Thu Oct 31 19:45:55 2013	(r332280)
 +++ head/sysutils/kiconvtool/Makefile	Thu Oct 31 19:46:24 2013	(r332281)
 @@ -2,7 +2,7 @@
  # $FreeBSD$
  
  PORTNAME=	kiconvtool
 -PORTVERSION=	0.96
 +PORTVERSION=	0.97
  CATEGORIES=	sysutils
  MASTER_SITES=	http://mirror.amdmi3.ru/distfiles/ \
  		LOCAL/amdmi3
 @@ -12,8 +12,6 @@ COMMENT=	Tool to preload kernel iconv ch
  
  USES=		iconv	# used by libkiconv, actually
  
 -MAKE_ARGS=	PREFIX="${STAGEDIR}${PREFIX}"
 -
  PLIST_FILES=	sbin/${PORTNAME} etc/rc.d/kiconv \
  		man/man8/${PORTNAME}.8.gz
  
 
 Modified: head/sysutils/kiconvtool/distinfo
 ==============================================================================
 --- head/sysutils/kiconvtool/distinfo	Thu Oct 31 19:45:55 2013	(r332280)
 +++ head/sysutils/kiconvtool/distinfo	Thu Oct 31 19:46:24 2013	(r332281)
 @@ -1,2 +1,2 @@
 -SHA256 (kiconvtool-0.96.tar.gz) = 6af936f81f8e3749fc5d0e094c6e7b5df57a95eec1b0df34d63cfd02783d3c64
 -SIZE (kiconvtool-0.96.tar.gz) = 7119
 +SHA256 (kiconvtool-0.97.tar.gz) = 84b5e869bdc9703f39ce252fd59fdee8c54a7aba9063ad1bae7fd1a9f3f7ff70
 +SIZE (kiconvtool-0.97.tar.gz) = 7169
 _______________________________________________
 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"
 
>Unformatted:
