Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Feb 2026 13:17:30 +0100
From:      Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
To:        Graham Perrin <grahamperrin@gmail.com>, Warner Losh <imp@bsdimp.com>
Cc:        FreeBSD-CURRENT <freebsd-current@freebsd.org>
Subject:   Re: git-clone(1) after base 3e8619e535b6 for /usr/ports subdirectories
Message-ID:  <10db0de9-1281-42a9-815a-93dc5b2718e4@plan-b.pwste.edu.pl>
In-Reply-To: <7da2252a-944c-4255-be39-d94ae1d0304e@plan-b.pwste.edu.pl>
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> <7da2252a-944c-4255-be39-d94ae1d0304e@plan-b.pwste.edu.pl>

index | next in thread | previous in thread | raw e-mail

On 8.02.2026 12:51, Marek Zarychta wrote:
> 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
>
Perhaps my previous reply was inappropriate or came across as impolite. 
Please forgive me, Graham, if I violated netiquette.

I understand that the intent of the original mailing list thread was to 
address a problem that arose after the acceptance of another pull 
request [1], submitted by a SUSE Linux engineer who has been 
contributing frequently and should certainly be considered a FreeBSD 
contributor as well.

That said, it might be worth considering whether this particular change 
could be reverted and the issue resolved in a different, more 
FreeBSD-specific way.

[1]: https://github.com/freebsd/freebsd-src/pull/1873

Cheers

-- 
Marek Zarychta



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?10db0de9-1281-42a9-815a-93dc5b2718e4>