fpm 1.6.1 → 1.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 07da7989aad6ad5467e603091a7e4bf32b7b3c0d
4
- data.tar.gz: d57ee3c926610bdb7632e1d47c71dc58b2cec565
3
+ metadata.gz: 667a4cf02480d4f1e0765b61a7e10d738f97979d
4
+ data.tar.gz: 2876ef0ca281d507aa190f4bb51a8f36d6da2da6
5
5
  SHA512:
6
- metadata.gz: 0050e0c4bdf76b205c9c76284349916f85e82f4679690bd5d2be77124624f0c5435c29aae1cc761afe36b9f75bace5724941fdb58d6af8adb536272c383bc7e7
7
- data.tar.gz: fd3dc776f652d02a5b5f2451bf57c08b1995ef51455bc38c4ef0f3207eb93cb04c5df06bceab33f9a2542dcd23ddebc74590ab20b1547a52a3cd2c3e33b92f8f
6
+ metadata.gz: 9d55a2990a70e521030c5832a5bc609e83f433914e0a6bda63924cf97e0b826b4950190a58c27733559f0e06f4fc5aeb0187c3fc3ef6e5f61ec0465589320769
7
+ data.tar.gz: 54c20001e7840427fe4d819636131d727ef6f7c5ad729e59670893851355cb1f6313d6e398fb3321915cd90f589658e65e39111890d3e2df4b88926eb7623436
data/CHANGELIST CHANGED
@@ -1,3 +1,14 @@
1
+ 1.6.2 (July 1, 2016)
2
+ - Reduce `json` dependency version to avoid requiring Ruby 2.0 (#1146, #1147;
3
+ patch by Matt Hoffman)
4
+ - pacman: skip automatic dependnecies if --no-auto-depends is given (Leo P)
5
+ - rpm: Fix bug where --rpm-tag was accidentally ignored (#1134, Michal Mach)
6
+ - deb: Omit certain fields from control file if (Breaks, Depends, Recommends,
7
+ etc) if there are no values to put in that field. (#1113, TomyLobo)
8
+ - rpm: remove trailing slash from Prefix for rpm packages (#819, luto)
9
+ - virtualenv: Now supports being given a requirements.txt as the input. (Nick
10
+ Griffiths)
11
+
1
12
  1.6.1 (June 10, 2016)
2
13
  - freebsd: Only load xz support if we are doing a freebsd output. (#1132,
3
14
  #1090, Ketan Padegaonkar)
@@ -137,7 +137,7 @@ class FPM::Package::Pacman < FPM::Package
137
137
  # Speaking of just taking the first entry of the field:
138
138
  # A crude thing to do, but I suppose it's better than nothing.
139
139
  # -- Daniel Haskin, 3/24/2015
140
- self.category = control["group"][0] || self.category
140
+ self.category = control["group"] && control["group"][0] || self.category
141
141
 
142
142
  # Licenses could include more than one.
143
143
  # Speaking of just taking the first entry of the field:
@@ -164,6 +164,10 @@ class FPM::Package::Pacman < FPM::Package
164
164
  end
165
165
 
166
166
  self.dependencies = control["depend"] || self.dependencies
167
+
168
+ if attributes[:no_auto_depends?]
169
+ self.dependencies = []
170
+ end
167
171
 
168
172
  self.attributes[:pacman_optional_depends] = control["optdepend"] || []
169
173
  # There are other available attributes, but I didn't include them because:
@@ -523,7 +523,11 @@ class FPM::Package::RPM < FPM::Package
523
523
  end # def output
524
524
 
525
525
  def prefix
526
- return (attributes[:prefix] or "/")
526
+ if attributes[:prefix] and attributes[:prefix] != '/'
527
+ return attributes[:prefix].chomp('/')
528
+ else
529
+ return "/"
530
+ end
527
531
  end # def prefix
528
532
 
529
533
  def build_sub_dir
@@ -40,7 +40,18 @@ class FPM::Package::Virtualenv < FPM::Package
40
40
  m = /^([^=]+)==([^=]+)$/.match(package)
41
41
  package_version = nil
42
42
 
43
- if m
43
+ is_requirements_file = (File.basename(package) == "requirements.txt")
44
+
45
+ if is_requirements_file
46
+ if !File.file?(package)
47
+ raise FPM::InvalidPackageConfiguration, "Path looks like a requirements.txt, but it doesn't exist: #{package}"
48
+ end
49
+
50
+ package = File.join(::Dir.pwd, package) if File.dirname(package) == "."
51
+ package_name = File.basename(File.dirname(package))
52
+ logger.info("No name given. Using the directory's name", :name => package_name)
53
+ package_version = nil
54
+ elsif m
44
55
  package_name = m[1]
45
56
  package_version = m[2]
46
57
  self.version ||= package_version
@@ -82,10 +93,18 @@ class FPM::Package::Virtualenv < FPM::Package
82
93
  extra_index_url_args << "--extra-index-url" << extra_url
83
94
  end
84
95
  end
85
- pip_args = [pip_exe, "install", "-i", attributes[:virtualenv_pypi]] << extra_index_url_args << package
96
+
97
+ target_args = []
98
+ if is_requirements_file
99
+ target_args << "-r" << package
100
+ else
101
+ target_args << package
102
+ end
103
+
104
+ pip_args = [pip_exe, "install", "-i", attributes[:virtualenv_pypi]] << extra_index_url_args << target_args
86
105
  safesystem(*pip_args.flatten)
87
106
 
88
- if package_version.nil?
107
+ if ! is_requirements_file && package_version.nil?
89
108
  frozen = safesystemout(pip_exe, "freeze")
90
109
  package_version = frozen[/#{package}==[^=]+$/].split("==")[1].chomp!
91
110
  self.version ||= package_version
@@ -1,3 +1,3 @@
1
1
  module FPM
2
- VERSION = "1.6.1"
2
+ VERSION = "1.6.2"
3
3
  end
@@ -13,13 +13,13 @@ Depends: <%= dependencies.collect { |d| fix_dependency(d) }.flatten.join(", ") %
13
13
  <% if !conflicts.empty? -%>
14
14
  Conflicts: <%= conflicts.collect { |d| fix_dependency(d) }.flatten.join(", ") %>
15
15
  <% end -%>
16
- <% if attributes[:deb_breaks] -%>
16
+ <% if attributes[:deb_breaks] and !attributes[:deb_breaks].empty? -%>
17
17
  Breaks: <%= attributes[:deb_breaks].collect { |d| fix_dependency(d) }.flatten.join(", ") %>
18
18
  <% end -%>
19
- <% if attributes[:deb_pre_depends_given?] -%>
19
+ <% if attributes[:deb_pre_depends] and !attributes[:deb_pre_depends].empty? -%>
20
20
  Pre-Depends: <%= attributes[:deb_pre_depends].collect { |d| fix_dependency(d) }.flatten.join(", ") %>
21
21
  <% end -%>
22
- <% if attributes[:deb_build_depends_given?] -%>
22
+ <% if attributes[:deb_build_depends] and !attributes[:deb_build_depends].empty? -%>
23
23
  Build-Depends: <%= attributes[:deb_build_depends].collect { |d| fix_dependency(d) }.flatten.join(", ") %>
24
24
  <% end -%>
25
25
  <% if !provides.empty? -%>
@@ -30,10 +30,10 @@ Provides: <%= provides.map {|p| p.split(" ").first}.join ", " %>
30
30
  <% if !replaces.empty? -%>
31
31
  Replaces: <%= replaces.join(", ") %>
32
32
  <% end -%>
33
- <% if attributes[:deb_recommends_given?] -%>
33
+ <% if attributes[:deb_recommends] and !attributes[:deb_recommends].empty? -%>
34
34
  Recommends: <%= attributes[:deb_recommends].collect { |d| fix_dependency(d) }.flatten.join(", ") %>
35
35
  <% end -%>
36
- <% if attributes[:deb_suggests_given?] -%>
36
+ <% if attributes[:deb_suggests] and !attributes[:deb_suggests].empty? -%>
37
37
  Suggests: <%= attributes[:deb_suggests].collect { |d| fix_dependency(d) }.flatten.join(", ") %>
38
38
  <% end -%>
39
39
  Section: <%= category %>
@@ -58,9 +58,8 @@ AutoProv: yes
58
58
  # Seems specifying BuildRoot is required on older rpmbuild (like on CentOS 5)
59
59
  # fpm passes '--define buildroot ...' on the commandline, so just reuse that.
60
60
  BuildRoot: %buildroot
61
- # Add prefix, must not end with /
62
61
  <% if !prefix.nil? and !prefix.empty? %>
63
- Prefix: <%= prefix.gsub(/([^\/]+)(\/$)/, '') %>
62
+ Prefix: <%= prefix %>
64
63
  <% end -%>
65
64
 
66
65
  Group: <%= category %>
@@ -83,7 +82,7 @@ Packager: <%= maintainer %>
83
82
  <% dependencies.each do |req| -%>
84
83
  Requires: <%= req %>
85
84
  <% end -%>
86
- <% (attributes[:rpm_tags] or []).each do |tag| -%>
85
+ <% (attributes[:rpm_tag] or []).each do |tag| -%>
87
86
  <%= tag %>
88
87
  <% end -%>
89
88
  <% end -%>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Sissel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-05 00:00:00.000000000 Z
11
+ date: 2016-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.7.7
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '2.0'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,9 @@ dependencies:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: 1.7.7
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '2.0'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: cabin
29
35
  requirement: !ruby/object:Gem::Requirement