From db48d3cf28e87c98d7cc6844385f2962ec5bb426 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 8 Nov 2013 15:44:52 -0700 Subject: [PATCH 1/3] Update release script with proper support for non-*.docker.io bucket URLs Upstream-commit: b8e7ec1b74fdeaeab56a8ffab801dcd87b7361ca Component: engine --- components/engine/hack/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/hack/release.sh b/components/engine/hack/release.sh index 56538ea70a..23718dd63d 100755 --- a/components/engine/hack/release.sh +++ b/components/engine/hack/release.sh @@ -107,7 +107,7 @@ s3_url() { echo "https://$BUCKET" ;; *) - echo "http://$BUCKET.s3.amazonaws.com" + s3cmd ws-info s3://$BUCKET | awk -v 'FS=: +' '/http:\/\/'$BUCKET'/ { gsub(/\/+$/, "", $2); print $2 }' ;; esac } From 0ed69503c99279c624b8f63a252a71c7f8427b88 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 8 Nov 2013 15:45:18 -0700 Subject: [PATCH 2/3] Update release script to move https://get.docker.io/ubuntu/info to https://get.docker.io/ubuntu/ and provide a backwards-compatibility redirect (same for /builds/info) Upstream-commit: f56945d71bcce6e7d18b3471bf4744ddd70b1783 Component: engine --- components/engine/hack/release.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/components/engine/hack/release.sh b/components/engine/hack/release.sh index 23718dd63d..06b76a1c7a 100755 --- a/components/engine/hack/release.sh +++ b/components/engine/hack/release.sh @@ -114,7 +114,7 @@ s3_url() { # Upload the 'ubuntu' bundle to S3: # 1. A full APT repository is published at $BUCKET/ubuntu/ -# 2. Instructions for using the APT repository are uploaded at $BUCKET/ubuntu/info +# 2. Instructions for using the APT repository are uploaded at $BUCKET/ubuntu/index release_ubuntu() { [ -e bundles/$VERSION/ubuntu ] || { echo >&2 './hack/make.sh must be run before release_ubuntu' @@ -168,7 +168,7 @@ EOF # Upload repo s3cmd --acl-public sync $APTDIR/ s3://$BUCKET/ubuntu/ - cat < /etc/apt/sources.list.d/docker.list # Then import the repository key @@ -180,7 +180,12 @@ apt-get update ; apt-get install -y lxc-docker # Alternatively, just use the curl-able install.sh script provided at $(s3_url) # EOF - echo "APT repository uploaded. Instructions available at $(s3_url)/ubuntu/info" + + # Add redirect at /ubuntu/info for URL-backwards-compatibility + rm -rf /tmp/emptyfile && touch /tmp/emptyfile + s3cmd --acl-public --add-header='x-amz-website-redirect-location:/ubuntu/' --mime-type='text/plain' put /tmp/emptyfile s3://$BUCKET/ubuntu/info + + echo "APT repository uploaded. Instructions available at $(s3_url)/ubuntu" } # Upload a static binary to S3 @@ -189,14 +194,20 @@ release_binary() { echo >&2 './hack/make.sh must be run before release_binary' exit 1 } + S3DIR=s3://$BUCKET/builds/Linux/x86_64 s3cmd --acl-public put bundles/$VERSION/binary/docker-$VERSION $S3DIR/docker-$VERSION - cat < Date: Sat, 9 Nov 2013 02:28:04 -0700 Subject: [PATCH 3/3] Fix the display of get.docker.io in Firefox by making our index files text/plain Upstream-commit: 7f1b179c67476efa7dbafda55541b515fbe0f346 Component: engine --- components/engine/hack/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/hack/release.sh b/components/engine/hack/release.sh index 06b76a1c7a..931ab6f9af 100755 --- a/components/engine/hack/release.sh +++ b/components/engine/hack/release.sh @@ -97,7 +97,7 @@ write_to_s3() { DEST=$1 F=`mktemp` cat > $F - s3cmd --acl-public put $F $DEST + s3cmd --acl-public --mime-type='text/plain' put $F $DEST rm -f $F }