Bug 111402 - amdgpu-pro-install fails to install on openSUSE Leap 15.1 due to insufficient checks of $ID [PATCH included]
Summary: amdgpu-pro-install fails to install on openSUSE Leap 15.1 due to insufficient...
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/AMDgpu-pro (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Jeremy Newton
QA Contact:
Depends on:
Reported: 2019-08-14 19:04 UTC by Timo Sigurdsson
Modified: 2019-11-19 08:01 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Simple fix that allows installing on openSUSE Leap 15.1 (497 bytes, patch)
2019-08-14 19:04 UTC, Timo Sigurdsson
no flags Details | Splinter Review

Description Timo Sigurdsson 2019-08-14 19:04:21 UTC
Created attachment 145064 [details] [review]
Simple fix that allows installing on openSUSE Leap 15.1


I downloaded the latest amdgpu-pro-19.30-844693-sle-15.tar.xz package from amd.com and tried to install it on openSUSE Leap 15.1 following the docs [1].

The command
  $ ./amdgpu-pro-install --opencl=legacy --headless
failed with the following error:
  tee: /etc/yum.repos.d/amdgpu-pro-local.repo: No such file or directory

So, the installer seems to mistake my system for a RHEL/CentOS-based OS.

Looking at the code, I noticed the script gets the $ID from /etc/os-release which in my case looks like this:
NAME="openSUSE Leap"
VERSION="15.1 "

The function yum_repo() in the script does not properly check the $ID, however. It only matches against the strings 'sles', 'sled' and 'opensuse', but not 'opensuse-leap'. This is contrary to the function os_release() which matches opensuse-leap as well (with a wildcard).

So, the solution to the issue is a simple wildcard. I'm attaching a patch that allowed me to run the installer on openSUSE Leap 15.1.



[1] https://amdgpu-install.readthedocs.io/en/latest/install-installing.html
Comment 1 Jeremy Newton 2019-10-02 17:30:52 UTC
Thanks for the patch! I have a similar fix that I'll land in an upcoming driver build.

For the time being it's easy to work around.
Comment 2 Martin Peres 2019-11-19 08:01:03 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/40.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.