deb-s3 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/deb/s3.rb +1 -1
- data/lib/deb/s3/cli.rb +6 -6
- data/lib/deb/s3/release.rb +18 -21
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9e8dbe12df60c668bf2f6469b90d6cdd1cd81325
|
4
|
+
data.tar.gz: 0107fe0bd5e38e79a39046ebeb19566b647e3865
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79b208495ff06a5e68a0a6ccb6829fc8bf0b7ef99a78eb33959e688e27ac9407e9f19d1ab6af3e4c90056fb46dd6b354de43e26b1d43df16ed76a586a057c7de
|
7
|
+
data.tar.gz: 720fc4fc1585841872a49e1572a88107adad1b404e65be6984fff915062aa30f9e63ba31215020606e082cbba108506750c63d30a01bdcbd4437c392dec689aa
|
data/lib/deb/s3.rb
CHANGED
data/lib/deb/s3/cli.rb
CHANGED
@@ -60,10 +60,14 @@ class Deb::S3::CLI < Thor
|
|
60
60
|
:type => :string,
|
61
61
|
:desc => "The (optional) session token for connecting to S3."
|
62
62
|
|
63
|
+
class_option :endpoint,
|
64
|
+
:type => :string,
|
65
|
+
:desc => "The URL endpoint to the S3 API."
|
66
|
+
|
63
67
|
class_option :s3_region,
|
64
68
|
:type => :string,
|
65
69
|
:desc => "The region for connecting to S3.",
|
66
|
-
:default => "us-east-1"
|
70
|
+
:default => ENV["AWS_DEFAULT_REGION"] || "us-east-1"
|
67
71
|
|
68
72
|
class_option :force_path_style,
|
69
73
|
:default => false,
|
@@ -74,11 +78,6 @@ class Deb::S3::CLI < Thor
|
|
74
78
|
:type => :string,
|
75
79
|
:desc => "The URI of the proxy to send service requests through."
|
76
80
|
|
77
|
-
#class_option :use_ssl,
|
78
|
-
#:default => true,
|
79
|
-
#:type => :boolean,
|
80
|
-
#:desc => "Whether to use HTTP or HTTPS for request transport."
|
81
|
-
|
82
81
|
class_option :visibility,
|
83
82
|
:default => "public",
|
84
83
|
:type => :string,
|
@@ -590,6 +589,7 @@ class Deb::S3::CLI < Thor
|
|
590
589
|
:http_proxy => options[:proxy_uri],
|
591
590
|
:force_path_style => options[:force_path_style]
|
592
591
|
}
|
592
|
+
settings[:endpoint] = options[:endpoint] if options[:endpoint]
|
593
593
|
settings.merge!(provider)
|
594
594
|
|
595
595
|
Deb::S3::Utils.s3 = Aws::S3::Client.new(settings)
|
data/lib/deb/s3/release.rb
CHANGED
@@ -103,28 +103,25 @@ class Deb::S3::Release
|
|
103
103
|
# sign the file, if necessary
|
104
104
|
if Deb::S3::Utils.signing_key
|
105
105
|
key_param = Deb::S3::Utils.signing_key != "" ? "--default-key=#{Deb::S3::Utils.signing_key}" : ""
|
106
|
-
if
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
File.unlink(local_file)
|
114
|
-
else
|
115
|
-
raise "Signing the InRelease file failed."
|
116
|
-
end
|
106
|
+
if system("gpg -a #{key_param} --digest-algo SHA256 #{Deb::S3::Utils.gpg_options} -s --clearsign #{release_tmp.path}")
|
107
|
+
local_file = release_tmp.path+".asc"
|
108
|
+
remote_file = "dists/#{@codename}/InRelease"
|
109
|
+
yield remote_file if block_given?
|
110
|
+
raise "Unable to locate InRelease file" unless File.exists?(local_file)
|
111
|
+
s3_store(local_file, remote_file, 'application/pgp-signature; charset=us-ascii', self.cache_control)
|
112
|
+
File.unlink(local_file)
|
117
113
|
else
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
114
|
+
raise "Signing the InRelease file failed."
|
115
|
+
end
|
116
|
+
if system("gpg -a #{key_param} --digest-algo SHA256 #{Deb::S3::Utils.gpg_options} -b #{release_tmp.path}")
|
117
|
+
local_file = release_tmp.path+".asc"
|
118
|
+
remote_file = self.filename+".gpg"
|
119
|
+
yield remote_file if block_given?
|
120
|
+
raise "Unable to locate Release signature file" unless File.exists?(local_file)
|
121
|
+
s3_store(local_file, remote_file, 'application/pgp-signature; charset=us-ascii', self.cache_control)
|
122
|
+
File.unlink(local_file)
|
123
|
+
else
|
124
|
+
raise "Signing the Release file failed."
|
128
125
|
end
|
129
126
|
else
|
130
127
|
# remove an existing Release.gpg, if it was there
|
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.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ken Robertson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
106
|
rubyforge_project:
|
107
|
-
rubygems_version: 2.
|
107
|
+
rubygems_version: 2.6.13
|
108
108
|
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: Easily create and manage an APT repository on S3.
|