[DRE-commits] [vagrant-lxc] 11/17: read extra files from from /usr/share
Antonio Terceiro
terceiro at moszumanska.debian.org
Thu May 28 10:46:25 UTC 2015
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository vagrant-lxc.
commit fad681ef877d470aa735c208544c80bc39e5cb96
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date: Wed May 27 10:28:48 2015 -0300
read extra files from from /usr/share
---
debian/changelog | 2 +
.../0001-Read-extra-files-from-usr-share.patch | 83 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 86 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index b98114e..e0c28da 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,7 @@
vagrant-lxc (1.1.0-1) UNRELEASED; urgency=medium
* Initial release (Closes: #740164)
+ * Read-extra-files-from-usr-share.patch: read scripts/ templates/ and
+ locales/ from where they are installed in the Debian package.
-- Antonio Terceiro <terceiro at debian.org> Tue, 26 May 2015 18:39:54 -0300
diff --git a/debian/patches/0001-Read-extra-files-from-usr-share.patch b/debian/patches/0001-Read-extra-files-from-usr-share.patch
new file mode 100644
index 0000000..3d6bbbc
--- /dev/null
+++ b/debian/patches/0001-Read-extra-files-from-usr-share.patch
@@ -0,0 +1,83 @@
+From: Antonio Terceiro <terceiro at softwarelivre.org>
+Date: Wed, 27 May 2015 10:27:57 -0300
+Subject: Read extra files from /usr/share/...
+
+---
+ lib/vagrant-lxc.rb | 8 ++++++++
+ lib/vagrant-lxc/action/handle_box_metadata.rb | 2 +-
+ lib/vagrant-lxc/command/sudoers.rb | 2 +-
+ lib/vagrant-lxc/driver.rb | 2 +-
+ lib/vagrant-lxc/plugin.rb | 2 +-
+ 5 files changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/lib/vagrant-lxc.rb b/lib/vagrant-lxc.rb
+index 825eb18..67a738a 100644
+--- a/lib/vagrant-lxc.rb
++++ b/lib/vagrant-lxc.rb
+@@ -7,6 +7,14 @@ module Vagrant
+ @source_root ||= Pathname.new(File.dirname(__FILE__)).join('..').expand_path
+ end
+
++ def self.scripts_path
++ Pathname.new('/usr/share/vagrant-plugins/vagrant-lxc/scripts')
++ end
++
++ def self.templates_path
++ Pathname.new('/usr/share/vagrant-plugins/vagrant-lxc/templates')
++ end
++
+ def self.sudo_wrapper_path
+ "/usr/local/bin/vagrant-lxc-wrapper"
+ end
+diff --git a/lib/vagrant-lxc/action/handle_box_metadata.rb b/lib/vagrant-lxc/action/handle_box_metadata.rb
+index 6d78800..d76ab44 100644
+--- a/lib/vagrant-lxc/action/handle_box_metadata.rb
++++ b/lib/vagrant-lxc/action/handle_box_metadata.rb
+@@ -46,7 +46,7 @@ module Vagrant
+ if (box_template = @box.directory.join('lxc-template')).exist?
+ box_template.to_s
+ else
+- Vagrant::LXC.source_root.join('scripts/lxc-template').to_s
++ Vagrant::LXC.scripts_path.join('lxc-template').to_s
+ end
+ end
+
+diff --git a/lib/vagrant-lxc/command/sudoers.rb b/lib/vagrant-lxc/command/sudoers.rb
+index fcb2099..4505c90 100644
+--- a/lib/vagrant-lxc/command/sudoers.rb
++++ b/lib/vagrant-lxc/command/sudoers.rb
+@@ -46,7 +46,7 @@ module Vagrant
+ wrapper = Tempfile.new('lxc-wrapper').tap do |file|
+ template = Vagrant::Util::TemplateRenderer.new(
+ 'sudoers.rb',
+- :template_root => Vagrant::LXC.source_root.join('templates').to_s,
++ :template_root => Vagrant::LXC.templates_path.to_s,
+ :cmd_paths => build_cmd_paths_hash,
+ :pipework_regex => "#{ENV['HOME']}/\.vagrant\.d/gems/gems/vagrant-lxc.+/scripts/pipework"
+ )
+diff --git a/lib/vagrant-lxc/driver.rb b/lib/vagrant-lxc/driver.rb
+index 0544057..618b71a 100644
+--- a/lib/vagrant-lxc/driver.rb
++++ b/lib/vagrant-lxc/driver.rb
+@@ -143,7 +143,7 @@ module Vagrant
+ def configure_private_network(bridge_name, bridge_ip, container_name, ip)
+ @logger.info "Configuring network interface for #{container_name} using #{ip} and bridge #{bridge_name}"
+ cmd = [
+- Vagrant::LXC.source_root.join('scripts/pipework').to_s,
++ Vagrant::LXC.scripts_path.join('pipework').to_s,
+ bridge_name,
+ container_name,
+ "#{ip}/24"
+diff --git a/lib/vagrant-lxc/plugin.rb b/lib/vagrant-lxc/plugin.rb
+index bf8f4dd..9f4d947 100644
+--- a/lib/vagrant-lxc/plugin.rb
++++ b/lib/vagrant-lxc/plugin.rb
+@@ -12,7 +12,7 @@ module Vagrant
+ provider(:lxc, parallel: true, priority: 7) do
+ require File.expand_path("../provider", __FILE__)
+
+- I18n.load_path << File.expand_path(File.dirname(__FILE__) + '/../../locales/en.yml')
++ I18n.load_path << '/usr/share/vagrant-plugins/vagrant-lxc/locales/en.yml'
+ I18n.reload!
+
+ Provider
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..6eb6646
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Read-extra-files-from-usr-share.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/vagrant-lxc.git
More information about the Pkg-ruby-extras-commits
mailing list