Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jun 2011 21:11:55 +0100
From:      Chris Rees <utisoft@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/157542: [PATCH] Fix port: japanese/Wnn6 should use USERS=
Message-ID:  <BLU0-SMTP17654B806D66A92AEB49E7CA97C0@phx.gbl>
Resent-Message-ID: <201106022030.p52KU99N029411@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         157542
>Category:       ports
>Synopsis:       [PATCH] Fix port: japanese/Wnn6 should use USERS=
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 02 20:30:09 UTC 2011
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BLU0-SMTP17654B806D66A92AEB49E7CA97C0>