Package Details: atom-editor-beta-bin 1.61.0beta0-1

Git Clone URL: https://aur.archlinux.org/atom-editor-beta-bin.git (read-only, click to copy)
Package Base: atom-editor-beta-bin
Description: A hackable text editor for the 21st Century
Upstream URL: None
Licenses: MIT
Conflicts: atom
Provides: atom
Submitter: eatmyvenom
Maintainer: eatmyvenom (bittin)
Last Packager: bittin
Votes: 4
Popularity: 0.043209
First Submitted: 2021-01-06 11:27 (UTC)
Last Updated: 2022-03-08 10:11 (UTC)

Latest Comments

1 2 Next › Last »

DAC324 commented on 2022-09-17 15:31 (UTC) (edited on 2022-09-17 15:54 (UTC) by DAC324)

Update: There is an unofficial atom version which at least works with electron 13 instead of 9. This version works with the latest glibc update and does not need the --in-process-gpu switch for being started.

Meanwhile, there were also some updates upstream that simplified the build system. Plus, it does not seem to be necessary to have a separate apm package.

Here's a modified PKGBUILD that includes all those aspects mentioned above.

# 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.r504.g3907dd270
pkgrel=1
pkgdesc='A hackable text editor for the 21st Century'
arch=(x86_64)
# url="git+https://github.com/atom-community/atom.git"
# Bump Electron to v.13
url="git+https://github.com/mansona/atom.git"
#url="git+https://github.com/atom-community/atom.git#branch=upstream_master"
#url="git+https://github.com/atom-community/atom.git#commit=674404a0e84b4e4bd6fc8734db67a25ecc0da606"       #380
#url="git+https://github.com/atom-community/atom.git#commit=b2b1d3e5b7abc64db08af3abb7fe8c7c39f8e436"        #381
license=(MIT)
depends=(
         libxkbfile
         ripgrep)
makedepends=(git
             node-gyp
             nodejs
             # 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-crash-reporter.patch
        fix-package-json.patch
        fix-auto-update-manager.patch
  )
sha256sums=('SKIP'
            'cd39815e7f9a72be0c7ac2e15106f8bb8774c0cbc0960725b0b677d0ce67d828'
            '13ed58df53ab8fb9a0f505ad4d860aa61e5ed00a280ad7ff27dcaa360e31d896'
            '41bdccccbff550b5922cef94480ac747b4a5d04f6d3919d06e024026efdc8f70'
            '60d1a34d1f83c47d0b968b037bae443594dd6acc71aef64804ad92e8d202c62a'
            '2cdaf24288a4b93970899aef2b673674b0522df864e64cd765d941951a725297'
           )


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 ../fix-crash-reporter.patch
        patch -Np1 -i ../fix-auto-update-manager.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=" \
#        node script/bootstrap.js
        cd script
        npm install minidump@latest
#        npm audit fix
        cd ..
         OUT="$(patch -Np1 -i ../fix-package-json.patch)" || echo "${OUT}" | grep "Skipping patch" -q || (echo "$OUT" && false);

        GYP_DEFINES="openssl_fips=" \
        node script/build.js

}

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-09-17 15:17 (UTC)

@AlexWayfer

Can you have a look at the patch(es) proposed in the second comment on https://bugs.archlinux.org/task/75902 ? The link at https://github.com/electron/electron/commit/993ecb5bdd5c57024c8718ca6203a8f924d6d574 actually refers to two patches.

Looks like the files to be changed by both those patches, do not exist in the atom source tree.

AlexWayfer commented on 2022-09-16 12:32 (UTC)

Yep, I've created this issue after this comment and long searching of breaking package…

DAC324 commented on 2022-09-16 12:22 (UTC)

@AlexWayfer This is discussed in https://bugs.archlinux.org/task/75902

Current workaround: Start atom with --in-process-gpu switch:

$ atom --in-process-gpu

Works at least for me.

AlexWayfer commented on 2022-09-13 20:30 (UTC)

Broken with recent system update.

[14969:0913/232907.305722:FATAL:gpu_data_manager_impl_private.cc(445)] GPU process isn't usable. Goodbye.


Unexpected crash report id length
Failed to get crash dump id.
Report Id:

DAC324 commented on 2022-06-27 09:51 (UTC) (edited on 2022-06-27 10:59 (UTC) by DAC324)

@norse That behavior of atom closing after having selected Packages->Command Palette->Toggle->(search for install and select) Application: Install Update 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 :(

DAC324 commented on 2022-06-24 19:11 (UTC) (edited on 2022-06-24 19:17 (UTC) by DAC324)

Just have a look here: https://aur.archlinux.org/packages/atom#comment-870640 This error only occurs when trying to build from source, and can be avoided by using the binary package I linked to.

anark10n commented on 2022-06-24 10:00 (UTC)

Hey there, I get this error when trying to update atom. /home/anark10n/.cache/yay/atom/src/atom-1.61.0-beta0/script/lib/dump-symbols.js:33 throw new Error(error); ^

[Error: Error
  at /home/anark10n/.cache/yay/atom/src/atom-1.61.0-beta0/script/lib/dump-symbols.js:33:15
  at ChildProcess.<anonymous> (/home/anark10n/.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

Not sure what's causing it. Is this something I should post here or on the github page?

DAC324 commented on 2022-06-22 21:19 (UTC) (edited on 2022-06-23 13:23 (UTC) by DAC324)

@norse I can reproduce this crash. However, I must admit that I did not go that way trying to install an application update. There is also Settings, Updates. If I click "Check for Updates" there, I get no crash but (of course) the message that all plugins are up to date. Also, there is Help, About Atom. Currently, this reports that there is an update available but the link only directs me to the general atom build instructions.

I assume that this has something to do with apm as after a restart following this crash, I sometimes get an application error in Settings, Updates.

I will try investigating with the bundled apm and keep you updated.

UPDATE: It also does not work with the bundled apm. As installing on Arch is discouraged by the members of the atom community, I also tried downloading and installing the Debian package they offer on https://dev.azure.com/atomcommunity/2179356e-4464-463a-8aea-5ddc7d857fda/_apis/build/builds/1183/artifacts?artifactName=atom-amd64.deb&api-version=7.0&%24format=zip , on a Debian based Linux system. There, the very same error also occurs.

norse commented on 2022-06-22 18:29 (UTC)

@DAC324 Thanks for the clarifications ;) Snakes cannot die by their own venom, can they :D

The main problem, however, remains. The package (yours) installs well, but the executable crashes, when I do

Packages->Command Palette->Toggle->(search for install and select) Application: Install Update