sparrowwallet / sparrow

Desktop Bitcoin Wallet focused on security and privacy. Free and open source.
https://sparrowwallet.com/
Apache License 2.0
1.37k stars 192 forks source link

Desktop Icon missing #722

Open gaarf opened 2 years ago

gaarf commented 2 years ago

after sudo dnf install sparrow-1.7.0-1.x86_64.rpm on Fedora 36, I no longer see a Sparrow application icon. The binary is present under /opt/sparrow/bin and runs ok but I can't launch it without using the terminal anymore.

gaarf commented 2 years ago

solved by adding the icon manually:

cd ~/.local/share/applications
wget https://raw.githubusercontent.com/sparrowwallet/sparrow/master/src/main/deploy/package/linux/Sparrow.desktop
craigraw commented 2 years ago

Odd - there have been no changes to the build process with respect to the RPM builds. I can see no obvious difference by listing the files from the 1.6.6 to the 1.7.0 rpm packages. What version were you upgrading from?

gaarf commented 2 years ago

Was upgrading from 1.6.6 - Tried uninstalling first and installing 1.7.0 directly, same result. RE-installing 1.6.6 = icon show up as expected.

reya01 commented 1 year ago

solved by adding the icon manually:

cd ~/.local/share/applications
wget https://raw.githubusercontent.com/sparrowwallet/sparrow/master/src/main/deploy/package/linux/Sparrow.desktop

had same problem on fedora and this also solved it, thanks

n1kcha commented 1 year ago

problem still remains on Fedora 38

f321x commented 1 year ago

same problem here on Fedora 38 and on Fedora 38 Qube in QubesOS

f321x commented 1 year ago

Same problem on Fedora 39

mattkwarren commented 7 months ago

solved by adding the icon manually:

cd ~/.local/share/applications
wget https://raw.githubusercontent.com/sparrowwallet/sparrow/master/src/main/deploy/package/linux/Sparrow.desktop

This still solves the issue on Fedora 39 with Sparrow 1.9.0, but it would be nice if the updates just added the desktop entry automatically or stopped deleting it. I don't have this issue with any other RPMs so I assume Sparrow is deleting the entry for some reason when updating.

craigraw commented 6 months ago

I'm struggling to reproduce this on Fedora 39. The Sparrow icon gets added and removed from the application menu as expected on installation and uninstallation.

To go into the details: Running

rpm -qlp --scripts sparrow-1.9.0-1.x86_64.rpm

shows a postinstall scriptlet which contains

xdg-desktop-menu install /opt/sparrow/lib/sparrow-Sparrow.desktop

There is a similar uninstall command in the preuninstall scriptlet.

mattkwarren commented 6 months ago

I'm struggling to reproduce this on Fedora 39. The Sparrow icon gets added and removed from the application menu as expected on installation and uninstallation.

To go into the details: Running

rpm -qlp --scripts sparrow-1.9.0-1.x86_64.rpm

shows a postinstall scriptlet which contains

xdg-desktop-menu install /opt/sparrow/lib/sparrow-Sparrow.desktop

There is a similar uninstall command in the preuninstall scriptlet.

The issue is with upgrading the RPM, not installing or uninstalling. Try installing the last version and then running the RPM of the current version. There shouldn't be an install or uninstall. The terminal should indicate that the package is being upgraded. This is the point at which the desktop entry is removed for some reason. It would make sense that you can't replicate the issue if you are manually uninstalling the application before installing the new version. I'm guessing we didn't think to do that because it isn't the standard way of upgrading RPMs. The expected process is to execute the new RPM and have the upgrade handled. My knowledge is limited, but it seems that something is going wrong during RPM upgrade rather than install or uninstall (I don't have issues in these cases either). The result will be that average users will think Sparrow is just gone from their desktop the first time they update it. This leaves the user stuck if they don't understand how desktop entries work. Thanks for your time.

craigraw commented 6 months ago

The issue is with upgrading the RPM, not installing or uninstalling.

Sorry if I wasn't clear. I can't reproduce this while upgrading either, using sudo dnf install sparrow-1.9.0-1.x86_64.rpm on a system where 1.8.5 was already installed. That said, I think my system may have been permanently 'fixed' by running xdg-desktop-menu install /opt/sparrow/lib/sparrow-Sparrow.desktop earlier.

Taking a look at the output below, it appears dnf is running the uninstall scriptlet from 1.8.5 after the install scriptlet for 1.9.0. This makes little sense to me, but there it is:

> sudo dnf install sparrow-1.9.0-1.x86_64.rpm
Last metadata expiration check: 4:39:54 ago on Thu 09 May 2024 09:10:57.
Dependencies resolved.
================================================================================
 Package          Architecture    Version           Repository             Size
