deb-s3 0.11.7 → 24.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0412b30200d8205a1d117e0aaeaae8ece107a5476b8d587bcd89c5103444afdd
4
- data.tar.gz: e60c337da7d341a7bb5738bbaad3e09554295bb573b7009dcb27347b9cc95c0d
3
+ metadata.gz: 8168746478686586baf1221278e1b4d2f04ab35fb76dd367a5589f9efcf01799
4
+ data.tar.gz: 5e5ec07ff39c58e63c85cec95112ff48a9d5e5b21f1ef6f69c0c7513ccd1f583
5
5
  SHA512:
6
- metadata.gz: a8fd3031fd71131c96d0a76b3a9be6e765fd640a5c61c6c2591c1cea48c9318e9c8984bb7c6f771a2a576c9e88ceebfcd41a76a1731e30bc1875d4ac41de129a
7
- data.tar.gz: cda76567f2097475cbacaed5c52faf894d21a211996ed71de832b8af49ec0a9e99647584734e88586e534270d01f17f9d16d7f910dc90a9bd419ce9e8a03e708
6
+ metadata.gz: 506ac0e022618aa6ff9243ff57b7ad4054841afb05efbe8f5d9a6df0024a6b3767bc269210d9f129b9d83adaf528b5744b68198f5895907af095c92eb7a9e98d
7
+ data.tar.gz: e823e0f34f912e8fd4ea9b3ddcbf1b0361e14c8f1b1273bc0c6e6da6871d175f8e589f75eb49dbcf72051fb906c342a5da491c706f6bfd40a30174917989a547
data/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # deb-s3
2
2
 
3
- [![Build Status](https://travis-ci.org/deb-s3/deb-s3.svg?branch=master)](https://travis-ci.org/deb-s3/deb-s3)
4
-
5
3
  **This repository is a fork of [krobertson/deb-s3](https://github.com/krobertson/deb-s3).**
6
4
 
7
5
  `deb-s3` is a simple utility to make creating and managing APT repositories on
@@ -96,7 +94,7 @@ Options:
96
94
  # Default: us-east-1
97
95
  [--force-path-style], [--no-force-path-style] # Use S3 path style instead of subdomains.
98
96
  [--proxy-uri=PROXY_URI] # The URI of the proxy to send service requests through.
99
- -v, [--visibility=VISIBILITY] # The access policy for the uploaded files. Can be public, private, or authenticated.
97
+ -v, [--visibility=VISIBILITY] # The access policy for the uploaded files. Can be public, private, authenticated, or nil to avoid setting an ACL.
100
98
  # Default: public
101
99
  [--sign=SIGN] # GPG Sign the Release file when uploading a package, or when verifying it after removing a package. Use --sign with your GPG key ID to use a specific key (--sign=6643C242C18FE05B).
102
100
  [--gpg-options=GPG_OPTIONS] # Additional command line options to pass to GPG when signing.
@@ -282,3 +280,9 @@ Verifies that the files in the package manifests exist
282
280
  ]
283
281
  }
284
282
  ```
283
+
284
+ ## FAQ
285
+
286
+ ## "The bucket does not allow ACLs"
287
+
288
+ Set visiblity to `nil` to avoid trying to set ACL: `--visibility=nil`. You will need to configure permissions through the bucket policy.
data/lib/deb/s3/cli.rb CHANGED
@@ -83,7 +83,7 @@ class Deb::S3::CLI < Thor
83
83
  :type => :string,
84
84
  :aliases => "-v",
85
85
  :desc => "The access policy for the uploaded files. " +
86
- "Can be public, private, or authenticated."
86
+ "Can be public, private, authenticated, or nil to avoid setting an ACL."
87
87
 
88
88
  class_option :sign,
89
89
  :repeatable => true,
@@ -756,6 +756,8 @@ class Deb::S3::CLI < Thor
756
756
  "authenticated-read"
757
757
  when "bucket_owner"
758
758
  "bucket-owner-full-control"
759
+ when "nil"
760
+ nil
759
761
  else
760
762
  error("Invalid visibility setting given. Can be public, private, authenticated, or bucket_owner.")
761
763
  end
@@ -107,7 +107,7 @@ class Deb::S3::Release
107
107
  local_file = release_tmp.path+".asc"
108
108
  remote_file = "dists/#{@codename}/InRelease"
109
109
  yield remote_file if block_given?
110
- raise "Unable to locate InRelease file" unless File.exists?(local_file)
110
+ raise "Unable to locate InRelease file" unless File.exist?(local_file)
111
111
  s3_store(local_file, remote_file, 'application/pgp-signature; charset=us-ascii', self.cache_control)
112
112
  File.unlink(local_file)
113
113
  else
@@ -117,7 +117,7 @@ class Deb::S3::Release
117
117
  local_file = release_tmp.path+".asc"
118
118
  remote_file = self.filename+".gpg"
119
119
  yield remote_file if block_given?
120
- raise "Unable to locate Release signature file" unless File.exists?(local_file)
120
+ raise "Unable to locate Release signature file" unless File.exist?(local_file)
121
121
  s3_store(local_file, remote_file, 'application/pgp-signature; charset=us-ascii', self.cache_control)
122
122
  File.unlink(local_file)
123
123
  else
data/lib/deb/s3/utils.rb CHANGED
@@ -86,10 +86,13 @@ module Deb::S3::Utils
86
86
  options = {
87
87
  :bucket => Deb::S3::Utils.bucket,
88
88
  :key => s3_path(filename),
89
- :acl => Deb::S3::Utils.access_policy,
90
89
  :content_type => content_type,
91
90
  :metadata => { "md5" => file_md5.to_s },
92
91
  }
92
+
93
+ if !Deb::S3::Utils.access_policy.nil?
94
+ options[:acl] = Deb::S3::Utils.access_policy
95
+ end
93
96
  if !cache_control.nil?
94
97
  options[:cache_control] = cache_control
95
98
  end
data/lib/deb/s3.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Deb
3
3
  module S3
4
- VERSION = "0.11.7"
4
+ VERSION = "24.6.0"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deb-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.7
4
+ version: 24.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Robertson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-26 00:00:00.000000000 Z
11
+ date: 2024-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
- rubygems_version: 3.3.15
106
+ rubygems_version: 3.4.20
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: Easily create and manage an APT repository on S3.