Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Provide a more seamless way to upgrade Brave automatically on Linux #11287

Open
jamesray1 opened this issue Oct 5, 2017 · 37 comments
Open

Provide a more seamless way to upgrade Brave automatically on Linux #11287

jamesray1 opened this issue Oct 5, 2017 · 37 comments

Comments

@jamesray1
Copy link

jamesray1 commented Oct 5, 2017

(updated post by @bsclifton)
Installing Brave should add the package sources to /etc/apt/sources.list.d (or similar, based on the OS/window manager). We can prompt the user with a yes/no, how Opera does:
screen shot 2017-10-30 at 3 46 17 pm

Or we can just put the sources there ourselves, like Vivaldi does. After this is done, the packages will be managed by Synaptic (or similar) which means the user will be prompted with auto-updates

Original post

Searched for the title on Google and Github issues.

Steps to Reproduce

  1. Install the latest Brave release on Linux, e.g. Ubuntu 17.04, the distro I use.
  2. Wait until the next release (beta releases seem to be every weekday).

Actual result:
Brave doesn't prompt to update to the latest release, like it does in Windows 10.

Brave Version

Brave: 0.19.24
rev: 3b3fba2
Muon: 4.4.25
libchromiumcontent: 61.0.3163.100
V8: 6.1.534.41
Node.js: 7.9.0
Update Channel: Beta
OS Platform: Linux
OS Release: 4.10.0-35-generic
OS Architecture: x64

Reproducible on current live release:
I don't know about after 0.19.24.

@luixxiul
Copy link
Contributor

luixxiul commented Oct 5, 2017

On Linux you need to download beta releases manually. sorry for inconvenience!

@jamesray1
Copy link
Author

jamesray1 commented Oct 5, 2017 via email

@jamesray1
Copy link
Author

jamesray1 commented Oct 5, 2017 via email

@bsclifton bsclifton removed the duplicate Issue has already been reported label Oct 28, 2017
@bsclifton
Copy link
Member

I believe this is a wontfix because of how Linux operates. You can setup your package manager to automatically update, but triggering apt / rpm from inside Brave is unreasonable, since that requires root privs

@bsclifton
Copy link
Member

@jamesray1 what is the behavior like for Chrome and Firefox?

@jamesray1
Copy link
Author

I'll look into setting up an automatic update with the package manager. I haven't noticed them update automatically as I haven't used them much.

@jamesray1
Copy link
Author

jamesray1 commented Oct 29, 2017

The version on Ubuntu Software is 0.19.24, while the latest release is 0.19.70.

screenshot from 2017-10-29 17-01-05

Is there something that I can add below?

screenshot from 2017-10-29 17-03-31

@jamesray1
Copy link
Author

jamesray1 commented Oct 29, 2017

Maybe:

apt-get update && apt-get upgrade -y

As per here.

@jamesray1
Copy link
Author

While logged in as the root user I ran:

apt-get update && apt-get upgrade -y

However, brave was not one of the packages that was upgraded.

@jamesray1
Copy link
Author

jamesray1 commented Oct 29, 2017

I just uninstalled Brave and snap removed it, then reinstalled it with snap install brave --beta. The same version was installed as before uninstalling it according to snap: brave (beta) v0.19.66dev from 'brave' installed.

But now I can't open brave, while I can find it in Activities (right clicking on it after finding it in activities and selecting "show details" shows "No application found". Then when I look in installed apps, Brave is in the list, but when I click on it and click launch, nothing happens.

So I removed it.

I then tried:

curl https://s3-us-west-2.amazonaws.com/brave-apt-staging/keys.asc | sudo apt-key add -

However it skipped prompting for the password.

@jamesray1
Copy link
Author

jamesray1 commented Oct 29, 2017

So I logged in as a root user, and ran
curl https://s3-us-west-2.amazonaws.com/brave-apt-staging/keys.asc | sudo apt-key add -
which returned OK on the last line.

Then I ran:

echo "deb [arch=amd64] https://s3-us-west-2.amazonaws.com/brave-apt-staging `lsb_release -sc` main" | sudo tee -a /etc/apt/sources.list.d/brave-`lsb_release -sc`.list
deb [arch=amd64] https://s3-us-west-2.amazonaws.com/brave-apt-staging artful main

Which returned:
deb [arch=amd64] https://s3-us-west-2.amazonaws.com/brave-apt-staging artful main.

Then I ran:

sudo apt update
sudo apt install brave

That installed 0.19.20.

However, then Brave doesn't show up in Ubuntu Software, and I still haven't figured out how to automatically update to the latest version.

I could use the .deb file for the latest release but there must be a better way than having to keep manually installing the latest release. I ran:

wget -O brave.deb https://laptop-updates.brave.com/latest/dev/debian64
sudo gdebi brave.deb

However, the brave version listed within Brave is still 0.19.20.

I closed Brave and ran brave via bash, which opened Brave, however the Brave icon in the sidebar didn't indicate that a window was open:

screenshot from 2017-10-29 18-42-09

The output was:

