Skip to content

Commit 96237fe

Browse files
committed
vagrant: wip
1 parent ac40a26 commit 96237fe

File tree

5 files changed

+146
-9
lines changed

5 files changed

+146
-9
lines changed

ci/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ help:
130130
@echo
131131
@echo -e "\tWith ${BOLD}<vm>${RESET}:"
132132
@echo -e "\t\t${BOLD}freebsd${RESET} (FreeBSD 14)"
133+
@echo -e "\t\t${BOLD}hardenedbsd${RESET} (HardenedBSD 13)"
133134
@echo -e "\t\t${BOLD}netbsd${RESET} (NetBSD 9)"
134135
@echo -e "\t\t${BOLD}openbsd${RESET} (OpenBSD 7)"
135136
@echo
@@ -414,6 +415,7 @@ clean_web: $(addprefix clean_web_, $(WEB_STAGES))
414415
#############
415416
VAGRANT_VMS := \
416417
freebsd \
418+
hardenedbsd \
417419
netbsd \
418420
openbsd
419421

ci/vagrant/freebsd/Vagrantfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Vagrant.configure("2") do |config|
1414
# boxes at https://vagrantcloud.com/search.
1515
config.vm.guest = :freebsd
1616
config.vm.box = "generic/freebsd14"
17+
config.vm.box_version = "4.3.12"
1718
config.vm.provider "virtualbox" do |v|
1819
v.name = "ci_freebsd"
1920
end
@@ -48,9 +49,14 @@ Vagrant.configure("2") do |config|
4849
# the path on the host to the actual folder. The second argument is
4950
# the path on the guest to mount the folder. And the optional third
5051
# argument is a set of non-required options.
51-
#config.vm.synced_folder "../../..", "/home/vagrant/project"
52-
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
53-
52+
# config.vm.synced_folder "../data", "/vagrant_data"
53+
54+
# Disable the default share of the current code directory. Doing this
55+
# provides improved isolation between the vagrant box and your host
56+
# by making sure your Vagrantfile isn't accessible to the vagrant box.
57+
# If you use this you may want to enable additional shared subfolders as
58+
# shown above.
59+
# config.vm.synced_folder ".", "/vagrant", disabled: true
5460

5561
# Provider-specific configuration so you can fine-tune various
5662
# backing providers for Vagrant. These expose provider-specific options.

ci/vagrant/hardenedbsd/Vagrantfile

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
# All Vagrant configuration is done below. The "2" in Vagrant.configure
5+
# configures the configuration version (we support older styles for
6+
# backwards compatibility). Please don't change it unless you know what
7+
# you're doing.
8+
Vagrant.configure("2") do |config|
9+
# The most common configuration options are documented and commented below.
10+
# For a complete reference, please see the online documentation at
11+
# https://docs.vagrantup.com.
12+
13+
# Every Vagrant development environment requires a box. You can search for
14+
# boxes at https://vagrantcloud.com/search.
15+
config.vm.guest = :hardenedbsd
16+
config.vm.box = "generic/hardenedbsd13"
17+
config.vm.box_version = "4.3.12"
18+
config.vm.provider "virtualbox" do |v|
19+
v.name = "ci_hardenedbsd"
20+
end
21+
config.ssh.shell = "sh"
22+
23+
# Disable automatic box update checking. If you disable this, then
24+
# boxes will only be checked for updates when the user runs
25+
# `vagrant box outdated`. This is not recommended.
26+
# config.vm.box_check_update = false
27+
28+
# Create a forwarded port mapping which allows access to a specific port
29+
# within the machine from a port on the host machine. In the example below,
30+
# accessing "localhost:8080" will access port 80 on the guest machine.
31+
# NOTE: This will enable public access to the opened port
32+
# config.vm.network "forwarded_port", guest: 80, host: 8080
33+
34+
# Create a forwarded port mapping which allows access to a specific port
35+
# within the machine from a port on the host machine and only allow access
36+
# via 127.0.0.1 to disable public access
37+
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
38+
39+
# Create a private network, which allows host-only access to the machine
40+
# using a specific IP.
41+
# config.vm.network "private_network", ip: "192.168.33.10"
42+
43+
# Create a public network, which generally matched to bridged network.
44+
# Bridged networks make the machine appear as another physical device on
45+
# your network.
46+
# config.vm.network "public_network"
47+
48+
# Share an additional folder to the guest VM. The first argument is
49+
# the path on the host to the actual folder. The second argument is
50+
# the path on the guest to mount the folder. And the optional third
51+
# argument is a set of non-required options.
52+
# config.vm.synced_folder "../data", "/vagrant_data"
53+
54+
# Disable the default share of the current code directory. Doing this
55+
# provides improved isolation between the vagrant box and your host
56+
# by making sure your Vagrantfile isn't accessible to the vagrant box.
57+
# If you use this you may want to enable additional shared subfolders as
58+
# shown above.
59+
# config.vm.synced_folder ".", "/vagrant", disabled: true
60+
61+
# Provider-specific configuration so you can fine-tune various
62+
# backing providers for Vagrant. These expose provider-specific options.
63+
# Example for VirtualBox:
64+
#
65+
# config.vm.provider "virtualbox" do |vb|
66+
# # Display the VirtualBox GUI when booting the machine
67+
# vb.gui = true
68+
#
69+
# # Customize the amount of memory on the VM:
70+
# vb.memory = "1024"
71+
# end
72+
#
73+
# View the documentation for the provider you are using for more
74+
# information on available options.
75+
76+
# Enable provisioning with a shell script. Additional provisioners such as
77+
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
78+
# documentation for more information about their specific syntax and use.
79+
# note: clang installed by default
80+
config.vm.provision "env", type: "shell", inline:<<-SHELL
81+
set -x
82+
pkg update -f
83+
pkg install -y git cmake
84+
SHELL
85+
86+
config.vm.provision "file", source: "../../../CMakeLists.txt", destination: "$HOME/project/"
87+
config.vm.provision "file", source: "../../../cmake", destination: "$HOME/project/"
88+
config.vm.provision "file", source: "../../../Foo", destination: "$HOME/project/"
89+
config.vm.provision "file", source: "../../../Bar", destination: "$HOME/project/"
90+
config.vm.provision "file", source: "../../../FooBar", destination: "$HOME/project/"
91+
config.vm.provision "file", source: "../../../FooBarApp", destination: "$HOME/project/"
92+
config.vm.provision "file", source: "../../../examples", destination: "$HOME/project/"
93+
94+
config.vm.provision "devel", type: "shell", inline:<<-SHELL
95+
set -x
96+
cd project
97+
ls
98+
SHELL
99+
100+
config.vm.provision "configure", type: "shell", inline:<<-SHELL
101+
set -x
102+
cd project
103+
cmake -S. -Bbuild
104+
SHELL
105+
106+
config.vm.provision "build", type: "shell", inline:<<-SHELL
107+
set -x
108+
cd project
109+
cmake --build build -v
110+
SHELL
111+
112+
config.vm.provision "test", type: "shell", inline:<<-SHELL
113+
set -x
114+
cd project
115+
cmake --build build --target test -v
116+
SHELL
117+
end

