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

RPM repository incompatible with OpenSUSE zypper #1900

Closed
tneo opened this issue Oct 30, 2018 · 24 comments · Fixed by #6087
Closed

RPM repository incompatible with OpenSUSE zypper #1900

tneo opened this issue Oct 30, 2018 · 24 comments · Fixed by #6087
Labels
help wanted OS/Linux packaging Making Brave natively available to install on a variety of platforms, app stores, and repositories. priority/P3 The next thing for us to work on. It'll ride the trains.

Comments

@tneo
Copy link

tneo commented Oct 30, 2018

I added the following repository: https://brave-browser-rpm-release.s3.brave.com/x86_64/
As found here

When I open yast2 to install packages, refreshing the repository fails with the following error:

Permission to access 'https://brave-browser-rpm-release.s3.brave.com/x86_64/media.1/media' denied.

Is there another repository for openSUSE? As now I'm not able to get updates for the browser through yast2

@bbondy bbondy added this to the 1.x Backlog milestone Oct 30, 2018
@bbondy
Copy link
Member

bbondy commented Oct 30, 2018

cc @mbacchi

@mbacchi mbacchi added the priority/P3 The next thing for us to work on. It'll ride the trains. label Oct 31, 2018
@rebron rebron modified the milestone: 1.x Backlog Feb 7, 2019
@agravelot
Copy link

Same issue on fedora, unable to update brave since days.
Switching to Firefox until fixed because it's a security issue.

@loadcorp
Copy link

Still the same problem since 6 of March

@loadcorp
Copy link

Even I did this: #2927 I got this version:
brave-browser x86_64 0.62.51-1 brave-browser-rpm-release.s3.brave.com_x86_64_

Also I tried to install on clean Fedora 29 and still got this version - Version 0.62.51 Chromium: 73.0.3683.103 (Official Build) (64-bit)

Could you tell me how can I upgrade to the latest version of browser at this time - v0.65.74 ?

@fmarier
Copy link
Member

fmarier commented Apr 22, 2019

@loadcorp 0.62.51 is currently the latest version. 0.65 isn't released yet: https://github.com/brave/brave-browser/wiki/Brave-Release-Schedule.

If you want to use a pre-release version, you'll have to use the beta, dev or nightly channels and follow the installation instructions for the channel you want.

@fmarier
Copy link
Member

fmarier commented Apr 22, 2019

I can't reproduce this "error denied".

This is how I successfully installed the brave-browser RPM package on OpenSUSE 15.0:

  1. Put the contents of https://brave-browser-rpm-release.s3.brave.com/brave-core.asc in a file
    named /root/brave-core.asc.

  2. Put the following in /etc/zypp/repos.d/brave-browser.repo:

    [brave-browser]
    name=brave-browser
    enabled=1
    autorefresh=1
    baseurl=https://brave-browser-rpm-release.s3.brave.com/x86_64/
    type=rpm-md
    
  3. Run the following commands as root:

    rpm --import /root/brave-core.asc
    zypper update
    zypper install at brave-browser brave-keyring
    

@agravelot
Copy link

agravelot commented Apr 23, 2019

I don't get an 5xx error rigth now, but another issue still persist.

LANG=C sudo dnf update --refresh -v

Command output:

...
created by dnf config-manager from https://brave-browser-rpm-release.s3.brave.com/x86_64/                      28 kB/s | 3.3 kB     00:00    
reviving: 'brave-browser-rpm-release.s3.brave.com_x86_64_' can be revived - repomd matches.
not found other for: created by dnf config-manager from https://brave-browser-rpm-release.s3.brave.com/x86_64/
not found modules for: created by dnf config-manager from https://brave-browser-rpm-release.s3.brave.com/x86_64/
not found updateinfo for: created by dnf config-manager from https://brave-browser-rpm-release.s3.brave.com/x86_64/
brave-browser-rpm-release.s3.brave.com_x86_64_: using metadata from Fri Apr 12 00:14:52 2019.
repo: downloading from remote: brave-browser
error: Status code: 404 for http://dl.google.com/linux/brave-browser/rpm/stable/x86_64/repodata/repomd.xml (http://dl.google.com/linux/brave-browser/rpm/stable/x86_64/repodata/repomd.xml).
brave-browser                                                                                                  40 kB/s | 1.4 kB     00:00    
Cannot download 'http://dl.google.com/linux/brave-browser/rpm/stable/x86_64': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried.
Failed to synchronize cache for repo 'brave-browser'
...

Tested on fedora 29.

@fmarier
Copy link
Member

fmarier commented Apr 23, 2019

@Nevax07 It looks like the repository that's failing on your machine is not actually the real Brave repo, but a broken Google one that was mistakenly added in the past (see #2927). This will get cleaned up automatically in version 0.63 which will be released soon.

If you don't want to wait and want to clean it up manually now, you can delete the following file: /etc/yum.repos.d/brave-browser.repo

@tneo
Copy link
Author

tneo commented Apr 25, 2019

@fmarier I followed the steps you did for Leap 15 with Tumbleweed. This is the output:

# rpm --import /web/browser/brave-core.asc 
# vi /etc/zypp/repos.d/brave-browser.repo 
# cat /etc/zypp/repos.d/brave-browser.repo 
[brave-browser]
name=brave-browser
enabled=1
autorefresh=1
baseurl=https://brave-browser-rpm-release.s3.brave.com/x86_64/
type=rpm-md
keeppackages=0

# zypper dup
Problem retrieving files from 'brave-browser'.
Permission to access 'https://brave-browser-rpm-release.s3.brave.com/x86_64/media.1/media' denied.
Please see the above error message for a hint.
Warning: Skipping repository 'brave-browser' because of the above error
```.

@fmarier fmarier changed the title RPM repository 'access denied' with openSUSE RPM repository incompatible with OpenSUSE zypper Apr 26, 2019
@fmarier
Copy link
Member

fmarier commented Apr 26, 2019

Thanks for the extra details @tneo, I didn't know about the zypper dup command (I've never touched OpenSUSE before).

So, given this and #3982, I guess our RPM repository is not compatible with OpenSUSE at the moment. I found some documentation about the rpm-md format but if anybody what we need to do to fix this, please chime in.

@Skrylar
Copy link

Skrylar commented Apr 30, 2019

I don't get a problem with signatures (after importing the rpm key, as per Fedora instructions) but do get a lot of access denied errors. After sleuthing a bit I stumbled on to a similar zypper incompatibility issue with unrelated software; someone saying to change type to plaindir and run a refresh. I applied that trick here and it then becomes possible to install 0.63.48-1.

(I had previously done a compile-from-source, although the instructions for that appear to be out of date as well.)

@tneo
Copy link
Author

tneo commented May 4, 2019

Changing the type works for me and allows refreshing without errors.

@tneo
Copy link
Author

tneo commented May 8, 2019

It only refreshed once for me. After that the same error denied message comes forward.

@SistemaKrasho
Copy link

SistemaKrasho commented Jul 18, 2019

I found a cause and possible solution for this. This is due to a misconfigured Amazon S3 server.

$ sudo zypper -vv ref -r brave-browser
Verbosity: 3
Initializing Target
Specified repositories: brave-browser 
Checking whether to refresh metadata for brave-browser
Retrieving: https://brave-browser-rpm-release.s3.brave.com/x86_64/repodata/repomd.xml .................................................[done]
Problem retrieving files from 'brave-browser'.
Permission to access 'https://brave-browser-rpm-release.s3.brave.com/x86_64/media.1/media' denied.
Please see the above error message for a hint.
Skipping repository 'brave-browser' because of the above error.
Could not refresh the repositories because of errors.

As you know, zypper will fail to update the repo when the server 403s this media.1/media file.

Forcing a repo check from scratch makes zypper ignore the 403 error and allows the process to continue:

$ sudo zypper -vv ref -r brave-browser --force
Verbosity: 3
Initializing Target
Specified repositories: brave-browser 
Forcing raw metadata refresh
Retrieving: https://brave-browser-rpm-release.s3.brave.com/x86_64/media.1/media ......................................................[error]
Retrieving: https://brave-browser-rpm-release.s3.brave.com/x86_64/repodata/repomd.xml.asc ............................................[error]
Retrieving: https://brave-browser-rpm-release.s3.brave.com/x86_64/repodata/repomd.xml.key ............................................[error]
Retrieving: https://brave-browser-rpm-release.s3.brave.com/x86_64/repodata/repomd.xml .................................................[done]
Retrieving repository 'brave-browser' metadata ........................................................................................[done]
Forcing building of repository cache
Building repository 'brave-browser' cache .............................................................................................[done]
Specified repositories have been refreshed.

On other servers where media.1/media returns a proper 404 where it doesn't exist, the process also continues normally, without the need to use --force.

To verify that the S3 bucket is actually returning the wrong code:

$ curl -s -w "%{http_code}" -o /dev/null https://brave-browser-rpm-release.s3.brave.com/x86_64/BOGUS_NON_EXISTENT
403

A 404 is expected here...

Another server:

$ curl -s -w "%{http_code}" -o /dev/null http://ftp.halifax.rwth-aachen.de/packman/suse/openSUSE_Leap_15.1/media.1/media
404

$ sudo zypper -vv ref -r packman
Verbosity: 3
Initializing Target
Specified repositories: packman 
Checking whether to refresh metadata for packman
Retrieving: http://ftp.halifax.rwth-aachen.de/packman/suse/openSUSE_Leap_15.1/repodata/repomd.xml ......................................[done]
Retrieving: http://ftp.halifax.rwth-aachen.de/packman/suse/openSUSE_Leap_15.1/media.1/media .......................................[not found]
Retrieving: http://ftp.halifax.rwth-aachen.de/packman/suse/openSUSE_Leap_15.1/repodata/repomd.xml.asc ........................[done (836 B/s)]
Retrieving: http://ftp.halifax.rwth-aachen.de/packman/suse/openSUSE_Leap_15.1/repodata/repomd.xml.key ..................................[done]
Retrieving: http://ftp.halifax.rwth-aachen.de/packman/suse/openSUSE_Leap_15.1/repodata/repomd.xml ......................................[done]
  Repository:       packman                                               
  Key Name:         PackMan Project (signing key) <packman@links2linux.de>
  Key Fingerprint:  F8875B88 0D518B6B 8C530D13 45A1D067 1ABD1AFB          
  Key Created:      Mon Sep 15 19:18:00 2014                              
  Key Expires:      Thu Sep 12 19:17:21 2024                              
  Rpm Name:         gpg-pubkey-1abd1afb-54176598                          
Retrieving: http://ftp.halifax.rwth-aachen.de/packman/suse/openSUSE_Leap_15.1/repodata/primary.xml.gz ....................[done (447.4 KiB/s)]
Retrieving repository 'packman' metadata ..............................................................................................[done]
Building repository 'packman' cache ...................................................................................................[done]
Specified repositories have been refreshed.

As you could notice, for the server where it returned 404 for a non-existent media.1/media file, it updates the repository succesfully, without the need to --force it.

Solution: configure the S3 bucket properly so it returns 404 instead of a 403 where it actually should return a 404.

Workaround for users: use the --force flag when updating the repos through zypper.

@Skrylar
Copy link

Skrylar commented Jul 19, 2019 via email

@fmarier
Copy link
Member

fmarier commented Jul 25, 2019

https://www.addictivetips.com/ubuntu-linux-tips/install-brave-browser-on-linux/ has a different set of (obsolete) instructions for OpenSUSE. Some of the commands in there might be useful in simplifying our installation instructions for OpenSUSE once our RPM repo is compatible.

@tildelowengrimm tildelowengrimm added the packaging Making Brave natively available to install on a variety of platforms, app stores, and repositories. label Jul 26, 2019
@NumDeP
Copy link

NumDeP commented Sep 18, 2019

Hi @fmarier for over year I used to download the rpm packages from Github and install it manually via Yast2. However recently I came across this and it seemed to do the trick - https://blog.ps1.sh/brave-browser-with-opensuse-tumbleweed/

One other thing @fmarier just before you update the instructions could you also have a quick look if these are packaged or if they're even necessary - sudo zypper install libxss1 libatk-bridge-2_0-0 libgtk-3-0 gconf2-devel and libgnome-keyring-devel

For those of us that downloaded Brave for OpenSuse on the deprecated Muon version we were told download the above.

Thanks

fmarier added a commit to fmarier/brave-browser that referenced this issue Sep 19, 2019
fmarier added a commit to fmarier/brave-browser that referenced this issue Sep 19, 2019
@fmarier
Copy link
Member

fmarier commented Sep 19, 2019

Hi @fmarier for over year I used to download the rpm packages from Github and install it manually via Yast2. However recently I came across this and it seemed to do the trick - https://blog.ps1.sh/brave-browser-with-opensuse-tumbleweed/

Thanks for sharing this! I've just confirmed that these instructions work and added a slightly-modified version of them on our official installation instructions.

One other thing @fmarier just before you update the instructions could you also have a quick look if these are packaged or if they're even necessary - sudo zypper install libxss1 libatk-bridge-2_0-0 libgtk-3-0 gconf2-devel and libgnome-keyring-devel

I don't believe since I didn't have to install any of those manually in my OpenSUSE 15 VM. I would suggest removing them and if that breaks anything then please let us know by filing a bug and we'll update the dependencies in the brave-browser package.

@NumDeP
Copy link

NumDeP commented Sep 20, 2019

@fmarier thanks for fixing this. I don't mean to nit pick but for users that would practically copy and paste the instructions, won't the space between ...x86_64/ brave-browser in sudo zypper addrepo https://brave-browser-rpm-release.s3.brave.com/x86_64/ brave-browser cause an issue?

Furthermore, I think it would be okay if you were to also close these, right?

@fmarier
Copy link
Member

fmarier commented Sep 20, 2019

@fmarier thanks for fixing this. I don't mean to nit pick but for users that would practically copy and paste the instructions, won't the space between ...x86_64/ brave-browser in sudo zypper addrepo https://brave-browser-rpm-release.s3.brave.com/x86_64/ brave-browser cause an issue?

The space is intended actually. brave-browser is the filename to create in /etc/zypp/repos.d/ even though it does look like it's part of the repo URL :)

Furthermore, I think it would be okay if you were to also close these, right?

Indeed, I just closed them. Thanks.

That one is still outstanding. I don't have a fix for it yet. I added a comment asking for help. Hopefully a knowledgeable OpenSUSE person can provide more details as to what we need to do to fix it.

@fcrozat
Copy link

fcrozat commented Oct 3, 2019

I suggest to reopen this issue: the proposed documentation change didn't fix the initial error.

The problem is on Brave repository side, as noted in #1900 (comment)

@fmarier
Copy link
Member

fmarier commented Oct 3, 2019

I suggest to reopen this issue: the proposed documentation change didn't fix the initial error.

I have not encountered any errors (other than the one described in #3982) in my testing with the new instructions.

@fcrozat If you are still having problems, could you please file a new issue (this one is getting pretty messy already) with the exact steps you took to install Brave and also the exact error message you are seeing?

@fcrozat
Copy link

fcrozat commented Oct 7, 2019

I suggest to reopen this issue: the proposed documentation change didn't fix the initial error.

I have not encountered any errors (other than the one described in #3982) in my testing with the new instructions.

Did you try to refresh repository later, by simply using "zypper ref" (not with -f) ? This is when you will see the problem, not when adding the repository.

@fmarier
Copy link
Member

fmarier commented Oct 7, 2019

Did you try to refresh repository later, by simply using "zypper ref" (not with -f) ? This is when you will see the problem, not when adding the repository.

Indeed, while the initial installation works, updates appear to be broken. I filed #6338 for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted OS/Linux packaging Making Brave natively available to install on a variety of platforms, app stores, and repositories. priority/P3 The next thing for us to work on. It'll ride the trains.
Projects
None yet
Development

Successfully merging a pull request may close this issue.