wireapp / wire-desktop

:computer: Wire for desktop
https://wire.com/download/
GNU General Public License v3.0
1.08k stars 236 forks source link

Troubleshooting PKGBUILD breakage #1735

Closed ConorIA closed 6 years ago

ConorIA commented 6 years ago

Can you folks help me troubleshoot the failed build on 3.3.2872.

Steps:

(base) ~/git/wire-desktop >>>   $(npm bin)/grunt 'linux-other'                                                               ±[●][master]
Running "clean:linux" (clean) task
>> 0 paths cleaned.

Running "update-keys" task

Running "gitinfo" task

Running "release-prod" task
Releases URL points to https://wire-app.wire.com/win/prod/ OK

Running "bundle" task

Running "electronbuilder:linux_other" (electronbuilder) task
  • electron-builder version=20.28.4
  • loaded configuration file=package.json ("build" field)
Warning: Configuration is invalid.
 - configuration.linux should be one of these:                                                                                            
   object { appId?, artifactName?, asar?, asarUnpack?, category?, compression?, cscKeyPassword?, cscLink?, depends?, description?, desktop?, detectUpdateChannel?, electronUpdaterCompatibility?, executableName?, extraFiles?, extraResources?, fileAssociations?, files?, forceCodeSigning?, generateUpdatesFilesForAllChannels?, icon?, maintainer?, mimeTypes?, packageCategory?, protocols?, publish?, releaseInfo?, synopsis?, target?, vendor? } | {
     "type": "null"
   }
   Options related to how build Linux targets.

   Details:
    * configuration.linux has an unknown property 'afterInstall'. These properties are valid:
      object { appId?, artifactName?, asar?, asarUnpack?, category?, compression?, cscKeyPassword?, cscLink?, depends?, description?, desktop?, detectUpdateChannel?, electronUpdaterCompatibility?, executableName?, extraFiles?, extraResources?, fileAssociations?, files?, forceCodeSigning?, generateUpdatesFilesForAllChannels?, icon?, maintainer?, mimeTypes?, packageCategory?, protocols?, publish?, releaseInfo?, synopsis?, target?, vendor? }
    * configuration.linux has an unknown property 'afterRemove'. These properties are valid:
      object { appId?, artifactName?, asar?, asarUnpack?, category?, compression?, cscKeyPassword?, cscLink?, depends?, description?, desktop?, detectUpdateChannel?, electronUpdaterCompatibility?, executableName?, extraFiles?, extraResources?, fileAssociations?, files?, forceCodeSigning?, generateUpdatesFilesForAllChannels?, icon?, maintainer?, mimeTypes?, packageCategory?, protocols?, publish?, releaseInfo?, synopsis?, target?, vendor? }
    * configuration.linux has an unknown property 'fpm'. These properties are valid:
      object { appId?, artifactName?, asar?, asarUnpack?, category?, compression?, cscKeyPassword?, cscLink?, depends?, description?, desktop?, detectUpdateChannel?, electronUpdaterCompatibility?, executableName?, extraFiles?, extraResources?, fileAssociations?, files?, forceCodeSigning?, generateUpdatesFilesForAllChannels?, icon?, maintainer?, mimeTypes?, packageCategory?, protocols?, publish?, releaseInfo?, synopsis?, target?, vendor? }
    * configuration.linux should be null:
      {
        "type": "null"
      }

How to fix:
1. Open https://electron.build/configuration/configuration
2. Search the option name on the page.
  * Not found? The option was deprecated or not exists (check spelling).
  * Found? Check that the option in the appropriate place. e.g. "title" only in the "dmg", not in the root.
 Use --force to continue.

Aborted due to warnings.

EDIT (2): The following changes allow the build to continue, but aren't a universal fix as they will break the deb stuff

diff --git a/Gruntfile.js b/Gruntfile.js
index c3fa454..64786ab 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -28,8 +28,6 @@ const PACKAGE_JSON = 'package.json';
 const INFO_JSON = 'info.json';

 const LINUX_SETTINGS = {
-  afterInstall: 'bin/deb/after-install.tpl',
-  afterRemove: 'bin/deb/after-remove.tpl',
   category: 'Network',
   desktop: {
     Version: '<%= info.version %>.<%= buildNumber %>',
@@ -39,7 +37,7 @@ const LINUX_SETTINGS = {
     Keywords: 'chat;encrypt;e2e;messenger;videocall',
     StartupWMClass: '<%= info.name %>',
   },
-  fpm: ['--name', 'wire-desktop'],
+  executableName: 'wire-desktop'
 };

 module.exports = function(grunt) {
@@ -200,8 +198,7 @@ module.exports = function(grunt) {
         options: {
           arch: grunt.option('arch') || process.arch,
           linux: {
-            ...LINUX_SETTINGS,
-            fpm: ['--name', 'wire-desktop'],
+            ...LINUX_SETTINGS
           },
           targets: [grunt.option('target') || 'dir'],
         },
ffflorian commented 6 years ago

Hi @ConorIA, thanks for flagging.

Does this patch help you creating the correct package?

diff --git a/Gruntfile.js b/Gruntfile.js
index c3fa454..7714783 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -200,9 +200,10 @@ module.exports = function(grunt) {
         options: {
           arch: grunt.option('arch') || process.arch,
           linux: {
-            ...LINUX_SETTINGS,
-            fpm: ['--name', 'wire-desktop'],
+            category: 'Network',
+            executableName: 'wire-desktop',
           },
+          productName: 'wire-desktop',
           targets: [grunt.option('target') || 'dir'],
         },
       },
ConorIA commented 6 years ago

@ffflorian, I'm getting complaints about the before/afterinstall in LINUX_SETTINGS and the fpm config line as being invalid configuration options. I can rebuild using the patch in my comment. I think the fpm is no longer necessary if replaced with executable_name, but where to put the before/after install. Perhaps under the Deb target?

EDIT: Sorry, @ffflorian. I don't know what I was answering when I woke up this morning. Yes. the provided patch works fine to fix the build. If it doesn't break anything else, then it should be included in the next release. Cheers!

ConorIA commented 6 years ago

And just in case you don't see the edit above, pinging @ffflorian!

ConorIA commented 6 years ago

While we're looking at the Gruntfile, if I am not mistaken, LINUX_SETTINGS -> desktop -> Version refers to the .desktop file version (i.e. spec 1.1), and shouldn't be '<%= info.version %>.<%= buildNumber %>'.

ffflorian commented 6 years ago

Thanks, I'll have a look tomorrow!