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 7CentOS-Base.repo CentOS-SCLo-scl-rh.repo entOS-fasttrack.repoCentOS-CR.repo CentOS-SCLo-scl.repo epel-testing.repoCentOS-Debuginfo.repo CentOS-Sources.repo epel.repoCentOS-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 8CentOS-Linux-AppStream.repo CentOS-Linux-Plus.repoCentOS-Linux-BaseOS.repo CentOS-Linux-PowerTools.repoCentOS-Linux-ContinuousRelease.repo CentOS-Linux-Sources.repoCentOS-Linux-Debuginfo.repo epel-modular.repoCentOS-Linux-Devel.repo epel-playground.repoCentOS-Linux-Extras.repo epel-testing-modular.repoCentOS-Linux-FastTrack.repo epel-testing.repoCentOS-Linux-HighAvailability.repo epel.repoCentOS-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 emacsenabling appstream-source repositoryenabling baseos-source repositoryenabling extras-source repositoryenabling plus-source repositoryenabling epel-modular-source repositoryenabling epel-source repositoryLast 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 satisfiedError: Some packages could not be found.
For avoiding this problem, you need to build xxx package which includes xxx-devel.
#!/bin/sh -esudo dnf install -y dnf-plugins-core rpmdevtools makesudo dnf config-manager –set-enabled powertoolsfor 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 ~/rpmbuilddonednf download –source emacssudo 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.
- [CentOS-devel] Questions regarding CS8
- 0017951: Missing source code for CentOS 8-stream
By the way, there is a git repository of src.rpm. You can build packages with this git repository.
#!/bin/sh -esudo dnf install -y dnf-plugins-core rpmdevtools makesudo dnf config-manager –set-enabled powertoolsmkdir -p ~/src/git.centos.orgcd ~/src/git.centos.orgfor build_requires in libotf m17n-db m17n-lib; do rm -rf ~/rpmbuild/ mkdir ~/rpmbuild git clone {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”)donerm -rf ~/rpmbuild/mkdir ~/rpmbuildgit clone -a emacs/* ~/rpmbuild/sudo dnf builddep -y ~/rpmbuild/SPECS/*.specmkdir -p ~/rpmbuild/SOURCES/spectool -g -R ~/rpmbuild/SPECS/*.specrpmbuild -ba –define “debug_package %{nil}” ~/rpmbuild/SPECS/*.specsudo 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.
]]> tagPlaceholderカテゴリ: en, centos-8, 202107