Last active
June 19, 2016 14:49
-
-
Save TPXP/f2497b7861e3cc45e069cfee5ca37230 to your computer and use it in GitHub Desktop.
Meteor 1.3.3.1 ARM patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/meteor b/meteor | |
index 4472075..b90d02c 100755 | |
--- a/meteor | |
+++ b/meteor | |
@@ -23,8 +23,7 @@ elif [ "$UNAME" = "Linux" ] ; then | |
ARCH="$(uname -m)" | |
if [ "$ARCH" != "i686" -a "$ARCH" != "x86_64" ] ; then | |
echo "Unsupported architecture: $ARCH" | |
- echo "Meteor only supports i686 and x86_64 for now." | |
- exit 1 | |
+ echo "Will run anyway. Thanks TPXP. :)" | |
fi | |
fi | |
PLATFORM="${UNAME}_${ARCH}" | |
diff --git a/packages/ddp-client/package.js b/packages/ddp-client/package.js | |
index 3c66667..8a0f337 100644 | |
--- a/packages/ddp-client/package.js | |
+++ b/packages/ddp-client/package.js | |
@@ -5,7 +5,9 @@ Package.describe({ | |
}); | |
Npm.depends({ | |
- "faye-websocket": "0.9.4", | |
+ // We have to use a newer version of faye-websocket in order to avoid a weird | |
+ // OpenSSL bug, which prevents the catalog from updating... That's all I know | |
+ "faye-websocket": "0.11.0", | |
"lolex": "1.4.0", | |
"permessage-deflate": "0.1.3" | |
}); | |
diff --git a/scripts/build-dev-bundle-common.sh b/scripts/build-dev-bundle-common.sh | |
index fa0af8a..09c0f1c 100644 | |
--- a/scripts/build-dev-bundle-common.sh | |
+++ b/scripts/build-dev-bundle-common.sh | |
@@ -10,8 +10,7 @@ NODE_VERSION=0.10.45 | |
if [ "$UNAME" == "Linux" ] ; then | |
if [ "$ARCH" != "i686" -a "$ARCH" != "x86_64" ] ; then | |
echo "Unsupported architecture: $ARCH" | |
- echo "Meteor only supports i686 and x86_64 for now." | |
- exit 1 | |
+ echo "Will try anyway. Thanks TPXP. :)" | |
fi | |
OS="linux" | |
@@ -58,8 +57,9 @@ then | |
then | |
NODE_TGZ="node-v${NODE_VERSION}-linux-x64.tar.gz" | |
else | |
- echo "Unknown architecture: $UNAME $ARCH" | |
- exit 1 | |
+ # Official ARM binaries are provided since the release of NodeJS v4 | |
+ NODE_VERSION=4.4.5 | |
+ NODE_TGZ="node-v${NODE_VERSION}-linux-$ARCH.tar.gz" | |
fi | |
elif [ "$UNAME" == "Darwin" ] | |
then | |
diff --git a/scripts/generate-dev-bundle.sh b/scripts/generate-dev-bundle.sh | |
index dfd70fa..ddc64b3 100755 | |
--- a/scripts/generate-dev-bundle.sh | |
+++ b/scripts/generate-dev-bundle.sh | |
@@ -24,18 +24,11 @@ NODE_URL="https://nodejs.org/dist/v${NODE_VERSION}/${NODE_TGZ}" | |
echo "Downloading Node from ${NODE_URL}" | |
curl "${NODE_URL}" | tar zx --strip-components 1 | |
-# Update these values after building the dev-bundle-mongo Jenkins project. | |
-# Also make sure to update MONGO_VERSION in generate-dev-bundle.ps1. | |
-MONGO_VERSION=2.6.7 | |
-MONGO_BUILD_NUMBER=6 | |
-MONGO_TGZ="mongo_${PLATFORM}_v${MONGO_VERSION}.tar.gz" | |
-if [ -f "${CHECKOUT_DIR}/${MONGO_TGZ}" ] ; then | |
- tar zxf "${CHECKOUT_DIR}/${MONGO_TGZ}" | |
-else | |
- MONGO_URL="https://${S3_HOST}/dev-bundle-mongo-${MONGO_BUILD_NUMBER}/${MONGO_TGZ}" | |
- echo "Downloading Mongo from ${MONGO_URL}" | |
- curl "${MONGO_URL}" | tar zx | |
-fi | |
+# Since MongoDB is not ARM-friendly, we have to rely on the system's binaries | |
+mkdir -p mongodb/bin | |
+cd mongodb/bin | |
+ln -s /usr/bin/mongod mongod | |
+ln -s /usr/bin/mongo mongo | |
# export path so we use the downloaded node and npm | |
export PATH="$DIR/bin:$PATH" | |
@@ -120,13 +113,8 @@ cd "$DIR/lib/node_modules/fibers/bin" | |
shrink_fibers | |
# Download BrowserStackLocal binary. | |
-BROWSER_STACK_LOCAL_URL="https://browserstack-binaries.s3.amazonaws.com/BrowserStackLocal-07-03-14-$OS-$ARCH.gz" | |
- | |
+# Not available on ARM, but not needed for core functionnality :) | |
cd "$DIR/build" | |
-curl -O $BROWSER_STACK_LOCAL_URL | |
-gunzip BrowserStackLocal* | |
-mv BrowserStackLocal* BrowserStackLocal | |
-mv BrowserStackLocal "$DIR/bin/" | |
# Sanity check to see if we're not breaking anything by replacing npm | |
INSTALLED_NPM_VERSION=$(cat "$DIR/lib/node_modules/npm/package.json" | | |
diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js | |
index 648771d..88bdac6 100644 | |
--- a/tools/isobuild/bundler.js | |
+++ b/tools/isobuild/bundler.js | |
@@ -2166,8 +2166,9 @@ class ServerTarget extends JsImageTarget { | |
}; | |
var platform = archToPlatform[self.arch]; | |
if (! platform) { | |
- throw new Error("MDG does not publish dev_bundles for arch: " + | |
- self.arch); | |
+ platform = 'Linux_' + self.arch; | |
+ /* throw new Error("MDG does not publish dev_bundles for arch: " + | |
+ self.arch); */ | |
} | |
// Nothing actually pays attention to the `path` field for a server program | |
diff --git a/tools/utils/archinfo.js b/tools/utils/archinfo.js | |
index d14a26f..aad231d 100644 | |
--- a/tools/utils/archinfo.js | |
+++ b/tools/utils/archinfo.js | |
@@ -156,7 +156,7 @@ var host = function () { | |
} else if (_.contains(["x86_64", "amd64", "ia64"], machine)) { | |
_host = "os.linux.x86_64"; | |
} else { | |
- throw new Error("Unsupported architecture: " + machine); | |
+ _host = "os.linux." + machine; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment