brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.63k stars 2.3k forks source link

Unable to install Brave on Fedora Silverblue #7710

Closed JaneSmith closed 1 week ago

JaneSmith commented 4 years ago

I am running a Linux desktop using the Fedora Silverblue distro. Fedora Silverblue is based on Fedora Workstation, but takes a new and more modern approach to package distribution. Because of this, the provided installation instructions for Fedora don't work - the dnf command is unavailable.

The recommended way to install applications on Fedora Silverblue is via modern Flatpaks. This is quick and easy for most apps. Unfortunately, Brave is not available as a Flatpak: issue #1000.

In the meantime, I attempted to install Brave through rpm-ostree. Google Chrome can be installed in this way, so I figured it should be possible with Brave as well. There are instructions on installing Chrome on Silverblue here. I attempted to adapt these instructions for Brave, by adding a repo file /etc/yum.repos.d/brave-browser.repo containing:

[brave-browser]
name=brave-browser
baseurl=https://brave-browser-rpm-release.s3.brave.com/x86_64
skip_if_unavailable=True
enabled=1
gpgcheck=1
gpgkey=https://brave-browser-rpm-release.s3.brave.com/brave-core.asc

After rebooting, I then run rpm-ostree install brave-browser to attempt to install the brave-browser package from this repository. Unfortunately, this fails with an error:

Checking out tree 91a9f55... done Enabled rpm-md repositories: fedora updates brave-browser rpm-md repo 'fedora' (cached); generated: 2019-10-23T22:52:47Z rpm-md repo 'updates' (cached); generated: 2020-01-13T01:56:31Z rpm-md repo 'brave-browser' (cached); generated: 2020-01-09T02:09:13Z Importing rpm-md... done Resolving dependencies... done Will download: 7 packages (77.1 MB) Downloading from 'updates'... done Downloading from 'brave-browser'... done Downloading from 'fedora'... done Importing packages... done Checking out packages... done Running pre scripts... done Running post scripts... done error: Running %post for brave-keyring: Executing bwrap(/bin/sh): Child process stopped by signal 0; run journalctl -t 'rpm-ostree(brave-keyring.post)' for more information

rpm-ostree(brave-keyring.post)[2768]: Redirecting to /bin/systemctl start atd.service rpm-ostree(brave-keyring.post)[2768]: rpm-ostree-systemctl: Ignored non-preset command: start atd.service

As far as I can tell, this is a result of rpm-ostree ignoring any systemctl operations that don't use the preset arg. Since the Brave installer attempts to run start atd.service for whatever reason, installation fails.

And so I am at a loss. I have not been able to install Brave. While I loved using it on Windows, I am now back on Firefox for Linux.

I'm sure I read somewhere that we should open an issue if we're unable to install Brave on our distro - but I can no longer find that instruction, so it's possible I imagined it. My apologies if this is not considered a suitable issue.

rebron commented 4 years ago

cc: @mbacchi Can you take a look?

mbacchi commented 4 years ago

Flatpak install package format is something we'll have to consider as we have time.

bsclifton commented 4 years ago

@mbacchi issue tracking Flatpak: https://github.com/brave/brave-browser/issues/1000

mwleeds commented 4 years ago

Relatedly, there's ongoing work to make a sandboxed Chrome Flatpak: https://github.com/flathub/flathub/pull/1630

x80486 commented 3 years ago
$ flatpak remote-add --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo
$ flatpak install flathub-beta com.brave.Browser
JayDoubleu commented 3 years ago

Got it working by editing the brave-keyring rpm and removing %postcript lines which are causing the problem. I'm not sure if brave-browser depends on specific version of keyring so this might have to be repeated when they bump their keyring version. After installing brave-keyring manually, installation of brave-browser from repo works as expected.

rpm-ostree install brave-browser
mildred commented 3 years ago

While I think that providing a flatpak would be nice, it would be great if the rpm file could be fixed to not require the atd service on post-install. Either manually calling the command in /etc/cron.daily/brave-key-updater or at least gracefully recover from any error (in any case, the script is going to run daily) to avoid crashing the installation.

JayDoubleu commented 3 years ago

While I think that providing a flatpak would be nice, it would be great if the rpm file could be fixed to not require the atd service on post-install. Either manually calling the command in /etc/cron.daily/brave-key-updater or at least gracefully recover from any error (in any case, the script is going to run daily) to avoid crashing the installation.

That would be ideal, chrome rpm is already handling that properly.

If it just fails gracefully would do the trick, silverblue might not even have Cron installed nor atd so if it could just not fail....

Also, on fedora after enabling third party repositories in software(GUI) it gives option to enable chrome repo with single click. It would be nice to have brave work the same way but I'm not sure if that's something for fedora to handle.

hurricanehrndz commented 3 years ago

Any chance we can get the post-insaller script updated so that it exits successfully?

shibattor commented 2 years ago

Any update(s)?

boredsquirrel commented 10 months ago

The "solution" to disable the gpg check is not secure!

https://github.com/trytomakeyouprivate/braveinstall-fedora-atomic

I created a better one, fully interactive and with all three version supported

redoomed1 commented 1 month ago

Any update(s)?

I think something changed since the last time (~ 2 months ago) I tried to install Brave on Fedora Kinoite by layering, which was unsuccessful due to failed GPG checks, IIRC.

I just tried installing it on Silverblue using the same method, and the installation was successful, to my pleasant surprise!

For anyone interested, here are the steps I took in both attempts:

  1. Opened the Terminal
  2. cd /etc/yum.repos.d/ # Entered the location where all repository configuration files are housed
  3. sudo wget https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo # Downloaded the repo file for Brave
  4. sudoedit /etc/yum.repos.d/brave-browser.repo # Edited the repo file 4a. Added gpgcheck=1 and gpgkey=https://brave-browser-rpm-release.s3.brave.com/brave-core.asc to the repo file
  5. rpm-ostree install brave-browser # Installed Brave

(As you can see, a lot of the install steps were adapted from the steps for installing Brave on Fedora Workstation).


I doubt that my switch from Kinoite to Silverblue is the reason that the install is now working for me. Edit: I was able to successfully overlay Brave on Kinoite as well, so something definitely changed on Brave's side. In any case, thank you to whoever made this possible!

furuycom commented 1 month ago
sudo tee /etc/yum.repos.d/brave-browser.repo <<EOF
[brave-browser]
name=Brave Browser
enabled=1
autorefresh=1
baseurl=https://brave-browser-rpm-release.s3.brave.com/x86_64
gpgcheck=0
repo_gpgcheck=1
gpgkey=https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
EOF

rpm-ostree install brave-browser

fmarier commented 1 week ago

Looks like this is now possible and that the only thing left to do is to document this installation method: https://github.com/brave/brave-browser/issues/41041