Installation¶
Many major Linux distribution might already package rmlint – but watch out for
the version. If possible, we recommend using the newest version available.
If there is no package yet or you want to try a development version, you gonna
need to compile rmlint from source.
Dependencies¶
Hard dependencies:¶
glib \(\geq 2.74\) (general C Utility Library)
libjson-glib (parsing rmlint’s own json as caching layer)
Soft dependencies:¶
libblkid (detecting mountpoints)
libelf (nonstripped binary detection)
Build dependencies:¶
git (version control)
scons (build system)
sphinx (manpage/documentation generation)
gettext (support for localization)
Here’s a list of readily prepared commands for known operating systems:
Fedora
$ sudo dnf install git pkgconf gcc gettext scons glib2-devel json-glib-devel # Optional dependencies for more features: $ sudo dnf install libblkid-devel elfutils-libelf-devel # Optional dependencies for building documentation: $ sudo dnf install python3-sphinx python3-furo # Optional dependencies for the GUI: $ sudo dnf install python3-devel python3-setuptools gtksourceview4 gtk3 gdk-pixbuf2 hicolor-icon-theme python3-colorlog # Optional dependencies for tests: $ sudo dnf install python3-pytest-xdist+psutil python3-xattr python3-cpuinfo
There are also pre-built packages on Fedora Copr:
$ sudo dnf copr enable rodoma92/rmlint $ sudo dnf install rmlint
Since Fedora 29 we also have an official package.
ArchLinux
There is/used to be an official package in
[extra]here:$ pacman -S rmlint
Alternatively you can use
rmlint-gitin the AUR:$ sudo pacman -S pkgconf git scons glib2 gettext json-glib # Optional dependencies for more features: $ sudo pacman -S util-linux-libs libelf # Optional dependencies for building documentation: $ sudo pacman -S python-sphinx python-sphinx-furo # Optional dependencies for the GUI: $ sudo pacman -S python-setuptools python-gobject python-cairo gtksourceview4 librsvg python-colorlog # Optional dependencies for tests: $ sudo pacman -S python-pytest python-pytest-xdist python-xattr python-psutil python-xxhash python-py-cpuinfo btrfs-progs
There is also git packages in AUR, from the
masterbranch: rmlint-git, rmlint-shredder-git ; and thedevelopbranch: rmlint-develop-git, rmlint-shredder-develop-git.# Use your favourite AUR Helper. $ yaourt/yay/paru -S rmlint-git
Debian / Ubuntu / Raspberry Pi OS
Note: Debian and Ubuntu ships official packages. Use the below instructions if you need a more recent version.
# Ubuntu-only: $ sudo apt install software-properties-common && add-apt-repository universe $ sudo apt install git scons pkgconf gettext build-essential libjson-glib-1.0-0 libjson-glib-dev # Optional dependencies for more features: $ sudo apt install libelf-dev libglib2.0-dev libblkid-dev # Optional dependencies for building documentation: $ sudo apt install python3-sphinx furo # Optional dependencies for running the GUI: $ sudo apt install python3-gi-cairo gir1.2-gtksource-4 gir1.2-polkit-1.0 librsvg2-common python3-colorlog # Optional dependencies for installing the GUI: $ sudo apt install python3-setuptools python3-build python3-installer # Optional dependencies for tests: $ sudo apt install python3-pytest python3-pytest-xdist python3-psutil python3-xattr python3-blake3 python3-xxhash py-cpuinfo
macOS
rmlintcan be installed via homebrew. Note that theshreddergraphical interface is not included in this. Please see Issue #253 for details and updates.Prerequisite: If homebrew has not already been installed on the system, execute:
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
With homebrew installed, execute:
$ brew install rmlint
MacPorts and PowerPC ports also provide ports.
FreeBSD
FreeBSD and DragonFlyBSD both have official ports.
$ doas pkg install scons-py312 pkgconf gettext py312-sphinx glib json-glib # Optional dependency for more features: $ doas pkg install libblkid # Optional dependency for building documentation: $ doas pkg install py312-sphinx py312-furo # Optional dependencies for the GUI: $ doas pkg install gtksourceview4 librsvg2 py312-colorlog # Optional dependancies for the testing suite: $ doas pkg install py312-pip py312-blake3 py312-xxhash py312-py-cpuinfo bash dash
Others
GNU Guix, Alpine, Gentoo, NixOS, Void, Slackware and Solus also provide or used to provide ports or packages.
Send us a note if you want to see your distribution here or the instructions
need an update. The commands above install the full dependencies, therefore
some packages might be stripped if you do not need the feature
they enable. Only hard requirement for the commandline is glib.
Also be aware that the GUI needs at least \(gtk \geq 3.22\) to work!
Compilation¶
Compilation consists of getting the source and translating it into a usable
binary. We use the build system scons. Note that the following instructions
build the software from the potentially unstable develop branch:
$ # Omit -b develop if you want to build from the stable master
$ git clone -b develop https://github.com/sahib/rmlint.git
$ cd rmlint/
$ scons --show-config DEBUG=1 # show features and build locally.
# Install (and build if necessary). For releases you can omit DEBUG=1
# The default install prefix is /usr/local
$ sudo scons DEBUG=1 install
Done!
See Developer’s Guide for configuration options.
You should be now able to see the manpage with rmlint --help or man 1
rmlint.
Uninstall with sudo scons uninstall and clean with scons -c.
You can also only type the install command above. The buildsystem is clever
enough to figure out which targets need to be built beforehand.
Container¶
A containerised version is available, mostly for test and development purposes.
Note that for the time being, you cannot use it straightforwardly to scan system paths
(such as /usr/lib or /opt).
$ buildah bud -t rmlint . # build the container
$ podman run --rm -v "$PWD:$PWD" -w "$PWD" rmlint -o json # output to stdout
Troubleshooting¶
The GUI is built and installed as a Python wheel: scons install places
the shredder package in the Python library path belonging to the default
or chosen PREFIX=.
With the default PREFIX= that directory may not be on
Python’s search path. In that case point PYTHONPATH at the installed
location, e.g.:
$ export PYTHONPATH=/usr/local/lib/python3/site-packages