Index: user/cperciva/freebsd-update-build/scripts/10.0-BETA1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-BETA1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-BETA1/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=226b88265e11accd4a873d5fa49e4eaf87f22c00a6580c23879bd18cdb6077b3 + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/10.0-BETA1 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1387065599 Property changes on: user/cperciva/freebsd-update-build/scripts/10.0-BETA1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.0-BETA1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-BETA1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-BETA1/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 VERSION="FreeBSD 10.0-BETA1 amd64 1000500" \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.0-BETA2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-BETA2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-BETA2/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=d0831ade5cfdc91c29a6574a615041502b29e78472c794a4bdee2763665b0b09 + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/10.0-BETA2 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1385855999 Property changes on: user/cperciva/freebsd-update-build/scripts/10.0-BETA2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.0-BETA2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-BETA2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-BETA2/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 VERSION="FreeBSD 10.0-BETA2 amd64 1000501" \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.0-BETA3/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-BETA3/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-BETA3/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=ffae9adf91e6030e0f83fecb4fe1a1cc3e8478efddbd0e2cfa5457b3e01a5134 + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/10.0-BETA3/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1386374399 Property changes on: user/cperciva/freebsd-update-build/scripts/10.0-BETA3/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.0-BETA3/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-BETA3/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-BETA3/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 VERSION="FreeBSD 10.0-BETA3 amd64 1000501" \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.0-BETA4/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-BETA4/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-BETA4/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=bc85096a98fa261070ae7362225a5b7d63b60bc28525aba0c226917924c5a7ee + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/10.0-BETA4/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1388361599 Property changes on: user/cperciva/freebsd-update-build/scripts/10.0-BETA4/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.0-BETA4/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-BETA4/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-BETA4/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 VERSION="FreeBSD 10.0-BETA3 amd64 1000501" \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.0-RC1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-RC1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-RC1/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=f41c8d4b78cfb6ec0cca4ad21f937fe1e6a65e7b61167467860110c3290d650e + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/10.0-RC1 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1391817600 Property changes on: user/cperciva/freebsd-update-build/scripts/10.0-RC1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.0-RC1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-RC1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-RC1/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.0-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=6525da2d1feddb1f16d615d76e5a4662c6fdd9a34869ce355c604f5ff147773d + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/10.0-RC2 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1392422400 Property changes on: user/cperciva/freebsd-update-build/scripts/10.0-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.0-RC2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-RC2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-RC2/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.0-RC3/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-RC3/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-RC3/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# SHA256 hash of disc1.iso image. +export RELH=a4b16d3e4e04f1dbb9184fdbe18d6587124a6ea2a1794f79122d57373865ab6b + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/10.0-RC3 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1393200000 + Property changes on: user/cperciva/freebsd-update-build/scripts/10.0-RC3/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.0-RC3/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-RC3/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-RC3/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.0-RC4/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-RC4/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-RC4/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# SHA256 hash of disc1.iso image. +export RELH=5f231601641cabb518d6d3e6c608400bd2d865fe08c79dc6cdfbc9f48c532b94 + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/10.0-RC4 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1393891200 + Property changes on: user/cperciva/freebsd-update-build/scripts/10.0-RC4/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.0-RC4/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-RC4/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-RC4/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.0-RC5/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-RC5/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-RC5/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# SHA256 hash of disc1.iso image. +export RELH=9b9f00af75fcbdd3ffae8f8a29943a3c24223989d5088e36cd21b9fcaec06280 + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/10.0-RC5 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1394323200 + Property changes on: user/cperciva/freebsd-update-build/scripts/10.0-RC5/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.0-RC5/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-RC5/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-RC5/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.0-RELEASE/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-RELEASE/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.0-RELEASE/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=9c377b4a4e63443c0b210080694de26133e6a276eddb07c7e00e1c9aebd84109 + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/10.0-RELEASE + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1425168000 Property changes on: user/cperciva/freebsd-update-build/scripts/10.0-RELEASE/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.0-RELEASE/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.0-RELEASE/build.subr (revision 293355) +++ user/cperciva/freebsd-update-build/scripts/10.0-RELEASE/build.subr (revision 293356) @@ -1,199 +1,199 @@ # Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. # Download and verify a release ISO image. fetchiso () { log "Starting fetch" # Figure out where the disc1 ISO image is RELNUM=${REL%-*} # ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso # Fetch the ISO image. We consider the ISO image to be # the One True Release and don't look at the files used # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP # files were not identical, but this should never happen # again. fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 log "Verifying dvd1 hash" # Check that the downloaded ISO has the correct hash. if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." rm ${WORKDIR}/iso.img return 1 fi } # Extract the released trees and, if appropriate, construct a world (base # plus source code) in which to perform builds. extractiso () { # Create and mount a md(4) attached to the ISO image. ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` mkdir -p ${WORKDIR}/iso mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso # Extract the various components into different directories log "Extracting components" for C in ${WORLDPARTS}; do mkdir -p ${WORKDIR}/release/R/trees/world/${C} cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} done for C in ${KERNELPARTS}; do mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} done for C in ${SOURCEPARTS}; do mkdir -p ${WORKDIR}/release/R/trees/src/${C} cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} done # If the release ISO we're handling belongs to the platform # we're running right now, create a world image for future use. - # XXX delphij if [ ${TARGET} = ${HOSTPLATFORM} ]; then + if [ ${TARGET} = ${HOSTPLATFORM} ]; then log "Constructing world+src image" # Create directory for world mkdir ${WORKDIR}/world/ # Extract world and source distributions for C in ${WORLDPARTS}; do cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | tar -xpzf - -C ${WORKDIR}/world/ done for C in ${SOURCEPARTS}; do cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | tar -xpzf - -C ${WORKDIR}/world/ done # build a single tarball of them. tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . # clean up nuke world - # XXX delphij fi + fi # Unmount and detach the ISO image md(4). umount ${WORKDIR}/iso rmdir ${WORKDIR}/iso mdconfig -d -u ${ISOMD} } # Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 buildworld () { # We need a devfs inside the jail. Note that we are using a # jail here in order to keep the environment as "clean" as # possible, not for security reasons; we assume that the # original source code plus patches we add personally will # not do anything evil. mount -t devfs devfs ${WORKDIR}/$1/dev # We need to be able to set file flags sysctl security.jail.chflags_allowed=1 >/dev/null # Build stuff. jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ - BRANCH_OVERRIDE=$2 \ + BRANCH_OVERRIDE=$2 \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log # Function for logging what we're doing log () { echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 } # Build the world log "Building world" cd /usr/src && make buildworld -j17 2>&1 # Build and kernel log "Building kernel" cd /usr/src && make buildkernel -j17 2>&1 # Build and install release images log "Building release" cd /usr/src/release && - make release NODVD= 2>&1 && - make install NODVD= DESTDIR=/R 2>&1 + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 EOF # Put all the components into the right places. log "Moving components into staging area" jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ /usr/bin/env -i PATH=${PATH} \ WORLDPARTS="${WORLDPARTS}" \ KERNELPARTS="${KERNELPARTS}" \ SOURCEPARTS="${SOURCEPARTS}" \ /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log # Create area for uncompressed components mkdir -p /R/trees # Move world components into place for C in ${WORLDPARTS}; do mkdir -p /R/trees/world/${C} cat /R/ftp/${C}.txz | tar -xpzf - -C /R/trees/world/${C} done # Move kernel components into place for C in ${KERNELPARTS}; do mkdir -p /R/trees/kernel/${C} cat /R/ftp/${C}.txz | tar -xpzf - -C /R/trees/kernel/${C} done # Extract src components into place for C in ${SOURCEPARTS}; do mkdir -p /R/trees/src/${C} cat /R/ftp/${C}.txz | tar -xpzf - -C /R/trees/src/${C} done EOF # Get rid of the devfs we no longer need. umount ${WORKDIR}/$1/dev } # Perform a build in ${WORKDIR}/$1, but with the date set 400 days # into the future. Turn off NTP before we change the date and # turn it back on afterwards. futurebuildworld () { # Turn off ntpd if necessary if /etc/rc.d/ntpd status | grep -q 'is running'; then ntpd_was_running=1 log "Turning off NTP" /etc/rc.d/ntpd stop >/dev/null else ntpd_was_running=0 fi date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null buildworld $1 FUTUREBUILD date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null # Turn ntpd back on, if appropriate if [ ${ntpd_was_running} = 1 ]; then log "Turning NTP back on" /etc/rc.d/ntpd start >/dev/null fi } # Add extra docs to ${WORKDIR}/$1 addextradocs () { log "Extracting extra docs" # 8.0 doesn't have any extra docs } # Fixup: the "kernel" kernel is really the "generic" kernel. indexpublish () { sed -E 's,kernel\|kernel,kernel|generic,' } Index: user/cperciva/freebsd-update-build/scripts/10.1-BETA1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.1-BETA1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.1-BETA1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# SHA256 hash of disc1.iso image. +export RELH=318f79d5f1822b73ed84c5f29f7a88a9fba6fceb4201a745e322f35a1d3fca72 + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/10.1-BETA1 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1413158400 + Property changes on: user/cperciva/freebsd-update-build/scripts/10.1-BETA1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.1-BETA1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.1-BETA1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.1-BETA1/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.1-BETA2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.1-BETA2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.1-BETA2/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# SHA256 hash of disc1.iso image. +export RELH=ac8505cfd22f1ad1dcc34b959498c335f60e33cdddaaea9a7bb67c82dac41bee + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/10.1-BETA2 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1413763200 + Property changes on: user/cperciva/freebsd-update-build/scripts/10.1-BETA2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.1-BETA2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.1-BETA2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.1-BETA2/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.1-BETA3/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.1-BETA3/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.1-BETA3/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# SHA256 hash of disc1.iso image. +export RELH=0f4da9d3d2e7212d11dceccc69578a9758ca0e80d5ae418d2269f2668b27e8d5 + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/10.1-BETA3 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1414454400 + Property changes on: user/cperciva/freebsd-update-build/scripts/10.1-BETA3/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.1-BETA3/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.1-BETA3/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.1-BETA3/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.1-RC1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.1-RC1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.1-RC1/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +export RELH=ca81416dfe24ba79b902bdf4fbb904e7ab8490f14cd32a4a6ccd87f51d9d9578 +export FTP=https://people.freebsd.org/~gjb/10.1-RC1/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1413763200 Property changes on: user/cperciva/freebsd-update-build/scripts/10.1-RC1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.1-RC1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.1-RC1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.1-RC1/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.1-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.1-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.1-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +export RELH=17c9ca37e8886c7185bec8e079e24c3673ed6fa390076adfe83be87c016d07c1 +export FTP=https://people.freebsd.org/~gjb/10.1-RC2/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1415750400 Property changes on: user/cperciva/freebsd-update-build/scripts/10.1-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.1-RC2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.1-RC2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.1-RC2/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.1-RC3/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.1-RC3/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.1-RC3/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +export RELH=19bf2d44437f16a34a85ec6f12c9e041204520f958326efb2d6047ae79fde3bb +export FTP=https://people.freebsd.org/~gjb/10.1-RC3/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1416873600 Property changes on: user/cperciva/freebsd-update-build/scripts/10.1-RC3/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.1-RC3/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.1-RC3/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.1-RC3/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.1-RC4/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.1-RC4/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.1-RC4/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +export RELH=6d383269211de555de7678cd5adb89aa239c88aa77bb929da464c2e390aed6db +export FTP=https://people.freebsd.org/~gjb/10.1-RC4/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1417392000 Property changes on: user/cperciva/freebsd-update-build/scripts/10.1-RC4/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.1-RC4/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.1-RC4/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.1-RC4/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.2-BETA1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.2-BETA1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.2-BETA1/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +export RELH=be2db9c92da93b4b0d810b081e29efbc8f119a8cb1032393fe8215d6288d2071 +export FTP=https://people.freebsd.org/~gjb/10.2-BETA1/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1437782400 Property changes on: user/cperciva/freebsd-update-build/scripts/10.2-BETA1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.2-BETA1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.2-BETA1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.2-BETA1/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.2-BETA2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.2-BETA2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.2-BETA2/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +export RELH=93af0e90f9bd804a8f719fc2ecbb92631debe8e0c46bf6d2f2ebf078a38e1242 +export FTP=https://people.freebsd.org/~gjb/10.2-BETA2/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1438300800 Property changes on: user/cperciva/freebsd-update-build/scripts/10.2-BETA2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.2-BETA2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.2-BETA2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.2-BETA2/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.2-RC1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.2-RC1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.2-RC1/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +export RELH=ff1447260611b503613411a7d9e768ffc73e4597fe519504749a9f0327ea5933 +export FTP=https://people.freebsd.org/~gjb/10.2-RC1/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1438992000 Property changes on: user/cperciva/freebsd-update-build/scripts/10.2-RC1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.2-RC1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.2-RC1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.2-RC1/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.2-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.2-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.2-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +export RELH=81d0697402324751ad7d044c2322efcafe65d99c83f53f7bf18cf37ec7ae20a4 +export FTP=https://people.freebsd.org/~gjb/10.2-RC2/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1439596800 Property changes on: user/cperciva/freebsd-update-build/scripts/10.2-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.2-RC2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.2-RC2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.2-RC2/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/10.2-RC3/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.2-RC3/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.2-RC3/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +export RELH=d03e086c6da2c113736ae5971195ca13be3de0c33ea25a0ee94826c80aea4bf8 +export FTP=https://people.freebsd.org/~gjb/10.2-RC3/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1441324800 Property changes on: user/cperciva/freebsd-update-build/scripts/10.2-RC3/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/10.2-RC3/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/10.2-RC3/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/10.2-RC3/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release NODVD=y 2>&1 && + make install NODVD=y DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/5.5-RELEASE/i386/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/5.5-RELEASE/i386/build.conf (revision 293355) +++ user/cperciva/freebsd-update-build/scripts/5.5-RELEASE/i386/build.conf (revision 293356) @@ -1,13 +1,15 @@ +# $FreeBSD$ + # SHA256 hash of RELEASE disc1.iso image. export RELH=40d41ec7b567e7952d0f85729f340d409911368808256dae123ff1b97155c1ae # Components of the world, source, and kernels export WORLDPARTS="base catpages dict doc games info manpages proflibs \ compat1x compat20 compat21 compat22 compat3x compat4x" export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ lib libexec release rescue sbin secure share sys tools \ ubin usbin" export KERNELPARTS="" # EOL date export EOL=1212303600 Index: user/cperciva/freebsd-update-build/scripts/6.0-RELEASE/i386/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/6.0-RELEASE/i386/build.conf (revision 293355) +++ user/cperciva/freebsd-update-build/scripts/6.0-RELEASE/i386/build.conf (revision 293356) @@ -1,13 +1,15 @@ +# $FreeBSD$ + # SHA256 hash of RELEASE disc1.iso image. export RELH=0ad601dae704e941beb7d4617bf96b04055849a24835275c716f518eee7a12f1 # Components of the world, source, and kernels export WORLDPARTS="base catpages dict doc games info manpages proflibs" export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ lib libexec release rescue sbin secure share sys tools \ ubin usbin" export KERNELPARTS="" # EOL date export EOL=1164960000 Index: user/cperciva/freebsd-update-build/scripts/6.1-RELEASE/i386/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/6.1-RELEASE/i386/build.conf (revision 293355) +++ user/cperciva/freebsd-update-build/scripts/6.1-RELEASE/i386/build.conf (revision 293356) @@ -1,13 +1,15 @@ +# $FreeBSD$ + # SHA256 hash of RELEASE disc1.iso image. export RELH=cbc6f9389c85f3130baff5270316ece18d5e324e82f8aa167c61ab49174dd4d1 # Components of the world, source, and kernels export WORLDPARTS="base catpages dict doc games info manpages proflibs" export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ lib libexec release rescue sbin secure share sys tools \ ubin usbin" export KERNELPARTS="generic smp" # EOL date export EOL=1212303600 Index: user/cperciva/freebsd-update-build/scripts/6.2-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/6.2-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/6.2-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=43c934950d65c8b2412ed4b367ef3ec08eb46ab103620165bad093ef90d478a6 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ + lib libexec release rescue sbin secure share sys tools \ + ubin usbin" +export KERNELPARTS="generic smp" + +# EOL date +export EOL=1169856000 Property changes on: user/cperciva/freebsd-update-build/scripts/6.2-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/6.2-RC2/i386/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/6.2-RC2/i386/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/6.2-RC2/i386/build.conf (revision 293356) @@ -0,0 +1,12 @@ +# SHA256 hash of RELEASE disc1.iso image. +export RELH=900561ee5b32ef5dd5c68444f759c941f59f7dea310dd08d09d3c233fad61618 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info manpages proflibs" +export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ + lib libexec release rescue sbin secure share sys tools \ + ubin usbin" +export KERNELPARTS="generic smp" + +# EOL date +export EOL=1169856000 Property changes on: user/cperciva/freebsd-update-build/scripts/6.2-RC2/i386/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/6.2-RELEASE/i386/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/6.2-RELEASE/i386/build.conf (revision 293355) +++ user/cperciva/freebsd-update-build/scripts/6.2-RELEASE/i386/build.conf (revision 293356) @@ -1,12 +1,14 @@ +# $FreeBSD$ + # SHA256 hash of RELEASE disc1.iso image. export RELH=2099715d561df721833322bc56a4fa8b02c2b77713a1e0bc17fc4b2dded20212 # Components of the world, source, and kernels export WORLDPARTS="base catpages dict doc games info manpages proflibs" export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ lib libexec release rescue sbin secure share sys tools \ ubin usbin" export KERNELPARTS="generic smp" # EOL date -export EOL=1212303600 +export EOL=1201824000 Index: user/cperciva/freebsd-update-build/scripts/6.3-BETA1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/6.3-BETA1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/6.3-BETA1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=85776bc6605dc24bfb392715907600624235e2904633e74d5978f53eba662769 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ + lib libexec release rescue sbin secure share sys tools \ + ubin usbin" +export KERNELPARTS="generic smp" + +# EOL date +export EOL=1196409600 Property changes on: user/cperciva/freebsd-update-build/scripts/6.3-BETA1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/6.3-BETA1/i386/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/6.3-BETA1/i386/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/6.3-BETA1/i386/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=2099715d561df721833322bc56a4fa8b02c2b77713a1e0bc17fc4b2dded20212 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info manpages proflibs" +export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ + lib libexec release rescue sbin secure share sys tools \ + ubin usbin" +export KERNELPARTS="generic smp" + +# EOL date +export EOL=1201824000 Property changes on: user/cperciva/freebsd-update-build/scripts/6.3-BETA1/i386/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/6.3-BETA2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/6.3-BETA2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/6.3-BETA2/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=fb984280db669f1fd7f2babe2b7d8f29c8a58f6a8ca8f4b000fc1417d6ad0248 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ + lib libexec release rescue sbin secure share sys tools \ + ubin usbin" +export KERNELPARTS="generic smp" + +# EOL date +export EOL=1197504000 Property changes on: user/cperciva/freebsd-update-build/scripts/6.3-BETA2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/6.3-BETA2/i386/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/6.3-BETA2/i386/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/6.3-BETA2/i386/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=2099715d561df721833322bc56a4fa8b02c2b77713a1e0bc17fc4b2dded20212 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info manpages proflibs" +export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ + lib libexec release rescue sbin secure share sys tools \ + ubin usbin" +export KERNELPARTS="generic smp" + +# EOL date +export EOL=1201824000 Property changes on: user/cperciva/freebsd-update-build/scripts/6.3-BETA2/i386/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/6.3-RELEASE/i386/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/6.3-RELEASE/i386/build.conf (revision 293355) +++ user/cperciva/freebsd-update-build/scripts/6.3-RELEASE/i386/build.conf (revision 293356) @@ -1,12 +1,14 @@ +# $FreeBSD$ + # SHA256 hash of RELEASE disc1.iso image. -export RELH=15081a56d184a18c7cc3a5c3cd0d7d5b7d9304c9cc1d5fc40d875b0fd3047721 +export RELH=2099715d561df721833322bc56a4fa8b02c2b77713a1e0bc17fc4b2dded20212 # Components of the world, source, and kernels export WORLDPARTS="base catpages dict doc games info manpages proflibs" export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ lib libexec release rescue sbin secure share sys tools \ ubin usbin" export KERNELPARTS="generic smp" # EOL date -export EOL=1264982400 +export EOL=1201824000 Index: user/cperciva/freebsd-update-build/scripts/6.4-BETA/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/6.4-BETA/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/6.4-BETA/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=a6a8dbfaf34d404058e0a62dce29526d30d86a15aca1c46521e01d976b36d651 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ + lib libexec release rescue sbin secure share sys tools \ + ubin usbin" +export KERNELPARTS="generic smp" + +# EOL date +export EOL=1225522800 Property changes on: user/cperciva/freebsd-update-build/scripts/6.4-BETA/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/6.4-RC1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/6.4-RC1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/6.4-RC1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=360edee939b5090155fcfe3c9927a7b1de7fb6abef0a9bbb909d719a00133d4d + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ + lib libexec release rescue sbin secure share sys tools \ + ubin usbin" +export KERNELPARTS="generic smp" + +# EOL date +export EOL=1228089600 Property changes on: user/cperciva/freebsd-update-build/scripts/6.4-RC1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/6.4-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/6.4-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/6.4-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=fdbb5975f2319c7bc27d6897cb98d20777e9f99203341e46a54da36618ff5c7a + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ + lib libexec release rescue sbin secure share sys tools \ + ubin usbin" +export KERNELPARTS="generic smp" + +# EOL date +export EOL=1228262400 Property changes on: user/cperciva/freebsd-update-build/scripts/6.4-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.0-BETA1.5/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.0-BETA1.5/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.0-BETA1.5/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=31cdb5f7fcde13e8193cdff235a14cc21902174e7e37fa99c34d779070807004 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl compat contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1195113600 Property changes on: user/cperciva/freebsd-update-build/scripts/7.0-BETA1.5/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.0-BETA1.5/i386/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.0-BETA1.5/i386/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.0-BETA1.5/i386/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=2099715d561df721833322bc56a4fa8b02c2b77713a1e0bc17fc4b2dded20212 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info manpages proflibs" +export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ + lib libexec release rescue sbin secure share sys tools \ + ubin usbin" +export KERNELPARTS="generic smp" + +# EOL date +export EOL=1201824000 Property changes on: user/cperciva/freebsd-update-build/scripts/7.0-BETA1.5/i386/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.0-BETA2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.0-BETA2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.0-BETA2/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=09bbe1dcb9e538899a3f71421753fa79c4784839021253dcdac07fba4f494327 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl compat contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1197158400 Property changes on: user/cperciva/freebsd-update-build/scripts/7.0-BETA2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.0-BETA2/i386/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.0-BETA2/i386/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.0-BETA2/i386/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=2099715d561df721833322bc56a4fa8b02c2b77713a1e0bc17fc4b2dded20212 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info manpages proflibs" +export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ + lib libexec release rescue sbin secure share sys tools \ + ubin usbin" +export KERNELPARTS="generic smp" + +# EOL date +export EOL=1201824000 Property changes on: user/cperciva/freebsd-update-build/scripts/7.0-BETA2/i386/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.0-BETA3/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.0-BETA3/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.0-BETA3/amd64/build.conf (revision 293356) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=55c80f76039996406773e87b909b472693a8d93c9cdc880fb4516b219236040e + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl compat contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1198022400 + Property changes on: user/cperciva/freebsd-update-build/scripts/7.0-BETA3/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.0-BETA3/i386/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.0-BETA3/i386/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.0-BETA3/i386/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=2099715d561df721833322bc56a4fa8b02c2b77713a1e0bc17fc4b2dded20212 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info manpages proflibs" +export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ + lib libexec release rescue sbin secure share sys tools \ + ubin usbin" +export KERNELPARTS="generic smp" + +# EOL date +export EOL=1201824000 Property changes on: user/cperciva/freebsd-update-build/scripts/7.0-BETA3/i386/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.0-RELEASE/i386/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.0-RELEASE/i386/build.conf (revision 293355) +++ user/cperciva/freebsd-update-build/scripts/7.0-RELEASE/i386/build.conf (revision 293356) @@ -1,12 +1,14 @@ +# $FreeBSD$ + # SHA256 hash of RELEASE disc1.iso image. -export RELH=7480c74dda9a78805ab0d647b23eb71cac43f4afce83ff65ad9f2019423583af +export RELH=2099715d561df721833322bc56a4fa8b02c2b77713a1e0bc17fc4b2dded20212 # Components of the world, source, and kernels export WORLDPARTS="base catpages dict doc games info manpages proflibs" -export SOURCEPARTS="base bin cddl compat contrib crypto etc games gnu \ - include krb5 lib libexec release rescue sbin secure \ - share sys tools ubin usbin" -export KERNELPARTS="generic" +export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5 \ + lib libexec release rescue sbin secure share sys tools \ + ubin usbin" +export KERNELPARTS="generic smp" # EOL date -export EOL=1241136000 +export EOL=1201824000 Index: user/cperciva/freebsd-update-build/scripts/7.1-BETA/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.1-BETA/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.1-BETA/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=b3ddcab735c4ea3f096d92d212940216859bbd47403896eb2e741d5ad2db6d7c + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1225522800 Property changes on: user/cperciva/freebsd-update-build/scripts/7.1-BETA/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.1-BETA2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.1-BETA2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.1-BETA2/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=6b2665ccf0ca8011515e77c6d0ec3bec5d82a0c810d64754e8e2fd793619b08e + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1226620800 Property changes on: user/cperciva/freebsd-update-build/scripts/7.1-BETA2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.1-RC1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.1-RC1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.1-RC1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=3be67ca088868059df0790251e0484ec67f617fdd04a382e91ca0bae239c9d87 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1233446400 Property changes on: user/cperciva/freebsd-update-build/scripts/7.1-RC1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.1-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.1-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.1-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=7da2bb04862608c4541cd907dcc5b802f84a4f7350ff1aeda6ec3a981e33f051 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1233446400 Property changes on: user/cperciva/freebsd-update-build/scripts/7.1-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.2-BETA1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.2-BETA1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.2-BETA1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=62f6eada40404630e0a98a5e9005a88053675285b4c5f40e7c8535d13f148805 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1240358400 Property changes on: user/cperciva/freebsd-update-build/scripts/7.2-BETA1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.2-RC1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.2-RC1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.2-RC1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=a4c707c20dc3b0e33ab8bdd5408e03b31481115147643bcd65c49a322b956e68 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1242432000 Property changes on: user/cperciva/freebsd-update-build/scripts/7.2-RC1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.2-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.2-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.2-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=01111a9f053f0804fbb18f3e9ce4dd2233e762e83b5fe5fd3b968d85656fedc9 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1243123200 Property changes on: user/cperciva/freebsd-update-build/scripts/7.2-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.3-BETA1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.3-BETA1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.3-BETA1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=4cc5d2a87d813f29a619225e9eda0ab05a5854e77ee1d3e84821b740c8c0e5ee + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1267401600 Property changes on: user/cperciva/freebsd-update-build/scripts/7.3-BETA1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.3-RC1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.3-RC1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.3-RC1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=55b62c9926c4b15561d9fb8b4dae74ce051f0389e00fbf08d888f41491288bc1 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1268524800 Property changes on: user/cperciva/freebsd-update-build/scripts/7.3-RC1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.3-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.3-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.3-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=668687e8fe0622482d696d806acb4c867bc41d9bf4b2071d9eb15ee377672720 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1270080000 Property changes on: user/cperciva/freebsd-update-build/scripts/7.3-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.4-BETA1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.4-BETA1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.4-BETA1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=8742d2ca3e310f4a6dfb1222f81bd14dd572c256fe1bcaf6f29ee0cccd30bf59 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1294531200 Property changes on: user/cperciva/freebsd-update-build/scripts/7.4-BETA1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.4-RC1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.4-RC1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.4-RC1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=ed05bfad54bd9105a09acdd193df58be41a4de27a7579f5b284adfb6c366cc32 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1298505600 Property changes on: user/cperciva/freebsd-update-build/scripts/7.4-RC1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.4-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.4-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.4-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=8966b31db58f327ac173a26bcc9de914e85a3cefe645f108aa8ce0b7e27cfe79 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1300579200 Property changes on: user/cperciva/freebsd-update-build/scripts/7.4-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/7.4-RC3/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/7.4-RC3/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/7.4-RC3/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=fa82a66cd879dc4b841c88ee2006a8f9b90237e0690f4bae9545f370488726e0 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1301529600 Property changes on: user/cperciva/freebsd-update-build/scripts/7.4-RC3/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.0-BETA1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.0-BETA1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.0-BETA1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=692eb89c0ba07dc161ad2ea366516a2210c5d5e5cf90a48ed6316e67b7ebb5e4 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1249084800 Property changes on: user/cperciva/freebsd-update-build/scripts/8.0-BETA1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.0-BETA1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.0-BETA1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.0-BETA1/build.subr (revision 293356) @@ -0,0 +1,67 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/${REL}/${C}/${C}.?? | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + mv ${WORKDIR}/release/R/trees/world/manpages/usr/share/man/man9/kproc_resume,.9.gz \ + ${WORKDIR}/release/R/trees/world/manpages/usr/share/man/man9/kproc_resume.9.gz + mv ${WORKDIR}/release/R/trees/world/catpages/usr/share/man/cat9/kproc_resume,.9.gz \ + ${WORKDIR}/release/R/trees/world/catpages/usr/share/man/cat9/kproc_resume.9.gz + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/${REL}/kernels/${C}.?? | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/${REL}/src/s${C}.?? | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/${REL}/${C}/${C}.?? | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/${REL}/src/s${C}.?? | + tar -xpzf - -C ${WORKDIR}/world/usr/src/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} Index: user/cperciva/freebsd-update-build/scripts/8.0-BETA2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.0-BETA2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.0-BETA2/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=49121108535986690eebc7c894a56bdd1e4b5afc8ed1470afb0ebc79debb2c1e + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1250208000 Property changes on: user/cperciva/freebsd-update-build/scripts/8.0-BETA2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.0-BETA2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.0-BETA2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.0-BETA2/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.0-BETA3/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.0-BETA3/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.0-BETA3/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=001fb1b22db7fbfe0b72cf1386ad7216e4116d05457d22a9177f52f9aaebff66 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1253577600 Property changes on: user/cperciva/freebsd-update-build/scripts/8.0-BETA3/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.0-BETA3/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.0-BETA3/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.0-BETA3/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.0-BETA4/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.0-BETA4/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.0-BETA4/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=e42cb6a4d46fcc924615949fe9da4217f9c824e4c30fb6371787e28d5ec50ff8 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1254787200 Property changes on: user/cperciva/freebsd-update-build/scripts/8.0-BETA4/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.0-BETA4/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.0-BETA4/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.0-BETA4/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.0-RC1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.0-RC1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.0-RC1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=1b0246694012170ef83ce38395f4179c990d5689e1da2224a7cd2164770d1efb + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1256947200 Property changes on: user/cperciva/freebsd-update-build/scripts/8.0-RC1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.0-RC1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.0-RC1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.0-RC1/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.0-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.0-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.0-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=a20b72acf3990f6b4a71941c576d5dc395260a98287bdfe4455cbf15555015e0 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1262304000 Property changes on: user/cperciva/freebsd-update-build/scripts/8.0-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.0-RC2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.0-RC2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.0-RC2/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.0-RC3/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.0-RC3/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.0-RC3/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=7e377f38cb6dc0ba1aa1fa13facf7e03f3cefad3d1490de797ed3a91680892e8 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1262304000 Property changes on: user/cperciva/freebsd-update-build/scripts/8.0-RC3/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.0-RC3/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.0-RC3/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.0-RC3/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.0-RELEASE/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.0-RELEASE/build.subr (revision 293355) +++ user/cperciva/freebsd-update-build/scripts/8.0-RELEASE/build.subr (revision 293356) @@ -1,68 +1,6 @@ # Add extra docs to ${WORKDIR}/$1 addextradocs () { log "Extracting extra docs" # 8.0 doesn't have any extra docs } - -# Extract the released trees and, if appropriate, construct a world (base -# plus source code) in which to perform builds. -extractiso () { - # Create and mount a md(4) attached to the ISO image. - ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` - mkdir -p ${WORKDIR}/iso - mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso - - # Extract the various components into different directories - log "Extracting components" - for C in ${WORLDPARTS}; do - mkdir -p ${WORKDIR}/release/R/trees/world/${C} - cat ${WORKDIR}/iso/${REL}/${C}/${C}.?? | - tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} - done - for C in ${KERNELPARTS}; do - mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} - cat ${WORKDIR}/iso/${REL}/kernels/${C}.?? | - tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} - done - for C in ${SOURCEPARTS}; do - mkdir -p ${WORKDIR}/release/R/trees/src/${C} - cat ${WORKDIR}/iso/${REL}/src/s${C}.?? | - tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} - done - - # If the release ISO we're handling belongs to the platform - # we're running right now, create a world image for future use. - if [ ${TARGET} = ${HOSTPLATFORM} ]; then - log "Constructing world+src image" - - # Create directory for world - mkdir ${WORKDIR}/world/ - - # Extract world and source distributions - for C in ${WORLDPARTS}; do - cat ${WORKDIR}/iso/${REL}/${C}/${C}.?? | - tar -xpzf - -C ${WORKDIR}/world/ - done - for C in ${SOURCEPARTS}; do - cat ${WORKDIR}/iso/${REL}/src/s${C}.?? | - tar -xpzf - -C ${WORKDIR}/world/usr/src/ - done - - # Grab the 7.x version of /bin/ln -- necessary to make - # buildworld work on a 7.x kernel which lacks linkat(). - tar -cf- /bin/ln | - tar -xpf- -C ${WORKDIR}/world/ - - # build a single tarball of them. - tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . - - # clean up - nuke world - fi - - # Unmount and detach the ISO image md(4). - umount ${WORKDIR}/iso - rmdir ${WORKDIR}/iso - mdconfig -d -u ${ISOMD} -} Index: user/cperciva/freebsd-update-build/scripts/8.1-BETA1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.1-BETA1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.1-BETA1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=db2f63becc38fadbb2fd1ec29142d4309ad03eb22cafcd6818ac284487bbb580 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1277942400 Property changes on: user/cperciva/freebsd-update-build/scripts/8.1-BETA1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.1-BETA1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.1-BETA1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.1-BETA1/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.1-RC1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.1-RC1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.1-RC1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=99eed24494bedc143d9062fe811329498eca2fa23e6fa1eea70651e48d348820 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1280620800 Property changes on: user/cperciva/freebsd-update-build/scripts/8.1-RC1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.1-RC1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.1-RC1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.1-RC1/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.1-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.1-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.1-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=5aa8ef16b34fe7dae852f1ef16a4863bedd194677a9b3070777a646db122fa0f + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1281744000 Property changes on: user/cperciva/freebsd-update-build/scripts/8.1-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.1-RC2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.1-RC2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.1-RC2/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.2-BETA1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.2-BETA1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.2-BETA1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=ddbfb4b394924038ba5cfa27f0ba36370d75b3088a2b675797d2b723f7e3f0f2 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1294531200 Property changes on: user/cperciva/freebsd-update-build/scripts/8.2-BETA1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.2-BETA1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.2-BETA1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.2-BETA1/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.2-RC1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.2-RC1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.2-RC1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=ac740c14fdc0ea9b92223b32f271b4f8163f8163f17f3ac9433517e114eb8d10 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1298505600 Property changes on: user/cperciva/freebsd-update-build/scripts/8.2-RC1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.2-RC1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.2-RC1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.2-RC1/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.2-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.2-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.2-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=de7e0aa1f1fcb78d13ee80a69d3398af6a7885804762b37e5bf48424d3a4ae49 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1300060800 Property changes on: user/cperciva/freebsd-update-build/scripts/8.2-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.2-RC2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.2-RC2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.2-RC2/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.2-RC3/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.2-RC3/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.2-RC3/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=af762ae6f4ae8141c4e63aa533d77ad36dd5d22bf7d1c15b36c4371157c9ca74 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1301529600 Property changes on: user/cperciva/freebsd-update-build/scripts/8.2-RC3/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.2-RC3/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.2-RC3/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.2-RC3/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.3-BETA1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.3-BETA1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.3-BETA1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=b9aa0aca927adb3b0fc552039ccc0814d0334c6b4036ce94423c92c240abc0dc + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1332028800 Property changes on: user/cperciva/freebsd-update-build/scripts/8.3-BETA1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.3-BETA1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.3-BETA1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.3-BETA1/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.3-RC1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.3-RC1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.3-RC1/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=38b08f12f0b3e83045e46b7f09404a2f36e26f7e3c668bc4a01b8383ab72c48a + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1336176000 Property changes on: user/cperciva/freebsd-update-build/scripts/8.3-RC1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.3-RC1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.3-RC1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.3-RC1/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.3-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.3-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.3-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=0c2024e6de19ddf783272e191f41c50f212b44f83f87354e8e93dc5545d10e09 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1337904000 Property changes on: user/cperciva/freebsd-update-build/scripts/8.3-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.3-RC2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.3-RC2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.3-RC2/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.4-BETA1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.4-BETA1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.4-BETA1/amd64/build.conf (revision 293356) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/8.4-BETA1/ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=4972ed9b73828f409f608aa543e3e90c9676912fd29154c59c0711600d2841c7 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1367305200 Property changes on: user/cperciva/freebsd-update-build/scripts/8.4-BETA1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.4-BETA1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.4-BETA1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.4-BETA1/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.4-RC1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.4-RC1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.4-RC1/amd64/build.conf (revision 293356) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/8.4-RC1/ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=9adf9e15ff288085a53831ad238cd7320225f186dfb3faac11ba2189689f4678 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1369983600 Property changes on: user/cperciva/freebsd-update-build/scripts/8.4-RC1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.4-RC1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.4-RC1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.4-RC1/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.4-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.4-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.4-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/8.4-RC2/ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=bff1c351397a24b244a8c9e5bfc5264b012d61c0799a441fc0c5b82aa263877e + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1370044799 Property changes on: user/cperciva/freebsd-update-build/scripts/8.4-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.4-RC2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.4-RC2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.4-RC2/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.4-RC3/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.4-RC3/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.4-RC3/amd64/build.conf (revision 293356) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/8.4-RC3/ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=5ba207726007dab001c502c190b6bb354c845c6ed142f25c8a1164d631ebb9b1 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +export EOL=1372636799 Property changes on: user/cperciva/freebsd-update-build/scripts/8.4-RC3/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/8.4-RC3/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.4-RC3/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.4-RC3/build.subr (revision 293356) @@ -0,0 +1,6 @@ +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} Index: user/cperciva/freebsd-update-build/scripts/8.4-RELEASE/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/8.4-RELEASE/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/8.4-RELEASE/amd64/build.conf (revision 293356) @@ -0,0 +1,18 @@ +# $FreeBSD$ + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/8.4-RELEASE/ + +# SHA256 hash of RELEASE disc1.iso image. +export RELH=2fb17d77d4eba34736eb98c142c56546dd73a4e7ac38895bb6c8517949282438 + +# Components of the world, source, and kernels +export WORLDPARTS="base catpages dict doc games info lib32 manpages proflibs" +export SOURCEPARTS="base bin cddl contrib crypto etc games gnu \ + include krb5 lib libexec release rescue sbin secure \ + share sys tools ubin usbin" +export KERNELPARTS="generic" + +# EOL date +#export EOL=1435708800 +export EOL=1438387200 Property changes on: user/cperciva/freebsd-update-build/scripts/8.4-RELEASE/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.0-BETA1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.0-BETA1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.0-BETA1/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +# SHA256 hash of dvd1.iso image. +export RELH=27c4d6c85c8bb53ee7284869b9abc694d43d0d5110f4faf3d6057d766da5e984 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1314860400 Property changes on: user/cperciva/freebsd-update-build/scripts/9.0-BETA1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.0-BETA1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.0-BETA1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.0-BETA1/build.subr (revision 293356) @@ -0,0 +1,198 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-dvd1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} Index: user/cperciva/freebsd-update-build/scripts/9.0-BETA2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.0-BETA2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.0-BETA2/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +# SHA256 hash of dvd1.iso image. +export RELH=e4fa69243aeefcfbce98ac8c30a8120a33ff122e7eb8c5fd73c23d49e3b2fad5 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1317970800 Property changes on: user/cperciva/freebsd-update-build/scripts/9.0-BETA2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.0-BETA2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.0-BETA2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.0-BETA2/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-dvd1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-dvd1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.0-BETA3/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.0-BETA3/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.0-BETA3/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +# SHA256 hash of dvd1.iso image. +export RELH=fd026f1d0bdddaff533a58b8c731ecbc2b2b14d9d975e8771bebe07eba7a579c + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1319785200 Property changes on: user/cperciva/freebsd-update-build/scripts/9.0-BETA3/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.0-BETA3/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.0-BETA3/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.0-BETA3/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-dvd1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-dvd1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.0-RC1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.0-RC1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.0-RC1/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +# SHA256 hash of dvd1.iso image. +export RELH=6558689957ce2a48f3aa235ab11cd4613db7afe11f102b0ae5d566b22e30c132 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1324368000 Property changes on: user/cperciva/freebsd-update-build/scripts/9.0-RC1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.0-RC1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.0-RC1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.0-RC1/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-dvd1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-dvd1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.0-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.0-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.0-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +# SHA256 hash of dvd1.iso image. +export RELH=d7071da7cf440f79a7368f8a8b26ba9b6e18dcb3785aec83df866ddf576ef418 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1326700800 Property changes on: user/cperciva/freebsd-update-build/scripts/9.0-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.0-RC2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.0-RC2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.0-RC2/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-dvd1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-dvd1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.0-RC3/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.0-RC3/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.0-RC3/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +# SHA256 hash of dvd1.iso image. +export RELH=16792eb1e90070b8c5d1ea8df55b290534efba1543fb37950f8c7acd61839208 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1328486400 Property changes on: user/cperciva/freebsd-update-build/scripts/9.0-RC3/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.0-RC3/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.0-RC3/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.0-RC3/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.1-RC1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.1-RC1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.1-RC1/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +# SHA256 hash of disc1.iso image. +export RELH=27bc85ec853f590f19ece8ddd672d62bfe58f6d8de874afd71958bd42b48f8c9 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1350518400 Property changes on: user/cperciva/freebsd-update-build/scripts/9.1-RC1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.1-RC1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.1-RC1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.1-RC1/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.1-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.1-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.1-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +# SHA256 hash of disc1.iso image. +export RELH=6b874d20c909a4a53d8eaa8aa3c1316a957a27406265ca83e9399daa42271177 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1354579200 Property changes on: user/cperciva/freebsd-update-build/scripts/9.1-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.1-RC2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.1-RC2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.1-RC2/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.1-RC3/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.1-RC3/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.1-RC3/amd64/build.conf (revision 293356) @@ -0,0 +1,10 @@ +# SHA256 hash of disc1.iso image. +export RELH=11c7e4ab16294794bf950073901f9a4dc8f735de08b02a321b63c4702af60f98 + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1356998400 Property changes on: user/cperciva/freebsd-update-build/scripts/9.1-RC3/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.1-RC3/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.1-RC3/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.1-RC3/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.2-BETA1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.2-BETA1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.2-BETA1/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=4593581e7e3dc066170ed4f5f228082317f7284737e5834e1d0c2da2d58c4532 + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/9.2-BETA1/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1376956799 Property changes on: user/cperciva/freebsd-update-build/scripts/9.2-BETA1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.2-BETA1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.2-BETA1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.2-BETA1/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/${TARGET}/FreeBSD-${REL}-${TARGET}-release.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.2-BETA2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.2-BETA2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.2-BETA2/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=f5856159f540309010f43dc3b84989616a958fa601f7af3bf10787befbb17317 + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/9.2-BETA2/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1376956799 Property changes on: user/cperciva/freebsd-update-build/scripts/9.2-BETA2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.2-BETA2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.2-BETA2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.2-BETA2/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.2-RC1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.2-RC1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.2-RC1/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=bc30f5661304c65d14612d39e19f9651502fbdc467d9ad02402c58a99d6fe2da + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/9.2-RC1/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1380931199 Property changes on: user/cperciva/freebsd-update-build/scripts/9.2-RC1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.2-RC1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.2-RC1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.2-RC1/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.2-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.2-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.2-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=e56284d74e61a2172f0cd696055fc5b6c79e36ea67e336c0f1d3067dfa2bff0a + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/9.2-RC2/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1381967999 Property changes on: user/cperciva/freebsd-update-build/scripts/9.2-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.2-RC2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.2-RC2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.2-RC2/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.2-RC3/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.2-RC3/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.2-RC3/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=aea3dbbc6fb11eea71ebbce71e8b0b0dcc3e6b66846040a420c6097acb3a93d4 + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/9.2-RC3/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1382745599 Property changes on: user/cperciva/freebsd-update-build/scripts/9.2-RC3/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.2-RC3/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.2-RC3/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.2-RC3/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 VERSION="FreeBSD 9.1-RELEASE amd64 902001" \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.2-RC4/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.2-RC4/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.2-RC4/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=9379c1466b4b4d5c0a31a71f051dec7dae50e9d18379b58e5efd3ec59f8a6b40 + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/9.2-RC4/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1384127999 Property changes on: user/cperciva/freebsd-update-build/scripts/9.2-RC4/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.2-RC4/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.2-RC4/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.2-RC4/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 VERSION="FreeBSD 9.1-RELEASE amd64 902001" \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.2-RELEASE/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.2-RELEASE/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.2-RELEASE/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=a8c1751b83646530148766618a89a97009e7500e7057a5cbe3afd74ef480c915 + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/9.2-RELEASE/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1420070400 Property changes on: user/cperciva/freebsd-update-build/scripts/9.2-RELEASE/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.2-RELEASE/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.2-RELEASE/build.subr (revision 293355) +++ user/cperciva/freebsd-update-build/scripts/9.2-RELEASE/build.subr (revision 293356) @@ -1,199 +1,199 @@ # Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. # Download and verify a release ISO image. fetchiso () { log "Starting fetch" # Figure out where the disc1 ISO image is RELNUM=${REL%-*} # ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso # Fetch the ISO image. We consider the ISO image to be # the One True Release and don't look at the files used # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP # files were not identical, but this should never happen # again. fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 log "Verifying dvd1 hash" # Check that the downloaded ISO has the correct hash. if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." rm ${WORKDIR}/iso.img return 1 fi } # Extract the released trees and, if appropriate, construct a world (base # plus source code) in which to perform builds. extractiso () { # Create and mount a md(4) attached to the ISO image. ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` mkdir -p ${WORKDIR}/iso mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso # Extract the various components into different directories log "Extracting components" for C in ${WORLDPARTS}; do mkdir -p ${WORKDIR}/release/R/trees/world/${C} cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} done for C in ${KERNELPARTS}; do mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} done for C in ${SOURCEPARTS}; do mkdir -p ${WORKDIR}/release/R/trees/src/${C} cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} done # If the release ISO we're handling belongs to the platform # we're running right now, create a world image for future use. - # XXX delphij if [ ${TARGET} = ${HOSTPLATFORM} ]; then + if [ ${TARGET} = ${HOSTPLATFORM} ]; then log "Constructing world+src image" # Create directory for world mkdir ${WORKDIR}/world/ # Extract world and source distributions for C in ${WORLDPARTS}; do cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | tar -xpzf - -C ${WORKDIR}/world/ done for C in ${SOURCEPARTS}; do cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | tar -xpzf - -C ${WORKDIR}/world/ done # build a single tarball of them. tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . # clean up nuke world - # XXX delphij fi + fi # Unmount and detach the ISO image md(4). umount ${WORKDIR}/iso rmdir ${WORKDIR}/iso mdconfig -d -u ${ISOMD} } # Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 buildworld () { # We need a devfs inside the jail. Note that we are using a # jail here in order to keep the environment as "clean" as # possible, not for security reasons; we assume that the # original source code plus patches we add personally will # not do anything evil. mount -t devfs devfs ${WORKDIR}/$1/dev # We need to be able to set file flags sysctl security.jail.chflags_allowed=1 >/dev/null # Build stuff. jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ - BRANCH_OVERRIDE=$2 VERSION="FreeBSD 9.1-RELEASE i386 902001" \ + BRANCH_OVERRIDE=$2 VERSION="FreeBSD 9.1-RELEASE amd64 902001" \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log # Function for logging what we're doing log () { echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 } # Build the world log "Building world" cd /usr/src && make buildworld -j17 2>&1 # Build and kernel log "Building kernel" cd /usr/src && make buildkernel -j17 2>&1 # Build and install release images log "Building release" cd /usr/src/release && make release 2>&1 && make install DESTDIR=/R 2>&1 EOF # Put all the components into the right places. log "Moving components into staging area" jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ /usr/bin/env -i PATH=${PATH} \ WORLDPARTS="${WORLDPARTS}" \ KERNELPARTS="${KERNELPARTS}" \ SOURCEPARTS="${SOURCEPARTS}" \ /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log # Create area for uncompressed components mkdir -p /R/trees # Move world components into place for C in ${WORLDPARTS}; do mkdir -p /R/trees/world/${C} cat /R/ftp/${C}.txz | tar -xpzf - -C /R/trees/world/${C} done # Move kernel components into place for C in ${KERNELPARTS}; do mkdir -p /R/trees/kernel/${C} cat /R/ftp/${C}.txz | tar -xpzf - -C /R/trees/kernel/${C} done # Extract src components into place for C in ${SOURCEPARTS}; do mkdir -p /R/trees/src/${C} cat /R/ftp/${C}.txz | tar -xpzf - -C /R/trees/src/${C} done EOF # Get rid of the devfs we no longer need. umount ${WORKDIR}/$1/dev } # Perform a build in ${WORKDIR}/$1, but with the date set 400 days # into the future. Turn off NTP before we change the date and # turn it back on afterwards. futurebuildworld () { # Turn off ntpd if necessary if /etc/rc.d/ntpd status | grep -q 'is running'; then ntpd_was_running=1 log "Turning off NTP" /etc/rc.d/ntpd stop >/dev/null else ntpd_was_running=0 fi date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null buildworld $1 FUTUREBUILD date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null # Turn ntpd back on, if appropriate if [ ${ntpd_was_running} = 1 ]; then log "Turning NTP back on" /etc/rc.d/ntpd start >/dev/null fi } # Add extra docs to ${WORKDIR}/$1 addextradocs () { log "Extracting extra docs" # 8.0 doesn't have any extra docs } # Fixup: the "kernel" kernel is really the "generic" kernel. indexpublish () { sed -E 's,kernel\|kernel,kernel|generic,' } Index: user/cperciva/freebsd-update-build/scripts/9.3-BETA1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.3-BETA1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.3-BETA1/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=3f8a593a2bc81cf6067cc0e6f472bdab11820a6be4037a54b30d8ff6106f183d + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/9.3-BETA1/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1404172800 Property changes on: user/cperciva/freebsd-update-build/scripts/9.3-BETA1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.3-BETA1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.3-BETA1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.3-BETA1/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 VERSION="FreeBSD 9.1-RELEASE amd64 902001" \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.3-BETA2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.3-BETA2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.3-BETA2/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=67153e78b8decb2673a51dbdc05cbe363722a746bc4b297af4de04763ef06ec9 + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/9.3-BETA2/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1404777600 Property changes on: user/cperciva/freebsd-update-build/scripts/9.3-BETA2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.3-BETA2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.3-BETA2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.3-BETA2/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 VERSION="FreeBSD 9.1-RELEASE amd64 902001" \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.3-BETA3/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.3-BETA3/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.3-BETA3/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=0c5c0a7b874b3f177d20822ed55fb910ca709312a20752e21cd055295c2f019c + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/9.3-BETA3/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1405296000 Property changes on: user/cperciva/freebsd-update-build/scripts/9.3-BETA3/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.3-BETA3/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.3-BETA3/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.3-BETA3/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 VERSION="FreeBSD 9.1-RELEASE amd64 902001" \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.3-RC1/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.3-RC1/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.3-RC1/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=76f3622d0951e3d8ff56ecb29b39df8655d26eac90364d7ccb903b8989e69904 + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/9.3-RC1/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1408579200 Property changes on: user/cperciva/freebsd-update-build/scripts/9.3-RC1/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.3-RC1/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.3-RC1/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.3-RC1/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 VERSION="FreeBSD 9.1-RELEASE amd64 902001" \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.3-RC2/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.3-RC2/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.3-RC2/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=85040f571b63f13c3d8cace12de022be6cf2521f7882d6526d2455840f2fd97d + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/9.3-RC2/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1409097600 Property changes on: user/cperciva/freebsd-update-build/scripts/9.3-RC2/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.3-RC2/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.3-RC2/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.3-RC2/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 VERSION="FreeBSD 9.1-RELEASE amd64 902001" \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} + Index: user/cperciva/freebsd-update-build/scripts/9.3-RC3/amd64/build.conf =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.3-RC3/amd64/build.conf (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.3-RC3/amd64/build.conf (revision 293356) @@ -0,0 +1,13 @@ +# SHA256 hash of disc1.iso image. +export RELH=725b70dd3c119f73a1c0330fd5c258d1cfe1a6577bb4b23b93ebd10f72378d61 + +# gjb's home directory +export FTP=http://people.freebsd.org/~gjb/9.3-RC3/ + +# Components of the world, source, and kernels +export WORLDPARTS="base doc games lib32" +export SOURCEPARTS="src" +export KERNELPARTS="kernel" + +# EOL date +export EOL=1409961600 Property changes on: user/cperciva/freebsd-update-build/scripts/9.3-RC3/amd64/build.conf ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/cperciva/freebsd-update-build/scripts/9.3-RC3/build.subr =================================================================== --- user/cperciva/freebsd-update-build/scripts/9.3-RC3/build.subr (nonexistent) +++ user/cperciva/freebsd-update-build/scripts/9.3-RC3/build.subr (revision 293356) @@ -0,0 +1,199 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the disc1 ISO image is + RELNUM=${REL%-*} +# ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} + +# Extract the released trees and, if appropriate, construct a world (base +# plus source code) in which to perform builds. +extractiso () { + # Create and mount a md(4) attached to the ISO image. + ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n` + mkdir -p ${WORKDIR}/iso + mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso + + # Extract the various components into different directories + log "Extracting components" + for C in ${WORLDPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/world/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C} + done + for C in ${KERNELPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/kernel/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C} + done + for C in ${SOURCEPARTS}; do + mkdir -p ${WORKDIR}/release/R/trees/src/${C} + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C} + done + + # If the release ISO we're handling belongs to the platform + # we're running right now, create a world image for future use. + if [ ${TARGET} = ${HOSTPLATFORM} ]; then + log "Constructing world+src image" + + # Create directory for world + mkdir ${WORKDIR}/world/ + + # Extract world and source distributions + for C in ${WORLDPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + for C in ${SOURCEPARTS}; do + cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz | + tar -xpzf - -C ${WORKDIR}/world/ + done + + # build a single tarball of them. + tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world . + + # clean up + nuke world + fi + + # Unmount and detach the ISO image md(4). + umount ${WORKDIR}/iso + rmdir ${WORKDIR}/iso + mdconfig -d -u ${ISOMD} +} + +# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2 +buildworld () { + # We need a devfs inside the jail. Note that we are using a + # jail here in order to keep the environment as "clean" as + # possible, not for security reasons; we assume that the + # original source code plus patches we add personally will + # not do anything evil. + mount -t devfs devfs ${WORKDIR}/$1/dev + + # We need to be able to set file flags + sysctl security.jail.chflags_allowed=1 >/dev/null + + # Build stuff. + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ + BRANCH_OVERRIDE=$2 VERSION="FreeBSD 9.1-RELEASE amd64 902001" \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log + # Function for logging what we're doing + log () { + echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2 + } + + # Build the world + log "Building world" + cd /usr/src && + make buildworld -j17 2>&1 + + # Build and kernel + log "Building kernel" + cd /usr/src && + make buildkernel -j17 2>&1 + + # Build and install release images + log "Building release" + cd /usr/src/release && + make release 2>&1 && + make install DESTDIR=/R 2>&1 + EOF + + # Put all the components into the right places. + log "Moving components into staging area" + jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3 \ + /usr/bin/env -i PATH=${PATH} \ + WORLDPARTS="${WORLDPARTS}" \ + KERNELPARTS="${KERNELPARTS}" \ + SOURCEPARTS="${SOURCEPARTS}" \ + /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log + # Create area for uncompressed components + mkdir -p /R/trees + + # Move world components into place + for C in ${WORLDPARTS}; do + mkdir -p /R/trees/world/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/world/${C} + done + + # Move kernel components into place + for C in ${KERNELPARTS}; do + mkdir -p /R/trees/kernel/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/kernel/${C} + done + + # Extract src components into place + for C in ${SOURCEPARTS}; do + mkdir -p /R/trees/src/${C} + cat /R/ftp/${C}.txz | + tar -xpzf - -C /R/trees/src/${C} + done + EOF + + # Get rid of the devfs we no longer need. + umount ${WORKDIR}/$1/dev +} + +# Perform a build in ${WORKDIR}/$1, but with the date set 400 days +# into the future. Turn off NTP before we change the date and +# turn it back on afterwards. +futurebuildworld () { + # Turn off ntpd if necessary + if /etc/rc.d/ntpd status | + grep -q 'is running'; then + ntpd_was_running=1 + log "Turning off NTP" + /etc/rc.d/ntpd stop >/dev/null + else + ntpd_was_running=0 + fi + + date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null + buildworld $1 FUTUREBUILD + date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null + + # Turn ntpd back on, if appropriate + if [ ${ntpd_was_running} = 1 ]; then + log "Turning NTP back on" + /etc/rc.d/ntpd start >/dev/null + fi +} + +# Add extra docs to ${WORKDIR}/$1 +addextradocs () { + log "Extracting extra docs" + + # 8.0 doesn't have any extra docs +} + +# Fixup: the "kernel" kernel is really the "generic" kernel. +indexpublish () { + sed -E 's,kernel\|kernel,kernel|generic,' +} +