generate-release.sh (222074) | generate-release.sh (223897) |
---|---|
1#!/bin/sh 2 3# generate-release.sh: check out source trees, and build release components with 4# totally clean, fresh trees. 5# 6# Usage: generate-release.sh svn-branch scratch-dir 7# 8# Environment variables: 9# CVSUP_HOST: Host of a cvsup server to obtain the ports and documentation 10# trees. This or CVSROOT must be set to include ports and documentation. 11# CVSROOT: CVS root to obtain the ports and documentation trees. This or 12# CVSUP_HOST must be set to include ports and documentation. 13# CVS_TAG: CVS tag for ports and documentation (HEAD by default) 14# SVNROOT: SVN URL to FreeBSD source repository (by default, 15# svn://svn.freebsd.org/base) 16# MAKE_FLAGS: optional flags to pass to make (e.g. -j) 17# 18# Note: Since this requires a chroot, release cross-builds will not work! 19# | 1#!/bin/sh 2 3# generate-release.sh: check out source trees, and build release components with 4# totally clean, fresh trees. 5# 6# Usage: generate-release.sh svn-branch scratch-dir 7# 8# Environment variables: 9# CVSUP_HOST: Host of a cvsup server to obtain the ports and documentation 10# trees. This or CVSROOT must be set to include ports and documentation. 11# CVSROOT: CVS root to obtain the ports and documentation trees. This or 12# CVSUP_HOST must be set to include ports and documentation. 13# CVS_TAG: CVS tag for ports and documentation (HEAD by default) 14# SVNROOT: SVN URL to FreeBSD source repository (by default, 15# svn://svn.freebsd.org/base) 16# MAKE_FLAGS: optional flags to pass to make (e.g. -j) 17# 18# Note: Since this requires a chroot, release cross-builds will not work! 19# |
20# $FreeBSD: head/release/generate-release.sh 222074 2011-05-18 17:39:28Z nwhitehorn $ | 20# $FreeBSD: head/release/generate-release.sh 223897 2011-07-09 23:01:54Z nwhitehorn $ |
21# 22 23mkdir -p $2/usr/src 24set -e # Everything must succeed 25 26svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src 27if [ ! -z $CVSUP_HOST ]; then 28 cat > $2/docports-supfile << EOF --- 23 unchanged lines hidden (view full) --- 52 53 # Checkout ports and doc trees 54 chroot $2 /usr/bin/csup /docports-supfile 55fi 56 57if [ -d $2/usr/doc ]; then 58 cp /etc/resolv.conf $2/etc/resolv.conf 59 | 21# 22 23mkdir -p $2/usr/src 24set -e # Everything must succeed 25 26svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src 27if [ ! -z $CVSUP_HOST ]; then 28 cat > $2/docports-supfile << EOF --- 23 unchanged lines hidden (view full) --- 52 53 # Checkout ports and doc trees 54 chroot $2 /usr/bin/csup /docports-supfile 55fi 56 57if [ -d $2/usr/doc ]; then 58 cp /etc/resolv.conf $2/etc/resolv.conf 59 |
60 # Build ports to build the docs, then build the docs | 60 # Build ports to build release documentation |
61 chroot $2 /bin/sh -c 'pkg_add -r docproj || (cd /usr/ports/textproc/docproj && make install clean BATCH=yes WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes)' | 61 chroot $2 /bin/sh -c 'pkg_add -r docproj || (cd /usr/ports/textproc/docproj && make install clean BATCH=yes WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes)' |
62 chroot $2 make -C /usr/doc $MAKE_FLAGS 'FORMATS=html html-split txt' URLS_ABSOLUTE=YES | |
63fi 64 65chroot $2 make -C /usr/src $MAKE_FLAGS buildworld buildkernel 66chroot $2 make -C /usr/src/release release 67chroot $2 make -C /usr/src/release install DESTDIR=/R 68 | 62fi 63 64chroot $2 make -C /usr/src $MAKE_FLAGS buildworld buildkernel 65chroot $2 make -C /usr/src/release release 66chroot $2 make -C /usr/src/release install DESTDIR=/R 67 |