From e9c243264d7fb6190885e9501da334bcf245ce98 Mon Sep 17 00:00:00 2001 From: iliana etaoin Date: Fri, 21 Jun 2024 09:46:04 -0700 Subject: [PATCH] remove scripts from old releng CI process (#5879) I forgot to remove these in #5744. These scripts were adapted into `cargo xtask releng` and aren't referenced anywhere in this repo anymore. --- tools/build-global-zone-packages.sh | 74 ------------------- .../build-trampoline-global-zone-packages.sh | 51 ------------- 2 files changed, 125 deletions(-) delete mode 100755 tools/build-global-zone-packages.sh delete mode 100755 tools/build-trampoline-global-zone-packages.sh diff --git a/tools/build-global-zone-packages.sh b/tools/build-global-zone-packages.sh deleted file mode 100755 index fe00e53383..0000000000 --- a/tools/build-global-zone-packages.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env bash - -set -eux - -TOOLS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -# Use the default "out" dir in omicron to find the needed packages if one isn't given -tarball_src_dir="$(readlink -f "${1:-"$TOOLS_DIR/../out"}")" -# Stash the final tgz in the given src dir if a different target isn't given -out_dir="$(readlink -f "${2:-"$tarball_src_dir"}")" - -# Make sure needed packages exist -deps=( - "$tarball_src_dir/omicron-sled-agent.tar" - "$tarball_src_dir/mg-ddm-gz.tar" - "$tarball_src_dir/pumpkind-gz.tar" - "$tarball_src_dir/propolis-server.tar.gz" - "$tarball_src_dir/overlay.tar.gz" - "$tarball_src_dir/oxlog.tar" -) -for dep in "${deps[@]}"; do - if [[ ! -e $dep ]]; then - echo "Missing Global Zone dep: $(basename "$dep")" - exit 1 - fi -done - -# Assemble global zone files in a temporary directory. -tmp_gz=$(mktemp -d) -trap 'cd /; rm -rf "$tmp_gz"' EXIT # Cleanup on exit - -# Header file, identifying this is intended to be layered in the global zone. -# Within the ramdisk, this means that all files under "root/foo" should appear -# in the global zone as "/foo". -echo '{"v":"1","t":"layer"}' > "$tmp_gz/oxide.json" - -# Extract the sled-agent tarball for re-packaging into the layered GZ archive. -pkg_dir="$tmp_gz/root/opt/oxide/sled-agent" -mkdir -p "$pkg_dir" -cd "$pkg_dir" -tar -xvfz "$tarball_src_dir/omicron-sled-agent.tar" -# Ensure that the manifest for the sled agent exists in a location where it may -# be automatically initialized. -mkdir -p "$tmp_gz/root/lib/svc/manifest/site/" -mv pkg/manifest.xml "$tmp_gz/root/lib/svc/manifest/site/sled-agent.xml" -cd - -# Extract the mg-ddm tarball for re-packaging into the layered GZ archive. -pkg_dir="$tmp_gz/root/opt/oxide/mg-ddm" -mkdir -p "$pkg_dir" -cd "$pkg_dir" -tar -xvfz "$tarball_src_dir/mg-ddm-gz.tar" -cd - -# Extract the pumpkind tarball for re-packaging into the layered GZ archive. -pkg_dir="$tmp_gz/root/opt/oxide/pumpkind" -mkdir -p "$pkg_dir" -cd "$pkg_dir" -tar -xvfz "$tarball_src_dir/pumpkind-gz.tar" -cd - -# Extract the oxlog tarball for re-packaging into the layered GZ archive. -pkg_dir="$tmp_gz/root/opt/oxide/oxlog" -mkdir -p "$pkg_dir" -cd "$pkg_dir" -tar -xvfz "$tarball_src_dir/oxlog.tar" -cd - - -# propolis should be bundled with this OS: Put the propolis-server zone image -# under /opt/oxide in the gz. -cp "$tarball_src_dir/propolis-server.tar.gz" "$tmp_gz/root/opt/oxide" - -# The zone overlay should also be bundled. -cp "$tarball_src_dir/overlay.tar.gz" "$tmp_gz/root/opt/oxide" - -# Create the final output and we're done -cd "$tmp_gz" && tar cvfz "$out_dir"/global-zone-packages.tar.gz oxide.json root diff --git a/tools/build-trampoline-global-zone-packages.sh b/tools/build-trampoline-global-zone-packages.sh deleted file mode 100755 index ee8e7b3371..0000000000 --- a/tools/build-trampoline-global-zone-packages.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash - -set -eux - -TOOLS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -# Use the default "out" dir in omicron to find the needed packages if one isn't given -tarball_src_dir="$(readlink -f "${1:-"$TOOLS_DIR/../out"}")" -# Stash the final tgz in the given src dir if a different target isn't given -out_dir="$(readlink -f "${2:-$tarball_src_dir}")" - -# Make sure needed packages exist -deps=( - "$tarball_src_dir"/installinator.tar - "$tarball_src_dir"/mg-ddm-gz.tar -) -for dep in "${deps[@]}"; do - if [[ ! -e $dep ]]; then - echo "Missing Trampoline Global Zone dep: $(basename "$dep")" - exit 1 - fi -done - -# Assemble global zone files in a temporary directory. -tmp_trampoline=$(mktemp -d) -trap 'cd /; rm -rf "$tmp_trampoline"' EXIT # Cleanup on exit - -# Header file, identifying this is intended to be layered in the global zone. -# Within the ramdisk, this means that all files under "root/foo" should appear -# in the global zone as "/foo". -echo '{"v":"1","t":"layer"}' > "$tmp_trampoline/oxide.json" - -# Extract the installinator tarball for re-packaging into the layered GZ archive. -pkg_dir="$tmp_trampoline/root/opt/oxide/installinator" -mkdir -p "$pkg_dir" -cd "$pkg_dir" -tar -xvfz "$tarball_src_dir/installinator.tar" -# Ensure that the manifest for the sled agent exists in a location where it may -# be automatically initialized. -mkdir -p "$tmp_trampoline/root/lib/svc/manifest/site/" -mv pkg/manifest.xml "$tmp_trampoline/root/lib/svc/manifest/site/installinator.xml" -cd - -# Extract the mg-ddm tarball for re-packaging into the layered GZ archive. -pkg_dir="$tmp_trampoline/root/opt/oxide/mg-ddm" -mkdir -p "$pkg_dir" -cd "$pkg_dir" -tar -xvfz "$tarball_src_dir/mg-ddm-gz.tar" -cd - - -# Create the final output and we're done -cd "$tmp_trampoline" && tar cvfz "$out_dir"/trampoline-global-zone-packages.tar.gz oxide.json root