summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2012-05-15 12:26:13 +0200
committerTails developers <amnesia@boum.org>2012-05-16 13:30:41 +0200
commit799f1e8e2d6990273f09087eda65b8ae8cf34ae6 (patch)
tree0ed6a2452302a1590318250fa1d95cdf21840f03
parent5fc917c562a3d408668f51972ff317d533cab5b1 (diff)
vagrant: Factor out common build settings
Let's factor out some build related settings to a Ruby snippet that can be shared between Rakefile and Vagrantfile.
-rw-r--r--Rakefile5
-rw-r--r--vagrant/lib/tails_build_settings.rb21
2 files changed, 24 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index 307edba..c4c29a9 100644
--- a/Rakefile
+++ b/Rakefile
@@ -21,6 +21,9 @@ require 'rubygems'
require 'vagrant'
require 'uri'
+$:.unshift File.expand_path('../vagrant/lib', __FILE__)
+require 'tails_build_settings'
+
# Path to the directory which holds our Vagrantfile
VAGRANT_PATH = File.expand_path('../vagrant', __FILE__)
@@ -30,8 +33,6 @@ EXPORTED_VARIABLES = ['http_proxy', 'MKSQUASHFS_OPTIONS']
# Let's save the http_proxy set before playing with it
EXTERNAL_HTTP_PROXY = ENV['http_proxy']
-# Hostname of the virtual machine (must be in /etc/hosts)
-VIRTUAL_MACHINE_HOSTNAME = 'squeeze.vagrantup.com'
task :parse_build_options do
options = ''
diff --git a/vagrant/lib/tails_build_settings.rb b/vagrant/lib/tails_build_settings.rb
new file mode 100644
index 0000000..714dfa2
--- /dev/null
+++ b/vagrant/lib/tails_build_settings.rb
@@ -0,0 +1,21 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+#
+# Tails: The Amnesic Incognito Live System
+# Copyright © 2012 Tails developers <tails@boum.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Hostname of the virtual machine (must be in /etc/hosts)
+VIRTUAL_MACHINE_HOSTNAME = 'squeeze.vagrantup.com'