Error: unrecognized flag --icu_case_mapping
Try --help for options
ATTENTION: default value of option force_s3tc_enable overridden by environment.

GDebi lists the version as 0.19.70. Note that the Lintian output exited with status 1.

Interestingly, after I removed the package in GDebi, the version in Brave changed to 0.19.70!

While it's good that I now have the latest release, I think it won't automatically update, so I'll still need to find out a way to do that.

Brave is not found in the Software Centre or in the list of installed apps.

@jamesray1
Copy link
Author

jamesray1 commented Oct 29, 2017

Whoops, I realised I used wget -O brave.deb https://laptop-updates.brave.com/latest/dev/debian64, rather than wget -O brave.deb https://laptop-updates.brave.com/latest/dev/ubuntu64!

I couldn't remove the package in GDebi; the program crashed. So I had to log in as a root user and remove each of the files/directories included.

I then installed and open 0.19.70 with wget -O brave.deb https://laptop-updates.brave.com/latest/dev/ubuntu64 then sudo dpkg -i brave.deb. However, it still didn't show in the Software Centre.

If you have any tips on how I can get Brave installed and updated to the latest release (beta or stable), that'd be appreciated.

One idea is to use a Chron job, however I haven't tried using Chron jobs before, it looked like a bit of a hassle.

@jamesray1
Copy link
Author

jamesray1 commented Oct 29, 2017

I removed the package again with sudo dpkg -r brave.

Then ran snap install brave --beta, which installed 0.19.66. Before that, running snap install brave and snap install brave --stable both didn't work. However, 0.19.66 doesn't have an icon in the taskbar, so I snap removed it.

Then ran sudo apt install brave. Which installed 0.19.20. Here's hoping that it will automatically update to the current latest release, 0.19.70, soon.

@bsclifton
Copy link
Member

@jamesray1 I think that is the problem- we haven't been maintaining the snap packages ☹️ I know that @posix4e and @bbondy are aware of them, but we aren't updating them as part of our release process (yet)

Regarding the 2nd issue, I believe the problem is that you're on the Beta channel for Linux... Likely the last few deployments folks did not update the beta channel. Hang tight and I'll push an update on there

@bsclifton
Copy link
Member

@jamesray1 for reference:
Brave version - Ubuntu Snap #9870
Provide an AppImage for Linux #10250

@bsclifton
Copy link
Member

bsclifton commented Oct 30, 2017

