Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Sep 1997 12:27:17 +0900
From:      Satoshi Taoka <taoka@infonets.hiroshima-u.ac.jp>
To:        asami@freebsd.org
Cc:        freebsd-ports@freebsd.org
Subject:   Re: ports/4166 (Wnn6)
Message-ID:  <199709120327.MAA15424@cal.infonets.hiroshima-u.ac.jp>
In-Reply-To: Your message of "Wed, 10 Sep 1997 00:19:54 -0700 (PDT)"
References:  <199709100719.AAA01324@freefall.freebsd.org>

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

Thanks for including my ports into FreeBSD tree.


From: Satoshi Asami <asami@FreeBSD.ORG>
Subject: Re: ports/4166
Date: Wed, 10 Sep 1997 00:19:54 -0700 (PDT)
Message-ID: <199709100719.AAA01324@freefall.freebsd.org>

> 
> Thanks, but can you put it in ftp someplace (like ftp.freebsd.org)?

I should have included the tarball into my first PR mail for Wnn6.

Both Wnn6 port in now FreeBSD tree and the above one have a very
dangerous bug.  So, please apply the following path in
$PORTSDIR/japanese.

By the way, a setup script for this ports should be run by hand.
Which is better, by hand or automatically.

S. Taoka


diff -ur /usr/ports/japanese/Wnn6/Makefile ./Wnn6/Makefile
--- /usr/ports/japanese/Wnn6/Makefile	Wed Sep 10 16:55:31 1997
+++ ./Wnn6/Makefile	Fri Sep 12 09:32:02 1997
@@ -1,4 +1,4 @@
-# New ports collection makefile for:	Wnn6-demo
+# New ports collection makefile for:	Wnn6
 # Version required:	97.6.6
 # Date created:		15 July 1997
 # Whom:			Satoshi Taoka <taoka@infonets.hiroshima-u.ac.jp>
@@ -21,66 +21,75 @@
 MOUNT_PT?=	/cdrom
 MOUNT_DEV?=	/dev/wcd0c
 
-RESTRICTED=	"Restrictive copyright"
-
+RESTRICTED=	"Copyright"
 NO_CDROM=	yes
 NO_PACKAGE=	yes
+NO_BUILD=	yes
 NO_CONFIGURE=	yes
 NO_PATCH=	yes
 IS_INTERACTIVE=	yes
 
+# If ${.CURDIR}/work/.build_done (which will be ${BUILD_COOKIE}) exists,
+# we do nothing in a 'do-fetch' stage.
+.if exists(${.CURDIR}/work/.build_done)
+do-fetch:
+.else
 do-fetch:
-	@echo -n "Please set the CD-ROM of 'Wnn6' into your cdrom-drive. (Press Return)"; \
+	@${ECHO} -n "Please set the CD-ROM of 'Wnn6' into your cdrom-drive. (Press Return)"; \
 	read dummy; \
-	echo "A mount point and the device file are '${MOUNT_PT}' and '${MOUNT_DEV}' respectively."; \
-	echo -n "Are these correct? (y/n) [y]"; \
+	${ECHO} "By default, a mount point and a device file"; \
+	${ECHO} "    are '${MOUNT_PT}' and '${MOUNT_DEV}' respectively."; \
+	${ECHO} -n "Are these correct? (y/n) [y]"; \
 	(read ans; \
 	case x$${ans} in \
 	  xn*|xN*) \
-		echo "Please rerun 'make' in specifying MOUNT_PT and MOUNT_DEV"; \
-		echo "For example:"; \
-		echo "	make MOUNT_PT=/mnt MOUNT_DEV=/dev/cd0c"; \
+		${ECHO} "###########################################################"; \
+		${ECHO} "Please rerun 'make' in specifying MOUNT_PT and MOUNT_DEV"; \
+		${ECHO} "For example:"; \
+		${ECHO} "	make MOUNT_PT=/mnt MOUNT_DEV=/dev/cd0c"; \
+		${ECHO} "###########################################################"; \
 		/usr/bin/false; \
 		;; \
 	  *) \
-		echo "Now mounting the CD-ROM ..."; \
+		${ECHO} "Now mounting the CD-ROM ..."; \
 		;; \
 	esac)
