pkg-stage.sh revision 276822
1#!/bin/sh 2# 3# $FreeBSD: head/release/scripts/pkg-stage.sh 276822 2015-01-08 14:39:53Z gjb $ 4# 5 6set -e 7 8export ASSUME_ALWAYS_YES="YES" 9export PKG_DBDIR="/tmp/pkg" 10export PERMISSIVE="YES" 11export REPO_AUTOUPDATE="NO" 12export PKGCMD="/usr/sbin/pkg -d" 13 14DVD_PACKAGES="archivers/unzip 15devel/subversion 16devel/subversion-static 17emulators/linux_base-f10 18misc/freebsd-doc-all 19net/mpd5 20net/rsync 21ports-mgmt/pkg 22ports-mgmt/portmaster 23shells/bash 24shells/zsh 25security/sudo 26sysutils/screen 27www/firefox 28www/links 29x11-drivers/xf86-video-vmware 30x11/gnome2 31x11/kde4 32x11/xorg" 33 34# If NOPORTS is set for the release, do not attempt to build pkg(8). 35if [ ! -f /usr/ports/Makefile ]; then 36 echo "*** /usr/ports is missing! ***" 37 echo "*** Skipping pkg-stage.sh ***" 38 echo "*** Unset NOPORTS to fix this ***" 39 exit 0 40fi 41 42if [ ! -x /usr/local/sbin/pkg ]; then 43 /etc/rc.d/ldconfig restart 44 /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean 45fi 46 47export DVD_DIR="dvd/packages" 48export PKG_ABI=$(pkg config ABI) 49export PKG_ALTABI=$(pkg config ALTABI 2>/dev/null) 50export PKG_REPODIR="${DVD_DIR}/${PKG_ABI}" 51 52/bin/mkdir -p ${PKG_REPODIR} 53if [ ! -z "${PKG_ALTABI}" ]; then 54 (cd ${DVD_DIR} && ln -s ${PKG_ABI} ${PKG_ALTABI}) 55fi 56 57# Print pkg(8) information to make debugging easier. 58${PKGCMD} -vv 59${PKGCMD} update -f 60${PKGCMD} fetch -o ${PKG_REPODIR} -d ${DVD_PACKAGES} 61 62# Create the 'Latest/pkg.txz' symlink so 'pkg bootstrap' works 63# using the on-disc packages. 64mkdir -p ${PKG_REPODIR}/Latest 65(cd ${PKG_REPODIR}/Latest && \ 66 ln -s ../All/$(${PKGCMD} rquery %n-%v pkg).txz pkg.txz) 67 68${PKGCMD} repo ${PKG_REPODIR} 69 70# Always exit '0', even if pkg(8) complains about conflicts. 71exit 0 72