Package Details: atom 1.61.0beta0-3

Git Clone URL: https://aur.archlinux.org/atom.git (read-only, click to copy)
Package Base: atom
Description: A hackable text editor for the 21st Century
Upstream URL: https://github.com/atom/atom
Licenses: MIT
Replaces: atom-editor
Submitter: alerque
Maintainer: alerque
Last Packager: alerque
Votes: 4
Popularity: 1.62
First Submitted: 2022-06-09 08:13 (UTC)
Last Updated: 2022-06-10 08:57 (UTC)

Latest Comments

dnrops commented on 2022-08-12 17:33 (UTC)

#fast way to install
git clone https://gitlab.com/andrew_ryan/atom-bin.git
cd atom-bin
yay -U ./atom-bin-1.60.0-1-x86_64.pkg.tar.zst

DAC324 commented on 2022-07-01 10:26 (UTC)

@AleyWayfer Thank you very much for pointing this out. Here is fix-crash-reporter.patch:

--- a/src/crash-reporter-start.js   2022-06-22 20:19:36.669230419 +0200
+++ b/src/crash-reporter-start.js   2022-06-22 20:19:57.235415886 +0200
@@ -12,6 +12,7 @@
     companyName: 'GitHub',
     submitURL: 'https://atom.io/crash_reports',
     parsedUploadToServer,
+    compress : true,
     extra: { platformRelease, arch, releaseChannel }
   });
 };

AlexWayfer commented on 2022-06-29 11:58 (UTC)

@DAC324 there is lack of fix-crash-reporter.patch file for your PKGBUILD.

DAC324 commented on 2022-06-27 11:02 (UTC)

After having selected Packages->Command Palette->Toggle->(search for install and select) Application: Install Update, atom simply closes. This is actually not a crash but atom silently quitting, because of the following code:

    this.on('application:install-update', () => {
     this.quitting = true;
     this.quittingForUpdate = true;
     this.autoUpdateManager.install();
    });

That line

this.autoUpdateManager.install();

actually seems to do nothing but simply quit the editor. Why?

this.autoUpdateManager.install();

calls

  install() {
    if (!this.testMode) autoUpdater.quitAndInstall();
  }

where autoupdater is calling electron itself:

  initialize() {
    if (process.platform === 'win32') {
      const archSuffix = process.arch === 'ia32' ? '' : `-${process.arch}`;
      this.feedUrl =
        this.updateUrlPrefix +
        `/api/updates${archSuffix}?version=${this.version}&os_version=${
          os.release
        }`;
      autoUpdater = require('./auto-updater-win32');
    } else {
      this.feedUrl =
        this.updateUrlPrefix +
        `/api/updates?version=${this.version}&os_version=${os.release}`;
      ({ autoUpdater } = require('electron'));
    }

Indeed, that's not very elegant to simply quit because auto updates do not seem to be supported on Linux

    switch (process.platform) {
      case 'win32':
        if (!autoUpdater.supportsUpdates()) {
          this.setState(UnsupportedState);
        }
        break;
      case 'linux':
        this.setState(UnsupportedState);
    }

but that's the way it's actually implemented :( Here's a patch that avoids this somewhat ridiculous behavior:

--- a/src/main-process/auto-update-manager.js   2022-06-24 18:26:06.425993344 +0200
+++ b/src/main-process/auto-update-manager.js   2022-06-27 12:41:17.818911759 +0200
@@ -162,7 +162,22 @@
   }

   install() {
-    if (!this.testMode) autoUpdater.quitAndInstall();
+    if (process.platform === 'win32') {
+        if (!this.testMode) autoUpdater.quitAndInstall();
+    }
+    else
+    {
+        const { dialog } = require('electron');
+        dialog.showMessageBox({
+           type: 'info',
+           buttons: ['OK'],
+           icon: this.iconPath,
+           message: 'This feature is not supported on your platform.',
+           title: 'No Update Available',
+           detail: `Automatic update download and installation not yet supported.`
+        });
+    }
+
   }

   onUpdateNotAvailable() {

DAC324 commented on 2022-06-24 13:46 (UTC) (edited on 2022-06-27 09:02 (UTC) by DAC324)

Update with regards to that dreaded undefined symbol: git_net_url_is_default_port error:

Before building atom, you will have to remove the compile caches as they contain information that will conflict with your build. Additionally, I got an advice how to get rid of the fix-symbols.patch. I automated all this in a new version of PKGBUILD:

# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Nicola Squartini <tensor5@gmail.com>
# Contributor: loqs

pkgname=atom
_tag=1.63.0-dev
pkgver=1.63.0.dev.r383.g7eaebe0ee
pkgrel=1
pkgdesc='A hackable text editor for the 21st Century'
arch=(x86_64)
url="git+https://github.com/atom-community/atom.git"
license=(MIT)
_electron=electron11
depends=(apm
         $_electron
         libxkbfile
         ripgrep)
makedepends=(git
             node-gyp
             nodejs-lts-gallium
             npm)
optdepends=('ctags: symbol indexing support'
            'git: Git and GitHub integration'
            'hunspell: spell check integration')
replaces=(atom-editor)
options=(!emptydirs)
_archive="atom"
source=("$url"
        "$pkgname.js"
        "fix-$pkgname-sh.patch"
        use-system-apm.patch
        fix-crash-reporter.patch
        fix-package-json.patch
  )
sha256sums=('SKIP'
            'cd39815e7f9a72be0c7ac2e15106f8bb8774c0cbc0960725b0b677d0ce67d828'
            '13ed58df53ab8fb9a0f505ad4d860aa61e5ed00a280ad7ff27dcaa360e31d896'
            '08ae0c93b5ec7eb7d90c65d5d2adbaca538482fba902ed1f8414024db0d21854'
            '41bdccccbff550b5922cef94480ac747b4a5d04f6d3919d06e024026efdc8f70'
            '60d1a34d1f83c47d0b968b037bae443594dd6acc71aef64804ad92e8d202c62a'
           )

_electron_version=$(< /usr/lib/$_electron/version)

pkgver() {
  cd "$pkgname"
  atom_version=$(node -e 'console.log(require("./package").version)')
  # To strip ".dev" from the package version, comment out the line above, and uncomment the line below.
  # atom_version=$(node -e 'console.log(require("./package").version)' | grep -o '[0-9.]*')
  atom_version_base_commit=$(git log --oneline | grep $atom_version | grep -o "[0-f]* ")
  # If the command on the line above doesn't find a "base" commit on `master` branch for the current Atom version,
  # then the latest commit on `master` branch will be tagged instead, and revisions (".r") in the package version will be "0".
  git tag -f $atom_version $atom_version_base_commit
  # Remove 'v' prefix on tags; prefix revision with 'r'; replace all '-' with '.'
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
        cd "$_archive"
        patch -Np1 -i ../fix-$pkgname-sh.patch
        patch -Np1 -i ../use-system-apm.patch
        patch -Np1 -i ../fix-crash-reporter.patch
        find . -type f -name "*.cc" -exec sed -i 's/NODE_MODULE/NAN_MODULE_WORKER_ENABLED/g' {} +
}
build() {
        cd "$_archive"
    CXXFLAGS="${CXXFLAGS/ -fexceptions/}"
        for CACHES in compile-cache snapshot-cache
          do
            if [ -d "~/.atom/$CACHES" ]; then
              rm -rf ~/.atom/$CACHES
            fi
          done
        ATOM_RESOURCE_PATH="${PWD}" ATOM_HOME="$srcdir/.atom" \
        GYP_DEFINES="openssl_fips=" \
        script/bootstrap
        cd script
        npm install minidump@latest
        cd ..
        OUT="$(patch -Np1 -i ../fix-package-json.patch)" || echo "${OUT}" | grep "Skipping patch" -q || (echo "$OUT" && false);
        GYP_DEFINES="openssl_fips=" \
        script/build --no-bootstrap

}

package() {
    cd "$_archive"

    install -dm0755 "$pkgdir/usr/lib"
    cp -r out/app "$pkgdir/usr/lib/$pkgname"
    install -m0644 out/startup.js "$pkgdir/usr/lib/$pkgname"
    sed -e "s/@ELECTRON@/$_electron/" "$srcdir/$pkgname.js" |
        install -Dm0755 /dev/stdin "$pkgdir/usr/lib/$pkgname/$pkgname"

        mkdir -p  "$pkgdir/usr/lib/$pkgname/node_modules/vscode-ripgrep/bin"
        ln -sf /usr/bin/rg "$pkgdir/usr/lib/$pkgname/node_modules/vscode-ripgrep/bin/rg"

    install -dm0755 "$pkgdir/usr/share/applications"
    sed -e "s|<%= appName %>|Atom|" \
        -e "s/<%= description %>/$pkgdesc/" \
        -e "s|<%= installDir %>|/usr|" \
        -e "s|<%= appFileName %>|$pkgname|" \
        -e "s|<%= iconPath %>|$pkgname|" \
        resources/linux/atom.desktop.in > "$pkgdir/usr/share/applications/$pkgname.desktop"

    for size in 16 24 32 48 64 128 256 512 1024; do
        install -Dm0644 "resources/app-icons/stable/png/$size.png" \
                "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/$pkgname.png"
    done
    ln -sf "../../../share/icons/hicolor/1024x1024/apps/$pkgname.png" \
        "$pkgdir/usr/lib/$pkgname/resources/$pkgname.png"

    install -Dm0755 "$pkgname.sh" "$pkgdir/usr/bin/$pkgname"

    install -dm0755 "$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/$pkgname/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 '*/.github/workflows' -prune -exec rm -r '{}' \; \
        -or -path '*/less/gradle' -prune -exec rm -r '{}' \; \
        -or -path '*/task-lists/src' -prune -exec rm -r '{}' \;
        cd "${pkgdir}"/usr/bin
        ln -sf ../lib/atom/atom atom

}

This should leave you with an installable atom package. Important: if there are still errors, also when starting atom, delete all compile caches in ~/.atom.

DAC324 commented on 2022-06-22 12:08 (UTC)

@kanmeiban I must admit that I also do not understand why that sometimes works and sometimes fails. If you experience that error while issuing script/bootstrap in the terminal, try to execute script/clean before attempting script/bootstrap again.

kanmeiban commented on 2022-06-22 07:31 (UTC)

@DAC324 I get the process.dlopen during script/bootstrap execution:

$ cd src/atom
$ script/bootstrap                                                                                       
Node:   v16.15.1
Python: v3.10.5
Installing script runner dependencies
Installing script dependencies
Installing apm
internal/modules/cjs/loader.js:1187
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: /home/sava/code/aur/atom-sava/src/atom/apm/node_modules/atom-package-manager/node_modules/git-utils/build/Release/git.node: undefined symbol: git_net_url_is_default_port

Anyway, I managed to build the 1.61.0-beta0 using your fix-symbols.patch so I think the maintainer @alerque should add it.

DAC324 commented on 2022-06-21 17:25 (UTC) (edited on 2022-06-22 13:05 (UTC) by DAC324)

@kanmeiban Please read my previous comment. Unfortunately, it is quite normal that makepkg aborts with that error on first run.

What to do in that case?

$ cd src/atom
$ script/clean
$ script/bootstrap
$ cd ../..
$ makepkg -f

At least that worked for me, and I got a complete package to be installed, for example, with sudo pacman -U atom-1.63.0.dev.r359.g4b76ccda8-1-x86_64.pkg.tar.zst

kanmeiban commented on 2022-06-21 16:39 (UTC)

@DAC324 I get the process.dlopen error when running script/bootstrap.

DAC324 commented on 2022-06-21 15:24 (UTC) (edited on 2022-06-22 13:07 (UTC) by DAC324)

In case makepkg aborts using my PKGBUILD, with the following error

internal/modules/cjs/loader.js:1187
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: /opt/.cache/yay/atom/src/atom/apm/node_modules/atom-package-manager/node_modules/git-utils/build/Release/git.node: undefined symbol: git_net_url_is_default_port
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1187:18)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/opt/.cache/yay/atom/src/atom/apm/node_modules/atom-package-manager/node_modules/git-utils/src/git.js:3:22)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
Error: Command failed: /opt/.cache/yay/atom/src/atom/apm/node_modules/atom-package-manager/bin/apm --version
    at checkExecSyncError (node:child_process:828:11)
    at Object.execFileSync (node:child_process:863:15)
    at installApm (/opt/.cache/yay/atom/src/atom/script/lib/install-apm.js:20:18)
    at /opt/.cache/yay/atom/src/atom/script/script-runner/node_modules/threads/dist/worker/index.js:109:26
    at Generator.next (<anonymous>)
    at /opt/.cache/yay/atom/src/atom/script/script-runner/node_modules/threads/dist/worker/index.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/opt/.cache/yay/atom/src/atom/script/script-runner/node_modules/threads/dist/worker/index.js:4:12)
    at runFunction (/opt/.cache/yay/atom/src/atom/script/script-runner/node_modules/threads/dist/worker/index.js:106:12)

go to your src/atom directory and execute script/clean followed by script/bootstrap directly from the terminal. After that has completed, cd back to your package directory and try building the package again.

This time, the build process should complete. I must admit that I have no clue what makes the difference between calling script/bootstrap from PKGBUILD and directly from the terminal.

P.S.: Yes, I know that there was git-utils.patch designated to fix that issue but this patch does not work anymore (and it also does not appear to be needed as script/bootstrap runs without it from the terminal).

DAC324 commented on 2022-06-21 12:38 (UTC) (edited on 2022-06-24 13:57 (UTC) by DAC324)

With the transition to atom-community and atom version 1.63, things have become a bit easier now. What you need to build atom-1.63.0-dev right now is fix-atom-sh.patch as well as use-system-apm.patch from here plus the following patch fix-symbols.patch

--- a/script/lib/dump-symbols.js    2022-06-17 15:56:44.450234483 +0200
+++ b/script/lib/dump-symbols.js    2022-06-17 15:56:57.389963460 +0200
@@ -28,7 +28,7 @@
     minidump.dumpSymbol(binaryPath, function(error, content) {
       if (error) {
         // fswin.node is only used on windows, ignore the error on other platforms
-        if (process.platform !== 'win32' && binaryPath.match(/fswin.node/))
+        if (process.platform !== 'win32')
           return resolve();
         throw new Error(error);
       } else {

along with this PKGBUILD:

# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Nicola Squartini <tensor5@gmail.com>
# Contributor: loqs

pkgname=atom
_tag=1.63.0-dev
pkgver=1.63.0.dev.r15.g17a31e3a3
pkgrel=1
pkgdesc='A hackable text editor for the 21st Century'
arch=(x86_64)
url="git+https://github.com/atom-community/atom.git"
license=(MIT)
_electron=electron11
depends=(apm
         $_electron
         libxkbfile
         ripgrep)
makedepends=(git
             node-gyp
             nodejs-lts-gallium
             npm)
optdepends=('ctags: symbol indexing support'
            'git: Git and GitHub integration'
            'hunspell: spell check integration')
replaces=(atom-editor)
options=(!emptydirs)
_archive="atom"
source=("$url"
        "$pkgname.js"
        "fix-$pkgname-sh.patch"
        fix-symbols.patch
        use-system-apm.patch
        fix-crash-reporter.patch
        fix-package-json.patch
        fix-context-isolation.patch
  )
sha256sums=('SKIP'
            'cd39815e7f9a72be0c7ac2e15106f8bb8774c0cbc0960725b0b677d0ce67d828'
            '13ed58df53ab8fb9a0f505ad4d860aa61e5ed00a280ad7ff27dcaa360e31d896'
            '737855d4651d55e9d1d65cc7118784960453d71f39cae62be1ecb768191ebb20'
            '08ae0c93b5ec7eb7d90c65d5d2adbaca538482fba902ed1f8414024db0d21854'
            '41bdccccbff550b5922cef94480ac747b4a5d04f6d3919d06e024026efdc8f70'
            '60d1a34d1f83c47d0b968b037bae443594dd6acc71aef64804ad92e8d202c62a'
            '29b97aa6ba317a438bff4c3660d425eb5e828e05035fac939ac278e3c854ff71'
           )

_electron_version=$(< /usr/lib/$_electron/version)

pkgver() {
  cd "$pkgname"
  atom_version=$(node -e 'console.log(require("./package").version)')
  # To strip ".dev" from the package version, comment out the line above, and uncomment the line below.
  # atom_version=$(node -e 'console.log(require("./package").version)' | grep -o '[0-9.]*')
  atom_version_base_commit=$(git log --oneline | grep $atom_version | grep -o "[0-f]* ")
  # If the command on the line above doesn't find a "base" commit on `master` branch for the current Atom version,
  # then the latest commit on `master` branch will be tagged instead, and revisions (".r") in the package version will be "0".
  git tag -f $atom_version $atom_version_base_commit
  # Remove 'v' prefix on tags; prefix revision with 'r'; replace all '-' with '.'
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
        cd "$_archive"
        patch -Np1 -i ../fix-$pkgname-sh.patch
        patch -Np1 -i ../use-system-apm.patch
        patch -Np1 -i ../fix-symbols.patch
        patch -Np1 -i ../fix-crash-reporter.patch
        patch -Np1 -i ../fix-context-isolation.patch
        find . -type f -name "*.cc" -exec sed -i 's/NODE_MODULE/NAN_MODULE_WORKER_ENABLED/g' {} +
}
build() {
        cd "$_archive"
    CXXFLAGS="${CXXFLAGS/ -fexceptions/}"

        ATOM_RESOURCE_PATH="${PWD}" ATOM_HOME="$srcdir/.atom" \
        GYP_DEFINES="openssl_fips=" \
        script/bootstrap || true
        GYP_DEFINES="openssl_fips=" \
        script/bootstrap
        OUT="$(patch -Np1 -i ../fix-package-json.patch)" || echo "${OUT}" | grep "Skipping patch" -q || (echo "$OUT" && false);
        GYP_DEFINES="openssl_fips=" \
        script/build --no-bootstrap

}

package() {
    cd "$_archive"

    install -dm0755 "$pkgdir/usr/lib"
    cp -r out/app "$pkgdir/usr/lib/$pkgname"
    install -m0644 out/startup.js "$pkgdir/usr/lib/$pkgname"
    sed -e "s/@ELECTRON@/$_electron/" "$srcdir/$pkgname.js" |
        install -Dm0755 /dev/stdin "$pkgdir/usr/lib/$pkgname/$pkgname"

        mkdir -p  "$pkgdir/usr/lib/$pkgname/node_modules/vscode-ripgrep/bin"
        ln -sf /usr/bin/rg "$pkgdir/usr/lib/$pkgname/node_modules/vscode-ripgrep/bin/rg"

    install -dm0755 "$pkgdir/usr/share/applications"
    sed -e "s|<%= appName %>|Atom|" \
        -e "s/<%= description %>/$pkgdesc/" \
        -e "s|<%= installDir %>|/usr|" \
        -e "s|<%= appFileName %>|$pkgname|" \
        -e "s|<%= iconPath %>|$pkgname|" \
        resources/linux/atom.desktop.in > "$pkgdir/usr/share/applications/$pkgname.desktop"

    for size in 16 24 32 48 64 128 256 512 1024; do
        install -Dm0644 "resources/app-icons/stable/png/$size.png" \
                "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/$pkgname.png"
    done
    ln -sf "../../../share/icons/hicolor/1024x1024/apps/$pkgname.png" \
        "$pkgdir/usr/lib/$pkgname/resources/$pkgname.png"

    install -Dm0755 "$pkgname.sh" "$pkgdir/usr/bin/$pkgname"

    install -dm0755 "$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/$pkgname/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 '*/.github/workflows' -prune -exec rm -r '{}' \; \
        -or -path '*/less/gradle' -prune -exec rm -r '{}' \; \
        -or -path '*/task-lists/src' -prune -exec rm -r '{}' \;
        cd "${pkgdir}"/usr/bin
        ln -sf ../lib/atom/atom atom

}

DAC324 commented on 2022-06-17 15:40 (UTC)

The latest upstream version of atom is 1.63.0-dev. You can find it at https://github.com/atom-community/atom.git

Unfortunately, there is no tarball available yet, and also the remainder of PKGBUILD seems to need some overhaul. In particular, it does not appear to be possible anymore to use system apm and system electron.

If you encounter the following error building this package 1.61.0-beta

Generating API docs at /opt/.cache/yay/atom/src/atom-1.61.0-beta0/docs/output/atom-api.json
Dumping symbols in /opt/.cache/yay/atom/src/atom-1.61.0-beta0/out/symbols
/opt/.cache/yay/atom/src/atom-1.61.0-beta0/script/lib/dump-symbols.js:33
        throw new Error(error);
        ^

[Error: Error
  at /opt/.cache/yay/atom/src/atom-1.61.0-beta0/script/lib/dump-symbols.js:33:15
  at ChildProcess.<anonymous> (/opt/.cache/yay/atom/src/atom-1.61.0-beta0/script/node_modules/minidump/lib/minidump.js:27:7)
  at ChildProcess.emit (events.js:315:20)
  at maybeClose (internal/child_process.js:1021:16)
  at Socket.<anonymous> (internal/child_process.js:443:11)
  at Socket.emit (events.js:315:20)
  at Pipe.<anonymous> (net.js:674:12)
]

just apply the following patch to the sources:

--- a/script/lib/dump-symbols.js    2022-06-17 15:56:44.450234483 +0200
+++ b/script/lib/dump-symbols.js    2022-06-17 15:56:57.389963460 +0200
@@ -28,7 +28,7 @@
     minidump.dumpSymbol(binaryPath, function(error, content) {
       if (error) {
         // fswin.node is only used on windows, ignore the error on other platforms
-        if (process.platform !== 'win32' && binaryPath.match(/fswin.node/))
+        if (process.platform !== 'win32')
           return resolve();
         throw new Error(error);
       } else {

maxpayne3 commented on 2022-06-15 22:19 (UTC) (edited on 2022-06-15 22:21 (UTC) by maxpayne3)

Unless a serious fork will show up, this package along with apm it's not really needed. Just keep the previous ones (if you already had them installed) or download them from the archive (if you want a new installation). If yay is complaining about the upgrade, add them to the ignore list.

ConWrite commented on 2022-06-15 18:17 (UTC)

Dead or not, it'd still be nice for the last update to function properly.

gardotd426 commented on 2022-06-15 05:11 (UTC)

This is clearly a situation where the effort needed to keep this AUR package going is pretty much pointless and is better spent elsewhere. Atom is dead. I'm sure a ton of people hate that, and I'm guessing there will be more than one community fork that attempts to continue in its place, but they will likely all just disappear after a short period. My suggestion is to do what you're supposed to do when an AUR package's upstream decides to stop existing - delete the AUR package. Either that, or issue an update that literally says nothing other than "Atom has officially been declared dead, and is being sunset. This AUR package will no longer receive updates. Use at your own risk." Though I think that's the obviously stupid choice, I mean the project is dead, so kill the AUR package that installs the dead project.

maxpayne3 commented on 2022-06-14 16:39 (UTC)

Fortunately I blocklisted atom and apm in pacman.conf

DAC324 commented on 2022-06-13 13:12 (UTC) (edited on 2022-06-13 14:08 (UTC) by DAC324)

The cause of the error I described is with the way atom is built in this package.

If it is compiled using the commands decribed at https://flight-manual.atom.io/hacking-atom/sections/hacking-on-atom-core/#platform-linux

git clone https://github.com/atom-community/atom.git
cd atom
script/bootstrap
script/build

the source compiles successfully.

Of course, you will need to edit src/atom-1.63.0-dev/script/lib/dump-symbols.js:

if (error) {
        // fswin.node is only used on windows, ignore the error on other platforms
       // if (process.platform !== 'win32' )
          return resolve();
       throw new Error(error);

Interesting, though, that it does not seem to matter what binaryPath.match(/fswin.node/) returns. It has to be removed from that statement entirely.

Looks like the build directives in PKGBUILD

build() {
    cd "$_archive"

    pushd node_modules/git-utils
    env \
        npm_config_disturl=https://electronjs.org/headers \
        npm_config_runtime=$_electron \
        npm_config_target=$_electron_version \
        apm rebuild
    popd

    pushd script
    # Hack to avoid using Node > 12 (https://github.com/babel/babel/issues/11216)
    # Set ELECTRON_VERSION (see use-system-electron.patch)
    env \
        ELECTRON_RUN_AS_NODE=1 \
        ELECTRON_VERSION=$_electron_version \
        $_electron build # --no-bootstrap
}

need some overhaul.

DAC324 commented on 2022-06-11 10:45 (UTC)

Here's a possible solution: https://github.com/atom/atom/issues/25518#issuecomment-1152894318

Replace the Git URL in PKGBUILD by

"https://github.com/atom-community/atom/$pkgname"

However, the guy also writes "atom is now abandoned and the project is concluded."

awilli commented on 2022-06-11 09:56 (UTC)

@DAC324, same Error for me

DAC324 commented on 2022-06-11 09:42 (UTC) (edited on 2022-06-11 10:04 (UTC) by DAC324)

This package does not install:

Transpiling Babel paths in /opt/.cache/yay/atom/src/atom-1.61.0-beta0/out/app
Transpiling CoffeeScript paths in /opt/.cache/yay/atom/src/atom-1.61.0-beta0/out/app
Transpiling CSON paths in /opt/.cache/yay/atom/src/atom-1.61.0-beta0/out/app
Transpiling PEG.js paths in /opt/.cache/yay/atom/src/atom-1.61.0-beta0/out/app
Generating module cache for /opt/.cache/yay/atom/src/atom-1.61.0-beta0/out/app
Generating pre-built less cache in /opt/.cache/yay/atom/src/atom-1.61.0-beta0/out/app/less-compile-cache
Generating metadata for /opt/.cache/yay/atom/src/atom-1.61.0-beta0/out/app/package.json
Generating API docs at /opt/.cache/yay/atom/src/atom-1.61.0-beta0/docs/output/atom-api.json
Dumping symbols in /opt/.cache/yay/atom/src/atom-1.61.0-beta0/out/symbols
/opt/.cache/yay/atom/src/atom-1.61.0-beta0/script/lib/dump-symbols.js:33
        throw new Error(error);
        ^

[Error: Error
  at /opt/.cache/yay/atom/src/atom-1.61.0-beta0/script/lib/dump-symbols.js:33:15
  at ChildProcess.<anonymous> (/opt/.cache/yay/atom/src/atom-1.61.0-beta0/script/node_modules/minidump/lib/minidump.js:27:7)
  at ChildProcess.emit (events.js:315:20)
  at maybeClose (internal/child_process.js:1021:16)
  at Socket.<anonymous> (internal/child_process.js:443:11)
  at Socket.emit (events.js:315:20)
  at Pipe.<anonymous> (net.js:674:12)
]
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: atom

The error is at line 33 in src/atom-1.61.0-beta0/script/lib/dump-symbols.js

      if (error) {
        // fswin.node is only used on windows, ignore the error on other platforms
        if (process.platform !== 'win32' && binaryPath.match(/fswin.node/))
          return resolve();
      throw new Error(error);

DrosteEffect commented on 2022-06-10 15:09 (UTC)

@doskanoness Same error for me.

doskanoness commented on 2022-06-10 12:17 (UTC)

I get this error:

In file included from ../../nan/nan.h:2884:
../../nan/nan_typedarray_contents.h: In constructor ‘Nan::TypedArrayContents<T>::TypedArrayContents(v8::Local<v8::Value>)’:
../../nan/nan_typedarray_contents.h:34:43: error: ‘class v8::ArrayBuffer’ has no member named ‘GetContents’
   34 |       data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
      |                                           ^~~~~~~~~~~
make: *** [keyboard-layout-manager.target.mk:116: Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 5.18.2-zen1-1-zen
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/doskanoness/.cache/yay/atom/src/atom-1.61.0-beta0/node_modules/keyboard-layout
gyp ERR! node -v v16.15.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! keyboard-layout@2.0.17 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the keyboard-layout@2.0.17 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

awilli commented on 2022-06-10 11:55 (UTC)

I get this error:

        throw new Error(error);
        ^

[Error: Error
  at ~/.cache/yay/atom/src/atom-1.61.0-beta0/script/lib/dump-symbols.js:33:15

alerque commented on 2022-06-10 09:06 (UTC)

Sorry folks, when I migrated this from [community] I apparently migrated the latest trunk build which had some unfinished attempts to modernize the dependencies. I've reverted it to the latest working build that was in the repos so it should build now. Note that you really should compile this in a chroot otherwise you're bound to have dependency mismatches, both with electron and node stuff.

XxTriviumxX commented on 2022-06-10 00:39 (UTC)

i get this error with the when upgrading to 1.61.0beta0-4:

==> ERROR: A failure occurred in prepare().
    Aborting...
error: failed to build 'atom-1.61.0beta0-4': 
error: packages failed to build: atom-1.61.0beta0-4

StephanX commented on 2022-06-09 22:02 (UTC)

I'm pretty sad about atom sunsetting; I hope the community maintains it going forward. In the mean time, I'm stuck here: npm ERR! keyboard-layout@2.0.17 install: node-gyp rebuild

alerque commented on 2022-06-09 08:16 (UTC)

GitHub announced they are sunsetting Atom. Even before that announcement it was trouble in the [community] repo because it depends on an outdated Electron and we were considering dropping it. The sunset announcement that it will not be updated is the last straw. Please welcome Atom to the AUR.