summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-08-23 17:14:34 -0300
committerRenato Botelho <renato@netgate.com>2017-08-23 17:16:00 -0300
commit25c86b03ea8dfa4cea04a82e4694991c88c317cd (patch)
tree8b991793d0241c3ffe6f23c3692414e7eaa87379
parent701e028a359475787adf24726da6d48db4cabfa7 (diff)
downloadpfsense-25c86b03ea8dfa4cea04a82e4694991c88c317cd.zip
pfsense-25c86b03ea8dfa4cea04a82e4694991c88c317cd.tar.gz
Change default to never upload files and add a new option to do it
-rwxr-xr-xbuild.sh18
-rwxr-xr-xtools/build_snapshots.sh12
-rw-r--r--tools/builder_common.sh4
3 files changed, 17 insertions, 17 deletions
diff --git a/build.sh b/build.sh
index 53166b3..b33965b 100755
--- a/build.sh
+++ b/build.sh
@@ -69,14 +69,14 @@ usage() {
echo " --build-kernels - build all configured kernels"
echo " --build-kernel argument - build specified kernel. Example --build-kernel KERNEL_NAME"
echo " --install-extra-kernels argument - Put extra kernel(s) under /kernel image directory. Example --install-extra-kernels KERNEL_NAME_WRAP"
- echo " --snapshots - Build snapshots and upload them to RSYNCIP"
+ echo " --snapshots - Build snapshots"
echo " --poudriere-snapshots - Update poudriere packages and send them to PKG_RSYNC_HOSTNAME"
echo " --setup-poudriere - Install poudriere and create necessary jails and ports tree"
echo " --create-unified-patch - Create a big patch with all changes done on FreeBSD"
echo " --update-poudriere-jails [-a ARCH_LIST] - Update poudriere jails using current patch versions"
echo " --update-poudriere-ports [-a ARCH_LIST]- Update poudriere ports tree"
echo " --update-pkg-repo [-a ARCH_LIST]- Rebuild necessary ports on poudriere and update pkg repo"
- echo " --do-not-upload|-u - Do not upload pkgs or snapshots"
+ echo " --upload|-U - Upload pkgs and/or snapshots"
echo " -V VARNAME - print value of variable VARNAME"
exit 1
}
@@ -88,7 +88,7 @@ unset _SKIP_REBUILD_PRESTAGE
unset _USE_OLD_DATESTRING
unset pfPORTTOBUILD
unset IMAGETYPE
-unset DO_NOT_UPLOAD
+unset UPLOAD
unset SNAPSHOTS
unset POUDRIERE_SNAPSHOTS
unset ARCH_LIST
@@ -196,8 +196,8 @@ while test "$1" != ""; do
--update-pkg-repo)
BUILDACTION="update_pkg_repo"
;;
- --do-not-upload|-u)
- export DO_NOT_UPLOAD=1
+ --upload|-U)
+ export UPLOAD=1
;;
all|none|*iso*|*ova*|*memstick*|*memstickserial*|*memstickadi*|*nanobsd*|*nanobsd-vga*|*fullupdate*)
BUILDACTION="images"
@@ -291,7 +291,7 @@ case $BUILDACTION in
snapshots_scp_files
;;
update_pkg_repo)
- if [ -z "${DO_NOT_UPLOAD}" -a ! -f /usr/local/bin/rsync ]; then
+ if [ -n "${UPLOAD}" -a ! -f /usr/local/bin/rsync ]; then
echo "ERROR: rsync is not installed, aborting..."
exit 1
fi
@@ -307,7 +307,7 @@ if [ "${BUILDACTION}" != "images" ]; then
exit 0
fi
-if [ -n "${SNAPSHOTS}" -a -z "${DO_NOT_UPLOAD}" ]; then
+if [ -n "${SNAPSHOTS}" -a -n "${UPLOAD}" ]; then
_required=" \
RSYNCIP \
RSYNCUSER \
@@ -508,13 +508,13 @@ if [ -n "${_bg_pids}" ]; then
fi
if [ -n "${SNAPSHOTS}" ]; then
- if [ "${IMAGETYPE}" = "none" -a -z "${DO_NOT_UPLOAD}" ]; then
+ if [ "${IMAGETYPE}" = "none" -a -n "${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
+ if [ -n "${UPLOAD}" ]; then
snapshots_scp_files
fi
fi
diff --git a/tools/build_snapshots.sh b/tools/build_snapshots.sh
index 478289b..eee7eb3 100755
--- a/tools/build_snapshots.sh
+++ b/tools/build_snapshots.sh
@@ -56,7 +56,7 @@ usage() {
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"
+ echo " -U: Upload snapshots"
}
export BUILDER_TOOLS=$(realpath $(dirname ${0}))
@@ -64,7 +64,7 @@ export BUILDER_ROOT=$(realpath "${BUILDER_TOOLS}/..")
NO_IMAGES=""
NO_RESET=""
-NO_UPLOAD=""
+UPLOAD=""
LOOPED_SNAPSHOTS=""
POUDRIERE_SNAPSHOTS=""
@@ -84,7 +84,7 @@ while getopts lnpru opt; do
NO_RESET=1
;;
u)
- NO_UPLOAD="-u"
+ UPLOAD="-U"
;;
*)
usage
@@ -108,7 +108,7 @@ export COUNTER=0
export _sleeping=0
snapshot_update_status() {
- ${BUILDER_ROOT}/build.sh ${NO_UPLOAD} ${POUDRIERE_SNAPSHOTS} \
+ ${BUILDER_ROOT}/build.sh ${UPLOAD} ${POUDRIERE_SNAPSHOTS} \
--snapshot-update-status "$*"
}
@@ -221,7 +221,7 @@ while [ /bin/true ]; do
if [ $rc -eq 0 ]; then
exec_and_update_status \
- ${BUILDER_ROOT}/build.sh ${NO_UPLOAD} \
+ ${BUILDER_ROOT}/build.sh ${UPLOAD} \
--update-pkg-repo
rc=$?
fi
@@ -232,7 +232,7 @@ while [ /bin/true ]; do
if [ $rc -eq 0 ]; then
exec_and_update_status \
- ${BUILDER_ROOT}/build.sh ${NO_UPLOAD} --flash-size \
+ ${BUILDER_ROOT}/build.sh ${UPLOAD} --flash-size \
'2g 4g' --snapshots \
${IMAGES}
rc=$?
diff --git a/tools/builder_common.sh b/tools/builder_common.sh
index 910080f..71d32f6 100644
--- a/tools/builder_common.sh
+++ b/tools/builder_common.sh
@@ -1964,7 +1964,7 @@ pkg_repo_rsync() {
fi
fi
- if [ -n "${DO_NOT_UPLOAD}" ]; then
+ if [ -z "${UPLOAD}" ]; then
return
fi
@@ -2382,7 +2382,7 @@ poudriere_bulk() {
LOGFILE=${BUILDER_LOGS}/poudriere.log
- if [ -z "${DO_NOT_UPLOAD}" -a -z "${PKG_RSYNC_HOSTNAME}" ]; then
+ if [ -n "${UPLOAD}" -a -z "${PKG_RSYNC_HOSTNAME}" ]; then
echo ">>> ERROR: PKG_RSYNC_HOSTNAME is not set"
print_error_pfS
fi
OpenPOWER on IntegriCloud