fpm-cookery 0.20.1 → 0.21.0

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: aa7f46e1eb70773b5bfacf698d04a89225eb95ed
4
- data.tar.gz: 12121c4b25f7a217724da9a8ec040aba3411e576
3
+ metadata.gz: bf8725d7f5c012b6be0b89abc7209dffbf02be84
4
+ data.tar.gz: 1dca9003a4f4100cb5e09e139845a3d0ffdfc506
5
5
  SHA512:
6
- metadata.gz: d527a0a19a001c6e1efcbc2638727ac9f8eab6e389c693bc3efca07f5438757283f709e10621f986e7ad929cf4345b2f52835898703c7a13cf4be4c029b90b6a
7
- data.tar.gz: eb924a9ed4ccc11fcd2e8850de9c95e1c9cd2c2d30926278419ba8cd99814c27cc4ba6ca5d0230cb3bf10135735f143331478e8a00f8331460b190782b322a6a
6
+ metadata.gz: a15c22968d8e574370a13b09a8b4609d6fc6faf5430b5f618b15d8a7c7821624d994bd2f3405acd298489b165372e5b5943100977a3611cf64b96899334bbbe4
7
+ data.tar.gz: 267f5de36d79f2bb3b52e038cada34086c2e88b8ae729074ed93866d8e9988d8c6826b8079ed0ca3c78a31bf2204416aac0c47a12d70a8ffdc8eaefa3dd5552a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # v0.21.0 (2014-04-07)
2
+ * Unbreak rpm packages by reverting the `%files` change from #67.
3
+ * Remove default revision. (smasset / #76)
4
+ __WARNING__: This changes the default package names and metadata!
5
+ * Add support for python/pypi packages. (Mic92 / #73, smasset / #78)
6
+
1
7
  # v0.20.1 (2014-03-14)
2
8
  * Unbreak omnibus and chain packagers. (#69)
3
9
 
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # fpm-cookery - For building software
2
2
 
3
+ [![Build Status](https://travis-ci.org/bernd/fpm-cookery.svg)](https://travis-ci.org/bernd/fpm-cookery)
4
+
3
5
  A tool for building software packages with
4
6
  [fpm](https://github.com/jordansissel/fpm).
5
7
 
data/fpm-cookery.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
  s.add_development_dependency "rake"
23
23
  s.add_runtime_dependency "fpm", "~> 1.0.0"
24
24
  s.add_runtime_dependency "facter"
25
- s.add_runtime_dependency "puppet"
25
+ s.add_runtime_dependency "puppet", ">= 3.4.3"
26
26
  s.add_runtime_dependency "addressable"
27
27
  s.add_runtime_dependency "systemu"
28
28
  end
@@ -33,7 +33,6 @@ module FPM
33
33
  @fpm.attributes[:rpm_group] = 'root'
34
34
  @fpm.attributes[:rpm_defattrfile] = '-'
35
35
  @fpm.attributes[:rpm_defattrdir] = '-'
36
- @fpm.attributes[:rpm_auto_add_directories?] = true
37
36
 
38
37
  # TODO replace remove_excluded_files() in packager with this.
39
38
  @fpm.attributes[:excludes] = []
@@ -0,0 +1,25 @@
1
+ require 'fpm/package/python'
2
+ require 'fpm/cookery/package/package'
3
+
4
+ module FPM
5
+ module Cookery
6
+ module Package
7
+ class Python < FPM::Cookery::Package::Package
8
+ def fpm_object
9
+ FPM::Package::Python.new
10
+ end
11
+
12
+ def package_setup
13
+ fpm.version = recipe.version
14
+
15
+ fpm.attributes[:python_fix_name?] = true
16
+ fpm.attributes[:python_fix_dependencies?] = true
17
+ end
18
+
19
+ def package_input
20
+ fpm.input(recipe.name)
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -6,6 +6,10 @@ module FPM
6
6
  # * https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version
7
7
  # * https://fedoraproject.org/wiki/Packaging:NamingGuidelines?rd=Packaging/NamingGuidelines#Package_Versioning
8
8
  class Version
9
+ REVISION_DELIMITER = {
10
+ :default => '-'
11
+ }
12
+
9
13
  VENDOR_DELIMITER = {
10
14
  :deb => '+',
11
15
  :rpm => '.',
@@ -26,16 +30,19 @@ module FPM
26
30
  @config[:vendor] || @recipe.vendor
27
31
  end
28
32
 
33
+ def revision_delimiter
34
+ REVISION_DELIMITER[:default]
35
+ end
36
+
29
37
  def vendor_delimiter
30
38
  VENDOR_DELIMITER[@target.to_sym] || VENDOR_DELIMITER[:default]
31
39
  end
32
40
 
33
41
  def to_s
34
- if vendor
35
- "#{version}-#{revision}#{vendor_delimiter}#{vendor}"
36
- else
37
- "#{version}-#{revision}"
38
- end
42
+ s_revision = revision ? "#{revision_delimiter}#{revision}" : ""
43
+ s_vendor = vendor ? "#{vendor_delimiter}#{vendor}" : ""
44
+
45
+ "#{version}#{s_revision}#{s_vendor}"
39
46
  end
40
47
  alias_method :to_str, :to_s
41
48
 
@@ -8,6 +8,7 @@ require 'fpm/cookery/path_helper'
8
8
  require 'fpm/cookery/package/dir'
9
9
  require 'fpm/cookery/package/gem'
10
10
  require 'fpm/cookery/package/npm'
11
+ require 'fpm/cookery/package/python'
11
12
 
12
13
  module FPM
13
14
  module Cookery
@@ -85,9 +86,6 @@ module FPM
85
86
  @tmp_root = @config.tmp_root ? Path.new(@config.tmp_root) : @workdir
86
87
  @pkgdir = @config.pkg_dir && Path.new(@config.pkg_dir)
87
88
  @cachedir = @config.cache_dir && Path.new(@config.cache_dir)
88
-
89
- # Set some defaults.
90
- revision || self.class.revision(1)
91
89
  end
92
90
 
93
91
  def workdir=(value) @workdir = Path.new(value) end
@@ -161,5 +159,11 @@ module FPM
161
159
  FPM::Cookery::Package::NPM.new(self, config)
162
160
  end
163
161
  end
162
+
163
+ class PythonRecipe < BaseRecipe
164
+ def input(config)
165
+ FPM::Cookery::Package::Python.new(self, config)
166
+ end
167
+ end
164
168
  end
165
169
  end
@@ -1,5 +1,5 @@
1
1
  module FPM
2
2
  module Cookery
3
- VERSION = '0.20.1'
3
+ VERSION = '0.21.0'
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  class FpmRubyGem < FPM::Cookery::RubyGemRecipe
2
2
  name "fpm"
3
- version "0.4.39"
3
+ version "1.0.2"
4
4
 
5
5
  chain_package true
6
6
  chain_recipes "json", "cabin", "backports", "arr-pm", "clamp", "childprocess", "ftw"
@@ -1,7 +1,7 @@
1
1
  class FpmCookeryRubyGem < FPM::Cookery::RubyGemRecipe
2
2
  name "fpm-cookery"
3
- version "0.15.0"
3
+ version "0.20.1"
4
4
 
5
5
  chain_package true
6
- chain_recipes "fpm", "facter", "puppet", "addressable"
6
+ chain_recipes "fpm", "facter", "puppet", "addressable", "systemu"
7
7
  end
@@ -0,0 +1,4 @@
1
+ class RgenRubyGem < FPM::Cookery::RubyGemRecipe
2
+ name "systemu"
3
+ version "2.6.4"
4
+ end
@@ -0,0 +1,7 @@
1
+ class PythonRequests < FPM::Cookery::PythonRecipe
2
+ homepage "http://python-requests.org"
3
+ name "requests"
4
+ build_depends ["python-setuptools"]
5
+ depends ["python"]
6
+ version "2.2.1"
7
+ end
@@ -0,0 +1,4 @@
1
+ class MinitestPython < FPM::Cookery::PythonRecipe
2
+ name "minitest"
3
+ version "1.1.0"
4
+ end
data/spec/package_spec.rb CHANGED
@@ -148,10 +148,6 @@ describe 'Package' do
148
148
  it 'sets excludes' do
149
149
  expect(attributes[:excludes]).to eq([])
150
150
  end
151
-
152
- it 'sets rpm_auto_add_directories?' do
153
- expect(attributes[:rpm_auto_add_directories?]).to eq(true)
154
- end
155
151
  end
156
152
 
157
153
  it 'calls the package_setup method' do
data/spec/recipe_spec.rb CHANGED
@@ -118,8 +118,8 @@ describe "Recipe" do
118
118
  check_attribute(:revision, '12')
119
119
  end
120
120
 
121
- it "sets a default revision of 1" do
122
- expect(recipe.revision).to eq(1)
121
+ it "does not set a default revision" do
122
+ expect(recipe.revision).to eq(nil)
123
123
  end
124
124
  end
125
125
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fpm-cookery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.1
4
+ version: 0.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernd Ahlers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-14 00:00:00.000000000 Z
11
+ date: 2014-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 3.4.3
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 3.4.3
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: addressable
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -144,6 +144,7 @@ files:
144
144
  - lib/fpm/cookery/package/maintainer.rb
145
145
  - lib/fpm/cookery/package/npm.rb
146
146
  - lib/fpm/cookery/package/package.rb
147
+ - lib/fpm/cookery/package/python.rb
147
148
  - lib/fpm/cookery/package/version.rb
148
149
  - lib/fpm/cookery/packager.rb
149
150
  - lib/fpm/cookery/path.rb
@@ -184,6 +185,7 @@ files:
184
185
  - recipes/fpm-cookery-gem/puppet.rb
185
186
  - recipes/fpm-cookery-gem/recipe.rb
186
187
  - recipes/fpm-cookery-gem/rgen.rb
188
+ - recipes/fpm-cookery-gem/systemu.rb
187
189
  - recipes/fpm-cookery/fpm-cook.bin
188
190
  - recipes/fpm-cookery/recipe.rb
189
191
  - recipes/fpm-cookery/ruby.rb
@@ -194,6 +196,8 @@ files:
194
196
  - recipes/omnibustest/recipe.rb
195
197
  - recipes/omnibustest/ruby.rb
196
198
  - recipes/open4/recipe.rb
199
+ - recipes/python-requests/recipe.rb
200
+ - recipes/python-test/recipe.rb
197
201
  - recipes/redis/recipe.rb
198
202
  - recipes/redis/redis-server.init.d
199
203
  - spec/config_spec.rb