Home     Blog     Rss     Contact     Donate

Installing Brave Browser on Gentoo with my Ebuild

I am well aware that there already is a 'brave-bin' Gentoo overlay. That being said, its update cadence tends to be rather slow, and for something like a browser, which represents such a great attack surface, delaying its update is never a good thing.

So one of the first thing I did after I started using Gentoo was to start maintaining my own Brave-bin ebuild which can be updated as soon as a new version is out.

Now, I want to make it clear that this is not a criticism towards the maintainer of the brave-bin overlay. There are quite literally dozens of valid reasons (if not more) why updating the package almost immediately may not be possible for him. Also, I based the first ebuild on his, and I have no idea if my ebuild would have even worked properly without his work. So credit to him.

Still, if you want your browser's package to get updated as fast as is humanly possible, here it is.

First, a Bonus

Another issue I had with the original Brave-bin ebuild is that it fetches the whole cups package. This is, of course, necessary if you want the ability to print straight from Brave. If you don't need it, though, this becomes a burden.

The good news? Brave only requires the presence of libcups.so.2, not the whole cups suite. Unfortunately, the cups ebuild doesn't have a flag that will only install this library. So naturally, I created a libcups package just for it and added the cups and libcups USE flags to my brave-bin ebuild.

If you don't need to print from Brave, and have no use for cups as a whole, you do not need to do anything special, as the libcups USE flag is the default. If you do need cups in full, or if it's already installed on your system, simply:

# echo "www-client/brave-bin cups -libcups" > /etc/portage/package.use/brave-bin

VoilĂ .

Add the Repository / Install brave-bin

The brave-bin ebuild is distributed through my Ragnarok ebuild repository. Ensure git is installed, then add the repo to /etc/portage/repos.conf/eselect-repo.conf:

[ragnarok]
location = /var/db/repos/ragnarok
auto-sync = yes
sync-type = git
sync-uri = https://github.com/RagnarokOS/pkgs.git
sync-depth = 1
sync-git-verify-commit-signature = true
sync-openpgp-key-path = /usr/share/openpgp-keys/lecorbeau.asc
sync-openpgp-key-refresh = false

Fetch my pgp key and save it to /usr/share/openpgp-keys/ if you wish to verify the repo and package's integrity (highly recommended). I do not recommend disabling sync-git-verify-commit-signature.

Run:

# emaint sync -r ragnarok

Then install:

# emerge -av www-client/brave-bin

Install the sec-keys/ragnarok-keys package to make sure you get updates for my pgp key (it will be refreshed at some point):

# emerge -av sec-keys/ragnarok-keys

Now, enjoy!

About the Ragnarok Repository

Note that the Ragnarok repo does not contain any packages that are also in Gentoo's repository, aside from my own fork of dmenu. If you're a dmenu user who wants to make sure that the Ragnarok repo's version will never override yours, simply block it:

# echo "x11-misc/dmenu::ragnarok" > /etc/portage/package.mask/dmenu

There you go.