Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jan 2025 14:31:56 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Tomek CEDRO <tomek@cedro.info>
Cc:        Gleb Smirnoff <glebius@freebsd.org>, Dave Cottlehuber <dch@skunkwerks.at>,  bob prohaska <fbsd@www.zefox.net>,  Sulev-Madis Silber <freebsd-current-freebsd-org111@ketas.si.pri.ee>,  freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: /usr/src and /usr/ports not git directories ?
Message-ID:  <CANCZdfq%2BTAW7v-1H71HSY=pFuO2FDkzAU04q_O-6SjTBdSFgSg@mail.gmail.com>
In-Reply-To: <CAFYkXj=nwjK%2BBnKg%2B0vkyeMu8XaLErCVe8Xr1g3%2BDOaOpeCBXA@mail.gmail.com>
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> <CANCZdfoHUsZusqMg_gWN5mB9P3xByGv_GfELi9Dd63CHto1igw@mail.gmail.com> <3782b90b-850f-4435-8b6d-bdb83753daea@app.fastmail.com> <CANCZdfruU=GR5DFWL7RQA4_yjh2-NHOB669wsOSL1DzZ3Fs7%2BQ@mail.gmail.com> <Z5Ehmzd4tp-Xf8Q8@cell.glebi.us> <CAFYkXj=nwjK%2BBnKg%2B0vkyeMu8XaLErCVe8Xr1g3%2BDOaOpeCBXA@mail.gmail.com>

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

On Wed, Jan 22, 2025, 2:11=E2=80=AFPM Tomek CEDRO <tomek@cedro.info> wrote:

> On Wed, Jan 22, 2025 at 5:49=E2=80=AFPM Gleb Smirnoff <glebius@freebsd.or=
g> wrote:
> > On Wed, Jan 22, 2025 at 09:30:09AM -0700, Warner Losh wrote:
> > W> I think what you want is
> > W>
> > W> % git clone https://github.com/freebsd/freebsd-src --depth=3D1 -b
> releng/14.2
> > W> --single-branch fred --bare
> > W> % cd fred
> > W> % mkdir .git
> > W> % mv * .git
> > W> % git config --local core.bare false
> > W>
> > W> This will clone 1 deep into the directory 'fred' and won't checkout =
a
> copy.
> > W> If
> > W> we make this a package, it's 325MB, as you  say. That can then be
> extracted
> > W> and then you can recover the tree with:
> > W>
> > W> % git checkout releng/14.2
> > W>
> > W> which could be done with the pkg file when extracting to /usr/src.
> I've not
> > W> measured
> > W> ports.
> >
> > I really like this plan. So before checkout .git is 337M and after
> checkout
> > it is 975M, which is made by actual sources + .git.
> >
> > Let's go forward with shipping this bare clone + optional checkout for
> > 15.0-RELEASE.  We can ask if user wants to do the checkout, or just kee=
p
> > /usr/src/.git during the install process.  For upgrades, we will just
> > write new full /usr/src that includes .git on top of 14.x-RELEASE. That
> > will consume +50% more space on upgraded installations.  I'm pretty sur=
e
> > this is fine for those people who do install /usr/src, they already ain=
't
> > doing a minimal installation.  We will also put this in RELNOTES.
>
> Very cool, thanks folks! :-)
>
> One question, would that imply git in base? :-)
>

Imply? No.

Warner

--=20
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>

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

<div dir=3D"auto"><div><br><br><div class=3D"gmail_quote gmail_quote_contai=
ner"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Jan 22, 2025, 2:11=E2=80=
=AFPM Tomek CEDRO &lt;<a href=3D"mailto:tomek@cedro.info">tomek@cedro.info<=
/a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0=
 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Jan 22, 2025=
 at 5:49=E2=80=AFPM Gleb Smirnoff &lt;<a href=3D"mailto:glebius@freebsd.org=
" target=3D"_blank" rel=3D"noreferrer">glebius@freebsd.org</a>&gt; wrote:<b=
r>
&gt; On Wed, Jan 22, 2025 at 09:30:09AM -0700, Warner Losh wrote:<br>
&gt; W&gt; I think what you want is<br>
&gt; W&gt;<br>
&gt; W&gt; % git clone <a href=3D"https://github.com/freebsd/freebsd-src" r=
el=3D"noreferrer noreferrer" target=3D"_blank">https://github.com/freebsd/f=
reebsd-src</a> --depth=3D1 -b releng/14.2<br>
&gt; W&gt; --single-branch fred --bare<br>
&gt; W&gt; % cd fred<br>
&gt; W&gt; % mkdir .git<br>
&gt; W&gt; % mv * .git<br>
&gt; W&gt; % git config --local core.bare false<br>
&gt; W&gt;<br>
&gt; W&gt; This will clone 1 deep into the directory &#39;fred&#39; and won=
&#39;t checkout a copy.<br>
&gt; W&gt; If<br>
&gt; W&gt; we make this a package, it&#39;s 325MB, as you=C2=A0 say. That c=
an then be extracted<br>
&gt; W&gt; and then you can recover the tree with:<br>
&gt; W&gt;<br>
&gt; W&gt; % git checkout releng/14.2<br>
&gt; W&gt;<br>
&gt; W&gt; which could be done with the pkg file when extracting to /usr/sr=
c. I&#39;ve not<br>
&gt; W&gt; measured<br>
&gt; W&gt; ports.<br>
&gt;<br>
&gt; I really like this plan. So before checkout .git is 337M and after che=
ckout<br>
&gt; it is 975M, which is made by actual sources + .git.<br>
&gt;<br>
&gt; Let&#39;s go forward with shipping this bare clone + optional checkout=
 for<br>
&gt; 15.0-RELEASE.=C2=A0 We can ask if user wants to do the checkout, or ju=
st keep<br>
&gt; /usr/src/.git during the install process.=C2=A0 For upgrades, we will =
just<br>
&gt; write new full /usr/src that includes .git on top of 14.x-RELEASE. Tha=
t<br>
&gt; will consume +50% more space on upgraded installations.=C2=A0 I&#39;m =
pretty sure<br>
&gt; this is fine for those people who do install /usr/src, they already ai=
n&#39;t<br>
&gt; doing a minimal installation.=C2=A0 We will also put this in RELNOTES.=
<br>
<br>
Very cool, thanks folks! :-)<br>
<br>
One question, would that imply git in base? :-)<br></blockquote></div></div=
><div dir=3D"auto"><br></div><div dir=3D"auto">Imply? No.</div><div dir=3D"=
auto"><br></div><div dir=3D"auto">Warner</div><div dir=3D"auto"><br></div><=
div dir=3D"auto"><div class=3D"gmail_quote gmail_quote_container"><blockquo=
te class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc so=
lid;padding-left:1ex">
-- <br>
CeDeROM, SQ7MHZ, <a href=3D"http://www.tomek.cedro.info" rel=3D"noreferrer =
noreferrer" target=3D"_blank">http://www.tomek.cedro.info</a><br>;
</blockquote></div></div></div>

--000000000000b4fedb062c52393a--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfq%2BTAW7v-1H71HSY=pFuO2FDkzAU04q_O-6SjTBdSFgSg>