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

Update README to suggest UTM instead of Vagrant #63

Merged
merged 2 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
34 changes: 24 additions & 10 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,31 @@ Ruby code is in `lib/`
== Other useful things

- There is a `CMakeLists.txt` that's mainly there for CLion support; we don't use cmake to build any of this.
- You can use vagrant to bootstrap a VM to test under Linux while on Darwin; this is useful when testing `seccomp`.
- You can use UTM to bootstrap an x86_64 VM to test with Linux while on MacOS; this is useful when testing `seccomp`.
jeffcharles marked this conversation as resolved.
Show resolved Hide resolved
Note that the `script_runner_test.defaults_to_counting_all_instructions` and
`script_runner_test.can_bypass_deserialization_instructions` tests will fail with `execution_time_us` being greater
than `0` due to execution time taking longer because the tests are being run in an emulated environment. As long as
all tests pass in CI, it's fine if they fail in UTM when running on emulated hardware.

=== Vagrant
=== Ubuntu VM

[source]
----
$ vagrant up
$ vagrant ssh
vagrant@vagrant-ubuntu-trusty-64:~$ cd /vagrant
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ bundle install
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ git submodule init
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ git submodule update
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ bin/rake
----
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-add-repository -y ppa:rael-gc/rvm
$ sudo apt-get update
$ sudo apt-get install rvm build-essential git libncurses5-dev libgmp-dev libssl-dev openssh-server net-tools gdb
$ sudo systemctl start ssh
$ ifconfig # record the IP address for the non-loopback interface
$ sudo usermod -a -G rvm $USER
$ sudo reboot
$ rvm install 3.3.0 # (this may take a while)
$ git clone https://github.com/Shopify/ess.git
$ cd ess
$ git submodule update --init --recursive
$ bundle install
$ bin/rake compile

To SSH in:
$ ssh <vm_username>@<vm_ipaddress>
5 changes: 0 additions & 5 deletions Vagrantfile

This file was deleted.

9 changes: 0 additions & 9 deletions bootstrap.sh

This file was deleted.