Date: Wednesday, July 31, 2019 @ 17:15:38 Author: tensor5 Revision: 495692
upgpkg: atom 1.39.1-1 Modified: atom/trunk/PKGBUILD atom/trunk/fix-license-path.patch atom/trunk/fix-restart.patch atom/trunk/no-unsafe-eval-warning.patch atom/trunk/node-env-production.patch atom/trunk/use-system-apm.patch atom/trunk/use-system-electron.patch Deleted: atom/trunk/electron-3.patch ------------------------------+ PKGBUILD | 23 ++--- electron-3.patch | 11 -- fix-license-path.patch | 22 ++-- fix-restart.patch | 14 +-- no-unsafe-eval-warning.patch | 10 +- node-env-production.patch | 12 +- use-system-apm.patch | 41 +++++---- use-system-electron.patch | 183 ++++++++++++++++++----------------------- 8 files changed, 143 insertions(+), 173 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2019-07-31 17:15:18 UTC (rev 495691) +++ PKGBUILD 2019-07-31 17:15:38 UTC (rev 495692) @@ -1,8 +1,8 @@ # Maintainer: Nicola Squartini <tens...@gmail.com> pkgname=atom -pkgver=1.38.2 -pkgrel=2 +pkgver=1.39.1 +pkgrel=1 pkgdesc='A hackable text editor for the 21st Century' arch=('x86_64') url='https://github.com/atom/atom' @@ -16,7 +16,6 @@ source=("${pkgname}-${pkgver}.tar.gz::https://github.com/atom/atom/archive/v${pkgver}.tar.gz" 'atom.js' 'dugite-use-system-git.patch' - 'electron-3.patch' 'fix-atom-sh.patch' 'fix-license-path.patch' 'fix-restart.patch' @@ -25,18 +24,17 @@ 'symbols-view-use-system-ctags.patch' 'use-system-apm.patch' 'use-system-electron.patch') -sha256sums=('b78c83975d9626752e05b14a27e5ad1bba623e887082e1c6f056902fd3fa7207' +sha256sums=('5ed505b8d917d639c67b35d232867f456f7734a19a52867d3b8ddcb9ab89331d' 'd286e0766e47cfea73cd207abb9d6f7375846688823e72732c871a852b4b261d' '530b46d31df0f5e8f5881e1608a66fe75d549092a6db2e72ba3ad69c48714153' - '75a672adc0237ea8c93ff67d8296eb73b87792b7b58cdaef7bf596fb6edd073f' 'b3d3706519556a59ba557b695017c9debe8b23efe2782cdb440131520bc0540d' - '0ffc18cdb458f6eee97a41c34c0d91103ce1579ec3d6a4067be5556977c189f5' - '5a52859d5ceaa6f9d26fa657d6d728dee6e24684914cfc1d5736ccd9793fb86a' - 'bb474831629575636b1129e9f5e64c72a62926757b4b85f0c51b47b91fffd6ae' - '85612ba035047b8599692ce458b903ef2204995e102b3ff47dc05923d6c2e7d8' + '2894cce31935d45291c5fe4c625473bb83fc51e1b899f162aa6b419491c7ace1' + 'e3c30c03006d23a72f07fa77f4309b16a6059af1179343033a87f74f50124076' + '7015f16485bb63b53b306357faa39fc2d8b9c9920ce631e15cc559475ea8572b' + '27aa7e032e45728d4012a1c8de05a1f7146882bdd28cae4bcbe096fc38ba5255' '3c68e6b3751313e1d386e721f8f819fb051351fb2cf8e753b1d773a0f475fef8' - '53f43c9328a66e24b3467a0a06d9dfde83475f7e54251bf7a523beafaa043806' - 'e8f4c7514f4d20a05cf27e21aa8ace9294fa8ad45f8ced15361106f4aad708b9') + '8d48dca4571136375b325f4bf94ccfb996e90e57b7fdf83d53c1eb2e69b3b0d4' + 'ccfb472a8b09d6c3297f3c5755906c1498b6a88da88d1d356e5ff8f54dbe5355') prepare() { cd "${srcdir}/${pkgname}-${pkgver}" @@ -48,9 +46,6 @@ patch -Np1 -i "${srcdir}"/fix-restart.patch patch -Np1 -i "${srcdir}"/node-env-production.patch patch -Np1 -i "${srcdir}"/no-unsafe-eval-warning.patch - - # Fix for Electron 3 - patch -Np1 -i "${srcdir}"/electron-3.patch } build() { Deleted: electron-3.patch =================================================================== --- electron-3.patch 2019-07-31 17:15:18 UTC (rev 495691) +++ electron-3.patch 2019-07-31 17:15:38 UTC (rev 495692) @@ -1,11 +0,0 @@ ---- a/src/text-editor-component.js -+++ b/src/text-editor-component.js -@@ -4446,7 +4446,7 @@ - - if (element) { - element.className = className || '' -- element.styleMap.forEach((value, key) => { -+ element.attributeStyleMap.forEach((value, key) => { - if (!style || style[key] == null) element.style[key] = '' - }) - if (style) Object.assign(element.style, style) Modified: fix-license-path.patch =================================================================== --- fix-license-path.patch 2019-07-31 17:15:18 UTC (rev 495691) +++ fix-license-path.patch 2019-07-31 17:15:38 UTC (rev 495692) @@ -1,22 +1,22 @@ --- a/src/main-process/atom-application.js +++ b/src/main-process/atom-application.js -@@ -596,7 +596,7 @@ - this.openPathOnEvent('application:open-your-keymap', 'atom://.atom/keymap') - this.openPathOnEvent('application:open-your-snippets', 'atom://.atom/snippets') - this.openPathOnEvent('application:open-your-stylesheet', 'atom://.atom/stylesheet') -- this.openPathOnEvent('application:open-license', path.join(process.resourcesPath, 'LICENSE.md')) -+ this.openPathOnEvent('application:open-license', '/usr/share/licenses/atom/LICENSE.md') +@@ -716,7 +716,7 @@ + ); + this.openPathOnEvent( + 'application:open-license', +- path.join(process.resourcesPath, 'LICENSE.md') ++ '/usr/share/licenses/atom/LICENSE.md' + ); this.configFile.onDidChange(settings => { - for (let window of this.getAllWindows()) { --- a/src/workspace.js +++ b/src/workspace.js -@@ -1136,7 +1136,7 @@ +@@ -1300,7 +1300,7 @@ // Open Atom's license in the active pane. - openLicense () { -- return this.open(path.join(process.resourcesPath, 'LICENSE.md')) -+ return this.open('/usr/share/licenses/atom/LICENSE.md') + openLicense() { +- return this.open(path.join(process.resourcesPath, 'LICENSE.md')); ++ return this.open('/usr/share/licenses/atom/LICENSE.md'); } // Synchronously open the given URI in the active pane. **Only use this method Modified: fix-restart.patch =================================================================== --- fix-restart.patch 2019-07-31 17:15:18 UTC (rev 495691) +++ fix-restart.patch 2019-07-31 17:15:38 UTC (rev 495692) @@ -1,11 +1,11 @@ --- a/src/main-process/atom-application.js +++ b/src/main-process/atom-application.js -@@ -1656,7 +1656,7 @@ +@@ -2047,7 +2047,7 @@ } - restart () { -- const args = [] -+ const args = ['/usr/lib/atom/atom'] - if (this.safeMode) args.push('--safe') - if (this.logFile != null) args.push(`--log-file=${this.logFile}`) - if (this.userDataDir != null) args.push(`--user-data-dir=${this.userDataDir}`) + restart() { +- const args = []; ++ const args = ['/usr/lib/atom/atom']; + if (this.safeMode) args.push('--safe'); + if (this.logFile != null) args.push(`--log-file=${this.logFile}`); + if (this.userDataDir != null) Modified: no-unsafe-eval-warning.patch =================================================================== --- no-unsafe-eval-warning.patch 2019-07-31 17:15:18 UTC (rev 495691) +++ no-unsafe-eval-warning.patch 2019-07-31 17:15:38 UTC (rev 495692) @@ -1,11 +1,11 @@ --- a/static/index.js +++ b/static/index.js -@@ -16,6 +16,8 @@ - let blobStore = null - let useSnapshot = false +@@ -12,6 +12,8 @@ + let blobStore = null; + let useSnapshot = false; -+ process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true ++ process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true; + - const startupMarkers = electron.remote.getCurrentWindow().startupMarkers + const startupMarkers = electron.remote.getCurrentWindow().startupMarkers; if (startupMarkers) { Modified: node-env-production.patch =================================================================== --- node-env-production.patch 2019-07-31 17:15:18 UTC (rev 495691) +++ node-env-production.patch 2019-07-31 17:15:38 UTC (rev 495692) @@ -1,13 +1,13 @@ --- a/static/index.js +++ b/static/index.js -@@ -66,6 +66,10 @@ - snapshotResult.setGlobals(global, process, window, document, console, require) +@@ -84,6 +84,10 @@ + ); } + if (!devMode) { -+ process.env.NODE_ENV = 'production' ++ process.env.NODE_ENV = 'production'; + } + - const FileSystemBlobStore = useSnapshot ? snapshotResult.customRequire('../src/file-system-blob-store.js') : require('../src/file-system-blob-store') - blobStore = FileSystemBlobStore.load(path.join(process.env.ATOM_HOME, 'blob-store')) - + const FileSystemBlobStore = useSnapshot + ? snapshotResult.customRequire('../src/file-system-blob-store.js') + : require('../src/file-system-blob-store'); Modified: use-system-apm.patch =================================================================== --- use-system-apm.patch 2019-07-31 17:15:18 UTC (rev 495691) +++ use-system-apm.patch 2019-07-31 17:15:38 UTC (rev 495692) @@ -1,32 +1,37 @@ --- a/script/lib/run-apm-install.js +++ b/script/lib/run-apm-install.js -@@ -8,11 +8,8 @@ - const installEnv = Object.assign({}, process.env) +@@ -8,10 +8,7 @@ + const installEnv = Object.assign({}, process.env); // Set resource path so that apm can load metadata related to Atom. - installEnv.ATOM_RESOURCE_PATH = CONFIG.repositoryRootPath + installEnv.ATOM_RESOURCE_PATH = CONFIG.repositoryRootPath; - // Set our target (Electron) version so that node-pre-gyp can download the - // proper binaries. -- installEnv.npm_config_target = CONFIG.appMetadata.electronVersion - childProcess.execFileSync( -- CONFIG.getApmBinPath(), -+ 'apm', - ['--loglevel=error', ci ? 'ci' : 'install'], - {env: installEnv, cwd: packagePath, stdio: stdioOptions || 'inherit'} - ) +- installEnv.npm_config_target = CONFIG.appMetadata.electronVersion; +- childProcess.execFileSync(CONFIG.getApmBinPath(), [ci ? 'ci' : 'install'], { ++ childProcess.execFileSync('apm', [ci ? 'ci' : 'install'], { + env: installEnv, + cwd: packagePath, + stdio: stdioOptions || 'inherit' --- a/src/package-manager.js +++ b/src/package-manager.js -@@ -169,13 +169,7 @@ - return configPath || this.apmPath +@@ -194,19 +194,7 @@ + return configPath || this.apmPath; } -- const commandName = process.platform === 'win32' ? 'apm.cmd' : 'apm' -- const apmRoot = path.join(process.resourcesPath, 'app', 'apm') -- this.apmPath = path.join(apmRoot, 'bin', commandName) +- const commandName = process.platform === 'win32' ? 'apm.cmd' : 'apm'; +- const apmRoot = path.join(process.resourcesPath, 'app', 'apm'); +- this.apmPath = path.join(apmRoot, 'bin', commandName); - if (!fs.isFileSync(this.apmPath)) { -- this.apmPath = path.join(apmRoot, 'node_modules', 'atom-package-manager', 'bin', commandName) +- this.apmPath = path.join( +- apmRoot, +- 'node_modules', +- 'atom-package-manager', +- 'bin', +- commandName +- ); - } -- return this.apmPath -+ return '/usr/lib/node_modules/atom-package-manager/bin/apm' +- return this.apmPath; ++ return '/usr/lib/node_modules/atom-package-manager/bin/apm'; } // Public: Get the paths being used to look for packages. Modified: use-system-electron.patch =================================================================== --- use-system-electron.patch 2019-07-31 17:15:18 UTC (rev 495691) +++ use-system-electron.patch 2019-07-31 17:15:38 UTC (rev 495692) @@ -4,21 +4,22 @@ "url": "https://github.com/atom/atom/issues" }, "license": "MIT", -- "electronVersion": "2.0.18", +- "electronVersion": "3.1.10", "dependencies": { - "@atom/nsfw": "1.0.22", + "@atom/nsfw": "1.0.25", "@atom/source-map-support": "^0.3.4", --- a/script/build +++ b/script/build -@@ -32,7 +32,6 @@ +@@ -33,7 +33,7 @@ .wrap(yargs.terminalWidth()) .argv -const checkChromedriverVersion = require('./lib/check-chromedriver-version') ++// const checkChromedriverVersion = require('./lib/check-chromedriver-version') const cleanOutputDirectory = require('./lib/clean-output-directory') const codeSignOnMac = require('./lib/code-sign-on-mac') const codeSignOnWindows = require('./lib/code-sign-on-windows') -@@ -61,12 +60,11 @@ +@@ -63,12 +63,12 @@ }) const CONFIG = require('./config') @@ -29,10 +30,11 @@ if (!argv.existingBinaries) { - checkChromedriverVersion() ++ // checkChromedriverVersion() cleanOutputDirectory() copyAssets() transpilePackagesWithCustomTranspilerPaths() -@@ -85,67 +83,5 @@ +@@ -87,73 +87,5 @@ if (!argv.generateApiDocs) { binariesPromise @@ -43,6 +45,8 @@ - case 'darwin': { - if (argv.codeSign) { - codeSignOnMac(packagedAppPath) +- } else if (argv.testSign) { +- testSignOnMac(packagedAppPath) - } else { - console.log('Skipping code-signing. Specify the --code-sign option to perform code-signing'.gray) - } @@ -49,6 +53,10 @@ - break - } - case 'win32': { +- if (argv.testSign) { +- console.log('Test signing is not supported on Windows, skipping.'.gray) +- } +- - if (argv.codeSign) { - const executablesToSign = [ path.join(packagedAppPath, 'Atom.exe') ] - if (argv.createWindowsInstaller) { @@ -102,45 +110,45 @@ } --- a/script/lib/generate-startup-snapshot.js +++ b/script/lib/generate-startup-snapshot.js -@@ -97,7 +97,7 @@ +@@ -268,14 +268,14 @@ } else if (process.platform === 'win32') { - nodeBundledInElectronPath = path.join(packagedAppPath, 'atom.exe') + nodeBundledInElectronPath = path.join(packagedAppPath, 'atom.exe'); } else { -- nodeBundledInElectronPath = path.join(packagedAppPath, 'atom') -+ nodeBundledInElectronPath = 'electron4' +- nodeBundledInElectronPath = path.join(packagedAppPath, 'atom'); ++ nodeBundledInElectronPath = 'electron4'; } childProcess.execFileSync( nodeBundledInElectronPath, -@@ -105,6 +105,7 @@ - {env: Object.assign({}, process.env, {ELECTRON_RUN_AS_NODE: 1})} - ) - -+/* - const generatedStartupBlobPath = path.join(CONFIG.buildOutputPath, 'snapshot_blob.bin') - console.log(`Generating startup blob at "${generatedStartupBlobPath}"`) - childProcess.execFileSync( -@@ -122,5 +123,6 @@ - console.log(`Moving generated startup blob into "${startupBlobDestinationPath}"`) - fs.unlinkSync(startupBlobDestinationPath) - fs.renameSync(generatedStartupBlobPath, startupBlobDestinationPath) -+*/ - }) - } + [verifySnapshotScriptPath, snapshotScriptPath], + { env: Object.assign({}, process.env, { ELECTRON_RUN_AS_NODE: 1 }) } + ); +- ++ /* + console.log('Generating startup blob with mksnapshot'); + childProcess.spawnSync(process.execPath, [ + path.join( +@@ -317,5 +317,6 @@ + destinationPath + ); + } ++ */ + }); + }; --- a/script/package.json +++ b/script/package.json -@@ -9,9 +9,7 @@ +@@ -10,9 +10,7 @@ "coffeelint": "1.15.7", "colors": "1.1.2", "donna": "1.0.16", -- "electron-chromedriver": "~2.0", +- "electron-chromedriver": "^3.0.0", "electron-link": "0.4.0", -- "electron-mksnapshot": "~2.0", - "electron-packager": "7.3.0", +- "electron-mksnapshot": "^3.1.10", + "electron-packager": "12.2.0", "electron-winstaller": "2.6.4", - "eslint-config-standard": "^12.0.0", + "eslint": "^5.16.0", --- a/src/compile-cache.js +++ b/src/compile-cache.js -@@ -122,7 +122,7 @@ exports.install = function (resourcesPath, nodeRequire) { +@@ -138,7 +138,7 @@ exports.install = function(resourcesPath, nodeRequire) { return { column, line: row, @@ -147,38 +155,11 @@ - source: path.join(resourcesPath, 'app', 'static', relativePath), + source: path.join(resourcesPath, 'static', relativePath), name: null - } + }; } - function getConfig () { ---- a/src/main-process/atom-protocol-handler.js -+++ b/src/main-process/atom-protocol-handler.js -@@ -1,5 +1,6 @@ - const {protocol} = require('electron') - const fs = require('fs') -+const {statSyncNoException} = require('fs-plus') - const path = require('path') - - // Handles requests with 'atom' protocol. -@@ -37,14 +38,14 @@ - let filePath - if (relativePath.indexOf('assets/') === 0) { - const assetsPath = path.join(process.env.ATOM_HOME, relativePath) -- const stat = fs.statSyncNoException(assetsPath) -+ const stat = statSyncNoException(assetsPath) - if (stat && stat.isFile()) filePath = assetsPath - } - - if (!filePath) { - for (let loadPath of this.loadPaths) { - filePath = path.join(loadPath, relativePath) -- const stat = fs.statSyncNoException(filePath) -+ const stat = statSyncNoException(filePath) - if (stat && stat.isFile()) break - } - } --- a/src/main-process/atom-window.js +++ b/src/main-process/atom-window.js -@@ -43,7 +43,8 @@ +@@ -46,7 +46,8 @@ // Disable the `auxclick` feature so that `click` events are triggered in // response to a middle-click. // (Ref: https://github.com/atom/atom/pull/12696#issuecomment-290496960) @@ -186,58 +167,58 @@ + disableBlinkFeatures: 'Auxclick', + nodeIntegration: true } - } + }; --- a/src/module-cache.js +++ b/src/module-cache.js -@@ -227,7 +227,7 @@ - } - - function registerBuiltins (devMode) { -- if (devMode || !cache.resourcePath.startsWith(`${process.resourcesPath}${path.sep}`)) { -+ if (devMode || !cache.resourcePath.startsWith('/usr/lib/atom/')) { - const fs = require('fs-plus') - const atomJsPath = path.join(cache.resourcePath, 'exports', 'atom.js') - if (fs.isFileSync(atomJsPath)) { cache.builtins.atom = atomJsPath } +@@ -270,7 +270,7 @@ + function registerBuiltins(devMode) { + if ( + devMode || +- !cache.resourcePath.startsWith(`${process.resourcesPath}${path.sep}`) ++ !cache.resourcePath.startsWith('/usr/lib/atom/') + ) { + const fs = require('fs-plus'); + const atomJsPath = path.join(cache.resourcePath, 'exports', 'atom.js'); --- a/src/package-manager.js -+++ b/src/package-manager.js -@@ -825,7 +825,7 @@ module.exports = class PackageManager { - } - - isBundledPackagePath (packagePath) { -- if (this.devMode && !this.resourcePath.startsWith(`${process.resourcesPath}${path.sep}`)) { -+ if (this.devMode && !this.resourcePath.startsWith('/usr/lib/atom/')) { - return false ++++ b/src/package-manager.js +@@ -939,7 +939,7 @@ + isBundledPackagePath(packagePath) { + if ( + this.devMode && +- !this.resourcePath.startsWith(`${process.resourcesPath}${path.sep}`) ++ !this.resourcePath.startsWith('/usr/lib/atom/') + ) { + return false; } - --- a/src/task-bootstrap.js +++ b/src/task-bootstrap.js -@@ -3,7 +3,7 @@ const [compileCachePath, taskPath] = process.argv.slice(2) +@@ -3,7 +3,7 @@ - const CompileCache = require('./compile-cache') - CompileCache.setCacheDirectory(compileCachePath) --CompileCache.install(`${process.resourcesPath}`, require) -+CompileCache.install('/usr/lib/atom', require) + const CompileCache = require('./compile-cache'); + CompileCache.setCacheDirectory(compileCachePath); +-CompileCache.install(`${process.resourcesPath}`, require); ++CompileCache.install('/usr/lib/atom', require); - const setupGlobals = function () { - global.attachEvent = function () {} + const setupGlobals = function() { + global.attachEvent = function() {}; --- a/static/index.js +++ b/static/index.js -@@ -36,7 +36,7 @@ - process.resourcesPath = path.normalize(process.resourcesPath) +@@ -39,7 +39,7 @@ + const devMode = + getWindowLoadSettings().devMode || + !getWindowLoadSettings().resourcePath.startsWith( +- process.resourcesPath + path.sep ++ '/usr/lib/atom' + ); + useSnapshot = !devMode && typeof snapshotResult !== 'undefined'; - setupAtomHome() -- const devMode = getWindowLoadSettings().devMode || !getWindowLoadSettings().resourcePath.startsWith(process.resourcesPath + path.sep) -+ const devMode = getWindowLoadSettings().devMode || !getWindowLoadSettings().resourcePath.startsWith('/usr/lib/atom') - useSnapshot = !devMode && typeof snapshotResult !== 'undefined' +@@ -133,7 +133,7 @@ + ? snapshotResult.customRequire('../src/compile-cache.js') + : require('../src/compile-cache'); + CompileCache.setAtomHomeDirectory(process.env.ATOM_HOME); +- CompileCache.install(process.resourcesPath, require); ++ CompileCache.install('/usr/lib/atom', require); - if (devMode) { -@@ -107,7 +107,7 @@ - function setupWindow () { - const CompileCache = useSnapshot ? snapshotResult.customRequire('../src/compile-cache.js') : require('../src/compile-cache') - CompileCache.setAtomHomeDirectory(process.env.ATOM_HOME) -- CompileCache.install(process.resourcesPath, require) -+ CompileCache.install('/usr/lib/atom', require) - - const ModuleCache = useSnapshot ? snapshotResult.customRequire('../src/module-cache.js') : require('../src/module-cache') - ModuleCache.register(getWindowLoadSettings()) + const ModuleCache = useSnapshot + ? snapshotResult.customRequire('../src/module-cache.js')