pkg-wizard 0.1.21 → 0.1.22

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/README.buildbot ADDED
@@ -0,0 +1,31 @@
1
+ # Create yum repo in the output directory
2
+ curl -X POST http://bh01.frameos.org:4567/createrepo
3
+
4
+ # Create a snapshot of the output directory
5
+ curl -X POST http://bh01.frameos.org:4567/createsnapshot
6
+
7
+ # Clean output dir
8
+ curl -X POST http://bh01.frameos.org:4567/job/clean
9
+
10
+ # Clean failed dir
11
+ curl -X POST http://bh01.frameos.org:4567/job/clean -ddir=failed
12
+
13
+ # list failed jobs (yaml)
14
+ curl http://bh01.frameos.org:4567/job/failed
15
+
16
+ # server stats (yaml)
17
+ curl http://bh01.frameos.org:4567/server/stats
18
+
19
+ # job stats (yaml)
20
+ curl http://bh01.frameos.org:4567/job/stats
21
+
22
+ # list successfully built pkgs
23
+ curl http://bh01.frameos.org:4567/job/successful
24
+
25
+ # Rebuild a previous job (It can be either successful or failed build)
26
+ curl -X POST http://bh01.frameos.org:4567/job/rebuild/job_XXXXX_XXXX
27
+
28
+ # Get job info
29
+ curl http://bh01.frameos.org:4567/job/job_XXXXX_XXXX
30
+
31
+
@@ -133,9 +133,8 @@ module PKGWizard
133
133
  "Missing pkg parameter.\n"
134
134
  else
135
135
  incoming_file = "incoming/#{pkg[:filename]}"
136
- puts "Incoming file".ljust(40) + "#{pkg[:filename]}"
136
+ puts "* incoming file".ljust(40) + "#{pkg[:filename]}"
137
137
  FileUtils.cp pkg[:tempfile].path, incoming_file
138
- puts "File saved".ljust(40) + "#{pkg[:filename]}"
139
138
  end
140
139
  end
141
140
 
@@ -431,7 +430,6 @@ module PKGWizard
431
430
  job_dir = "workspace/job_#{Time.now.strftime '%Y%m%d_%H%M%S'}"
432
431
  qfile = File.join(job_dir, File.basename(queue.first))
433
432
  job_time = Time.now.strftime '%Y%m%d_%H%M%S'
434
- puts "Job accepted [job_#{job_time}]".ljust(40) + File.basename(qfile)
435
433
  result_dir = job_dir + '/result'
436
434
  FileUtils.mkdir_p result_dir
437
435
  meta[:source] = File.basename(queue.first)
@@ -35,7 +35,11 @@ module PKGWizard
35
35
  :short => '-p PORT',
36
36
  :description => 'rpmwiz build-bot PORT (default 80)',
37
37
  :long => '--buildbot-port PORT',
38
- :default => 80
38
+ :default => 4567
39
+
40
+ option :source,
41
+ :short => '-s SOURCE',
42
+ :long => '--source SRC'
39
43
 
40
44
  option :tmpdir,
41
45
  :short => '-t TEMP',
@@ -62,6 +66,33 @@ module PKGWizard
62
66
  $stdout.puts "Downloading: #{pkg}"
63
67
  downloaded_pkgs << download_from_url(p,cli.config[:tmpdir])
64
68
  true
69
+ elsif p =~ /git:\/\//
70
+ require 'tmpdir'
71
+ d = Dir.mktmpdir
72
+
73
+ # Fetch the package sources using Git
74
+ $stdout.puts "Fetching package sources from Git..."
75
+ PKGWizard::GitRPM.fetch p, d
76
+ spec = Dir["#{d}/*.spec"].first
77
+ pwd = Dir.pwd
78
+ Dir.chdir d
79
+
80
+ # Download sources
81
+ source = cli.config[:source]
82
+ if source and source =~ /http:\/\//
83
+ url = URI.parse(source)
84
+ $stdout.puts "Downloading source #{File.basename(url.path)}..."
85
+ download_from_url(source,d)
86
+ puts
87
+ end
88
+
89
+ # Create the SRPM
90
+ $stdout.puts "Creating SRPM for #{spec}..."
91
+ srpm = SRPM.create
92
+ downloaded_pkgs << srpm
93
+ Dir.chdir pwd
94
+ FileUtils.rm_rf d
95
+ true
65
96
  else
66
97
  false
67
98
  end
data/lib/pkg-wizard.rb CHANGED
@@ -4,7 +4,7 @@ require 'mixlib/cli'
4
4
 
5
5
  module PKGWizard
6
6
 
7
- VERSION = '0.1.21'
7
+ VERSION = '0.1.22'
8
8
 
9
9
  class Distribution
10
10
  def self.detect
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pkg-wizard
3
3
  version: !ruby/object:Gem::Version
4
- hash: 49
4
+ hash: 55
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 21
10
- version: 0.1.21
9
+ - 22
10
+ version: 0.1.22
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergio Rubio
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-06 00:00:00 +02:00
18
+ date: 2011-04-07 00:00:00 +02:00
19
19
  default_executable: pkgwiz
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -184,11 +184,13 @@ extensions: []
184
184
 
185
185
  extra_rdoc_files:
186
186
  - LICENSE.txt
187
+ - README.buildbot
187
188
  - README.rdoc
188
189
  files:
189
190
  - .document
190
191
  - Gemfile
191
192
  - LICENSE.txt
193
+ - README.buildbot
192
194
  - README.rdoc
193
195
  - Rakefile
194
196
  - bin/pkgwiz