Skip to content
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

[WIP] update freebsd vagrant box to lastest release (11.1) #4803

Closed
wants to merge 5 commits into from
Closed

[WIP] update freebsd vagrant box to lastest release (11.1) #4803

wants to merge 5 commits into from

Conversation

tosmi
Copy link

@tosmi tosmi commented Aug 6, 2017

This PR updates the Vagrantfile for building crystal with FreeBSD 11.1 and fixes #4802. The following changes are implement

  • bump box version to FreeBSD 11.1
  • change shell from /bin/csh to /bin/sh to avoid warnings
  • set base_mac, otherwise you have to run vagrant up twice as the upstream box does not set base_mac
  • update the package list
  • use -q (quiet) for install packages
  • disable folder sharing and just clone the upstream crystal repo. IMHO this makes the box easier to use as most people are not running NFSD on their machines. Git is installed inside the box so updating the crystal repos from inside the box is not a problem.

folder sharing is unreliable, e.g. no nfs server on host,
sshfs plugin not installed or rsync binary missing.

for building crystal inside vagrant sharing the folder is just
overkill, so just clone from upstream and disable folder sharing.
freebsd comes with /bin/sh as well, so use this to suppress 'export:
command not found' warnings.

removed comment about boehm-gc as there is boehm-gc-threaded package
we are using.
@tosmi tosmi changed the title [WIP] update freebsd vagant box to lastest release (11.1) [WIP] update freebsd vagrant box to lastest release (11.1) Aug 6, 2017
c.vm.network "private_network", type: "dhcp"
c.vm.synced_folder ".", "/vagrant", type: "nfs"
c.vm.synced_folder ".", "/vagrant", disabled: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The vagrant box isn't used just for building, it can be used for debugging too. If I'm debugging I absolutely want a shared folder so that I can edit the files in the vm using the editor on the host.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, i'll revert that change.

thanks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually the original version only linked the git repositories. I think that's wrong too as the host still doesn't have access to the files on the client directly. This was likely done to stop .build from being shared. Perhaps allowing $(O) in the makefile to be modified and setting env automatically to place the VM .build outside the shared directory is the best idea.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the upstream Vagrantfile clones /vagrant (which is the shared folder) to /home/vagrant/crystal. i'm on nixos here and getting nfs folder sharing to work is a PITA. would it be ok to introduce an environment variable that disables folder sharing?

so i would set VAGRANT_DISABLE_SHARED to true and the box comes up cleanly in my case. the default doesn't change.

i will also look into making ${O} configurable, but will open a second issue for this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tosmi surely all you need is the nfsd binary on your path?

@straight-shoota straight-shoota mentioned this pull request Sep 14, 2018
@bcardiff bcardiff mentioned this pull request Nov 12, 2018
@bararchy
Copy link
Contributor

@bcardiff can we close this PR?

@RX14 RX14 closed this Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Vagrantfile to support latest FreeBSD release (11.1)
3 participants