xref: /freebsd/release/scripts/pkg-stage.sh (revision 9ecd54f24fe9fa373e07c9fd7c052deb2188f545)
1#!/bin/sh
2#
3# $FreeBSD$
4#
5
6set -e
7
8export ASSUME_ALWAYS_YES=1
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	exit 0
37fi
38
39if [ ! -x /usr/local/sbin/pkg ]; then
40	/usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean
41fi
42
43export PKG_ABI=$(pkg -vv | grep ^ABI | awk '{print $3}')
44export PKG_CACHEDIR="dvd/packages/${PKG_ABI}"
45
46/bin/mkdir -p ${PKG_CACHEDIR}
47
48# Print pkg(8) information to make debugging easier.
49${PKGCMD} -vv
50${PKGCMD} update -f
51${PKGCMD} fetch -d ${DVD_PACKAGES}
52
53${PKGCMD} repo ${PKG_CACHEDIR}
54
55# Always exit '0', even if pkg(8) complains about conflicts.
56exit 0
57