fpm 0.4.38 → 0.4.39

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELIST CHANGED
@@ -1,3 +1,7 @@
1
+ 0.4.39 (June 27, 2013)
2
+ - cpan: support more complex dependency specifications (reported by Mabi
3
+ Knittel)
4
+
1
5
  0.4.38 (June 24, 2013)
2
6
  - cpan: fpm's cpan code now works under ruby 1.8.7
3
7
  - python: fix a bug in dependency handling (#461, Pranay Kanwar)
@@ -98,7 +98,19 @@ class FPM::Package::CPAN < FPM::Package
98
98
  # Assume 'Foo = 0' means any version?
99
99
  self.dependencies << "#{name}"
100
100
  else
101
- self.dependencies << "#{name} = #{version}"
101
+ # The 'version' string can be something complex like:
102
+ # ">= 0, != 1.0, != 1.2"
103
+ if version.is_a?(String)
104
+ version.split(/\s*,\s*/).each do |v|
105
+ if v =~ /\s*[><=]/
106
+ self.dependencies << "#{name} #{v}"
107
+ else
108
+ self.dependencies << "#{name} = #{v}"
109
+ end
110
+ end
111
+ else
112
+ self.dependencies << "#{name} >= #{version}"
113
+ end
102
114
  end
103
115
  end
104
116
  end
@@ -210,11 +222,10 @@ class FPM::Package::CPAN < FPM::Package
210
222
 
211
223
  begin
212
224
  response = httpfetch(url)
213
- rescue Net::HTTPServerException
225
+ rescue Net::HTTPServerException => e
214
226
  #@logger.error("Download failed", :error => response.status_line,
215
227
  #:url => url)
216
- @logger.error("Download failed", :error => response.message,
217
- :url => url)
228
+ @logger.error("Download failed", :error => e, :url => url)
218
229
  raise FPM::InvalidPackageConfiguration, "metacpan query failed"
219
230
  end
220
231
 
@@ -108,6 +108,18 @@ class FPM::Package::Deb < FPM::Package
108
108
  "See the following url for a description of this file and its format: " \
109
109
  "http://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-shlibs"
110
110
 
111
+ option "--init", "FILEPATH", "Add FILEPATH as an init script" do |file|
112
+ File.expand_path(file)
113
+ end
114
+
115
+ option "--default", "FILEPATH", "Add FILEPATH as /etc/default configuration" do |file|
116
+ File.expand_path(file)
117
+ end
118
+
119
+ option "--upstart", "FILEPATH", "Add FILEPATH as an upstart script" do |file|
120
+ File.expand_path(file)
121
+ end
122
+
111
123
  def initialize(*args)
112
124
  super(*args)
113
125
  attributes[:deb_priority] = "extra"
@@ -343,6 +355,27 @@ class FPM::Package::Deb < FPM::Package
343
355
  safesystem("gzip", dest_changelog)
344
356
  end
345
357
 
358
+ if attributes[:deb_init]
359
+ dest_init = File.join(staging_path, "etc/init.d/#{attributes[:name]}")
360
+ FileUtils.mkdir_p(File.dirname(dest_init))
361
+ FileUtils.cp attributes[:deb_init], dest_init
362
+ File.chmod(0755, dest_init)
363
+ end
364
+
365
+ if attributes[:deb_default]
366
+ dest_default = File.join(staging_path, "etc/default/#{attributes[:name]}")
367
+ FileUtils.mkdir_p(File.dirname(dest_default))
368
+ FileUtils.cp attributes[:deb_default], dest_default
369
+ File.chmod(0644, dest_default)
370
+ end
371
+
372
+ if attributes[:deb_upstart]
373
+ dest_upstart = File.join(staging_path, "etc/init/#{attributes[:name]}.conf")
374
+ FileUtils.mkdir_p(File.dirname(dest_upstart))
375
+ FileUtils.cp attributes[:deb_upstart], dest_upstart
376
+ File.chmod(0644, dest_upstart)
377
+ end
378
+
346
379
  args = [ tar_cmd, "-C", staging_path, compression ] + tar_flags + [ "-cf", datatar, "." ]
347
380
  safesystem(*args)
348
381
 
@@ -1,3 +1,3 @@
1
1
  module FPM
2
- VERSION = "0.4.38"
2
+ VERSION = "0.4.39"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.38
4
+ version: 0.4.39
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,200 +9,200 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-24 00:00:00.000000000 Z
12
+ date: 2013-06-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- type: :runtime
16
- version_requirements: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: 1.7.7
22
15
  name: json
23
- prerelease: false
24
16
  requirement: !ruby/object:Gem::Requirement
25
17
  none: false
26
18
  requirements:
27
19
  - - ! '>='
28
20
  - !ruby/object:Gem::Version
29
21
  version: 1.7.7
30
- - !ruby/object:Gem::Dependency
31
22
  type: :runtime
23
+ prerelease: false
32
24
  version_requirements: !ruby/object:Gem::Requirement
33
25
  none: false
34
26
  requirements:
35
27
  - - ! '>='
36
28
  - !ruby/object:Gem::Version
37
- version: 0.6.0
29
+ version: 1.7.7
30
+ - !ruby/object:Gem::Dependency
38
31
  name: cabin
39
- prerelease: false
40
32
  requirement: !ruby/object:Gem::Requirement
41
33
  none: false
42
34
  requirements:
43
35
  - - ! '>='
44
36
  - !ruby/object:Gem::Version
45
37
  version: 0.6.0
46
- - !ruby/object:Gem::Dependency
47
38
  type: :runtime
39
+ prerelease: false
48
40
  version_requirements: !ruby/object:Gem::Requirement
49
41
  none: false
50
42
  requirements:
51
43
  - - ! '>='
52
44
  - !ruby/object:Gem::Version
53
- version: 2.6.2
45
+ version: 0.6.0
46
+ - !ruby/object:Gem::Dependency
54
47
  name: backports
55
- prerelease: false
56
48
  requirement: !ruby/object:Gem::Requirement
57
49
  none: false
58
50
  requirements:
59
51
  - - ! '>='
60
52
  - !ruby/object:Gem::Version
61
53
  version: 2.6.2
62
- - !ruby/object:Gem::Dependency
63
54
  type: :runtime
55
+ prerelease: false
64
56
  version_requirements: !ruby/object:Gem::Requirement
65
57
  none: false
66
58
  requirements:
67
- - - ~>
59
+ - - ! '>='
68
60
  - !ruby/object:Gem::Version
69
- version: 0.0.8
61
+ version: 2.6.2
62
+ - !ruby/object:Gem::Dependency
70
63
  name: arr-pm
71
- prerelease: false
72
64
  requirement: !ruby/object:Gem::Requirement
73
65
  none: false
74
66
  requirements:
75
67
  - - ~>
76
68
  - !ruby/object:Gem::Version
77
69
  version: 0.0.8
78
- - !ruby/object:Gem::Dependency
79
70
  type: :runtime
71
+ prerelease: false
80
72
  version_requirements: !ruby/object:Gem::Requirement
81
73
  none: false
82
74
  requirements:
83
75
  - - ~>
84
76
  - !ruby/object:Gem::Version
85
- version: 0.0.30
77
+ version: 0.0.8
78
+ - !ruby/object:Gem::Dependency
86
79
  name: ftw
87
- prerelease: false
88
80
  requirement: !ruby/object:Gem::Requirement
89
81
  none: false
90
82
  requirements:
91
83
  - - ~>
92
84
  - !ruby/object:Gem::Version
93
85
  version: 0.0.30
94
- - !ruby/object:Gem::Dependency
95
86
  type: :runtime
87
+ prerelease: false
96
88
  version_requirements: !ruby/object:Gem::Requirement
97
89
  none: false
98
90
  requirements:
99
91
  - - ~>
100
92
  - !ruby/object:Gem::Version
101
- version: '0.6'
93
+ version: 0.0.30
94
+ - !ruby/object:Gem::Dependency
102
95
  name: clamp
103
- prerelease: false
104
96
  requirement: !ruby/object:Gem::Requirement
105
97
  none: false
106
98
  requirements:
107
99
  - - ~>
108
100
  - !ruby/object:Gem::Version
109
101
  version: '0.6'
110
- - !ruby/object:Gem::Dependency
111
102
  type: :runtime
103
+ prerelease: false
112
104
  version_requirements: !ruby/object:Gem::Requirement
113
105
  none: false
114
106
  requirements:
115
- - - ! '>='
107
+ - - ~>
116
108
  - !ruby/object:Gem::Version
117
- version: '0'
109
+ version: '0.6'
110
+ - !ruby/object:Gem::Dependency
118
111
  name: childprocess
119
- prerelease: false
120
112
  requirement: !ruby/object:Gem::Requirement
121
113
  none: false
122
114
  requirements:
123
115
  - - ! '>='
124
116
  - !ruby/object:Gem::Version
125
117
  version: '0'
126
- - !ruby/object:Gem::Dependency
127
- type: :development
118
+ type: :runtime
119
+ prerelease: false
128
120
  version_requirements: !ruby/object:Gem::Requirement
129
121
  none: false
130
122
  requirements:
131
123
  - - ! '>='
132
124
  - !ruby/object:Gem::Version
133
125
  version: '0'
126
+ - !ruby/object:Gem::Dependency
134
127
  name: rush
135
- prerelease: false
136
128
  requirement: !ruby/object:Gem::Requirement
137
129
  none: false
138
130
  requirements:
139
131
  - - ! '>='
140
132
  - !ruby/object:Gem::Version
141
133
  version: '0'
142
- - !ruby/object:Gem::Dependency
143
134
  type: :development
135
+ prerelease: false
144
136
  version_requirements: !ruby/object:Gem::Requirement
145
137
  none: false
146
138
  requirements:
147
139
  - - ! '>='
148
140
  - !ruby/object:Gem::Version
149
141
  version: '0'
142
+ - !ruby/object:Gem::Dependency
150
143
  name: rspec
151
- prerelease: false
152
144
  requirement: !ruby/object:Gem::Requirement
153
145
  none: false
154
146
  requirements:
155
147
  - - ! '>='
156
148
  - !ruby/object:Gem::Version
157
149
  version: '0'
158
- - !ruby/object:Gem::Dependency
159
150
  type: :development
151
+ prerelease: false
160
152
  version_requirements: !ruby/object:Gem::Requirement
161
153
  none: false
162
154
  requirements:
163
- - - ~>
155
+ - - ! '>='
164
156
  - !ruby/object:Gem::Version
165
- version: 0.0.5
157
+ version: '0'
158
+ - !ruby/object:Gem::Dependency
166
159
  name: insist
167
- prerelease: false
168
160
  requirement: !ruby/object:Gem::Requirement
169
161
  none: false
170
162
  requirements:
171
163
  - - ~>
172
164
  - !ruby/object:Gem::Version
173
165
  version: 0.0.5
174
- - !ruby/object:Gem::Dependency
175
166
  type: :development
167
+ prerelease: false
176
168
  version_requirements: !ruby/object:Gem::Requirement
177
169
  none: false
178
170
  requirements:
179
- - - ! '>='
171
+ - - ~>
180
172
  - !ruby/object:Gem::Version
181
- version: '0'
173
+ version: 0.0.5
174
+ - !ruby/object:Gem::Dependency
182
175
  name: minitest
183
- prerelease: false
184
176
  requirement: !ruby/object:Gem::Requirement
185
177
  none: false
186
178
  requirements:
187
179
  - - ! '>='
188
180
  - !ruby/object:Gem::Version
189
181
  version: '0'
190
- - !ruby/object:Gem::Dependency
191
182
  type: :development
183
+ prerelease: false
192
184
  version_requirements: !ruby/object:Gem::Requirement
193
185
  none: false
194
186
  requirements:
195
187
  - - ! '>='
196
188
  - !ruby/object:Gem::Version
197
189
  version: '0'
190
+ - !ruby/object:Gem::Dependency
198
191
  name: pry
199
- prerelease: false
200
192
  requirement: !ruby/object:Gem::Requirement
201
193
  none: false
202
194
  requirements:
203
195
  - - ! '>='
204
196
  - !ruby/object:Gem::Version
205
197
  version: '0'
198
+ type: :development
199
+ prerelease: false
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
206
206
  description: Convert directories, rpms, python eggs, rubygems, and more to rpms, debs,
207
207
  solaris packages and more. Win at package management without wasting pointless hours
208
208
  debugging bad rpm specs!
@@ -216,9 +216,6 @@ files:
216
216
  - lib/fpm/util.rb
217
217
  - lib/fpm/package.rb
218
218
  - lib/fpm/errors.rb
219
- - lib/fpm/version.rb
220
- - lib/fpm/command.rb
221
- - lib/fpm/namespace.rb
222
219
  - lib/fpm/package/solaris.rb
223
220
  - lib/fpm/package/gem.rb
224
221
  - lib/fpm/package/dir.rb
@@ -236,15 +233,18 @@ files:
236
233
  - lib/fpm/package/pyfpm/get_metadata.py
237
234
  - lib/fpm/package/pyfpm/get_metadata.pyc
238
235
  - lib/fpm/package/pyfpm/__init__.py
236
+ - lib/fpm/version.rb
237
+ - lib/fpm/command.rb
238
+ - lib/fpm/namespace.rb
239
239
  - bin/fpm
240
240
  - templates/rpm.erb
241
- - templates/solaris.erb
242
- - templates/osxpkg.erb
243
- - templates/deb.erb
244
241
  - templates/puppet/package.pp.erb
242
+ - templates/puppet/package/remove.pp.erb
245
243
  - templates/rpm/filesystem_list
244
+ - templates/solaris.erb
246
245
  - templates/deb/ldconfig.sh.erb
247
- - templates/puppet/package/remove.pp.erb
246
+ - templates/osxpkg.erb
247
+ - templates/deb.erb
248
248
  - LICENSE
249
249
  - CONTRIBUTORS
250
250
  - CHANGELIST