fpm 0.3.9 → 0.3.10
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 +7 -0
- data/lib/fpm/builder.rb +1 -1
- data/lib/fpm/program.rb +49 -1
- data/lib/fpm/source/python.rb +1 -1
- data/lib/fpm/target/deb.rb +1 -1
- metadata +30 -34
- data/lib/fpm/source/pyfpm/__init__.pyc +0 -0
- data/lib/fpm/source/pyfpm/get_metadata.pyc +0 -0
data/CHANGELIST
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
0.3.10 (Oct 10, 2011)
|
2
|
+
- Allow taking a list of files/inputs on stdin with '-' or with the --inputs
|
3
|
+
flag. (Matt Patterson)
|
4
|
+
- (python) pass -U to easy_install (Khalid Goudeaux)
|
5
|
+
- (debian) quote paths in md5sum calls (Matt Patterson)
|
6
|
+
- (debian) quiet stderr from dpkg --print-architecture
|
7
|
+
|
1
8
|
0.3.9 (Sep 8, 2011)
|
2
9
|
- Fix bug in 'dir' source that breaks full paths
|
3
10
|
- Added a bunch of tests (yaay)
|
data/lib/fpm/builder.rb
CHANGED
data/lib/fpm/program.rb
CHANGED
@@ -18,6 +18,8 @@ class FPM::Program
|
|
18
18
|
@settings.source = {} # source settings
|
19
19
|
@settings.target = {} # target settings
|
20
20
|
@settings.config_files ||= []
|
21
|
+
@settings.inputs_path = nil # file path to read a list of paths from
|
22
|
+
@settings.paths = [] # Paths to include in the package
|
21
23
|
|
22
24
|
# Maintainer scripts - https://github.com/jordansissel/fpm/issues/18
|
23
25
|
@settings.scripts ||= {}
|
@@ -27,7 +29,7 @@ class FPM::Program
|
|
27
29
|
|
28
30
|
def run(args)
|
29
31
|
$: << File.expand_path(File.join(File.dirname(__FILE__), "..", "lib"))
|
30
|
-
|
32
|
+
extracted_args = options(args)
|
31
33
|
|
32
34
|
ok = true
|
33
35
|
if @settings.package_type.nil?
|
@@ -40,6 +42,9 @@ class FPM::Program
|
|
40
42
|
ok = false
|
41
43
|
end
|
42
44
|
|
45
|
+
paths = process_paths(extracted_args)
|
46
|
+
ok = false if paths == :errors
|
47
|
+
|
43
48
|
if !ok
|
44
49
|
$stderr.puts "There were errors; see above."
|
45
50
|
$stderr.puts
|
@@ -53,6 +58,39 @@ class FPM::Program
|
|
53
58
|
return 0
|
54
59
|
end # def run
|
55
60
|
|
61
|
+
def process_paths(args)
|
62
|
+
paths_iolike = args
|
63
|
+
read_from_stdin = args.length == 1 && args.first == '-'
|
64
|
+
|
65
|
+
ok = true
|
66
|
+
if @settings.inputs_path
|
67
|
+
if read_from_stdin
|
68
|
+
$stderr.puts "Error: setting --inputs conflicts with passing '-' as the only argument"
|
69
|
+
ok = false
|
70
|
+
end
|
71
|
+
unless File.file?(@settings.inputs_path)
|
72
|
+
$stderr.puts "Error: '#{@settings.inputs_path}' does not exist"
|
73
|
+
ok = false
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
return :errors if !ok
|
78
|
+
|
79
|
+
if read_from_stdin
|
80
|
+
paths_iolike = $stdin
|
81
|
+
end
|
82
|
+
if @settings.inputs_path
|
83
|
+
paths_iolike = File.open(@settings.inputs_path, 'r')
|
84
|
+
end
|
85
|
+
|
86
|
+
paths = []
|
87
|
+
paths_iolike.each do |entry|
|
88
|
+
paths << entry.strip
|
89
|
+
end
|
90
|
+
paths_iolike.close if paths_iolike.respond_to?(:close)
|
91
|
+
paths
|
92
|
+
end # def process_paths
|
93
|
+
|
56
94
|
def options(args)
|
57
95
|
opts = OptionParser.new
|
58
96
|
default_options(opts)
|
@@ -221,5 +259,15 @@ class FPM::Program
|
|
221
259
|
@settings.url = url
|
222
260
|
end # --url
|
223
261
|
|
262
|
+
opts.on("--inputs FILEPATH",
|
263
|
+
"The path to a file containing a newline-separated list of " \
|
264
|
+
"files and dirs to package.") do |path|
|
265
|
+
settings.source[:inputs] = path
|
266
|
+
end
|
267
|
+
|
268
|
+
opts.separator "Pass - as the only argument to have the list of " \
|
269
|
+
"files and dirs read from STDIN " \
|
270
|
+
"(e.g. fpm -s dir -t deb - < FILELIST)"
|
271
|
+
|
224
272
|
end # def default_options
|
225
273
|
end # class FPM::Program
|
data/lib/fpm/source/python.rb
CHANGED
@@ -60,7 +60,7 @@ class FPM::Source::Python < FPM::Source
|
|
60
60
|
end
|
61
61
|
|
62
62
|
safesystem(self[:settings][:easy_install], "-i", self[:settings][:pypi],
|
63
|
-
"--editable", "--build-directory", @tmpdir, want_pkg)
|
63
|
+
"--editable", "-U", "--build-directory", @tmpdir, want_pkg)
|
64
64
|
|
65
65
|
# easy_install will put stuff in @tmpdir/packagename/, flatten that.
|
66
66
|
# That is, we want @tmpdir/setup.py, and start with
|
data/lib/fpm/target/deb.rb
CHANGED
@@ -33,7 +33,7 @@ class FPM::Target::Deb < FPM::Package
|
|
33
33
|
if @architecture.nil? or @architecture == "native"
|
34
34
|
# Default architecture should be 'native' which we'll need
|
35
35
|
# to ask the system about.
|
36
|
-
arch = %x{dpkg --print-architecture}.chomp
|
36
|
+
arch = %x{dpkg --print-architecture 2> /dev/null}.chomp
|
37
37
|
if $?.exitstatus != 0
|
38
38
|
arch = %x{uname -m}.chomp
|
39
39
|
@logger.warn("Can't find 'dpkg' tool (need it to get default " \
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fpm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
4
|
+
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
8
|
+
- 10
|
9
|
+
version: 0.3.10
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Jordan Sissel
|
@@ -15,7 +14,8 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2011-
|
17
|
+
date: 2011-10-11 00:00:00 -07:00
|
18
|
+
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: json
|
@@ -25,7 +25,6 @@ dependencies:
|
|
25
25
|
requirements:
|
26
26
|
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
hash: 3
|
29
28
|
segments:
|
30
29
|
- 0
|
31
30
|
version: "0"
|
@@ -41,45 +40,44 @@ extensions: []
|
|
41
40
|
extra_rdoc_files: []
|
42
41
|
|
43
42
|
files:
|
44
|
-
- lib/fpm
|
45
|
-
- lib/
|
46
|
-
- lib/
|
47
|
-
- lib/
|
48
|
-
- lib/
|
43
|
+
- lib/fpm.rb
|
44
|
+
- lib/rpm/lead.rb
|
45
|
+
- lib/rpm/namespace.rb
|
46
|
+
- lib/rpm/rpmfile.rb
|
47
|
+
- lib/rpm/tag.rb
|
48
|
+
- lib/rpm/header.rb
|
49
49
|
- lib/fpm/rubyfixes.rb
|
50
50
|
- lib/fpm/flags.rb
|
51
|
-
- lib/fpm/errors.rb
|
52
|
-
- lib/fpm/source.rb
|
53
51
|
- lib/fpm/namespace.rb
|
54
|
-
- lib/fpm/package.rb
|
55
|
-
- lib/fpm/util.rb
|
56
52
|
- lib/fpm/program.rb
|
57
53
|
- lib/fpm/source/gem.rb
|
58
|
-
- lib/fpm/source/npm.rb
|
59
|
-
- lib/fpm/source/python.rb
|
60
|
-
- lib/fpm/source/rpm.rb
|
61
54
|
- lib/fpm/source/dir.rb
|
62
55
|
- lib/fpm/source/tar.rb
|
63
|
-
- lib/fpm/source/
|
64
|
-
- lib/fpm/source/
|
65
|
-
- lib/fpm/source/pyfpm/__init__.py
|
56
|
+
- lib/fpm/source/npm.rb
|
57
|
+
- lib/fpm/source/rpm.rb
|
66
58
|
- lib/fpm/source/pyfpm/get_metadata.py
|
67
|
-
- lib/
|
68
|
-
- lib/
|
69
|
-
- lib/
|
70
|
-
- lib/
|
71
|
-
- lib/
|
72
|
-
- lib/fpm.rb
|
73
|
-
-
|
59
|
+
- lib/fpm/source/pyfpm/__init__.py
|
60
|
+
- lib/fpm/source/python.rb
|
61
|
+
- lib/fpm/builder.rb
|
62
|
+
- lib/fpm/source.rb
|
63
|
+
- lib/fpm/package.rb
|
64
|
+
- lib/fpm/target/puppet.rb
|
65
|
+
- lib/fpm/target/deb.rb
|
66
|
+
- lib/fpm/target/solaris.rb
|
67
|
+
- lib/fpm/target/rpm.rb
|
68
|
+
- lib/fpm/util.rb
|
69
|
+
- lib/fpm/errors.rb
|
74
70
|
- bin/fpm-npm
|
75
|
-
-
|
76
|
-
- templates/puppet/package/remove.pp.erb
|
77
|
-
- templates/deb.erb
|
71
|
+
- bin/fpm
|
78
72
|
- templates/rpm.erb
|
79
73
|
- templates/solaris.erb
|
74
|
+
- templates/puppet/package/remove.pp.erb
|
75
|
+
- templates/puppet/package.pp.erb
|
76
|
+
- templates/deb.erb
|
80
77
|
- LICENSE
|
81
78
|
- CONTRIBUTORS
|
82
79
|
- CHANGELIST
|
80
|
+
has_rdoc: true
|
83
81
|
homepage: https://github.com/jordansissel/fpm
|
84
82
|
licenses: []
|
85
83
|
|
@@ -94,7 +92,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
94
92
|
requirements:
|
95
93
|
- - ">="
|
96
94
|
- !ruby/object:Gem::Version
|
97
|
-
hash: 3
|
98
95
|
segments:
|
99
96
|
- 0
|
100
97
|
version: "0"
|
@@ -103,14 +100,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
100
|
requirements:
|
104
101
|
- - ">="
|
105
102
|
- !ruby/object:Gem::Version
|
106
|
-
hash: 3
|
107
103
|
segments:
|
108
104
|
- 0
|
109
105
|
version: "0"
|
110
106
|
requirements: []
|
111
107
|
|
112
108
|
rubyforge_project:
|
113
|
-
rubygems_version: 1.7
|
109
|
+
rubygems_version: 1.3.7
|
114
110
|
signing_key:
|
115
111
|
specification_version: 3
|
116
112
|
summary: fpm - package building and mangling
|
Binary file
|
Binary file
|