fpm 0.4.24 → 0.4.25
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/CHANGELIST +13 -1
- data/lib/fpm/command.rb +2 -1
- data/lib/fpm/package/deb.rb +12 -0
- data/lib/fpm/package/pyfpm/__init__.pyc +0 -0
- data/lib/fpm/package/pyfpm/get_metadata.pyc +0 -0
- data/lib/fpm/package/python.rb +7 -1
- data/lib/fpm/package/rpm.rb +15 -1
- data/lib/fpm/version.rb +1 -1
- data/templates/deb.erb +1 -1
- data/templates/rpm.erb +14 -9
- metadata +15 -14
data/CHANGELIST
CHANGED
@@ -1,4 +1,16 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.25 (December 7, 2012)
|
2
|
+
- Added --deb-changelog and --rpm-changelog support flags. Both take a path to
|
3
|
+
a changelog file. Both must be valid changelog formats for their respective
|
4
|
+
package types. (#300, patch by Pranay Kanwar)
|
5
|
+
- deb: Multiple "provides" are now supported. (#301, patch by Pranay Kanwar)
|
6
|
+
- rpm: Added --rpm-os flag to set the OS target for the rpm. This lets you build
|
7
|
+
rpms for linux on OS X and other platforms (with --rpm-os linux). (#309)
|
8
|
+
- rpm: Avoid platform-dependent commands in the %install phase (#309, fixes
|
9
|
+
'cp -d' on OSX)
|
10
|
+
- python: ignore comments in requirements.txt (#304, patch by Pranay Kanwar)
|
11
|
+
- Fixed warning 'already initialized constant' (#274)
|
12
|
+
|
13
|
+
0.4.24 (November 30, 2012)
|
2
14
|
- Don't include an empty url in rpm spec (#296, #276; patch by Pranay Kanwar)
|
3
15
|
- Don't require extra parameters if you use --inputs (#278, #297; Patch by
|
4
16
|
Pranay Kanwar)
|
data/lib/fpm/command.rb
CHANGED
data/lib/fpm/package/deb.rb
CHANGED
@@ -73,6 +73,10 @@ class FPM::Package::Deb < FPM::Package
|
|
73
73
|
|
74
74
|
option "--group", "GROUP", "The group owner of files in this package"
|
75
75
|
|
76
|
+
option "--changelog", "FILEPATH", "Add FILEPATH as debian changelog" do |file|
|
77
|
+
File.expand_path(file)
|
78
|
+
end
|
79
|
+
|
76
80
|
def initialize(*args)
|
77
81
|
super(*args)
|
78
82
|
attributes[:deb_priority] = "extra"
|
@@ -274,6 +278,14 @@ class FPM::Package::Deb < FPM::Package
|
|
274
278
|
tar_flags += [ "--group", attributes[:deb_group] ]
|
275
279
|
end
|
276
280
|
|
281
|
+
if attributes[:deb_changelog]
|
282
|
+
dest_changelog = File.join(staging_path, "usr/share/doc/#{attributes[:name]}/changelog.Debian")
|
283
|
+
FileUtils.mkdir_p(File.dirname(dest_changelog))
|
284
|
+
FileUtils.cp attributes[:deb_changelog], dest_changelog
|
285
|
+
safesystem("gzip", dest_changelog)
|
286
|
+
File.chmod(0644, dest_changelog)
|
287
|
+
end
|
288
|
+
|
277
289
|
args = [ tar_cmd, "-C", staging_path, compression ] + tar_flags + [ "-cf", datatar, "." ]
|
278
290
|
safesystem(*args)
|
279
291
|
|
Binary file
|
Binary file
|
data/lib/fpm/package/python.rb
CHANGED
@@ -178,7 +178,13 @@ class FPM::Package::Python < FPM::Package
|
|
178
178
|
# Best I can tell, requirements.txt are a superset of what
|
179
179
|
# is already supported as 'dependencies' in setup.py
|
180
180
|
# So we'll parse them the same way below.
|
181
|
-
|
181
|
+
|
182
|
+
# requirements.txt can have dependencies, flags, and comments.
|
183
|
+
# We only want the comments, so remove comment and flag lines.
|
184
|
+
metadata["dependencies"] = File.read(requirements_txt).split("\n") \
|
185
|
+
.reject { |l| l =~ /^\s*#/ } \
|
186
|
+
.reject { |l| l =~ /^-/ } \
|
187
|
+
.map(&:strip)
|
182
188
|
end
|
183
189
|
|
184
190
|
self.dependencies += metadata["dependencies"].collect do |dep|
|
data/lib/fpm/package/rpm.rb
CHANGED
@@ -66,6 +66,15 @@ class FPM::Package::RPM < FPM::Package
|
|
66
66
|
value.downcase
|
67
67
|
end
|
68
68
|
|
69
|
+
# TODO(sissel): Try to be smart about the default OS.
|
70
|
+
# issue #309
|
71
|
+
option "--os", "OS", "The operating system to target this rpm for. " \
|
72
|
+
"You want to set this to 'linux' if you are using fpm on OS X, for example"
|
73
|
+
|
74
|
+
option "--changelog", "FILEPATH", "Add changelog from FILEPATH contents" do |file|
|
75
|
+
File.read(File.expand_path(file))
|
76
|
+
end
|
77
|
+
|
69
78
|
private
|
70
79
|
|
71
80
|
# Handle any architecture naming conversions.
|
@@ -190,7 +199,12 @@ class FPM::Package::RPM < FPM::Package
|
|
190
199
|
"--define", "buildroot #{build_path}/BUILD",
|
191
200
|
"--define", "_topdir #{build_path}",
|
192
201
|
"--define", "_sourcedir #{build_path}",
|
193
|
-
"--define", "_rpmdir #{build_path}/RPMS"
|
202
|
+
"--define", "_rpmdir #{build_path}/RPMS",
|
203
|
+
]
|
204
|
+
|
205
|
+
# issue #309
|
206
|
+
rpm_target = "#{architecture}-unknown-#{attributes[:rpm_os]}"
|
207
|
+
args += ["--target", rpm_target]
|
194
208
|
|
195
209
|
(attributes[:rpm_rpmbuild_define] or []).each do |define|
|
196
210
|
args += ["--define", define]
|
data/lib/fpm/version.rb
CHANGED
data/templates/deb.erb
CHANGED
@@ -18,7 +18,7 @@ Conflicts: <%= conflicts.join(", ") %>
|
|
18
18
|
<% if !provides.empty? -%>
|
19
19
|
<%# Turn each provides from 'foo = 123' to simply 'foo' because Debian :\ -%>
|
20
20
|
<%# http://www.debian.org/doc/debian-policy/ch-relationships.html -%>
|
21
|
-
Provides: <%= provides.
|
21
|
+
Provides: <%= provides.map {|p| p.split(" ").first}.join ", " %>
|
22
22
|
<% end -%>
|
23
23
|
<% if !replaces.empty? -%>
|
24
24
|
Replaces: <%= replaces.join(", ") %>
|
data/templates/rpm.erb
CHANGED
@@ -75,16 +75,20 @@ Obsoletes: <%= repl %>
|
|
75
75
|
|
76
76
|
%install
|
77
77
|
<% files.each do |path| -%>
|
78
|
-
<% source =
|
78
|
+
<% source = File.join(staging_path, path) -%>
|
79
|
+
<% source_safe = Shellwords.shellescape(source).gsub("%", "%%") -%>
|
79
80
|
<% # Copy to the build_path/BUILD/ to make rpmbuild happy -%>
|
80
|
-
<%
|
81
|
-
<%
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
81
|
+
<% target_safe = Shellwords.shellescape(File.join(build_path, build_sub_dir, path)).gsub("%", "%%") -%>
|
82
|
+
<% st = File.lstat(source) -%>
|
83
|
+
<% dir = File.dirname(target_safe) -%>
|
84
|
+
[ ! -d <%= dir %> ] && mkdir -p <%= dir %>
|
85
|
+
<% if st.symlink? -%>
|
86
|
+
ln -s <%= File.readlink(source) %> <%= target_safe %>
|
87
|
+
<% elsif st.directory? -%>
|
88
|
+
mkdir <%= target_safe %>
|
89
|
+
<% else -%>
|
90
|
+
cp <%= source_safe %> <%= target_safe %>
|
91
|
+
<% end -%>
|
88
92
|
<% end %>
|
89
93
|
|
90
94
|
%clean
|
@@ -147,3 +151,4 @@ fi
|
|
147
151
|
%>
|
148
152
|
|
149
153
|
%changelog
|
154
|
+
<%= attributes[:rpm_changelog] %>
|
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.
|
4
|
+
version: 0.4.25
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -152,29 +152,29 @@ files:
|
|
152
152
|
- lib/fpm/command.rb
|
153
153
|
- lib/fpm/namespace.rb
|
154
154
|
- lib/fpm/package.rb
|
155
|
+
- lib/fpm/errors.rb
|
156
|
+
- lib/fpm/version.rb
|
157
|
+
- lib/fpm/package/gem.rb
|
158
|
+
- lib/fpm/package/dir.rb
|
159
|
+
- lib/fpm/package/pyfpm/__init__.pyc
|
155
160
|
- lib/fpm/package/pyfpm/get_metadata.pyc
|
156
161
|
- lib/fpm/package/pyfpm/get_metadata.py
|
157
|
-
- lib/fpm/package/pyfpm/__init__.pyc
|
158
162
|
- lib/fpm/package/pyfpm/__init__.py
|
159
|
-
- lib/fpm/package/
|
163
|
+
- lib/fpm/package/npm.rb
|
164
|
+
- lib/fpm/package/pear.rb
|
160
165
|
- lib/fpm/package/deb.rb
|
161
|
-
- lib/fpm/package/dir.rb
|
162
|
-
- lib/fpm/package/puppet.rb
|
163
|
-
- lib/fpm/package/gem.rb
|
164
166
|
- lib/fpm/package/python.rb
|
165
|
-
- lib/fpm/package/solaris.rb
|
166
167
|
- lib/fpm/package/rpm.rb
|
167
|
-
- lib/fpm/package/
|
168
|
-
- lib/fpm/package/
|
169
|
-
- lib/fpm/
|
170
|
-
- lib/fpm/errors.rb
|
168
|
+
- lib/fpm/package/puppet.rb
|
169
|
+
- lib/fpm/package/tar.rb
|
170
|
+
- lib/fpm/package/solaris.rb
|
171
171
|
- lib/fpm/util.rb
|
172
172
|
- lib/fpm.rb
|
173
173
|
- bin/fpm-npm
|
174
174
|
- bin/fpm
|
175
|
-
- templates/solaris.erb
|
176
|
-
- templates/rpm.erb
|
177
175
|
- templates/deb.erb
|
176
|
+
- templates/rpm.erb
|
177
|
+
- templates/solaris.erb
|
178
178
|
- templates/puppet/package/remove.pp.erb
|
179
179
|
- templates/puppet/package.pp.erb
|
180
180
|
- LICENSE
|
@@ -206,3 +206,4 @@ signing_key:
|
|
206
206
|
specification_version: 3
|
207
207
|
summary: fpm - package building and mangling
|
208
208
|
test_files: []
|
209
|
+
has_rdoc:
|