electron-userland / electron-installer-redhat

Create a Red Hat / RPM package for your Electron app.
MIT License
81 stars 44 forks source link

Unable to build package with webpack externals on Fedora 33 #242

Closed captainhusaynpenguin closed 2 years ago

captainhusaynpenguin commented 2 years ago

What version of electron-installer-redhat are you using?

3.3.0

What version of node and npm are you using?

7.20.5

What operating system are you using?

Fedora 33

Can you compile the example app successfully?

Yes.

What did you do? Please include the configuration you are using for electron-installer-redhat.

I'm trying to build an electron app on a Fedora 33 machine via electron-forge and web-pack. Everything works fine on electron-builder, however I decided to switch to electron-forge. I got everything working for running the app via yarn start. Basically firing the app without building it. However, when building the app, I'm getting into problems I can't solve even with the help of researching on the web.

The peculiar aspect is including knex and sqlite3 as externals on webpack and having them bundled as Node.js bindings.

To be honest, everything works perfectly and this is quite a specific issue, but I think, it is related to this package. Though I'm not sure I'm totally correct.

So, here is what I found out so far: Fedora has decided to force a restrictive Shebang line as described here since version 33: https://fedoraproject.org/wiki/Changes/Make_ambiguous_python_shebangs_error

and this issue was also happening over at Atom editor, which is built on electron, and the choose for ignoring that policy altogether: https://github.com/atom/atom/pull/21964/files by disabling it.

and here is their discussion for why they did so: https://github.com/atom/atom/pull/21964

and the original bug: https://github.com/atom/atom/issues/21937

It could be a problem at Sqlite3's side, but I kind of not sure about that, since the command line screams about lacking shebang in tons of files, ranging from LICENSE to *.js files.

After some googling I ended up using @timfish/forge-externals-plugin which did made everything work like the electron-build would, but when packaging it, it fails. That's the best state I could get my project to, so far.

Another possible cause could be that there are multiple versions of python on my system, but then again, it looks like Fedora had already moved to python 3 before I even configured this system [see here: https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3#Phase_4:_Retire_Python_2_for_other_packages.2C_but_keep_it_around_for_developers_and_users]. So, I imagine the version 2 is just there because some programming hobbies of mine required it or something. But the default is 3 and I don't think, that's the cause.

I also tried replacing sqlite3 with better-sqlite3 but knex is still unrealased with support for better-sqlite3. My workaround was to download the knex and link it via yarn. Everything worked, but when building the application, again yarn make resulted in the error that:

✔ Preparing native dependencies: 2 / 2
✔ Compiling Main Process Code
✔ Compiling Renderer Template
✔ Preparing to Package Application for arch: x64
✖ Preparing native dependencies

An unhandled error has occurred inside Forge:
ENOENT: no such file or directory, stat '/tmp/electron-packager/linux-x64/blueprints-linux-x64/resources/app/node_modules/knex'
Error: ENOENT: no such file or directory, stat '/tmp/electron-packager/linux-x64/blueprints-linux-x64/resources/app/node_modules/knex'

Which when I checked there was a symlink there, but apparantly whatever underlying code is doing to call the respective repo, it is not doing a good job at working seamlessly regardless of whether a package is installed or it is sourced via linking.

I think these errors are reproducable, with other projects and libraries, in case they are bundled up externally. Of coruse, it is not a super common approach but maybe these hinderances are a contributive factor.

What did you expect to happen?

Everything to work somehwhat smoothly [maybe with a little hassle but not days after days hassle ;-)]. I mean, your package, this issue asdie, seems to work awesomely :+1: So, well done on that.

What actually happened?

[husayngonzalez@fedora blueprints]$ yarn make
✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing native dependencies: 2 / 2
✔ Compiling Main Process Code
✔ Compiling Renderer Template
✔ Preparing to Package Application for arch: x64
✔ Preparing native dependencies
✔ Packaging Application
Making for the following targets: deb, rpm
✔ Making for target: deb - On platform: linux - For arch: x64
✖ Making for target: rpm - On platform: linux - For arch: x64

An unhandled error has occurred inside Forge:
An error occured while making for target: rpm
Command failed with a non-zero return code (1):
rpmbuild -bb /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/SPECS/blueprints.spec --target x86_64 --define _topdir /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64
Building target platforms: x86_64
Building for target x86_64
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.iZomxH
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/node-addon-api/tools/conversion.js from /usr/bin/env node to #!/usr/bin/node
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/performance-now/test/scripts/delayed-call.coffee from /usr/bin/env ./node_modules/.bin/coffee to #!/usr/bin/./node_modules/.bin/coffee
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/performance-now/test/scripts/delayed-require.coffee from /usr/bin/env ./node_modules/.bin/coffee to #!/usr/bin/./node_modules/.bin/coffee
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/performance-now/test/scripts/difference.coffee from /usr/bin/env ./node_modules/.bin/coffee to #!/usr/bin/./node_modules/.bin/coffee
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/performance-now/test/scripts/initial-value.coffee from /usr/bin/env ./node_modules/.bin/coffee to #!/usr/bin/./node_modules/.bin/coffee
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/rc/cli.js from /usr/bin/env node to #!/usr/bin/node
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/Dockerfile from /bin/echo docker build . -f to #!/usr/bin/echo docker build . -f
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/build/Release/obj/gen/sqlite-autoconf-3340000/compile from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/build/Release/obj/gen/sqlite-autoconf-3340000/config.guess from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/build/Release/obj/gen/sqlite-autoconf-3340000/config.sub from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/build/Release/obj/gen/sqlite-autoconf-3340000/configure from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/build/Release/obj/gen/sqlite-autoconf-3340000/depcomp from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/build/Release/obj/gen/sqlite-autoconf-3340000/install-sh from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/build/Release/obj/gen/sqlite-autoconf-3340000/missing from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/build/Release/obj/gen/sqlite-autoconf-3340000/tea/configure from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/node_modules/node-gyp/gyp/gyp from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/node_modules/node-gyp/test/docker.sh from /bin/bash to #!/usr/bin/bash
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/tools/docker/architecture/linux-arm/Dockerfile from /bin/echo docker build . -f to #!/usr/bin/echo docker build . -f
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/tools/docker/architecture/linux-arm/run.sh from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/tools/docker/architecture/linux-arm64/Dockerfile from /bin/echo docker build . -f to #!/usr/bin/echo docker build . -f
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/tools/docker/architecture/linux-arm64/run.sh from /bin/sh to #!/usr/bin/sh

RPM build errors:

+ umask 022
+ cd /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/BUILD
+ '[' /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/BUILDROOT/blueprints-1.0.0-1.fc33.x86_64 '!=' / ']'
+ rm -rf /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/BUILDROOT/blueprints-1.0.0-1.fc33.x86_64
++ dirname /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/BUILDROOT/blueprints-1.0.0-1.fc33.x86_64
+ mkdir -p /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/BUILDROOT
+ mkdir /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/BUILDROOT/blueprints-1.0.0-1.fc33.x86_64
+ mkdir -p /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/BUILDROOT/blueprints-1.0.0-1.fc33.x86_64/usr/
+ cp -r usr/bin usr/lib usr/share /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/BUILDROOT/blueprints-1.0.0-1.fc33.x86_64/usr/
+ /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/lib/blueprints/resources/app/node_modules/ecc-jsbn/LICENSE is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/ecc-jsbn/README.md is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/ecc-jsbn/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/ecc-jsbn/lib/LICENSE-jsbn is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/ecc-jsbn/lib/ec.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/ecc-jsbn/lib/sec.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/ecc-jsbn/test.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/rc/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/request/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/sqlite3/deps/sqlite3.gyp is executable but has no shebang, removing executable bit
*** ERROR: ambiguous python shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/node_modules/node-gyp/gyp/samples/samples: #!/usr/bin/python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/node_modules/node-gyp/gyp/setup.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/node_modules/node-gyp/gyp/tools/pretty_vcproj.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/LICENSE is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/README.md is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/es5/uri.all.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/es5/uri.all.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/es5/uri.all.min.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/es5/uri.all.min.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/index.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/regexps-iri.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/regexps-iri.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/regexps-uri.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/regexps-uri.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/http.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/http.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/https.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/https.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/mailto.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/urn.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/urn.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/ws.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/ws.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/wss.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/wss.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/uri.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/uri.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/util.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/util.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/yarn.lock is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/wide-align/LICENSE is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/wide-align/README.md is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/wide-align/align.js is executable but has no shebang, removing executable bit
error: Bad exit status from /var/tmp/rpm-tmp.iZomxH (%install)
    Bad exit status from /var/tmp/rpm-tmp.iZomxH (%install)
Error: Command failed with a non-zero return code (1):
rpmbuild -bb /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/SPECS/blueprints.spec --target x86_64 --define _topdir /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64
Building target platforms: x86_64
Building for target x86_64
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.iZomxH
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/node-addon-api/tools/conversion.js from /usr/bin/env node to #!/usr/bin/node
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/performance-now/test/scripts/delayed-call.coffee from /usr/bin/env ./node_modules/.bin/coffee to #!/usr/bin/./node_modules/.bin/coffee
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/performance-now/test/scripts/delayed-require.coffee from /usr/bin/env ./node_modules/.bin/coffee to #!/usr/bin/./node_modules/.bin/coffee
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/performance-now/test/scripts/difference.coffee from /usr/bin/env ./node_modules/.bin/coffee to #!/usr/bin/./node_modules/.bin/coffee
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/performance-now/test/scripts/initial-value.coffee from /usr/bin/env ./node_modules/.bin/coffee to #!/usr/bin/./node_modules/.bin/coffee
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/rc/cli.js from /usr/bin/env node to #!/usr/bin/node
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/Dockerfile from /bin/echo docker build . -f to #!/usr/bin/echo docker build . -f
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/build/Release/obj/gen/sqlite-autoconf-3340000/compile from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/build/Release/obj/gen/sqlite-autoconf-3340000/config.guess from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/build/Release/obj/gen/sqlite-autoconf-3340000/config.sub from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/build/Release/obj/gen/sqlite-autoconf-3340000/configure from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/build/Release/obj/gen/sqlite-autoconf-3340000/depcomp from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/build/Release/obj/gen/sqlite-autoconf-3340000/install-sh from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/build/Release/obj/gen/sqlite-autoconf-3340000/missing from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/build/Release/obj/gen/sqlite-autoconf-3340000/tea/configure from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/node_modules/node-gyp/gyp/gyp from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/node_modules/node-gyp/test/docker.sh from /bin/bash to #!/usr/bin/bash
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/tools/docker/architecture/linux-arm/Dockerfile from /bin/echo docker build . -f to #!/usr/bin/echo docker build . -f
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/tools/docker/architecture/linux-arm/run.sh from /bin/sh to #!/usr/bin/sh
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/tools/docker/architecture/linux-arm64/Dockerfile from /bin/echo docker build . -f to #!/usr/bin/echo docker build . -f
mangling shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/tools/docker/architecture/linux-arm64/run.sh from /bin/sh to #!/usr/bin/sh

