How To Install csmock-common on CentOS 8

csmock-common is Core of csmock (a mock wrapper for Static Analysis tools)

Introduction

In this tutorial we learn how to install csmock-common on CentOS 8.

What is csmock-common

This package contains the csmock tool that allows to scan SRPMs by Static Analysis tools in a fully automated way.

We can use yum or dnf to install csmock-common on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install csmock-common.

Install csmock-common on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install csmock-common using dnf by running the following command:

sudo dnf -y install csmock-common

Install csmock-common on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install csmock-common using yum by running the following command:

sudo yum -y install csmock-common

How To Uninstall csmock-common on CentOS 8

To uninstall only the csmock-common package we can use the following command:

sudo dnf remove csmock-common

csmock-common Package Contents on CentOS 8

/usr/bin/csmock
/usr/lib/python3.6/site-packages/csmock
/usr/lib/python3.6/site-packages/csmock/__init__.py
/usr/lib/python3.6/site-packages/csmock/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/csmock/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/csmock/common
/usr/lib/python3.6/site-packages/csmock/common/__init__.py
/usr/lib/python3.6/site-packages/csmock/common/__pycache__
/usr/lib/python3.6/site-packages/csmock/common/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/csmock/common/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/csmock/common/__pycache__/cflags.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/csmock/common/__pycache__/cflags.cpython-36.pyc
/usr/lib/python3.6/site-packages/csmock/common/__pycache__/results.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/csmock/common/__pycache__/results.cpython-36.pyc
/usr/lib/python3.6/site-packages/csmock/common/__pycache__/util.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/csmock/common/__pycache__/util.cpython-36.pyc
/usr/lib/python3.6/site-packages/csmock/common/cflags.py
/usr/lib/python3.6/site-packages/csmock/common/results.py
/usr/lib/python3.6/site-packages/csmock/common/util.py
/usr/lib/python3.6/site-packages/csmock/plugins
/usr/lib/python3.6/site-packages/csmock/plugins/__init__.py
/usr/lib/python3.6/site-packages/csmock/plugins/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/csmock/plugins/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/csmock/plugins/__pycache__/gcc.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/csmock/plugins/__pycache__/gcc.cpython-36.pyc
/usr/lib/python3.6/site-packages/csmock/plugins/gcc.py
/usr/share/csmock
/usr/share/csmock/cwe-map.csv
/usr/share/csmock/scripts
/usr/share/csmock/scripts/chroot-fixups
/usr/share/csmock/scripts/chroot-fixups/gdk-pixbuf2-triggers.sh
/usr/share/csmock/scripts/chroot-fixups/glib2-triggers.sh
/usr/share/csmock/scripts/chroot-fixups/kpathsea-texhash.sh
/usr/share/csmock/scripts/chroot-fixups/qt5-core-abi.sh
/usr/share/csmock/scripts/chroot-fixups/rpm-build-scripts.sh
/usr/share/csmock/scripts/chroot-fixups/rpm-macros.sh
/usr/share/csmock/scripts/chroot-fixups/rpm-python-extras.sh
/usr/share/csmock/scripts/chroot-fixups/shared-mime-info-triggers.sh
/usr/share/csmock/scripts/enable-keep-going.sh
/usr/share/csmock/scripts/patch-rawbuild.sh
/usr/share/doc/csmock-common
/usr/share/doc/csmock-common/COPYING
/usr/share/doc/csmock-common/README
/usr/share/man/man1/csmock.1.gz

References

Summary

In this tutorial we learn how to install csmock-common on CentOS 8 using yum and dnf.