Date: Sun, 8 Feb 2026 12:51:41 +0100 From: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> To: Graham Perrin <grahamperrin@gmail.com> Cc: FreeBSD-CURRENT <freebsd-current@freebsd.org> Subject: Re: git-clone(1) after base 3e8619e535b6 for /usr/ports subdirectories Message-ID: <7da2252a-944c-4255-be39-d94ae1d0304e@plan-b.pwste.edu.pl> In-Reply-To: <6d6f0873-d820-4b04-bd17-d5997f0a9919@gmail.com> References: <6961de2e.35403.46e0e7bf@gitrepo.freebsd.org> <f3cdbfa2-1231-48f1-bf02-ae4f4dd96132@gmail.com> <CANCZdfpUJVyc1RDpxcS4bd8t6AYfwkmv8JKerG-SxF9d7gRt8w@mail.gmail.com> <6d6f0873-d820-4b04-bd17-d5997f0a9919@gmail.com>
index | next in thread | previous in thread | raw e-mail
On 8.02.2026 04:46, Graham Perrin wrote:
> On 08/02/2026 03:17, Warner Losh wrote:
>
>> That only works if don't already have a ports tree. What's there?
>
>
> root@freebsd-16-amd64-qemu:~ # ls -hlR /usr/ports
>
> total 1.0 KB
> drwxr-xr-x 2 root wheel 2B Jan 19 19:37 distfiles
> drwxr-xr-x 2 root wheel 2B Jan 19 19:37 packages
>
> /usr/ports/distfiles:
> total 0 B
>
> /usr/ports/packages:
> total 0 B
> root@freebsd-16-amd64-qemu:~ # mount | grep ports
>
> zroot/usr/ports on /usr/ports (zfs, local, noatime, nosuid, nfsv4acls)
> zroot/usr/ports/distfiles on /usr/ports/distfiles (zfs, local,
> noatime, nosuid, nfsv4acls)
> zroot/usr/ports/packages on /usr/ports/packages (zfs, local, noatime,
> nosuid, nfsv4acls)
> root@freebsd-16-amd64-qemu:~ #
>
>
Hello Graham,
my recommendation is to set WRKDIRPREFIX, DISTDIR, PACKAGES and INDEXDIR
(if you are using indexes) to the separate subtree as follows:
#zfs destroy zroot/usr/ports/distfiles
#zfs destroy zroot/usr/ports/packages
#mkdir -p /var/ports/{distfiles,packages}
#cat <<EOF >> /etc/make.conf
WRKDIRPREFIX= /var/ports
DISTDIR= /var/ports/distfiles
PACKAGES= /var/ports/packages
INDEXDIR= /var/ports
EOF
The above configuration works best and is absolutely required if you are
using read-only mounts for /usr/ports (NFS, nullfs, etc.)
There is another option, if you don't want to change anything, create
local ports repo and add remote origin:
#cd /usr/ports
#git init
#git remote add origin https://git.freebsd.org/ports.git
#git fetch
#git branch -f main origin/main
#git checkout main
Cheers
--
Marek Zarychta
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7da2252a-944c-4255-be39-d94ae1d0304e>
