Brave should be avaliable through flatpak because it is an alternative to snap that feels better because it is not run by a big company as cononical. Here is a great page with the advantages between the two: https://www.maketecheasier.com/snap-packages-vs-flatpacks/
This seems to be very straightforward to support using electron-installer-flatpak.
E.g. https://github.com/mattdangerw/brave-browser-laptop/commit/e436fd8111df83ae820a926f8c80e6eedef9aa07
This should be some kind of a priority, Brave doesnt have enough community support to manage dozens of linux distributions. I used a few electron flatpak apps and all of them behave really well and are easy to install/upgrade in KDE and Gnome in Arch and Ubuntu. This would make it easier for you to distribute Brave and install instructions shorter and less distro-specific. Flapak is already installed by default on most Linux distributions, while snap is not being so popular and is mostly ignored by people who manage packages.
This issue should include distribution using flathub.
Yeah I do definitely agree with you @agilob especially about having it available on Flathub ๐
When will Brave flatpak come out?
I am user of Endless OS
When will Brave flatpak come out?
I am user of linux mint
Hi folks,
We haven't done any work on this... but I'd encourage a community member to give it a shot ๐ We're currently only supporting:
Hi, I just gave it a shot for a few hours, but it doesn't quite work well. I have to run it as _non-sandboxed_, etc.
I'm sure there are other (better) ways of doing this, but I'm not very familiar on building/making Flatpaks. I'll try again some time in the next few weeks, but if a _wise soul_ wants to pull the files/templates (it's a heads start anyway!) and see if they can make it work better, that would be great โ it should be all tweaking the com.brave.Brave.yaml file.
+1 from community https://community.brave.com/t/brave-flatpak-format-linux/24015?u=eljuno
okay i try use snap, but in theory , flatpack is the standar
Hi @x80486
any progress on that? thanks
I tried to install it through snap but at least in Manjaro Linux looks terrible. I had to install it from AUR (I didn't want to do it because it isn't an official source)
Hi @Zig-03, I tried again this weekend, but I can't make it work. There are a couple of issues:
I'll try to see if someone from the Flatpak/FlatHub IRC channels can help.
I have this running now. I'm going to try it out for a few days and see how the stability is. The current flatpak build isn't nearly "perfect" but the program is runable which is the main point.
I am able to maintain it and get it into Flathub. However, I would need permission to distribute it as "Brave" and use the logo. Just like Snapcraft does. How do I go about getting permission to do that?
On the note of the sandbox, running with --no-sandbox in this context is fine since the browser is already encapsulated. As I recall anyways the file sandbox should be getting removed down the line anyways, they just haven't done it. Or maybe they're waiting on something upstream to happen first in Linux.
brave.json
{
"app-id": "com.brave.Brave",
"runtime": "org.freedesktop.Platform",
"runtime-version": "1.6",
"branch": "stable",
"sdk": "org.freedesktop.Sdk",
"base": "io.atom.electron.BaseApp",
"base-version": "stable",
"command": "run.sh",
"separate-locales": false,
"finish-args": [
"--share=network",
"--share=ipc",
"--device=dri",
"--socket=pulseaudio",
"--socket=x11",
"--device=all",
"--filesystem=home",
"--talk-name=org.freedesktop.Notifications"
],
"build-options" : {
"cflags": "-O2 -g",
"cxxflags": "-O2 -g",
"env": {
"NPM_CONFIG_LOGLEVEL": "info"
}
},
"modules": [
{
"name": "brave-laptop",
"buildsystem": "simple",
"sources": [
{
"type": "archive",
"url": "https://github.com/brave/browser-laptop/releases/download/v0.23.39dev/Brave.tar.bz2",
"sha256": "2555da58a91e1e2b70ced26e92f18cd1c802199ac9ccd3a6119dad8b13fced8c",
"dest": "main"
},
{
"type": "file",
"path": "./scripts/brave.sh",
"dest-filename": "run.sh"
}
],
"build-commands": [
"mkdir -p /app/main /app/bin",
"cp -ra main/brave-linux-x64/* /app/main/",
"install run.sh /app/bin/"
]
}
]
}
scripts/brave.sh
#!/bin/sh
# Run without the sandbox since we are already isolated by flatpaks runtime.
# Also the sandbox file doesn't work in flatpak easily since it requires root.
exec /app/main/brave --no-sandbox
exit 0
I am able to maintain it and get it into Flathub. However, I would need permission to distribute it as "Brave" and use the logo. Just like Snapcraft does. How do I go about getting permission to do that?
Me personally, I'd use it if only officially supported by Brave, sorry. External contributors? Sure. But Brave should have the last saying about each line of code.
On the note of the sandbox, running with --no-sandbox in this context is fine since the browser is already encapsulated.
What if someone doesn't trust Brave's sandboxing, but trusts Flatpak's one? Or what if someone wanna have them both? For me personally, this isn't an option.
As I recall anyways the file sandbox should be getting removed down the line anyways, they just haven't done it. Or maybe they're waiting on something upstream to happen first in Linux.
If this happens, it'll be the moment when I will stop using Flatpak altogether.
Me personally, I'd use it if only officially supported by Brave, sorry. External contributors? Sure. But Brave should have the last saying about each line of code.
I'm willing to handle this however Brave wants it to be. If they want the build setup and repo hosted on their end, then I'll help get it all figured out. If they don't mind it being something handled over with Flathub's existing infrastructure, then fine.
The flathub builds are all open to view how they are made. Also my flatpak simply takes the generic x64 Linux build and puts it within a node base. Then adds a desktop file and icon so it looks right. There is no modification of execution, (except having to disable the sandbox) it's all how Brave themselves builds the binary upstream.
What if someone doesn't trust Brave's sandboxing, but trusts Flatpak's one? Or what if someone wanna have them both? For me personally, this isn't an option.
Then the flatpak route isn't for you unless you want to do the legwork to make the sandbox work in a Flatpak. Flatpak's don't have root users, so using the chrome sandbox file isn't an option since it hard requires a root owner and group be assigned to the file.
If this happens, it'll be the moment when I will stop using Flatpak altogether.
What? The sandbox file support is to be removed from Chromium as I recall. It is something but it isn't as good as what the kernel has built in now that is widely supported. Flatpaks are designed specifically to isolate things with sandboxes so it isn't going anywhere there.
Also, this kind of thing doesn't need to be a Brave official push from the start. We can roll out a flathub offering of the browser first. Try to battle-test the configuration and setup woes that users have. Perhaps even figure out a way to run with a sandbox for users that want to go through the work to set that up. Then once Brave has the capacity to handle maintaining flatpak builds internally themselves, they can step in and see what has already been problematic. Then they can either take over the flathub builds themselves or host their own repository and the flathub's would be deprecated in favor of the Brave repository.
It isn't an "all-or-nothing" scenario, these things can co-exist collaboratively adding as little stress as possible on the Brave team until they're ready.
Hey @Garbee, are you going to PR that work into flathub/flathub? Folks there are pretty sharp, so eventually they will polish whatever you have.
Thanks for the effort!
@x80486 Only once I have confirmation from the Brave team that I'm allowed to use the logo and name for redistribution through Flathub. I'm not a lawyer, but the license doesn't allow re-using the trademarks. So I'm going to verify they're fine with it before submitting the PR.
I've already discussed it with the maintainers there. They're open to having it. I just want to verify the trademark usage is OK to the Brave team.
@bsclifton Brave will have a flatpak version?
@Garbee logo usage should be just fine
@LeandroStanger officially, we won't be working on a flatpak version. But as mentioned above, @Garbee has got something working
Coming soon, we'll want to switch gears to brave-core
Yup. I found a few glaring UX bugs in testing the flatpak builds I had. Turned out they were from the custom setup and should be naturally resolved when that is removed and replaced with the Chromium UX. So, I kinda held off on building a flatpak off the brave-laptop Node interface and am waiting for the moment the Chromium UX drops (or gets to where I can get pre-build artifacts to test with) to go forward with a Flatpak on Flathub. That way we aren't randomly stuck needing to quickly refactor the build so people can get updates (and any migration woes that may exist are negated.)
I have a workable solution though since it just pulls in the pre-built binary and runs it. Now that I have a green light on logo being allowed it just comes down to waiting for the Chromium UX for me.
Closing in favor of https://github.com/brave/brave-browser/issues/1000
@Garbee if you wanted to share any info with folks in that new issue, it would be very much appreciated ๐ This new repo corresponds to our new Developer channel build that was released today:
https://brave.com/download-dev
Most helpful comment
Yeah I do definitely agree with you @agilob especially about having it available on Flathub ๐