9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Re: /usr/src and /usr/ports not git directories ?
       [not found]                     ` <20250123074932.170b7959bca443a934599a9c@dec.sakura.ne.jp>
@ 2025-01-23  5:37                       ` Steffen Nurpmeso
  2025-01-23  7:32                         ` Jacob Moody
  0 siblings, 1 reply; 7+ messages in thread
From: Steffen Nurpmeso @ 2025-01-23  5:37 UTC (permalink / raw)
  To: Tomoaki AOKI
  Cc: Warner Losh, Tomek CEDRO, Gleb Smirnoff, Dave Cottlehuber,
	bob prohaska, Sulev-Madis Silber, freebsd-current, 9fans

Tomoaki AOKI wrote in
 <20250123074932.170b7959bca443a934599a9c@dec.sakura.ne.jp>:
 |On Thu, 23 Jan 2025 07:40:50 +0900
 |Tomoaki AOKI <junchoon@dec.sakura.ne.jp> wrote:
 |> On Wed, 22 Jan 2025 14:31:56 -0700
 |> Warner Losh <imp@bsdimp.com> wrote:
 |>> On Wed, Jan 22, 2025, 2:11 PM Tomek CEDRO <tomek@cedro.info> wrote:
 |>>> On Wed, Jan 22, 2025 at 5:49 PM Gleb Smirnoff <glebius@freebsd.org> \
 |>>>> 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=1 -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
 ...
 |>>>> I really like this plan. So before checkout .git is 337M and after
 |>>> checkout
 |>>>> it is 975M, which is made by actual sources + .git.
 ...
 |>>> One question, would that imply git in base? :-)
 |>> 
 |>> Imply? No.
 ...
 |> Can it be achieved by net/gitup, which is BSD2CLAUSE licensed?
 |> If yes, is there any plan to pull it into base?
 |> 
 |> I've never tried it, as I'm not enouch sure it works sanely with local
 |> deep-cloned repo, even on stepping back to normal git.
 |Unfortunately, found that gitup states NOT to work with the existense
 |of.git directory. Not sure how the future plan (if FreeBSD starts
 |including .git for src and ports packages).
 |
 | https://github.com/johnmehr/gitup?tab=readme-ov-file

I have not looked for years, but basically it was a tree object,
and then getting the blobs of all the entries of that, at
a specific revision.

The Plan9/9front people have -- btw -- created a Plan9-style
interface to git, which is funny it seems (filesystem plus minimal
programs using that, most are rc shell scripts.  I track their
repo via "normal" git (git://git.9front.org/plan9front/plan9front)
without problems since June 2021 says the file system.

What i mean seems to be that these guys already have the knowledge
how to access the object database without any fancy and featureful
and fat environment, so if FreeBSD would do that then possibly
a simple from scratch checkout -- and nothing else -- would be
possible with only shell tools and a small binary that fetches the
blobs?  Maybe even only possible with a very specific tree, you
know?  As in a readily prepared recipe (could be compressed and
reside in the .git directory) that can be walked by the shell
script(s) and accessed by the super minimal blob fetcher?

They are using a *terrible* email hoster for their list which
doesn not support VERP and thus plays very badly with greylisting
and sender address verification, and that such a small project
with so few resources, for nothing, that is.
Let me copy 9fans, what do you say?

--steffen
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)
|
|In Fall and Winter, feel "The Dropbear Bard"s pint(er).
|The banded bear
|without a care,
|Banged on himself for e'er and e'er
|Farewell, dear collar bear

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T16a2bbbe7794d5cd-M8751625f7cfddedfdd3caae6
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] Re: /usr/src and /usr/ports not git directories ?
  2025-01-23  5:37                       ` [9fans] Re: /usr/src and /usr/ports not git directories ? Steffen Nurpmeso
@ 2025-01-23  7:32                         ` Jacob Moody
  2025-01-23 22:49                           ` [9fans] " Steffen Nurpmeso
  0 siblings, 1 reply; 7+ messages in thread
From: Jacob Moody @ 2025-01-23  7:32 UTC (permalink / raw)
  To: Tomoaki AOKI, Warner Losh, Tomek CEDRO, Gleb Smirnoff,
	Dave Cottlehuber, bob prohaska, Sulev-Madis Silber,
	freebsd-current, 9fans

On 1/22/25 23:37, Steffen Nurpmeso wrote:
> Tomoaki AOKI wrote in
>  <20250123074932.170b7959bca443a934599a9c@dec.sakura.ne.jp>:
>  |On Thu, 23 Jan 2025 07:40:50 +0900
>  |Tomoaki AOKI <junchoon@dec.sakura.ne.jp> wrote:
>  |> On Wed, 22 Jan 2025 14:31:56 -0700
>  |> Warner Losh <imp@bsdimp.com> wrote:
>  |>> On Wed, Jan 22, 2025, 2:11 PM Tomek CEDRO <tomek@cedro.info> wrote:
>  |>>> On Wed, Jan 22, 2025 at 5:49 PM Gleb Smirnoff <glebius@freebsd.org> \
>  |>>>> 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=1 -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
>  ...
>  |>>>> I really like this plan. So before checkout .git is 337M and after
>  |>>> checkout
>  |>>>> it is 975M, which is made by actual sources + .git.
>  ...
>  |>>> One question, would that imply git in base? :-)
>  |>> 
>  |>> Imply? No.
>  ...
>  |> Can it be achieved by net/gitup, which is BSD2CLAUSE licensed?
>  |> If yes, is there any plan to pull it into base?
>  |> 
>  |> I've never tried it, as I'm not enouch sure it works sanely with local
>  |> deep-cloned repo, even on stepping back to normal git.
>  |Unfortunately, found that gitup states NOT to work with the existense
>  |of.git directory. Not sure how the future plan (if FreeBSD starts
>  |including .git for src and ports packages).
>  |
>  | https://github.com/johnmehr/gitup?tab=readme-ov-file
> 
> I have not looked for years, but basically it was a tree object,
> and then getting the blobs of all the entries of that, at
> a specific revision.
> 
> The Plan9/9front people have -- btw -- created a Plan9-style
> interface to git, which is funny it seems (filesystem plus minimal
> programs using that, most are rc shell scripts.  I track their
> repo via "normal" git (git://git.9front.org/plan9front/plan9front)
> without problems since June 2021 says the file system.
> 
> What i mean seems to be that these guys already have the knowledge
> how to access the object database without any fancy and featureful
> and fat environment, so if FreeBSD would do that then possibly
> a simple from scratch checkout -- and nothing else -- would be
> possible with only shell tools and a small binary that fetches the
> blobs?  Maybe even only possible with a very specific tree, you
> know?  As in a readily prepared recipe (could be compressed and
> reside in the .git directory) that can be walked by the shell
> script(s) and accessed by the super minimal blob fetcher?

Only getting bits of this conversation it's hard to infer exactly what
the goal is. Is the issue wanting to use git in a way that would require
it to be present within the base system, but encountering issues with doing
so due to licenses? The git present in 9front is MIT licensed, and has already
been used in part for OpenBSD's game of trees (got). I imagine taking whatever
pieces are required to bootstrap what you want from git9 would be sensible.
Git9 lacks some things (shallow clones for one), but is largely an entirely
usable interface to git, so I imagine it would have everything you need if not
very close to what you need. That seems like a path forward, if people don't
mind doing the port work.

If you're looking for more technical details of how git9 works Ori did a write up
for the IWP9 last year[0], which goes in to pretty good detail.

[0] http://10e.iwp9.org/10iwp9proceedings.pdf

Thanks,
moody


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T16a2bbbe7794d5cd-Me5f66262805800dec23830ed
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] /usr/src and /usr/ports not git directories ?
  2025-01-23  7:32                         ` Jacob Moody
@ 2025-01-23 22:49                           ` Steffen Nurpmeso
  2025-01-23 23:45                             ` Jacob Moody
  0 siblings, 1 reply; 7+ messages in thread
From: Steffen Nurpmeso @ 2025-01-23 22:49 UTC (permalink / raw)
  To: Jacob Moody
  Cc: Tomoaki AOKI, Warner Losh, Tomek CEDRO, Gleb Smirnoff,
	Dave Cottlehuber, bob prohaska, Sulev-Madis Silber,
	freebsd-current, 9fans

Hello.

Jacob Moody wrote in
 <f6c74829-1192-4fc8-a474-318676655708@posixcafe.org>:
 |On 1/22/25 23:37, Steffen Nurpmeso wrote:
 |> Tomoaki AOKI wrote in
 |>  <20250123074932.170b7959bca443a934599a9c@dec.sakura.ne.jp>:
 |>|On Thu, 23 Jan 2025 07:40:50 +0900
 |>|Tomoaki AOKI <junchoon@dec.sakura.ne.jp> wrote:
 |>|> On Wed, 22 Jan 2025 14:31:56 -0700
 |>|> Warner Losh <imp@bsdimp.com> wrote:
 |>|>> On Wed, Jan 22, 2025, 2:11 PM Tomek CEDRO <tomek@cedro.info> wrote:
 |>|>>> On Wed, Jan 22, 2025 at 5:49 PM Gleb Smirnoff <glebius@freebsd.org> \
 |>|>>>> 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=1 -b
 |>|>>> releng/14.2
 |>|>>>> W> --single-branch fred --bare
 ...
 |>|>>>> W> % git checkout releng/14.2
 |>  ...
 |>|>>>> I really like this plan. So before checkout .git is 337M and after
 |>|>>> checkout
 |>|>>>> it is 975M, which is made by actual sources + .git.
 |>  ...
 |>|>>> One question, would that imply git in base? :-)
 |>|>> 
 |>|>> Imply? No.
 ...
 |> The Plan9/9front people have -- btw -- created a Plan9-style
 |> interface to git, which is funny it seems (filesystem plus minimal

That is, an implementation of their own that is capable to
interact with normal git packs and objects (i think).

 |> programs using that, most are rc shell scripts.  I track their
 |> repo via "normal" git (git://git.9front.org/plan9front/plan9front)
 |> without problems since June 2021 says the file system.
 ...
 |> What i mean seems to be that these guys already have the knowledge
 |> how to access the object database without any fancy and featureful
 |> and fat environment, so if FreeBSD would do that then possibly
 |> a simple from scratch checkout -- and nothing else -- would be
 |> possible with only shell tools and a small binary that fetches the
 |> blobs?  Maybe even only possible with a very specific tree, you
 |> know?  As in a readily prepared recipe (could be compressed and
 |> reside in the .git directory) that can be walked by the shell
 |> script(s) and accessed by the super minimal blob fetcher?
 |Only getting bits of this conversation it's hard to infer exactly what
 |the goal is. Is the issue wanting to use git in a way that would require
 |it to be present within the base system, but encountering issues with doing
 |so due to licenses? The git present in 9front is MIT licensed, and \
 |has already
 |been used in part for OpenBSD's game of trees (got). I imagine taking \

I think they tend to keep the base system more "clean" as in the
past, making use of pkg and ports even for tools they effectively
need, ie, all developers necessarily need git, but it is not part
of the base system as cvs as been in the past, for example.
License, they try to go BSD etc, and replace GPL etc software as
BSD etc software can replace it.  There is GPL still, for example
diff(1).

 |whatever
 |pieces are required to bootstrap what you want from git9 would be sensible.
 |Git9 lacks some things (shallow clones for one), but is largely an entirely
 |usable interface to git, so I imagine it would have everything you \
 |need if not
 |very close to what you need. That seems like a path forward, if people \
 |don't
 |mind doing the port work.

I myself was only thinking of really only a simplemost program
that works like "git show" aka "git cat-file".
Ie, they have mtree(8) or could otherwise create a snapshot of
the checked out tree at a specific git revision, noting access
rights etc (though this normally is not stored except for X bit in
git i think), symlinks etc etc for one.
And then walking this list of files and only fetching the file
content from the (single, aggressively gc'd) git object .pack /
.rev / .idx combo, cat(1)ing it into the fs, you know.
So "nothing but a simple fetch-the-blob-data" thing.

Like this no git(1) is needed at all to checkout a work tree from
a repository with no checkout at all / that has checked out an all
empty branch.

 |If you're looking for more technical details of how git9 works Ori \
 |did a write up
 |for the IWP9 last year[0], which goes in to pretty good detail.
 |
 |[0] http://10e.iwp9.org/10iwp9proceedings.pdf

Yes, i know; and thanks i have downloaded and read most of the
stuff.  I was only hoping for a quick statement on how complicated
the envisioned program would really be, from a person who went
down that road on its own.  Or even, best, a "hey i have code
which could be used for this with not much effort", you know..

--steffen
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)
|
|In Fall and Winter, feel "The Dropbear Bard"s pint(er).
|The banded bear
|without a care,
|Banged on himself for e'er and e'er
|Farewell, dear collar bear

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T16a2bbbe7794d5cd-Me73eae569db3dee6accc92ef
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] /usr/src and /usr/ports not git directories ?
  2025-01-23 22:49                           ` [9fans] " Steffen Nurpmeso
@ 2025-01-23 23:45                             ` Jacob Moody
  2025-01-23 23:53                               ` Warner Losh
  0 siblings, 1 reply; 7+ messages in thread
From: Jacob Moody @ 2025-01-23 23:45 UTC (permalink / raw)
  To: Tomoaki AOKI, Warner Losh, Tomek CEDRO, Gleb Smirnoff,
	Dave Cottlehuber, bob prohaska, Sulev-Madis Silber, 9fans

On 1/23/25 16:49, Steffen Nurpmeso wrote:
> Hello.
> 
> Jacob Moody wrote in
>  <f6c74829-1192-4fc8-a474-318676655708@posixcafe.org>:
>  |On 1/22/25 23:37, Steffen Nurpmeso wrote:
>  |> Tomoaki AOKI wrote in
>  |>  <20250123074932.170b7959bca443a934599a9c@dec.sakura.ne.jp>:
>  |>|On Thu, 23 Jan 2025 07:40:50 +0900
>  |>|Tomoaki AOKI <junchoon@dec.sakura.ne.jp> wrote:
>  |>|> On Wed, 22 Jan 2025 14:31:56 -0700
>  |>|> Warner Losh <imp@bsdimp.com> wrote:
>  |>|>> On Wed, Jan 22, 2025, 2:11 PM Tomek CEDRO <tomek@cedro.info> wrote:
>  |>|>>> On Wed, Jan 22, 2025 at 5:49 PM Gleb Smirnoff <glebius@freebsd.org> \
>  |>|>>>> 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=1 -b
>  |>|>>> releng/14.2
>  |>|>>>> W> --single-branch fred --bare
>  ...
>  |>|>>>> W> % git checkout releng/14.2
>  |>  ...
>  |>|>>>> I really like this plan. So before checkout .git is 337M and after
>  |>|>>> checkout
>  |>|>>>> it is 975M, which is made by actual sources + .git.
>  |>  ...
>  |>|>>> One question, would that imply git in base? :-)
>  |>|>> 
>  |>|>> Imply? No.
>  ...
>  |> The Plan9/9front people have -- btw -- created a Plan9-style
>  |> interface to git, which is funny it seems (filesystem plus minimal
> 
> That is, an implementation of their own that is capable to
> interact with normal git packs and objects (i think).
> 
>  |> programs using that, most are rc shell scripts.  I track their
>  |> repo via "normal" git (git://git.9front.org/plan9front/plan9front)
>  |> without problems since June 2021 says the file system.
>  ...
>  |> What i mean seems to be that these guys already have the knowledge
>  |> how to access the object database without any fancy and featureful
>  |> and fat environment, so if FreeBSD would do that then possibly
>  |> a simple from scratch checkout -- and nothing else -- would be
>  |> possible with only shell tools and a small binary that fetches the
>  |> blobs?  Maybe even only possible with a very specific tree, you
>  |> know?  As in a readily prepared recipe (could be compressed and
>  |> reside in the .git directory) that can be walked by the shell
>  |> script(s) and accessed by the super minimal blob fetcher?
>  |Only getting bits of this conversation it's hard to infer exactly what
>  |the goal is. Is the issue wanting to use git in a way that would require
>  |it to be present within the base system, but encountering issues with doing
>  |so due to licenses? The git present in 9front is MIT licensed, and \
>  |has already
>  |been used in part for OpenBSD's game of trees (got). I imagine taking \
> 
> I think they tend to keep the base system more "clean" as in the
> past, making use of pkg and ports even for tools they effectively
> need, ie, all developers necessarily need git, but it is not part
> of the base system as cvs as been in the past, for example.
> License, they try to go BSD etc, and replace GPL etc software as
> BSD etc software can replace it.  There is GPL still, for example
> diff(1).
> 
>  |whatever
>  |pieces are required to bootstrap what you want from git9 would be sensible.
>  |Git9 lacks some things (shallow clones for one), but is largely an entirely
>  |usable interface to git, so I imagine it would have everything you \
>  |need if not
>  |very close to what you need. That seems like a path forward, if people \
>  |don't
>  |mind doing the port work.
> 
> I myself was only thinking of really only a simplemost program
> that works like "git show" aka "git cat-file".
> Ie, they have mtree(8) or could otherwise create a snapshot of
> the checked out tree at a specific git revision, noting access
> rights etc (though this normally is not stored except for X bit in
> git i think), symlinks etc etc for one.
> And then walking this list of files and only fetching the file
> content from the (single, aggressively gc'd) git object .pack /
> .rev / .idx combo, cat(1)ing it into the fs, you know.
> So "nothing but a simple fetch-the-blob-data" thing.

Sure, so you want the files out of the objects without the entirety of git(1).

> 
> Like this no git(1) is needed at all to checkout a work tree from
> a repository with no checkout at all / that has checked out an all
> empty branch.
> 
>  |If you're looking for more technical details of how git9 works Ori \
>  |did a write up
>  |for the IWP9 last year[0], which goes in to pretty good detail.
>  |
>  |[0] http://10e.iwp9.org/10iwp9proceedings.pdf
> 
> Yes, i know; and thanks i have downloaded and read most of the
> stuff.  I was only hoping for a quick statement on how complicated
> the envisioned program would really be, from a person who went
> down that road on its own.  Or even, best, a "hey i have code
> which could be used for this with not much effort", you know..
> 

From my perspective it seems like you just want git/fs and then
to build whatever minimal tooling on top of that. All that git/fs
does is take the objects and present the actual files and trees
held within. The "hey I have code which can be used for this with
not much effort" _is_ git/fs, it doesn't do much more then that.
It's already fairly slim as-is:

cpu% wc -l /sys/src/cmd/git/fs.c
    922 /sys/src/cmd/git/fs.c

I thought this was all laid out pretty straight forward in the paper,
so that's why I thought you hadn't read it.


Thanks,
moody


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T16a2bbbe7794d5cd-Me86570ef4c1501898026cc95
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] /usr/src and /usr/ports not git directories ?
  2025-01-23 23:45                             ` Jacob Moody
@ 2025-01-23 23:53                               ` Warner Losh
  2025-01-24  0:05                                 ` Jacob Moody
       [not found]                                 ` <A63BBCC9-88C8-4C00-9337-DFC62BFC4192@iitbombay.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Warner Losh @ 2025-01-23 23:53 UTC (permalink / raw)
  To: Jacob Moody
  Cc: Tomoaki AOKI, Tomek CEDRO, Gleb Smirnoff, Dave Cottlehuber,
	bob prohaska, Sulev-Madis Silber, 9fans

[-- Attachment #1: Type: text/plain, Size: 6483 bytes --]

On Thu, Jan 23, 2025, 4:45 PM Jacob Moody <moody@posixcafe.org> wrote:

> On 1/23/25 16:49, Steffen Nurpmeso wrote:
> > Hello.
> >
> > Jacob Moody wrote in
> >  <f6c74829-1192-4fc8-a474-318676655708@posixcafe.org>:
> >  |On 1/22/25 23:37, Steffen Nurpmeso wrote:
> >  |> Tomoaki AOKI wrote in
> >  |>  <20250123074932.170b7959bca443a934599a9c@dec.sakura.ne.jp>:
> >  |>|On Thu, 23 Jan 2025 07:40:50 +0900
> >  |>|Tomoaki AOKI <junchoon@dec.sakura.ne.jp> wrote:
> >  |>|> On Wed, 22 Jan 2025 14:31:56 -0700
> >  |>|> Warner Losh <imp@bsdimp.com> wrote:
> >  |>|>> On Wed, Jan 22, 2025, 2:11 PM Tomek CEDRO <tomek@cedro.info>
> wrote:
> >  |>|>>> On Wed, Jan 22, 2025 at 5:49 PM Gleb Smirnoff <
> glebius@freebsd.org> \
> >  |>|>>>> 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=1 -b
> >  |>|>>> releng/14.2
> >  |>|>>>> W> --single-branch fred --bare
> >  ...
> >  |>|>>>> W> % git checkout releng/14.2
> >  |>  ...
> >  |>|>>>> I really like this plan. So before checkout .git is 337M and
> after
> >  |>|>>> checkout
> >  |>|>>>> it is 975M, which is made by actual sources + .git.
> >  |>  ...
> >  |>|>>> One question, would that imply git in base? :-)
> >  |>|>>
> >  |>|>> Imply? No.
> >  ...
> >  |> The Plan9/9front people have -- btw -- created a Plan9-style
> >  |> interface to git, which is funny it seems (filesystem plus minimal
> >
> > That is, an implementation of their own that is capable to
> > interact with normal git packs and objects (i think).
> >
> >  |> programs using that, most are rc shell scripts.  I track their
> >  |> repo via "normal" git (git://git.9front.org/plan9front/plan9front)
> >  |> without problems since June 2021 says the file system.
> >  ...
> >  |> What i mean seems to be that these guys already have the knowledge
> >  |> how to access the object database without any fancy and featureful
> >  |> and fat environment, so if FreeBSD would do that then possibly
> >  |> a simple from scratch checkout -- and nothing else -- would be
> >  |> possible with only shell tools and a small binary that fetches the
> >  |> blobs?  Maybe even only possible with a very specific tree, you
> >  |> know?  As in a readily prepared recipe (could be compressed and
> >  |> reside in the .git directory) that can be walked by the shell
> >  |> script(s) and accessed by the super minimal blob fetcher?
> >  |Only getting bits of this conversation it's hard to infer exactly what
> >  |the goal is. Is the issue wanting to use git in a way that would
> require
> >  |it to be present within the base system, but encountering issues with
> doing
> >  |so due to licenses? The git present in 9front is MIT licensed, and \
> >  |has already
> >  |been used in part for OpenBSD's game of trees (got). I imagine taking \
> >
> > I think they tend to keep the base system more "clean" as in the
> > past, making use of pkg and ports even for tools they effectively
> > need, ie, all developers necessarily need git, but it is not part
> > of the base system as cvs as been in the past, for example.
> > License, they try to go BSD etc, and replace GPL etc software as
> > BSD etc software can replace it.  There is GPL still, for example
> > diff(1).
> >
> >  |whatever
> >  |pieces are required to bootstrap what you want from git9 would be
> sensible.
> >  |Git9 lacks some things (shallow clones for one), but is largely an
> entirely
> >  |usable interface to git, so I imagine it would have everything you \
> >  |need if not
> >  |very close to what you need. That seems like a path forward, if people
> \
> >  |don't
> >  |mind doing the port work.
> >
> > I myself was only thinking of really only a simplemost program
> > that works like "git show" aka "git cat-file".
> > Ie, they have mtree(8) or could otherwise create a snapshot of
> > the checked out tree at a specific git revision, noting access
> > rights etc (though this normally is not stored except for X bit in
> > git i think), symlinks etc etc for one.
> > And then walking this list of files and only fetching the file
> > content from the (single, aggressively gc'd) git object .pack /
> > .rev / .idx combo, cat(1)ing it into the fs, you know.
> > So "nothing but a simple fetch-the-blob-data" thing.
>
> Sure, so you want the files out of the objects without the entirety of
> git(1).
>
> >
> > Like this no git(1) is needed at all to checkout a work tree from
> > a repository with no checkout at all / that has checked out an all
> > empty branch.
> >
> >  |If you're looking for more technical details of how git9 works Ori \
> >  |did a write up
> >  |for the IWP9 last year[0], which goes in to pretty good detail.
> >  |
> >  |[0] http://10e.iwp9.org/10iwp9proceedings.pdf
> >
> > Yes, i know; and thanks i have downloaded and read most of the
> > stuff.  I was only hoping for a quick statement on how complicated
> > the envisioned program would really be, from a person who went
> > down that road on its own.  Or even, best, a "hey i have code
> > which could be used for this with not much effort", you know..
> >
>
> From my perspective it seems like you just want git/fs and then
> to build whatever minimal tooling on top of that. All that git/fs
> does is take the objects and present the actual files and trees
> held within. The "hey I have code which can be used for this with
> not much effort" _is_ git/fs, it doesn't do much more then that.
> It's already fairly slim as-is:
>
> cpu% wc -l /sys/src/cmd/git/fs.c
>     922 /sys/src/cmd/git/fs.c
>
> I thought this was all laid out pretty straight forward in the paper,
> so that's why I thought you hadn't read it.
>

I fail to see how putting code in the kernel is better than just using got
for the few people that are alergic to git. Even if it is only 1000 lines
in plan 9, but likely more in FreeBSD and by the way not yet ported to
FreeBSD. We know got can't crash the system and is small enough to not
matter, even if it isn't in the base today.

Warner

Thanks,
> moody
>
>

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T16a2bbbe7794d5cd-M84a04cf8b9803eb3ee4e08e3
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 9913 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] /usr/src and /usr/ports not git directories ?
  2025-01-23 23:53                               ` Warner Losh
@ 2025-01-24  0:05                                 ` Jacob Moody
       [not found]                                 ` <A63BBCC9-88C8-4C00-9337-DFC62BFC4192@iitbombay.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Jacob Moody @ 2025-01-24  0:05 UTC (permalink / raw)
  To: Warner Losh
  Cc: Tomoaki AOKI, Tomek CEDRO, Gleb Smirnoff, Dave Cottlehuber,
	bob prohaska, Sulev-Madis Silber, 9fans

On 1/23/25 17:53, Warner Losh wrote:
> 
> 
> On Thu, Jan 23, 2025, 4:45 PM Jacob Moody <moody@posixcafe.org <mailto:moody@posixcafe.org>> wrote:
> 
>     On 1/23/25 16:49, Steffen Nurpmeso wrote:
>     > Hello.
>     >
>     > Jacob Moody wrote in
>     >  <f6c74829-1192-4fc8-a474-318676655708@posixcafe.org <mailto:f6c74829-1192-4fc8-a474-318676655708@posixcafe.org>>:
>     >  |On 1/22/25 23:37, Steffen Nurpmeso wrote:
>     >  |> Tomoaki AOKI wrote in
>     >  |>  <20250123074932.170b7959bca443a934599a9c@dec.sakura.ne.jp <mailto:20250123074932.170b7959bca443a934599a9c@dec.sakura.ne.jp>>:
>     >  |>|On Thu, 23 Jan 2025 07:40:50 +0900
>     >  |>|Tomoaki AOKI <junchoon@dec.sakura.ne.jp <mailto:junchoon@dec.sakura.ne.jp>> wrote:
>     >  |>|> On Wed, 22 Jan 2025 14:31:56 -0700
>     >  |>|> Warner Losh <imp@bsdimp.com <mailto:imp@bsdimp.com>> wrote:
>     >  |>|>> On Wed, Jan 22, 2025, 2:11 PM Tomek CEDRO <tomek@cedro.info <mailto:tomek@cedro.info>> wrote:
>     >  |>|>>> On Wed, Jan 22, 2025 at 5:49 PM Gleb Smirnoff <glebius@freebsd.org <mailto:glebius@freebsd.org>> \
>     >  |>|>>>> 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 <https://github.com/freebsd/freebsd-src> --depth=1 -b
>     >  |>|>>> releng/14.2
>     >  |>|>>>> W> --single-branch fred --bare
>     >  ...
>     >  |>|>>>> W> % git checkout releng/14.2
>     >  |>  ...
>     >  |>|>>>> I really like this plan. So before checkout .git is 337M and after
>     >  |>|>>> checkout
>     >  |>|>>>> it is 975M, which is made by actual sources + .git.
>     >  |>  ...
>     >  |>|>>> One question, would that imply git in base? :-)
>     >  |>|>>
>     >  |>|>> Imply? No.
>     >  ...
>     >  |> The Plan9/9front people have -- btw -- created a Plan9-style
>     >  |> interface to git, which is funny it seems (filesystem plus minimal
>     >
>     > That is, an implementation of their own that is capable to
>     > interact with normal git packs and objects (i think).
>     >
>     >  |> programs using that, most are rc shell scripts.  I track their
>     >  |> repo via "normal" git (git://git.9front.org/plan9front/plan9front <http://git.9front.org/plan9front/plan9front>)
>     >  |> without problems since June 2021 says the file system.
>     >  ...
>     >  |> What i mean seems to be that these guys already have the knowledge
>     >  |> how to access the object database without any fancy and featureful
>     >  |> and fat environment, so if FreeBSD would do that then possibly
>     >  |> a simple from scratch checkout -- and nothing else -- would be
>     >  |> possible with only shell tools and a small binary that fetches the
>     >  |> blobs?  Maybe even only possible with a very specific tree, you
>     >  |> know?  As in a readily prepared recipe (could be compressed and
>     >  |> reside in the .git directory) that can be walked by the shell
>     >  |> script(s) and accessed by the super minimal blob fetcher?
>     >  |
>     >  |Only getting bits of this conversation it's hard to infer exactly what
>     >  |the goal is. Is the issue wanting to use git in a way that would require
>     >  |it to be present within the base system, but encountering issues with doing
>     >  |so due to licenses? The git present in 9front is MIT licensed, and \
>     >  |has already
>     >  |been used in part for OpenBSD's game of trees (got). I imagine taking \
>     >
>     > I think they tend to keep the base system more "clean" as in the
>     > past, making use of pkg and ports even for tools they effectively
>     > need, ie, all developers necessarily need git, but it is not part
>     > of the base system as cvs as been in the past, for example.
>     > License, they try to go BSD etc, and replace GPL etc software as
>     > BSD etc software can replace it.  There is GPL still, for example
>     > diff(1).
>     >
>     >  |whatever
>     >  |pieces are required to bootstrap what you want from git9 would be sensible.
>     >  |Git9 lacks some things (shallow clones for one), but is largely an entirely
>     >  |usable interface to git, so I imagine it would have everything you \
>     >  |need if not
>     >  |very close to what you need. That seems like a path forward, if people \
>     >  |don't
>     >  |mind doing the port work.
>     >
>     > I myself was only thinking of really only a simplemost program
>     > that works like "git show" aka "git cat-file".
>     > Ie, they have mtree(8) or could otherwise create a snapshot of
>     > the checked out tree at a specific git revision, noting access
>     > rights etc (though this normally is not stored except for X bit in
>     > git i think), symlinks etc etc for one.
>     > And then walking this list of files and only fetching the file
>     > content from the (single, aggressively gc'd) git object .pack /
>     > .rev / .idx combo, cat(1)ing it into the fs, you know.
>     > So "nothing but a simple fetch-the-blob-data" thing.
> 
>     Sure, so you want the files out of the objects without the entirety of git(1).
> 
>     >
>     > Like this no git(1) is needed at all to checkout a work tree from
>     > a repository with no checkout at all / that has checked out an all
>     > empty branch.
>     >
>     >  |If you're looking for more technical details of how git9 works Ori \
>     >  |did a write up
>     >  |for the IWP9 last year[0], which goes in to pretty good detail.
>     >  |
>     >  |[0] http://10e.iwp9.org/10iwp9proceedings.pdf <http://10e.iwp9.org/10iwp9proceedings.pdf>
>     >
>     > Yes, i know; and thanks i have downloaded and read most of the
>     > stuff.  I was only hoping for a quick statement on how complicated
>     > the envisioned program would really be, from a person who went
>     > down that road on its own.  Or even, best, a "hey i have code
>     > which could be used for this with not much effort", you know..
>     >
> 
>     From my perspective it seems like you just want git/fs and then
>     to build whatever minimal tooling on top of that. All that git/fs
>     does is take the objects and present the actual files and trees
>     held within. The "hey I have code which can be used for this with
>     not much effort" _is_ git/fs, it doesn't do much more then that.
>     It's already fairly slim as-is:
> 
>     cpu% wc -l /sys/src/cmd/git/fs.c
>         922 /sys/src/cmd/git/fs.c
> 
>     I thought this was all laid out pretty straight forward in the paper,
>     so that's why I thought you hadn't read it.
> 
> 
> I fail to see how putting code in the kernel is better than just using got for the few people that are alergic to git. Even if it is only 1000 lines in plan 9, but likely more in FreeBSD and by the way not yet ported to FreeBSD. We know got can't crash the system and is small enough to not matter, even if it isn't in the base today.
> 

Who said anything about putting code in the kernel? Maybe there is some further backlog I missed? Or perhaps you're assuming that git/fs is in the kernel in Plan 9?
Git/fs is a userspace file-server that serves 9p (like a lot of code on plan 9). That interface is not particularly important here though, what I was calling attention to
was that all of the object parsing logic was contained to just that piece of code, so if all you wanted was object parsing and the ability to extract specific files
it's all contained right there. You could rip out the fs interface and just use some of the code (which afaik is what GoT is doing).

Thanks,
moody


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T16a2bbbe7794d5cd-Md8e001931626cf6f3e15b748
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] /usr/src and /usr/ports not git directories ?
       [not found]                                 ` <A63BBCC9-88C8-4C00-9337-DFC62BFC4192@iitbombay.org>
@ 2025-01-25 17:30                                   ` Steffen Nurpmeso
  0 siblings, 0 replies; 7+ messages in thread
From: Steffen Nurpmeso @ 2025-01-25 17:30 UTC (permalink / raw)
  To: Bakul Shah
  Cc: FreeBSD Current, 9fans, Jacob Moody, Tomoaki AOKI, Tomek CEDRO,
	Gleb Smirnoff, Dave Cottlehuber, bob prohaska,
	Sulev-Madis Silber

Bakul Shah wrote in
 <A63BBCC9-88C8-4C00-9337-DFC62BFC4192@iitbombay.org>:
 |[-9fans, +freebsd-current as 9fans adds a reply-to: 9fans line]
 |> On Jan 23, 2025, at 3:53 PM, Warner Losh <imp@bsdimp.com> wrote:
 |> 
 |> I fail to see how putting code in the kernel is better than just \
 |> using got for the few people that are alergic to git. Even if it \
 |> is only 1000 lines in plan 9, but likely more in FreeBSD and by the \
 |> way not yet ported to FreeBSD. We know got can't crash the system \
 |> and is small enough to not matter, even if it isn't in the base today.
 |May I suggest:
 |- always ship the *commit hash* for any release or snapshot with its \
 |base.txz
 |- src.txz as now (or add commit hash)
 |- this is enough to download a repo (1-deep or whatever), bare if src.txz \
 |was also unpacked.
 |- add a simple script to download as above.
 |- people can install whatever git client they want for further work.
 |
 |git9 doesn't require any kernel code but on freebsd you'd have to
 |use plan9port. It is far simpler but has a different interface.

I never meant to take _exactly_ the code as in Plan9 / 9front btw.
I only knew he was doing the work already, and did so over so
several years, so there is experience.  Likely the code that
accesses git's objects/ as such is pretty lean / portable.  Maybe
even he would have been willing to port the extract to POSIX so
that for example "xy HASH" searches in . and cats a blob content
to stdout, you know.
Hey, it seems his qpath() even uses Torek's hash!  Here you have
the BSD link you are missing.  :)

A nice Sunday everyone whoeever can, and others even more.

--steffen
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)
|
|In Fall and Winter, feel "The Dropbear Bard"s pint(er).
|The banded bear
|without a care,
|Banged on himself for e'er and e'er
|Farewell, dear collar bear

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T16a2bbbe7794d5cd-Md1ac2b7aa5c63ae14a373d41
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-01-25 18:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Z4vk3009iSwuzG4K@www.zefox.net>
     [not found] ` <Z4__B0EQM-ce0qPE@cell.glebi.us>
     [not found]   ` <C509F94C-2AC2-414F-90C0-355C69869D72@ketas.si.pri.ee>
     [not found]     ` <Z5AQ1GcwX_MZw69G@www.zefox.net>
     [not found]       ` <CANCZdfoHUsZusqMg_gWN5mB9P3xByGv_GfELi9Dd63CHto1igw@mail.gmail.com>
     [not found]         ` <3782b90b-850f-4435-8b6d-bdb83753daea@app.fastmail.com>
     [not found]           ` <CANCZdfruU=GR5DFWL7RQA4_yjh2-NHOB669wsOSL1DzZ3Fs7+Q@mail.gmail.com>
     [not found]             ` <Z5Ehmzd4tp-Xf8Q8@cell.glebi.us>
     [not found]               ` <CAFYkXj=nwjK+BnKg+0vkyeMu8XaLErCVe8Xr1g3+DOaOpeCBXA@mail.gmail.com>
     [not found]                 ` <CANCZdfq+TAW7v-1H71HSY=pFuO2FDkzAU04q_O-6SjTBdSFgSg@mail.gmail.com>
     [not found]                   ` <20250123074050.d9e331172e6b2f9dbc8b8dfd@dec.sakura.ne.jp>
     [not found]                     ` <20250123074932.170b7959bca443a934599a9c@dec.sakura.ne.jp>
2025-01-23  5:37                       ` [9fans] Re: /usr/src and /usr/ports not git directories ? Steffen Nurpmeso
2025-01-23  7:32                         ` Jacob Moody
2025-01-23 22:49                           ` [9fans] " Steffen Nurpmeso
2025-01-23 23:45                             ` Jacob Moody
2025-01-23 23:53                               ` Warner Losh
2025-01-24  0:05                                 ` Jacob Moody
     [not found]                                 ` <A63BBCC9-88C8-4C00-9337-DFC62BFC4192@iitbombay.org>
2025-01-25 17:30                                   ` Steffen Nurpmeso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).