diff options
author | gjb <gjb@FreeBSD.org> | 2015-03-03 02:46:59 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2015-03-03 02:46:59 +0000 |
commit | 8de40d01938fd77e1a70dc94ed2ec10c8eeb32bc (patch) | |
tree | d1068cbb88093aa017e74658cba34218e4658972 /release/tools | |
parent | 1290baf2e3ffa7ac2d8f9639c7c3d8e32dc7e133 (diff) | |
download | FreeBSD-src-8de40d01938fd77e1a70dc94ed2ec10c8eeb32bc.zip FreeBSD-src-8de40d01938fd77e1a70dc94ed2ec10c8eeb32bc.tar.gz |
MFC r279249, r279250, r279257:
r279249:
Add 'cloudware-install' target to handle copying cloud
disk images to a directory within DESTDIR.
Add CLOUDINSTALL variable to automatically generate the
actual list of install targets. While here, rename the
cloud-specific names from 'vm-' to 'cw-' to avoid naming
collisions.
Add AZURE_DISK, GCE_DISK, and OPENSTACK_DISK output file
variables.
Add 'cloudware-install' to the 'install' target.
r279250:
Remove a stale comment.
r279257:
Add a CLOUDPACKAGE variable to contain a list of targets for
post-install packaging cloud provider images.
Add a 'gce-package.sh' script to generate the final output
image ready for upload to the GCE platform. Right now, this
is the only image that has a specific output format (GNU-tar),
and this implementation is expected to be temporary.
This is not directly connected to the other release targets.
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'release/tools')
-rwxr-xr-x | release/tools/gce-package.sh | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/release/tools/gce-package.sh b/release/tools/gce-package.sh new file mode 100755 index 0000000..5d8ec33 --- /dev/null +++ b/release/tools/gce-package.sh @@ -0,0 +1,47 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Script to handle packaging cloud images for GCE. +# +# XXX: +# This script only exists to help in automating image creation, +# and reimplementing this is intended (in other words, this is +# temporary). + +usage() { + echo "Usage:" + echo "$(basename ${0}) -D <destdir> -I <input_file> -S <src_tree>" + exit 1 +} + +main() { + while getopts "D:I:W:" opt; do + case ${opt} in + D) + DESTDIR="${OPTARG}" + ;; + I) + INFILE="${OPTARG}" + ;; + S) + WORLDDIR="${OPTARG}" + ;; + *) + usage + ;; + esac + done + shift $(( ${OPTIND} - 1 )) + + if [ -z "${DESTDIR}" -o -z "${INFILE}" -o -z "${WORLDDIR}" ]; then + usage + fi + + OUTFILE="$(make -C ${WORLDDIR}/release -V OSRELEASE).tar.gz" + + cd ${DESTDIR} && tar --format=gnutar -zcf ${OUTFILE} ${INFILE} +} + +main "$@" |