Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Unable to create Atom RPM package on Fedora 33 #21937

Closed
1 task done
kogiokka opened this issue Feb 8, 2021 · 5 comments · Fixed by #21964
Closed
1 task done

Unable to create Atom RPM package on Fedora 33 #21937

kogiokka opened this issue Feb 8, 2021 · 5 comments · Fixed by #21964

Comments

@kogiokka
Copy link

kogiokka commented Feb 8, 2021

Prerequisites

Description

Unable to create RPM package on Fedora 33. Ambiguous-python-shebang errors occur when brp-mangle-shebangs is processing node-gyp python scripts.

Steps to Reproduce

  1. Install required packages: sudo dnf --assumeyes install make gcc gcc-c++ glibc-devel git-core libsecret-devel rpmdevtools libX11-devel libxkbfile-devel (See hacking-on-atom-core)
  2. Run script/bootstrap
  3. Run script/build --create-rpm-package

Expected behavior:

An Atom RPM package should be created.

Actual behavior:

./script/build --create-rpm-package  
Node:   v14.15.4
Npm:    v6.14.8
Python: v3.9.1
Installing script dependencies
Installing apm
apm  2.5.2
npm  6.14.8
node 12.4.0 x64
atom 1.56.0-dev
python 3.9.1
git 2.29.2
Installing modules ✓
Wrote Dependencies Fingerprint: /home/luis/source/atom/node_modules/.dependencies-fingerprint 1da118ebc5276e30c246f4398744b0187305bf18
Cleaning /home/luis/source/atom/out
Copying assets to /home/luis/source/atom/out/app
Transpiling packages with custom transpiler configurations in /home/luis/source/atom/out/app
 transpiling for package github
Installing modules ✓
Transpiling Babel paths in /home/luis/source/atom/out/app
Transpiling CoffeeScript paths in /home/luis/source/atom/out/app
Transpiling CSON paths in /home/luis/source/atom/out/app
Transpiling PEG.js paths in /home/luis/source/atom/out/app
Generating module cache for /home/luis/source/atom/out/app
Generating pre-built less cache in /home/luis/source/atom/out/app/less-compile-cache
Generating metadata for /home/luis/source/atom/out/app/package.json
Generating API docs at /home/luis/source/atom/docs/output/atom-api.json
Dumping symbols in /home/luis/source/atom/out/symbols
Running electron-packager on /home/luis/source/atom/out/app with app name "atom"
Packaging app for platform linux x64 using electron v6.1.12
Changing permissions for node files in /home/luis/source/atom/out/atom-dev-1.56.0-dev-394b46877-amd64
Copying non-ASAR resources to /home/luis/source/atom/out/atom-dev-1.56.0-dev-394b46877-amd64/resources
Writing LICENSE.md to /home/luis/source/atom/out/atom-dev-1.56.0-dev-394b46877-amd64/resources
Application bundle created at /home/luis/source/atom/out/atom-dev-1.56.0-dev-394b46877-amd64

Minifying startup script
Verifying if snapshot can be executed via `mksnapshot`
Generating startup blob with mksnapshot
Moving generated startup blob into "/home/luis/source/atom/out/atom-dev-1.56.0-dev-394b46877-amd64/v8_context_snapshot.bin"
Moving generated startup blob into "/home/luis/source/atom/out/atom-dev-1.56.0-dev-394b46877-amd64/snapshot_blob.bin"
Skipping creating debian package. Specify the --create-debian-package option to create it.
Creating rpm package for "/home/luis/source/atom/out/atom-dev-1.56.0-dev-394b46877-amd64"
Creating rpm package directory structure at "/home/luis/rpmbuild"
Copying "/home/luis/source/atom/out/atom-dev-1.56.0-dev-394b46877-amd64" to "/home/luis/rpmbuild/BUILD/Atom Dev"
Copying icons into "/home/luis/rpmbuild/BUILD/icons"
Writing rpm package spec file into "/home/luis/rpmbuild/SPECS"
Writing desktop entry file into "/home/luis/rpmbuild/BUILD"
Copying atom.sh into "/home/luis/rpmbuild/BUILD"
Copying atom.policy into "/home/luis/rpmbuild/BUILD"
Generating .rpm package from "/home/luis/rpmbuild"
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.sMIbMO
mangling shebang in /usr/share/atom-dev/resources/app/apm/bin/apm from /bin/bash to #!/usr/bin/bash
mangling shebang in /usr/share/atom-dev/resources/app/apm/bin/npm from /bin/bash to #!/usr/bin/bash
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/ajv/scripts/prepare-tests from /usr/bin/env sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/ajv/scripts/publish-built-version from /usr/bin/env bash to #!/usr/bin/bash
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/ajv/scripts/travis-gh-pages from /usr/bin/env bash to #!/usr/bin/bash
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/bin/node-gyp-bin/node-gyp from /usr/bin/env sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/bin/npm from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/configure from /usr/bin/env bash to #!/usr/bin/bash
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/lib/utils/completion.sh from /bin/bash to #!/usr/bin/bash
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/JSONStream/bin.js from /usr/bin/env node to #!/usr/bin/node
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/ajv/scripts/prepare-tests from /usr/bin/env sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/ajv/scripts/travis-gh-pages from /usr/bin/env bash to #!/usr/bin/bash
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/gyp from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin/node-gyp from /usr/bin/env sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/rc/cli.js from /usr/bin/env node to #!/usr/bin/node
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/scripts/clean-old.sh from /usr/bin/env bash to #!/usr/bin/bash
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/scripts/dep-update from /usr/bin/env bash to #!/usr/bin/bash
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/scripts/dev-dep-update from /usr/bin/env bash to #!/usr/bin/bash
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/scripts/gen-changelog from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/scripts/install.sh from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/scripts/pr from /usr/bin/env bash to #!/usr/bin/bash
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/scripts/relocate.sh from /usr/bin/env bash to #!/usr/bin/bash
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/scripts/update-authors.sh from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/open/vendor/xdg-open from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/rc/cli.js from /usr/bin/env node to #!/usr/bin/node
mangling shebang in /usr/share/atom-dev/resources/app/apm/node_modules/tmp/cleanup.sh from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app/apm/script/postinstall.sh from /bin/bash to #!/usr/bin/bash
mangling shebang in /usr/share/atom-dev/resources/app/atom.sh from /bin/bash to #!/usr/bin/bash
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-bisect from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-difftool--helper from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-filter-branch from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-instaweb from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-legacy-stash from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-merge-octopus from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-merge-one-file from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-merge-resolve from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-mergetool from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-quiltimport from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-request-pull from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-submodule from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-web--browse from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/share/git-core/templates/hooks/applypatch-msg.sample from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/share/git-core/templates/hooks/commit-msg.sample from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/share/git-core/templates/hooks/post-update.sample from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/share/git-core/templates/hooks/pre-applypatch.sample from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/share/git-core/templates/hooks/pre-commit.sample from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/share/git-core/templates/hooks/pre-merge-commit.sample from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/share/git-core/templates/hooks/pre-push.sample from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/share/git-core/templates/hooks/pre-rebase.sample from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/share/git-core/templates/hooks/pre-receive.sample from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/share/git-core/templates/hooks/prepare-commit-msg.sample from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/dugite/git/share/git-core/templates/hooks/update.sample from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/github/bin/git-askpass-atom.sh from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/github/bin/git-credential-atom.sh from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/github/bin/gpg-wrapper.sh from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/share/atom-dev/resources/app.asar.unpacked/node_modules/github/bin/linux-ssh-wrapper.sh from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/bin/atom-dev from /bin/bash to #!/usr/bin/bash


RPM build errors:

