openSUSE / migration-tool

openSUSE migration tool
Apache License 2.0
0 stars 1 forks source link

install sles-release from free bci repo, rather than play with /etc/os-release #4

Open lkocman opened 6 days ago

lkocman commented 6 days ago

We can simply install sles-release from a publicly accessible BCI repo which means we don't have to worry about rewriting files in /etc any more

docker run -it registry.suse.com/bci/bci-base:15.5 /bin/bash 
Unable to find image 'registry.suse.com/bci/bci-base:15.5' locally
15.5: Pulling from bci/bci-base
28b904aafc92: Pull complete 
Digest: sha256:c8425a3d9b09622de791fc9928b4a38631982ccf9664edce574a47c7db6157c9
Status: Downloaded newer image for registry.suse.com/bci/bci-base:15.5
7ada94164193:/ # cat /etc/zypp/repos.d/SLE_BCI.repo 
[SLE_BCI]
enabled=1
autorefresh=1
baseurl=https://updates.suse.com/SUSE/Products/SLE-BCI/$releasever_major-SP$releasever_minor/$basearch/product/
priority=100
gpgcheck=1
7ada94164193:/ # rpm -qa | grep release
sles-release-15.5-150500.61.4.1.x86_64
7ada94164193:/ # zypper search sles-release
Refreshing service 'container-suseconnect-zypp'.
Retrieving repository 'SLE_BCI' metadata ...............................................................................................................................................................................................[done]
Building repository 'SLE_BCI' cache ....................................................................................................................................................................................................[done]
Loading repository data...
Reading installed packages...

S  | Name         | Summary                             | Type
---+--------------+-------------------------------------+--------
i+ | sles-release | SUSE Linux Enterprise Server 15 SP5 | package
7ada94164193:/ # zypper ref
Refreshing service 'container-suseconnect-zypp'.
Repository 'SLE_BCI' is up to date.                                                                                                                                                                                                           
All repositories have been refreshed.
7ada94164193:/ # zypper lr -u
Refreshing service 'container-suseconnect-zypp'.
Repository priorities are without effect. All enabled repositories share the same priority.

# | Alias          | Name           | Enabled | GPG Check | Refresh | URI
--+----------------+----------------+---------+-----------+---------+-----------------------------------------------------------------------------
1 | SLE_BCI        | SLE_BCI        | Yes     | (r ) Yes  | Yes     | https://updates.suse.com/SUSE/Products/SLE-BCI/15-SP5/x86_64/product/
2 | SLE_BCI_debug  | SLE_BCI_debug  | No      | ----      | ----    | https://updates.suse.com/SUSE/Products/SLE-BCI/15-SP5/x86_64/product_debug/
3 | SLE_BCI_source | SLE_BCI_source | No      | ----      | ----    | https://updates.suse.com/SUSE/Products/SLE-BCI/15-SP5/x86_64/product_source/
7ada94164193:/ # cat /etc/os-release 
NAME="SLES"
VERSION="15-SP5"
VERSION_ID="15.5"
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP5"
ID="sles"
ID_LIKE="suse"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:15:sp5"
DOCUMENTATION_URL="https://documentation.suse.com/"