1 |
commit: 1ed2f6c6a9096a0ae8ecadc1270cf527ab141e78 |
2 |
Author: Naftuli Tzvi Kay <rfkrocktk <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Aug 30 19:14:48 2016 +0000 |
4 |
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 31 15:38:26 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=1ed2f6c6 |
7 |
|
8 |
Add Vagrant box for development. |
9 |
|
10 |
.gitignore | 2 ++ |
11 |
Vagrantfile | 47 +++++++++++++++++++++++++++++++++++++++++++++++ |
12 |
2 files changed, 49 insertions(+) |
13 |
|
14 |
diff --git a/.gitignore b/.gitignore |
15 |
index 7eaab24..200bfeb 100644 |
16 |
--- a/.gitignore |
17 |
+++ b/.gitignore |
18 |
@@ -18,3 +18,5 @@ |
19 |
/policy/modules/kernel/corenetwork.if |
20 |
/policy/modules/kernel/corenetwork.te |
21 |
/tmp/ |
22 |
+ |
23 |
+.vagrant/ |
24 |
|
25 |
diff --git a/Vagrantfile b/Vagrantfile |
26 |
new file mode 100644 |
27 |
index 0000000..129de68 |
28 |
--- /dev/null |
29 |
+++ b/Vagrantfile |
30 |
@@ -0,0 +1,47 @@ |
31 |
+# -*- mode: ruby -*- |
32 |
+# vi: set ft=ruby : |
33 |
+ |
34 |
+# All Vagrant configuration is done below. The "2" in Vagrant.configure |
35 |
+# configures the configuration version (we support older styles for |
36 |
+# backwards compatibility). Please don't change it unless you know what |
37 |
+# you're doing. |
38 |
+Vagrant.configure("2") do |config| |
39 |
+ # build a Fedora 24 VM |
40 |
+ config.vm.box = "bento/fedora-24" |
41 |
+ # assign a nice hostname |
42 |
+ config.vm.hostname = "selinux-devel" |
43 |
+ # give it a private internal IP address |
44 |
+ config.vm.network "private_network", type: "dhcp" |
45 |
+ |
46 |
+ config.vm.provider "virtualbox" do |vb| |
47 |
+ # Customize the amount of memory on the VM: |
48 |
+ vb.memory = "1024" |
49 |
+ end |
50 |
+ |
51 |
+ # Enable provisioning with a shell script. Additional provisioners such as |
52 |
+ # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the |
53 |
+ # documentation for more information about their specific syntax and use. |
54 |
+ config.vm.provision "shell", run: "once", inline: <<-SHELL |
55 |
+ # get the man pages |
56 |
+ echo "Upgrading DNF and installing man pages..." |
57 |
+ dnf install -q -y man-pages >/dev/null |
58 |
+ dnf upgrade -q -y dnf >/dev/null |
59 |
+ |
60 |
+ # install a few packages to make this machine ready to go out of the box |
61 |
+ echo "Installing SELinux dev dependencies..." |
62 |
+ dnf install -q -y \ |
63 |
+ bash-completion \ |
64 |
+ man-pages \ |
65 |
+ vim \ |
66 |
+ make \ |
67 |
+ kernel-devel \ |
68 |
+ selinux-policy-devel \ |
69 |
+ libselinux-python \ |
70 |
+ libselinux-python3 \ |
71 |
+ >/dev/null |
72 |
+ |
73 |
+ # we set to permissive to allow loading and working with reference policy as opposed to fedora's fork |
74 |
+ echo "Setting SELinux to Permissive Mode..." |
75 |
+ setenforce 0 |
76 |
+ SHELL |
77 |
+end |