Table of Contents
1 Changes from CentOS 7
1.1 Package manager yum is changed to dnf
The package manager dnf is introduced in Fedora 22 and is compatible with yum arguments. Now the yum is a symbolic link to dnf, you can excecute yum command like CentOS 7.
- The yum-builddep command is replaced to dnf builddep. The dnf builddep is provided by dnf-plugins-core package.
- The debuginfo-install command is replaced to dnf debuginfo-install. The debuginfo-install is provided by dnf-plugins-core package.
1.2 Multiple version and multiple architecture debuginfo and /usr/bin/.build-id
When the build ID of /path/to/binary is xxyy, CentOS 7 is the following.
- /usr/lib/debug/.build-id/xx/yy.debug is a symbolic link to /usr/lib/debug/path/to/binary.debug.
- /usr/lib/debug/.build-id/xx/yy is a symbolic link to /path/to/binary. And /usr/lib/.debug is not there.
CentOS 8 is the following. For more infomation, please see ParallelInstallableDebuginfo.
- /usr/lib/debug/.build-id/xx/yy.debug is a symbolic link to /usr/lib/debug/path/to/binary-version.arch.debug like /usr/lib/debug/usr/bin/bash-4.4.20-1.el8_4.x86_64.debug. This can allow to install multiple version and multiple architecture debuginfo.
- /usr/lib/debug/.build-id/xx/yy is a symbolic link to /usr/lib/.build-id/xx/yy. If /usr/lib/debug is NFS mount point, for renaming /path/to/binary, CentOS 7 needs to replace a symbolic link on NFS server. CentOS 8 do not need, just replace /usr/lib/.debug/xx/yy on local machine.
-
If you do not create /usr/lib/.debug of specific package, you need to add the following to SPEC file.
%define _build_id_links none
1.3 The category of repository is changed
EPEL and RPM Fusion is same with CentOS 7.
$ sudo dnf install -y epel-release $ sudo dnf install -y rpmfusion-free-release
The category of repository in CentOS 7 is the following.
$ ls /etc/yum.repos.d # CentOS 7 CentOS-Base.repo CentOS-SCLo-scl-rh.repo entOS-fasttrack.repo CentOS-CR.repo CentOS-SCLo-scl.repo epel-testing.repo CentOS-Debuginfo.repo CentOS-Sources.repo epel.repo CentOS-Media.repo CentOS-Vault.repo
The category of repository in CentOS 8 is the following. This is because package manifest is changed in REHL 8.
$ ls /etc/yum.repos.d # CentOS 8 CentOS-Linux-AppStream.repo CentOS-Linux-Plus.repo CentOS-Linux-BaseOS.repo CentOS-Linux-PowerTools.repo CentOS-Linux-ContinuousRelease.repo CentOS-Linux-Sources.repo CentOS-Linux-Debuginfo.repo epel-modular.repo CentOS-Linux-Devel.repo epel-playground.repo CentOS-Linux-Extras.repo epel-testing-modular.repo CentOS-Linux-FastTrack.repo epel-testing.repo CentOS-Linux-HighAvailability.repo epel.repo CentOS-Linux-Media.repo
If you want to enable PowerTools repository, you need to run dnf config-manager –set-enabled.
$ sudo dnf config-manager --set-enabled powertools
You can check repository list with dnf repolist.
$ dnf repolist # --enabled $ dnf repolist --disabled $ dnf repolist --all
1.4 Some missing xxx-devel package
Most of xxx-devel package are in PowerTools repository. The problem is that some xxx-devel package are not even in PowerTools repository. These xxx-devel packages are built but not stored to repository.
When your application uses xxx-devel, you cannot build your application. Also the dnf builddep cannot find some xxx-devel package.
$ for repo in cr devel fasttrack ha plus powertools; do sudo dnf config-manager --set-enabled "$repo"; done $ sudo dnf builddep emacs enabling appstream-source repository enabling baseos-source repository enabling extras-source repository enabling plus-source repository enabling epel-modular-source repository enabling epel-source repository Last metadata expiration check: 0:00:10 ago on Tue 22 Jun 2021 07:15:07 PM JST. Package desktop-file-utils-0.23-8.el8.x86_64 is already installed. Package bzip2-1.0.6-26.el8.x86_64 is already installed. Package gzip-1.9-12.el8.x86_64 is already installed. Package glibc-devel-2.28-151.el8.x86_64 is already installed. Package cairo-1.15.12-3.el8.x86_64 is already installed. Package libjpeg-turbo-1.5.3-10.el8.x86_64 is already installed. No matching package to install: 'libotf-devel' No matching package to install: 'm17n-lib-devel' Not all dependencies satisfied Error: Some packages could not be found.
For avoiding this problem, you need to build xxx package which includes xxx-devel.
#!/bin/sh -e sudo dnf install -y dnf-plugins-core rpmdevtools make sudo dnf config-manager --set-enabled powertools for build_requires in libotf m17n-db m17n-lib; do dnf download --source ${build_requires} sudo dnf builddep -y ./${build_requires}* rpmbuild --rebuild --define "debug_package %{nil}" ./${build_requires}* sudo dnf localinstall -y $(find rpmbuild/RPMS/ -name "*.rpm") rm -rf ~/rpmbuild done dnf download --source emacs sudo dnf builddep -y emacs* rpmbuild --rebuild --define "debug_package %{nil}" emacs*
1.5 EOL of CentOS 8 changes from 2029 to 2021
EOL of CentOS 7 is 2024. CentOS 8 will be end earlier than CentOS 7.
CentOS will be shif to CentOS Stream which is rolling release. CentOS Stream is upstream of REHL while CentOS 7 is equal with REHL 7. The relationship between CentOS Stream and REHL is like Leap and Tumbleweed of OpenSUSE.
2 CentOS Stream
EOL of CentOS Stream 8 is 2024/05/31. CentOS Stream does not have some xxx-devel package too.
On 2021/06/22, dnf repolist cannot find src.rpm and debuginfo repository. You cannot run dnf builddep and dnf debuginfo-install.
src.rpm and debuginfo is stored to here but dnf repolist cannot find it.
By the way, there is a git repository of src.rpm. You can build packages with this git repository.
#!/bin/sh -e sudo dnf install -y dnf-plugins-core rpmdevtools make sudo dnf config-manager --set-enabled powertools mkdir -p ~/src/git.centos.org cd ~/src/git.centos.org for build_requires in libotf m17n-db m17n-lib; do rm -rf ~/rpmbuild/ mkdir ~/rpmbuild git clone https://git.centos.org/rpms/${build_requires} cp -a ${build_requires}/* ~/rpmbuild/ sudo dnf builddep -y ~/rpmbuild/SPECS/*.spec mkdir -p ~/rpmbuild/SOURCES/ spectool -g -R ~/rpmbuild/SPECS/*.spec rpmbuild -ba --define "debug_package %{nil}" ~/rpmbuild/SPECS/*.spec sudo dnf localinstall -y $(find ~/rpmbuild/RPMS/ -name "*.rpm") done rm -rf ~/rpmbuild/ mkdir ~/rpmbuild git clone https://git.centos.org/rpms/emacs cp -a emacs/* ~/rpmbuild/ sudo dnf builddep -y ~/rpmbuild/SPECS/*.spec mkdir -p ~/rpmbuild/SOURCES/ spectool -g -R ~/rpmbuild/SPECS/*.spec rpmbuild -ba --define "debug_package %{nil}" ~/rpmbuild/SPECS/*.spec sudo dnf localinstall -y $(find ~/rpmbuild/RPMS/ -name "*.rpm")
3 CentOS alternative distro
On 2021/06/22, Alma Linux is so nice that Alima Linux is almost same with CentOS 8. Rocky Linux cannot find src.rpm repository yet.
If you try to use few CentOS machine, you can use RHEL with developer subscription which allows to install RHEL to 16 machines.