Move the component into the repository structure.

The RELEASE file must be at the top-level for the signed
repository to work correctly.

PiperOrigin-RevId: 269897109
This commit is contained in:
Adin Scannell
2019-09-18 14:57:12 -07:00
committed by gVisor bot
parent b63d56b0b4
commit 461123ea35
2 changed files with 13 additions and 12 deletions
+5 -5
View File
@@ -27,7 +27,7 @@ pkg=$(build -c opt --host_force_python=py2 //runsc:runsc-debian)
# Build a repository, if the key is available.
if [[ -v KOKORO_REPO_KEY ]]; then
repo=$(tools/make_repository.sh "${KOKORO_KEYSTORE_DIR}/${KOKORO_REPO_KEY}" gvisor-bot@google.com ${pkg})
repo=$(tools/make_repository.sh "${KOKORO_KEYSTORE_DIR}/${KOKORO_REPO_KEY}" gvisor-bot@google.com main ${pkg})
fi
# Install installs artifacts.
@@ -51,7 +51,7 @@ if [[ -v KOKORO_ARTIFACTS_DIR ]]; then
# The "latest" directory and current date.
stamp="$(date -Idate)"
install "${KOKORO_ARTIFACTS_DIR}/nightly/latest" \
"${KOKORO_ARTIFACTS_DIR}/dists/nightly/main"
"${KOKORO_ARTIFACTS_DIR}/dists/nightly/latest"
install "${KOKORO_ARTIFACTS_DIR}/nightly/${stamp}" \
"${KOKORO_ARTIFACTS_DIR}/dists/nightly/${stamp}"
else
@@ -66,13 +66,13 @@ if [[ -v KOKORO_ARTIFACTS_DIR ]]; then
name=$(echo "${tag}" | cut -d'-' -f2)
base=$(echo "${name}" | cut -d'.' -f1)
install "${KOKORO_ARTIFACTS_DIR}/release/${name}" \
"${KOKORO_ARTIFACTS_DIR}/dists/${name}/main"
"${KOKORO_ARTIFACTS_DIR}/dists/${name}"
if [[ "${base}" != "${tag}" ]]; then
install "${KOKORO_ARTIFACTS_DIR}/release/${base}" \
"${KOKORO_ARTIFACTS_DIR}/dists/${base}/main"
"${KOKORO_ARTIFACTS_DIR}/dists/${base}"
fi
install "${KOKORO_ARTIFACTS_DIR}/release/latest" \
"${KOKORO_ARTIFACTS_DIR}/dists/latest/main"
"${KOKORO_ARTIFACTS_DIR}/dists/latest"
done
fi
fi
+8 -7
View File
@@ -16,13 +16,14 @@
# Parse arguments. We require more than two arguments, which are the private
# keyring, the e-mail associated with the signer, and the list of packages.
if [ "$#" -le 2 ]; then
echo "usage: $0 <private-key> <signer-email> <packages...>"
if [ "$#" -le 3 ]; then
echo "usage: $0 <private-key> <signer-email> <component> <packages...>"
exit 1
fi
declare -r private_key=$(readlink -e "$1")
declare -r signer="$2"
shift; shift
declare -r component="$3"
shift; shift; shift
# Verbose from this point.
set -xeo pipefail
@@ -47,8 +48,8 @@ for pkg in "$@"; do
if [[ "${name}" == "${arch}" ]]; then
continue # Not a regular package.
fi
mkdir -p "${tmpdir}"/binary-"${arch}"
cp -a "${pkg}" "${tmpdir}"/binary-"${arch}"
mkdir -p "${tmpdir}"/"${component}"/binary-"${arch}"
cp -a "${pkg}" "${tmpdir}"/"${component}"/binary-"${arch}"
done
find "${tmpdir}" -type f -exec chmod 0644 {} \;
@@ -58,12 +59,12 @@ find "${tmpdir}" -type f -exec chmod 0644 {} \;
find "${tmpdir}" -type l -exec rm -f {} \;
# Sign all packages.
for file in "${tmpdir}"/binary-*/*.deb; do
for file in "${tmpdir}"/"${component}"/binary-*/*.deb; do
dpkg-sig -g "--no-default-keyring --keyring ${keyring}" --sign builder "${file}" >&2
done
# Build the package list.
for dir in "${tmpdir}"/binary-*; do
for dir in "${tmpdir}"/"${component}"/binary-*; do
(cd "${dir}" && apt-ftparchive packages . | gzip > Packages.gz)
done