Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install Brave on Fedora Silverblue #7710

Closed
JaneSmith opened this issue Jan 13, 2020 · 14 comments
Closed

Unable to install Brave on Fedora Silverblue #7710

JaneSmith opened this issue Jan 13, 2020 · 14 comments

Comments

@JaneSmith
Copy link

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
Copy link
Collaborator

rebron commented Feb 28, 2020

cc: @mbacchi Can you take a look?

@mbacchi
Copy link
Contributor

mbacchi commented Mar 3, 2020

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

@bsclifton
Copy link
Member

@mbacchi issue tracking Flatpak: #1000

@mwleeds
Copy link

mwleeds commented Jul 2, 2020

Relatedly, there's ongoing work to make a sandboxed Chrome Flatpak: flathub/flathub#1630

@x80486
Copy link

x80486 commented Oct 12, 2020

$ flatpak remote-add --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo
$ flatpak install flathub-beta com.brave.Browser

@JayDoubleu
Copy link

JayDoubleu commented Nov 18, 2020

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.

  • Create Brave.repo file
cat << EOF | sudo tee -a /etc/yum.repos.d/Brave.repo
[brave]
name=Brave Browser repo
baseurl=https://brave-browser-rpm-release.s3.brave.com/x86_64/
enabled=1
gpgcheck=0
EOF
  • Install "at" with rpm-ostree and reboot to apply
rpm-ostree install at
systemctl reboot
  • toolbox create < only if you haven't yet created default toolbox
  • download brave-keyring rpm into toolbox and edit the rpm
toolbox enter
wget https://brave-browser-rpm-release.s3.brave.com/x86_64/brave-keyring-1.8-1.noarch.rpm -O brave-keyring.rpm
sudo dnf -y install rpmrebuild
rpmrebuild -e -p brave-keyring.rpm
  • it should open a text editor, at the bottom of the file, remove these two lines:
service atd start
echo "sh /etc/cron.daily/brave-key-updater" | at now + 2 minute > /dev/null 2>&1
  • save and exit editor :wq
    Do you want to continue ? (y/N) y

  • It should give you the path to edited rpm file

warning: Could not canonicalize hostname: toolbox
result: /var/home/jaydoubleu/rpmbuild/RPMS/noarch/brave-keyring-1.8-1.noarch.rpm
  • exit the toolbox and install the rpm with rpm-ostree, reboot
rpm-ostree install /var/home/jaydoubleu/rpmbuild/RPMS/noarch/brave-keyring-1.8-1.noarch.rpm
systemctl reboot
  • After reboot install brave browser with rpm-ostree
rpm-ostree install brave-browser

@mildred
Copy link

mildred commented Dec 16, 2020

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
Copy link

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
Copy link

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

@shibattor
Copy link

Any update(s)?

@boredsquirrel
Copy link

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
Copy link

redoomed1 commented Aug 14, 2024

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
Copy link

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
Copy link
Member

fmarier commented Sep 24, 2024

Looks like this is now possible and that the only thing left to do is to document this installation method: #41041

@fmarier fmarier closed this as completed Sep 24, 2024
@fmarier fmarier added the closed/duplicate Issue has already been reported label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests