How To Install coccinelle on CentOS 8
Introduction
In this tutorial we learn how to install coccinelle
on CentOS 8.
What is coccinelle
Coccinelle is a tool to utilize semantic patches for manipulating C code. It was originally designed to ease maintenance of device drivers in the Linux kernel.
We can use yum
or dnf
to install coccinelle
on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install coccinelle.
Install coccinelle 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 coccinelle
using dnf
by running the following command:
sudo dnf -y install coccinelle
Install coccinelle 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 coccinelle
using yum
by running the following command:
sudo yum -y install coccinelle
How To Uninstall coccinelle on CentOS 8
To uninstall only the coccinelle
package we can use the following command:
sudo dnf remove coccinelle
coccinelle Package Contents on CentOS 8
/usr/bin/pycocci
/usr/bin/spatch
/usr/bin/spgen
/usr/lib/.build-id
/usr/lib/.build-id/23
/usr/lib/.build-id/23/c55c272828ef392342a2ec51013295cc0dbabb
/usr/lib/.build-id/2d
/usr/lib/.build-id/2d/9a9259ff2053450427d9388fc37095647527e5
/usr/lib/.build-id/58
/usr/lib/.build-id/58/8dd5d8d42b011434abfffea83cba0a59180102
/usr/lib/python3.6/site-packages/coccilib
/usr/lib/python3.6/site-packages/coccilib/__init__.py
/usr/lib/python3.6/site-packages/coccilib/__pycache__
/usr/lib/python3.6/site-packages/coccilib/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/coccilib/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/coccilib/__pycache__/elems.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/coccilib/__pycache__/elems.cpython-36.pyc
/usr/lib/python3.6/site-packages/coccilib/__pycache__/iteration.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/coccilib/__pycache__/iteration.cpython-36.pyc
/usr/lib/python3.6/site-packages/coccilib/__pycache__/org.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/coccilib/__pycache__/org.cpython-36.pyc
/usr/lib/python3.6/site-packages/coccilib/__pycache__/output.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/coccilib/__pycache__/output.cpython-36.pyc
/usr/lib/python3.6/site-packages/coccilib/__pycache__/report.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/coccilib/__pycache__/report.cpython-36.pyc
/usr/lib/python3.6/site-packages/coccilib/__pycache__/trac.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/coccilib/__pycache__/trac.cpython-36.pyc
/usr/lib/python3.6/site-packages/coccilib/__pycache__/xml_firehose.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/coccilib/__pycache__/xml_firehose.cpython-36.pyc
/usr/lib/python3.6/site-packages/coccilib/coccigui
/usr/lib/python3.6/site-packages/coccilib/coccigui/__init__.py
/usr/lib/python3.6/site-packages/coccilib/coccigui/__pycache__
/usr/lib/python3.6/site-packages/coccilib/coccigui/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/coccilib/coccigui/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/coccilib/coccigui/__pycache__/coccigui.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/coccilib/coccigui/__pycache__/coccigui.cpython-36.pyc
/usr/lib/python3.6/site-packages/coccilib/coccigui/__pycache__/pycoccimodel.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/coccilib/coccigui/__pycache__/pycoccimodel.cpython-36.pyc
/usr/lib/python3.6/site-packages/coccilib/coccigui/__pycache__/vim.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/coccilib/coccigui/__pycache__/vim.cpython-36.pyc
/usr/lib/python3.6/site-packages/coccilib/coccigui/__pycache__/vimcom.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/coccilib/coccigui/__pycache__/vimcom.cpython-36.pyc
/usr/lib/python3.6/site-packages/coccilib/coccigui/__pycache__/vimeditor.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/coccilib/coccigui/__pycache__/vimeditor.cpython-36.pyc
/usr/lib/python3.6/site-packages/coccilib/coccigui/__pycache__/vimembed.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/coccilib/coccigui/__pycache__/vimembed.cpython-36.pyc
/usr/lib/python3.6/site-packages/coccilib/coccigui/coccigui.py
/usr/lib/python3.6/site-packages/coccilib/coccigui/pycoccimodel.py
/usr/lib/python3.6/site-packages/coccilib/coccigui/pygui.glade
/usr/lib/python3.6/site-packages/coccilib/coccigui/pygui.gladep
/usr/lib/python3.6/site-packages/coccilib/coccigui/vim.py
/usr/lib/python3.6/site-packages/coccilib/coccigui/vimcom.py
/usr/lib/python3.6/site-packages/coccilib/coccigui/vimeditor.py
/usr/lib/python3.6/site-packages/coccilib/coccigui/vimembed.py
/usr/lib/python3.6/site-packages/coccilib/elems.py
/usr/lib/python3.6/site-packages/coccilib/iteration.py
/usr/lib/python3.6/site-packages/coccilib/org.py
/usr/lib/python3.6/site-packages/coccilib/output.py
/usr/lib/python3.6/site-packages/coccilib/report.py
/usr/lib/python3.6/site-packages/coccilib/trac.py
/usr/lib/python3.6/site-packages/coccilib/xml_firehose.py
/usr/lib64/coccinelle
/usr/lib64/coccinelle/ocaml
/usr/lib64/coccinelle/ocaml/ast0_cocci.cmi
/usr/lib64/coccinelle/ocaml/ast_c.cmi
/usr/lib64/coccinelle/ocaml/ast_cocci.cmi
/usr/lib64/coccinelle/ocaml/coccilib.cmi
/usr/lib64/coccinelle/ocaml/commands.cmi
/usr/lib64/coccinelle/ocaml/common.cmi
/usr/lib64/coccinelle/ocaml/config.cmi
/usr/lib64/coccinelle/ocaml/dumper.cmi
/usr/lib64/coccinelle/ocaml/exposed_modules.cmi
/usr/lib64/coccinelle/ocaml/externalanalysis.cmi
/usr/lib64/coccinelle/ocaml/flag.cmi
/usr/lib64/coccinelle/ocaml/flag_parsing_c.cmi
/usr/lib64/coccinelle/ocaml/iteration.cmi
/usr/lib64/coccinelle/ocaml/lexer_c.cmi
/usr/lib64/coccinelle/ocaml/lib_parsing_c.cmi
/usr/lib64/coccinelle/ocaml/ocamlcocci_aux.cmi
/usr/lib64/coccinelle/ocaml/parmap.cmi
/usr/lib64/coccinelle/ocaml/parse_c.cmi
/usr/lib64/coccinelle/ocaml/parser_c.cmi
/usr/lib64/coccinelle/ocaml/prepare_ocamlcocci.cmi
/usr/lib64/coccinelle/ocaml/pretty_print_c.cmi
/usr/lib64/coccinelle/ocaml/regexp.cmi
/usr/lib64/coccinelle/ocaml/run_ocamlcocci.cmi
/usr/lib64/coccinelle/ocaml/token_c.cmi
/usr/lib64/coccinelle/ocaml/visitor_c.cmi
/usr/lib64/coccinelle/ocaml/yes_prepare_ocamlcocci.cmi
/usr/lib64/coccinelle/spatch
/usr/lib64/coccinelle/standard.h
/usr/lib64/coccinelle/standard.iso
/usr/lib64/ocaml/ast0_cocci.cmx
/usr/lib64/ocaml/ast_c.cmx
/usr/lib64/ocaml/ast_cocci.cmx
/usr/lib64/ocaml/coccilib.cmx
/usr/lib64/ocaml/commands.cmx
/usr/lib64/ocaml/common.cmx
/usr/lib64/ocaml/config.cmx
/usr/lib64/ocaml/dumper.cmx
/usr/lib64/ocaml/exposed_modules.cmx
/usr/lib64/ocaml/externalanalysis.cmx
/usr/lib64/ocaml/flag.cmx
/usr/lib64/ocaml/flag_parsing_c.cmx
/usr/lib64/ocaml/iteration.cmx
/usr/lib64/ocaml/lexer_c.cmx
/usr/lib64/ocaml/lib_parsing_c.cmx
/usr/lib64/ocaml/ocamlcocci_aux.cmx
/usr/lib64/ocaml/parmap.cmx
/usr/lib64/ocaml/parse_c.cmx
/usr/lib64/ocaml/parser_c.cmx
/usr/lib64/ocaml/prepare_ocamlcocci.cmx
/usr/lib64/ocaml/pretty_print_c.cmx
/usr/lib64/ocaml/regexp.cmx
/usr/lib64/ocaml/run_ocamlcocci.cmx
/usr/lib64/ocaml/stublibs/dllpyml_stubs.so
/usr/lib64/ocaml/token_c.cmx
/usr/lib64/ocaml/visitor_c.cmx
/usr/lib64/ocaml/yes_prepare_ocamlcocci.cmx
/usr/share/doc/coccinelle
/usr/share/doc/coccinelle/authors.txt
/usr/share/doc/coccinelle/bugs.txt
/usr/share/doc/coccinelle/changes.txt
/usr/share/doc/coccinelle/credits.txt
/usr/share/doc/coccinelle/install.txt
/usr/share/doc/coccinelle/readme.txt
/usr/share/licenses/coccinelle
/usr/share/licenses/coccinelle/copyright.txt
/usr/share/licenses/coccinelle/license.txt
/usr/share/man/man1/pycocci.1.gz
/usr/share/man/man1/spatch.1.gz
/usr/share/man/man1/spgen.1.gz
/usr/share/man/man3/Coccilib.3cocci.gz
References
Summary
In this tutorial we learn how to install coccinelle
on CentOS 8 using yum and dnf.