prm 0.2.10 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/prm +4 -0
- data/lib/prm/repo.rb +9 -6
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 942e90c954d67c672ca31f05b6bc60f7ea6d9ce9
|
4
|
+
data.tar.gz: 65c27e4b98614eb48f74ba64f88ddb2fdbf28f8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5519dde4f7bfa2bde049c224933e277ddd8e81bcf128d2f530efeb7f35e3e0bd9738799a60914f753e55a3ac9ad8bf385a2c064331b7b0c33b054b5d8262f828
|
7
|
+
data.tar.gz: 7f17d7d61411079c6900280eabb6f9f4f92209113c51dd5c9ea8588d17839d03643002ea5b923fd97d482f63fa0fbce4b4baeb8f596b3e2fd84ca61d222fdf29
|
data/bin/prm
CHANGED
@@ -18,6 +18,7 @@ class Main < Clamp::Command
|
|
18
18
|
option ["-c", "--component"], "COMPONENT", "Component to create [DEB ONLY]"
|
19
19
|
option ["-l", "--label"], "LABEL", "Label for generated repository [DEB ONLY]"
|
20
20
|
option ["-o", "--origin"], "ORIGIN", "Origin for generated repository [DEB ONLY]"
|
21
|
+
option ["-u", "--upload"], "UPLOAD", "Upload your repository to a S3 compatible object store [DEB ONLY]"
|
21
22
|
option ["--nocache"], :flag, "Don't cache md5 sums [DEB ONLY]"
|
22
23
|
option ["--accesskey"], "ACCESS KEY", "DHO/S3 Access Key", :default => false
|
23
24
|
option ["--secretkey"], "SECRET KEY", "DHO/S3 Secret Key", :default => false
|
@@ -46,6 +47,9 @@ class Main < Clamp::Command
|
|
46
47
|
r.path = path
|
47
48
|
r.label = label
|
48
49
|
r.origin = origin
|
50
|
+
unless upload.nil?
|
51
|
+
r.upload = upload
|
52
|
+
end
|
49
53
|
unless gpg.nil?
|
50
54
|
r.gpg = gpg
|
51
55
|
end
|
data/lib/prm/repo.rb
CHANGED
@@ -116,7 +116,7 @@ module Debian
|
|
116
116
|
file = File.open(md5sum_path, 'r')
|
117
117
|
temp_md5sum = file.read
|
118
118
|
file.close
|
119
|
-
|
119
|
+
|
120
120
|
if md5sum != temp_md5sum
|
121
121
|
puts "WARN: md5sum mismatch on #{deb}\n"
|
122
122
|
end
|
@@ -288,11 +288,12 @@ module SNAP
|
|
288
288
|
end
|
289
289
|
|
290
290
|
module DHO
|
291
|
-
def sync_to_dho(path, accesskey, secretkey,pcomponent,prelease)
|
291
|
+
def sync_to_dho(path, accesskey, secretkey,pcomponent,prelease,object_store)
|
292
292
|
component = pcomponent.join
|
293
293
|
release = prelease.join
|
294
|
+
puts object_store.inspect
|
294
295
|
AWS::S3::Base.establish_connection!(
|
295
|
-
:server =>
|
296
|
+
:server => object_store,
|
296
297
|
:use_ssl => true,
|
297
298
|
:access_key_id => accesskey,
|
298
299
|
:secret_access_key => secretkey
|
@@ -331,9 +332,9 @@ module DHO
|
|
331
332
|
end
|
332
333
|
end
|
333
334
|
end
|
334
|
-
puts "Your apt repository is located at http
|
335
|
+
puts "Your apt repository is located at http://#{object_store}/#{path}/"
|
335
336
|
puts "Add the following to your apt sources.list"
|
336
|
-
puts "deb http
|
337
|
+
puts "deb http://#{object_store}/#{path}/ #{release} #{component}"
|
337
338
|
end
|
338
339
|
end
|
339
340
|
|
@@ -358,6 +359,7 @@ module PRM
|
|
358
359
|
attr_accessor :directory
|
359
360
|
attr_accessor :recent
|
360
361
|
attr_accessor :nocache
|
362
|
+
attr_accessor :upload
|
361
363
|
|
362
364
|
def create
|
363
365
|
if "#{@type}" == "deb"
|
@@ -377,7 +379,8 @@ module PRM
|
|
377
379
|
build_apt_repo(path,pcomponent,parch,prelease,label,origin,gpg,silent,nocache)
|
378
380
|
elsif "#{@type}" == "sync"
|
379
381
|
parch,pcomponent,prelease = _parse_vars(arch,component,release)
|
380
|
-
|
382
|
+
object_store = upload
|
383
|
+
sync_to_dho(path, accesskey, secretkey,pcomponent,prelease,object_store)
|
381
384
|
elsif "#{@type}" == "rpm"
|
382
385
|
component = nil
|
383
386
|
parch,pcomponent,prelease = _parse_vars(arch,component,release)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Gailey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: peach
|
@@ -66,9 +66,9 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
description:
|
70
|
-
|
71
|
-
PRM
|
69
|
+
description: PRM (Package Repository Manager) is an Operating System independent Package
|
70
|
+
Repository tool. It allows you to quickly build Debian and Yum Package Repositories.
|
71
|
+
PRM can sync local repositories to S3 compatible object storage systems.
|
72
72
|
email: brett.gailey@dreamhost.com
|
73
73
|
executables:
|
74
74
|
- prm
|