From: Arun Thomas Date: Fri, 10 Sep 2010 17:00:30 +0000 (+0000) Subject: Update release script for pkgsrc X-Git-Tag: v3.1.8~7 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=207e88d3c4d5fc4d2f98c6adeeb9a1292347f3e6;p=minix.git Update release script for pkgsrc --- diff --git a/commands/Makefile b/commands/Makefile index f999cd57e..c507731b9 100644 --- a/commands/Makefile +++ b/commands/Makefile @@ -32,7 +32,7 @@ SUBDIR= aal add_route adduser advent arp ash at autil awk \ truncate tsort ttt tty udpstat umount uname unexpand \ uniq unstack update urlget uud uue version vol wc \ whereis which who write writeisofs fetch \ - xargs yacc yes zdump zic zmodem pkg_install + xargs yacc yes zdump zic zmodem pkg_install pkgin_cd .if ${ARCH} == "i386" SUBDIR+= atnormalize dosread fdisk loadfont \ diff --git a/commands/pkgin_cd/Makefile b/commands/pkgin_cd/Makefile new file mode 100644 index 000000000..76c0497bd --- /dev/null +++ b/commands/pkgin_cd/Makefile @@ -0,0 +1,4 @@ +SCRIPTS= pkgin_cd.sh +MAN= + +.include diff --git a/commands/pkgin_cd/pkgin_cd.sh b/commands/pkgin_cd/pkgin_cd.sh new file mode 100644 index 000000000..697d45192 --- /dev/null +++ b/commands/pkgin_cd/pkgin_cd.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +# This script can be used to install packages from the +# the installation CD-ROM. + +RC=/usr/etc/rc.package +CDMP=/mnt +CDPACK=${CDMP}/install/packages +PACKSUM=pkg_summary.bz2 +cdpackages="" +cdmounted="" + +if [ -f "$RC" ] +then . "$RC" +fi + +# Is there a usable CD to install packages from? +if [ -n "$cddrive" ] +then pack=${cddrive}p2 + umount $pack >/dev/null 2>&1 || true + echo "Checking for CD in $pack." + if mount -r $pack $CDMP 2>/dev/null + then fn="$CDPACK/$PACKSUM" + echo "Found." + cdmounted=1 + cdpackages=$fn + if [ ! -f $cdpackages ] + then cdpackages="" + echo "No package summary found on CD in $fn." + exit 1 + fi + else echo "Not found." + exit 1 + fi +else echo "Don't know where the install CD is. You can set it in $RC." + exit 1 +fi + +# Set package repo to CD and populate package db +export PKG_REPOS=${CDPACK} +pkgin update + +# Run pkgin +pkgin $@ diff --git a/etc/motd b/etc/motd index dd01b25eb..8ef9c34b4 100755 --- a/etc/motd +++ b/etc/motd @@ -1,12 +1,12 @@ -To install the X Window System, run 'packman' with the install CD still -in the drive. To start X Windows after you have installed it, login as -root and type: 'xdm'. For more information about configuring X Windows, -see www.minix3.org. +To install additional packages, run 'pkgin'. First do a 'pkgin update' +to update the list of available packages, and then do a 'pkgin' to get +a list of commands. For example, 'pkgin install vim' installs the +'vim' package, and 'pkgin available' will list all available packages. -If you do not have sufficient memory to run X, standard MINIX 3 supports -multiple virtual terminals. Just use ALT+F1, F2, F3 and F4 to navigate -among them. +MINIX 3 supports multiple virtual terminals. Just use ALT+F1, F2, F3 +and F4 to navigate among them. -To get rid of this message, edit /etc/motd. +For more information on how to use MINIX 3, see the wiki: +http://wiki.minix3.org. diff --git a/etc/motd.install b/etc/motd.install index 6ca3dc066..8ef9c34b4 100755 --- a/etc/motd.install +++ b/etc/motd.install @@ -1,12 +1,12 @@ -To install X Windows, run 'packman' with the install CD still in the -drive. To start X Windows after you have installed it, login as root -and type: 'xdm'. For more information about configuring X Windows, see -www.minix3.org. +To install additional packages, run 'pkgin'. First do a 'pkgin update' +to update the list of available packages, and then do a 'pkgin' to get +a list of commands. For example, 'pkgin install vim' installs the +'vim' package, and 'pkgin available' will list all available packages. -If you do not have sufficient memory to run X Windows, standard MINIX 3 -supports multiple virtual terminals. Just use ALT+F1, F2, F3 and F4 to -navigate among them. +MINIX 3 supports multiple virtual terminals. Just use ALT+F1, F2, F3 +and F4 to navigate among them. -To get rid of this message, edit /etc/motd. +For more information on how to use MINIX 3, see the wiki: +http://wiki.minix3.org. diff --git a/tools/issue.install b/tools/issue.install index dfd46c526..58269c226 100644 --- a/tools/issue.install +++ b/tools/issue.install @@ -7,8 +7,5 @@ can do by typing 'setup' while logged in as root. Then just follow the on-screen directions. After setup is complete, type 'shutdown' and when the boot monitor -starts, boot your new system by following the instructions at the end of -setup. Keep the CD-ROM in the drive, login as root and type 'packman' -to begin installing the many software packages available. After you -have installed the packages, type 'xdm' to start X Windows if you have -installed it. +starts, boot your new system by following the instructions at the end +of setup. diff --git a/tools/package_sources.install b/tools/package_sources.install deleted file mode 100644 index 9bb9f2b4e..000000000 --- a/tools/package_sources.install +++ /dev/null @@ -1,131 +0,0 @@ -CSSC-1.0.1 -PopTart-0.9.7 -Xaw3d-1.5 -antiword-0.35 -apache-1.3.37 -apr-0.9.12 -apr-util-0.9.12 -ascii-3.8 -atk-1.9.0 -autoconf-2.59 -autoconf-2.60 -automake-1.9 -avra-0.7 -bash-3.0 -bc-1.06 -bchunk-1.2.0 -bcrypt-1.1 -bison-2.1 -catdoc-0.94.2 -cpio-2.5 -ctags-5.5.4 -cvs-1.11.21 -dact-0.8.39 -diffstat-1.39 -diffutils-2.8.1 -dungeon-2.7.1 -ede-1.1 -efltk-2.0.6 -elvis -exim-4.66 -fb -flawfinder-1.26 -flex-2.5.4 -flip-1.19 -fltk-1.1.7 -fltk-2.0.0-5220 -gawk-3.1.4 -gdbm-1.8.3 -gettext-0.14 -glib-1.2.10 -glib-2.10.0 -gnupg-1.4.8 -grep-2.5.1a -groff-1.19.2 -gv-3.5.8 -gzip-1.2.4 -gzip-beta-1.3.3 -hexcat-0.0.3 -irssi-0.8.10 -jikes-1.22 -john-1.7.2 -jpeg-6b -jwm-1.8 -kermit-2.1.1 -lcrack-20040914 -less-3.8.5 -lesstif-0.93.96 -libiconv-1.9.1 -libmcrypt-2.5.7 -libpng-1.2.8 -libungif-4.1.3 -libxml2-2.6.28 -links-2.1pre26 -lpr -lynx2-8-5 -lzo-1.08 -lzop-1.01 -m4-1.4.3 -make-3.80 -mdf2iso -mtools-3.9.7 -nano-1.3.12 -nasm-0.98.38 -nawk -ncftp-3.1.9 -ncsa_httpd_1.4 -ncurses-5.5 -neon-0.25.5 -nethack-3.4.3-2 -netpbm-10.26.30 -nomarch-1.3 -nrg2iso-0.2 -nvi-1.79 -openssh-4.3p2 -openssl-0.9.8a -patch-2.5.4 -pce-0.1.7 -pcre-4.5 -pdksh-5.2.14 -picasm112c -pine-4.64 -pkg-config-0.20 -prng-3.0.2 -pscan-1.1 -pstotext-1.9 -psutils -python-2.4.3 -rcs-5.7 -readline-5.1 -rman-3.2 -robodoc-4.0.18 -rsync-2.6.7 -screen-4.0.2 -sed-3.02 -shhmsg-1.4.1 -simhv35-2 -sip-0.4 -slang-1.4.9 -slrn-0.9.8.1 -sqlite-3.3.17 -src2tex-2.12 -ssmtp-2.61 -subversion-1.4.0 -tcl8.4.14 -texinfo-4.7 -tiff-3.8.2 -tk8.4.14 -unrtf-0.19.3 -unzip-5.52 -vice-1.19 -vice-1.20 -vile-9.4 -vim-6.3 -wdiff-0.5 -webcpp-0.8.4 -wget-1.5.3 -whichman-2.4 -xv-3.10a -zip-2.31 -zlib-1.2.3 -zsh-4.2.6 diff --git a/tools/packages.install b/tools/packages.install index 95ee7daba..c28cd413c 100644 --- a/tools/packages.install +++ b/tools/packages.install @@ -1,117 +1,79 @@ -CSSC-1.0.1 -ImageMagick-6.3.1 -MPlayer-1.0rc1 -PopTart-0.9.7 -SDL-1.2.13 -X11R6.8.2 -Xaw3d-1.5 -apache-1.3.37 -apr-0.9.12 -apr-util-0.9.12 -ascii-3.8 -atk-1.9.0 -automake-1.9 -avra-0.7 -bash-3.0 -bc-1.06 +9e-1.0 +apr-1.3.9 +apr-util-1.3.9nb1 +autoconf-2.65nb2 +automake-1.11.1 +bash-2.05.2.7nb10 +bash-4.1nb1 bchunk-1.2.0 bcrypt-1.1 -binutils-2.16.1 -bison-2.1 -catdoc-0.94.2 -cvs-1.11.21 -diffutils-2.8.1 -dungeon-2.7.1 -ede-1.1 -efltk-2.0.6 -emacs-21.4 -exim-4.66 -fb -flawfinder-1.26 -flex-2.5.4 -fltk-1.1.7 -fltk-2.0.0-5220 -gawk-3.1.4 -gcc-4.4.3 -gcc-libs -gettext-0.14 -ghostscript-8.54-gpl -ghostscript-fonts-std-8.11 -glib-1.2.10 -gnu-coreutils-5.2.1 -gnupg-1.4.8 -grep-2.5.1a -groff-1.19.2 -gv-3.5.8 -gzip-1.2.4 -hexcat-0.0.3 -irssi-0.8.10 -jikes-1.22 -john-1.7.2 -jpeg-6b -jwm-1.8 -kermit-2.1.1 -lcrack-20040914 -less-3.8.5 -lesstif-0.93.96 -libiconv-1.9.1 -libpng-1.2.8 -libxml2-2.6.28 -links-2.1pre26 -lpr -lynx2-8-5 -m4-1.4.3 -make-3.80 -mdf2iso -mtools-3.9.7 -nano-1.3.12 -nawk -ncftp-3.1.9 -ncurses-5.5 -neon-0.25.5 -nethack-3.4.3-2 -nomarch-1.3 -nvi-1.79 -openssh-4.3p2 -openssl-0.9.8a -patch-2.5.4 -pce-0.1.7 -pdksh-5.2.14 -perl-5.8.7 -php-5.2.1 -pine-4.64 -pkg-config-0.20 -psutils -python-2.4.3 -qemu-0.10.5 -rcs-5.7 -readline-5.1 -rman-3.2 -rsync-2.6.7 -postgresql-8.4.0 -screen-4.0.2 -sed-3.02 -shhmsg-1.4.1 -simhv35-2 -sip-0.4 -slang-1.4.9 -slrn-0.9.8.1 -sqlite-3.3.17 -ssmtp-2.61 -subversion-1.4.0 -tcl8.4.14 -texinfo-4.7 -tiff-3.8.2 -tk8.4.14 -unrtf-0.19.3 -unzip-5.52 -vice-1.20 -vile-9.4 -vim-6.3 -webcpp-0.8.4 -wget-1.5.3 -whichman-2.4 -xv-3.10a -zip-2.31 -zlib-1.2.3 -zsh-4.2.6 +binutils-2.17nb2 +bison-2.4.2nb1 +curl-7.20.0 +db4-4.8.30 +diffutils-2.8.1nb4 +digest-20080510 +doom1-1.8 +expat-2.0.1nb2 +f2c-20090411nb4 +figlet-2.2.2nb1 +flex-2.5.35nb1 +gawk-3.1.7 +gcc44-4.4.3 +gettext-lib-0.14.6 +gettext-tools-0.14.6nb1 +gmake-3.81 +gmp-5.0.1 +grep-2.5.3 +groff-1.20.1nb2 +gsed-4.2.1 +gtar-base-1.23 +gtexinfo-4.12 +gzip-1.3.12nb3 +lcov-1.7 +libiberty-1.0nb2 +libiconv-1.12nb1 +libidn-1.19 +libtool-base-2.2.6bnb4 +lua-5.1.4nb2 +m4-1.4.14 +mdf2iso-0.3.0 +mpfr-2.4.2.3nb1 +naim-0.11.8.3.1 +nano-2.2.4 +nawk-20050424nb3 +ncurses-5.7nb3 +neon-0.29.3 +openssh-5.5.1 +openssl-0.9.8o +p5-Digest-SHA1-2.12 +p5-Error-0.17016 +p5-enum-1.016nb1 +p5-pkgsrc-Dewey-1.1 +patch-2.5.4nb2 +pax-20080110 +pdksh-5.2.14nb5 +perl-5.10.1nb1 +pkg-config-0.23nb1 +pkg_install-info-4.5nb3 +pkg_leaves-1.2 +pkgdep-1.0 +pkgdepgraph-2.8 +pkgdiff-0.122 +pkgin-0.3.3.1nb1 +pkglint-4.93 +png-1.4.2 +pth-2.0.7 +readline-6.1 +rsync-3.0.7 +scmgit-base-1.7.0.5 +sqlite3-3.6.23.1 +subversion-base-1.6.9nb1 +sudo-1.7.2p7 +unzip-6.0 +url2pkg-2.12 +vim-7.2.442 +vim-share-7.2.442 +x11-6.8.2 +x11-links-0.50 +zip-3.0nb2 diff --git a/tools/release.sh b/tools/release.sh index b7769e936..d24080b0b 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -7,13 +7,9 @@ PATH=$PATH:/usr/local/bin XBIN=usr/xbin SRC=src -# size of /tmp during build -PACKAGEDIR=/usr/bigports/Packages -PACKAGESOURCEDIR=/usr/bigports/Sources +PACKAGEDIR=/usr/pkgsrc/packages # List of packages included on installation media PACKAGELIST=packages.install -# List of package source included on installation media -PACKAGESOURCELIST=package_sources.install secs=`expr 32 '*' 64` export SHELL=/bin/sh @@ -66,15 +62,14 @@ retrieve() { dir=$1 list=`pwd`/$2 - url=http://www.minix3.org/$3 -BIGPORTS=bigports + url=${PACKAGEURL} ( cd $dir || exit 1 echo " * Updating $dir from $url with $list" - files=`awk <$list '{ print "'$url'/" $1 ".tar.bz2" }'` - wget -c $url/List $files || true + files=`awk <$list '{ print "'$url'/" $1 ".tgz" }'` + fetch -r $files || true ) } @@ -166,7 +161,6 @@ fitfs() RELEASEDIR=/usr/r-staging RELEASEMNTDIR=/usr/r RELEASEPACKAGE=${RELEASEDIR}/usr/install/packages -RELEASEPACKAGESOURCES=${RELEASEDIR}/usr/install/package-sources IMAGE=../boot/cdbootblock ROOTIMAGE=rootimage @@ -233,11 +227,8 @@ then ZIP=bzip2 fi if [ $PACKAGES -ne 0 ] -then mkdir -p $PACKAGEDIR || true - mkdir -p $PACKAGESOURCEDIR || true - rm -f $PACKAGEDIR/List - retrieve $PACKAGEDIR $PACKAGELIST packages/`uname -p`/`uname -r` - retrieve $PACKAGESOURCEDIR $PACKAGESOURCELIST software +then mkdir -p $PACKAGEDIR/All || true + retrieve $PACKAGEDIR/All $PACKAGELIST packages/`uname -p`/`uname -r` fi if [ "$COPY" -ne 1 ] @@ -277,7 +268,6 @@ mkdir -p $RELEASEDIR/$XBIN mkdir -p $RELEASEDIR/usr/bin mkdir -p $RELEASEDIR/bin mkdir -p $RELEASEPACKAGE -mkdir -p $RELEASEPACKAGESOURCES echo " * Transfering bootstrap dirs to $RELEASEDIR" cp -p /bin/* /usr/bin/* /sbin/* $RELEASEDIR/$XBIN @@ -285,29 +275,54 @@ cp -rp /usr/lib $RELEASEDIR/usr cp -rp /bin/sh /bin/echo $RELEASEDIR/bin cp -rp /usr/bin/make /usr/bin/install /usr/bin/yacc /usr/bin/lex /usr/bin/asmconv $RELEASEDIR/usr/bin -if [ -d $PACKAGEDIR -a -d $PACKAGESOURCEDIR -a -f $PACKAGELIST -a -f $PACKAGESOURCELIST -a $PACKAGES -ne 0 ] -then echo " * Transfering $PACKAGEDIR to $RELEASEPACKAGE" - : >$RELEASEPACKAGE/List +if [ -d $PACKAGEDIR -a -f $PACKAGELIST -a $PACKAGES -ne 0 ] +then + index=pkg_summary + indexpath=$PACKAGEDIR/.index + + if [ ! -d $indexpath ] + then mkdir $indexpath + fi + if [ ! -d $indexpath ] + then echo "Couldn't create $indexpath." + exit 1 + fi + + echo "" >$PACKAGEDIR/All/$index + + echo " * Transfering $PACKAGEDIR to $RELEASEPACKAGE" for p in `cat $PACKAGELIST` - do if [ -f $PACKAGEDIR/$p.tar.bz2 ] - then - cp $PACKAGEDIR/$p.tar.bz2 $RELEASEPACKAGE/ - grep "^$p|" $PACKAGEDIR/List >>$RELEASEPACKAGE/List || echo "$p not found in List" - else - echo "Can't copy $PACKAGEDIR/$p.tar.bz2. Missing." - fi - done - - echo " * Transfering $PACKAGESOURCEDIR to $RELEASEPACKAGESOURCES" - for p in `cat $PACKAGESOURCELIST` - do - if [ -f $PACKAGESOURCEDIR/$p.tar.bz2 ] + do if [ -f $PACKAGEDIR/All/$p.tgz ] then - cp $PACKAGESOURCEDIR/$p.tar.bz2 $RELEASEPACKAGESOURCES/ + # Copy package and create package's index + ( + cd $PACKAGEDIR/All + cp $p.tgz $RELEASEPACKAGE/ + + f=$p.tgz + indexname=$indexpath/$f.$index + pkg_info -X $f >$indexname + + if [ ! -f $indexname ] + then echo Missing $indexname. + exit 1 + fi + + if [ "`wc -l $indexname`" -lt 3 ] + then $indexname is too short. + rm $indexname + exit 1 + fi + + cat $indexname >>$PACKAGEDIR/All/$index + ) else - echo "Can't copy $PACKAGESOURCEDIR/$p.tar.bz2. Missing." + echo "Can't copy $PACKAGEDIR/$p.tgz. Missing." fi done + + bzip2 -f $PACKAGEDIR/All/$index + cp $PACKAGEDIR/All/$index.bz2 $RELEASEPACKAGE/ fi # Make sure compilers and libraries are root-owned @@ -377,12 +392,10 @@ cp chrootmake.sh $RELEASEDIR/usr/$SRC/tools/chrootmake.sh echo " * Make hierarchy" chroot $RELEASEDIR "PATH=/$XBIN sh -x /usr/$SRC/tools/chrootmake.sh etcfiles" || exit 1 -if [ "$COPY" -ne 1 ] -then for p in $PREINSTALLED_PACKAGES - do echo " * Pre-installing: $p from $url" - pkg_add -P $RELEASEDIR $PACKAGEURL/$p - done -fi +for p in $PREINSTALLED_PACKAGES +do echo " * Pre-installing: $p from $url" + pkg_add -P $RELEASEDIR $PACKAGEURL/$p +done echo " * Chroot build" chroot $RELEASEDIR "PATH=/$XBIN MAKEMAP=$MAKEMAP sh -x /usr/$SRC/tools/chrootmake.sh" || exit 1