ci/vagrant/netbsd/Vagrantfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Vagrant.configure("2") do |config|
1414
# boxes at https://vagrantcloud.com/search.
1515
config.vm.guest = :netbsd
1616
config.vm.box = "generic/netbsd9"
17+
config.vm.box_version = "4.3.12"
1718
config.vm.provider "virtualbox" do |v|
1819
v.name = "ci_netbsd"
1920
end
@@ -48,9 +49,14 @@ Vagrant.configure("2") do |config|
4849
# the path on the host to the actual folder. The second argument is
4950
# the path on the guest to mount the folder. And the optional third
5051
# argument is a set of non-required options.
51-
#config.vm.synced_folder "../../..", "/home/vagrant/project"
52-
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
53-
52+
# config.vm.synced_folder "../data", "/vagrant_data"
53+
54+
# Disable the default share of the current code directory. Doing this
55+
# provides improved isolation between the vagrant box and your host
56+
# by making sure your Vagrantfile isn't accessible to the vagrant box.
57+
# If you use this you may want to enable additional shared subfolders as
58+
# shown above.
59+
# config.vm.synced_folder ".", "/vagrant", disabled: true
5460

5561
# Provider-specific configuration so you can fine-tune various
5662
# backing providers for Vagrant. These expose provider-specific options.

ci/vagrant/openbsd/Vagrantfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Vagrant.configure("2") do |config|
1414
# boxes at https://vagrantcloud.com/search.
1515
config.vm.guest = :openbsd
1616
config.vm.box = "generic/openbsd7"
17+
config.vm.box_version = "4.3.12"
1718
config.vm.provider "virtualbox" do |v|
1819
v.name = "ci_openbsd"
1920
end
@@ -48,9 +49,14 @@ Vagrant.configure("2") do |config|
4849
# the path on the host to the actual folder. The second argument is
4950
# the path on the guest to mount the folder. And the optional third
5051
# argument is a set of non-required options.
51-
#config.vm.synced_folder "../../..", "/home/vagrant/project"
52-
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
53-
52+
# config.vm.synced_folder "../data", "/vagrant_data"
53+
54+
# Disable the default share of the current code directory. Doing this
55+
# provides improved isolation between the vagrant box and your host
56+
# by making sure your Vagrantfile isn't accessible to the vagrant box.
57+
# If you use this you may want to enable additional shared subfolders as
58+
# shown above.
59+
# config.vm.synced_folder ".", "/vagrant", disabled: true
5460

5561
# Provider-specific configuration so you can fine-tune various
5662
# backing providers for Vagrant. These expose provider-specific options.

0 commit comments

Comments
 (0)