[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#767116: unblock: vagrant/1.6.5+dfsg1-2



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package vagrant, or age it in a way that it reaches
jessie in time for the freeze provided there are no other issues with
it.

This version fixes an RC bug which makes it impossible to download OS
images over HTTP (which mainly breaks central use cases of the tool).

Attached:
- vagrant.diff: full debdiff against the version currently in jessie
- 0008-Use-a-private-temporary-dir.patch: the larger patch included with
  this version so you don't have to read a diff-inside-diff.

unblock vagrant/1.6.5+dfsg1-2

-- System Information:
Debian Release: jessie/sid
  APT prefers buildd-unstable
  APT policy: (500, 'buildd-unstable'), (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- 
Antonio Terceiro <terceiro@debian.org>
diff -Nru vagrant-1.6.5+dfsg1/debian/changelog vagrant-1.6.5+dfsg1/debian/changelog
--- vagrant-1.6.5+dfsg1/debian/changelog	2014-10-12 16:48:53.000000000 -0300
+++ vagrant-1.6.5+dfsg1/debian/changelog	2014-10-28 12:16:13.000000000 -0200
@@ -1,3 +1,13 @@
+vagrant (1.6.5+dfsg1-2) unstable; urgency=medium
+
+  * debian/patches/0008-Use-a-private-temporary-dir.patch: create temporary
+    files inside a private temporary directory instead of cluttering $TMPDIR.
+  * debian/patches/0003-VERSION-fallback-to-usr-share-vagrant-version.txt.patch:
+    updated, remove trailing newline from version number (Closes: #765074)
+    - Thanks Etienne Millon <me@emillon.org>
+
+ -- Antonio Terceiro <terceiro@debian.org>  Tue, 28 Oct 2014 12:12:27 -0200
+
 vagrant (1.6.5+dfsg1-1) unstable; urgency=medium
 
   [ Antonio Terceiro ]
diff -Nru vagrant-1.6.5+dfsg1/debian/patches/0001-Constrain-dependency-resolution.patch vagrant-1.6.5+dfsg1/debian/patches/0001-Constrain-dependency-resolution.patch
--- vagrant-1.6.5+dfsg1/debian/patches/0001-Constrain-dependency-resolution.patch	2014-10-12 16:48:53.000000000 -0300
+++ vagrant-1.6.5+dfsg1/debian/patches/0001-Constrain-dependency-resolution.patch	2014-10-28 12:16:13.000000000 -0200
@@ -1,7 +1,6 @@
-From f8bcc4e98d2476a44425bc9b2d0f9c077444bfda Mon Sep 17 00:00:00 2001
 From: Antonio Terceiro <terceiro@debian.org>
 Date: Sat, 11 Oct 2014 16:46:32 -0300
-Subject: [PATCH 1/7] Constrain dependency resolution
+Subject: Constrain dependency resolution
 
 ---
  Gemfile         |  6 ------
@@ -63,6 +62,3 @@
  
    # The following block of code determines the files that should be included
    # in the gem. It does this by reading all the files in the directory where
--- 
-2.1.1
-
diff -Nru vagrant-1.6.5+dfsg1/debian/patches/0002-Disable-Checkpoint.patch vagrant-1.6.5+dfsg1/debian/patches/0002-Disable-Checkpoint.patch
--- vagrant-1.6.5+dfsg1/debian/patches/0002-Disable-Checkpoint.patch	2014-10-12 16:48:53.000000000 -0300
+++ vagrant-1.6.5+dfsg1/debian/patches/0002-Disable-Checkpoint.patch	2014-10-28 12:16:13.000000000 -0200
@@ -1,7 +1,6 @@
-From b8279f909656ad977dc54aec9c312b7578d7bec9 Mon Sep 17 00:00:00 2001
 From: Antonio Terceiro <terceiro@debian.org>
 Date: Sat, 11 Oct 2014 16:48:07 -0300
-Subject: [PATCH 2/7] Disable Checkpoint
+Subject: Disable Checkpoint
 
 We don't want vagrant phoning home all the time
 ---
@@ -72,6 +71,3 @@
      end
  
      # Makes a call to the CLI with the given arguments as if they
--- 
-2.1.1
-
diff -Nru vagrant-1.6.5+dfsg1/debian/patches/0003-VERSION-fallback-to-usr-share-vagrant-version.txt.patch vagrant-1.6.5+dfsg1/debian/patches/0003-VERSION-fallback-to-usr-share-vagrant-version.txt.patch
--- vagrant-1.6.5+dfsg1/debian/patches/0003-VERSION-fallback-to-usr-share-vagrant-version.txt.patch	2014-10-12 16:48:53.000000000 -0300
+++ vagrant-1.6.5+dfsg1/debian/patches/0003-VERSION-fallback-to-usr-share-vagrant-version.txt.patch	2014-10-28 12:16:13.000000000 -0200
@@ -1,14 +1,13 @@
-From 20131cc976e97b5d64dd1304a5f334a4098b066c Mon Sep 17 00:00:00 2001
 From: Antonio Terceiro <terceiro@debian.org>
 Date: Sat, 11 Oct 2014 16:54:26 -0300
-Subject: [PATCH 3/7] VERSION: fallback to /usr/share/vagrant/version.txt
+Subject: VERSION: fallback to /usr/share/vagrant/version.txt
 
 ---
  lib/vagrant/version.rb | 8 ++++++--
  1 file changed, 6 insertions(+), 2 deletions(-)
 
 diff --git a/lib/vagrant/version.rb b/lib/vagrant/version.rb
-index 0640365..22f6188 100644
+index 0640365..e8d35c3 100644
 --- a/lib/vagrant/version.rb
 +++ b/lib/vagrant/version.rb
 @@ -2,6 +2,10 @@ module Vagrant
@@ -21,9 +20,6 @@
 +    VERSION = File.read(
 +      File.expand_path("../../../version.txt", __FILE__)).chomp
 +  rescue Errno::ENOENT
-+    VERSION = File.read('/usr/share/vagrant/version.txt')
++    VERSION = File.read('/usr/share/vagrant/version.txt').chomp
 +  end
  end
--- 
-2.1.1
-
diff -Nru vagrant-1.6.5+dfsg1/debian/patches/0004-bin-vagrant-silence-warning-about-installer.patch vagrant-1.6.5+dfsg1/debian/patches/0004-bin-vagrant-silence-warning-about-installer.patch
--- vagrant-1.6.5+dfsg1/debian/patches/0004-bin-vagrant-silence-warning-about-installer.patch	2014-10-12 16:48:53.000000000 -0300
+++ vagrant-1.6.5+dfsg1/debian/patches/0004-bin-vagrant-silence-warning-about-installer.patch	2014-10-28 12:16:13.000000000 -0200
@@ -1,7 +1,6 @@
-From 860dabdb8323815ea416e2478c231bd72baf3fde Mon Sep 17 00:00:00 2001
 From: Antonio Terceiro <terceiro@debian.org>
 Date: Sat, 11 Oct 2014 16:54:58 -0300
-Subject: [PATCH 4/7] bin/vagrant: silence warning about installer
+Subject: bin/vagrant: silence warning about installer
 
 ---
  bin/vagrant | 5 -----
@@ -23,6 +22,3 @@
    begin
      # Execute the CLI interface, and exit with the proper error code
      exit_status = env.cli(argv)
--- 
-2.1.1
-
diff -Nru vagrant-1.6.5+dfsg1/debian/patches/0005-Read-data-from-usr-share-vagrant.patch vagrant-1.6.5+dfsg1/debian/patches/0005-Read-data-from-usr-share-vagrant.patch
--- vagrant-1.6.5+dfsg1/debian/patches/0005-Read-data-from-usr-share-vagrant.patch	2014-10-12 16:48:53.000000000 -0300
+++ vagrant-1.6.5+dfsg1/debian/patches/0005-Read-data-from-usr-share-vagrant.patch	2014-10-28 12:16:13.000000000 -0200
@@ -1,7 +1,6 @@
-From fb6879dbf895cb0a2d0e9b1aa589014ed8b16d09 Mon Sep 17 00:00:00 2001
 From: Antonio Terceiro <terceiro@debian.org>
 Date: Sat, 11 Oct 2014 16:55:21 -0300
-Subject: [PATCH 5/7] Read data from /usr/share/vagrant
+Subject: Read data from /usr/share/vagrant
 
 ---
  lib/vagrant/shared_helpers.rb | 12 +++++++++++-
@@ -30,6 +29,3 @@
    end
  
    # This returns the path to the ~/.vagrant.d folder where Vagrant's
--- 
-2.1.1
-
diff -Nru vagrant-1.6.5+dfsg1/debian/patches/0006-Look-up-vagrant-pre-rubygems.rb-from-the-installed-p.patch vagrant-1.6.5+dfsg1/debian/patches/0006-Look-up-vagrant-pre-rubygems.rb-from-the-installed-p.patch
--- vagrant-1.6.5+dfsg1/debian/patches/0006-Look-up-vagrant-pre-rubygems.rb-from-the-installed-p.patch	2014-10-12 16:48:53.000000000 -0300
+++ vagrant-1.6.5+dfsg1/debian/patches/0006-Look-up-vagrant-pre-rubygems.rb-from-the-installed-p.patch	2014-10-28 12:16:13.000000000 -0200
@@ -1,8 +1,6 @@
-From 1506da6a20aebaecaeb2072a491999d0d0c7f287 Mon Sep 17 00:00:00 2001
 From: Antonio Terceiro <terceiro@debian.org>
 Date: Sat, 11 Oct 2014 17:17:52 -0300
-Subject: [PATCH 6/7] Look up vagrant/pre-rubygems.rb from the installed
- package
+Subject: Look up vagrant/pre-rubygems.rb from the installed package
 
 ---
  bin/vagrant | 6 +++++-
@@ -27,6 +25,3 @@
      *ARGV)
    raise "Fatal error: this line should never be reached"
  end
--- 
-2.1.1
-
diff -Nru vagrant-1.6.5+dfsg1/debian/patches/0007-Make-Bundler-also-lookup-into-rubygems-integration-p.patch vagrant-1.6.5+dfsg1/debian/patches/0007-Make-Bundler-also-lookup-into-rubygems-integration-p.patch
--- vagrant-1.6.5+dfsg1/debian/patches/0007-Make-Bundler-also-lookup-into-rubygems-integration-p.patch	2014-10-12 16:48:53.000000000 -0300
+++ vagrant-1.6.5+dfsg1/debian/patches/0007-Make-Bundler-also-lookup-into-rubygems-integration-p.patch	2014-10-28 12:16:13.000000000 -0200
@@ -1,7 +1,6 @@
-From 7ae8dd02f3655cf2a6adb376d34cf22e3712acd0 Mon Sep 17 00:00:00 2001
 From: Antonio Terceiro <terceiro@debian.org>
 Date: Sat, 11 Oct 2014 17:58:50 -0300
-Subject: [PATCH 7/7] Make Bundler also lookup into rubygems-integration paths
+Subject: Make Bundler also lookup into rubygems-integration paths
 
 This applies both when loading plugins, and when installing plugins (so
 that e.g. vagrant will re-use Debian packages instead of reinstalling
@@ -52,6 +51,3 @@
  
        # Clear paths so that it reads the new GEM_HOME setting
        Gem.paths = ENV
--- 
-2.1.1
-
diff -Nru vagrant-1.6.5+dfsg1/debian/patches/0008-Use-a-private-temporary-dir.patch vagrant-1.6.5+dfsg1/debian/patches/0008-Use-a-private-temporary-dir.patch
--- vagrant-1.6.5+dfsg1/debian/patches/0008-Use-a-private-temporary-dir.patch	1969-12-31 21:00:00.000000000 -0300
+++ vagrant-1.6.5+dfsg1/debian/patches/0008-Use-a-private-temporary-dir.patch	2014-10-28 12:16:13.000000000 -0200
@@ -0,0 +1,109 @@
+From: Antonio Terceiro <terceiro@debian.org>
+Date: Wed, 22 Oct 2014 09:40:14 -0200
+Subject: Use a private temporary dir
+
+Without this vagrant will clutter $TMPDIR with dozens of even hundreds
+of temporary files (~4 per vagrant invocation).
+---
+ lib/vagrant/box.rb           |  3 ++-
+ lib/vagrant/bundler.rb       |  9 ++++++---
+ lib/vagrant/util.rb          |  1 +
+ lib/vagrant/util/tempfile.rb | 15 +++++++++++++++
+ 4 files changed, 24 insertions(+), 4 deletions(-)
+ create mode 100644 lib/vagrant/util/tempfile.rb
+
+diff --git a/lib/vagrant/box.rb b/lib/vagrant/box.rb
+index 537c94e..ca9e06e 100644
+--- a/lib/vagrant/box.rb
++++ b/lib/vagrant/box.rb
+@@ -9,6 +9,7 @@ require "vagrant/util/downloader"
+ require "vagrant/util/platform"
+ require "vagrant/util/safe_chdir"
+ require "vagrant/util/subprocess"
++require "vagrant/util/tempfile"
+ 
+ module Vagrant
+   # Represents a "box," which is a package Vagrant environment that is used
+@@ -117,7 +118,7 @@ module Vagrant
+     #
+     # @return [BoxMetadata]
+     def load_metadata
+-      tf = Tempfile.new("vagrant")
++      tf = Util::Tempfile.new("box")
+       tf.close
+ 
+       url = @metadata_url
+diff --git a/lib/vagrant/bundler.rb b/lib/vagrant/bundler.rb
+index a4e52eb..eef6b99 100644
+--- a/lib/vagrant/bundler.rb
++++ b/lib/vagrant/bundler.rb
+@@ -8,6 +8,8 @@ require "bundler"
+ require_relative "shared_helpers"
+ require_relative "version"
+ 
++require 'vagrant/util/tempfile'
++
+ module Vagrant
+   # This class manages Vagrant's interaction with Bundler. Vagrant uses
+   # Bundler as a way to properly resolve all dependencies of Vagrant and
+@@ -60,7 +62,7 @@ module Vagrant
+       end
+ 
+       # Setup the Bundler configuration
+-      @configfile = File.open(Tempfile.new("vagrant").path + "1", "w+")
++      @configfile = File.open(Util::Tempfile.new("vagrant").path + "1", "w+")
+       @configfile.close
+ 
+       # Build up the Gemfile for our Bundler context. We make sure to
+@@ -179,7 +181,8 @@ module Vagrant
+     def build_gemfile(plugins)
+       sources = plugins.values.map { |p| p["sources"] }.flatten.compact.uniq
+ 
+-      f = File.open(Tempfile.new("vagrant").path + "2", "w+")
++
++      f = File.open(Util::Tempfile.new("vagrant").path, "w+")
+       f.tap do |gemfile|
+         if !sources.include?("http://rubygems.org";)
+           gemfile.puts(%Q[source "https://rubygems.org";])
+@@ -257,7 +260,7 @@ module Vagrant
+       # native extensions because it causes all sorts of problems.
+       old_rubyopt = ENV["RUBYOPT"]
+       old_gemfile = ENV["BUNDLE_GEMFILE"]
+-      ENV["BUNDLE_GEMFILE"] = Tempfile.new("vagrant-gemfile").path
++      ENV["BUNDLE_GEMFILE"] = Util::Tempfile.new("vagrant-gemfile").path
+       ENV["RUBYOPT"] = (ENV["RUBYOPT"] || "").gsub(/-rbundler\/setup\s*/, "")
+ 
+       # Set the GEM_HOME so gems are installed only to our local gem dir
+diff --git a/lib/vagrant/util.rb b/lib/vagrant/util.rb
+index db729bf..416d550 100644
+--- a/lib/vagrant/util.rb
++++ b/lib/vagrant/util.rb
+@@ -7,6 +7,7 @@ module Vagrant
+     autoload :Retryable,                 'vagrant/util/retryable'
+     autoload :SafeExec,                  'vagrant/util/safe_exec'
+     autoload :StackedProcRunner,         'vagrant/util/stacked_proc_runner'
++    autoload :Tempfile,                  'vagrant/util/tempfile'
+     autoload :TemplateRenderer,          'vagrant/util/template_renderer'
+     autoload :Subprocess,                'vagrant/util/subprocess'
+   end
+diff --git a/lib/vagrant/util/tempfile.rb b/lib/vagrant/util/tempfile.rb
+new file mode 100644
+index 0000000..63f4f48
+--- /dev/null
++++ b/lib/vagrant/util/tempfile.rb
+@@ -0,0 +1,15 @@
++require 'fileutils'
++
++module Vagrant
++  module Util
++    class Tempfile < ::Tempfile
++
++      def initialize(basename)
++        private_tmpdir = File.join(Dir.tmpdir, 'vagrant-' + Etc.getpwuid.name)
++        FileUtils.mkdir_p(private_tmpdir)
++        super(basename, private_tmpdir)
++      end
++
++    end
++  end
++end
diff -Nru vagrant-1.6.5+dfsg1/debian/patches/series vagrant-1.6.5+dfsg1/debian/patches/series
--- vagrant-1.6.5+dfsg1/debian/patches/series	2014-10-12 16:48:53.000000000 -0300
+++ vagrant-1.6.5+dfsg1/debian/patches/series	2014-10-28 12:16:13.000000000 -0200
@@ -5,3 +5,4 @@
 0005-Read-data-from-usr-share-vagrant.patch
 0006-Look-up-vagrant-pre-rubygems.rb-from-the-installed-p.patch
 0007-Make-Bundler-also-lookup-into-rubygems-integration-p.patch
+0008-Use-a-private-temporary-dir.patch
From: Antonio Terceiro <terceiro@debian.org>
Date: Wed, 22 Oct 2014 09:40:14 -0200
Subject: Use a private temporary dir

Without this vagrant will clutter $TMPDIR with dozens of even hundreds
of temporary files (~4 per vagrant invocation).
---
 lib/vagrant/box.rb           |  3 ++-
 lib/vagrant/bundler.rb       |  9 ++++++---
 lib/vagrant/util.rb          |  1 +
 lib/vagrant/util/tempfile.rb | 15 +++++++++++++++
 4 files changed, 24 insertions(+), 4 deletions(-)
 create mode 100644 lib/vagrant/util/tempfile.rb

diff --git a/lib/vagrant/box.rb b/lib/vagrant/box.rb
index 537c94e..ca9e06e 100644
--- a/lib/vagrant/box.rb
+++ b/lib/vagrant/box.rb
@@ -9,6 +9,7 @@ require "vagrant/util/downloader"
 require "vagrant/util/platform"
 require "vagrant/util/safe_chdir"
 require "vagrant/util/subprocess"
+require "vagrant/util/tempfile"
 
 module Vagrant
   # Represents a "box," which is a package Vagrant environment that is used
@@ -117,7 +118,7 @@ module Vagrant
     #
     # @return [BoxMetadata]
     def load_metadata
-      tf = Tempfile.new("vagrant")
+      tf = Util::Tempfile.new("box")
       tf.close
 
       url = @metadata_url
diff --git a/lib/vagrant/bundler.rb b/lib/vagrant/bundler.rb
index a4e52eb..eef6b99 100644
--- a/lib/vagrant/bundler.rb
+++ b/lib/vagrant/bundler.rb
@@ -8,6 +8,8 @@ require "bundler"
 require_relative "shared_helpers"
 require_relative "version"
 
+require 'vagrant/util/tempfile'
+
 module Vagrant
   # This class manages Vagrant's interaction with Bundler. Vagrant uses
   # Bundler as a way to properly resolve all dependencies of Vagrant and
@@ -60,7 +62,7 @@ module Vagrant
       end
 
       # Setup the Bundler configuration
-      @configfile = File.open(Tempfile.new("vagrant").path + "1", "w+")
+      @configfile = File.open(Util::Tempfile.new("vagrant").path + "1", "w+")
       @configfile.close
 
       # Build up the Gemfile for our Bundler context. We make sure to
@@ -179,7 +181,8 @@ module Vagrant
     def build_gemfile(plugins)
       sources = plugins.values.map { |p| p["sources"] }.flatten.compact.uniq
 
-      f = File.open(Tempfile.new("vagrant").path + "2", "w+")
+
+      f = File.open(Util::Tempfile.new("vagrant").path, "w+")
       f.tap do |gemfile|
         if !sources.include?("http://rubygems.org";)
           gemfile.puts(%Q[source "https://rubygems.org";])
@@ -257,7 +260,7 @@ module Vagrant
       # native extensions because it causes all sorts of problems.
       old_rubyopt = ENV["RUBYOPT"]
       old_gemfile = ENV["BUNDLE_GEMFILE"]
-      ENV["BUNDLE_GEMFILE"] = Tempfile.new("vagrant-gemfile").path
+      ENV["BUNDLE_GEMFILE"] = Util::Tempfile.new("vagrant-gemfile").path
       ENV["RUBYOPT"] = (ENV["RUBYOPT"] || "").gsub(/-rbundler\/setup\s*/, "")
 
       # Set the GEM_HOME so gems are installed only to our local gem dir
diff --git a/lib/vagrant/util.rb b/lib/vagrant/util.rb
index db729bf..416d550 100644
--- a/lib/vagrant/util.rb
+++ b/lib/vagrant/util.rb
@@ -7,6 +7,7 @@ module Vagrant
     autoload :Retryable,                 'vagrant/util/retryable'
     autoload :SafeExec,                  'vagrant/util/safe_exec'
     autoload :StackedProcRunner,         'vagrant/util/stacked_proc_runner'
+    autoload :Tempfile,                  'vagrant/util/tempfile'
     autoload :TemplateRenderer,          'vagrant/util/template_renderer'
     autoload :Subprocess,                'vagrant/util/subprocess'
   end
diff --git a/lib/vagrant/util/tempfile.rb b/lib/vagrant/util/tempfile.rb
new file mode 100644
index 0000000..63f4f48
--- /dev/null
+++ b/lib/vagrant/util/tempfile.rb
@@ -0,0 +1,15 @@
+require 'fileutils'
+
+module Vagrant
+  module Util
+    class Tempfile < ::Tempfile
+
+      def initialize(basename)
+        private_tmpdir = File.join(Dir.tmpdir, 'vagrant-' + Etc.getpwuid.name)
+        FileUtils.mkdir_p(private_tmpdir)
+        super(basename, private_tmpdir)
+      end
+
+    end
+  end
+end

Attachment: signature.asc
Description: Digital signature


Reply to: