From utisoft@hotmail.com  Thu Jun  2 20:20:54 2011
Return-Path: <utisoft@hotmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 793731065674
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  2 Jun 2011 20:20:54 +0000 (UTC)
	(envelope-from utisoft@hotmail.com)
Received: from blu0-omc1-s29.blu0.hotmail.com (blu0-omc1-s29.blu0.hotmail.com [65.55.116.40])
	by mx1.freebsd.org (Postfix) with ESMTP id 2FB858FC0C
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  2 Jun 2011 20:20:53 +0000 (UTC)
Received: from BLU0-SMTP176 ([65.55.116.8]) by blu0-omc1-s29.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675);
	 Thu, 2 Jun 2011 13:20:53 -0700
Received: from zeus.bayofrum.net ([90.221.7.100]) by BLU0-SMTP176.phx.gbl over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675);
	 Thu, 2 Jun 2011 13:20:51 -0700
Received: from zeus.bayofrum.net (crees@localhost [127.0.0.1])
	by zeus.bayofrum.net (8.14.4/8.14.4) with ESMTP id p52KBtrX072422
	(version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 2 Jun 2011 21:11:56 +0100 (BST)
	(envelope-from crees@zeus.bayofrum.net)
Received: (from crees@localhost)
	by zeus.bayofrum.net (8.14.4/8.14.4/Submit) id p52KBt01072421;
	Thu, 2 Jun 2011 21:11:55 +0100 (BST)
	(envelope-from crees)
Message-Id: <BLU0-SMTP17654B806D66A92AEB49E7CA97C0@phx.gbl>
Date: Thu, 2 Jun 2011 21:11:55 +0100
From: Chris Rees <utisoft@gmail.com>
Sender: <utisoft@hotmail.com>
Reply-To: Chris Rees <utisoft@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] Fix port: japanese/Wnn6 should use USERS=
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         157542
>Category:       ports
>Synopsis:       [PATCH] Fix port: japanese/Wnn6 should use USERS=
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    crees
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 02 20:30:09 UTC 2011
>Closed-Date:    Sat Jul 09 11:03:52 UTC 2011
>Last-Modified:  Sat Jul  9 11:10:10 UTC 2011
>Originator:     Chris Rees
>Release:        FreeBSD 8.2-RELEASE-p1 i386
>Organization:
bayofrum
>Environment:
System: FreeBSD zeus.bayofrum.net 8.2-RELEASE-p1 FreeBSD 8.2-RELEASE-p1 #0: Sat Apr 30 15:09:06 BST 2011 root@zeus.bayofrum.net:/usr/obj/usr/src/sys/ZEUS i386


	
>Description:
	

	This port uses pkg-install to create new users instead of using USERS=.
>How-To-Repeat:
	
>Fix:


	- Use USERS and GROUPS
	- Use pre-su-install for part needing root

	Submitted by: Chris Rees (utisoft@gmail.com)

	Unfortunately I can't test this fix due to the nature of the port... Is there anyone who could test it?


--- japanese-Wnn6.patch begins here ---
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/japanese/Wnn6/Makefile,v
retrieving revision 1.34
diff -u -r1.34 Makefile
--- Makefile	3 Sep 2006 01:33:30 -0000	1.34
+++ Makefile	2 Jun 2011 20:08:22 -0000
@@ -21,6 +21,8 @@
 MOUNT_PT?=	/cdrom
 MOUNT_DEV?=	/dev/acd0c
 
+USERS=		wnn
+
 RESTRICTED=	"You should buy from Omron Software Co., Ltd."
 NO_BUILD=	yes
 IS_INTERACTIVE=	yes
@@ -81,7 +83,7 @@
 post-extract:
 	@/sbin/umount ${MOUNT_PT}
 
-pre-install:
+pre-su-install:
 	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
 
 do-install:
Index: pkg-install
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/japanese/Wnn6/pkg-install,v
retrieving revision 1.7
diff -u -r1.7 pkg-install
--- pkg-install	23 Feb 2003 16:25:49 -0000	1.7
+++ pkg-install	2 Jun 2011 20:07:35 -0000
@@ -81,75 +81,6 @@
 	fi
     fi
 
