From e21c47d3cfe0f228ce5ab394142c6ec6ee090d65 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Thu, 29 Aug 2019 00:18:15 +0300 Subject: Upgrade node, mongo and fibers. Thanks to xet7 ! --- .travis.yml | 8 +-- Dockerfile | 4 +- docker-compose.yml | 2 +- package-lock.json | 14 ++++- package.json | 3 +- rebuild-wekan.bat | 6 +- rebuild-wekan.sh | 2 +- releases/virtualbox/rebuild-wekan.sh | 111 ----------------------------------- snapcraft.yaml | 4 +- 9 files changed, 26 insertions(+), 128 deletions(-) delete mode 100755 releases/virtualbox/rebuild-wekan.sh diff --git a/.travis.yml b/.travis.yml index cde2bf33..4d29865d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ -dist: trusty +dist: disco sudo: required env: - TRAVIS_DOCKER_COMPOSE_VERSION: 1.17.0 - TRAVIS_NODE_VERSION: 8.9.3 - TRAVIS_NPM_VERSION: 5.5.1 + TRAVIS_DOCKER_COMPOSE_VERSION: 1.24.0 + TRAVIS_NODE_VERSION: 8.16.1 + TRAVIS_NPM_VERSION: 6.4.1 before_install: - sudo apt-get update -y diff --git a/Dockerfile b/Dockerfile index cb4901a6..03ea9699 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ LABEL maintainer="wekan" # ENV BUILD_DEPS="paxctl" ENV BUILD_DEPS="apt-utils bsdtar gnupg gosu wget curl bzip2 g++ build-essential git ca-certificates" \ DEBUG=false \ - NODE_VERSION=v8.16.0 \ + NODE_VERSION=v8.16.1 \ METEOR_RELEASE=1.8.1 \ USE_EDGE=false \ METEOR_EDGE=1.5-beta.17 \ @@ -178,7 +178,7 @@ RUN \ mv node-${NODE_VERSION}-${ARCHITECTURE} /opt/nodejs && \ ln -s /opt/nodejs/bin/node /usr/bin/node && \ ln -s /opt/nodejs/bin/npm /usr/bin/npm && \ - mkdir -p /opt/nodejs/lib/node_modules/fibers/.node-gyp /root/.node-gyp/8.16.0 /home/wekan/.config && \ + mkdir -p /opt/nodejs/lib/node_modules/fibers/.node-gyp /root/.node-gyp/8.16.1 /home/wekan/.config && \ chown wekan --recursive /home/wekan/.config && \ \ #DOES NOT WORK: paxctl fix for alpine linux: https://github.com/wekan/wekan/issues/1303 diff --git a/docker-compose.yml b/docker-compose.yml index 6e1f9bb4..9b950b5b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -93,7 +93,7 @@ services: #------------------------------------------------------------------------------------- # ==== MONGODB AND METEOR VERSION ==== # a) For Wekan Meteor 1.8.x version at master branch, use mongo 4.x - image: mongo:4.0.11 + image: mongo:4.0.12 # b) For Wekan Meteor 1.6.x version at devel branch. # Only for Snap and Sandstorm while they are not upgraded yet to Meteor 1.8.x #image: mongo:3.2.21 diff --git a/package-lock.json b/package-lock.json index 7b7b88c1..edf77447 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1392,6 +1392,14 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "fibers": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/fibers/-/fibers-4.0.1.tgz", + "integrity": "sha512-H79EJn7DMWXk48ygmC82bMP8KNcFBZF1CPfwBpYF6cO85hGWoIrlu7eyX9ayxfjP9Nsl0JXxdI6fpYU4DWVw2w==", + "requires": { + "detect-libc": "^1.0.3" + } + }, "figures": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.0.0.tgz", @@ -4087,9 +4095,9 @@ "dev": true }, "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.8.0.tgz", + "integrity": "sha512-tPSkj8y92PfZVbinY1n84i1Qdx75lZjMQYx9WZhnkofyxzw2r7Ho39G3/aEvSUdebxpnnM4LZJCtvE/Aq3+s9w==" }, "rc": { "version": "1.2.8", diff --git a/package.json b/package.json index c8e610b0..a06cf821 100644 --- a/package.json +++ b/package.json @@ -60,13 +60,14 @@ "bson": "^4.0.0", "bunyan": "^1.8.12", "es6-promise": "^4.2.4", + "fibers": "^4.0.1", "gridfs-stream": "^0.5.3", "ldapjs": "^1.0.2", "meteor-node-stubs": "^0.4.1", "mongodb": "^2.2.19", "os": "^0.1.1", "page": "^1.8.6", - "qs": "^6.5.2", + "qs": "^6.8.0", "source-map-support": "^0.5.12", "xss": "^1.0.6" } diff --git a/rebuild-wekan.bat b/rebuild-wekan.bat index 784adb82..05614899 100644 --- a/rebuild-wekan.bat +++ b/rebuild-wekan.bat @@ -13,15 +13,15 @@ REM Install chocolatey choco install -y git curl python2 dotnet4.5.2 nano mongodb-3 mongoclient meteor -curl -O https://nodejs.org/dist/v8.12.0/node-v8.12.0-x64.msi -call node-v8.12.0-x64.msi +curl -O https://nodejs.org/dist/v8.16.1/node-v8.16.1-x64.msi +call node-v8.16.1-x64.msi call npm config -g set msvs_version 2015 call meteor npm config -g set msvs_version 2015 call npm -g install npm call npm -g install node-gyp -call npm -g install fibers@2.0.0 +call npm -g install fibers cd C:\repos git clone https://github.com/wekan/wekan.git cd wekan diff --git a/rebuild-wekan.sh b/rebuild-wekan.sh index 04e86848..585570fa 100755 --- a/rebuild-wekan.sh +++ b/rebuild-wekan.sh @@ -79,7 +79,7 @@ do curl -0 -L https://npmjs.org/install.sh | sudo sh sudo chown -R $(id -u):$(id -g) $HOME/.npm sudo npm -g install n - sudo n 8.16.0 + sudo n 8.16.1 #curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - #sudo apt-get install -y nodejs elif [[ "$OSTYPE" == "darwin"* ]]; then diff --git a/releases/virtualbox/rebuild-wekan.sh b/releases/virtualbox/rebuild-wekan.sh deleted file mode 100755 index c1adaf78..00000000 --- a/releases/virtualbox/rebuild-wekan.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/bin/bash - -echo "Note: If you use other locale than en_US.UTF-8 , you need to additionally install en_US.UTF-8" -echo " with 'sudo dpkg-reconfigure locales' , so that MongoDB works correctly." -echo " You can still use any other locale as your main locale." - -function pause(){ - read -p "$*" -} - -echo -PS3='Please enter your choice: ' -options=("Install Wekan dependencies" "Build Wekan" "Quit") -select opt in "${options[@]}" -do - case $opt in - "Install Wekan dependencies") - - if [[ "$OSTYPE" == "linux-gnu" ]]; then - echo "Linux"; - echo "Ubuntu, Mint, Debian, or Debian on Windows Subsystem for Linux"; - sudo apt-get install -y build-essential git curl wget; - curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -; - elif [[ "$OSTYPE" == "darwin"* ]]; then - echo "macOS"; - pause '1) Install XCode 2) Install Node 8.x from https://nodejs.org/en/ 3) Press [Enter] key to continue.' - elif [[ "$OSTYPE" == "cygwin" ]]; then - # POSIX compatibility layer and Linux environment emulation for Windows - echo "TODO: Add Cygwin"; - exit; - elif [[ "$OSTYPE" == "msys" ]]; then - # Lightweight shell and GNU utilities compiled for Windows (part of MinGW) - echo "TODO: Add msys on Windows"; - exit; - elif [[ "$OSTYPE" == "win32" ]]; then - # I'm not sure this can happen. - echo "TODO: Add Windows"; - exit; - elif [[ "$OSTYPE" == "freebsd"* ]]; then - echo "TODO: Add FreeBSD"; - exit; - else - echo "Unknown" - echo ${OSTYPE} - exit; - fi - - ## Latest npm with Meteor 1.6 - sudo npm -g install npm - sudo npm -g install node-gyp - # Latest fibers for Meteor 1.6 - sudo npm -g install fibers@2.0.0 - # Install Meteor, if it's not yet installed - curl https://install.meteor.com | bash - mkdir ~/repos - cd ~/repos - git clone https://github.com/wekan/wekan.git - cd wekan - git checkout devel - break - ;; - "Build Wekan") - echo "Building Wekan." - cd ~/repos/wekan - ## REPOS BELOW ARE INCLUDED TO WEKAN - #mkdir -p ~/repos/wekan/packages - #cd ~/repos/wekan/packages - #git clone --depth 1 -b master https://github.com/wekan/flow-router.git kadira-flow-router - #git clone --depth 1 -b master https://github.com/meteor-useraccounts/core.git meteor-useraccounts-core - #git clone --depth 1 -b master https://github.com/wekan/meteor-accounts-cas.git - #git clone --depth 1 -b master https://github.com/wekan/wekan-ldap.git - #git clone --depth 1 -b master https://github.com/wekan/wekan-scrollbar.git - #git clone --depth 1 -b master https://github.com/wekan/meteor-accounts-oidc.git - #git clone --depth 1 -b master --recurse-submodules https://github.com/wekan/markdown.git - #mv meteor-accounts-oidc/packages/switch_accounts-oidc wekan_accounts-oidc - #mv meteor-accounts-oidc/packages/switch_oidc wekan_oidc - #rm -rf meteor-accounts-oidc - if [[ "$OSTYPE" == "darwin"* ]]; then - echo "sed at macOS"; - sed -i '' 's/api\.versionsFrom/\/\/api.versionsFrom/' ~/repos/wekan/packages/meteor-useraccounts-core/package.js - else - echo "sed at ${OSTYPE}" - sed -i 's/api\.versionsFrom/\/\/api.versionsFrom/' ~/repos/wekan/packages/meteor-useraccounts-core/package.js - fi - - cd ~/repos/wekan - rm -rf node_modules - meteor npm install - rm -rf .build - meteor build .build --directory - cp -f fix-download-unicode/cfs_access-point.txt .build/bundle/programs/server/packages/cfs_access-point.js - #Removed binary version of bcrypt because of security vulnerability that is not fixed yet. - #https://github.com/wekan/wekan/commit/4b2010213907c61b0e0482ab55abb06f6a668eac - #https://github.com/wekan/wekan/commit/7eeabf14be3c63fae2226e561ef8a0c1390c8d3c - #cd ~/repos/wekan/.build/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt - #rm -rf node_modules/bcrypt - #meteor npm install bcrypt - cd ~/repos/wekan/.build/bundle/programs/server - rm -rf node_modules - meteor npm install - #meteor npm install bcrypt - cd ~/repos - echo Done. - break - ;; - "Quit") - break - ;; - *) echo invalid option;; - esac -done diff --git a/snapcraft.yaml b/snapcraft.yaml index 2dfb3bbb..9419e932 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -81,11 +81,11 @@ parts: wekan: source: . plugin: nodejs - node-engine: 8.16.0 + node-engine: 8.16.1 node-packages: - node-gyp - node-pre-gyp - - fibers@2.0.0 + - fibers build-packages: - ca-certificates - apt-utils -- cgit v1.2.3-1-g7c22