How To Install coccinelle on Fedora 36

In this tutorial we learn how to install coccinelle in Fedora 36. coccinelle is Semantic patching for Linux (spatch)

Introduction

In this tutorial we learn how to install coccinelle on Fedora 36.

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 Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install coccinelle.

Install coccinelle on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install coccinelle

Install coccinelle on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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 Fedora 36

To uninstall only the coccinelle package we can use the following command:

sudo dnf remove coccinelle

coccinelle Package Contents on Fedora 36

/usr/bin/pycocci
/usr/bin/spatch
/usr/bin/spgen
/usr/lib/.build-id
/usr/lib/.build-id/04
/usr/lib/.build-id/04/ef183c7a407383135a1d477dde9768792f7f4d
/usr/lib/.build-id/a2
/usr/lib/.build-id/a2/5e18ca08e5ed495ad535f95c4c22f4324eeb73
/usr/lib/.build-id/c8
/usr/lib/.build-id/c8/12e9bc398a69dc92f83bf9c34b11f305681a69
/usr/lib/python3.10/site-packages/coccilib
/usr/lib/python3.10/site-packages/coccilib/__init__.py
/usr/lib/python3.10/site-packages/coccilib/__pycache__
/usr/lib/python3.10/site-packages/coccilib/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/coccilib/__pycache__/__init__.cpython-310.pyc
/usr/lib/python3.10/site-packages/coccilib/__pycache__/elems.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/coccilib/__pycache__/elems.cpython-310.pyc
/usr/lib/python3.10/site-packages/coccilib/__pycache__/iteration.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/coccilib/__pycache__/iteration.cpython-310.pyc
/usr/lib/python3.10/site-packages/coccilib/__pycache__/org.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/coccilib/__pycache__/org.cpython-310.pyc
/usr/lib/python3.10/site-packages/coccilib/__pycache__/output.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/coccilib/__pycache__/output.cpython-310.pyc
/usr/lib/python3.10/site-packages/coccilib/__pycache__/report.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/coccilib/__pycache__/report.cpython-310.pyc
/usr/lib/python3.10/site-packages/coccilib/__pycache__/trac.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/coccilib/__pycache__/trac.cpython-310.pyc
/usr/lib/python3.10/site-packages/coccilib/__pycache__/xml_firehose.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/coccilib/__pycache__/xml_firehose.cpython-310.pyc
/usr/lib/python3.10/site-packages/coccilib/elems.py
/usr/lib/python3.10/site-packages/coccilib/iteration.py
/usr/lib/python3.10/site-packages/coccilib/org.py
/usr/lib/python3.10/site-packages/coccilib/output.py
/usr/lib/python3.10/site-packages/coccilib/report.py
/usr/lib/python3.10/site-packages/coccilib/trac.py
/usr/lib/python3.10/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 Fedora 36 using yum and [dnf]((/fedora/36/dnf/).