-    ## Hack /etc/master.passwd ##
-    # check
-    id_69=`id -u 69 2> /dev/null`
-    id_wnn=`id -u wnn 2> /dev/null`
-    if [ X"$id_wnn" = X69 ];then
-	exit 0
-    elif [ X"$id_69" != X ]; then
-cat <<EOF
-
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-This system already has an account whose name is not 'wnn' and ID
-number is 69.
-
-   '`id 69`'
-
-For Wnn6 in this port or package, ID number of 'wnn' has to be 69.
-Please try again after you delete the account.
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-EOF
-	exit 1
-    elif [ X"$id_wnn" != X ]; then
-	cat <<EOF
-
-This system has an 'wnn' account whose ID number is $id_wnn.  It seems
-that Wnn4.2 has been already installed.  For Wnn6 in this ports or
-package, ID number of 'wnn' has to be 69.  So we do the following two
-things:
-
-1) You should delete the account.
-
-2) It seems that all of files or directories for Wnn4.2 are in
-    ${PKG_PREFIX}/lib/wnn and ${PKG_PREFIX}/bin.  You should change these ID
-    number from '$id_wnn' to '69'.
-
-    Notice: After doing 1) and 2), we will create a new 'wnn' account
-	    whose ID number is '69'.
-
-EOF
-	if yesno "Would you like to do the above things automatically" y; then
-	    # We need a command 'pw(8)'
-	    check_pw
-	    pw userdel wnn
-	    if [ $? != 0 ]; then
-		echo ""
-		echo "Cannot delete it. Please do it, and try again."
-		exit 1
-	    fi
-	    find ${PKG_PREFIX}/lib/wnn ${PKG_PREFIX}/bin \
-		-user $id_wnn -exec chown 69 {} \;
-	else
-	    echo "Please do those, and try again."
-	    exit 1
-	fi
-    fi
-
-    # add an account 'wnn' to this system
-    echo ""
-    echo "You need an account 'wnn' whose ID number is 69"
-    if yesno "Would you like to create it automatically?" y; then
-	# We need a command 'pw(8)'
-	check_pw
-	pw useradd wnn -u 69 -g 7 -h - -d /nonexistent \
-		-s /nonexistent -c Wnn6 || exit
-    else
-	echo "Please create it, and try again."
-	exit 1
-    fi
-    ;;
-
 POST-INSTALL)
 
     mkdir -p /usr/local/bin
--- japanese-Wnn6.patch ends here ---



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->pgollucci 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Jun 2 20:30:20 UTC 2011 
Responsible-Changed-Why:  
pgollucci@ wants his PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=157542 
Responsible-Changed-From-To: pgollucci->crees 
Responsible-Changed-By: crees 
Responsible-Changed-When: Wed Jun 22 16:50:10 UTC 2011 
Responsible-Changed-Why:  


http://www.freebsd.org/cgi/query-pr.cgi?pr=157542 
Responsible-Changed-From-To: crees->freebsd-ports-bugs 
Responsible-Changed-By: crees 
Responsible-Changed-When: Sat Jun 25 12:50:57 UTC 2011 
Responsible-Changed-Why:  
To pool to see if anyone shows an interest 

http://www.freebsd.org/cgi/query-pr.cgi?pr=157542 
State-Changed-From-To: open->closed 
State-Changed-By: crees 
State-Changed-When: Sat Jul 9 11:03:14 UTC 2011 
State-Changed-Why:  
Committed. 


Responsible-Changed-From-To: freebsd-ports-bugs->crees 
Responsible-Changed-By: crees 
Responsible-Changed-When: Sat Jul 9 11:03:14 UTC 2011 
Responsible-Changed-Why:  
I committed it. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/157542: commit references a PR
Date: Sat,  9 Jul 2011 11:03:24 +0000 (UTC)

 crees       2011-07-09 11:03:10 UTC
 
   FreeBSD ports repository
 
   Modified files:
     japanese/Wnn6        Makefile pkg-install 
   Log:
   - Use USERS and GROUPS
   - Use pre-su-install to create directories under PREFIX
   
   PR:             ports/157542
   Submitted by:   crees (me)
   Approved by:    rene (mentor, implicit)
   
   Revision  Changes    Path
   1.35      +3 -1      ports/japanese/Wnn6/Makefile
   1.8       +0 -69     ports/japanese/Wnn6/pkg-install
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