+ umask 022
+ cd /home/luis/rpmbuild/BUILD
+ '[' /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64 '!=' / ']'
+ rm -rf /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64
++ dirname /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64
+ mkdir -p /home/luis/rpmbuild/BUILDROOT
+ mkdir /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64
+ mkdir -p /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/atom-dev/
+ cp -r 'Atom Dev/LICENSE' 'Atom Dev/LICENSES.chromium.html' 'Atom Dev/atom' 'Atom Dev/atom.png' 'Atom Dev/chrome-sandbox' 'Atom Dev/chrome_100_percent.pak' 'Atom Dev/chrome_200_percent.pak' 'Atom Dev/icudtl.dat' 'Atom Dev/libEGL.so' 'Atom Dev/libGLESv2.so' 'Atom Dev/libffmpeg.so' 'Atom Dev/locales' 'Atom Dev/natives_blob.bin' 'Atom Dev/resources' 'Atom Dev/resources.pak' 'Atom Dev/snapshot_blob.bin' 'Atom Dev/swiftshader' 'Atom Dev/v8_context_snapshot.bin' 'Atom Dev/version' /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/atom-dev/
+ mkdir -p /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/bin/
+ ln -sf ../share/atom-dev/resources/app/apm/node_modules/.bin/apm /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/bin/apm-dev
+ cp atom.sh /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/bin/atom-dev
+ chmod 755 /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/bin/atom-dev
+ mkdir -p /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/applications/
+ cp atom-dev.desktop /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/applications/
+ mkdir -p /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/polkit-1/actions/
+ cp atom-dev.policy /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/polkit-1/actions/atom-dev.policy
+ mkdir -p /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/1024x1024/apps
+ cp icons/1024.png /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/1024x1024/apps/atom-dev.png
+ mkdir -p /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/512x512/apps
+ cp icons/512.png /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/512x512/apps/atom-dev.png
+ mkdir -p /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/256x256/apps
+ cp icons/256.png /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/256x256/apps/atom-dev.png
+ mkdir -p /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/128x128/apps
+ cp icons/128.png /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/128x128/apps/atom-dev.png
+ mkdir -p /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/64x64/apps
+ cp icons/64.png /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/64x64/apps/atom-dev.png
+ mkdir -p /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/48x48/apps
+ cp icons/48.png /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/48x48/apps/atom-dev.png
+ mkdir -p /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/32x32/apps
+ cp icons/32.png /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/32x32/apps/atom-dev.png
+ mkdir -p /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/24x24/apps
+ cp icons/24.png /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/24x24/apps/atom-dev.png
+ mkdir -p /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/16x16/apps
+ cp icons/16.png /home/luis/rpmbuild/BUILDROOT/atom-dev-1.56.0.dev.394b46877-0.1.fc33.x86_64//usr/share/icons/hicolor/16x16/apps/atom-dev.png
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-ldconfig
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip /usr/bin/strip
+ /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0
+ /usr/lib/rpm/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-mangle-shebangs
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/async/lib/async.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/chainsaw/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/coffee-script/lib/coffee-script/parser.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/ecc-jsbn/LICENSE is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/ecc-jsbn/README.md is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/ecc-jsbn/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/ecc-jsbn/lib/LICENSE-jsbn is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/ecc-jsbn/lib/ec.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/ecc-jsbn/lib/sec.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/ecc-jsbn/test.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/npm/bin/node-gyp-bin/node-gyp.cmd is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/JSONStream/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/config-chain/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/ecc-jsbn/LICENSE is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/ecc-jsbn/README.md is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/ecc-jsbn/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/ecc-jsbn/lib/LICENSE-jsbn is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/ecc-jsbn/lib/ec.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/ecc-jsbn/lib/sec.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/ecc-jsbn/test.js is executable but has no shebang, removing executable bit
*** ERROR: ambiguous python shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/samples/samples: #!/usr/bin/python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/setup.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/tools/graphviz.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin/node-gyp.cmd is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/rc/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/request/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/uid-number/get-uid-gid.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/wrap-ansi/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/rc/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/request/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/traverse/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/uri-js/LICENSE is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/uri-js/README.md is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/uri-js/dist/es5/uri.all.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/uri-js/dist/es5/uri.all.min.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/uri-js/dist/esnext/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/uri-js/dist/esnext/regexps-iri.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/uri-js/dist/esnext/regexps-uri.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/uri-js/dist/esnext/schemes/http.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/uri-js/dist/esnext/schemes/https.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/uri-js/dist/esnext/schemes/mailto.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/uri-js/dist/esnext/schemes/urn.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/uri-js/dist/esnext/schemes/ws.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/uri-js/dist/esnext/schemes/wss.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/uri-js/dist/esnext/uri.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/uri-js/dist/esnext/util.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/uri-js/yarn.lock is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/node_modules/wrap-ansi/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app/apm/script/download-node.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app.asar.unpacked/node_modules/github/bin/git-askpass-atom.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/atom-dev/resources/app.asar.unpacked/node_modules/github/bin/git-credential-atom.js is executable but has no shebang, removing executable bit
error: Bad exit status from /var/tmp/rpm-tmp.sMIbMO (%install)
    Bad exit status from /var/tmp/rpm-tmp.sMIbMO (%install)

