[packages/vagrant] disable checkpoint by default

glen glen at pld-linux.org
Sun Feb 1 20:26:19 CET 2015


commit ab6f2b8577f0018e2bf6bdca4959a24e83e6f6c6
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Feb 1 20:40:10 2015 +0200

    disable checkpoint by default
    
    enable with VAGRANT_CHECKPOINT_ENABLE=1 env var
    http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2014-December/024168.html

 checkpoint.patch | 43 +++++++++++++++++++++++++++++++++++++++++++
 vagrant.spec     |  4 +++-
 2 files changed, 46 insertions(+), 1 deletion(-)
---
diff --git a/vagrant.spec b/vagrant.spec
index 70b1938..055fbbb 100644
--- a/vagrant.spec
+++ b/vagrant.spec
@@ -4,7 +4,7 @@ Summary:	Provisioning and deployment of virtual instances
 Name:		vagrant
 Version:	1.7.1
 # NOTE: test that it actually works before doing rel "1"
-Release:	0.7
+Release:	0.9
 License:	MIT
 Group:		Applications/Emulators
 Source0:	https://github.com/mitchellh/vagrant/archive/v%{version}/%{name}-%{version}.tar.gz
@@ -16,6 +16,7 @@ Patch2:		no-warning.patch
 Patch3:		Vagrantfile.patch
 Patch4:		version.patch
 Patch5:		no-gems.patch
+Patch6:		checkpoint.patch
 URL:		http://www.vagrantup.com/
 BuildRequires:	bash
 BuildRequires:	rpm-rubyprov
@@ -120,6 +121,7 @@ Ruby documentation for %{gem_name}
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 VERSION=$(cat version.txt)
 sed -i -e "s/__VERSION__/$VERSION/" lib/vagrant/version.rb
diff --git a/checkpoint.patch b/checkpoint.patch
new file mode 100644
index 0000000..d30ed86
--- /dev/null
+++ b/checkpoint.patch
@@ -0,0 +1,43 @@
+enable checkpoint only if VAGRANT_CHECKPOINT_ENABLE=1 is set
+
+--- vagrant-1.7.1/lib/vagrant/environment.rb~	2015-02-01 20:31:59.000000000 +0200
++++ vagrant-1.7.1/lib/vagrant/environment.rb	2015-02-01 20:37:14.419051054 +0200
+@@ -5,7 +5,6 @@
+ require 'set'
+ require 'thread'
+ 
+-require "checkpoint"
+ require 'log4r'
+ 
+ require 'vagrant/util/file_mode'
+@@ -134,12 +133,20 @@
+       @checkpoint_thr = Thread.new do
+         Thread.current[:result] = nil
+ 
++        # Must enable by env var
++        if ENV["VAGRANT_CHECKPOINT_ENABLE"].to_s != ""
++          @logger.info("checkpoint: not enabled from env var")
++          next
++        end
++
+         # If we disabled checkpoint via env var, don't run this
+         if ENV["VAGRANT_CHECKPOINT_DISABLE"].to_s != ""
+           @logger.info("checkpoint: disabled from env var")
+           next
+         end
+ 
++		require "checkpoint"
++
+         # If we disabled state and knowing what alerts we've seen, then
+         # disable the signature file.
+         signature_file = @data_dir.join("checkpoint_signature")
+--- vagrant-1.7.1/vagrant.gemspec~	2015-02-01 20:31:59.000000000 +0200
++++ vagrant-1.7.1/vagrant.gemspec	2015-02-01 20:37:49.334191244 +0200
+@@ -20,7 +20,6 @@
+   s.add_dependency "erubis", "~> 2.7.0"
+   s.add_dependency "i18n", "~> 0.6.0"
+   s.add_dependency "listen", "~> 2.7.11"
+-  s.add_dependency "hashicorp-checkpoint", "~> 0.1.1"
+   s.add_dependency "log4r", "~> 1.1.9", "< 1.1.11"
+   s.add_dependency "net-ssh", ">= 2.6.6", "< 2.10.0"
+   s.add_dependency "net-sftp", "~> 2.1"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/vagrant.git/commitdiff/af8dd7b7e72f2514480a0b14ad3121c2808d67ef



More information about the pld-cvs-commit mailing list