Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Aug 2000 00:46:22 +0900
From:      Makoto MATSUSHITA <matusita@jp.freebsd.org>
To:        lioux@uol.com.br, freebsd-stable@freebsd.org
Subject:   Re: How to Create a FreeBSD iso image
Message-ID:  <20000814004622W.matusita@jp.FreeBSD.org>
In-Reply-To: <20000814002826K.matusita@jp.FreeBSD.org>
References:  <20000812150538.A1238@Fedaykin.here> <20000814002826K.matusita@jp.FreeBSD.org>

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

matusita> I'm using my own prototype script (sorry not yet released,
matusita> but I'll do it later).

I should write a webpage for 'scripts at current.jp.FreeBSD.org', but
anyway, here is a script of selecting packages of my own.

The script requires three argument. The first argument is a directory
of ports, the second argument is a directory of packages, and the
third argument is destination directory which will contain all
selected packages.

-- -
Makoto `MAR' MATSUSHITA


#!/bin/sh
#
# Creating package shadow directory
# $Id: make-pkgtree,v 1.25 2000/08/13 15:40:39 matusita Exp $
#
# Usage: $0 portsdir packagedir dest-directory

if [ ! $# -eq 3 ]; then
	echo "Argument mismatch."
	exit 1
fi
PORTSDIR=$1
PKGDIR=$2
DESTDIR=$3
export PORTSDIR

#
# Package lists
#
PORTSLIST=

# Listed in sysinstall(8)
PKG_SYSINSTALL='
	emulators/linux_base
	x11/kde11
	x11/gnome
	x11-wm/afterstep
	x11-wm/enlightenment
	x11-wm/fvwm2
	net/pcnfsd
'
PORTSLIST="${PORTSLIST} ${PKG_SYSINSTALL}"

# Shell for login
PKG_SHELL='
	shells/44bsd-csh
	shells/bash1 shells/bash2
	shells/es
	shells/ksh93
	shells/pdksh
	shells/rc
	shells/sash
	shells/scsh
	shells/zsh shells/zsh-devel
'
PORTSLIST="${PORTSLIST} ${PKG_SHELL}"

# Pagers
PKG_PAGER='
	misc/44bsd-more
	chinese/cless
	japanese/less
	japanese/lesw
	misc/most
	vietnamese/vnless
'
PORTSLIST="${PORTSLIST} ${PKG_PAGER}"

# Development tools
PKG_DEVTOOL='
	devel/autoconf
	devel/imake devel/imake-4
	devel/libtool
	devel/m4
	devel/mkmf
	devel/gmake
	lang/m3gdb
'
PORTSLIST="${PORTSLIST} ${PKG_DEVTOOL}"

# Languages
PKG_LANG='
	lang/Gofer
	lang/STk
	lang/Sather
	lang/TenDRA
	lang/atlast
	lang/bwbasic
	lang/caml-light
	lang/cim
	lang/clisp
	lang/cmucl
	lang/cu-prolog
	lang/dylan
	lang/eiffel
	lang/elk
	lang/eperl
	lang/erlang
	lang/expect
	lang/forth
	lang/f2c
	lang/gawk
	lang/gcc-devel lang/gcc27 lang/gcc28
	lang/gcl
	lang/ghc
	lang/glibstdc++28
	lang/gnat
	lang/gnomebasic
	lang/gpc
	lang/guile lang/guileobjc
	lang/hugs
	lang/ici
	lang/icon
	lang/intel2gas
	lang/intercal
	lang/irb
	lang/itcl
	lang/lcc
	lang/libobjects
	lang/logo
	lang/lua
	lang/mawk
	lang/mit-scheme
	lang/mixal
	lang/mocka
	lang/modula-3 lang/modula-3-socks
	lang/moscow_ml
	lang/mozart
	lang/nawk
	lang/nqc
	lang/o2c
	lang/objc
	lang/ocaml
	lang/oo2c
	lang/otcl
	lang/p2c
	lang/pbasic
	lang/perl5
	lang/pgcc
	lang/pike
	lang/pm3-base
	lang/python lang/python+ipv6
	lang/rexx-imc
	lang/ruby
	lang/scheme48
	lang/schemetoc
	lang/scm
	lang/siod
	lang/smalleiffel
	lang/smalltalk
	lang/sml-nj lang/sml-nj-devel
	lang/squeak1 lang/squeak2
	lang/sr
	lang/starlogo
	lang/swi-pl
	lang/tcl80 lang/tcl82 lang/tcl83 lang/tclX80
	lang/yabasic
'
# XXX: too many packages, disabled.
#PORTSLIST="${PORTSLIST} ${PKG_LANG}"

# Libraries
PKG_LIB='
	japanese/libslang

	archivers/libarc
	audio/libshout
	databases/cdb
	databases/freetds
	databases/libiodbc
	devel/amulet
	devel/flux
	devel/libcoro
	devel/libdlmalloc
	devel/libgetline
	devel/libmalloc
	devel/libole2
	devel/libslang
	devel/libshhmsg
	devel/libshhopt
	devel/libtai
	devel/libxalloc
	devel/lwp
	devel/mime
	devel/mm
	devel/newt
	devel/popt
	devel/rpc2
	devel/rvm
	devel/tvision
	devel/yacl
	graphics/libggi
	graphics/smpeg
	graphics/twinlib
	japanese/Wnn6-lib
	lang/librep
	lang/modula-3-lib
	lang/pm3-forms lang/pm3-gui lang/pm3-m3tk
	lang/slib
	math/libneural
	www/cgiparse
	www/libxpg4-ns
	security/librsaintl
'
# XXX: too many packages, disabled.
#PORTSLIST="${PORTSLIST} ${PKG_LIB}"

# Archivers
PKG_ARCHIVER='
	japanese/deepforest

	archivers/9e
	archivers/arc
	archivers/bzip archivers/bzip2
	archivers/deepforest
	archivers/fastjar
	archivers/freeze
	archivers/ha
	archivers/hpack.non-usa.only
	archivers/lha
	archivers/linux_rar
	archivers/lzop
	archivers/macutils
	archivers/mscompress
	archivers/nulib
	archivers/pkzip
	archivers/ppunpack
	archivers/rar
	archivers/unace
	archivers/unarj
	archivers/undms
	archivers/unlzx
	archivers/unrar
	archivers/unzip
	archivers/zip
	archivers/zoo
'
PORTSLIST="${PORTSLIST} ${PKG_ARCHIVER}"

# Terminals
PKG_TERM='
	chinese/aterm
	chinese/cxterm
	chinese/rxvt
	comms/kermit
	japanese/kterm
	japanese/eterm
	japanese/rxvt
	korean/hanterm
	korean/eterm
	misc/screen
	misc/splitvt
	x11/aterm
	x11/emu
	x11/eterm
	x11/powershell
	x11/rxvt
	x11/wterm
	vietnamese/vnterm
'
PORTSLIST="${PORTSLIST} ${PKG_TERM}"

# Documents
PKG_DOC='
	german/manpages
	japanese/man
	japanese/man-doc
'
PORTSLIST="${PORTSLIST} ${PKG_DOC}"

# Routing daemons and tools
PKG_ROUTE='
	net/brouted
	net/gated
	net/mrt
	net/zebra

	net/ciscoconf
	net/mrtg
	net/mtr
	net/tdetect
	net/traceroute
	net/xtraceroute
'
PORTSLIST="${PORTSLIST} ${PKG_ROUTE}"

# DNS servers and tools
PKG_DNS='
	net/bind8
	net/dnscache
	net/hesiod

	net/adns
	net/ddup
	net/dhid
	net/dnswalk
	net/doc
	net/domtools
	net/h2n
	net/nslint
	net/nsping
'
PORTSLIST="${PORTSLIST} ${PKG_DNS}"

# DHCP servers/clients and tools
PKG_DHCP='
	net/isc-dhcp2 net/isc-dhcp3
	net/wide-dhcp

	net/dhcpconf
'
PORTSLIST="${PORTSLIST} ${PKG_DHCP}"

# Web/FTP tools
PKG_WEB_TOOL='
	german/webalizer

	textproc/htdig
	www/analog
	www/bacon
	www/calamaris
	www/http-analyze
	www/webalizer www/webalizer-2
	www/squidclients
	www/squidtimes
	www/wwwstat

	mail/muttzilla
'
PORTSLIST="${PORTSLIST} ${PKG_WEB_TOOL}"

# Web servers
# REMOVED: www/apache13-fp www/apache13-modssl www/apache13-ssl
PKG_WEB_SERVER='
	russian/apache13

	www/aolserver
	www/apache-jserv
	www/apache13 www/apache13+ipv6
	www/boa
	www/gn
	www/mathopd
	www/roxen
	www/thttpd
	www/webfs
	www/wn
	www/xitami

	net/delegate
	www/httptunnel
	www/jesred
	www/junkbuster
	www/smb_auth
	www/squid22 www/squid23
	www/squirm
	www/tinyproxy
	www/transproxy
	www/w3c-httpd
	www/wcol
	www/wwwoffle
	russian/cyrproxy
'
PORTSLIST="${PORTSLIST} ${PKG_WEB_SERVER}"

# Web clients
# REMOVED: */linux-netscape[0-9]* */bsdi-netscape[0-9]*
PKG_WEB_CLIENT='
	*/netscape[0-9]*

	japanese/lynx japanese/lynx-current
	japanese/w3m japanese/w3m-ssl

	www/amaya
	www/arena
	www/cadaver
	www/chimera www/chimera2
	www/grail
	www/hotjava
	www/kwebsearch
	www/lynx www/lynx-current www/lynx-ssl
	www/linemode
	www/Mosaic
	www/mozilla x11-fonts/mozilla-fonts
	www/vrweb
	www/w3m www/w3m-ssl

	ftp/curl
	ftp/greed
	ftp/pavuk
	ftp/wget
	www/comline
	www/harvest
	www/momspider
	www/sitecopy
	www/snarf
	www/w3mir
	www/webcopy
	www/webcrawl
'
PORTSLIST="${PORTSLIST} ${PKG_WEB_CLIENT}"

# FTP servers
PKG_FTP_SERVER='
	ftp/proftpd
	ftp/wu-ftpd
	ftp/yale-tftpd
	www/publicfile
'
PORTSLIST="${PORTSLIST} ${PKG_FTP_SERVER}"

# FTP clients
PKG_FTP_CLIENT='
	ftp/IglooFTP
	ftp/axyftp
	ftp/cftp
	ftp/ftptool
	ftp/gftp
	ftp/hsftp
	ftp/lftp
	ftp/llnlxdir
	ftp/llnlxftp
	ftp/moxftp
	ftp/ncftp ftp/ncftp2 ftp/ncftp3
	ftp/sftp
	ftp/xrmftp
	ftp/yafc

	ftp/caitoo
	ftp/downloader
	ftp/jmirror
	ftp/ftpcopy
	ftp/ftpfind
	ftp/mirror
	ftp/omi
	ftp/spegla
'
PORTSLIST="${PORTSLIST} ${PKG_FTP_CLIENT}"

# Email tools
PKG_MAIL_TOOL='
	korean/hmconv
	japanese/mimekit
	japanese/mhonarc
	russian/messarge

	converters/mpack
	mail/autorespond
	mail/bulk_mailer
	mail/distribute
	mail/ezmlm
	mail/ezmlm-idx
	mail/fetchmail
	mail/majorcool
	mail/majordomo
	mail/mailagent
	mail/maildrop
	mail/mailfilter
	mail/metamail
	mail/minimalist
	mail/movemail
	mail/mreport
	mail/qmailanalog
	mail/procmail
	mail/smtpd
	mail/smtpfeed
	www/mhonarc
'
PORTSLIST="${PORTSLIST} ${PKG_MAIL_TOOL}"

# MTAs
PKG_MAIL_MTA='
	mail/exim
	mail/postfix
	mail/pgpsendmail
	mail/qmail mail/qmail-contrib
	mail/smail
	mail/zmailer
'
PORTSLIST="${PORTSLIST} ${PKG_MAIL_MTA}"

# POP servers
PKG_MAIL_POP='
	mail/cucipop
	mail/popa3d
	mail/poppassd
	mail/popper mail/popper3
	mail/solidpop3d
	mail/teapop
'
PORTSLIST="${PORTSLIST} ${PKG_MAIL_POP}"

# IMAP servers
PKG_MAIL_IMAP='
	mail/courier-imap
	mail/cyrus
	mail/imap-uw
'
PORTSLIST="${PORTSLIST} ${PKG_MAIL_IMAP}"

# MUAs
PKG_MAIL_MUA='
	mail/wanderlust-*
	mail/mew mail/mew-*

	chinese/pine3 chinese/pine4
	korean/elm
	korean/pine
	japanese/exmh2
	japanese/mh
	japanese/mutt
	japanese/pine
	mail/pgp4pine
	mail/muttzilla
	russian/elm.language
	russian/pine.language

	mail/balsa
	mail/elm
	mail/elm+ME
	mail/evolution
	mail/exmh mail/exmh2
	mail/im
	mail/mailx
	mail/mh
	mail/ml
	mail/mutt
	mail/nmh
	mail/pine4 mail/pine4-ssl
	mail/postilion
	mail/spruce
	mail/sylpheed
	mail/tkrat mail/tkrat2
	mail/xfmail
	mail/xmail
	mail/yuzu
'
PORTSLIST="${PORTSLIST} ${PKG_MAIL_MUA}"

# Servers
PKG_SERVER='
	audio/icecast
	audio/pysol-sound-server
	audio/xmms-liveice
	chinese/xcin25
	chinese/Wnn
	comms/conserver
	comms/qpage
	databases/mysql322-server
	devel/perforce
	ftp/ftpsearch
	irc/irc
	irc/tircproxy
	irc/ircd-hybrid
	japanese/Wnn
	japanese/Canna
	japanese/dbskkd-cdb
	japanese/dserver
	japanese/esecanna
	japanese/ndtpd
	japanese/samba
	japanese/skkserv
	korean/Wnn
	net/coda5_server net/coda_server
	net/dgd
	net/dgd-net
	net/freewais-sf
	net/gopher
	net/samba
	net/tcserver
	net/vnc
	net/wais
'
PORTSLIST="${PORTSLIST} ${PKG_SERVER}"

# Clients
PKG_CLIENT='
	japanese/kinput2-*

	japanese/ircII

	audio/shout
	databases/mysql322-client
	databases/sqsh
	editors/tamago
	irc/bitchx
	irc/epic4
	irc/ircII
	irc/irssi
	irc/kvirc
	irc/nethirc
	irc/ninja
	irc/olirc
	irc/quirc
	irc/roxirc
	irc/scrollz
	irc/sirc
	irc/tkirc
	irc/trickyirc
	irc/xchat
	irc/yagirc
	japanese/canuum
	net/citrix_ica
	net/coda5_client net/coda5_doc
	net/gnome-vnc
'
PORTSLIST="${PORTSLIST} ${PKG_CLIENT}"

# Editors
# REMOVED: editors/emacs
# REMOVED: editors/xemacs editors/xemacs20*
# REMOVED: editors/mule* chinese/mule-* japanese/mule-* korean/mule-*
PKG_EDITOR='
	*/emacs[0-9]*
	*/xemacs21*
	*/nvi-*
	*/staroffice[0-9]*
	*/*elvis
	editors/vim[0-9] editors/vim-lite japanese/jvim japanese/jvim-*
	japanese/ng japanese/ng-*
	*/jed

	chinese/ted
	editors/AbiWord
	editors/axe
	editors/aee
	editors/asedit
	editors/beav
	editors/biew
	editors/bpatch
	editors/bvi
	editors/cooledit
	editors/dedit
	editors/e93
	editors/fb
	editors/fine
	editors/fte
	editors/gedit
	editors/ghex
	editors/gnotepad+
	editors/gxedit
	editors/hexedit
	editors/jedit
	editors/jext
	editors/joe
	editors/jove
	editors/le
	editors/lpe
	editors/muggy
	editors/nano
	editors/nedit
	editors/offix-editor
	editors/sam
	editors/sted
	editors/textedit
	editors/thoteditor
	editors/uzap
	editors/vigor
	editors/vile
	editors/wily
	editors/wordperfect
	editors/xcoral
	editors/xed
	editors/xenon
	editors/xvile
	editors/yudit
	japanese/ne
	www/aswedit
	www/bluefish
	www/erwn
'
PORTSLIST="${PORTSLIST} ${PKG_EDITOR}"

# Cleanup
rm -rf ${DESTDIR}
mkdir ${DESTDIR} ${DESTDIR}/All
VALID_CATEGORIES=`cd ${PORTSDIR}/shells/zsh; make -V VALID_CATEGORIES`
for c in ${VALID_CATEGORIES}
do
	mkdir ${DESTDIR}/${c}
done

shadow_package () {
	local port nodepends pkg PKGS pkgs index dp
	local RESTRICTED_CHECK CDROM_CHECK PACKAGE_CHECK
	port=$1
	nodepends=$2
	
	echo -n Checking for ${port}...
	RESTRICTED_CHECK=`cd ${PORTSDIR}/${port}; make -V RESTRICTED`
	CDROM_CHECK=`cd ${PORTSDIR}/${port}; make -V NO_CDROM`
	PACKAGE_CHECK=`cd ${PORTSDIR}/${port}; make -V NO_PACKAGE`
	if [ -n "${RESTRICTED_CHECK}" ]; then
		echo "  RESTRICTED is set."
		return
	elif [ -n "${CDROM_CHECK}" ]; then
		echo "  NO_CDROM is set."
		return
	elif [ -n "${PACKAGE_CHECK}" ]; then
		echo "  NO_PACKAGE is set."
		return
	else
		echo "  O.K."
	fi

	pkg=`grep \|/usr/ports/${port}\| ${PKGDIR}/INDEX | awk -F'|' '{print $1}'`
	if [ -f ${PKGDIR}/All/${pkg}.tgz -a \
	     ! -f ${DESTDIR}/All/${pkg}.tgz ]; then
		ln ${PKGDIR}/All/${pkg}.tgz ${DESTDIR}/All/${pkg}.tgz
		if [ -f ${DESTDIR}/All/${pkg}.tgz ]; then
			echo "  name: ${pkg}.tgz"
			index=`grep ^${pkg}\| ${PKGDIR}/INDEX`
			if [ -n "${index}" ]; then
				echo ${index} >> ${DESTDIR}/INDEX
			fi
			CATFILES=`cd ${PKGDIR}; echo [a-z0-9]*/${pkg}.tgz`
			for link in ${CATFILES}
			do
				if [ ! -L ${DESTDIR}/${link} ]; then
					echo "  symlinks: ${link}"
					ln -s ../All/${pkg}.tgz ${DESTDIR}/${link}
				else
					echo "  symlinks: ${link} (ignored)"
				fi
			done
		else
			echo "  name: ${pkg}.tgz (failed)"
		fi
	else
		if [ -z "${pkg}" ]; then
			echo "  name: unknown (not found in INDEX)"
		elif [ ! -f ${PKGDIR}/All/${pkg}.tgz ]; then
			echo "  name: ${pkg}.tgz (not found in directory)"
		else
			echo "  name: ${pkg}.tgz (ignored)"
		fi
	fi

	if [ -n "${nodepends}" ]; then
		return
	fi

	PKGS=`echo "${index}" | awk -F'|' '{print $9}'`
	for pkgs in ${PKGS}
	do
		dp=`grep ^${pkgs}\| ${PKGDIR}/INDEX | awk -F'|' '{print $2}' | sed -e s,/usr/ports/,,g`
		if [ -n "${dp}" ]; then
			shadow_package ${dp} nodepends
		else
			echo "  name: ${pkgs} (not found in INDEX)"
		fi
	done
}

# Let's go...
for list in ${PORTSLIST}
do
	expand_list=`echo ${PORTSDIR}/${list} | sed -e s,${PORTSDIR}/,,g`
	for ports in ${expand_list}
	do
		shadow_package ${ports}
	done
done

# Be sure unused categories are removed
rmdir ${DESTDIR}/* >/dev/null 2>&1


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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