RPM build errors:

+ umask 022
+ cd /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/BUILD
+ '[' /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/BUILDROOT/blueprints-1.0.0-1.fc33.x86_64 '!=' / ']'
+ rm -rf /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/BUILDROOT/blueprints-1.0.0-1.fc33.x86_64
++ dirname /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/BUILDROOT/blueprints-1.0.0-1.fc33.x86_64
+ mkdir -p /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/BUILDROOT
+ mkdir /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/BUILDROOT/blueprints-1.0.0-1.fc33.x86_64
+ mkdir -p /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/BUILDROOT/blueprints-1.0.0-1.fc33.x86_64/usr/
+ cp -r usr/bin usr/lib usr/share /tmp/electron-installer--68917-BNzCPzRiYtZP/blueprints_1.0.0_x86_64/BUILDROOT/blueprints-1.0.0-1.fc33.x86_64/usr/
+ /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/lib/blueprints/resources/app/node_modules/ecc-jsbn/LICENSE is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/ecc-jsbn/README.md is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/ecc-jsbn/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/ecc-jsbn/lib/LICENSE-jsbn is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/ecc-jsbn/lib/ec.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/ecc-jsbn/lib/sec.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/ecc-jsbn/test.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/rc/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/request/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/sqlite3/deps/sqlite3.gyp is executable but has no shebang, removing executable bit
*** ERROR: ambiguous python shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/node_modules/node-gyp/gyp/samples/samples: #!/usr/bin/python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/node_modules/node-gyp/gyp/setup.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** ERROR: ambiguous python shebang in /usr/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/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/lib/blueprints/resources/app/node_modules/sqlite3/node_modules/node-gyp/gyp/tools/pretty_vcproj.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/LICENSE is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/README.md is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/es5/uri.all.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/es5/uri.all.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/es5/uri.all.min.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/es5/uri.all.min.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/index.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/index.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/regexps-iri.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/regexps-iri.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/regexps-uri.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/regexps-uri.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/http.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/http.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/https.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/https.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/mailto.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/urn.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/urn.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/ws.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/ws.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/wss.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/schemes/wss.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/uri.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/uri.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/util.d.ts is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/dist/esnext/util.js is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/uri-js/yarn.lock is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/wide-align/LICENSE is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/wide-align/README.md is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/blueprints/resources/app/node_modules/wide-align/align.js is executable but has no shebang, removing executable bit
error: Bad exit status from /var/tmp/rpm-tmp.iZomxH (%install)
    Bad exit status from /var/tmp/rpm-tmp.iZomxH (%install)
    at ChildProcess.<anonymous> (/home/husayngonzalez/Codes/NVU/Blueprints/0.1.x/0.1.0/blueprints/node_modules/electron-installer-redhat/node_modules/@malept/cross-spawn-promise/src/index.ts:172:16)
    at ChildProcess.emit (events.js:400:28)
    at ChildProcess.emit (domain.js:470:12)
    at maybeClose (internal/child_process.js:1055:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
fcastilloec commented 2 years ago

As you have noticed, this is not an error with our module but rather with all the files/modules you're using and the new policy on Fedora. Some of the warnings could go away if you change some files permissions (i.e. README.md doesn't need to be an executable). For all the python ones (the errors), you'd have to talk to the creators of those packages or you can change the shebang of those files (as per your links). Here's the pathfix.py script mentioned in your links. You could run it before packaging the app, pointing to the files listed in the errors. I didn't look at the script itself, so I wouldn't be able to help you run it.

As per having an option on the spec file that disables the new shebang policy (similar to what atom is doing), we have discussed introducing a template for the spec file (see https://github.com/electron-userland/electron-installer-redhat/issues/190#issuecomment-817199074) but I don't think that'll happen quickly enough.

I think I'm going to mark this as a duplicate of #190 since fixing both needs a spec template.