bruno icon indicating copy to clipboard operation
bruno copied to clipboard

docs(#1036): Update linux installation instructions via apt

Open Nikolai2038 opened this issue 2 years ago • 9 comments

Description

Fix #1036 - I modify instructions in READMEs to avoid two errors when installing Bruno in Linux via Apt (see issue for more info).

Contribution Checklist:

  • [x] The pull request only addresses one issue or adds one feature.
  • [x] The pull request does not introduce any breaking changes
  • [x] I have added screenshots or gifs to help explain the change if applicable.
  • [x] I have read the contribution guidelines.
  • [x] Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Nikolai2038 avatar Nov 23 '23 13:11 Nikolai2038

  • Added instruction to install gpg (I tried on new Debian WSL, and it is not installed by default).

  • Fixed instruction to create /root/.gnupg directory - with correct rights to avoid this warning:

    gpg: WARNING: unsafe permissions on homedir '/root/.gnupg'
    

Nikolai2038 avatar Nov 29 '23 07:11 Nikolai2038

Not sure, but feels like #1203 is related.

nielsbom avatar Dec 11 '23 14:12 nielsbom

These instructions worked for me after a lot of searching online. Mostly, the sudo mkdir -m 700 -p /root/.gnupg. Not sure why this is needed, but it is.

antony avatar Mar 19 '24 16:03 antony

This is definitely not necessary on LinuxMint and should not be added as a general rule. To add anything manually into /root/ just to satisfy missing configuration to install something sounds crazy! Find out the cause and what is the standard fix. Is this happening only on debian? Is it happening only if you don't have previously gpg installed?

Btw, there is already the instruction sudo gpg --no-default-keyring --keyring /etc/apt/keyrings/bruno.gpg --keyserver keyserver.ubuntu.com --recv-keys 9FA6017ECABE0266 That should already error out without a working gpg right?

janos-r avatar Mar 25 '24 23:03 janos-r

My gpg was configured and already in use.

I searched comprehensively for a fix, to no avail.

Only creating this thing in root fixed it - I'm using Pop_Os

antony avatar Mar 26 '24 14:03 antony

Ok, I tried on a fresh linuxMint install in a VM and this is my result: gpg is preinstalled, but if you never ran it before, than it didn't yet create the .gnupg folder in either /root/ or ~/ I don't know why gpg doesn't create it automatically when importing this key, but rather than creating the folder manually, it is better to let gpg create it. It also creates your own public key and other files that belong there! As explained in https://www.redhat.com/sysadmin/getting-started-gpg

So ok, I agree this check can be part of the install script for linux. But instead of doing it with mkdir, it can be checked with just sudo gpg --list-keys. It will either list the subscribed public keys under root (there shouldn't be any, normally you don't need sudo to verify files) or it will create the folder with everything that belongs there:

$ gpg --list-keys
gpg: directory '/home/bestuser/.gnupg' created
gpg: keybox '/home/bestuser/.gnupg/pubring.kbx' created
gpg: /home/bestuser/.gnupg/trustdb.gpg: trustdb created

janos-r avatar Mar 27 '24 23:03 janos-r

I confirm sudo gpg --list-keys creates the needed /root/.gnupg directory, thanks!

kinuax avatar May 20 '24 19:05 kinuax

@Nikolai2038

All looks good. I would need to review this part to make sure that all of these are really needed. And that will take time.

deb: {
    // Docs: https://www.electron.build/configuration/linux#debian-package-options
    depends: [
      'libgtk-3-0',
      'libnotify4',
      'libnss3',
      'libxss1',
      'libxtst6',
      'xdg-utils',
      'libatspi2.0-0',
      'libuuid1',
      'libsecret-1-0',
      'libasound2' // #1036
    ]
  },

Can you submit the above part as a separate PR and keep this PR just to update the linux install instructions ?

helloanoop avatar May 22 '24 19:05 helloanoop

@helloanoop Thanks for the response! I updated this branch and created separate pull request.

Nikolai2038 avatar May 22 '24 19:05 Nikolai2038

I was trying to install Bruno on my "Pop!_OS 22.04 LTS" from the repository and encountered an issue because the /root/.gnupg directory did not exist.

Here the error I received:

$ sudo gpg --no-default-keyring --keyring /etc/apt/keyrings/bruno.gpg --keyserver keyserver.ubuntu.com --recv-keys 9FA6017ECABE0266
gpg: keybox '/etc/apt/keyrings/bruno.gpg' created
gpg: failed to create temporary file '/root/.gnupg/.#lk0x0000589d4cd992d0.pop-os.24118': No such file or directory
gpg: connecting dirmngr at '/root/.gnupg/S.dirmngr' failed: No such file or directory
gpg: keyserver receive failed: No dirmngr

I solved with:

$ sudo gpg --list-keys
gpg: directory '/root/.gnupg' created
gpg: keybox '/root/.gnupg/pubring.kbx' created
gpg: /root/.gnupg/trustdb.gpg: trustdb created

I am writing this comment because once this pull request is merged, the instructions at http://debian.usebruno.com/ should also be updated accordingly.

gioisco avatar Dec 08 '24 23:12 gioisco

I was trying to install Bruno via apt but didnt work but with this approach it works. Thank you for this contribution! @Nikolai2038

JoaoGesser avatar Apr 03 '25 12:04 JoaoGesser

@Nikolai2038

All looks good. I would need to review this part to make sure that all of these are really needed. And that will take time.

deb: {
    // Docs: https://www.electron.build/configuration/linux#debian-package-options
    depends: [
      'libgtk-3-0',
      'libnotify4',
      'libnss3',
      'libxss1',
      'libxtst6',
      'xdg-utils',
      'libatspi2.0-0',
      'libuuid1',
      'libsecret-1-0',
      'libasound2' // #1036
    ]
  },

...

@helloanoop

libasound2 is the only addition here, the reset are already part of default value as documented here. Can also confirm the same form the .deb build.

$ dpkg-deb -R bruno_2.5.0_arm64_linux.deb out
$ cat out/DEBIAN/control | grep Dep
Depends: libgtk-3-0, libnotify4, libnss3, libxss1, libxtst6, xdg-utils, libatspi2.0-0, libuuid1, libsecret-1-0

ramki-bruno avatar Jun 12 '25 12:06 ramki-bruno