RE: poudriere + ZFS + NFS -> chown: /usr/local/poudriere/data/.m/rpi5-freebsd143-custom/01/.npkg: Operation not permitted

Mark Millard <[email protected]>
Newsgroups gmane.os.freebsd.devel.ports
Message-ID <[email protected]>
Ronald Klop <ronald-lists_at_klop.ws> wrteo on
Date: Tue, 28 Oct 2025 14:26:05 UTC :

> I have the following setup of jails with poudriere running in Jenkins:
> 
> pkg jail: running lighttpd exporting the poudriere UI. This jail NFS exports /usr/local/poudriere/data/logs/bulk and /usr/local/poudriere/data/packages.
> 
> poudriere jail 1: running poudriere+ZFS and it NFS mounts /usr/local/poudriere/data/logs/bulk and /usr/local/poudriere/data/packages from the pkg jail.
> poudriere jail 1: running poudriere (no ZFS) and it NFS mounts /usr/local/poudriere/data/logs/bulk and /usr/local/poudriere/data/packages from the pkg jail.
> 
> The mounts work, I can access the files on the command line.
> 
> But on the pourdriere with ZFS at the end of the first build I get this error:
> [00:01:32] ====> Compressing man pages (compress-man)
> [00:01:32] ===> Installing ldconfig configuration file
> [00:01:32] ===========================================================================
> [00:01:32] chown: /usr/local/poudriere/data/.m/rpi5-freebsd143-custom/01/.npkg: Operation not permitted
> [00:01:32] =======================<phase: package >============================
> [00:01:32] ===== env: 'PKG_NOTES=build_timestamp ports_top_git_hash ports_top_checkout_unclean port_checkout_unclean built_by' 'PKG_NOTE_build_timestamp=2025-10-28T13:33:27+00:00' 'PKG_NOTE_ports_top_git_hash=d72ccf55aa06' 'PKG_NOTE_ports_top_checkout_unclean=no' 'PKG_NOTE_port_checkout_unclean=no' 'PKG_NOTE_built_by=poudriere-git-3.4.99.20251006' NO_DEPENDS=yes USER=nobody UID=65534 GID=65534
> [00:01:32] ===> Building packages for pkg-2.3.1
> [00:01:32] mkdir: /.npkg/All: Permission denied
> [00:01:32] *** Error code 1
> Any idea why this happens?
> This directory is not NFS mounted, so why would it give an error here?


Turns out that

/usr/local/poudriere/data/.m/rpi5-freebsd143-custom/01/.npkg

in its context was a nullfs mount of

/usr/local/poudriere/data/packages/.npkgs/${pkgname:?}

as seen in that context, if I understand the above and
the below correctly.

I looked in /usr/local/share/poudriere/common.sh and in its
build_port() there is:

. . .
                case "${phase}" in
                "package")
                        echo "PACKAGES=/.npkg" >> "${mnt:?}/etc/make.conf"
                        # Create sandboxed staging dir for new package for this build
                        rm -rf "${PACKAGES:?}/.npkg/${pkgname:?}"
                        mkdir -p "${PACKAGES:?}/.npkg/${pkgname:?}"
                        ${NULLMOUNT} \
                                "${PACKAGES:?}/.npkg/${pkgname:?}" \
                                "${mnt:?}/.npkg"
                        chown -R ${JUSER} "${mnt:?}/.npkg"
                        :> "${mnt:?}/.npkg_mounted"
. . .

That looks to me to likely explain the:

chown: /usr/local/poudriere/data/.m/rpi5-freebsd143-custom/01/.npkg: Operation not permitted

That, in turn, probably explains the:

mkdir: /.npkg/All: Permission denied


===
Mark Millard
marklmi at yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.