diff options
author | Renato Botelho <renato@netgate.com> | 2016-05-23 14:33:27 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-05-23 14:33:27 -0300 |
commit | 288bd3103815573097b62e7caca8f73fbe120335 (patch) | |
tree | 08b2c40e58d858b5decb3b2d7210904c23e9ed30 | |
parent | 7918276b55f807156631b427315e81fa5649faff (diff) | |
download | pfsense-288bd3103815573097b62e7caca8f73fbe120335.zip pfsense-288bd3103815573097b62e7caca8f73fbe120335.tar.gz |
Introduce a new option to build only core packages and skip images
-rwxr-xr-x | build.sh | 25 | ||||
-rwxr-xr-x | tools/build_snapshots.sh | 11 |
2 files changed, 24 insertions, 12 deletions
@@ -51,8 +51,9 @@ set +e usage() { - echo "Usage $0 [options] [ iso | nanobsd | ova | nanobsd-vga | memstick | memstickserial | memstickadi | fullupdate | all ]" + echo "Usage $0 [options] [ iso | nanobsd | ova | nanobsd-vga | memstick | memstickserial | memstickadi | fullupdate | all | none ]" echo " all = iso nanobsd nanobsd-vga memstick memstickserial memstickadi fullupdate" + echo " none = upgrade only pkg repo" echo " [ options ]: " echo " --flash-size|-f size(s) - a list of flash sizes to build with nanobsd i.e. '2g 4g'. Default: 2g" echo " --no-buildworld|-c - Will set NO_BUILDWORLD NO_BUILDKERNEL to not build kernel and world" @@ -137,7 +138,7 @@ while test "$1" != ""; do ;; --snapshots) export SNAPSHOTS=1 - IMAGETYPE="all" + IMAGETYPE=${1:-"all"} ;; --poudriere-snapshots) export POUDRIERE_SNAPSHOTS=1 @@ -195,7 +196,7 @@ while test "$1" != ""; do --do-not-upload|-u) export DO_NOT_UPLOAD=1 ;; - all|*iso*|*ova*|*memstick*|*memstickserial*|*memstickadi*|*nanobsd*|*nanobsd-vga*|*fullupdate*) + all|none|*iso*|*ova*|*memstick*|*memstickserial*|*memstickadi*|*nanobsd*|*nanobsd-vga*|*fullupdate*) BUILDACTION="images" IMAGETYPE="${1}" ;; @@ -342,7 +343,9 @@ if [ -z "${IMAGETYPE}" ]; then usage fi -if [ "$IMAGETYPE" = "all" ]; then +if [ "$IMAGETYPE" = "none" ]; then + _IMAGESTOBUILD="" +elif [ "$IMAGETYPE" = "all" ]; then _IMAGESTOBUILD="iso fullupdate nanobsd nanobsd-vga memstick memstickserial" if [ "${TARGET}" = "amd64" ]; then _IMAGESTOBUILD="${_IMAGESTOBUILD} memstickadi" @@ -476,11 +479,15 @@ if [ -n "${_bg_pids}" ]; then fi if [ -n "${SNAPSHOTS}" ]; then - snapshots_copy_to_staging_iso_updates - snapshots_copy_to_staging_nanobsd "${FLASH_SIZE}" - # SCP files to snapshot web hosting area - if [ -z "${DO_NOT_UPLOAD}" ]; then - snapshots_scp_files + if [ "${IMAGETYPE}" = "none" -a -z "${DO_NOT_UPLOAD}" ]; then + pkg_repo_rsync "${CORE_PKG_PATH}" + elif [ "${IMAGETYPE}" != "none" ]; then + snapshots_copy_to_staging_iso_updates + snapshots_copy_to_staging_nanobsd "${FLASH_SIZE}" + # SCP files to snapshot web hosting area + if [ -z "${DO_NOT_UPLOAD}" ]; then + snapshots_scp_files + fi fi # Alert the world that we have some snapshots ready. snapshots_update_status ">>> Builder run is complete." diff --git a/tools/build_snapshots.sh b/tools/build_snapshots.sh index 5297d17..cd42514 100755 --- a/tools/build_snapshots.sh +++ b/tools/build_snapshots.sh @@ -31,8 +31,9 @@ # usage() { - echo "Usage: $(basename $0) [-l] [-r] [-u] [-p]" + echo "Usage: $(basename $0) [-l] [-n] [-r] [-u] [-p]" echo " -l: Build looped operations" + echo " -n: Do not build images, only core pkg repo" echo " -p: Update poudriere repo" echo " -r: Do not reset local changes" echo " -u: Do not upload snapshots" @@ -41,14 +42,18 @@ usage() { export BUILDER_TOOLS=$(realpath $(dirname ${0})) export BUILDER_ROOT=$(realpath "${BUILDER_TOOLS}/..") +NO_IMAGES="" NO_RESET="" NO_UPLOAD="" LOOPED_SNAPSHOTS="" POUDRIERE_SNAPSHOTS="" # Handle command line arguments -while getopts lpru opt; do +while getopts lnpru opt; do case ${opt} in + n) + NO_IMAGES="none" + ;; l) LOOPED_SNAPSHOTS=1 ;; @@ -186,7 +191,7 @@ while [ /bin/true ]; do done (${BUILDER_ROOT}/build.sh ${NO_UPLOAD} --flash-size '2g 4g' \ - --snapshots 2>&1) | while read -r LINE; do + --snapshots ${NO_IMAGES} 2>&1) | while read -r LINE; do snapshot_update_status "${LINE}" done fi |