prm 0.2.5 → 0.2.6
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.
- data/bin/prm +4 -4
- data/lib/prm/repo.rb +10 -5
- metadata +4 -4
data/bin/prm
CHANGED
@@ -22,11 +22,11 @@ class Main < Clamp::Command
|
|
22
22
|
option ["-d", "--directory"], "DIRECTORY", "Move packages from directory to target", :default => false
|
23
23
|
option ["-s", "--snapshot"], "COMPONENT", "Creates a snapshot of a component", :default => false
|
24
24
|
option ["-e", "--recent"], :flag, "Snapshot the most recent unique packages", :default => false
|
25
|
-
option ["-k", "--gpg"], :flag, "Sign release files with users GPG key", :default => false
|
26
25
|
option ["-g", "--generate"], :flag , "[DEPRECATED 0.2.4]" do
|
27
26
|
warn "WARNING: Generate option (--generate) is deprecated\n" +
|
28
27
|
"This option will be removed in next stable release (0.3.0)\n"
|
29
28
|
end
|
29
|
+
option ["-k", "--gpg"], "GPG KEY", "Sign release files with this GPG key", :default => false
|
30
30
|
|
31
31
|
def execute
|
32
32
|
if recent? && !snapshot
|
@@ -34,7 +34,7 @@ class Main < Clamp::Command
|
|
34
34
|
end
|
35
35
|
|
36
36
|
if type == "deb" && !component
|
37
|
-
raise "--deb option required the --component option!"
|
37
|
+
raise "--deb option required for the --component option!"
|
38
38
|
end
|
39
39
|
|
40
40
|
r = PRM::Repo.new
|
@@ -42,8 +42,8 @@ class Main < Clamp::Command
|
|
42
42
|
r.arch = arch
|
43
43
|
r.type = type
|
44
44
|
r.path = path
|
45
|
-
|
46
|
-
r.gpg = gpg
|
45
|
+
unless gpg.nil?
|
46
|
+
r.gpg = gpg
|
47
47
|
end
|
48
48
|
unless accesskey.nil?
|
49
49
|
r.accesskey = accesskey
|
data/lib/prm/repo.rb
CHANGED
@@ -32,8 +32,8 @@ module Debian
|
|
32
32
|
}
|
33
33
|
generate_release(path,r,component,arch)
|
34
34
|
|
35
|
-
|
36
|
-
generate_release_gpg(path,r)
|
35
|
+
unless gpg == false
|
36
|
+
generate_release_gpg(path,r, gpg)
|
37
37
|
end
|
38
38
|
}
|
39
39
|
end
|
@@ -130,7 +130,7 @@ module Debian
|
|
130
130
|
|
131
131
|
write_mutex.synchronize do
|
132
132
|
# Copy the control file data into the Packages list
|
133
|
-
d.write(File.read("tmp/#{tdeb}/control"))
|
133
|
+
d.write(File.read("tmp/#{tdeb}/control").chomp)
|
134
134
|
d.write(package_info.join("\n"))
|
135
135
|
d.write("\n") # blank line between package info in the Packages file
|
136
136
|
end
|
@@ -193,9 +193,14 @@ module Debian
|
|
193
193
|
end
|
194
194
|
|
195
195
|
# We expect that GPG is installed and a key has already been made
|
196
|
-
def generate_release_gpg(path,release)
|
196
|
+
def generate_release_gpg(path,release,gpg)
|
197
197
|
Dir.chdir("#{path}/dists/#{release}") do
|
198
|
-
|
198
|
+
if gpg.nil?
|
199
|
+
sign_cmd = "gpg --yes --output Release.gpg -b Release"
|
200
|
+
else
|
201
|
+
sign_cmd = "gpg -u #{gpg} --yes --output Release.gpg -b Release"
|
202
|
+
end
|
203
|
+
system sign_cmd
|
199
204
|
end
|
200
205
|
end
|
201
206
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 6
|
10
|
+
version: 0.2.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brett Gailey
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2013-
|
18
|
+
date: 2013-11-26 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|