PKGBUILD assistance request

I'm now building mullvad-vpn from source, but somehow I can't reproduce my successful build now npm is failing.

WIP PKGBUILD

Build log

For some reason, npm isn't finishing and the dist/linux-unpacked directory isn't created and populated. I'm at a loss now.

EDIT: It builds! It's updated now.

maybe renaming dist to dist-assets?

No, npm creates the dist folder. I had forgotten that I had removed npm run pack:linux. See the updated PKGBUILD & build log above.

I usually manage my node with nvm - I avoid installing npm packages using sudo.

I got the same error - you are missing the gulp package.

npm install -g gulp
Cannot package the path '/home/fh/pkgbuilds/mullvad-vpn/src/mullvadvpn-app/dist-assets/mullvad', does it exist?", :level=>:error}

The error messages on my system indicates the script is trying to build a deb package.

There seems to be missing a build sequence somewhere in the PKGBUID because files are missing which the npm run pack:linux looks for.

If you look at the yaml file in the dist folder - there is something missing.

I already had installed gulp via pacman.
EDIT: Also, shouldn't it use gui/node_modules/gulp/?

I just tried gulp pack-linux:

[12:47:02] Starting 'pack-linux'...
[12:47:02] Starting 'build'...
[12:47:02] Starting 'clean'...
[12:47:02] Finished 'clean' after 39 ms
[12:47:02] Starting 'copy-static-assets'...
[12:47:02] Starting 'copy-config'...
[12:47:02] Starting 'copy-css'...
[12:47:02] Starting 'copy-html'...
[12:47:02] Starting 'copy-locales'...
[12:47:02] Finished 'copy-config' after 88 ms
[12:47:02] Finished 'copy-html' after 88 ms
[12:47:02] Finished 'copy-css' after 92 ms
[12:47:02] Finished 'copy-locales' after 191 ms
[12:47:02] Finished 'copy-static-assets' after 216 ms
[12:47:02] Starting 'compile-scripts'...
[12:47:11] Finished 'compile-scripts' after 9.12 s
[12:47:11] Finished 'build' after 9.37 s
[12:47:11] Starting 'builder-linux'...
  • electron-builder  version=21.2.0 os=5.4.1-2-MANJARO
  • writing effective config  file=/home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist/builder-effective-config.yaml
  • packaging       platform=linux arch=x64 electron=6.0.3 appOutDir=/home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist/linux-unpacked
  • file source doesn't exist  from=/home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist-assets/relays.json
  • file source doesn't exist  from=/home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist-assets/mullvad-problem-report
  • file source doesn't exist  from=/home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist-assets/mullvad-daemon
  • file source doesn't exist  from=/home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist-assets/libtalpid_openvpn_plugin.so
  • building        target=deb arch=x64 file=/home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist/MullvadVPN-2019.9.0_amd64.deb
  ⨯ cannot execute  cause=exit status 1
                    out={:timestamp=>"2019-12-02T12:47:16.895697-0700", :message=>"Invalid package configuration: Cannot package the path '/home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist-assets/mullvad', does it exist?", :level=>:error}
    
                    command=/home/yochanan/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64/fpm -s dir --force -t deb -d iputils-ping --deb-compression xz --architecture amd64 --name mullvad-vpn --after-install /tmp/t-c3hOwK/1-after-install.sh --after-remove /tmp/t-c3hOwK/3-after-remove.sh --description '
     Mullvad VPN client' --version 2019.9.0 --package /home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist/MullvadVPN-2019.9.0_amd64.deb --maintainer 'Mullvad VPN <support@mullvad.net>' --url 'https://github.com/mullvad/mullvadvpn-app#readme' --vendor 'Mullvad VPN <support@mullvad.net>' --license GPL-3.0 --before-install /home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist-assets/linux/before-install.sh --before-remove /home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist-assets/linux/before-remove.sh --config-files '/opt/Mullvad VPN/resources/mullvad-daemon.service' --config-files '/opt/Mullvad VPN/resources/mullvad-daemon.conf' /home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist-assets/mullvad=/usr/bin/ /home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist-assets/linux/problem-report-link=/usr/bin/mullvad-problem-report '/home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist/linux-unpacked/=/opt/Mullvad VPN' /home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist/.icon-set/icon_16x16.png=/usr/share/icons/hicolor/16x16/apps/mullvad-vpn.png /home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist/.icon-set/icon_32.png=/usr/share/icons/hicolor/32x32/apps/mullvad-vpn.png /home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist/.icon-set/icon_48x48.png=/usr/share/icons/hicolor/48x48/apps/mullvad-vpn.png /home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist/.icon-set/icon_64.png=/usr/share/icons/hicolor/64x64/apps/mullvad-vpn.png /home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist/.icon-set/icon_128.png=/usr/share/icons/hicolor/128x128/apps/mullvad-vpn.png /home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist/.icon-set/icon_256.png=/usr/share/icons/hicolor/256x256/apps/mullvad-vpn.png /home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist/.icon-set/icon_512.png=/usr/share/icons/hicolor/512x512/apps/mullvad-vpn.png /home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/dist/.icon-set/icon_1024.png=/usr/share/icons/hicolor/1024x1024/apps/mullvad-vpn.png '/tmp/t-c3hOwK/4-Mullvad VPN.desktop=/usr/share/applications/mullvad-vpn.desktop'
                    workingDir=
[12:47:16] 'builder-linux' errored after 5.47 s
[12:47:16] Error: /home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/gui/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
    at ChildProcess.<anonymous> (/home/yochanan/Documents/AUR/mullvad-vpn/src/mullvadvpn-app/gui/node_modules/builder-util/src/util.ts:239:14)
    at Object.onceWrapper (events.js:300:26)
    at ChildProcess.emit (events.js:210:5)
    at ChildProcess.EventEmitter.emit (domain.js:540:23)
    at maybeClose (internal/child_process.js:1023:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:281:5)
[12:47:16] 'pack-linux' errored after 15 s

Most of those file are in target/release.

I figured it out and it builds, but now I can't upload it to the AUR. I updated the first post with the error.

Forum kindly sponsored by