-	@for t in `mount | grep ${MOUNT_PT}`; do \
+	@for t in `mount | ${GREP} ${MOUNT_PT}`; do \
 	  if [ x"$$t" = x"${MOUNT_PT}" ]; then \
-	    echo "##################################################"; \
-	    echo "${MOUNT_PT} is busy"; \
-	    echo "Please umount ${MOUNT_PT}"; \
-	    echo "##################################################"; \
+	    ${ECHO} "##################################################"; \
+	    ${ECHO} "${MOUNT_PT} is busy"; \
+	    ${ECHO} "Please 'umount ${MOUNT_PT}'"; \
+	    ${ECHO} "##################################################"; \
 	    /usr/bin/false; \
 	  fi; \
 	done
 	@/sbin/mount_cd9660 ${MOUNT_DEV} ${MOUNT_PT}
+.endif
 
 pre-extract:
 	@if [ ! -e ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \
-		echo "${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}: No such file"; \
-		echo "Perhaps the CD-ROM is not one of Wnn6"; \
+		${ECHO} "${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}: No such file"; \
+		${ECHO} "Perhaps the CD-ROM is not one of Wnn6"; \
 		/sbin/umount ${MOUNT_PT}; \
-		echo "Umounting is done ..."; \
+		${ECHO} "Umounting is done ..."; \
 		/usr/bin/false; \
 	fi
 
-do-build:
+post-extract:
 	@/sbin/umount ${MOUNT_PT}
 
 do-install:
 	@cd ${WRKSRC}/usr; tar cf - OMRONWnn6 | (cd ${PREFIX}; tar xvpf -)
 	@${INSTALL_SCRIPT} ${FILESDIR}/setup.sh ${LIBDIR}
 	@if [ ! -f ${STARTUP_SCRIPT} ]; then 				\
-		echo "Installing ${STARTUP_SCRIPT} startup file."; 	\
-		echo '#!/bin/sh' > ${STARTUP_SCRIPT}; 			\
-		echo 'wnn6=/usr/local/bin/Wnn6/jserver' 		\
+		${ECHO} "Installing ${STARTUP_SCRIPT} startup file."; 	\
+		${ECHO} '#!/bin/sh' > ${STARTUP_SCRIPT}; 		\
+		${ECHO} 'wnn6=/usr/local/bin/Wnn6/jserver' 		\
 		  >> ${STARTUP_SCRIPT} ;				\
-		echo 'if [ -f $$wnn6 ]; then' >> ${STARTUP_SCRIPT} ;	\
-		echo "    echo -n ' Wnn6'" >> ${STARTUP_SCRIPT};	\
-		echo '     $$wnn6' >> ${STARTUP_SCRIPT} ;		\
-		echo "fi" >> ${STARTUP_SCRIPT} ;			\
+		${ECHO} 'if [ -f $$wnn6 ]; then' >> ${STARTUP_SCRIPT} ;	\
+		${ECHO} "    echo -n ' Wnn6'" >> ${STARTUP_SCRIPT};	\
+		${ECHO} '     $$wnn6' >> ${STARTUP_SCRIPT} ;		\
+		${ECHO} "fi" >> ${STARTUP_SCRIPT} ;			\
 		chmod 755 ${STARTUP_SCRIPT} ;				\
 		chown bin.bin ${STARTUP_SCRIPT};			\
 	fi
diff -ur /usr/ports/japanese/Wnn6/files/setup.sh ./Wnn6/files/setup.sh
--- /usr/ports/japanese/Wnn6/files/setup.sh	Wed Sep 10 16:55:32 1997
+++ ./Wnn6/files/setup.sh	Fri Sep 12 12:01:32 1997
@@ -1,78 +1,116 @@
 #!/bin/sh
-# setup script for Wnn6
+# a setup script for Wnn6
 #   -- S. Taoka <taoka@infonets.hiroshima-u.ac.jp>
 
+check_pw()
+{
+    if which -s pw; then
+	:
+    else
+	cat <<EOF
+
+This system looks like a older pre-2.2 version of FreeBSD.  We see
+that it is missing the "pw" utility.  We need this utility.  Please
+get and install it, and try again.  You can get the source from:
+
+  ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.sbin/pw.tar.gz
+
+EOF
+	exit 1
+    fi
+}
+
+
 echo "###########################################################################"
-echo "You have to do 2 things in the following."
+echo "You have to do the following two things."
 echo "1. Add 'wnn6	22273/tcp' to /etc/services."
-echo "2. Create a account whose name and id number are wnn and 127, respectively."
+echo "2. Create an account whose name and ID number are wnn and 127, respectively."
 echo "   It means to add 'wnn:*:127:7::0:0:Wnn6:/nonexistent:/nonexistent'"
 echo "          to /etc/master.passwd."
-echo "	Note that USER ID of wnn must be 127."
+echo "	Note that ID number of 'wnn' must be 127."
 echo "###########################################################################"
 
 # Hack /etc/services
 FILE="/etc/services"
-echo
-echo "Updating ${FILE}"
-echo "Do you like to update ${FILE} automatically? (y/n) [y]" 
-read ans
-case x${ans} in
-xn*|xN*)
-    echo "Do you like to change ${FILE} by yourself? (y/n) [y]" 
-    read choice
-    case x${choice} in 
+# check
+OK=no
+HAS_WNN6=no
+COUNT=1
+for i in `grep wnn6 $FILE `; do
+    if [ $COUNT = 1 ] && [ X"$i" = X"wnn6" ]; then
+	HAS_WNN6=yes
+    elif [ $COUNT = 2 ] && [ $HAS_WNN6 = yes ] && \
+            [ X"$i" = X"22273/tcp" ]; then
+        OK=yes
+	break
+    fi
+    COUNT=`expr ${COUNT} + 1`
+done
+# add a entry for wnn6 to /etc/services
+if [ $OK = no ]; then
+    echo
+    echo "Updating ${FILE}"
+    echo -n "Do you like to update ${FILE} automatically? (y/n) [y]" 
+    read ans
+    case x${ans} in
     xn*|xN*)
