Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jan 2025 14:29:05 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        bob prohaska <fbsd@www.zefox.net>
Cc:        Sulev-Madis Silber <freebsd-current-freebsd-org111@ketas.si.pri.ee>,  freebsd-current@freebsd.org
Subject:   Re: /usr/src and /usr/ports not git directories ?
Message-ID:  <CANCZdfoHUsZusqMg_gWN5mB9P3xByGv_GfELi9Dd63CHto1igw@mail.gmail.com>
In-Reply-To: <Z5AQ1GcwX_MZw69G@www.zefox.net>
References:  <Z4vk3009iSwuzG4K@www.zefox.net> <Z4__B0EQM-ce0qPE@cell.glebi.us> <C509F94C-2AC2-414F-90C0-355C69869D72@ketas.si.pri.ee> <Z5AQ1GcwX_MZw69G@www.zefox.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000b2dbfc062c3e11a2
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, Jan 21, 2025 at 2:26=E2=80=AFPM bob prohaska <fbsd@www.zefox.net> w=
rote:

> On Tue, Jan 21, 2025 at 10:35:18PM +0200, Sulev-Madis Silber wrote:
> > not shipping src in installer? what could possibly go wrong!
> >
> > i was just thinking of this the other day. that installers are
> self-contained packages that come with os and it's source...
> >
> >
> >
> There's no harm (and indeed, some good) in offering source code
> as a component of a new installation. What confused me was having
> that source code offered as a dead end. After a little poking around
> it's clear that including /usr/src/.git would have added close to
> to 2 GB to the size of the installer. Perhaps not unacceptable,
> but surely undesirable. Maybe that's reason enough for present
> practice of installing a dead /usr/src..
>
> As a matter of naive curiosity, could one efficiently update /usr/src
> using something like sftp -ar ? It wouldn't preserve the revision detail
> git does, but seemingly it would download modified files while saving
> for re-use those that haven't changed. For users who don't make local
> mods it might be sufficient.
>
>
> > On January 21, 2025 10:09:43 PM GMT+02:00, Gleb Smirnoff <
> glebius@freebsd.org> wrote:
> > ...
> > >I think that /usr/src and /usr/ports as part of FreeBSD release
> > >distribution should just go away.  But we should provide a one liner
> > >command to get them in a proper way (shallow git checkout).
> > >
>
> Do you mean have the "install src" checkbox invoke git clone?
> That seems like a better idea, at least to me.
>

I think we should replace the populate /usr/src from a tarball with....
populate it
with a tarball that represents a 1-deep checkout tree at the rev we built
the release
from. This lets users have the source, has minimal overhead and also lets
users update
or turn the shallow checkout into a deep one, etc. A shallow checkout is
quite a bit
less than a full tree, though still more than just the raw files. I've not
done poking to
see size comparisons.

Warner

--000000000000b2dbfc062c3e11a2
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote g=
mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Jan 21,=
 2025 at 2:26=E2=80=AFPM bob prohaska &lt;<a href=3D"mailto:fbsd@www.zefox.=
net">fbsd@www.zefox.net</a>&gt; wrote:<br></div><blockquote class=3D"gmail_=
quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,=
204);padding-left:1ex">On Tue, Jan 21, 2025 at 10:35:18PM +0200, Sulev-Madi=
s Silber wrote:<br>
&gt; not shipping src in installer? what could possibly go wrong!<br>
&gt; <br>
&gt; i was just thinking of this the other day. that installers are self-co=
ntained packages that come with os and it&#39;s source...<br>
&gt; <br>
&gt; <br>
&gt; <br>
There&#39;s no harm (and indeed, some good) in offering source code <br>
as a component of a new installation. What confused me was having<br>
that source code offered as a dead end. After a little poking around<br>
it&#39;s clear that including /usr/src/.git would have added close to<br>
to 2 GB to the size of the installer. Perhaps not unacceptable, <br>
but surely undesirable. Maybe that&#39;s reason enough for present<br>
practice of installing a dead /usr/src..<br>
<br>
As a matter of naive curiosity, could one efficiently update /usr/src<br>
using something like sftp -ar ? It wouldn&#39;t preserve the revision detai=
l<br>
git does, but seemingly it would download modified files while saving<br>
for re-use those that haven&#39;t changed. For users who don&#39;t make loc=
al<br>
mods it might be sufficient.<br>
<br>
<br>
&gt; On January 21, 2025 10:09:43 PM GMT+02:00, Gleb Smirnoff &lt;<a href=
=3D"mailto:glebius@freebsd.org" target=3D"_blank">glebius@freebsd.org</a>&g=
t; wrote:<br>
&gt; ...<br>
&gt; &gt;I think that /usr/src and /usr/ports as part of FreeBSD release<br=
>
&gt; &gt;distribution should just go away.=C2=A0 But we should provide a on=
e liner<br>
&gt; &gt;command to get them in a proper way (shallow git checkout).<br>
&gt; &gt;<br>
<br>
Do you mean have the &quot;install src&quot; checkbox invoke git clone?<br>
That seems like a better idea, at least to me.=C2=A0<br></blockquote><div><=
br></div><div>I think we should replace the populate /usr/src from a tarbal=
l with.... populate it</div><div>with a tarball that represents a 1-deep ch=
eckout tree at the rev we built the release</div><div>from. This lets users=
 have the source, has minimal overhead and also lets users update</div><div=
>or turn the shallow checkout into a deep one, etc. A shallow checkout is q=
uite a bit</div><div>less than a full tree, though still more than just the=
 raw files. I&#39;ve not done poking to</div><div>see size comparisons.</di=
v><div><br></div><div>Warner</div></div></div>

--000000000000b2dbfc062c3e11a2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoHUsZusqMg_gWN5mB9P3xByGv_GfELi9Dd63CHto1igw>