How To Install checkpolicy on Fedora 34

checkpolicy is SELinux policy compiler

Introduction

In this tutorial we learn how to install checkpolicy on Fedora 34.

What is checkpolicy

Security-enhanced Linux is a feature of the Linux® kernel and a number of utilities with enhanced security functionality designed to add mandatory access controls to Linux. The Security-enhanced Linux kernel contains new architectural components originally developed to improve the security of the Flask operating system. These architectural components provide general support for the enforcement of many kinds of mandatory access control policies, including those based on the concepts of Type Enforcement®, Role-based Access Control, and Multi-level Security. This package contains checkpolicy, the SELinux policy compiler. Only required for building policies.

We can use yum or dnf to install checkpolicy on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install checkpolicy.

Install checkpolicy on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo dnf -y install checkpolicy

Install checkpolicy on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo yum -y install checkpolicy

How To Uninstall checkpolicy on Fedora 34

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

sudo dnf remove checkpolicy

checkpolicy Package Contents on Fedora 34

/usr/bin/checkmodule
/usr/bin/checkpolicy
/usr/bin/sedismod
/usr/bin/sedispol
/usr/lib/.build-id
/usr/lib/.build-id/b4
/usr/lib/.build-id/b4/1cb3d7279d2fc0f4bb75d79cb52cfb54869997
/usr/lib/.build-id/d0
/usr/lib/.build-id/d0/d2213eb05d2e3a7386532458015c24cc52c502
/usr/lib/.build-id/e0
/usr/lib/.build-id/e0/ec2ef453c2df27fb7ee54b8d839d0511ac0d36
/usr/lib/.build-id/e3
/usr/lib/.build-id/e3/d767d2d175ddbd8fc1dc5f1198bd6dc9ccd0c5
/usr/share/licenses/checkpolicy
/usr/share/licenses/checkpolicy/COPYING
/usr/share/man/man8/checkmodule.8.gz
/usr/share/man/man8/checkpolicy.8.gz
/usr/share/man/ru/man8/checkmodule.8.gz
/usr/share/man/ru/man8/checkpolicy.8.gz

References

Summary

In this tutorial we learn how to install checkpolicy on Fedora 34 using yum and dnf.