Skip to content

Commit

Permalink
Merge pull request #9062 from peterlee0127/develop
Browse files Browse the repository at this point in the history
[FIX] Update Rocket.Chat for sandstorm
  • Loading branch information
sampaiodiego committed Dec 15, 2017
1 parent 27c80f7 commit cf7a254
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ jparker:gravatar
kadira:blaze-layout
kadira:flow-router
keepnox:perfect-scrollbar
#kenton:accounts-sandstorm
kenton:accounts-sandstorm
mizzao:autocomplete
mizzao:timesync
mrt:reactive-store
Expand Down
4 changes: 2 additions & 2 deletions .sandstorm/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ set -x
set -euvo pipefail

# Make meteor bundle
export NODE_ENV=production
sudo chown vagrant:vagrant /home/vagrant -R
cd /opt/app
meteor npm install --production
meteor npm install
meteor build --directory /home/vagrant/

export NODE_ENV=production
# Use npm and node from the Meteor dev bundle to install the bundle's dependencies.
TOOL_VERSION=$(meteor show --ejson $(<.meteor/release) | grep '^ *"tool":' |
sed -re 's/^.*"(meteor-tool@[^"]*)".*$/\1/g')
Expand Down
1 change: 1 addition & 0 deletions .sandstorm/sandstorm-pkgdef.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ const myCommand :Spk.Manifest.Command = (
# Note that this defines the *entire* environment seen by your app.
(key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"),
(key = "SANDSTORM", value = "1"),
(key = "HOME", value = "/var"),
(key = "Statistics_reporting", value = "false"),
(key = "Accounts_AllowUserAvatarChange", value = "false"),
(key = "Accounts_AllowUserProfileChange", value = "false"),
Expand Down
4 changes: 2 additions & 2 deletions .sandstorm/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ apt-get install build-essential git -y
cd /opt/

NODE_ENV=production
PACKAGE=meteor-spk-0.3.1
PACKAGE=meteor-spk-0.4.0
PACKAGE_FILENAME="$PACKAGE.tar.xz"
CACHE_TARGET="/host-dot-sandstorm/caches/${PACKAGE_FILENAME}"

Expand All @@ -32,7 +32,7 @@ cp -a /lib/x86_64-linux-gnu/libtinfo.so.* /opt/meteor-spk/meteor-spk.deps/lib/x8
# Unfortunately, Meteor does not explicitly make it easy to cache packages, but
# we know experimentally that the package is mostly directly extractable to a
# user's $HOME/.meteor directory.
METEOR_RELEASE=1.4.2
METEOR_RELEASE=1.6.0.1
METEOR_PLATFORM=os.linux.x86_64
METEOR_TARBALL_FILENAME="meteor-bootstrap-${METEOR_PLATFORM}.tar.gz"
METEOR_TARBALL_URL="https://d3sqy0vbqsdhku.cloudfront.net/packages-bootstrap/${METEOR_RELEASE}/${METEOR_TARBALL_FILENAME}"
Expand Down
4 changes: 2 additions & 2 deletions packages/rocketchat-sandstorm/server/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ RocketChat.Sandstorm = {};

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

let capnpConnection = null;
let httpBridge = null;
Expand Down
6 changes: 3 additions & 3 deletions packages/rocketchat-sandstorm/server/powerbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
RocketChat.Sandstorm.offerUiView = function() {};

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

RocketChat.Sandstorm.offerUiView = function(token, serializedDescriptor, sessionId) {
const httpBridge = getHttpBridge();
Expand Down

0 comments on commit cf7a254

Please sign in to comment.