Subject: misc/16900: Create separate syspkgs for sushi
To: None <gnats-bugs@gnats.netbsd.org>
From: None <apb@cequrux.com>
List: netbsd-bugs
Date: 05/19/2002 19:52:14
>Number:         16900
>Category:       misc
>Synopsis:       Create separate syspkgs for sushi
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun May 19 10:54:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Alan Barrett
>Release:        NetBSD 1.5ZC
>Organization:
not much
>Environment:
>Description:
At present, sushi is the largest part of the base-sysutil-* group of
syspkgs:

$ grep base-sysutil distrib/sets/lists/base/mi | grep sushi | wc -l
     288
$ grep base-sysutil distrib/sets/lists/base/mi | grep -v sushi | wc -l
     136

In a future where syspkgs are useful, it seems likely that some
people will want to avoid installing sushi, while others will want to
be able to upgrade sushi without upgrading the entire system.  Several
small subsystems, including cron and lpr, have their own syspkg sets,
and it seems reasonable to do the same for the sushi subsystem.

>How-To-Repeat:
Inspection of distrib/sets/lists/base/mi.
>Fix:
1. In distrib/sets/lists/base/mi (revision 1.322),
   the line for ./usr/share/sushi/network/help
   contains too many fields.  Delete the extra field.

2. In distrib/sets/lists/base/mi and distrib/lists/man/mi,
   edit all the lines that contain "sushi", changing
   "sysutil" to "sushi".  The following vi command will do the job:

	:g/sushi/s/sysutil/sushi/g

3. In distrib/syspkg/sets/base/Makefile, add the following lines:

	SUBDIR+=base-sushi-bin
	SUBDIR+=base-sushi-share
	SUBDIR+=base-sushi_locale-share

4. In distrib/syspkg/sets/man/Makefile, add the following lines:

	SUBDIR+=man-sushi-catman
	SUBDIR+=man-sushi-man

5. Create and populate the subdirectories referred to in steps
   3 and 4.  The following script will do this part of the job:

#
# Create and populate directories under distrib/syspkg/sets/*/*
#
for syspkg in base-sushi-bin base-sushi-share base-sushi_locale-share \
	      man-sushi-catman man-sushi-man
do
	# Construct a comment for use in the COMMENT and DESCR files.
	comment_base="the sushi(8) menu-based system administration tool"
	case ${syspkg} in
	*-bin)		comment="${comment_base}" ;;
	*_locale-share)	comment="shared locale support for ${comment_base}" ;;
	*-share)	comment="shared data files for ${comment_base}" ;;
	*-catman)	comment="formatted man pages for ${comment_base}" ;;
	*-man) 		comment="man page source for ${comment_base}" ;;
	*)		echo "Unrecognised syspkg" ; exit 1 ;;
	esac

	# Create the directory under distrib/syspkg/sets/${syspkgset}/${syspkg}
	syspkgset=${syspkg%%-*}
	syspkgdir=distrib/syspkg/sets/${syspkgset}/${syspkg}
	mkdir ${syspkgdir}

	# Construct the Makefile
	cat >${syspkgdir}/Makefile <<"END"
PKGBASE=${syspkg}
TINY_VERSION=0

.include "../../../mk/bsd.syspkg.mk"
END

	# Construct the one-line COMMENT file
	echo "${comment}" >${syspkgdir}/COMMENT

	# Construct the multi-line DESCR file
	echo "This package contains ${comment}." | fmt >${syspkgdir}/DESCR
	echo "
The sushi tool gives the user a menu of various system administration
tasks that may be performed on the system.  It is designed to be
simple enough for a novice to use, and quick enough to help seasoned
users perform more complex tasks with ease." >>${syspkgdir}/DESCR

done

>Release-Note:
>Audit-Trail:
>Unformatted: