[arch-commits] Commit in atom/trunk (4 files)
Nicola Squartini
tensor5 at archlinux.org
Mon Mar 25 07:48:33 UTC 2019
Date: Monday, March 25, 2019 @ 07:48:33
Author: tensor5
Revision: 443398
upgpkg: atom 1.35.1-3
Fix some warnings and minor errors.
Added:
atom/trunk/buffer.patch
atom/trunk/no-unsafe-eval.patch
Modified:
atom/trunk/PKGBUILD
atom/trunk/use-system-electron.patch
---------------------------+
PKGBUILD | 10 ++++++--
buffer.patch | 22 +++++++++++++++++
no-unsafe-eval.patch | 11 ++++++++
use-system-electron.patch | 55 ++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 96 insertions(+), 2 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-03-25 07:47:11 UTC (rev 443397)
+++ PKGBUILD 2019-03-25 07:48:33 UTC (rev 443398)
@@ -2,7 +2,7 @@
pkgname=atom
pkgver=1.35.1
-pkgrel=2
+pkgrel=3
pkgdesc='A hackable text editor for the 21st Century'
arch=('x86_64')
url='https://github.com/atom/atom'
@@ -15,6 +15,7 @@
options=(!emptydirs)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/atom/atom/archive/v${pkgver}.tar.gz"
'atom.js'
+ 'buffer.patch'
'dugite-use-system-git.patch'
'electron-3.patch'
'fix-atom-sh.patch'
@@ -21,11 +22,13 @@
'fix-license-path.patch'
'fix-middle-click.patch'
'fix-restart.patch'
+ 'no-unsafe-eval.patch'
'symbols-view-use-system-ctags.patch'
'use-system-apm.patch'
'use-system-electron.patch')
sha256sums=('a50bcfcda4cfe6017fb76defc3a0eeaca209954d86a631f5963e69a0c064c2e8'
'cdf87ab82cfcf69e8904684c59b08c35a68540ea16ab173fce06037ac341efcd'
+ '971e4575884a0d1bf4683b5c6402a3d6059e41345cc09db83df5a0a30ad41bb6'
'530b46d31df0f5e8f5881e1608a66fe75d549092a6db2e72ba3ad69c48714153'
'328da3b30f4e20e56b38e588d9fe871c01bbbe69865a79e9586919564bdfa869'
'ab9eed3d4c8bfefea256953428379ab1e636b9c7d4c4af30ddc3f485330183c2'
@@ -32,18 +35,21 @@
'5c77deec5896b658395bdf695c3bc044c9140ad0a5a87f34520c4a31972e51d1'
'142d540259296396f6d528ecf2f7c6a363f89f8a0d2ad66497f8392da06202bc'
'c4b883265d16ee30402c449d07be78b7088c1aa60c4f3e712b8bfe857c95f346'
+ '4033929dde0b81bb6f174cc4c79050474afaf85b54b928bfe13e05059448ebb1'
'3c68e6b3751313e1d386e721f8f819fb051351fb2cf8e753b1d773a0f475fef8'
'53f43c9328a66e24b3467a0a06d9dfde83475f7e54251bf7a523beafaa043806'
- '457bd1b06604aec1e2ebb6e0ea473742747e183e833fffb36377aad64c37bcd5')
+ 'a78082364aca5e17595acd237f9e342027384b869974cf9ae3aebd8c23df6cc0')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}"/buffer.patch
patch -Np1 -i "${srcdir}"/fix-atom-sh.patch
patch -Np1 -i "${srcdir}"/use-system-electron.patch
patch -Np1 -i "${srcdir}"/use-system-apm.patch
patch -Np1 -i "${srcdir}"/fix-license-path.patch
patch -Np1 -i "${srcdir}"/fix-restart.patch
+ patch -Np1 -i "${srcdir}"/no-unsafe-eval.patch
# Fix for Electron 3
patch -Np1 -i "${srcdir}"/electron-3.patch
Added: buffer.patch
===================================================================
--- buffer.patch (rev 0)
+++ buffer.patch 2019-03-25 07:48:33 UTC (rev 443398)
@@ -0,0 +1,22 @@
+--- a/src/file-system-blob-store.js
++++ b/src/file-system-blob-store.js
+@@ -20,7 +20,7 @@
+
+ reset () {
+ this.inMemoryBlobs = new Map()
+- this.storedBlob = new Buffer(0)
++ this.storedBlob = Buffer.alloc(0)
+ this.storedBlobMap = {}
+ this.usedKeys = new Set()
+ }
+--- a/src/compile-cache.js
++++ b/src/compile-cache.js
+@@ -177,7 +177,7 @@
+ var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(',') + 1)
+
+ try {
+- var sourceMap = JSON.parse(new Buffer(rawData, 'base64'))
++ var sourceMap = JSON.parse(Buffer.from(rawData, 'base64'))
+ } catch (error) {
+ console.warn('Error parsing source map', error.stack)
+ return null
Added: no-unsafe-eval.patch
===================================================================
--- no-unsafe-eval.patch (rev 0)
+++ no-unsafe-eval.patch 2019-03-25 07:48:33 UTC (rev 443398)
@@ -0,0 +1,11 @@
+--- a/static/index.html
++++ b/static/index.html
+@@ -1,7 +1,7 @@
+ <!DOCTYPE html>
+ <html>
+ <head>
+- <meta http-equiv="Content-Security-Policy" content="default-src * atom://*; img-src blob: data: * atom://*; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src blob: data: mediastream: * atom://*;">
++ <meta http-equiv="Content-Security-Policy" content="default-src * atom://*; img-src blob: data: * atom://*; script-src 'self'; style-src 'self' 'unsafe-inline'; media-src blob: data: mediastream: * atom://*;">
+ <script src="index.js"></script>
+ </head>
+ <body tabindex="-1">
Modified: use-system-electron.patch
===================================================================
--- use-system-electron.patch 2019-03-25 07:47:11 UTC (rev 443397)
+++ use-system-electron.patch 2019-03-25 07:48:33 UTC (rev 443398)
@@ -155,6 +155,61 @@
}
}
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
+@@ -1,6 +1,7 @@
+ const {BrowserWindow, app, dialog, ipcMain} = require('electron')
+ const path = require('path')
+ const fs = require('fs')
++const {statSyncNoException} = require('fs-plus')
+ const url = require('url')
+ const {EventEmitter} = require('events')
+
+@@ -43,7 +44,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)
+- disableBlinkFeatures: 'Auxclick'
++ disableBlinkFeatures: 'Auxclick',
++ nodeIntegration: true
+ }
+ }
+
+@@ -159,7 +161,7 @@
+ return this.representedDirectoryPaths.some(projectPath => {
+ if (pathToCheck === projectPath) return true
+ if (!pathToCheck.startsWith(path.join(projectPath, path.sep))) return false
+- if (stat === undefined) stat = fs.statSyncNoException(pathToCheck)
++ if (stat === undefined) stat = statSyncNoException(pathToCheck)
+ return !stat || !stat.isDirectory()
+ })
+ }
--- a/src/module-cache.js
+++ b/src/module-cache.js
@@ -227,7 +227,7 @@
More information about the arch-commits
mailing list