Vagrantfile 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3. # Automated creation of testing environments / binaries on misc. platforms
  4. $cpus = Integer(ENV.fetch('VMCPUS', '16')) # create VMs with that many cpus
  5. $xdistn = Integer(ENV.fetch('XDISTN', '16')) # dispatch tests to that many pytest workers
  6. $wmem = $xdistn * 256 # give the VM additional memory for workers [MB]
  7. def packages_debianoid(user)
  8. return <<-EOF
  9. export DEBIAN_FRONTEND=noninteractive
  10. # this is to avoid grub asking about which device it should install to:
  11. echo "set grub-pc/install_devices /dev/sda" | debconf-communicate
  12. apt-get -y -qq update
  13. apt-get -y -qq dist-upgrade
  14. # for building borgbackup and dependencies:
  15. apt install -y libssl-dev libacl1-dev liblz4-dev libzstd-dev libxxhash-dev pkg-config
  16. apt install -y libfuse-dev fuse || true
  17. apt install -y libfuse3-dev fuse3 || true
  18. apt install -y locales || true
  19. # we need to give the prefix to support debian buster (no libxxhash.pc for pkg-config there):
  20. echo 'export BORG_LIBXXHASH_PREFIX=/usr' >> ~vagrant/.bash_profile
  21. sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
  22. usermod -a -G fuse #{user}
  23. chgrp fuse /dev/fuse
  24. chmod 666 /dev/fuse
  25. apt install -y fakeroot build-essential git curl
  26. apt install -y python3-dev python3-setuptools virtualenv
  27. # for building python:
  28. apt install -y zlib1g-dev libbz2-dev libncurses5-dev libreadline-dev liblzma-dev libsqlite3-dev libffi-dev
  29. EOF
  30. end
  31. def packages_freebsd
  32. return <<-EOF
  33. # in case the VM has no hostname set
  34. hostname freebsd
  35. # install all the (security and other) updates, base system
  36. freebsd-update --not-running-from-cron fetch install
  37. # for building borgbackup and dependencies:
  38. pkg install -y liblz4 zstd pkgconf
  39. pkg install -y fusefs-libs || true
  40. pkg install -y fusefs-libs3 || true
  41. pkg install -y rust
  42. pkg install -y git bash # fakeroot causes lots of troubles on freebsd
  43. # for building python (for the tests we use pyenv built pythons):
  44. pkg install -y python310 py310-sqlite3
  45. # make sure there is a python3 command
  46. ln -sf /usr/local/bin/python3.10 /usr/local/bin/python3
  47. python3 -m ensurepip
  48. pip3 install virtualenv
  49. # make bash default / work:
  50. chsh -s bash vagrant
  51. mount -t fdescfs fdesc /dev/fd
  52. echo 'fdesc /dev/fd fdescfs rw 0 0' >> /etc/fstab
  53. # make FUSE work
  54. echo 'fuse_load="YES"' >> /boot/loader.conf
  55. echo 'vfs.usermount=1' >> /etc/sysctl.conf
  56. kldload fusefs
  57. sysctl vfs.usermount=1
  58. pw groupmod operator -M vagrant
  59. # /dev/fuse has group operator
  60. chmod 666 /dev/fuse
  61. # install all the (security and other) updates, packages
  62. pkg update
  63. yes | pkg upgrade
  64. echo 'export BORG_OPENSSL_PREFIX=/usr' >> ~vagrant/.bash_profile
  65. EOF
  66. end
  67. def packages_openbsd
  68. return <<-EOF
  69. pkg_add bash
  70. chsh -s bash vagrant
  71. pkg_add xxhash
  72. pkg_add lz4
  73. pkg_add zstd
  74. pkg_add git # no fakeroot
  75. pkg_add rust
  76. pkg_add openssl%3.0
  77. pkg_add py3-pip
  78. pkg_add py3-virtualenv
  79. EOF
  80. end
  81. def packages_netbsd
  82. return <<-EOF
  83. echo 'http://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$arch/9.3/All' > /usr/pkg/etc/pkgin/repositories.conf
  84. pkgin update
  85. pkgin -y upgrade
  86. pkg_add zstd lz4 xxhash git
  87. pkg_add rust
  88. pkg_add bash
  89. chsh -s bash vagrant
  90. echo "export PROMPT_COMMAND=" >> ~vagrant/.bash_profile # bug in netbsd 9.2, .bash_profile broken for screen
  91. echo "export PROMPT_COMMAND=" >> ~root/.bash_profile # bug in netbsd 9.2, .bash_profile broken for screen
  92. pkg_add pkg-config
  93. # pkg_add fuse # llfuse supports netbsd, but is still buggy.
  94. # https://bitbucket.org/nikratio/python-llfuse/issues/70/perfuse_open-setsockopt-no-buffer-space
  95. pkg_add py311-sqlite3 py311-pip py311-virtualenv py311-expat
  96. ln -s /usr/pkg/bin/python3.11 /usr/pkg/bin/python
  97. ln -s /usr/pkg/bin/python3.11 /usr/pkg/bin/python3
  98. ln -s /usr/pkg/bin/pip3.11 /usr/pkg/bin/pip
  99. ln -s /usr/pkg/bin/pip3.11 /usr/pkg/bin/pip3
  100. ln -s /usr/pkg/bin/virtualenv-3.11 /usr/pkg/bin/virtualenv
  101. ln -s /usr/pkg/bin/virtualenv-3.11 /usr/pkg/bin/virtualenv3
  102. EOF
  103. end
  104. def packages_macos
  105. return <<-EOF
  106. # install all the (security and other) updates
  107. sudo softwareupdate --ignore iTunesX
  108. sudo softwareupdate --ignore iTunes
  109. sudo softwareupdate --ignore Safari
  110. sudo softwareupdate --ignore "Install macOS High Sierra"
  111. sudo softwareupdate --install --all
  112. which brew || CI=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  113. brew update > /dev/null
  114. brew install pkg-config readline openssl@3.0 zstd lz4 xz xxhash
  115. brew install --cask macfuse
  116. # brew upgrade # upgrade everything (takes rather long)
  117. echo 'export LDFLAGS=-L/usr/local/opt/openssl@3.0/lib' >> ~vagrant/.bash_profile
  118. echo 'export CPPFLAGS=-I/usr/local/opt/openssl@3.0/include' >> ~vagrant/.bash_profile
  119. echo 'export PKG_CONFIG_PATH=/usr/local/opt/openssl@3.0/lib/pkgconfig' >> ~vagrant/.bash_profile
  120. echo 'export PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA=openssl@3.0' >> ~vagrant/.bash_profile
  121. EOF
  122. end
  123. def packages_openindiana
  124. return <<-EOF
  125. # needs separate provisioning step + reboot:
  126. #pkg update
  127. pkg install gcc-13 git pkg-config libxxhash
  128. ln -sf /usr/bin/python3.9 /usr/bin/python3
  129. python3 -m ensurepip
  130. ln -sf /usr/bin/pip3.9 /usr/bin/pip3
  131. pip3 install virtualenv
  132. # let borg's pkg-config find openssl:
  133. pfexec pkg set-mediator -V 3.1 openssl
  134. EOF
  135. end
  136. def install_pyenv(boxname)
  137. return <<-EOF
  138. echo 'export PYTHON_CONFIGURE_OPTS="--enable-shared"' >> ~/.bash_profile
  139. echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
  140. echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
  141. . ~/.bash_profile
  142. curl -s -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
  143. echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile
  144. echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
  145. echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
  146. echo 'eval "$(pyenv init -)"' >> ~/.bashrc
  147. echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
  148. EOF
  149. end
  150. def fix_pyenv_macos(boxname)
  151. return <<-EOF
  152. echo 'export PYTHON_CONFIGURE_OPTS="--enable-framework"' >> ~/.bash_profile
  153. EOF
  154. end
  155. def install_pythons(boxname)
  156. return <<-EOF
  157. . ~/.bash_profile
  158. pyenv install 3.12.0 # tests
  159. pyenv install 3.11.9 # tests, binary build
  160. pyenv install 3.10.2 # tests
  161. pyenv install 3.9.4 # tests
  162. pyenv rehash
  163. EOF
  164. end
  165. def build_sys_venv(boxname)
  166. return <<-EOF
  167. . ~/.bash_profile
  168. cd /vagrant/borg
  169. virtualenv --python=python3 borg-env
  170. EOF
  171. end
  172. def build_pyenv_venv(boxname)
  173. return <<-EOF
  174. . ~/.bash_profile
  175. cd /vagrant/borg
  176. # use the latest 3.11 release
  177. pyenv global 3.11.9
  178. pyenv virtualenv 3.11.9 borg-env
  179. ln -s ~/.pyenv/versions/borg-env .
  180. EOF
  181. end
  182. def install_borg(fuse)
  183. return <<-EOF
  184. . ~/.bash_profile
  185. cd /vagrant/borg
  186. . borg-env/bin/activate
  187. pip install -U wheel # upgrade wheel, might be too old
  188. cd borg
  189. pip install -r requirements.d/development.lock.txt
  190. python3 scripts/make.py clean
  191. pip install -e .[#{fuse}]
  192. EOF
  193. end
  194. def install_pyinstaller()
  195. return <<-EOF
  196. . ~/.bash_profile
  197. cd /vagrant/borg
  198. . borg-env/bin/activate
  199. pip install 'pyinstaller==6.7.0'
  200. EOF
  201. end
  202. def build_binary_with_pyinstaller(boxname)
  203. return <<-EOF
  204. . ~/.bash_profile
  205. cd /vagrant/borg
  206. . borg-env/bin/activate
  207. cd borg
  208. pyinstaller --clean --distpath=/vagrant/borg scripts/borg.exe.spec
  209. echo 'export PATH="/vagrant/borg:$PATH"' >> ~/.bash_profile
  210. cd .. && tar -czvf borg.tgz borg-dir
  211. EOF
  212. end
  213. def run_tests(boxname, skip_env)
  214. return <<-EOF
  215. . ~/.bash_profile
  216. cd /vagrant/borg/borg
  217. . ../borg-env/bin/activate
  218. if which pyenv 2> /dev/null; then
  219. # for testing, use the earliest point releases of the supported python versions:
  220. pyenv global 3.9.4 3.10.2 3.11.9 3.12.0
  221. pyenv local 3.9.4 3.10.2 3.11.9 3.12.0
  222. fi
  223. # otherwise: just use the system python
  224. # avoid that git complains about dubious ownership if we use fakeroot:
  225. git config --global --add safe.directory /vagrant/borg/borg
  226. # some OSes can only run specific test envs, e.g. because they miss FUSE support:
  227. export TOX_SKIP_ENV='#{skip_env}'
  228. if which fakeroot 2> /dev/null; then
  229. echo "Running tox WITH fakeroot -u"
  230. fakeroot -u tox --skip-missing-interpreters
  231. else
  232. echo "Running tox WITHOUT fakeroot -u"
  233. tox --skip-missing-interpreters
  234. fi
  235. EOF
  236. end
  237. def fs_init(user)
  238. return <<-EOF
  239. # clean up (wrong/outdated) stuff we likely got via rsync:
  240. rm -rf /vagrant/borg/borg/.tox 2> /dev/null
  241. rm -rf /vagrant/borg/borg/borgbackup.egg-info 2> /dev/null
  242. rm -rf /vagrant/borg/borg/__pycache__ 2> /dev/null
  243. find /vagrant/borg/borg/src -name '__pycache__' -exec rm -rf {} \\; 2> /dev/null
  244. chown -R #{user} /vagrant/borg
  245. touch ~#{user}/.bash_profile ; chown #{user} ~#{user}/.bash_profile
  246. echo 'export LANG=en_US.UTF-8' >> ~#{user}/.bash_profile
  247. echo 'export LC_CTYPE=en_US.UTF-8' >> ~#{user}/.bash_profile
  248. echo 'export XDISTN=#{$xdistn}' >> ~#{user}/.bash_profile
  249. EOF
  250. end
  251. Vagrant.configure(2) do |config|
  252. # use rsync to copy content to the folder
  253. config.vm.synced_folder ".", "/vagrant/borg/borg", :type => "rsync", :rsync__args => ["--verbose", "--archive", "--delete", "--exclude", ".python-version"], :rsync__chown => false
  254. # do not let the VM access . on the host machine via the default shared folder!
  255. config.vm.synced_folder ".", "/vagrant", disabled: true
  256. config.vm.provider :virtualbox do |v|
  257. #v.gui = true
  258. v.cpus = $cpus
  259. end
  260. config.vm.define "noble" do |b|
  261. b.vm.box = "bento/ubuntu-24.04"
  262. b.vm.provider :virtualbox do |v|
  263. v.memory = 1024 + $wmem
  264. end
  265. b.vm.provision "fs init", :type => :shell, :inline => fs_init("vagrant")
  266. b.vm.provision "packages debianoid", :type => :shell, :inline => packages_debianoid("vagrant")
  267. b.vm.provision "build env", :type => :shell, :privileged => false, :inline => build_sys_venv("noble")
  268. b.vm.provision "install borg", :type => :shell, :privileged => false, :inline => install_borg("llfuse")
  269. b.vm.provision "run tests", :type => :shell, :privileged => false, :inline => run_tests("noble", ".*none.*")
  270. end
  271. config.vm.define "jammy" do |b|
  272. b.vm.box = "ubuntu/jammy64"
  273. b.vm.provider :virtualbox do |v|
  274. v.memory = 1024 + $wmem
  275. end
  276. b.vm.provision "fs init", :type => :shell, :inline => fs_init("vagrant")
  277. b.vm.provision "packages debianoid", :type => :shell, :inline => packages_debianoid("vagrant")
  278. b.vm.provision "build env", :type => :shell, :privileged => false, :inline => build_sys_venv("jammy")
  279. b.vm.provision "install borg", :type => :shell, :privileged => false, :inline => install_borg("llfuse")
  280. b.vm.provision "run tests", :type => :shell, :privileged => false, :inline => run_tests("jammy", ".*none.*")
  281. end
  282. config.vm.define "bookworm" do |b|
  283. b.vm.box = "debian/bookworm64"
  284. b.vm.provider :virtualbox do |v|
  285. v.memory = 1024 + $wmem
  286. end
  287. b.vm.provision "fs init", :type => :shell, :inline => fs_init("vagrant")
  288. b.vm.provision "packages debianoid", :type => :shell, :inline => packages_debianoid("vagrant")
  289. b.vm.provision "install pyenv", :type => :shell, :privileged => false, :inline => install_pyenv("bookworm")
  290. b.vm.provision "install pythons", :type => :shell, :privileged => false, :inline => install_pythons("bookworm")
  291. b.vm.provision "build env", :type => :shell, :privileged => false, :inline => build_pyenv_venv("bookworm")
  292. b.vm.provision "install borg", :type => :shell, :privileged => false, :inline => install_borg("llfuse")
  293. b.vm.provision "install pyinstaller", :type => :shell, :privileged => false, :inline => install_pyinstaller()
  294. b.vm.provision "build binary with pyinstaller", :type => :shell, :privileged => false, :inline => build_binary_with_pyinstaller("bookworm")
  295. b.vm.provision "run tests", :type => :shell, :privileged => false, :inline => run_tests("bookworm", ".*none.*")
  296. end
  297. config.vm.define "bullseye" do |b|
  298. b.vm.box = "debian/bullseye64"
  299. b.vm.provider :virtualbox do |v|
  300. v.memory = 1024 + $wmem
  301. end
  302. b.vm.provision "fs init", :type => :shell, :inline => fs_init("vagrant")
  303. b.vm.provision "packages debianoid", :type => :shell, :inline => packages_debianoid("vagrant")
  304. b.vm.provision "install pyenv", :type => :shell, :privileged => false, :inline => install_pyenv("bullseye")
  305. b.vm.provision "install pythons", :type => :shell, :privileged => false, :inline => install_pythons("bullseye")
  306. b.vm.provision "build env", :type => :shell, :privileged => false, :inline => build_pyenv_venv("bullseye")
  307. b.vm.provision "install borg", :type => :shell, :privileged => false, :inline => install_borg("llfuse")
  308. b.vm.provision "install pyinstaller", :type => :shell, :privileged => false, :inline => install_pyinstaller()
  309. b.vm.provision "build binary with pyinstaller", :type => :shell, :privileged => false, :inline => build_binary_with_pyinstaller("bullseye")
  310. b.vm.provision "run tests", :type => :shell, :privileged => false, :inline => run_tests("bullseye", ".*none.*")
  311. end
  312. config.vm.define "buster" do |b|
  313. b.vm.box = "debian/buster64"
  314. b.vm.provider :virtualbox do |v|
  315. v.memory = 1024 + $wmem
  316. end
  317. b.vm.provision "fs init", :type => :shell, :inline => fs_init("vagrant")
  318. b.vm.provision "packages debianoid", :type => :shell, :inline => packages_debianoid("vagrant")
  319. b.vm.provision "install pyenv", :type => :shell, :privileged => false, :inline => install_pyenv("buster")
  320. b.vm.provision "install pythons", :type => :shell, :privileged => false, :inline => install_pythons("buster")
  321. b.vm.provision "build env", :type => :shell, :privileged => false, :inline => build_pyenv_venv("buster")
  322. b.vm.provision "install borg", :type => :shell, :privileged => false, :inline => install_borg("llfuse")
  323. b.vm.provision "install pyinstaller", :type => :shell, :privileged => false, :inline => install_pyinstaller()
  324. b.vm.provision "build binary with pyinstaller", :type => :shell, :privileged => false, :inline => build_binary_with_pyinstaller("buster")
  325. b.vm.provision "run tests", :type => :shell, :privileged => false, :inline => run_tests("buster", ".*none.*")
  326. end
  327. config.vm.define "freebsd13" do |b|
  328. b.vm.box = "generic/freebsd13"
  329. b.vm.provider :virtualbox do |v|
  330. v.memory = 1024 + $wmem
  331. end
  332. b.ssh.shell = "sh"
  333. b.vm.provision "fs init", :type => :shell, :inline => fs_init("vagrant")
  334. b.vm.provision "packages freebsd", :type => :shell, :inline => packages_freebsd
  335. b.vm.provision "install pyenv", :type => :shell, :privileged => false, :inline => install_pyenv("freebsd13")
  336. b.vm.provision "install pythons", :type => :shell, :privileged => false, :inline => install_pythons("freebsd13")
  337. b.vm.provision "build env", :type => :shell, :privileged => false, :inline => build_pyenv_venv("freebsd13")
  338. b.vm.provision "install borg", :type => :shell, :privileged => false, :inline => install_borg("llfuse")
  339. b.vm.provision "install pyinstaller", :type => :shell, :privileged => false, :inline => install_pyinstaller()
  340. b.vm.provision "build binary with pyinstaller", :type => :shell, :privileged => false, :inline => build_binary_with_pyinstaller("freebsd13")
  341. b.vm.provision "run tests", :type => :shell, :privileged => false, :inline => run_tests("freebsd13", ".*(fuse3|none).*")
  342. end
  343. config.vm.define "freebsd14" do |b|
  344. b.vm.box = "generic/freebsd14"
  345. b.vm.provider :virtualbox do |v|
  346. v.memory = 1024 + $wmem
  347. end
  348. b.ssh.shell = "sh"
  349. b.vm.provision "fs init", :type => :shell, :inline => fs_init("vagrant")
  350. b.vm.provision "packages freebsd", :type => :shell, :inline => packages_freebsd
  351. b.vm.provision "install pyenv", :type => :shell, :privileged => false, :inline => install_pyenv("freebsd14")
  352. b.vm.provision "install pythons", :type => :shell, :privileged => false, :inline => install_pythons("freebsd14")
  353. b.vm.provision "build env", :type => :shell, :privileged => false, :inline => build_pyenv_venv("freebsd14")
  354. b.vm.provision "install borg", :type => :shell, :privileged => false, :inline => install_borg("llfuse")
  355. b.vm.provision "install pyinstaller", :type => :shell, :privileged => false, :inline => install_pyinstaller()
  356. b.vm.provision "build binary with pyinstaller", :type => :shell, :privileged => false, :inline => build_binary_with_pyinstaller("freebsd14")
  357. b.vm.provision "run tests", :type => :shell, :privileged => false, :inline => run_tests("freebsd14", ".*(fuse3|none).*")
  358. end
  359. config.vm.define "openbsd7" do |b|
  360. b.vm.box = "generic/openbsd7"
  361. b.vm.provider :virtualbox do |v|
  362. v.memory = 1024 + $wmem
  363. end
  364. b.vm.provision "fs init", :type => :shell, :inline => fs_init("vagrant")
  365. b.vm.provision "packages openbsd", :type => :shell, :inline => packages_openbsd
  366. b.vm.provision "build env", :type => :shell, :privileged => false, :inline => build_sys_venv("openbsd7")
  367. b.vm.provision "install borg", :type => :shell, :privileged => false, :inline => install_borg("nofuse")
  368. b.vm.provision "run tests", :type => :shell, :privileged => false, :inline => run_tests("openbsd7", ".*fuse.*")
  369. end
  370. config.vm.define "netbsd9" do |b|
  371. b.vm.box = "generic/netbsd9"
  372. b.vm.provider :virtualbox do |v|
  373. v.memory = 4096 + $wmem # need big /tmp tmpfs in RAM!
  374. end
  375. b.vm.provision "fs init", :type => :shell, :inline => fs_init("vagrant")
  376. b.vm.provision "packages netbsd", :type => :shell, :inline => packages_netbsd
  377. b.vm.provision "build env", :type => :shell, :privileged => false, :inline => build_sys_venv("netbsd9")
  378. b.vm.provision "install borg", :type => :shell, :privileged => false, :inline => install_borg(false)
  379. b.vm.provision "run tests", :type => :shell, :privileged => false, :inline => run_tests("netbsd9", ".*fuse.*")
  380. end
  381. config.vm.define "macos1012" do |b|
  382. b.vm.box = "macos-sierra"
  383. b.vm.provider :virtualbox do |v|
  384. v.memory = 8192 + $wmem
  385. v.customize ['modifyvm', :id, '--ostype', 'MacOS_64']
  386. v.customize ['modifyvm', :id, '--paravirtprovider', 'default']
  387. v.customize ['modifyvm', :id, '--nested-hw-virt', 'on']
  388. # Adjust CPU settings according to
  389. # https://github.com/geerlingguy/macos-virtualbox-vm
  390. v.customize ['modifyvm', :id, '--cpuidset',
  391. '00000001', '000306a9', '00020800', '80000201', '178bfbff']
  392. # Disable USB variant requiring Virtualbox proprietary extension pack
  393. v.customize ["modifyvm", :id, '--usbehci', 'off', '--usbxhci', 'off']
  394. end
  395. b.vm.provision "fs init", :type => :shell, :inline => fs_init("vagrant")
  396. b.vm.provision "packages macos", :type => :shell, :privileged => false, :inline => packages_macos
  397. b.vm.provision "install pyenv", :type => :shell, :privileged => false, :inline => install_pyenv("macos1012")
  398. b.vm.provision "fix pyenv", :type => :shell, :privileged => false, :inline => fix_pyenv_macos("macos1012")
  399. b.vm.provision "install pythons", :type => :shell, :privileged => false, :inline => install_pythons("macos1012")
  400. b.vm.provision "build env", :type => :shell, :privileged => false, :inline => build_pyenv_venv("macos1012")
  401. b.vm.provision "install borg", :type => :shell, :privileged => false, :inline => install_borg("llfuse")
  402. b.vm.provision "install pyinstaller", :type => :shell, :privileged => false, :inline => install_pyinstaller()
  403. b.vm.provision "build binary with pyinstaller", :type => :shell, :privileged => false, :inline => build_binary_with_pyinstaller("macos1012")
  404. b.vm.provision "run tests", :type => :shell, :privileged => false, :inline => run_tests("macos1012", ".*(fuse3|none).*")
  405. end
  406. # rsync on openindiana has troubles, does not set correct owner for /vagrant/borg and thus gives lots of
  407. # permission errors. can be manually fixed in the VM by: sudo chown -R vagrant /vagrant/borg ; then rsync again.
  408. config.vm.define "openindiana" do |b|
  409. b.vm.box = "openindiana/hipster"
  410. b.vm.provider :virtualbox do |v|
  411. v.memory = 2048 + $wmem
  412. end
  413. b.vm.provision "fs init", :type => :shell, :inline => fs_init("vagrant")
  414. b.vm.provision "packages openindiana", :type => :shell, :inline => packages_openindiana
  415. b.vm.provision "build env", :type => :shell, :privileged => false, :inline => build_sys_venv("openindiana")
  416. b.vm.provision "install borg", :type => :shell, :privileged => false, :inline => install_borg("nofuse")
  417. b.vm.provision "run tests", :type => :shell, :privileged => false, :inline => run_tests("openindiana", ".*fuse.*")
  418. end
  419. end