[DRE-commits] [berkshelf] 06/07: Add patches
Hleb Valoshka
tsfgnu-guest at moszumanska.debian.org
Tue Sep 27 15:10:18 UTC 2016
This is an automated email from the git hooks/post-receive script.
tsfgnu-guest pushed a commit to branch master
in repository berkshelf.
commit 7809db0a92303457606af251a7d6dcdd528c06a8
Author: Hleb Valoshka <375gnu at gmail.com>
Date: Tue Sep 27 18:06:06 2016 +0300
Add patches
---
debian/patches/0001-Remove-spork-usage.patch | 70 ++++++++
.../0002-Don-t-change-LOAD_PATH-in-bin-berks.patch | 18 ++
...0003-Use-usr-share-berkshelf-as-data-root.patch | 29 ++++
...k-for-Berkshelf-InvalidCookbookFiles-only.patch | 21 +++
debian/patches/0005-Ignore-networked-tests.patch | 186 +++++++++++++++++++++
...hut-up-messages-about-deprecated-features.patch | 24 +++
...ruby-ridley-ruby-solve-version-in-gemfile.patch | 23 +++
debian/patches/series | 7 +
8 files changed, 378 insertions(+)
diff --git a/debian/patches/0001-Remove-spork-usage.patch b/debian/patches/0001-Remove-spork-usage.patch
new file mode 100644
index 0000000..c936223
--- /dev/null
+++ b/debian/patches/0001-Remove-spork-usage.patch
@@ -0,0 +1,70 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Mon, 28 Mar 2016 13:32:47 +0300
+Subject: Remove spork usage
+
+---
+ features/support/env.rb | 9 +--------
+ spec/spec_helper.rb | 6 ------
+ 2 files changed, 1 insertion(+), 14 deletions(-)
+
+diff --git a/features/support/env.rb b/features/support/env.rb
+index 680dfd2..9d39a11 100644
+--- a/features/support/env.rb
++++ b/features/support/env.rb
+@@ -1,16 +1,14 @@
+-require 'spork'
+-
+ def windows?
+ !!(RUBY_PLATFORM =~ /mswin|mingw|windows/)
+ end
+
+-Spork.prefork do
+ require 'aruba/cucumber'
+ require 'aruba/in_process'
+ require 'aruba/spawn_process'
+ require 'cucumber/rspec/doubles'
+ require 'berkshelf/api/rspec' unless windows?
+ require 'berkshelf/api/cucumber' unless windows?
++ require 'berkshelf/cli'
+
+ Dir['spec/support/**/*.rb'].each { |f| require File.expand_path(f) }
+
+@@ -72,8 +70,3 @@ Spork.prefork do
+ aruba.config.io_wait_timeout = Cucumber::JRUBY ? 70 : 30
+ @aruba_timeout_seconds = Cucumber::JRUBY ? 140 : 60
+ end
+-end
+-
+-Spork.each_run do
+- require 'berkshelf/cli'
+-end
+diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
+index 09e6ee5..8dbaa4c 100644
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -1,10 +1,7 @@
+-require 'spork'
+-
+ def windows?
+ !!(RUBY_PLATFORM =~ /mswin|mingw|windows/)
+ end
+
+-Spork.prefork do
+ require 'rspec'
+ require 'cleanroom/rspec'
+ require 'webmock/rspec'
+@@ -66,9 +63,7 @@ Spork.prefork do
+
+ result
+ end
+-end
+
+-Spork.each_run do
+ require 'berkshelf'
+
+ module Berkshelf
+@@ -84,4 +79,3 @@ Spork.each_run do
+ end
+ end
+ end
+-end
diff --git a/debian/patches/0002-Don-t-change-LOAD_PATH-in-bin-berks.patch b/debian/patches/0002-Don-t-change-LOAD_PATH-in-bin-berks.patch
new file mode 100644
index 0000000..9e24821
--- /dev/null
+++ b/debian/patches/0002-Don-t-change-LOAD_PATH-in-bin-berks.patch
@@ -0,0 +1,18 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Fri, 8 Apr 2016 18:25:29 +0300
+Subject: Don't change LOAD_PATH in bin/berks
+
+---
+ bin/berks | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/bin/berks b/bin/berks
+index 763d9d7..41ce56b 100755
+--- a/bin/berks
++++ b/bin/berks
+@@ -1,5 +1,4 @@
+ #!/usr/bin/env ruby
+-$:.push File.expand_path('../../lib', __FILE__)
+ require 'berkshelf/cli'
+
+ Berkshelf::Cli::Runner.new(ARGV.dup).execute!
diff --git a/debian/patches/0003-Use-usr-share-berkshelf-as-data-root.patch b/debian/patches/0003-Use-usr-share-berkshelf-as-data-root.patch
new file mode 100644
index 0000000..0a65aea
--- /dev/null
+++ b/debian/patches/0003-Use-usr-share-berkshelf-as-data-root.patch
@@ -0,0 +1,29 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Fri, 8 Apr 2016 18:26:03 +0300
+Subject: Use /usr/share/berkshelf as data root
+
+---
+ lib/berkshelf.rb | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/lib/berkshelf.rb b/lib/berkshelf.rb
+index f0f4cfc..441e77c 100644
+--- a/lib/berkshelf.rb
++++ b/lib/berkshelf.rb
+@@ -51,7 +51,15 @@ module Berkshelf
+
+ # @return [Pathname]
+ def root
+- @root ||= Pathname.new(File.expand_path('../', File.dirname(__FILE__)))
++ @root ||= Pathname.new(
++ Dir[
++ File.expand_path(
++ File.join(File.dirname(__FILE__), %w[.. .. .. share berkshelf])
++ ),
++ File.expand_path('../', File.dirname(__FILE__)),
++ '/usr/share/berkshelf'
++ ].first
++ )
+ end
+
+ # @return [Berkshelf::Shell]
diff --git a/debian/patches/0004-Check-for-Berkshelf-InvalidCookbookFiles-only.patch b/debian/patches/0004-Check-for-Berkshelf-InvalidCookbookFiles-only.patch
new file mode 100644
index 0000000..5c1fbc9
--- /dev/null
+++ b/debian/patches/0004-Check-for-Berkshelf-InvalidCookbookFiles-only.patch
@@ -0,0 +1,21 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Mon, 5 Sep 2016 12:39:39 +0300
+Subject: Check for Berkshelf::InvalidCookbookFiles only
+
+---
+ spec/unit/berkshelf/validator_spec.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/spec/unit/berkshelf/validator_spec.rb b/spec/unit/berkshelf/validator_spec.rb
+index fdf4204..fc79aa9 100644
+--- a/spec/unit/berkshelf/validator_spec.rb
++++ b/spec/unit/berkshelf/validator_spec.rb
+@@ -8,7 +8,7 @@ describe Berkshelf::Validator do
+ allow(Dir).to receive(:glob).and_return(['/there are/spaces/in this/recipes/default.rb'])
+ expect {
+ subject.validate_files(cookbook)
+- }.to raise_error
++ }.to raise_error(Berkshelf::InvalidCookbookFiles)
+ end
+
+ it 'does not raise an error when the cookbook is valid' do
diff --git a/debian/patches/0005-Ignore-networked-tests.patch b/debian/patches/0005-Ignore-networked-tests.patch
new file mode 100644
index 0000000..cb5d696
--- /dev/null
+++ b/debian/patches/0005-Ignore-networked-tests.patch
@@ -0,0 +1,186 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Mon, 5 Sep 2016 12:51:33 +0300
+Subject: Ignore networked tests
+
+---
+ features/commands/install.feature | 12 ++++++++++++
+ features/commands/search.feature | 1 +
+ features/commands/update.feature | 1 +
+ features/community_site.feature | 1 +
+ features/lockfile.feature | 5 +++++
+ 5 files changed, 20 insertions(+)
+
+diff --git a/features/commands/install.feature b/features/commands/install.feature
+index 44405a5..8d4ed14 100644
+--- a/features/commands/install.feature
++++ b/features/commands/install.feature
+@@ -60,6 +60,7 @@ Feature: berks install
+ | ruby | 1.0.0 |
+ | elixir | 1.0.0 |
+
++ @ignore
+ Scenario: installing a demand that has already been installed
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
+@@ -193,6 +194,7 @@ Feature: berks install
+ Using example_cookbook (0.5.0) from source at ../../../spec/fixtures/cookbooks/example_cookbook-0.5.0
+ """
+
++ @ignore
+ Scenario: installing a demand from a Git location
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
+@@ -208,6 +210,7 @@ Feature: berks install
+ Using berkshelf-cookbook-fixture (1.0.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at master)
+ """
+
++ @ignore
+ Scenario: installing a demand from a Git location that has already been installed
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
+@@ -221,6 +224,7 @@ Feature: berks install
+ Using berkshelf-cookbook-fixture (1.0.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at master)
+ """
+
++ @ignore
+ Scenario: installing a Berksfile that contains a Git location with a rel
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
+@@ -239,6 +243,7 @@ Feature: berks install
+ Using berkshelf-cookbook-fixture (1.0.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at rel/cookbooks/berkshelf-cookbook-fixture)
+ """
+
++ @ignore
+ Scenario: installing a Berksfile that contains a Git location
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
+@@ -252,6 +257,7 @@ Feature: berks install
+ And the git cookbook "berkshelf-cookbook-fixture-70a527e17d91f01f031204562460ad1c17f972ee" should not have the following directories:
+ | .git |
+
++ @ignore
+ Scenario: installing a Berksfile that contains a Git location with a tag
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
+@@ -267,6 +273,7 @@ Feature: berks install
+ Using berkshelf-cookbook-fixture (0.2.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
+ """
+
++ @ignore
+ Scenario: installing a Berksfile that contains a Git location with a ref
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
+@@ -282,6 +289,7 @@ Feature: berks install
+ Using berkshelf-cookbook-fixture (0.2.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at 70a527e)
+ """
+
++ @ignore
+ Scenario: installing a Berksfile that contains a Git location with an abbreviated ref
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
+@@ -297,6 +305,7 @@ Feature: berks install
+ Using berkshelf-cookbook-fixture (0.2.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at 70a527e)
+ """
+
++ @ignore
+ Scenario: installing a Berksfile that contains a GitHub location
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
+@@ -312,6 +321,7 @@ Feature: berks install
+ Using berkshelf-cookbook-fixture (0.2.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
+ """
+
++ @ignore
+ Scenario: installing a Berksfile that contains a GitHub location
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
+@@ -452,6 +462,7 @@ Feature: berks install
+ """
+ And the exit status should be "DuplicateDependencyDefined"
+
++ @ignore
+ Scenario: when a Git demand points to a branch that does not satisfy the version constraint
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
+@@ -465,6 +476,7 @@ Feature: berks install
+ """
+ And the exit status should be "CookbookValidationFailure"
+
++ @ignore
+ Scenario: when a Git demand is defined and a cookbook of the same name and version is already in the cookbook store
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
+diff --git a/features/commands/search.feature b/features/commands/search.feature
+index fa85dbc..e7d1da8 100644
+--- a/features/commands/search.feature
++++ b/features/commands/search.feature
+@@ -1,3 +1,4 @@
++ at ignore
+ Feature: berks search
+ Scenario: Searching for a cookbook by name
+ * I successfully run `berks search berkshelf-cookbook-fixture`
+diff --git a/features/commands/update.feature b/features/commands/update.feature
+index 1cc467a..1b2945b 100644
+--- a/features/commands/update.feature
++++ b/features/commands/update.feature
+@@ -93,6 +93,7 @@ Feature: berks update
+ fake (~> 0.1)
+ """
+
++ @ignore
+ Scenario: With a git location
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
+diff --git a/features/community_site.feature b/features/community_site.feature
+index ddcddb5..40dd244 100644
+--- a/features/community_site.feature
++++ b/features/community_site.feature
+@@ -1,3 +1,4 @@
++ at ignore
+ Feature: Installing cookbooks from the community site
+ Scenario: when the cookbook exists
+ Given I have a Berksfile pointing at the community API endpoint with:
+diff --git a/features/lockfile.feature b/features/lockfile.feature
+index 14c65eb..81f2236 100644
+--- a/features/lockfile.feature
++++ b/features/lockfile.feature
+@@ -166,6 +166,7 @@ Feature: Creating and reading the Berkshelf lockfile
+ fake (0.1.0)
+ """
+
++ @ignore
+ Scenario: Updating a Berksfile.lock with a git location
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
+@@ -184,6 +185,7 @@ Feature: Creating and reading the Berkshelf lockfile
+ berkshelf-cookbook-fixture (1.0.0)
+ """
+
++ @ignore
+ Scenario: Updating a Berksfile.lock with a git location and a branch
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
+@@ -202,6 +204,7 @@ Feature: Creating and reading the Berkshelf lockfile
+ berkshelf-cookbook-fixture (1.0.0)
+ """
+
++ @ignore
+ Scenario: Updating a Berksfile.lock with a git location and a tag
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
+@@ -220,6 +223,7 @@ Feature: Creating and reading the Berkshelf lockfile
+ berkshelf-cookbook-fixture (0.2.0)
+ """
+
++ @ignore
+ Scenario: Updating a Berksfile.lock with a GitHub location
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
+@@ -238,6 +242,7 @@ Feature: Creating and reading the Berkshelf lockfile
+ berkshelf-cookbook-fixture (1.0.0)
+ """
+
++ @ignore
+ Scenario: Updating a Berksfile.lock when a git location with :rel
+ Given I have a Berksfile pointing at the local Berkshelf API with:
+ """
diff --git a/debian/patches/0006-Shut-up-messages-about-deprecated-features.patch b/debian/patches/0006-Shut-up-messages-about-deprecated-features.patch
new file mode 100644
index 0000000..ef829d0
--- /dev/null
+++ b/debian/patches/0006-Shut-up-messages-about-deprecated-features.patch
@@ -0,0 +1,24 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Tue, 20 Sep 2016 11:22:38 +0300
+Subject: Shut up messages about deprecated features
+
+---
+ features/support/aruba.rb | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/features/support/aruba.rb b/features/support/aruba.rb
+index e1fed84..563fa32 100644
+--- a/features/support/aruba.rb
++++ b/features/support/aruba.rb
+@@ -9,4 +9,11 @@ module Aruba
+ stdout + stderr
+ end
+ end
++ # Shut up messages about deprecated features
++ module Platforms
++ class UnixPlatform
++ def deprecated(msg)
++ end
++ end
++ end
+ end
diff --git a/debian/patches/0007-Loose-ruby-ridley-ruby-solve-version-in-gemfile.patch b/debian/patches/0007-Loose-ruby-ridley-ruby-solve-version-in-gemfile.patch
new file mode 100644
index 0000000..40f39ef
--- /dev/null
+++ b/debian/patches/0007-Loose-ruby-ridley-ruby-solve-version-in-gemfile.patch
@@ -0,0 +1,23 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Tue, 27 Sep 2016 16:16:29 +0300
+Subject: Loose ruby-ridley & ruby-solve version in gemfile
+
+---
+ berkshelf.gemspec | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/berkshelf.gemspec b/berkshelf.gemspec
+index 18aaa67..12bbf94 100644
+--- a/berkshelf.gemspec
++++ b/berkshelf.gemspec
+@@ -40,8 +40,8 @@ Gem::Specification.new do |s|
+ s.add_dependency 'httpclient', '~> 2.7'
+ s.add_dependency 'minitar', '~> 0.5', '>= 0.5.4'
+ s.add_dependency 'retryable', '~> 2.0'
+- s.add_dependency 'ridley', '~> 4.5'
+- s.add_dependency 'solve', '~> 2.0'
++ s.add_dependency 'ridley', '~> 4.4'
++ s.add_dependency 'solve', '>= 2.0'
+ s.add_dependency 'thor', '~> 0.19'
+ s.add_dependency 'octokit', '~> 4.0'
+ s.add_dependency 'celluloid', '= 0.16.0'
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..3262bae
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,7 @@
+0001-Remove-spork-usage.patch
+0002-Don-t-change-LOAD_PATH-in-bin-berks.patch
+0003-Use-usr-share-berkshelf-as-data-root.patch
+0004-Check-for-Berkshelf-InvalidCookbookFiles-only.patch
+0005-Ignore-networked-tests.patch
+0006-Shut-up-messages-about-deprecated-features.patch
+0007-Loose-ruby-ridley-ruby-solve-version-in-gemfile.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/berkshelf.git
More information about the Pkg-ruby-extras-commits
mailing list