TypeError: Cannot read property 'join' of undefined
  at module.exports (/home/luis/source/atom/script/lib/spawn-sync.js:17:30)
  at module.exports (/home/luis/source/atom/script/lib/create-rpm-package.js:123:3)
  at /home/luis/source/atom/script/build:141:13

Reproduces how often:

Always. The errors on ambiguous python shebang are intended. See the links below:

Versions

git master (394b468)

@mfonville
Copy link
Contributor

@DeeDeeG Maybe this is something you could help with?

Is the node-gyp that apm uses straight from upstream? Is that python3 compatible for the version we use?

@DeeDeeG
Copy link
Contributor

DeeDeeG commented Feb 11, 2021

Hi @mfonville. Sure, I'll take a look at this.

Is the node-gyp that apm uses straight from upstream?

Yes. (To get probably unnecessarily specific: It's not the latest v7 of node-gyp, but older node-gyp v5 as bundled with npm v6.)

Taking a look at this error:

*** ERROR: ambiguous python shebang in /usr/share/atom-dev/resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.

That is a very strict lint. #!/usr/bin/env python should still work on most distros. I think this must either be configurable (possible to turn off) somehow in rpmbuild or else node-gyp is simply not bundleable with the latest rpmbuild on Fedora 33.

This error from the aggressive lint in rpmbuild would still apply to the latest node-gyp version:

https://github.com/nodejs/node-gyp/blob/v7.1.2/gyp/gyp_main.py#L1

Options:

  • Find a way to disable this lint in rpmbuild
  • Document the need to build on older Fedora or to build on Ubuntu (or is it "with older rpmbuild"???)
  • Lobby the node-gyp people to settle on a python3 shebang for a hypothetical upcoming major release.

I would also like to see if python redirects to python3 on Fedora 33. I think it does.

@DeeDeeG
Copy link
Contributor

DeeDeeG commented Feb 11, 2021

Relevant docs from the Fedora wiki about adopting this "ambiguous shebangs are an error" policy: https://fedoraproject.org/wiki/Changes/Make_ambiguous_python_shebangs_error

Points to:

I think that is the configuration we need to do. (In this file, I think: https://github.com/atom/atom/blob/master/resources/linux/redhat/atom.spec.in)

This seems like the easy way:

It is also possible to disable the functionality entirely by adding %undefine __brp_mangle_shebangs near the beginning of the specfile.

DeeDeeG@e6770cd (testing this as I get time).

@mfonville
Copy link
Contributor

Thanks for all the research and hints @DeeDeeG

@kogiokka could you try this PR?
#21960

mfonville added a commit to mfonville/atom that referenced this issue Feb 13, 2021
mfonville added a commit to mfonville/atom that referenced this issue Feb 13, 2021
DeeDeeG added a commit to DeeDeeG/atom that referenced this issue Feb 14, 2021
Fedora's script tries to coerce all shebangs
to point to exact, system-provided binaries.

For example: `#!/usr/bin/env sh` becomes `#!/usr/bin/sh`.

Starting with Fedora 30, the script errors out when it encounters
ambiguous, versionless `python` in shebangs.

(`python2` and `python3` are allowed.)

For example, this shebang causes an error: `#!/usr/bin/env python`.

---

Disable this script for two reasons:

1) Fedora users should be able to build Atom without errors.
2) Consistent shebangs across builds of Atom on Ubuntu and Fedora.

See: atom#21937 for more details.

Fixes: atom#21937
sadick254 pushed a commit that referenced this issue Feb 15, 2021
Fedora's script tries to coerce all shebangs
to point to exact, system-provided binaries.

For example: `#!/usr/bin/env sh` becomes `#!/usr/bin/sh`.

Starting with Fedora 30, the script errors out when it encounters
ambiguous, versionless `python` in shebangs.

(`python2` and `python3` are allowed.)

For example, this shebang causes an error: `#!/usr/bin/env python`.

---

Disable this script for two reasons:

1) Fedora users should be able to build Atom without errors.
2) Consistent shebangs across builds of Atom on Ubuntu and Fedora.

See: #21937 for more details.

Fixes: #21937
@kogiokka
Copy link
Author

Building the RPM package goes without a hitch. Thank you for the time and effort!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants