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

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

[-- Attachment #1 --]
On Sun, Feb 8, 2026 at 5:17 AM Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
wrote:

> 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.
>

Yes. His changes are often high quality.


> 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


I thought it was a good idea. I hadn't stopped to consider the git clone
issue.
I have it staged to back out.

Warner

[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Feb 8, 2026 at 5:17 AM Marek Zarychta &lt;<a href="mailto:zarychtam@plan-b.pwste.edu.pl">zarychtam@plan-b.pwste.edu.pl</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 8.02.2026 12:51, Marek Zarychta wrote:<br>
&gt; On 8.02.2026 04:46, Graham Perrin wrote:<br>
&gt;&gt; On 08/02/2026 03:17, Warner Losh wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; That only works if don&#39;t already have a ports tree. What&#39;s there?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; root@freebsd-16-amd64-qemu:~ # ls -hlR /usr/ports<br>
&gt;&gt;<br>
&gt;&gt; total 1.0 KB<br>
&gt;&gt; drwxr-xr-x  2 root wheel    2B Jan 19 19:37 distfiles<br>
&gt;&gt; drwxr-xr-x  2 root wheel    2B Jan 19 19:37 packages<br>
&gt;&gt;<br>
&gt;&gt; /usr/ports/distfiles:<br>
&gt;&gt; total 0 B<br>
&gt;&gt;<br>
&gt;&gt; /usr/ports/packages:<br>
&gt;&gt; total 0 B<br>
&gt;&gt; root@freebsd-16-amd64-qemu:~ # mount | grep ports<br>
&gt;&gt;<br>
&gt;&gt; zroot/usr/ports on /usr/ports (zfs, local, noatime, nosuid, nfsv4acls)<br>
&gt;&gt; zroot/usr/ports/distfiles on /usr/ports/distfiles (zfs, local, <br>
&gt;&gt; noatime, nosuid, nfsv4acls)<br>
&gt;&gt; zroot/usr/ports/packages on /usr/ports/packages (zfs, local, noatime, <br>
&gt;&gt; nosuid, nfsv4acls)<br>
&gt;&gt; root@freebsd-16-amd64-qemu:~ #<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt; Hello Graham,<br>
&gt;<br>
&gt; my recommendation is to set WRKDIRPREFIX, DISTDIR, PACKAGES and <br>
&gt; INDEXDIR (if you are using indexes) to the separate subtree as follows:<br>
&gt;<br>
&gt; #zfs destroy zroot/usr/ports/distfiles<br>
&gt; #zfs destroy zroot/usr/ports/packages<br>
&gt; #mkdir -p /var/ports/{distfiles,packages}<br>
&gt; #cat &lt;&lt;EOF &gt;&gt; /etc/make.conf<br>
&gt; WRKDIRPREFIX= /var/ports<br>
&gt; DISTDIR= /var/ports/distfiles<br>
&gt; PACKAGES= /var/ports/packages<br>
&gt; INDEXDIR= /var/ports<br>
&gt; EOF<br>
&gt;<br>
&gt; The above configuration works best and is absolutely required if you <br>
&gt; are using read-only mounts for /usr/ports (NFS, nullfs, etc.)<br>
&gt;<br>
&gt; There is another option, if you don&#39;t want to change anything, create <br>
&gt; local ports repo and add remote origin:<br>
&gt;<br>
&gt; #cd /usr/ports<br>
&gt; #git init<br>
&gt; #git remote add origin <a href="https://git.freebsd.org/ports.git" rel="noreferrer" target="_blank">https://git.freebsd.org/ports.git</a><br>;
&gt; #git fetch<br>
&gt; #git branch -f main origin/main<br>
&gt; #git checkout main<br>
&gt;<br>
&gt; Cheers<br>
&gt;<br>
Perhaps my previous reply was inappropriate or came across as impolite. <br>
Please forgive me, Graham, if I violated netiquette.<br>
<br>
I understand that the intent of the original mailing list thread was to <br>
address a problem that arose after the acceptance of another pull <br>
request [1], submitted by a SUSE Linux engineer who has been <br>
contributing frequently and should certainly be considered a FreeBSD <br>
contributor as well.<br></blockquote><div><br></div><div>Yes. His changes are often high quality.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
That said, it might be worth considering whether this particular change <br>
could be reverted and the issue resolved in a different, more <br>
FreeBSD-specific way.<br>
<br>
[1]: <a href="https://github.com/freebsd/freebsd-src/pull/1873" rel="noreferrer" target="_blank">https://github.com/freebsd/freebsd-src/pull/1873</a></blockquote><div><br></div><div><font color="#000000">I thought it was a good idea. I hadn&#39;t stopped to consider the git clone issue.</font></div><div><font color="#000000">I have it staged to back out.</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">Warner</font></div></div></div>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqGE45tDYNF1TpmjhNoj-FcUOR0y0gVEvO=jW-dVGMwnA>