From 6d165f8a7c29cada5421ec740f03697125b5b85c Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Mon, 5 May 2014 15:14:46 -0700 Subject: [PATCH] maint(generate_au_zip): Drop old update service uploader --- build_library/generate_au_zip.py | 2 - core_upload_update | 81 -------------------------------- 2 files changed, 83 deletions(-) delete mode 100755 core_upload_update diff --git a/build_library/generate_au_zip.py b/build_library/generate_au_zip.py index 34fd278b10..3280b8b0f3 100755 --- a/build_library/generate_au_zip.py +++ b/build_library/generate_au_zip.py @@ -25,12 +25,10 @@ STATIC_FILES = ['/usr/bin/old_bins/cgpt', '%s/version.txt' % REPO_MANIFESTS_DIR, '%s/chromeos-common.sh' % SCRIPTS_DIR, '%s/common.sh' % SCRIPTS_DIR, - '%s/core_upload_update' % SCRIPTS_DIR, '%s/core_roller_upload' % SCRIPTS_DIR, ] DYNAMIC_EXECUTABLES = ['/usr/bin/delta_generator', - '/usr/bin/core-admin', '/usr/bin/bsdiff', '/usr/bin/bspatch'] diff --git a/core_upload_update b/core_upload_update deleted file mode 100755 index 5cf866fc88..0000000000 --- a/core_upload_update +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2013 The CoreOS Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -SCRIPT_ROOT=$(dirname $(readlink -f "$0")) -# We have to simple-mindedly set GCLIENT_ROOT in case we're running from -# au-generator.zip because common.sh will fail while auto-detect it. -export GCLIENT_ROOT=$(readlink -f "${SCRIPT_ROOT}/../../") -. "${SCRIPT_ROOT}/common.sh" || exit 1 - -DEFINE_string image "${SRC_ROOT}/build/images/amd64-generic/latest/${COREOS_BASE_IMAGE_NAME}" \ - "Path to the production image (not base/dev/qemu/xen/etc)" -DEFINE_string version "${COREOS_VERSION_STRING}" \ - "Version number of this build." -DEFINE_string track "dev-channel" \ - "Track that this update goes into." -DEFINE_string api_key "" \ - "API secret key for access to the administrative interface." -DEFINE_string public_key "" \ - "Path to the public RSA key that will sign this build." -DEFINE_string private_key "" \ - "Path to the private RSA key that will sign this build." -DEFINE_string app_id "{e96281a6-d1af-4bde-9a0a-97b76e56dc57}" \ - "GUID of the app that this update is for." - -FLAGS_HELPS="usage: $SCRIPTNAME [flags] - -Setting everything up for use\n - -1) Run 'gsutil config' and use project id coreos.com:core-update-storage\n -2) Ensure core-admin is installed, it is a recent addition\n - -NOTE: Use the coreos_production_image.bin not base, developer, vm, etc... -" - -# Parse flags -FLAGS "$@" || exit 1 -eval set -- "${FLAGS_ARGV}" -switch_to_strict_mode - -[[ -z "${FLAGS_api_key}" ]] && die "--api_key is required" -[[ -z "${FLAGS_private_key}" ]] && die "--private_key is required" -[[ -z "${FLAGS_public_key}" ]] && die "--public_key is required" - -# Add the current directory to $PATH if we seem to be from a au bundle -if ! which cros_generate_update_payload &>/dev/null; then - if [[ -e "${SCRIPT_ROOT}/cros_generate_update_payload" ]]; then - export PATH="${SCRIPT_ROOT}:${PATH}" - else - die_notrace "Cannot find cros_generate_update_payload" - fi -fi - -OUTPUT_DIR=$(mktemp -d) -trap "rm -rf ${OUTPUT_DIR}" INT TERM EXIT - -# Generate a payload and sign it with our private key -cros_generate_update_payload \ - --image "${FLAGS_image}" \ - --output "${OUTPUT_DIR}/update.gz" \ - --metadata_output "${OUTPUT_DIR}/update.metadata" \ - --private_key "${FLAGS_private_key}" \ - --public_key "${FLAGS_public_key}" \ - --outside_chroot - -MD5SUM=$(md5sum ${FLAGS_image} | cut -f1 -d" ") -gsutil cp "${OUTPUT_DIR}/update.gz" \ - gs://update-storage.core-os.net/${FLAGS_track}/$MD5SUM/update.gz -core-admin new-version \ - -k ${FLAGS_api_key} \ - -a ${FLAGS_app_id} \ - -v ${FLAGS_version} \ - -m "${OUTPUT_DIR}/update.metadata" \ - -t ${FLAGS_track} -p $MD5SUM "${OUTPUT_DIR}/update.gz" - -# Copy the vagrant boxes and pre-built images over to the track mirror -gsutil cp \ - "${COREOS_UPLOAD_ROOT}/amd64-generic/${FLAGS_version}/*" \ - "${COREOS_UPLOAD_ROOT}/amd64-generic/${FLAGS_track}/"