Re: poudriere 3.4.0 regression: -i runs as NON_ROOT user

From: Mark Millard <marklmi_at_yahoo.com>
Date: Mon, 15 Jan 2024 04:11:02 UTC
Craig Leres <leres_at_freebsd.org> wrote on
Date: Mon, 15 Jan 2024 02:10:27 UTC :

> On 1/14/24 14:07, Tomoaki AOKI wrote:
> > IIRC, poudriere[-devel] ran as nobody (65534) initially, but it started
> > running as root (0) when I started using ccache.
> 
> Interesting. It's starting to sound to me as if there's just one bug; 
> poudriere is not passing the correct value for UID to make.
> 
> I commented out CCACHE_DIR in my poudriere.conf and indeed things run as 
> user nobody. But looking at the build log I see UID is set to 0 in the 
> environment. And I don't understand how poudriere does this ("ps e" 
> doesn't show UID in the environment of any jail process).

Looking in /usr/local/etc/poudriere.conf.sample I see:

# Define to yes to build and stage as a regular user
# Default: yes, unless CCACHE_DIR is set and CCACHE_DIR_NON_ROOT_SAFE is not
# set.  Note that to use ccache with BUILD_AS_NON_ROOT you will need to
# use a non-shared CCACHE_DIR that is only built by PORTBUILD_USER and chowned
# to that user.  Then set CCACHE_DIR_NON_ROOT_SAFE to yes.
#BUILD_AS_NON_ROOT=no



===
Mark Millard
marklmi at yahoo.com