Pfl Provides whatprovides on Gentoo

On Fedora or CentOS, on way to find out what package providing a file we can use yum whatprovides [FILENAME] or dnf whatprovides [FILENAME] on a DNF-aware system. # dnf whatprovides tmux Last metadata expiration check: 2:33:06 ago on Wed 09 Sep 2020 09:45:07 PM AEST. tmux-3.0a-2.fc32.x86_64 : A terminal multiplexer Repo : @System Matched from: Provide : tmux = 3.0a-2.fc32 tmux-3.0a-2.fc32.x86_64 : A terminal multiplexer Repo : fedora Matched from: Provide : tmux = 3.0a-2.fc32 I really need this similar tool on Gentoo, and it looks like the emerge command doesn’t have this function built it. Fortunately, there is a utility called e-file (provided by pfl package) which kinda provides this whatprovides option as in yum and dnf. ...

September 4, 2020 · 2 min · 316 words · kenno

Locking Package Version with DNF Versionlock

While newer version of a package on Linux system is generally a good thing, and we should upgrade it, there is times when we should hold on to the older version. For instance, Fedora 32 just released a newer version of the kernel package 5.8.4 recently, and with this version, the zfs module, version 0.8.4, can’t be built. Therefore, if your Fedora system uses ZFS, like some of my machines, you’ll end up not seeing any ZFS dataset or pools. ...

August 30, 2020 · 3 min · 490 words · kenno

How to Enable Persistent Logging for Systemd Journal

On RHEL 7/8, CentOS 7/8 and even Ubuntu (??), by default the journal log data is stored only in memory (/run/log/journal/ directory). There are 2 ways to retain the journal log messages. The first one is to set the variable Storage to persistent in the /etc/systemd/journald.conf. [Journal] Storage=persistent Then restart the systemd-journald service. Another solution is simpler and it looks like it’s the recommended way of achieving this. All we have to do is to create a directory, /var/log/journal (with correct ownership and permission), and journald will automatically store the log messages there. ...

August 29, 2020 · 2 min · 418 words · kenno

Thunderbolt Firmware for ThinkPad X1 Carbon 6 1.20

A quick note to remind ThinkPad X1 Carbon 6 users that Lenovo just released a new firmware for the Thunderbolt on this laptop. And, it’s available via fwupd if you run Fedora (possibly also available on Ubuntu). [root@benji ~]# fwupdmgr update • Thunderbolt Controller has the latest available firmware version Upgrade available for Embedded Controller from 0.1.20 to 0.1.21 20KHCTO1WW must remain plugged into a power source for the duration of the update to avoid damage. Continue with update? [Y|n]: Downloading… [***************************************] Decompressing… [***************************************] Authenticating… [***************************************] Updating Embedded Controller…************************************] Scheduling… [***************************************] Successfully installed firmware • Intel Management Engine has the latest available firmware version • SAMSUNG MZVLW256HEHP-000L7 has no available firmware updates • System Firmware has the latest available firmware version An update requires a reboot to complete. Restart now? [y|N]: All you need to do is rebooting the machine.

August 13, 2020 · 1 min · 140 words · kenno

SELinux Error ValueError: Port already Defined

Today, I want to run the httpd server on a custom port, 8002 on a CentOS 7 server. Of course, all my system has SELinux in enforcing mode. In order for the httpd to bind on port 8002, we need to add this port to the httpd_port_t port type list. First let’s confirm that port 8002 is not yet in the http_port_t list: [root@servera ~]# semanage port -l | grep ^http http_cache_port_t tcp 8080, 8118, 8123, 10001-10010 http_cache_port_t udp 3130 http_port_t tcp 80, 81, 443, 488, 8008, 8009, 8443, 9000 We know from the manual semanage-port(8), to add a port to an SELinux port type list, we run the following command: ...

July 27, 2020 · 2 min · 359 words · kenno