release.sh (df5e2cbe16c763a318e99e672fe06da882df445b) release.sh (34d63eb56086384594a6c97e5128f9602e0fdaaf)
1#!/bin/sh
2#-
3# Copyright (c) 2013 Glen Barber
4# Copyright (c) 2011 Nathan Whitehorn
5# All rights reserved.
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions

--- 31 unchanged lines hidden (view full) ---

40
41# The default svn checkout server, and svn branches for src/, doc/,
42# and ports/.
43SVNROOT="svn://svn.freebsd.org"
44SRCBRANCH="base/head@rHEAD"
45DOCBRANCH="doc/head@rHEAD"
46PORTBRANCH="ports/head@rHEAD"
47
1#!/bin/sh
2#-
3# Copyright (c) 2013 Glen Barber
4# Copyright (c) 2011 Nathan Whitehorn
5# All rights reserved.
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions

--- 31 unchanged lines hidden (view full) ---

40
41# The default svn checkout server, and svn branches for src/, doc/,
42# and ports/.
43SVNROOT="svn://svn.freebsd.org"
44SRCBRANCH="base/head@rHEAD"
45DOCBRANCH="doc/head@rHEAD"
46PORTBRANCH="ports/head@rHEAD"
47
48# Set for embedded device builds.
49EMBEDDEDBUILD=
50
48# Sometimes one needs to checkout src with --force svn option.
49# If custom kernel configs copied to src tree before checkout, e.g.
50SRC_FORCE_CHECKOUT=
51
52# The default make.conf and src.conf to use. Set to /dev/null
53# by default to avoid polluting the chroot(8) environment with
54# non-default settings.
55MAKE_CONF="/dev/null"

--- 37 unchanged lines hidden (view full) ---

93 ;;
94 \?)
95 usage
96 ;;
97 esac
98done
99shift $(($OPTIND - 1))
100
51# Sometimes one needs to checkout src with --force svn option.
52# If custom kernel configs copied to src tree before checkout, e.g.
53SRC_FORCE_CHECKOUT=
54
55# The default make.conf and src.conf to use. Set to /dev/null
56# by default to avoid polluting the chroot(8) environment with
57# non-default settings.
58MAKE_CONF="/dev/null"

--- 37 unchanged lines hidden (view full) ---

96 ;;
97 \?)
98 usage
99 ;;
100 esac
101done
102shift $(($OPTIND - 1))
103
104if [ "x${EMBEDDEDBUILD}" != "x" ]; then
105 WITH_DVD=
106 NODOC=yes
107fi
108
101# If PORTS is set and NODOC is unset, force NODOC=yes because the ports tree
102# is required to build the documentation set.
103if [ "x${NOPORTS}" != "x" ] && [ "x${NODOC}" = "x" ]; then
104 echo "*** NOTICE: Setting NODOC=1 since ports tree is required"
105 echo " and NOPORTS is set."
106 NODOC=yes
107fi
108

--- 70 unchanged lines hidden (view full) ---

179 mkdir -p ${CHROOTDIR}/$(dirname ${MAKE_CONF})
180 cp ${MAKE_CONF} ${CHROOTDIR}/${MAKE_CONF}
181fi
182if [ -e ${SRC_CONF} ] && [ ! -c ${SRC_CONF} ]; then
183 mkdir -p ${CHROOTDIR}/$(dirname ${SRC_CONF})
184 cp ${SRC_CONF} ${CHROOTDIR}/${SRC_CONF}
185fi
186
109# If PORTS is set and NODOC is unset, force NODOC=yes because the ports tree
110# is required to build the documentation set.
111if [ "x${NOPORTS}" != "x" ] && [ "x${NODOC}" = "x" ]; then
112 echo "*** NOTICE: Setting NODOC=1 since ports tree is required"
113 echo " and NOPORTS is set."
114 NODOC=yes
115fi
116

--- 70 unchanged lines hidden (view full) ---

187 mkdir -p ${CHROOTDIR}/$(dirname ${MAKE_CONF})
188 cp ${MAKE_CONF} ${CHROOTDIR}/${MAKE_CONF}
189fi
190if [ -e ${SRC_CONF} ] && [ ! -c ${SRC_CONF} ]; then
191 mkdir -p ${CHROOTDIR}/$(dirname ${SRC_CONF})
192 cp ${SRC_CONF} ${CHROOTDIR}/${SRC_CONF}
193fi
194
195# Embedded builds do not use the 'make release' target.
196if [ "X${EMBEDDEDBUILD}" != "X" ]; then
197 if [ -e ${CHROOTDIR}/usr/src/release/${XDEV}/release.sh ]; then
198 /bin/sh ${CHROOTDIR}/usr/src/release/${XDEV}/release.sh
199 fi
200 # If the script does not exist for this architecture, exit.
201 # This probably should be checked earlier, but allowing the rest
202 # of the build process to get this far will at least set up the
203 # chroot environment for testing.
204 exit 0
205else
206 # Not embedded.
207 continue
208fi
209
187if [ -d ${CHROOTDIR}/usr/ports ]; then
188 # Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints
189 # is created. This is needed by ports-mgmt/pkg.
190 chroot ${CHROOTDIR} /etc/rc.d/ldconfig forcerestart
191
192 ## Trick the ports 'run-autotools-fixup' target to do the right thing.
193 _OSVERSION=$(sysctl -n kern.osreldate)
194 if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then

--- 17 unchanged lines hidden ---
210if [ -d ${CHROOTDIR}/usr/ports ]; then
211 # Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints
212 # is created. This is needed by ports-mgmt/pkg.
213 chroot ${CHROOTDIR} /etc/rc.d/ldconfig forcerestart
214
215 ## Trick the ports 'run-autotools-fixup' target to do the right thing.
216 _OSVERSION=$(sysctl -n kern.osreldate)
217 if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then

--- 17 unchanged lines hidden ---