and crap- @jamesray1 I believe the best course of action would be to use the release channel for the moment. We've forcibly pushed an update for Windows/macOS which flushed beta users over to the release channel. However, we didn't cover Linux users in that case (and I don't have a fix for you unfortunately)

@darkdh put in the work for true release channels which is captured in #10552 which we'll be merging soon. Once that is merged, we can do our first true "Beta" build. This uses a distinctly different profile than the one you've been using, which is the same as release channel. When this is pushed, you'll be able to install both concurrently

@jamesray1
Copy link
Author

OK I'll try 'snap install brave --release' after uninstalling Brave tomorrow.

@darkdh
Copy link
Member

darkdh commented Oct 30, 2017

screen shot 2017-10-30 at 3 46 17 pm

I think we should do something like Opera or add it to the /etc/apt/sources.list.d silently (Vivaldi) when user install Brave through deb files

cc @bsclifton , @bbondy

@darkdh darkdh reopened this Oct 30, 2017
@bsclifton bsclifton removed the wontfix label Oct 30, 2017
@bsclifton bsclifton changed the title Brave Linux doesn't automatically update to the latest (beta) release Provide a more seamless way to upgrade Brave automatically Oct 30, 2017
@bsclifton bsclifton changed the title Provide a more seamless way to upgrade Brave automatically Provide a more seamless way to upgrade Brave automatically on Linux Oct 30, 2017
@jamesray1
Copy link
Author

snap install brave --release returned error: unknown flag `release'.

@bsclifton
Copy link
Member

@jamesray1 I updated the original post with notes about the experience @darkdh found

Regarding snaps- I apologize... I don't know much about those. We aren't maintaining those ourselves (yet), so we don't have any control over what those do. I've never used that technology myself, I can only speak to installing via deb or rpm

@jamesray1
Copy link
Author

Yeah I just read that, I think that looks like a good option.

@bsclifton
Copy link
Member

bsclifton commented Oct 30, 2017

snap install brave --release returned error: unknown flag `release'.

@jamesray1 Brave does not have true channels (yet). These will be added with #10552 ex: current behavior whether you install from beta or release, it uses the same profile folder. Once this PR is accepted, you'll have distinct folders for beta and release installs

With regards to installing the release one, you can follow the steps here:
https://github.com/brave/browser-laptop/blob/master/docs/linuxInstall.md#debian-jessie-and-ubuntu-artful-zesty-yakkety-xenial-and-trusty-amd64

To get release binaries (when adding the source), you can run this:

curl https://s3-us-west-2.amazonaws.com/brave-apt/keys.asc | sudo apt-key add -
echo "deb [arch=amd64] https://s3-us-west-2.amazonaws.com/brave-apt `lsb_release -sc` main" | sudo tee -a /etc/apt/sources.list.d/brave-`lsb_release -sc`.list

To get beta binaries, you would instead run:

curl https://s3-us-west-2.amazonaws.com/brave-apt-staging/keys.asc | sudo apt-key add -
echo "deb [arch=amd64] https://s3-us-west-2.amazonaws.com/brave-apt-staging `lsb_release -sc` main" | sudo tee -a /etc/apt/sources.list.d/brave-`lsb_release -sc`.list

With regards to snapcraft, after looking over the docs, it looks like it possibly supports beta also. I'm curious if you can run:

snap install brave

to get the release version and

snap install brave --beta

to get the beta version?

@jamesray1
Copy link
Author

Also logging in as root with su - and entering the root password, then running apt-get update && apt-get upgrade -y didn't update anything.

@jamesray1
Copy link
Author

Yes I tried following those steps as described above. snap install brave didn't work. snap install brave --beta installed 0.19.66, but there was no Brave icon in the sidebar, so I uninstalled it.

@bsclifton
Copy link
Member

bsclifton commented Oct 30, 2017

Also logging in as root with su - and entering the root password, then running apt-get update && apt-get upgrade -y didn't update anything.

@jamesray1 that is likely because the beta repo has not been updated. We are not going to touch it until the above PR is accepted, which will create a new Brave-beta profile (it will look like you lost all your data, but it'll just be stored in a new location).

For now, you'll want to remove that from /etc/apt/sources.list.d/ manually and then use the RELEASE source list:

curl https://s3-us-west-2.amazonaws.com/brave-apt/keys.asc | sudo apt-key add -
echo "deb [arch=amd64] https://s3-us-west-2.amazonaws.com/brave-apt `lsb_release -sc` main" | sudo tee -a /etc/apt/sources.list.d/brave-`lsb_release -sc`.list

This should properly add the 0.19.70 and you should be able to manually add it to Synaptic (if needed) so that you get auto-updates

@jamesray1
Copy link
Author

jamesray1 commented Oct 30, 2017

OK, I've done that. I'll just remove Brave then reinstall.

@jamesray1
Copy link
Author

OK so I ran those two lines. The last command returned:

tee: /etc/apt/sources.list.d/brave-artful.list: No such file or directory
deb [arch=amd64] https://s3-us-west-2.amazonaws.com/brave-apt artful main

@bsclifton
Copy link
Member

hmm... not sure what went wrong..? @posix4e any ideas?

@posix4e
Copy link
Contributor

posix4e commented Oct 30, 2017

There’s no artful distro pushes . Please choose one of the existing Debian or Ubuntu distro names. It’s the same Deb anyways

@jamesray1
Copy link
Author

jamesray1 commented Oct 30, 2017

Yeah @posix4e I guessed that was the case. I'll try Zesty.

I'm not exactly sure how to run the command. I tried:
echo "deb [arch=amd64] https://s3-us-west-2.amazonaws.com/brave-apt zesty main | sudo tee -a /etc/apt/sources.list.d/brave-zesty.list.

However, it gave me a > prompt.

@bsclifton
Copy link
Member

bsclifton commented Oct 31, 2017

@jamesray1 you're missing the ending " which should be right after the main (and before the redirection to sudo tee -a)

@bsclifton
Copy link
Member

@posix4e weird- support for artful should have been added with #10756

@jamesray1
Copy link
Author

Whoops, I should've seen that!

@jamesray1
Copy link
Author

root@james-Streacom:~# echo "deb [arch=amd64] https://s3-us-west-2.amazonaws.com/brave-apt `zesty` main" | sudo tee -a /etc/apt/sources.list.d/brave-zesty.list
tee: /etc/apt/sources.list.d/brave-zesty.list: No such file or directory
zesty: command not found
deb [arch=amd64] https://s3-us-west-2.amazonaws.com/brave-apt  main

@jamesray1
Copy link
Author

Yakkety

root@james-Streacom:~# echo "deb [arch=amd64] https://s3-us-west-2.amazonaws.com/brave-apt `yakkety` main" | sudo tee -a /etc/apt/sources.list.d/brave-yakkety.list
tee: /etc/apt/sources.list.d/brave-yakkety.list: No such file or directory
yakkety: command not found
deb [arch=amd64] https://s3-us-west-2.amazonaws.com/brave-apt  main

@jamesray1
Copy link
Author

jamesray1 commented Nov 3, 2017

I was using Mozilla for a bit, but due to the ads I had to go back to using Brave with:
wget -O brave.deb https://laptop-updates.brave.com/latest/dev/ubuntu64
sudo dpkg -i brave.deb

As outlined other options are suboptimal or don't work.

I'm glad to be back!

@bsclifton bsclifton added this to the Triage Backlog milestone Nov 27, 2017
@jamesray1
Copy link
Author

After running snap install brave on a fresh install of Ubuntu 17.10 on a laptop, Brave didn't open when running in from Bash, from apps or via search. I used the alternative instructions here and the second Brave app ran fine.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants