diff options
author | Narrat | 2020-01-18 23:01:59 +0100 |
---|---|---|
committer | Narrat | 2020-01-18 23:01:59 +0100 |
commit | 8f1f8fd82adae89fb1a30bcefe287c242b80db37 (patch) | |
tree | 7adc2e67a87c2d4e567eee6575e6d4cb00c72ee4 | |
parent | 3b159d15e8013c70e651ff90594b2af4b400ea4d (diff) | |
download | aur-8f1f8fd82adae89fb1a30bcefe287c242b80db37.tar.gz |
sync with community atom
-rw-r--r-- | .SRCINFO | 52 | ||||
-rw-r--r-- | PKGBUILD | 239 | ||||
-rw-r--r-- | atom.desktop | 10 | ||||
-rw-r--r-- | atom.js | 2 | ||||
-rw-r--r-- | electron-3.patch | 11 | ||||
-rw-r--r-- | fix-atom-sh.patch | 46 | ||||
-rw-r--r-- | fix-license-path.patch | 22 | ||||
-rw-r--r-- | fix-middle-click.patch | 21 | ||||
-rw-r--r-- | fix-restart.patch | 14 | ||||
-rw-r--r-- | git-utils.patch | 11 | ||||
-rw-r--r-- | no-unsafe-eval-warning.patch | 11 | ||||
-rw-r--r-- | node-env-production.patch | 13 | ||||
-rw-r--r-- | symbols-view-use-system-ctags.patch | 3 | ||||
-rw-r--r-- | use-system-apm.patch | 41 | ||||
-rw-r--r-- | use-system-electron.patch | 207 |
15 files changed, 380 insertions, 323 deletions
@@ -1,47 +1,45 @@ pkgbase = atom-editor-git - pkgdesc = Hackable text editor for the 21st Century - git channel. - pkgver = 1.6.0.beta0.r8343.g3a046f511 + pkgdesc = Hackable text editor for the 21st Century - git channel + pkgver = 1.6.0.beta0.r9796.g48ca032eb pkgrel = 1 url = https://atom.io/ arch = x86_64 - arch = i686 - license = MIT, + license = MIT license = custom - depends = gconf - depends = nodejs - depends = npm - depends = libsecret - depends = python2 - depends = libx11 - depends = libxkbfile - depends = electron + makedepends = git + makedepends = npm depends = apm - optdepends = gvfs: file deletion support + depends = electron4 + depends = libxkbfile + depends = ripgrep optdepends = ctags: symbol indexing support - source = atom-editor-git::git+https://github.com/atom/atom.git - source = atom.desktop + optdepends = git: Git and GitHub integration + replaces = atom-editor + options = !emptydirs + source = git+https://github.com/atom/atom.git source = atom.js source = dugite-use-system-git.patch - source = electron-3.patch source = fix-atom-sh.patch source = fix-license-path.patch - source = fix-middle-click.patch source = fix-restart.patch + source = git-utils.patch + source = no-unsafe-eval-warning.patch + source = node-env-production.patch source = symbols-view-use-system-ctags.patch source = use-system-apm.patch source = use-system-electron.patch sha256sums = SKIP - sha256sums = bce0b6ac4a3d083db3b953d89489947867df5832deea876cc8c4725399b1de9d - sha256sums = cdf87ab82cfcf69e8904684c59b08c35a68540ea16ab173fce06037ac341efcd + sha256sums = d286e0766e47cfea73cd207abb9d6f7375846688823e72732c871a852b4b261d sha256sums = 530b46d31df0f5e8f5881e1608a66fe75d549092a6db2e72ba3ad69c48714153 - sha256sums = b0b87bcbcfeff809fbc45b56bcf77efe26d6a2091f161a6d10c19e60b5cbc4cf - sha256sums = ab9eed3d4c8bfefea256953428379ab1e636b9c7d4c4af30ddc3f485330183c2 - sha256sums = c8a931f36af3722c57c4d1b70c1e58aa1a18372e8e26c28a4e01253e05295205 - sha256sums = bacc817e57980e483485d8ed12b70aae58902202d299828ce7bbc4df0c71a790 - sha256sums = 1f48c84f30ffefaef7235d8231af7357b801d66de9f09921d0ee0dd5849595ca - sha256sums = f1080f8a5fe0fb667989bf4bab698e97014ef43a139c3aa9eb677fe526f1aa5e - sha256sums = 32e27c6245237a794b15eaf7dbfb81196455865af8ed9157aca763ed21a2fef3 - sha256sums = e78a91f0d042cbea47bbe9992913a38ebaaf943fcfca9ec71a60edf6ac1a207b + sha256sums = b3d3706519556a59ba557b695017c9debe8b23efe2782cdb440131520bc0540d + sha256sums = 2894cce31935d45291c5fe4c625473bb83fc51e1b899f162aa6b419491c7ace1 + sha256sums = e3c30c03006d23a72f07fa77f4309b16a6059af1179343033a87f74f50124076 + sha256sums = e321fdfe880cd465918dd1dbb90e4c7d46fc5310f20666eddf0a41cbca4f8ac8 + sha256sums = 40d783794d62f12f3c429c624a84265871c7ed95f4120c9db800348896dd5437 + sha256sums = a09439c2a908ca174ff3be1f0d85071d12c792ae19748e36fe601e372d6d925b + sha256sums = 3c68e6b3751313e1d386e721f8f819fb051351fb2cf8e753b1d773a0f475fef8 + sha256sums = 8d48dca4571136375b325f4bf94ccfb996e90e57b7fdf83d53c1eb2e69b3b0d4 + sha256sums = 81af763f05c1afd87705b8c7a6647e35f524b2e952adb2e596de2a7e8fe4e69e pkgname = atom-editor-git @@ -1,125 +1,154 @@ -# Maintainer: Aaron McDaniel (mcd1992) <'aur' at the domain 'fgthou.se'> +# Contributor: Aaron McDaniel (mcd1992) <'aur' at the domain 'fgthou.se'> # Contributor: Matheus de Alcantara <matheus.de.alcantara@gmail.com> # Contributor: Brenton Horne <brentonhorne77 at gmail dot com> # Contributor: Nicola Squartini <tensor5@gmail.com> +_name=atom pkgname=atom-editor-git -pkgver=1.6.0.beta0.r8343.g3a046f511 +pkgver=1.35.0.r1175.g48ca032eb pkgrel=1 -pkgdesc='Hackable text editor for the 21st Century - git channel.' +pkgdesc='Hackable text editor for the 21st Century - git channel' +arch=('x86_64') url="https://atom.io/" -arch=('x86_64' 'i686') -license=('MIT', 'custom') -depends=('gconf' 'nodejs' 'npm' 'libsecret' 'python2' 'libx11' 'libxkbfile' 'electron' 'apm') -optdepends=('gvfs: file deletion support' - 'ctags: symbol indexing support') -source=( - "${pkgname}::git+https://github.com/atom/atom.git" - 'atom.desktop' - 'atom.js' - 'dugite-use-system-git.patch' - 'electron-3.patch' - 'fix-atom-sh.patch' - 'fix-license-path.patch' - 'fix-middle-click.patch' - 'fix-restart.patch' - 'symbols-view-use-system-ctags.patch' - 'use-system-apm.patch' - 'use-system-electron.patch' -) -sha256sums=( - 'SKIP' # git repo - 'bce0b6ac4a3d083db3b953d89489947867df5832deea876cc8c4725399b1de9d' # atom.desktop - 'cdf87ab82cfcf69e8904684c59b08c35a68540ea16ab173fce06037ac341efcd' # atom.js - '530b46d31df0f5e8f5881e1608a66fe75d549092a6db2e72ba3ad69c48714153' # dugite-use-system-git.patch - 'b0b87bcbcfeff809fbc45b56bcf77efe26d6a2091f161a6d10c19e60b5cbc4cf' # electron-3.patch - 'ab9eed3d4c8bfefea256953428379ab1e636b9c7d4c4af30ddc3f485330183c2' # fix-atom-sh.patch - 'c8a931f36af3722c57c4d1b70c1e58aa1a18372e8e26c28a4e01253e05295205' # fix-license-path.patch - 'bacc817e57980e483485d8ed12b70aae58902202d299828ce7bbc4df0c71a790' # fix-middle-click.patch - '1f48c84f30ffefaef7235d8231af7357b801d66de9f09921d0ee0dd5849595ca' # fix-restart.patch - 'f1080f8a5fe0fb667989bf4bab698e97014ef43a139c3aa9eb677fe526f1aa5e' # symbols-view-use-system-ctags.patch - '32e27c6245237a794b15eaf7dbfb81196455865af8ed9157aca763ed21a2fef3' # use-system-apm.patch - 'e78a91f0d042cbea47bbe9992913a38ebaaf943fcfca9ec71a60edf6ac1a207b' # use-system-electron.patch -) +license=('MIT' 'custom') +depends=('apm' 'electron4' 'libxkbfile' 'ripgrep') +makedepends=('git' 'npm') +optdepends=('ctags: symbol indexing support' + 'git: Git and GitHub integration') +replaces=('atom-editor') +options=(!emptydirs) +source=("git+https://github.com/atom/atom.git" + 'atom.js' + 'dugite-use-system-git.patch' + 'fix-atom-sh.patch' + 'fix-license-path.patch' + 'fix-restart.patch' + 'git-utils.patch' + 'no-unsafe-eval-warning.patch' + 'node-env-production.patch' + 'symbols-view-use-system-ctags.patch' + 'use-system-apm.patch' + 'use-system-electron.patch') +sha256sums=('SKIP' + 'd286e0766e47cfea73cd207abb9d6f7375846688823e72732c871a852b4b261d' + '530b46d31df0f5e8f5881e1608a66fe75d549092a6db2e72ba3ad69c48714153' + 'b3d3706519556a59ba557b695017c9debe8b23efe2782cdb440131520bc0540d' + '2894cce31935d45291c5fe4c625473bb83fc51e1b899f162aa6b419491c7ace1' + 'e3c30c03006d23a72f07fa77f4309b16a6059af1179343033a87f74f50124076' + 'e321fdfe880cd465918dd1dbb90e4c7d46fc5310f20666eddf0a41cbca4f8ac8' + '40d783794d62f12f3c429c624a84265871c7ed95f4120c9db800348896dd5437' + 'a09439c2a908ca174ff3be1f0d85071d12c792ae19748e36fe601e372d6d925b' + '3c68e6b3751313e1d386e721f8f819fb051351fb2cf8e753b1d773a0f475fef8' + '8d48dca4571136375b325f4bf94ccfb996e90e57b7fdf83d53c1eb2e69b3b0d4' + '81af763f05c1afd87705b8c7a6647e35f524b2e952adb2e596de2a7e8fe4e69e') + + pkgver() { - cd ${pkgname} + cd ${_name} # Remove 'v' prefix on tags; prefix revision with 'r'; replace all '-' with '.' - git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } prepare() { - cd ${pkgname} - - # When a piece of software requires this many downstream patches... - # I think its time to move on to a different editor... - 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}"/electron-3.patch + cd ${_name} + + patch -Np1 -i ../fix-atom-sh.patch + patch -Np1 -i ../use-system-electron.patch + patch -Np1 -i ../use-system-apm.patch + patch -Np1 -i ../fix-license-path.patch + patch -Np1 -i ../fix-restart.patch + patch -Np1 -i ../node-env-production.patch + patch -Np1 -i ../no-unsafe-eval-warning.patch } build() { - cd ${pkgname} - - # Fix for Electron 3 - npm install --package-lock-only @atom/nsfw@1.0.20 node-abi - - ATOM_RESOURCE_PATH="${PWD}" npm_config_target=$(tail -c +2 /usr/lib/electron/version) apm install - - # Use system ctags - cd "${srcdir}/${pkgname}/node_modules/symbols-view" - patch -Np1 -i "${srcdir}"/symbols-view-use-system-ctags.patch - rm -r vendor - - # Use system git - cd "${srcdir}/${pkgname}/node_modules/dugite" - patch -Np1 -i "${srcdir}"/dugite-use-system-git.patch - rm -rf git - - # Fix middle click - # https://bugs.archlinux.org/task/61047 - cd "${srcdir}/${pkgname}/node_modules/tabs" - patch -Np1 -i "${srcdir}"/fix-middle-click.patch - - cd "${srcdir}/${pkgname}/script" + cd ${_name} + + ATOM_RESOURCE_PATH="${PWD}" \ + npm_config_build_from_source=true \ + npm_config_target=$(< /usr/lib/electron4/version) \ + apm install + + # Use system ctags + cd node_modules/symbols-view + patch -Np1 -i "${srcdir}"/symbols-view-use-system-ctags.patch + rm -r vendor + cd ../.. + + # Use system git + cd node_modules/dugite + patch -Np1 -i "${srcdir}"/dugite-use-system-git.patch + rm -r git + cd ../.. + + # Fix issue with: + # build/Release/git.node: undefined symbol: git_net_url_is_default_port + cd node_modules/git-utils + patch -Np1 -i "${srcdir}"/git-utils.patch + env \ + npm_config_disturl=https://electronjs.org/headers \ + npm_config_runtime=electron \ + npm_config_target=$(< /usr/lib/electron4/version) \ + node-gyp rebuild + cd ../.. + + cd script + # Hack to avoid using Node 12 + env \ + npm_config_disturl=https://electronjs.org/headers \ + npm_config_runtime=electron \ + npm_config_target=$(< /usr/lib/electron4/version) \ npm install - ./build + # Set ELECTRON_VERSION (see use-system-electron.patch) + env \ + ELECTRON_RUN_AS_NODE=1 \ + ELECTRON_VERSION=$(< /usr/lib/electron4/version) \ + electron4 \ + build --no-bootstrap } package() { - cd ${pkgname} - - install -d -m 755 "${pkgdir}"/usr/lib - cp -r out/app "${pkgdir}"/usr/lib/atom - install -m 644 out/startup.js "${pkgdir}"/usr/lib/atom - install -m 755 "${srcdir}/atom.js" "${pkgdir}"/usr/lib/atom/atom - install -d -m 755 "${pkgdir}/usr/share/applications" - install -m 644 "${srcdir}/atom.desktop" "${pkgdir}/usr/share/applications/atom.desktop" - - for size in 16 24 32 48 64 128 256 512 1024; do - install -D -m 644 resources/app-icons/stable/png/${size}.png \ - "${pkgdir}"/usr/share/icons/hicolor/${size}x${size}/apps/atom.png - done - ln -sf ../../../share/icons/hicolor/1024x1024/apps/atom.png \ - "${pkgdir}"/usr/lib/atom/resources/atom.png - - install -D -m 755 atom.sh "${pkgdir}/usr/bin/atom" - - install -d -m 755 "${pkgdir}/usr/share/licenses/${pkgname}" - node -e "require('./script/lib/get-license-text')().then((licenseText) => require('fs').writeFileSync('${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md', licenseText))" - - # Remove useless stuff - find "${pkgdir}"/usr/lib/atom/node_modules \ - -name "*.a" -exec rm '{}' \; \ - -or -name "*.bat" -exec rm '{}' \; \ - -or -name "*.node" -exec chmod a-x '{}' \; \ - -or -name "benchmark" -prune -exec rm -r '{}' \; \ - -or -name "doc" -prune -exec rm -r '{}' \; \ - -or -name "html" -prune -exec rm -r '{}' \; \ - -or -name "man" -prune -exec rm -r '{}' \; \ - -or -name "scripts" -prune -exec rm -r '{}' \; \ - -or -path "*/less/gradle" -prune -exec rm -r '{}' \; \ - -or -path "*/task-lists/src" -prune -exec rm -r '{}' \; + cd ${_name} + + install -d -m 755 "${pkgdir}"/usr/lib + cp -r out/app "${pkgdir}"/usr/lib/atom + install -m 644 out/startup.js "${pkgdir}"/usr/lib/atom + install -m 755 "${srcdir}/atom.js" "${pkgdir}"/usr/lib/atom/atom + + ln -sf /usr/bin/rg "${pkgdir}/usr/lib/atom/node_modules/vscode-ripgrep/bin/rg" + + install -d -m 755 "${pkgdir}/usr/share/applications" + sed -e "s|<%= appName %>|Atom|" \ + -e "s/<%= description %>/${pkgdesc}/" \ + -e "s|<%= installDir %>|/usr|" \ + -e "s|<%= appFileName %>|atom|" \ + -e "s|<%= iconPath %>|atom|" \ + resources/linux/atom.desktop.in > "${pkgdir}/usr/share/applications/atom.desktop" + + for size in 16 24 32 48 64 128 256 512 1024; do + install -D -m 644 resources/app-icons/stable/png/${size}.png \ + "${pkgdir}"/usr/share/icons/hicolor/${size}x${size}/apps/atom.png + done + ln -sf ../../../share/icons/hicolor/1024x1024/apps/atom.png \ + "${pkgdir}"/usr/lib/atom/resources/atom.png + + install -D -m 755 atom.sh "${pkgdir}/usr/bin/atom" + + install -d -m 755 "${pkgdir}/usr/share/licenses/${pkgname}" + node -e "require('./script/lib/get-license-text')().then((licenseText) => require('fs').writeFileSync('${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md', licenseText))" + + # Remove useless stuff + find "${pkgdir}"/usr/lib/atom/node_modules \ + -name "*.a" -exec rm '{}' \; \ + -or -name "*.bat" -exec rm '{}' \; \ + -or -name "*.c" -exec rm '{}' \; \ + -or -name "*.cpp" -exec rm '{}' \; \ + -or -name "*.node" -exec chmod a-x '{}' \; \ + -or -name "benchmark" -prune -exec rm -r '{}' \; \ + -or -name "doc" -prune -exec rm -r '{}' \; \ + -or -name "html" -prune -exec rm -r '{}' \; \ + -or -name "man" -prune -exec rm -r '{}' \; \ + -or -name "scripts" -prune -exec rm -r '{}' \; \ + -or -path "*/less/gradle" -prune -exec rm -r '{}' \; \ + -or -path "*/task-lists/src" -prune -exec rm -r '{}' \; } diff --git a/atom.desktop b/atom.desktop deleted file mode 100644 index 24d15145e457..000000000000 --- a/atom.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=Atom Git -Comment=Hackable text editor for the 21st Century - git -GenericName=Text Editor -Exec=/usr/bin/atom %U -Icon=atom -Type=Application -StartupNotify=true -Categories=GTK;Utility;TextEditor;Development; -MimeType=application/javascript;application/json;application/x-desktop;application/x-httpd-eruby;application/x-httpd-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/x-ruby;application/x-bash;application/x-csh;application/x-sh;application/x-zsh;application/x-shellscript;application/x-sql;application/x-tcl;application/xhtml+xml;application/xml;application/xml-dtd;application/xslt+xml;text/coffeescript;text/css;text/html;text/plain;text/xml;text/xml-dtd;text/x-bash;text/x-c++;text/x-c++hdr;text/x-c++src;text/x-c;text/x-chdr;text/x-csh;text/x-csrc;text/x-dsrc;text/x-diff;text/x-go;text/x-java;text/x-java-source;text/x-makefile;text/x-markdown;text/x-objc;text/x-perl;text/x-php;text/x-python;text/x-ruby;text/x-sh;text/x-zsh;text/yaml;inode/directory; @@ -1,4 +1,4 @@ -#!/usr/bin/electron +#!/usr/bin/electron4 const name = "atom"; diff --git a/electron-3.patch b/electron-3.patch deleted file mode 100644 index 4e88230f6966..000000000000 --- a/electron-3.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/text-editor-component.js -+++ b/src/text-editor-component.js -@@ -4433,7 +4433,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)
\ No newline at end of file diff --git a/fix-atom-sh.patch b/fix-atom-sh.patch index 6d7106a9b316..98d294918a28 100644 --- a/fix-atom-sh.patch +++ b/fix-atom-sh.patch @@ -27,10 +27,10 @@ - ;; -esac - - export ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT=true - - while getopts ":wtfvh-:" opt; do -@@ -65,95 +41,19 @@ + # Only set the ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT env var if it hasn't been set. + if [ -z "$ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT" ] + then +@@ -90,105 +66,24 @@ ATOM_HOME="${ATOM_HOME:-$HOME/.atom}" mkdir -p "$ATOM_HOME" @@ -52,7 +52,12 @@ - if [ ! -z "${ATOM_APP_NAME}" ]; then - # If ATOM_APP_NAME is known, use it as the executable name - ATOM_EXECUTABLE_NAME="${ATOM_APP_NAME%.*}" -- else ++if [ $EXPECT_OUTPUT ]; then ++ "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" ++ ATOM_EXIT=$? ++ if [ ${ATOM_EXIT} -eq 0 ] && [ -n "${EXIT_CODE_OVERRIDE}" ]; then ++ exit "${EXIT_CODE_OVERRIDE}" + else - # Else choose it from the inferred channel name - if [ "$CHANNEL" == 'beta' ]; then - ATOM_EXECUTABLE_NAME="Atom Beta" @@ -81,11 +86,17 @@ - exit 1 - fi - fi -- fi ++ exit ${ATOM_EXIT} + fi - - if [ $EXPECT_OUTPUT ]; then - "$ATOM_PATH/$ATOM_APP_NAME/Contents/MacOS/$ATOM_EXECUTABLE_NAME" --executed-from="$(pwd)" --pid=$$ "$@" -- exit $? +- ATOM_EXIT=$? +- if [ ${ATOM_EXIT} -eq 0 ] && [ -n "${EXIT_CODE_OVERRIDE}" ]; then +- exit "${EXIT_CODE_OVERRIDE}" +- else +- exit ${ATOM_EXIT} +- fi - else - open -a "$ATOM_PATH/$ATOM_APP_NAME" -n --args --executed-from="$(pwd)" --pid=$$ --path-environment="$PATH" "$@" - fi @@ -114,15 +125,12 @@ - - if [ $EXPECT_OUTPUT ]; then - "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" -+if [ $EXPECT_OUTPUT ]; then -+ "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" -+ exit $? -+else -+ ( -+ nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1 -+ if [ $? -ne 0 ]; then -+ cat "$ATOM_HOME/nohup.out" - exit $? +- ATOM_EXIT=$? +- if [ ${ATOM_EXIT} -eq 0 ] && [ -n "${EXIT_CODE_OVERRIDE}" ]; then +- exit "${EXIT_CODE_OVERRIDE}" +- else +- exit ${ATOM_EXIT} +- fi - else - ( - nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1 @@ -131,6 +139,12 @@ - exit $? - fi - ) & ++else ++ ( ++ nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1 ++ if [ $? -ne 0 ]; then ++ cat "$ATOM_HOME/nohup.out" ++ exit $? fi + ) & fi diff --git a/fix-license-path.patch b/fix-license-path.patch index 4580353b9126..ecffc1eb0cab 100644 --- a/fix-license-path.patch +++ b/fix-license-path.patch @@ -1,22 +1,22 @@ --- a/src/main-process/atom-application.js +++ b/src/main-process/atom-application.js -@@ -416,7 +416,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 -@@ -1132,7 +1132,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 diff --git a/fix-middle-click.patch b/fix-middle-click.patch deleted file mode 100644 index d1e3dfd93852..000000000000 --- a/fix-middle-click.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 82e767bfafcc882f3c3811bb9eb008b8f7c2c731 Mon Sep 17 00:00:00 2001 -From: Mario Pilz <mario@pilz-at.net> -Date: Fri, 21 Dec 2018 03:48:36 +0100 -Subject: [PATCH] Fix tab close on middle click for Electron 3 - ---- - lib/tab-bar-view.coffee | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/lib/tab-bar-view.coffee b/lib/tab-bar-view.coffee -index 93e958e..2b91ad6 100644 ---- a/lib/tab-bar-view.coffee -+++ b/lib/tab-bar-view.coffee -@@ -87,6 +87,7 @@ class TabBarView - - @element.addEventListener "mousedown", @onMouseDown.bind(this) - @element.addEventListener "click", @onClick.bind(this) -+ @element.addEventListener "auxclick", @onClick.bind(this) - @element.addEventListener "dblclick", @onDoubleClick.bind(this) - - @onDropOnOtherWindow = @onDropOnOtherWindow.bind(this)
\ No newline at end of file diff --git a/fix-restart.patch b/fix-restart.patch index 5f5d18def99d..c12d3346157f 100644 --- a/fix-restart.patch +++ b/fix-restart.patch @@ -1,11 +1,11 @@ --- a/src/main-process/atom-application.js +++ b/src/main-process/atom-application.js -@@ -1350,7 +1350,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.socketPath != null) args.push(`--socket-path=${this.socketPath}`) + 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) diff --git a/git-utils.patch b/git-utils.patch new file mode 100644 index 000000000000..93bb181f1d6a --- /dev/null +++ b/git-utils.patch @@ -0,0 +1,11 @@ +--- a/binding.gyp ++++ b/binding.gyp +@@ -162,6 +162,8 @@ + 'deps/libgit2/src/message.h', + 'deps/libgit2/src/mwindow.c', + 'deps/libgit2/src/mwindow.h', ++ 'deps/libgit2/src/net.c', ++ 'deps/libgit2/src/net.h', + 'deps/libgit2/src/netops.c', + 'deps/libgit2/src/netops.h', + 'deps/libgit2/src/notes.c', diff --git a/no-unsafe-eval-warning.patch b/no-unsafe-eval-warning.patch new file mode 100644 index 000000000000..c54d91a18718 --- /dev/null +++ b/no-unsafe-eval-warning.patch @@ -0,0 +1,11 @@ +--- a/static/index.js ++++ b/static/index.js +@@ -13,6 +13,8 @@ + let blobStore = null; + let useSnapshot = false; + ++ process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true; ++ + const startupMarkers = electron.remote.getCurrentWindow().startupMarkers; + + if (startupMarkers) { diff --git a/node-env-production.patch b/node-env-production.patch new file mode 100644 index 000000000000..1d2904b49313 --- /dev/null +++ b/node-env-production.patch @@ -0,0 +1,13 @@ +--- a/static/index.js ++++ b/static/index.js +@@ -85,6 +85,10 @@ + ); + } + ++ if (!devMode) { ++ process.env.NODE_ENV = 'production'; ++ } ++ + const FileSystemBlobStore = useSnapshot + ? snapshotResult.customRequire('../src/file-system-blob-store.js') + : require('../src/file-system-blob-store'); diff --git a/symbols-view-use-system-ctags.patch b/symbols-view-use-system-ctags.patch index ed9251e83efc..cd9ff5e2dcd4 100644 --- a/symbols-view-use-system-ctags.patch +++ b/symbols-view-use-system-ctags.patch @@ -7,4 +7,5 @@ - const command = path.join(packageRoot, 'vendor', `ctags-${process.platform}`); + const command = 'ctags'; const defaultCtagsFile = path.join(packageRoot, 'lib', 'ctags-config'); - const args = [`--options=${defaultCtagsFile}`, '--fields=+KS'];
\ No newline at end of file + const args = [`--options=${defaultCtagsFile}`, '--fields=+KS']; + diff --git a/use-system-apm.patch b/use-system-apm.patch index 04246bd0416d..9cbcf8c75fb6 100644 --- a/use-system-apm.patch +++ b/use-system-apm.patch @@ -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 -@@ -167,13 +167,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. diff --git a/use-system-electron.patch b/use-system-electron.patch index a37f6bab44eb..2cbc8b94e495 100644 --- a/use-system-electron.patch +++ b/use-system-electron.patch @@ -4,41 +4,38 @@ "url": "https://github.com/atom/atom/issues" }, "license": "MIT", -- "electronVersion": "2.0.16", +- "electronVersion": "4.2.7", "dependencies": { - "@atom/nsfw": "1.0.18", + "@atom/nsfw": "1.0.26", "@atom/source-map-support": "^0.3.4", --- a/script/build +++ b/script/build -@@ -2,10 +2,6 @@ - - 'use strict' - --// Run bootstrap first to ensure all the dependencies used later in this script --// are installed. --require('./bootstrap') -- - // Needed so we can require src/module-cache.coffee during generateModuleCache - require('coffee-script/register') - require('colors') -@@ -28,7 +24,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') -@@ -60,7 +55,6 @@ +@@ -63,12 +63,12 @@ + }) + + const CONFIG = require('./config') +-process.env.ELECTRON_VERSION = CONFIG.appMetadata.electronVersion ++// process.env.ELECTRON_VERSION = CONFIG.appMetadata.electronVersion + let binariesPromise = Promise.resolve() - + if (!argv.existingBinaries) { - checkChromedriverVersion() ++ // checkChromedriverVersion() cleanOutputDirectory() copyAssets() transpilePackagesWithCustomTranspilerPaths() -@@ -79,67 +73,5 @@ - +@@ -87,73 +87,5 @@ + if (!argv.generateApiDocs) { binariesPromise - .then(packageApplication) @@ -48,16 +45,22 @@ - 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) - } - 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') ] +- const executablesToSign = [ path.join(packagedAppPath, CONFIG.executableName) ] - if (argv.createWindowsInstaller) { -- executablesToSign.push(path.join(__dirname, 'node_modules', 'electron-winstaller', 'vendor', 'Update.exe')) +- executablesToSign.push(path.join(__dirname, 'node_modules', '@atom', 'electron-winstaller', 'vendor', 'Squirrel.exe')) - } - codeSignOnWindows(executablesToSign) - } else { @@ -107,104 +110,118 @@ } --- a/script/lib/generate-startup-snapshot.js +++ b/script/lib/generate-startup-snapshot.js -@@ -89,7 +89,7 @@ - } else if (process.platform === 'win32') { - nodeBundledInElectronPath = path.join(packagedAppPath, 'atom.exe') +@@ -265,17 +265,14 @@ + CONFIG.executableName + ); } else { -- nodeBundledInElectronPath = path.join(packagedAppPath, 'atom') -+ nodeBundledInElectronPath = 'electron' +- nodeBundledInElectronPath = path.join( +- packagedAppPath, +- CONFIG.executableName +- ); ++ nodeBundledInElectronPath = 'electron4'; } childProcess.execFileSync( nodeBundledInElectronPath, -@@ -97,6 +97,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( -@@ -114,5 +115,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 +314,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-link": "0.2.2", -- "electron-mksnapshot": "~2.0", - "electron-packager": "7.3.0", - "electron-winstaller": "2.6.4", - "fs-admin": "^0.1.5", +- "electron-chromedriver": "^4.2.0", + "electron-link": "0.4.0", +- "electron-mksnapshot": "^4.2.0", + "electron-packager": "12.2.0", + "@atom/electron-winstaller": "0.0.1", + "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, - source: path.join(resourcesPath, 'app', 'static', relativePath), + source: path.join(resourcesPath, 'static', relativePath), name: null - } + }; } - function getConfig () { +--- a/src/main-process/atom-window.js ++++ b/src/main-process/atom-window.js +@@ -47,7 +47,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 + } + }; + --- 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 +@@ -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) - - 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 () {} +@@ -3,7 +3,7 @@ + + 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() {}; --- a/static/index.js +++ b/static/index.js -@@ -23,7 +23,7 @@ - process.resourcesPath = path.normalize(process.resourcesPath) - - 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' - - if (devMode) { -@@ -90,7 +90,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())
\ No newline at end of file +@@ -40,7 +40,7 @@ + const devMode = + getWindowLoadSettings().devMode || + !getWindowLoadSettings().resourcePath.startsWith( +- process.resourcesPath + path.sep ++ '/usr/lib/atom' + ); + useSnapshot = !devMode && typeof snapshotResult !== 'undefined'; + +@@ -134,7 +134,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); + + const ModuleCache = useSnapshot + ? snapshotResult.customRequire('../src/module-cache.js') |