From 831b1f03c2b5d5af951a31c13c01e5e5a0d280d6 Mon Sep 17 00:00:00 2001
From: cgeek <cem.moreau@gmail.com>
Date: Sat, 13 May 2017 10:32:28 +0200
Subject: [PATCH] [fix] Correct build through VMs

---
 release/arch/debian/Vagrantfile  | 2 +-
 release/arch/debian/bootstrap.sh | 2 +-
 release/arch/debian/build-deb.sh | 8 +++++++-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/release/arch/debian/Vagrantfile b/release/arch/debian/Vagrantfile
index 5a7820f4e..da912f7fb 100644
--- a/release/arch/debian/Vagrantfile
+++ b/release/arch/debian/Vagrantfile
@@ -12,7 +12,7 @@ Vagrant.configure("2") do |config|
 
   # Every Vagrant development environment requires a box. You can search for
   # boxes at https://atlas.hashicorp.com/search.
-  config.vm.box = "https://s3.eu-central-1.amazonaws.com/duniter/vagrant/duniter_ubuntu.box"
+  config.vm.box = "https://s3.eu-central-1.amazonaws.com/duniter/vagrant/duniter_trusty64.box"
   config.vm.provision :shell, path: "bootstrap.sh"
 
   # Disable automatic box update checking. If you disable this, then
diff --git a/release/arch/debian/bootstrap.sh b/release/arch/debian/bootstrap.sh
index 529eb51f5..6666f97b5 100644
--- a/release/arch/debian/bootstrap.sh
+++ b/release/arch/debian/bootstrap.sh
@@ -9,4 +9,4 @@ apt-get update
 apt-get install --yes git curl build-essential yarn python-minimal zip
 
 # User installation
-sudo su ubuntu -c "bash /vagrant/user-bootstrap.sh"
+sudo su vagrant -c "bash /vagrant/user-bootstrap.sh"
diff --git a/release/arch/debian/build-deb.sh b/release/arch/debian/build-deb.sh
index 559db82bd..ebc1a54b8 100644
--- a/release/arch/debian/build-deb.sh
+++ b/release/arch/debian/build-deb.sh
@@ -126,10 +126,16 @@ cd "$RELEASES/desktop_/node_modules/sqlite3"
 node-pre-gyp --runtime=node-webkit --target=$NW_VERSION configure
 node-pre-gyp --runtime=node-webkit --target=$NW_VERSION build
 cp lib/binding/node-webkit-$NW_RELEASE-linux-x64/node_sqlite3.node lib/binding/node-v$ADDON_VERSION-linux-x64/node_sqlite3.node
+cd "$RELEASES/desktop_/node_modules/heapdump"
+nw-gyp --target=$NW_VERSION configure
+nw-gyp --target=$NW_VERSION build
 
 # Unused binaries
 cd "$RELEASES/desktop_/"
 rm -rf node_modules/sqlite3/build
+#rm -rf node_modules/naclb/build
+#rm -rf node_modules/wotb/build
+#rm -rf node_modules/scryptb/build
 
 ## Install Nw.js
 mkdir -p "$RELEASES/desktop_release"
@@ -155,7 +161,7 @@ tar czf /vagrant/duniter-desktop-${DUNITER_TAG}-linux-x64.tar.gz * --exclude ".g
 # -------------------------------------------------
 
 # Create .deb tree + package it
-cp -r "$RELEASES/desktop_release/sources/ci/travis/debian" "$RELEASES/duniter-x64"
+cp -r "$RELEASES/desktop_release/sources/release/arch/debian/package" "$RELEASES/duniter-x64"
 mkdir -p "$RELEASES/duniter-x64/opt/duniter/"
 chmod 755 ${RELEASES}/duniter-x64/DEBIAN/post*
 chmod 755 ${RELEASES}/duniter-x64/DEBIAN/pre*
-- 
GitLab