Bug 157542 - [PATCH] Fix port: japanese/Wnn6 should use USERS=
Summary: [PATCH] Fix port: japanese/Wnn6 should use USERS=
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: Chris Rees
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-02 21:30 UTC by Chris Rees
Modified: 2011-07-09 12:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Rees 2011-06-02 21:30:09 UTC
	

	This port uses pkg-install to create new users instead of using USERS=.

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?




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.--ZM70BO0zwnEQVL4UEEzbJbPTo8dsjmQJcBDuBeDXW18PNExX
Content-Type: text/plain; name="japanese-Wnn6.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="japanese-Wnn6.patch"

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
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-02 21:30:20 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pgollucci

pgollucci@ wants his PRs (via the GNATS Auto Assign Tool)
Comment 2 Chris Rees freebsd_committer freebsd_triage 2011-06-22 17:50:10 UTC
Responsible Changed
From-To: pgollucci->crees
Comment 3 Chris Rees freebsd_committer freebsd_triage 2011-06-25 13:50:57 UTC
Responsible Changed
From-To: crees->freebsd-ports-bugs

To pool to see if anyone shows an interest
Comment 4 Chris Rees freebsd_committer freebsd_triage 2011-07-09 12:03:14 UTC
State Changed
From-To: open->closed
Comment 5 Chris Rees freebsd_committer freebsd_triage 2011-07-09 12:03:14 UTC
Responsible Changed
From-To: freebsd-ports-bugs->crees

I committed it.
Comment 6 dfilter service freebsd_committer freebsd_triage 2011-07-09 12:03:24 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"