Skip to content

Adjust Vagrantfiles for automated build #27081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions util/devel/test/vagrant/README-distro-timelines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,12 @@ x 12.4 EOL Dec 2023
x 13.0 EOL Aug 2022
x 13.1 EOL Jul 2023
x 13.2 EOL Jul 2024
- 13.3 EOL Dec 2024
13.4 released Sep 2024
- 14.0 released Nov 2023
14.1 released Jun 2024
x 13.3 EOL Dec 2024
x 14.0 EOL Sep 2024
x 14.1 EOL Mar 2025
- 13.4 EOL Jun 2025
14.2 released Dec 2024 (as of 3/5/25 there was no 14.2-STABLE vagrant box available from freebsd)
13.5 released Mar 2024

OpenSuse -- see https://en.opensuse.org/Lifetime
-- and https://app.vagrantup.com/opensuse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.box = "freebsd/FreeBSD-13.4-STABLE"
config.vm.box = "bento/freebsd-13.4"

# needs more disk space
# have to use this for it to work:
# export VAGRANT_EXPERIMENTAL="disks"
config.vm.disk :disk, size: "12GB", primary: true

config.vm.provision "shell" do |s|
s.env = { http_proxy:ENV['http_proxy'], https_proxy:ENV['https_proxy'] }
s.path = "../../provision-scripts/proxy-setup.sh"
end

config.vm.provision "shell",
path: "../../provision-scripts/freebsd-pkg-deps.sh"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.box = "freebsd/FreeBSD-13.3-STABLE"
config.vm.box = "bento/freebsd-13.5"

# needs more disk space
# have to use this for it to work:
# export VAGRANT_EXPERIMENTAL="disks"
config.vm.disk :disk, size: "12GB", primary: true

config.vm.provision "shell" do |s|
s.env = { http_proxy:ENV['http_proxy'], https_proxy:ENV['https_proxy'] }
s.path = "../../provision-scripts/proxy-setup.sh"
end

config.vm.provision "shell",
path: "../../provision-scripts/freebsd-pkg-deps.sh"

# It comes with clang 15 and pkg install llvm installs 15,
# but 11 - 16 are available.
config.vm.provision "shell",
path: "../../provision-scripts/freebsd-pkg-llvm.sh"

Expand All @@ -29,7 +32,7 @@ Vagrant.configure("2") do |config|

config.vm.provider "virtualbox" do |vb|
vb.memory = 4096
#vb.cpus = 2
# vb.cpus = 2
end

end
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ Vagrant.configure("2") do |config|
# export VAGRANT_EXPERIMENTAL="disks"
config.vm.disk :disk, size: "12GB", primary: true

config.vm.provision "shell" do |s|
s.env = { http_proxy:ENV['http_proxy'], https_proxy:ENV['https_proxy'] }
s.path = "../../provision-scripts/proxy-setup.sh"
end

config.vm.provision "shell",
path: "../../provision-scripts/freebsd-pkg-deps.sh"

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ Vagrant.configure("2") do |config|
config.vm.box_architecture = "i386"
config.vm.box_version = "4.3.12"

config.vm.provision "shell" do |s|
s.env = { http_proxy:ENV['http_proxy'], https_proxy:ENV['https_proxy'] }
s.path = "../../provision-scripts/proxy-setup.sh"
end

config.vm.provision "shell",
path: "../../provision-scripts/apt-get-deps.sh"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/jammy64"

config.vm.provision "shell" do |s|
s.env = { http_proxy:ENV['http_proxy'], https_proxy:ENV['https_proxy'] }
s.path = "../../provision-scripts/proxy-setup.sh"
end

config.vm.provision "shell", privileged: false,
path: "../../provision-scripts/apt-get-and-linuxbrew.sh"

Expand Down
37 changes: 37 additions & 0 deletions util/devel/test/vagrant/provision-scripts/proxy-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh
#
# Persists http_proxy and https_proxy variables in the VM environment if provided.

if [ -z "$http_proxy" ] || [ -z "$https_proxy" ]; then
echo "http_proxy or https_proxy was unset, not setting these variables in the VM"
exit 0
fi;

cat << EOF >> /etc/profile
export http_proxy=$http_proxy
export https_proxy=$https_proxy
export HTTP_PROXY=$http_proxy
export HTTPS_PROXY=$https_proxy
EOF

cat << EOF >> /etc/csh.cshrc
export http_proxy=$http_proxy
export https_proxy=$https_proxy
export HTTP_PROXY=$http_proxy
export HTTPS_PROXY=$https_proxy
EOF

# Hack to work on any sudoers file location
cat << EOF | EDITOR='tee -a' visudo
Defaults env_keep += "http_proxy"
Defaults env_keep += "https_proxy"
Defaults env_keep += "HTTP_PROXY"
Defaults env_keep += "HTTPS_PROXY"
EOF

cat << EOF >> /usr/local/etc/pkg.conf
pkg_env: {
http_proxy: "$http_proxy",
https_proxy: "$https_proxy",
}
EOF