-        echo "Okay, do nothing."
+        echo -n "Do you like to change ${FILE} by yourself? (y/n) [y]" 
+        read choice
+        case x${choice} in 
+        xn*|xN*)
+            echo "Okay, do nothing."
+            ;;
+        *)
+            ${EDITOR:-/usr/bin/vi} ${FILE}
+            ;;
+        esac
 	;;
     *)
-        ${EDITOR:-/usr/bin/vi} ${FILE}
-	;;
-   esac
-	;;
-*)
-    mv ${FILE} ${FILE}.bak
-    (grep -v wnn6 ${FILE}.bak ;  echo "wnn6	22273/tcp	# Wnn6") > ${FILE}
-    echo "original file is saved in ${FILE}.bak"
-    ;;
-esac
+        mv ${FILE} ${FILE}.bak
+        (grep -v wnn6 ${FILE}.bak ; \
+	    echo "wnn6		22273/tcp	# Wnn6") >> ${FILE}
+        echo "original file is saved in ${FILE}.bak"
+        ;;
+    esac
+fi
 
 # Hack /etc/master.passwd
-FILE="/etc/master.passwd"
-FILE2="/etc/passwd"
+# check
 id_127=`id -u 127 2> /dev/null`
-wnn_id=`id -u wnn 2> /dev/null`
-if [ X"$wnn_id" = X127 ];then
+id_wnn=`id -u wnn 2> /dev/null`
+if [ X"$id_wnn" = X127 ];then
     echo "Setup is done."
     exit 0
 elif [ X"$id_127" != X ]; then
     echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-    echo "Your system has been already an account whose name is not 'wnn' and"
-    echo "id number is 127. "
+    echo "Your system already has an account whose name is not 'wnn' and"
+    echo "ID number is 127. "
     echo "   '`id 127`'"
-    echo "For Wnn6, id number of 'wnn' has to be 127."
+    echo "For Wnn6, ID number of 'wnn' has to be 127."
     echo "Please rerun this script after you delete the account."
     echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
    exit 1
-elif [ X"$wnn_id" != X ]; then
+elif [ X"$id_wnn" != X ]; then
     echo
     echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-    echo "Your system has an 'wnn' account whose id number is $wnn_id."
