freedomofpress/sunder

Update document to explain `make build` for libvirt

Closed this issue · 5 comments

Bug

Description

The command make build failed with the following error, this is Debian9 with libvirt backend.

Steps to Reproduce

$ make build
make ansible
make[1]: Entering directory '/home/kdas/code/sunder'
ansible-galaxy install -r ansible/requirements.yml -p ansible/roles
- downloading role 'nodejs', owned by geerlingguy
- downloading role from https://github.com/geerlingguy/ansible-role-nodejs/archive/4.1.2.tar.gz
- extracting geerlingguy.nodejs to /home/kdas/code/sunder/ansible/roles/geerlingguy.nodejs
- geerlingguy.nodejs (4.1.2) was installed successfully
make[1]: Leaving directory '/home/kdas/code/sunder'
vagrant up --provision
Bringing machine 'sunder' up with 'libvirt' provider...
==> sunder: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
    sunder: Box Provider: libvirt
    sunder: Box Version: >= 0
==> sunder: Loading metadata for box 'ubuntu/trusty64'
    sunder: URL: https://atlas.hashicorp.com/ubuntu/trusty64
The box you're attempting to add doesn't support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn't
simply misspell it.

If you're adding a box from HashiCorp's Atlas, make sure the box is
released.

Name: ubuntu/trusty64
Address: https://atlas.hashicorp.com/ubuntu/trusty64
Requested provider: [:libvirt]
Makefile:15: recipe for target 'build' failed
make: *** [build] Error 1

Expected Behavior

It should build the development environment properly.

We will have to update the documentation with proper steps.

Good call, @kushaldas. You'll need to pull the VirtualBox image, the convert it to libvirt, since there's no official build of libvirt as far back as Trusty:

$ vagrant box add ubuntu/trusty64
$ vagrant mutate ubuntu/trusty64 libvirt

Then try vagrant up again. Note #75, which should sidestep problems like what you describe on all platforms.

I remember the steps from SecureDrop work, just want to make sure that we document these for the next person :)

@kushaldas Are you comfortable using Docker? Because we're considering moving away from Vagrant/Ansible to Docker for Linux builds in #75.

@garrettr Docker is fine for this. I just to make sure that any new contributor (or someone just poking into things) can start smooth.

Superseded by #87: we no longer use Vagrant/libvirt, we use Docker containers for building the Linux Debian packages.