summary refs log tree commit diff
path: root/maintainers
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2018-03-31 21:06:41 -0400
committerShea Levy <shea@shealevy.com>2018-03-31 21:06:41 -0400
commit29d739a86a4aa7b012b0a40485d2accb6703a551 (patch)
tree75a3d49517bcce209669edad332b339213dfb8c4 /maintainers
parentfbcb6999ef1f408282cdd4dd7bea76df334f8976 (diff)
downloadnixpkgs-29d739a86a4aa7b012b0a40485d2accb6703a551.tar
nixpkgs-29d739a86a4aa7b012b0a40485d2accb6703a551.tar.gz
nixpkgs-29d739a86a4aa7b012b0a40485d2accb6703a551.tar.bz2
nixpkgs-29d739a86a4aa7b012b0a40485d2accb6703a551.tar.lz
nixpkgs-29d739a86a4aa7b012b0a40485d2accb6703a551.tar.xz
nixpkgs-29d739a86a4aa7b012b0a40485d2accb6703a551.tar.zst
nixpkgs-29d739a86a4aa7b012b0a40485d2accb6703a551.zip
copy-tarballs.pl: Set the right ACL for new keys.
Diffstat (limited to 'maintainers')
-rwxr-xr-xmaintainers/scripts/copy-tarballs.pl10
1 files changed, 8 insertions, 2 deletions
diff --git a/maintainers/scripts/copy-tarballs.pl b/maintainers/scripts/copy-tarballs.pl
index f3fe7236760..31e6045fb64 100755
--- a/maintainers/scripts/copy-tarballs.pl
+++ b/maintainers/scripts/copy-tarballs.pl
@@ -100,7 +100,10 @@ sub uploadFile {
     sub redirect {
         my ($name, $dest) = @_;
         #print STDERR "linking $name to $dest...\n";
-        $bucket->add_key($name, "", { 'x-amz-website-redirect-location' => "/" . $dest })
+        $bucket->add_key($name, "", {
+	    'x-amz-website-redirect-location' => "/" . $dest,
+	    'x-amz-acl' => "public-read"
+        })
             or die "failed to create redirect from $name to $dest\n";
         $cache{$name} = 1;
     }
@@ -112,7 +115,10 @@ sub uploadFile {
 
     # Upload the file as sha512/<hash-in-base-16>.
     print STDERR "uploading $fn to $mainKey...\n";
-    $bucket->add_key_filename($mainKey, $fn, { 'x-amz-meta-original-name' => $name })
+    $bucket->add_key_filename($mainKey, $fn, {
+	'x-amz-meta-original-name' => $name,
+	'x-amz-acl' => "public-read"
+    })
         or die "failed to upload $fn to $mainKey\n";
     $cache{$mainKey} = 1;
 }