deb-s3 24.6.0 → 25.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/deb/s3/cli.rb +15 -7
- data/lib/deb/s3/lock.rb +1 -1
- data/lib/deb/s3/manifest.rb +1 -1
- data/lib/deb/s3/release.rb +4 -3
- data/lib/deb/s3/utils.rb +2 -0
- data/lib/deb/s3.rb +1 -1
- metadata +8 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 010ae48788e7525b14525998e023a0fde376342a5d3bfa485473014cbf18c48e
|
|
4
|
+
data.tar.gz: e28bc799a04c73478e26ab48c3f95c59437e9f83056c7c9625703d21930877d2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 24620d6b574c6f2615a4609d669f21d45f453b9e5524d99f6cab5e9044b6e82aceb5919b726d7110e7d37064f39fdefd4ba1a3b91fdcc92b365a5afe450997a2
|
|
7
|
+
data.tar.gz: 1d4a3cc49db56eb60a460c740b1ea2f5f981d7fe69a1491be9a9ff8d2cbba7a06d5ef002d846151996f4e605c995c2bfbee733eaeadf7eb24bb54f0f237d324e
|
data/README.md
CHANGED
|
@@ -33,14 +33,14 @@ Install the package via gem
|
|
|
33
33
|
$ gem install deb-s3
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
or via APT
|
|
36
|
+
or via APT:
|
|
37
37
|
|
|
38
38
|
```console
|
|
39
39
|
# Add repository key
|
|
40
|
-
$ sudo
|
|
40
|
+
$ sudo curl -sfLo /etc/apt/trusted.gpg.d/deb-s3-keyring.asc https://deb-s3.github.io/deb-s3/deb-s3/gpg.key
|
|
41
41
|
|
|
42
42
|
# Add repository
|
|
43
|
-
$ echo "deb
|
|
43
|
+
$ echo "deb https://deb-s3.github.io/deb-s3/deb-s3 deb-s3 main" | sudo tee /etc/apt/sources.list.d/deb-s3.list
|
|
44
44
|
|
|
45
45
|
# Install package
|
|
46
46
|
$ sudo apt-get update
|
data/lib/deb/s3/cli.rb
CHANGED
|
@@ -97,6 +97,11 @@ class Deb::S3::CLI < Thor
|
|
|
97
97
|
:type => :string,
|
|
98
98
|
:desc => "Additional command line options to pass to GPG when signing."
|
|
99
99
|
|
|
100
|
+
class_option :gpg_provider,
|
|
101
|
+
:default => "gpg",
|
|
102
|
+
:type => :string,
|
|
103
|
+
:desc => "GPG provider to use."
|
|
104
|
+
|
|
100
105
|
class_option :encryption,
|
|
101
106
|
:default => false,
|
|
102
107
|
:type => :boolean,
|
|
@@ -194,15 +199,17 @@ class Deb::S3::CLI < Thor
|
|
|
194
199
|
|
|
195
200
|
# validate we have them
|
|
196
201
|
error("No architcture given and unable to determine one for #{file}. " +
|
|
197
|
-
"Please specify one with --arch [i386|amd64|armhf].") unless arch
|
|
202
|
+
"Please specify one with --arch [i386|amd64|armhf|arm64].") unless arch
|
|
198
203
|
|
|
199
204
|
# If the arch is all and the list of existing manifests is none, then
|
|
200
205
|
# throw an error. This is mainly the case when initializing a brand new
|
|
201
206
|
# repository. With "all", we won't know which architectures they're using.
|
|
202
207
|
if arch == "all" && manifests.count == 0
|
|
208
|
+
# The above comment isn't true any more, we "assume" that someonne wants all these architectures...
|
|
203
209
|
manifests['amd64'] = Deb::S3::Manifest.retrieve(options[:codename], component,'amd64', options[:cache_control], options[:fail_if_exists], options[:skip_package_upload])
|
|
204
210
|
manifests['i386'] = Deb::S3::Manifest.retrieve(options[:codename], component,'i386', options[:cache_control], options[:fail_if_exists], options[:skip_package_upload])
|
|
205
211
|
manifests['armhf'] = Deb::S3::Manifest.retrieve(options[:codename], component,'armhf', options[:cache_control], options[:fail_if_exists], options[:skip_package_upload])
|
|
212
|
+
manifests['arm64'] = Deb::S3::Manifest.retrieve(options[:codename], component,'arm64', options[:cache_control], options[:fail_if_exists], options[:skip_package_upload])
|
|
206
213
|
|
|
207
214
|
# error("Package #{File.basename(file)} had architecture \"all\", " +
|
|
208
215
|
# "however noexisting package lists exist. This can often happen " +
|
|
@@ -738,12 +745,13 @@ class Deb::S3::CLI < Thor
|
|
|
738
745
|
settings[:endpoint] = options[:endpoint] if options[:endpoint]
|
|
739
746
|
settings.merge!(provider)
|
|
740
747
|
|
|
741
|
-
Deb::S3::Utils.s3
|
|
742
|
-
Deb::S3::Utils.bucket
|
|
743
|
-
Deb::S3::Utils.signing_key
|
|
744
|
-
Deb::S3::Utils.
|
|
745
|
-
Deb::S3::Utils.
|
|
746
|
-
Deb::S3::Utils.
|
|
748
|
+
Deb::S3::Utils.s3 = Aws::S3::Client.new(settings)
|
|
749
|
+
Deb::S3::Utils.bucket = options[:bucket]
|
|
750
|
+
Deb::S3::Utils.signing_key = options[:sign]
|
|
751
|
+
Deb::S3::Utils.gpg_provider = options[:gpg_provider]
|
|
752
|
+
Deb::S3::Utils.gpg_options = options[:gpg_options]
|
|
753
|
+
Deb::S3::Utils.prefix = options[:prefix]
|
|
754
|
+
Deb::S3::Utils.encryption = options[:encryption]
|
|
747
755
|
|
|
748
756
|
# make sure we have a valid visibility setting
|
|
749
757
|
Deb::S3::Utils.access_policy =
|
data/lib/deb/s3/lock.rb
CHANGED
|
@@ -54,7 +54,7 @@ class Deb::S3::Lock
|
|
|
54
54
|
if Deb::S3::Utils.s3_exists?(final_lockfile)
|
|
55
55
|
lock = current(codename, component, architecture, cache_control)
|
|
56
56
|
$stderr.puts("Repository is locked by another user: #{lock.user} at host #{lock.host} (phase-1)")
|
|
57
|
-
$stderr.puts("Attempting to obtain a lock after #{wait_interval}
|
|
57
|
+
$stderr.puts("Attempting to obtain a lock after #{wait_interval} second(s).")
|
|
58
58
|
sleep(wait_interval)
|
|
59
59
|
else
|
|
60
60
|
# upload the file
|
data/lib/deb/s3/manifest.rb
CHANGED
|
@@ -123,7 +123,7 @@ class Deb::S3::Manifest
|
|
|
123
123
|
# generate the Packages.gz file
|
|
124
124
|
gztemp = Tempfile.new("Packages.gz")
|
|
125
125
|
gztemp.close
|
|
126
|
-
Zlib::GzipWriter.open(gztemp.path) { |gz| gz.write manifest }
|
|
126
|
+
Zlib::GzipWriter.open(gztemp.path) { |gz| gz.mtime = 0; gz.write manifest }
|
|
127
127
|
f = "dists/#{@codename}/#{@component}/binary-#{@architecture}/Packages.gz"
|
|
128
128
|
yield f if block_given?
|
|
129
129
|
s3_store(gztemp.path, f, 'application/x-gzip; charset=binary', self.cache_control)
|
data/lib/deb/s3/release.rb
CHANGED
|
@@ -103,7 +103,7 @@ 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.any? ? "-u #{Deb::S3::Utils.signing_key.join(" -u ")}" : ""
|
|
106
|
-
if system("
|
|
106
|
+
if system("#{Deb::S3::Utils.gpg_provider} -a #{key_param} --digest-algo SHA256 #{Deb::S3::Utils.gpg_options} -s --clearsign #{release_tmp.path}")
|
|
107
107
|
local_file = release_tmp.path+".asc"
|
|
108
108
|
remote_file = "dists/#{@codename}/InRelease"
|
|
109
109
|
yield remote_file if block_given?
|
|
@@ -113,7 +113,7 @@ class Deb::S3::Release
|
|
|
113
113
|
else
|
|
114
114
|
raise "Signing the InRelease file failed."
|
|
115
115
|
end
|
|
116
|
-
if system("
|
|
116
|
+
if system("#{Deb::S3::Utils.gpg_provider} -a #{key_param} --digest-algo SHA256 #{Deb::S3::Utils.gpg_options} -b #{release_tmp.path}")
|
|
117
117
|
local_file = release_tmp.path+".asc"
|
|
118
118
|
remote_file = self.filename+".gpg"
|
|
119
119
|
yield remote_file if block_given?
|
|
@@ -140,8 +140,9 @@ class Deb::S3::Release
|
|
|
140
140
|
def validate_others
|
|
141
141
|
to_apply = []
|
|
142
142
|
self.components.each do |comp|
|
|
143
|
-
%w(amd64 i386 armhf).each do |arch|
|
|
143
|
+
%w(amd64 i386 armhf arm64).each do |arch|
|
|
144
144
|
next if self.files.has_key?("#{comp}/binary-#{arch}/Packages")
|
|
145
|
+
next unless self.architectures.include?(arch)
|
|
145
146
|
|
|
146
147
|
m = Deb::S3::Manifest.new
|
|
147
148
|
m.codename = self.codename
|
data/lib/deb/s3/utils.rb
CHANGED
|
@@ -12,6 +12,8 @@ module Deb::S3::Utils
|
|
|
12
12
|
def access_policy= v; @access_policy = v end
|
|
13
13
|
def signing_key; @signing_key end
|
|
14
14
|
def signing_key= v; @signing_key = v end
|
|
15
|
+
def gpg_provider; @gpg_provider end
|
|
16
|
+
def gpg_provider= v; @gpg_provider = v end
|
|
15
17
|
def gpg_options; @gpg_options end
|
|
16
18
|
def gpg_options= v; @gpg_options = v end
|
|
17
19
|
def prefix; @prefix end
|
data/lib/deb/s3.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: deb-s3
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 25.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
8
|
-
autorequire:
|
|
7
|
+
- Stefan Heitmüller
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: thor
|
|
@@ -58,16 +57,16 @@ dependencies:
|
|
|
58
57
|
requirements:
|
|
59
58
|
- - "~>"
|
|
60
59
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '
|
|
60
|
+
version: '12'
|
|
62
61
|
type: :development
|
|
63
62
|
prerelease: false
|
|
64
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
64
|
requirements:
|
|
66
65
|
- - "~>"
|
|
67
66
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '
|
|
67
|
+
version: '12'
|
|
69
68
|
description: Easily create and manage an APT repository on S3.
|
|
70
|
-
email:
|
|
69
|
+
email: stefan.heitmueller@gmx.com
|
|
71
70
|
executables:
|
|
72
71
|
- deb-s3
|
|
73
72
|
extensions: []
|
|
@@ -84,11 +83,10 @@ files:
|
|
|
84
83
|
- lib/deb/s3/templates/package.erb
|
|
85
84
|
- lib/deb/s3/templates/release.erb
|
|
86
85
|
- lib/deb/s3/utils.rb
|
|
87
|
-
homepage:
|
|
86
|
+
homepage: https://github.com/deb-s3/deb-s3
|
|
88
87
|
licenses:
|
|
89
88
|
- MIT
|
|
90
89
|
metadata: {}
|
|
91
|
-
post_install_message:
|
|
92
90
|
rdoc_options: []
|
|
93
91
|
require_paths:
|
|
94
92
|
- lib
|
|
@@ -103,8 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
103
101
|
- !ruby/object:Gem::Version
|
|
104
102
|
version: '0'
|
|
105
103
|
requirements: []
|
|
106
|
-
rubygems_version: 3.
|
|
107
|
-
signing_key:
|
|
104
|
+
rubygems_version: 3.6.9
|
|
108
105
|
specification_version: 4
|
|
109
106
|
summary: Easily create and manage an APT repository on S3.
|
|
110
107
|
test_files: []
|