From 47d374a09aac493e220327c6e6ecf6e96af0bc50 Mon Sep 17 00:00:00 2001 From: Didier Roche Date: Thu, 12 Nov 2015 16:09:31 +0100 Subject: [PATCH 01/11] :penguin: Add "mktar" gulp task to create an Linux binary archive This archive in tar.gz format contains the whole Atom binary and resources to enable multiple channels and versions to be installed on the same distribution. --- build/tasks/mktar-task.coffee | 30 +++++++++++++++++++++++++++ script/mktar | 39 +++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 build/tasks/mktar-task.coffee create mode 100755 script/mktar diff --git a/build/tasks/mktar-task.coffee b/build/tasks/mktar-task.coffee new file mode 100644 index 000000000..f5edbb4be --- /dev/null +++ b/build/tasks/mktar-task.coffee @@ -0,0 +1,30 @@ +path = require 'path' + +module.exports = (grunt) -> + {spawn, fillTemplate} = require('./task-helpers')(grunt) + + grunt.registerTask 'mktar', 'Create an archive', -> + done = @async() + + appFileName = grunt.config.get('atom.appFileName') + buildDir = grunt.config.get('atom.buildDir') + shellAppDir = grunt.config.get('atom.shellAppDir') + {version, description} = grunt.config.get('atom.metadata') + + if process.arch is 'ia32' + arch = 'i386' + else if process.arch is 'x64' + arch = 'amd64' + else + return done("Unsupported arch #{process.arch}") + + iconPath = path.join(shellAppDir, 'resources', 'app.asar.unpacked', 'resources', 'atom.png') + + cmd = path.join('script', 'mktar') + args = [appFileName, version, arch, iconPath, buildDir] + spawn {cmd, args}, (error) -> + if error? + done(error) + else + grunt.log.ok "Created " + path.join(buildDir, "#{appFileName}-#{version}-#{arch}.tar.gz") + done() diff --git a/script/mktar b/script/mktar new file mode 100755 index 000000000..986063f9a --- /dev/null +++ b/script/mktar @@ -0,0 +1,39 @@ +#!/bin/bash +# mktar name version arch icon-path build-root-path + +set -e + +SCRIPT=`readlink -f "$0"` +ROOT=`readlink -f $(dirname $SCRIPT)/..` +cd $ROOT + +NAME="$1" +VERSION="$2" +ARCH="$3" +ICON_FILE="$4" +BUILD_ROOT_PATH="$5" +FILE_MODE=755 + +TAR_PATH=$BUILD_ROOT_PATH +ATOM_PATH="$BUILD_ROOT_PATH/Atom" + +TARGET_ROOT="`mktemp -d`" +chmod $FILE_MODE "$TARGET_ROOT" +NAME_IN_TAR="$NAME-$VERSION-$ARCH" +TARGET="$TARGET_ROOT/$NAME_IN_TAR" + +# Copy executable and resources +cp -a "$ATOM_PATH" "$TARGET" + +# Copy icon file +cp "$ICON_FILE" "$TARGET/$NAME.png" + +# Remove executable bit from .node files +find "$TARGET" -type f -name "*.node" -exec chmod a-x {} \; + +# Create the archive +pushd "$TARGET_ROOT" +tar caf "$TAR_PATH/$NAME_IN_TAR.tar.gz" "$NAME_IN_TAR" +popd + +rm -rf "$TARGET_ROOT" From 4a51841159b16e312949c23ebf83e59b4264ceba Mon Sep 17 00:00:00 2001 From: Didier Roche Date: Thu, 12 Nov 2015 16:12:06 +0100 Subject: [PATCH 02/11] Add the mktar task to linux CI --- build/Gruntfile.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index d9375d05c..f8ee607e5 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -285,6 +285,7 @@ module.exports = (grunt) -> ciTasks.push('dump-symbols') if process.platform is 'darwin' ciTasks.push('set-version', 'check-licenses', 'lint', 'generate-asar') ciTasks.push('mkdeb') if process.platform is 'linux' + ciTasks.push('mktar') if process.platform is 'linux' ciTasks.push('codesign:exe') if process.platform is 'win32' and not process.env.CI ciTasks.push('create-windows-installer:installer') if process.platform is 'win32' ciTasks.push('test') if process.platform is 'darwin' From 6a17b2dee83180106fca108189dc87bd58b2388a Mon Sep 17 00:00:00 2001 From: Didier Roche Date: Thu, 12 Nov 2015 16:13:11 +0100 Subject: [PATCH 03/11] Add the newly created archive to the publish-build task This archive is created on an Ubuntu 64 bits machine, publish it if present in the assets. The version contains the channel name, so don't append channel name to it. --- build/tasks/publish-build-task.coffee | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/build/tasks/publish-build-task.coffee b/build/tasks/publish-build-task.coffee index de46eb4fe..19061db02 100644 --- a/build/tasks/publish-build-task.coffee +++ b/build/tasks/publish-build-task.coffee @@ -85,13 +85,13 @@ getAssets = -> arch = 'amd64' # Check for a Debian build - sourcePath = "#{buildDir}/#{appFileName}-#{version}-#{arch}.deb" + sourcePath = path.join(buildDir, "#{appFileName}-#{version}-#{arch}.deb") assetName = "atom-#{arch}.deb" # Check for a Fedora build unless fs.isFileSync(sourcePath) rpmName = fs.readdirSync("#{buildDir}/rpm")[0] - sourcePath = "#{buildDir}/rpm/#{rpmName}" + sourcePath = path.join(buildDir, "rpm", rpmName) if process.arch is 'ia32' arch = 'i386' else @@ -99,10 +99,17 @@ getAssets = -> assetName = "atom.#{arch}.rpm" cp sourcePath, path.join(buildDir, assetName) + assets = [{assetName, sourcePath}] - [ - {assetName, sourcePath} - ] + # Check for an archive build on a debian build machine. + # We could provide a Fedora version if some libraries are not compatible + sourcePath = path.join(buildDir, "#{appFileName}-#{version}-#{arch}.tar.gz") + if fs.isFileSync(sourcePath) + assetName = "atom-#{arch}.tar.gz" + cp sourcePath, path.join(buildDir, assetName) + assets.push({assetName, sourcePath}) + + assets logError = (message, error, details) -> grunt.log.error(message) From d50da12bca3daa188a9817ce6adf777f1f13310d Mon Sep 17 00:00:00 2001 From: Didier Roche Date: Thu, 12 Nov 2015 16:15:19 +0100 Subject: [PATCH 04/11] Add Linux archive installation and build instructions --- README.md | 16 ++++++++++++++++ docs/build-instructions/linux.md | 8 +++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dcda2146c..20e940689 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,22 @@ Currently only a 64-bit version is available. The Linux version does not currently automatically update so you will need to repeat these steps to upgrade to future releases. +### Archive extraction + +An archive is available for people who don't want to install `atom` as root. + +This version enables you to install multiple Atom versions in parallel. It has been built on Ubuntu 64-bit, +but should be compatible with other Linux distributions. + +1. Install dependencies (on Ubuntu): `sudo apt install git gconf2 gconf-service libgtk2.0-0 libudev1 libgcrypt20 +libnotify4 libxtst6 libnss3 python gvfs-bin xdg-utils libcap2` +2. Download `atom-amd64.tar.gz` from the [Atom releases page](https://github.com/atom/atom/releases/latest). +3. Run `tar xf atom-amd64.tar.gz` in the directory where you want to extract the Atom folder. +4. Launch Atom using the installed `atom` command from the newly extracted directory. + +The Linux version does not currently automatically update so you will need to +repeat these steps to upgrade to future releases. + ## Building * [Linux](docs/build-instructions/linux.md) diff --git a/docs/build-instructions/linux.md b/docs/build-instructions/linux.md index c6a9e74eb..99b9b5afc 100644 --- a/docs/build-instructions/linux.md +++ b/docs/build-instructions/linux.md @@ -74,7 +74,7 @@ If you have problems with permissions don't forget to prefix with `sudo` To use the newly installed Atom, quit and restart all running Atom instances. -5. *Optionally*, you may generate distributable packages of Atom at `out`. Currently, `.deb` and `.rpm` package types are supported. To create a `.deb` package run: +5. *Optionally*, you may generate distributable packages of Atom at `out`. Currently, `.deb` and `.rpm` package types are supported, as well as a `tar gz` archive. To create a `.deb` package run: ```sh script/grunt mkdeb @@ -86,6 +86,12 @@ If you have problems with permissions don't forget to prefix with `sudo` script/grunt mkrpm ``` + To create a `.tar.gz` package run + + ```sh + script/grunt mktar + ``` + ## Advanced Options ### Custom build directory From 50c1bd34ca41efd3e7ec02f17d3237dcf6b8c6a6 Mon Sep 17 00:00:00 2001 From: Lee Dohm Date: Tue, 5 Apr 2016 19:00:34 -0700 Subject: [PATCH 05/11] :arrow_up: tabs@0.92.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6c796a711..b087667bf 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "status-bar": "1.2.1", "styleguide": "0.45.2", "symbols-view": "0.112.0", - "tabs": "0.92.0", + "tabs": "0.92.1", "timecop": "0.33.1", "tree-view": "0.203.3", "update-package-dependencies": "0.10.0", From 917f20d1c4c5f436522e45e8087975f95b4aac29 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 6 Apr 2016 16:05:43 -0600 Subject: [PATCH 06/11] :arrow_up: tree-view --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b087667bf..d48b1f41e 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "symbols-view": "0.112.0", "tabs": "0.92.1", "timecop": "0.33.1", - "tree-view": "0.203.3", + "tree-view": "0.203.4", "update-package-dependencies": "0.10.0", "welcome": "0.34.0", "whitespace": "0.32.2", From a084882cb130fa6f7ffe51a88ebd140292bf4f03 Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Wed, 6 Apr 2016 19:23:26 -0400 Subject: [PATCH 07/11] :memo: Minor cleanup for the new .tar.gz archive [ci skip] --- docs/build-instructions/linux.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/build-instructions/linux.md b/docs/build-instructions/linux.md index 99b9b5afc..126604c49 100644 --- a/docs/build-instructions/linux.md +++ b/docs/build-instructions/linux.md @@ -74,19 +74,19 @@ If you have problems with permissions don't forget to prefix with `sudo` To use the newly installed Atom, quit and restart all running Atom instances. -5. *Optionally*, you may generate distributable packages of Atom at `out`. Currently, `.deb` and `.rpm` package types are supported, as well as a `tar gz` archive. To create a `.deb` package run: +5. *Optionally*, you may generate distributable packages of Atom at `out`. Currently, `.deb` and `.rpm` package types are supported, as well as a `.tar.gz` archive. To create a `.deb` package run: ```sh script/grunt mkdeb ``` - To create an `.rpm` package run + To create a `.rpm` package run ```sh script/grunt mkrpm ``` - To create a `.tar.gz` package run + To create a `.tar.gz` archive run ```sh script/grunt mktar From ffe33cb3791e1b541de5a21892ee05affbaa5b34 Mon Sep 17 00:00:00 2001 From: Lee Dohm Date: Wed, 6 Apr 2016 18:31:13 -0700 Subject: [PATCH 08/11] :arrow_up: language-perl@0.34.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d48b1f41e..c0191b551 100644 --- a/package.json +++ b/package.json @@ -134,7 +134,7 @@ "language-make": "0.21.0", "language-mustache": "0.13.0", "language-objective-c": "0.15.1", - "language-perl": "0.33.0", + "language-perl": "0.34.0", "language-php": "0.37.0", "language-property-list": "0.8.0", "language-python": "0.43.1", From b5f0f846a9cd2be8e323a104c84542563cc79aa4 Mon Sep 17 00:00:00 2001 From: Daniel Hengeveld Date: Thu, 7 Apr 2016 10:06:13 +0200 Subject: [PATCH 09/11] :arrow_up: exception-reporting@0.38.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c0191b551..19739ea2f 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "deprecation-cop": "0.54.1", "dev-live-reload": "0.47.0", "encoding-selector": "0.21.0", - "exception-reporting": "0.37.0", + "exception-reporting": "0.38.0", "find-and-replace": "0.197.4", "fuzzy-finder": "1.0.3", "git-diff": "1.0.1", From 3bff9515f79a35588e216b2fbce926e3e7fc2e10 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 7 Apr 2016 10:30:01 +0200 Subject: [PATCH 10/11] :arrow_up: find-and-replace --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 19739ea2f..f2d518d8d 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "dev-live-reload": "0.47.0", "encoding-selector": "0.21.0", "exception-reporting": "0.38.0", - "find-and-replace": "0.197.4", + "find-and-replace": "0.197.5", "fuzzy-finder": "1.0.3", "git-diff": "1.0.1", "go-to-line": "0.30.0", From c08a5c3f54e1557e7717882f17f76a0dd9f64cd7 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 7 Apr 2016 10:57:51 +0200 Subject: [PATCH 11/11] :arrow_up: spell-check --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f2d518d8d..a1f33742b 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "package-generator": "1.0.0", "settings-view": "0.235.1", "snippets": "1.0.2", - "spell-check": "0.67.0", + "spell-check": "0.67.1", "status-bar": "1.2.1", "styleguide": "0.45.2", "symbols-view": "0.112.0",