Re: /usr/src and /usr/ports not git directories ?
- In reply to: Warner Losh : "Re: /usr/src and /usr/ports not git directories ?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 25 Jan 2025 20:14:09 UTC
Warner Losh wrote in <CANCZdfrdjeYRWUuWgMLjK-rp3Nv=4mk-4CMrAecfRv_WjNC0Vw@mail.gmail.com>: |On Sat, Jan 25, 2025 at 10:50 AM Steffen Nurpmeso <steffen@sdaoden.eu> |wrote: |> Florian Walpen wrote in |> <4081188.p4y8TspHLy@z240>: |>|On Thursday, January 23, 2025 4:38:16 AM CET Florian Walpen wrote: |>|> Installing the src tree as a non-git snapshot is useless for |> developers \ |>|> and |>|> people that update through src builds, I agree with that. My take is |> that |>|> installing the src tree is optional, giving a hint in the installer \ |>|> should |>|> be enough. There will be secondary steps anyway in this scenario, like |>|> installing the git executable and updating the src tree. As stated, we |>|> could simplify the post-install repo cloning through a Makefile. |>| |>|FWIW, I found the /usr/Makefile that is part of DragonflyBSD here: |> |> I *thought* the thing is also data reduction, you know. |> |> As in, if the source directory is simply tarballed, you have the |> full size but no git repository; if you want to update, you need |> to download the full new ball, even if the actual changes are only |> a few megabyte or so. (Or bsdiff(1)ed, but no such iirc.) |> |> If you have the git directory that it is, "fully" garbage |> collected, then this increases the size, but you can then simply |> update, merge --ff-only. But this is a large tarball. |> |> If you ship only the .git repository *without* a checkout, with |> a depth of 1, you get almost the same size as with the normal |> only-sources tarball, but you can use git to update very easily, |> with minimal bandwidth, you can use git to populate the complete |> history, etc. |> However, you need git to perform the initial checkout of the |> sources. git is large and git is not BSD/etc licensed. |> Thus: if you would have a minimal program that fetches the blob |> content out of a shallow, garbage-collected git clone, you have |> all the advantages, but none of the disadvantages. |> Problem is there is no such program. | |pkg add git isn't terrible. pkg add got is even smaller and should |work, but I've not double checked. | |Since moving to git, git has become 'table stakes' to do things |with the system. While we don't go out of our way to make 'got' not |work for simple things, we don't test it that often either. got has |a happy license, but an incompatible CLI and it's quite a bit less |capable than git, despite it's better license. Including it in base has |a lot of issues beyond the git import (how much of our git instructions |do we update to include it in our docs, for example). | |So it's possible to extract things w/o GPL'd code, it would be very |much a niche thing for the relatively few people that care. Everybody |else would take 'the paved path' of git and not give it a second thought. |I think the projects limited resources would be best spent by doing this |and allowing the purists to be able to do it if they wanted, while not |saddling everybody else with a tool they aren't familiar with. In a world |where we have infinite resources, we could do the training and education |needed for got, but pragmatically, I think got or any other git-alternative |path is too much of a hassle for too many people to be a viable option |any time soon. That is where i started with the way i do it for myself, with "git checkout $(cat NULL)"; this NULL could in FreeBSD be a file README that states something like "make checkout" or so ... Even though that smells like DragonFly BSD then :) I install git on my FreeBSDs, so this is not about me. (Since i track FreeBSD source i can very well use git archive to get the sources from "the inside", if desired. Having a file that contains the branch name in src/ would allow automatization of that even.) It was only a suggestion... Ciao, --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