================================================================================
Upgrading:
 sparrow          x86_64          1.9.0-1           @commandline          103 M

Transaction Summary
================================================================================
Upgrade  1 Package

Total size: 103 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Upgrading        : sparrow-1.9.0-1.x86_64                                 1/2
  Running scriptlet: sparrow-1.9.0-1.x86_64                                 1/2
  Running scriptlet: sparrow-1.8.5-1.x86_64                                 2/2
Remove sparrow-Sparrow.desktop default handler for application/psbt mime type from /usr/local/share/applications/defaults.list file
Remove sparrow-Sparrow.desktop default handler for application/bitcoin-transaction mime type from /usr/local/share/applications/defaults.list file
Remove sparrow-Sparrow.desktop default handler for application/pgp-signature mime type from /usr/local/share/applications/defaults.list file
Remove sparrow-Sparrow.desktop default handler for x-scheme-handler/bitcoin mime type from /usr/local/share/applications/defaults.list file
Remove sparrow-Sparrow.desktop default handler for x-scheme-handler/auth47 mime type from /usr/local/share/applications/defaults.list file
Remove sparrow-Sparrow.desktop default handler for x-scheme-handler/lightning mime type from /usr/local/share/applications/defaults.list file
/usr/local/share/applications/defaults.list file updated

  Cleanup          : sparrow-1.8.5-1.x86_64                                 2/2
  Verifying        : sparrow-1.9.0-1.x86_64                                 1/2
  Verifying        : sparrow-1.8.5-1.x86_64                                 2/2

Upgraded:
  sparrow-1.9.0-1.x86_64

Complete!

Without an explanation, this appears to a bug in dnf. Certainly I can't imagine how I can fix it on my side.

dayer3 commented 1 week ago

Hi, The problem about upgrading carry on in Fedora 41 (dnf5) and Sparrow 2.0.0:

$ sudo dnf update sparrow-2.0.0-1.x86_64.rpm
Updating and loading repositories:
 Fedora 41 - x86_64 - Updates                                                                                           100% |  72.2 KiB/s |  29.7 KiB |  00m00s
 Fedora 41 - x86_64                                                                                                     100% | 154.3 KiB/s |  27.5 KiB |  00m00s
 Fedora 41 - x86_64 - Updates                                                                                           100% |   2.3 MiB/s |   1.8 MiB |  00m01s
Repositories loaded.
Package                                               Arch         Version                                               Repository                         Size
Upgrading:
 sparrow                                              x86_64       2.0.0-1                                               @commandline                  135.4 MiB
   replacing sparrow                                  x86_64       1.9.1-1                                               @commandline                  126.7 MiB

Transaction Summary:
 Upgrading:          1 package
 Replacing:          1 package

Total size of inbound packages is 109 MiB. Need to download 0 B.
After this operation, 9 MiB extra will be used (install 135 MiB, remove 127 MiB).
Is this ok [y/N]: y
Running transaction
[1/4] Verify package files                                                                                              100% |   2.0   B/s |   1.0   B |  00m00s
[2/4] Prepare transaction                                                                                               100% |   4.0   B/s |   2.0   B |  00m00s
[3/4] Upgrading sparrow-0:2.0.0-1.x86_64                                                                                100% |  14.0 MiB/s | 135.5 MiB |  00m10s
>>> Running pre-uninstall scriptlet: sparrow-0:1.9.1-1.x86_64
>>> Finished pre-uninstall scriptlet: sparrow-0:1.9.1-1.x86_64
>>> Scriptlet output:
>>> Remove sparrow-Sparrow.desktop default handler for application/psbt mime type from /usr/local/share/applications/defaults.list file
>>> Remove sparrow-Sparrow.desktop default handler for application/bitcoin-transaction mime type from /usr/local/share/applications/defaults.list file
>>> Remove sparrow-Sparrow.desktop default handler for application/pgp-signature mime type from /usr/local/share/applications/defaults.list file
>>> Remove sparrow-Sparrow.desktop default handler for x-scheme-handler/bitcoin mime type from /usr/local/share/applications/defaults.list file
>>> Remove sparrow-Sparrow.desktop default handler for x-scheme-handler/auth47 mime type from /usr/local/share/applications/defaults.list file
>>> Remove sparrow-Sparrow.desktop default handler for x-scheme-handler/lightning mime type from /usr/local/share/applications/defaults.list file
>>> /usr/local/share/applications/defaults.list file updated
>>> 
[4/4] Removing sparrow-0:1.9.1-1.x86_64                                                                                 100% | 363.0   B/s | 175.0   B |  00m00s
Warning: skipped PGP checks for 1 package from repository: @commandline
Complete!

Could it be a dnf bug?

Regards