+    echo "Your system has an 'wnn' account whose ID number is $id_wnn."
     echo "Perhaps Wnn4.2 has been already installed."
-    echo "Please change id number of Wnn4.2's commands and "
+    echo "Please change ID number of Wnn4.2's commands and "
     echo "dictionaries to '127' after this setup."
+    echo "For example, run the following command:"
     echo ""
-    echo "For example:"
-    echo "find /usr/local/lib/wnn /usr/local/bin -user $wnn_id -exec chown 127 {} \;"
+    echo " find /usr/local/lib/wnn /usr/local/bin -user $id_wnn -exec chown 127 {} \;"
     echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
 fi
+
+# add an account 'wnn' to this system
 echo
-echo "Updating ${FILE} and ${FILE2}"
-echo "Do you like to update ${FILE} and ${FILE2} automatically? (y/n) [y]"
+echo "Adding an account 'wnn' whose ID number is 127"
+echo -n "Do you like to add the account automatically? (y/n) [y]"
 read ans
 case x${ans} in
 xn*|xN*)
-    echo "Do you like to change ${FILE} file by yourself? (y/n) [y]"
+    echo -n "Do you like to do by yourself? (y/n) [y]"
     read choice
     case x${choice} in 
     xn*|xN*)
@@ -84,12 +122,13 @@
     esac
     ;;
 *)
-    mv ${FILE} ${FILE}.bak
-    (grep -v wnn ${FILE}.bak ;  echo "wnn:*:127:7::0:0:Wnn6:/nonexistent:/nonexistent") > ${FILE}
-    mv ${FILE2} ${FILE2}.bak
-    (grep -v wnn ${FILE2}.bak ;  echo "wnn:*:127:7:Wnn6:/nonexistent:/nonexistent") > ${FILE2}
-    pwd_mkdb /etc/master.passwd
-    echo "original file is saved in ${FILE}.bak and ${FILE2}.bak"
+    # We need a command 'pw(8)'
+    check_pw
+    if [ X"$id_wnn" != X ]; then
+	echo "Deleting an account 'wnn'"
+	pw userdel wnn
+    fi
+    pw useradd wnn -u 128 -g 7 -h - -d /nonexistent -s /nonexistent -c Wnn6
     ;;
 esac
 echo "Setup is done."
diff -ur /usr/ports/japanese/Wnn6/pkg/COMMENT ./Wnn6/pkg/COMMENT
--- /usr/ports/japanese/Wnn6/pkg/COMMENT	Wed Sep 10 16:55:33 1997
+++ ./Wnn6/pkg/COMMENT	Thu Jul 24 15:14:30 1997
@@ -1 +1 @@
-A Japanese input method (this is a commodity)
+A Japanese input method (this is not free)
diff -ur /usr/ports/japanese/Wnn6/pkg/DESCR ./Wnn6/pkg/DESCR
--- /usr/ports/japanese/Wnn6/pkg/DESCR	Wed Sep 10 16:55:33 1997
+++ ./Wnn6/pkg/DESCR	Fri Sep 12 11:53:11 1997
@@ -1,5 +1,5 @@
-This is Wnn6, a Japanese input method. This software is a commodity,
-and you can buy it from Omron Software Co., Ltd.
+This is Wnn6, a Japanese input method. This software 'Wnn6' is not
+free, and you can buy it from Omron Software Co., Ltd.
 
 +------------------------------------------+
 | URL:	   http://www.omronsoft.co.jp      |
@@ -8,14 +8,13 @@
 | FAX:     +81-44-246-6011                 |
 +------------------------------------------+
 
-Remark 1. If you install this package, the folloing symbolic links are
-made,
+Remark 1. If a value of ${PKG_PREFIX} is not '/usr/local', the
+following symbolic links are made:
 
 "/usr/local/bin/Wnn6" to "${PKG_PREFIX}/OMRONWnn6/Wnn6fbsd" and,
 "/usr/local/lib/wnn6" to "${PKG_PREFIX}/OMRONWnn6/wnn6fbsd".
 
-Remark 2. We do not fetch by FTP.
-
+Remark 2. We do not fetch by FTP but get from CD-ROM.
 
 - S. Taoka
 taoka@infonets.hiroshima-u.ac.jp






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