From 4dbb543269f8d7721ab36f5e9c6411850db609e2 Mon Sep 17 00:00:00 2001
From: Marko Locher <marko.locher@eox.at>
Date: Wed, 6 Mar 2013 12:15:52 +0100
Subject: [PATCH] replaced mockbuild module with a simpler one

---
 Vagrantfile                                 | 12 +++++------
 puppet/manifests/rpmbuild.pp                |  5 +++--
 puppet/modules/buildtools/manifests/init.pp | 23 +++++++++++++++++++++
 puppet/modules/mockbuild                    |  1 -
 4 files changed, 32 insertions(+), 9 deletions(-)
 create mode 100644 puppet/modules/buildtools/manifests/init.pp
 delete mode 160000 puppet/modules/mockbuild

diff --git a/Vagrantfile b/Vagrantfile
index a9dc204..3bf9201 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -14,31 +14,31 @@ Vagrant::Config.run do |config|
 
   # The url from where the 'config.vm.box' box will be fetched if it
   # doesn't already exist on the user's system.
-  # config.vm.box_url = "http://domain.com/path/to/above.box"
+  #config.vm.box_url = "http://domain.com/path/to/above.box"
 
   # Boot with a GUI so you can see the screen. (Default is headless)
-  # config.vm.boot_mode = :gui
+  #config.vm.boot_mode = :gui
 
   # Assign this VM to a host-only network IP, allowing you to access it
   # via the IP. Host-only networks can talk to the host machine as well as
   # any other machines on the same network, but cannot be accessed (through this
   # network interface) by any external networks.
-  # config.vm.network :hostonly, "192.168.33.10"
+  #config.vm.network :hostonly, "192.168.33.10"
 
   # Assign this VM to a bridged network, allowing you to connect directly to a
   # network using the host's network device. This makes the VM appear as another
   # physical device on your network.
-  # config.vm.network :bridged
+  #config.vm.network :bridged
 
   # Forward a port from the guest to the host, which allows for outside
   # computers to access the VM, whereas host only networking does not.
-   config.vm.forward_port 80, 8088
+  #config.vm.forward_port 80, 8088
 
   # Share an additional folder to the guest VM. The first argument is
   # an identifier, the second is the path on the guest to mount the
   # folder, and the third is the path on the host to the actual folder.
   # config.vm.share_folder "v-data", "/vagrant_data", "../data"
-  config.vm.share_folder "rpmbuild", "/var/lib/mockbuild/rpmbuild", "rpmbuild"
+  config.vm.share_folder "rpmbuild", "/home/vagrant/rpmbuild", "rpmbuild"
 
   # Enable provisioning with Puppet stand alone.  Puppet manifests
   # are contained in a directory path relative to this Vagrantfile.
diff --git a/puppet/manifests/rpmbuild.pp b/puppet/manifests/rpmbuild.pp
index 32ab7f7..716a704 100644
--- a/puppet/manifests/rpmbuild.pp
+++ b/puppet/manifests/rpmbuild.pp
@@ -1,5 +1,6 @@
 
 # include mockbuild module from
 # https://github.com/jeffmccune/jeffmccune-mockbuild
-include mockbuild
-include eox-release
\ No newline at end of file
+include buildtools
+include eox-release
+include rasdaman
\ No newline at end of file
diff --git a/puppet/modules/buildtools/manifests/init.pp b/puppet/modules/buildtools/manifests/init.pp
new file mode 100644
index 0000000..066a3a0
--- /dev/null
+++ b/puppet/modules/buildtools/manifests/init.pp
@@ -0,0 +1,23 @@
+class buildtools {
+	$home = '/home/vagrant'
+
+	File {
+		owner => 'vagrant',
+		group => 'vagrant',
+		mode  => '0644',
+	}
+
+	package { 'rpm-build': ensure => 'latest' }
+	package { 'redhat-rpm-config': ensure => 'latest' }
+	package { 'make': ensure => 'latest' }
+	package { 'gcc': ensure => 'latest' }
+
+	file { $home: ensure => directory }
+	file { "${home}/.rpmmacros":
+		ensure  => file,
+		content => "%_topdir ${home}/rpmbuild\n",
+	}
+	file { "${home}/rpmbuild":
+		ensure => directory,
+	}
+}
diff --git a/puppet/modules/mockbuild b/puppet/modules/mockbuild
deleted file mode 160000
index 8b38d54..0000000
--- a/puppet/modules/mockbuild
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 8b38d54ca1bbf2de8d0d5d98b3fdddec41be7822
-- 
GitLab