Self hosting Firefox Sync on CentOS 7

Configuring this piece of poorly documented bloated shit Mozilla came up with was a huge pain in the ass, so excuse the colored language but I am fucking pissed. The idea was to finally implement a system to synchronize Firefox’s bookmarks across multiple devices without giving Mozilla all my personal data. After some minutes spent researching the subject on the interweb I found out the synchronization system is a huge clusterfuck comprised of multiple components: …

Posted on

CentOS and yum - Error: rpmdb open failed

Today I had Ansible reporting an error on one of my CentOS machines while performing the usual upgrade procedure. I SSH’d into the host to check what was wrong and run yum clean all && yum update manually just to be greeted with the following error: rpmdb: PANIC: fatal region error detected; run recovery error: db3 error(-30974) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db3 - (-30974) error: cannot open Packages database in /var/lib/rpm CRITICAL:yum.main: Error: rpmdb open failed The solution to the issue luckily was fairly simple and quick: …

Posted on

NFS on Fedora

NFS allows to share files and folders over network and is much much faster than samba while using way less resources. To setup a NFS server on Fedora 26 install: $ dnf install nfs-utils Shared directories are listed in the following configuration file: --- # Syntax # <path> <ipaddr>(<option>) /home/user/Public 192.168.0.0/255.255.255.0(ro,sync) More information can be found here: Fedora NFS administration guide. In the above example, the the directory ‘/home/user/Public’ can be accessed by every client in the same LAN with read-only permissions. In case SELinux is active and enforcing rules some further configuration might be required: …

Posted on

AMD Ryzen-info :: Python

AMD Ryzen-info is a small Python script I wrote to monitor the main hardware system information of an AMD Ryzen system running on a recent version of Linux kernel. It relies on dmidecode and lm_sensors to gather the needed information, to get correct voltage and temperature readings it is critical that the most up to date version of the it87 kernel module is installed; Python version 3.5 or higher is also hard requirement. Edit /etc/sysconfig/lm_sensors to make it load it87 modules at boot: …

Posted on

AMD Ryzen on Linux

Finally we have some new hardware worth writing of and also spending money on. I have been using an AMD Ryzen 7 1700X based build for some time now and so far I am really liking it, the CPU is marvelous considering the pricetag and felt like a worthwhile upgrade from the Xeon E3-1241v3 I was using before; it is basically twice the cores clocked at pretty much the same speed. Awesome. There are a couple of points worth spending some words on tho. …

Posted on

Handbrake, compile from source on Fedora 25

Handbrake cannot be installed from default repos nor rpmfusion, to get it on Fedora 25 there are two other options: use negativo17 third party repository; compile from source. The first option is, but that is my opinion, subpar because I don’t trust third party repositories; option two is what is left. Download the source code from git and install some dependencies: $ git clone https://github.com/HandBrake/HandBrake.git $ sudo dnf install dbus-glib-devel gstreamer1-devel gstreamer1-plugins-base-devel intltool libgudev1-devel libnotify-devel webkitgtk3-devel libgudev-devel dbus-glib-devel webkitgtk3-devel gstream-devel libnotify-devel gstreamer1-devel gstreamer1-plugins-base-devel lame-devel opus-devel fribidi-devel libass-devel libtheora-devel x264-devel nasm Like I do with every other program I like to keep as much up to date as possible, I have a small script to take care of compilation, installation and upgrade processes for me. …

Posted on

Gajim and OMEMO on Gentoo Linux

OMEMO is the new-ish state of the art end-to-end encryption XMPP protocol extension, Gajim support it via a plugin but making it work on Gentoo is not straightforward at all. Gajim’s OMEMO plugin requires python-axolotl package to work, since that is not present in Gentoo’s repositories it must be installed from source. Before doing so a couple of dependencies must be installed first: $ emerge -a dev-python/protobuf-python $ chmod o+w /usr/lib64/python3.4/site-packages/protobuf-3.2.0-py3.4.egg/EGG-INFO/namespace_packages.txt $ emerge -a dev-python/pillow dev-python/qrcode The chmod command fix some permission issue that arise when installing packages depending on protobuf-python if Python 3.4 support is enabled. Get and compile python-axolotl: …

Posted on

Monitor hard disk SMART status :: Python

I have been fighting for years with smartd but I really never managed to configure it the way I want. While I certainly am not backblaze, I still have quite a few hard disks I would like to monitor and be able to replace before they actually die. I hacked up a small Python script to query some SMART attributes and send me an email in case something funky is going on; to use it just put in /etc/cron.daily and tell cronie to run it. To work correctly the script also needs smartctl and sendmail. …

Posted on