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

[FIX] Build for Sandstorm missing dependence for capnp #11056

Merged
merged 2 commits into from
Jun 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .sandstorm/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -euvo pipefail
# Make meteor bundle
sudo chown vagrant:vagrant /home/vagrant -R
cd /opt/app
meteor npm install capnp
meteor npm install
meteor build --directory /home/vagrant/

Expand Down
13 changes: 13 additions & 0 deletions .sandstorm/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,24 @@ tar xf "$CACHE_TARGET"
# Create symlink so we can rely on the path /opt/meteor-spk
ln -s "${PACKAGE}" meteor-spk

#This will install capnp, the Cap’n Proto command-line tool.
#It will also install libcapnp, libcapnpc, and libkj in /usr/local/lib and headers in /usr/local/include/capnp and /usr/local/include/kj.
wget https://capnproto.org/capnproto-c++-0.5.3.tar.gz
tar zxf capnproto-c++-0.5.3.tar.gz
cd capnproto-c++-0.5.3
./configure
make -j6 check
# inlcude libcapnp and libkj library to dependencies.
cp .libs/* /opt/meteor-spk/meteor-spk.deps/lib/x86_64-linux-gnu/

# Add bash, and its dependencies, so they get mapped into the image.
# Bash runs the launcher script.
cp -a /bin/bash /opt/meteor-spk/meteor-spk.deps/bin/
cp -a /lib/x86_64-linux-gnu/libncurses.so.* /opt/meteor-spk/meteor-spk.deps/lib/x86_64-linux-gnu/
cp -a /lib/x86_64-linux-gnu/libtinfo.so.* /opt/meteor-spk/meteor-spk.deps/lib/x86_64-linux-gnu/
# for npm in package.json sharp.
cp -a /lib/x86_64-linux-gnu/libresolv* /opt/meteor-spk/meteor-spk.deps/lib/x86_64-linux-gnu/


# Unfortunately, Meteor does not explicitly make it easy to cache packages, but
# we know experimentally that the package is mostly directly extractable to a
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-sandstorm/server/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Future from 'fibers/future';
RocketChat.Sandstorm = {};

if (process.env.SANDSTORM === '1') {
const Capnp = require('/node_modules/capnp.js');
const Capnp = require('capnp');
const SandstormHttpBridge = Capnp.importSystem('sandstorm/sandstorm-http-bridge.capnp').SandstormHttpBridge;

let capnpConnection = null;
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-sandstorm/server/powerbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
RocketChat.Sandstorm.offerUiView = function() {};

if (process.env.SANDSTORM === '1') {
const Capnp = require('/node_modules/capnp.js');
const Capnp = require('capnp');
const Powerbox = Capnp.importSystem('sandstorm/powerbox.capnp');
const Grain = Capnp.importSystem('sandstorm/grain.capnp');

Expand Down