Gentoo Binhost

I do not like compiling software on my laptop. It gets hot, battery drains in a matter of minutes, and it takes hours (if not days) to compile larger projects (librewolf, webkit-gtk). Even when it came to installing Gentoo on my laptop I dodged compilation by making a read-only btrfs snapshot on my desktop, btrfs sent it to a file on a thumbdrive, then btrfs receive’d that file on my laptop. Reconfigured /etc/fstab and the bootloader, and I was up and running.

Initially I used ssh for accessing my binary packages, I’d manually syncronize /etc/portage, and my laptop would sync with upstream portage repositories separately from my desktop. Not ideal.

I’ve since set up rsyncd on my desktop to share 3 read-only directories:

pid file = /run/rsyncd.pid
max connections = 5
use chroot = yes
uid = nobody
gid = nobody
motd file = /etc/rsync/rsyncd.motd
  
[gentoo-portage]
read only=true
path=/var/db/repos/gentoo
comment=Gentoo ebuild repository

[binpkgs]
read only=true
path=/var/cache/binpkgs
comment=My binpkgs

[portage]
read only=true
path=/etc/portage
comment=Portage configurations
exclude=*.pem postsync.d

My laptop and desktop luckily share the same -march and I want them to have the same environment, so I set up a simple script on my laptop in /etc/portage/postsync.d/ to syncronize my laptop’s portage configuration with my desktop.

#!/bin/bash
echo "Syncing /etc/portage with navi"
rsync \
  --exclude=binrepos.conf \
  --exclude=repos.conf \
  --exclude=make.* \
  --recursive \
  --verbose \
  rsync://navi/portage /etc/portage

I just don’t make changes to any use flags on my laptop since they’d be overwritten next time I sync.

My laptop is set up to use my desktop as it’s ebuild repository, that way the ebuilds on my laptop never get ahead of the ebuilds on my desktop (which would cause compilation instead of simply fetching binpkgs).

[gentoo]
location = /var/db/repos/gentoo
sync-type = rsync 
sync-uri = rsync://navi/gentoo-portage

Suprisingly, even with all this set up, my laptop still tries to compile some ebuilds that I’ve confirmed exist on my binhost as binary packages. The use-flags are the same, eselect profile is the same, ebuild repository is the same… I feel as if I’m still missing something.

Recently I’ve considered going a step beyond and setting up a chroot build environment on my desktop to keep the “clutter” packages/libraries on the part of the system I interact with low.

If my systems didn’t share the same ‘-march’, I wanted to use different use-flags, or a select a different profile, I’d have to go down the more complicated chroot route.