User:Needle

Meet me in freenode's fvwm IRC channel.

Automated rebuild of portage packages
This solution relies on the and the usage of anacron USE flag.

What does that anacron USE flag do, verify using the euse tool:

it is a added feature or function to cronie. The anacron USE flag re-schedules missed cron jobs for machines that are not 24/7 online, like f.e. laptops, workstations. Apart from that it is working like an usual cron scheduler. This feature does not rely on the separate anacron package.

Install cronie:

Schedule daily rebuild by adding following file in the directory:

Make the file executable by adding the +x flag:

This will schedule run the eix-sync and ebuild jobs, at ~03:00 AM. And if the job has been missed because host was turned off, the job gets scheduled after a the host has been turned on again.

Now it would be nice to see, what has been rebuild and how it worked out without using any complex commands. Add a bash script to the ~/bin directory of the root user. The script runs 2 qlop commands showing the results from beginning of the day. qlop is part of ebuild.

Make the file executable by adding the +x flag:

Because I am even to tazy to run that command manually, I add following lines to the file, this calls the upper, each time the root user authenticates to this host. Additionally this lists the last 8 lines of the file:

And this is the prompt how it looks like if i login, or sudo su - into the machine:

Now this solution works 99% of the time. If packages fail to build, this needs to be resolved manually by doing a world rebuild, and inspecting what has gone wrong.

laptop_mode
This is work in progress, not finished yet.

Managing daemons status and interfaces reflecting to the current powerlevel AC OR battery. This could also be accomplished by using open-rc. But the configuration and management is more complex compared to the laptop-mode-tools configuration approach.

laptop-mode tools already 2 predefined ACPI dependend states batt and lm-ac:


 * batt
 * lm-ac
 * nolm-ac

The 3-rd state nolm-ac (laptop-mode tools daemon NOT running) is unused here in this document.

Overview of the laptop-mode directory:

Each of the 3 predefined states batt lm-ac an nolm-ac has a -start and -stop suffix in the directory structure. There is also a conf.d directory for services configuration that would be handled by laptop-mode and a modules directory for modules to be used explicitelly.

The goal is reached when the laptop automatically determines which daemons need to be started and which need to be stopped depending on the ACPI battery level.

There are 2 states in which the laptop is working:


 * laptop is docked, ac connected, wired access, printing available, ssh daemon running
 * laptop is not docked, battery, wireless access, no priting available, no ssh daemon running

Overview of running daemons handled by openrc runlevel default:

Following daemons need to be managed by laptop-tools:

Migrate the openrc daemons that are by default assigned to according openrc runlevel to laptop-mode:

Start and Stop daemons handled by the battery status:

Start and Stop daemons handled by the battery status:

Result:

Docked laptop and service status:

Undocked status:

Is not ready yet.

libressl migration on headless productive raspberry pi2
Migration to libressl on pi2 works exactly like described in Project:LibreSSL with 2 major differences:


 * Need to add this particular file instead of /etc/portage/profile/use.stable.mask


 * The migration worked on a productive system, a headless box with minimal dependencies, no fancy stuff like f.e. X. Made successful migration from openssl to libressl. Stick to the Project Website in this wiki it will work.

Enable IPv6 privacy extensions (RFC4941)
IPv6 privacy extensions are disabled by default on GNU/linux, they lead to problems if users are not aware of this. To enable privacy extensions on gentoo permanently add following lines and reboot the system:

The setting net.ipv6.conf.all.use_tempaddr is used to propagate its value to all interfaces currently attached to the system. This setting might not work reliably for all interfaces. At least not on my own tested gentoo installations up to kernel 4.14.

There are two old bugs in the Linux kernel bugtracker for this issue:
 * https://bugzilla.kernel.org/show_bug.cgi?id=11655
 * https://bugzilla.kernel.org/show_bug.cgi?id=9224

Wiki templates for templates

 * https://wiki.gentoo.org/wiki/Category:Templates_for_templates