You are not logged in.

#1 2021-02-09 12:06:29

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,385
Website

Using distcc pump with makechrootpkg from devtools

Is is possible to use distcc pump in a buildroot created with devtools' mkarchroot and building with makechrootpkg?  If so how does one start it within the buildroot?

This issue is that within the buildroot, /usr/bin/pump has to be running.  That requires two conditions:
1) A bogus DISTCC_HOSTS setup in the environment vars
2) Literally running `eval pump --startup` from within the container

I tried this via a script installed to /path/to/chroot/user/usr/bin/test.sh which simply contains:

#!/bin/bash
export DISTCC_HOSTS="localhost,cpp,lzo"
eval `pump --startup`

But running that throws an error:

% arch-nspawn /scratch/armc8/facade/ test.sh
__________Expected a socket at '/tmp/distcc-pump.jKQ3Vj/socket'

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2021-09-11 16:39:24

ahmubashshir
Member
From: Dhaka
Registered: 2021-08-06
Posts: 1
Website

Re: Using distcc pump with makechrootpkg from devtools

Hope I'm not necrobumping, did you solve your issue? I'm having the same problem.

Offline

#3 2021-09-11 16:48:17

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,385
Website

Re: Using distcc pump with makechrootpkg from devtools

Can't remember ... tried pump outside of the buildroot and found that it was actually slower so I abandoned this.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2022-03-29 11:43:47

kth5
Member
Registered: 2004-04-29
Posts: 657
Website

Re: Using distcc pump with makechrootpkg from devtools

I found a lazy hack to make this work properly which relies on the fact that makepkg.conf is interpreted/run by bash.

export DISTCC_HOSTS="server.tld,cpp,lzo"
if [ "${container_host_id}" = "arch" ]; then
  eval $(TMPDIR=/tmp pump --startup)
fi

This needs to go into ${chroot}/etc/makepkg.conf.

The problem configuring pump with distcc without the container detection is that makepkg.conf is included twice, once for the download sources and verification and then again for the actual build. This becomes a problem when ${makepkg_user} (download_sources) does not equal builduser (_chrootbuild()), the latter which makechrootpkg employs to run pacman package installations or upgrades before initiating the build as an (potentially) unprivileged user depending on the contents of your pre-created chroot. When it differs, the socket files created are inaccessible to ${makepkg_user}.


Wow, years since my last post here. Brr...

Last edited by kth5 (2022-03-29 11:44:50)


I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell

Offline

Board footer

Powered by FluxBB