Thread View: linux.kernel.git
14 messages
14 total messages
Started by Junio C Hamano
Wed, 07 Oct 2026 17:23
Re: [PATCH 0/4] faster SHA-1 collision detection
Author: Junio C Hamano
Date: Wed, 07 Oct 2026 17:23
Date: Wed, 07 Oct 2026 17:23
45 lines
11583 bytes
11583 bytes
Scott Chacon <scott@gitbutler.net> writes: > So, spoiler alert, the code in this patch series is mainly AI generated. > I would try to fool you, but too many of you are far too aware of my > actual C skills. That being said, I thought maybe someone here (especially > those of you working on server optimization stuff) would be interested > in the speed increases for both the server and client in making sha1dc > quite a bit faster. > > This series ports the approach of Sam Reis's sha1dc Rust crate [1], > which gitoxide recently switched to [2], to C. Which means license-wise the original is compatible with us, I presume, as they are "Apache2 or MIT, your choice". How can you/we be sure, with respect to the current AI policy in SubmittingPatches (which by the way was vetted by SFC lawyers), that your "AI generated" code did not "borrow" from places that gets you/us into trouble? > The end result hashes roughly 2.7x faster on the Xeon and 2.85x faster > on the M5 Max. Single-threaded index-pack of git.git goes from 24.3s to > 12.7s on the Xeon, and from 16.1s to 8.7s on the M5 Max. > > Hashing throughput on the Xeon, in MiB/s: > > 16KiB 1MiB vs OpenSSL > OpenSSL SHA-1 (no detection) 1234 1129 1.00x > sha1dc/ (today) 435 450 2.67x > shani+avx2 (default here) 1002 901 1.24x > shani+sse2 1075 1008 1.13x > portable+avx2 553 654 1.96x > portable+sse2 603 681 1.84x > portable 466 565 2.29x > > In other words, currently collision detection costs about 1.5–2.5x on > top of the hashing itself today, but only about 0.2x with the series. Thanks for these numbers. > [1] https://sam.dev/blog/faster-sha1-collision-detection > [2] https://github.com/GitoxideLabs/gitoxide/pull/3008 And the pointers to the original sources.
Re: [PATCH 0/4] faster SHA-1 collision detection
Author: Scott Chacon
Date: Wed, 07 Oct 2026 18:13
Date: Wed, 07 Oct 2026 18:13
64 lines
11830 bytes
11830 bytes
Hey, On Wed, Oct 7, 2026 at 7:23 PM Junio C Hamano <gitster@pobox.com> wrote: > > This series ports the approach of Sam Reis's sha1dc Rust crate [1], > > which gitoxide recently switched to [2], to C. > > Which means license-wise the original is compatible with us, I > presume, as they are "Apache2 or MIT, your choice". > > How can you/we be sure, with respect to the current AI policy in > SubmittingPatches (which by the way was vetted by SFC lawyers), that > your "AI generated" code did not "borrow" from places that gets > you/us into trouble? It's a good question. I actually just submitted a proposed update to that policy based on SFC's updated guidelines, but either way, I learned about this from Sam and have talked to him about the port and he seemed excited about it. I can triple check, but I'm fairly confident that he's fine with this and I am fine signing off on it under the terms of the DCO language. Of course, he in turn used AI tooling to produce _his_ library, but within the guidelines of the updated SFC guidelines. Johannes's alternative series is the original Rust code of Sam that my agent looked at to produce this (in addition to his blog post explaining it), so I'm not sure how that might be materially different. > > The end result hashes roughly 2.7x faster on the Xeon and 2.85x faster > > on the M5 Max. Single-threaded index-pack of git.git goes from 24.3s to > > 12.7s on the Xeon, and from 16.1s to 8.7s on the M5 Max. > > > > Hashing throughput on the Xeon, in MiB/s: > > > > 16KiB 1MiB vs OpenSSL > > OpenSSL SHA-1 (no detection) 1234 1129 1.00x > > sha1dc/ (today) 435 450 2.67x > > shani+avx2 (default here) 1002 901 1.24x > > shani+sse2 1075 1008 1.13x > > portable+avx2 553 654 1.96x > > portable+sse2 603 681 1.84x > > portable 466 565 2.29x > > > > In other words, currently collision detection costs about 1.5–2.5x on > > top of the hashing itself today, but only about 0.2x with the series. > > Thanks for these numbers. It would have been better had I provided the same relative scale (it should be 1.5-2.5x vs 1.2x, but whatever, you probably get it. It's 20% overhead here vs 50%-150% overhead previously). > > [1] https://sam.dev/blog/faster-sha1-collision-detection > > [2] https://github.com/GitoxideLabs/gitoxide/pull/3008 > > And the pointers to the original sources. CC'ing Sam (sha1dc rust guy) and Sebastian (Gitoxide) on this, just in case they have an opinion but I'm pretty sure they would be more than happy for this to be integrated. Scott
Re: [PATCH 0/4] faster SHA-1 collision detection
Author: Sam Reis
Date: Thu, 08 Oct 2026 11:20
Date: Thu, 08 Oct 2026 11:20
93 lines
13175 bytes
13175 bytes
Hey everyone. Just for the avoidance of doubt, very happy to see Scott's patch here land and for git to benefit from faster sha1dc hashing. Let me know if I can do anything to support! On Thu, Oct 8, 2026 at 8:21 AM Sebastian Thiel <sebastian.thiel@icloud.com> wrote: > > Thanks for reeling me in, Scott! > > First of all, I am very happy to see that overall, everyone here is > making an effort to find a way to speed up SHA-1dc again. > It's so impactful! > > > It really did hurt when I finally had to add SHA-1dc to Gitoxide and see > the performance of clones plummet. And it still hurts me knowing that > an incredible amount of CPU time is wasted doing something that we now > know can be done much faster. At GitHub scale, this must be more than > a blip. > > While it's my dream to one day have a GitHub action that uses `gix` to > clone and safe even more power, I think Git is in a far better spot > to achieve significant savings much sooner. > > On 07.10.26 20:13, Scott Chacon wrote: > > Hey, > > > > On Wed, Oct 7, 2026 at 7:23 PM Junio C Hamano <gitster@pobox.com> wrote: > >>> This series ports the approach of Sam Reis's sha1dc Rust crate [1], > >>> which gitoxide recently switched to [2], to C. > >> > >> Which means license-wise the original is compatible with us, I > >> presume, as they are "Apache2 or MIT, your choice". > >> > >> How can you/we be sure, with respect to the current AI policy in > >> SubmittingPatches (which by the way was vetted by SFC lawyers), that > >> your "AI generated" code did not "borrow" from places that gets > >> you/us into trouble? > > > > It's a good question. I actually just submitted a proposed update to > > that policy based on SFC's updated guidelines, but either way, I > > learned about this from Sam and have talked to him about the port and > > he seemed excited about it. I can triple check, but I'm fairly > > confident that he's fine with this and I am fine signing off on it > > under the terms of the DCO language. > > > > Of course, he in turn used AI tooling to produce _his_ library, but > > within the guidelines of the updated SFC guidelines. Johannes's > > alternative series is the original Rust code of Sam that my agent > > looked at to produce this (in addition to his blog post explaining > > it), so I'm not sure how that might be materially different. > > > >>> The end result hashes roughly 2.7x faster on the Xeon and 2.85x faster > >>> on the M5 Max. Single-threaded index-pack of git.git goes from 24.3s to > >>> 12.7s on the Xeon, and from 16.1s to 8.7s on the M5 Max. > >>> > >>> Hashing throughput on the Xeon, in MiB/s: > >>> > >>> 16KiB 1MiB vs OpenSSL > >>> OpenSSL SHA-1 (no detection) 1234 1129 1.00x > >>> sha1dc/ (today) 435 450 2.67x > >>> shani+avx2 (default here) 1002 901 1.24x > >>> shani+sse2 1075 1008 1.13x > >>> portable+avx2 553 654 1.96x > >>> portable+sse2 603 681 1.84x > >>> portable 466 565 2.29x > >>> > >>> In other words, currently collision detection costs about 1.5–2.5x on > >>> top of the hashing itself today, but only about 0.2x with the series. > >> > >> Thanks for these numbers. > > > > It would have been better had I provided the same relative scale (it > > should be 1.5-2.5x vs 1.2x, but whatever, you probably get it. It's > > 20% overhead here vs 50%-150% overhead previously). > > > >>> [1] https://sam.dev/blog/faster-sha1-collision-detection > >>> [2] https://github.com/GitoxideLabs/gitoxide/pull/3008 > >> > >> And the pointers to the original sources. > > > > CC'ing Sam (sha1dc rust guy) and Sebastian (Gitoxide) on this, just in > > case they have an opinion but I'm pretty sure they would be more than > > happy for this to be integrated. > > > > Scott >
Re: [PATCH 0/4] faster SHA-1 collision detection
Author: "D. Ben Knoble"
Date: Thu, 08 Oct 2026 13:25
Date: Thu, 08 Oct 2026 13:25
81 lines
12830 bytes
12830 bytes
Hi Sam, On Thu, Oct 8, 2026 at 7:23 AM Sam Reis <sam@opencanopy.dev> wrote: > > Hey everyone. Just for the avoidance of doubt, very happy to see > Scott's patch here land and for git to benefit from faster sha1dc > hashing. Let me know if I can do anything to support! [We bottom-post here] > > On 07.10.26 20:13, Scott Chacon wrote: > > > Hey, > > > > > > On Wed, Oct 7, 2026 at 7:23 PM Junio C Hamano <gitster@pobox.com> wrote: > > >>> This series ports the approach of Sam Reis's sha1dc Rust crate [1], > > >>> which gitoxide recently switched to [2], to C. > > >> > > >> Which means license-wise the original is compatible with us, I > > >> presume, as they are "Apache2 or MIT, your choice". Leaving aside the question below about AI policy, I think the important question for Sam and Sebastien is license compatibility? The sha1collisiondetection submodule and the sha1dc code (extracted from that submodule's upstream, if I'm reading 28dc98e343 (sha1dc: add collision-detecting sha1 implementation, 2017-03-16) correctly?) are MIT licensed, too, so there is some precedent for Git here. I skimmed what I could find of the original threads: - https://lore.kernel.org/git/20170223195753.ppsat2gwd3jq22by@sigill.intra.peff.net/ - https://lore.kernel.org/git/?q=sha1dc%3A+add+collision-detecting+sha1+implementation but I didn't see a discussion of licensing at that time. Perhaps the idea is that we are clear that such code carries a different license from Git? Anyway, I suppose the fair thing would then be for Scott's code to be MIT (and/or Apache2), in which case it would need similar clarifications? (Or are we prepared to take the stance that de nouveau code based on existing code can be license-washed, in this case to GPL-2?) Interestingly, Gentoo claims Git's license is only GPL-2, but I think they compile in the sha1dc code since it's the default in meson. Should we be claiming the Git package (with sha1dc) is actually GPL-2 and MIT? (This is complex territory and I'm sure to have gotten it wrong; pointers to past discussions, esp. those by copyright and licensing professionals, welcome.) > > >> How can you/we be sure, with respect to the current AI policy in > > >> SubmittingPatches (which by the way was vetted by SFC lawyers), that > > >> your "AI generated" code did not "borrow" from places that gets > > >> you/us into trouble? > > > > > > It's a good question. I actually just submitted a proposed update to > > > that policy based on SFC's updated guidelines, but either way, I > > > learned about this from Sam and have talked to him about the port and > > > he seemed excited about it. I can triple check, but I'm fairly > > > confident that he's fine with this and I am fine signing off on it > > > under the terms of the DCO language. > > > > > > Of course, he in turn used AI tooling to produce _his_ library, but > > > within the guidelines of the updated SFC guidelines. Johannes's > > > alternative series is the original Rust code of Sam that my agent > > > looked at to produce this (in addition to his blog post explaining > > > it), so I'm not sure how that might be materially different. [snip] > > >>> [1] https://sam.dev/blog/faster-sha1-collision-detection > > >>> [2] https://github.com/GitoxideLabs/gitoxide/pull/3008 -- D. Ben Knoble
Re: [PATCH 0/4] faster SHA-1 collision detection
Author: Sam Reis
Date: Thu, 08 Oct 2026 13:59
Date: Thu, 08 Oct 2026 13:59
119 lines
14037 bytes
14037 bytes
Hi Ben, On Thu, Oct 8, 2026 at 3:25 PM D. Ben Knoble <ben.knoble@gmail.com> wrote: > > Hi Sam, > > On Thu, Oct 8, 2026 at 7:23 AM Sam Reis <sam@opencanopy.dev> wrote: > > > > Hey everyone. Just for the avoidance of doubt, very happy to see > > Scott's patch here land and for git to benefit from faster sha1dc > > hashing. Let me know if I can do anything to support! > > [We bottom-post here] No problem! > > > > On 07.10.26 20:13, Scott Chacon wrote: > > > > Hey, > > > > > > > > On Wed, Oct 7, 2026 at 7:23 PM Junio C Hamano <gitster@pobox.com> wrote: > > > >>> This series ports the approach of Sam Reis's sha1dc Rust crate [1], > > > >>> which gitoxide recently switched to [2], to C. > > > >> > > > >> Which means license-wise the original is compatible with us, I > > > >> presume, as they are "Apache2 or MIT, your choice". > > Leaving aside the question below about AI policy, I think the > important question for Sam and Sebastien is license compatibility? I can try answering as best as possible from my perspective. I think it's important to note, insofar this wasn't clear before, that the actual code for the ubc checks is fully autogenerated rather than written by hand. The generator for it was written from scratch by me with LLM assistance, and based on the methodology described in the 2017 paper from Marc Stevens and Dan Shumow. Nonetheless I ended up crediting Stevens and Shumow in the copyright notice to be on the safe side. > > The sha1collisiondetection submodule and the sha1dc code (extracted > from that submodule's upstream, if I'm reading 28dc98e343 (sha1dc: add > collision-detecting sha1 implementation, 2017-03-16) correctly?) are > MIT licensed, too, so there is some precedent for Git here. I skimmed > what I could find of the original threads: > > - https://lore.kernel.org/git/20170223195753.ppsat2gwd3jq22by@sigill.intra.peff.net/ > - https://lore.kernel.org/git/?q=sha1dc%3A+add+collision-detecting+sha1+implementation > > but I didn't see a discussion of licensing at that time. Perhaps the > idea is that we are clear that such code carries a different license > from Git? > > Anyway, I suppose the fair thing would then be for Scott's code to be > MIT (and/or Apache2), in which case it would need similar > clarifications? (Or are we prepared to take the stance that de nouveau > code based on existing code can be license-washed, in this case to > GPL-2?) > > Interestingly, Gentoo claims Git's license is only GPL-2, but I think > they compile in the sha1dc code since it's the default in meson. > Should we be claiming the Git package (with sha1dc) is actually GPL-2 > and MIT? Again IANAL, but my understanding was always that MIT is GPL-compatible. From https://en.wikipedia.org/wiki/License_compatibility#GPL_compatibility: "Many of the most common free-software licenses [...] are GPL-compatible. That is, their code can be combined with a program under the GPL without conflict, and the new combination would have the GPL applied to the whole (but the other license would not so apply)." So as long as it's correctly attributed, that might not be an issue? > > (This is complex territory and I'm sure to have gotten it wrong; > pointers to past discussions, esp. those by copyright and licensing > professionals, welcome.) > > > > >> How can you/we be sure, with respect to the current AI policy in > > > >> SubmittingPatches (which by the way was vetted by SFC lawyers), that > > > >> your "AI generated" code did not "borrow" from places that gets > > > >> you/us into trouble? > > > > > > > > It's a good question. I actually just submitted a proposed update to > > > > that policy based on SFC's updated guidelines, but either way, I > > > > learned about this from Sam and have talked to him about the port and > > > > he seemed excited about it. I can triple check, but I'm fairly > > > > confident that he's fine with this and I am fine signing off on it > > > > under the terms of the DCO language. > > > > > > > > Of course, he in turn used AI tooling to produce _his_ library, but > > > > within the guidelines of the updated SFC guidelines. Johannes's > > > > alternative series is the original Rust code of Sam that my agent > > > > looked at to produce this (in addition to his blog post explaining > > > > it), so I'm not sure how that might be materially different. > > [snip] > > > > >>> [1] https://sam.dev/blog/faster-sha1-collision-detection > > > >>> [2] https://github.com/GitoxideLabs/gitoxide/pull/3008 > > > -- > D. Ben Knoble
Re: [PATCH 0/4] faster SHA-1 collision detection
Author: Junio C Hamano
Date: Thu, 08 Oct 2026 15:55
Date: Thu, 08 Oct 2026 15:55
10 lines
10192 bytes
10192 bytes
Sam Reis <sam@opencanopy.dev> writes: > Hey everyone. Just for the avoidance of doubt, very happy to see > Scott's patch here land and for git to benefit from faster sha1dc > hashing. Let me know if I can do anything to support! Thanks. Just to make sure I understand, are you endorsing the idea of your work geting ported to help Git, or are you also happy with the actual code Scott submitted?
Re: [PATCH 0/4] faster SHA-1 collision detection
Author: Junio C Hamano
Date: Thu, 08 Oct 2026 17:10
Date: Thu, 08 Oct 2026 17:10
38 lines
11411 bytes
11411 bytes
"D. Ben Knoble" <ben.knoble@gmail.com> writes:
> but I didn't see a discussion of licensing at that time. Perhaps the
> idea is that we are clear that such code carries a different license
> from Git?
We are GPL-2 only, which means we can incorporate BSD-licensed
software as long as we satisfy its license and copyright notice
requirements.
The above is not an AI-bot-supplied answer, but what one learns when
talking to copyright lawyers or reading books on software licensing.
But sometimes asking LLM gives sufficiently useful answer. I typed
"Is GPLv2 compatible with BSD?"
in the search bar of a browser, and here is the early part of what I
got, which is not too bad.
* AI summary
Yes, GPLv2 is generally compatible with modern BSD (2-clause and
3-clause) licenses, though the direction of the combination
matters.
Compatibility Details
• BSD inside GPLv2: You can include a 2-clause or 3-clause
BSD-licensed library or code snippet inside a GPLv2-licensed
project. The resulting combined work must be distributed under
the terms of the GPLv2.
• GPLv2 inside BSD: You cannot take GPLv2-licensed code and
place it into a purely BSD-licensed project. Because the GPLv2
is a strong copyleft license, it forces the entire combined
work to be covered by the GPLv2.
Re: [PATCH 0/4] faster SHA-1 collision detection
Author: "D. Ben Knoble"
Date: Thu, 08 Oct 2026 17:46
Date: Thu, 08 Oct 2026 17:46
28 lines
10454 bytes
10454 bytes
On Thu, Oct 8, 2026 at 1:10 PM Junio C Hamano <gitster@pobox.com> wrote: > > "D. Ben Knoble" <ben.knoble@gmail.com> writes: > > > but I didn't see a discussion of licensing at that time. Perhaps the > > idea is that we are clear that such code carries a different license > > from Git? > > We are GPL-2 only, which means we can incorporate BSD-licensed > software as long as we satisfy its license and copyright notice > requirements. > > The above is not an AI-bot-supplied answer, but what one learns when > talking to copyright lawyers or reading books on software licensing. Thanks, that's good to know---but in this case I thought we were talking about the MIT license? Assuming a similar analysis applies (not clear to me, but not implausible either), that might also answer my question about Gentoo's license descriptor. The product is GPL-2 even if one input was MIT (though it feels strange to effectively "re-license" someone else's code this way). -- D. Ben Knoble
Re: [PATCH 0/4] faster SHA-1 collision detection
Author: Junio C Hamano
Date: Thu, 08 Oct 2026 21:03
Date: Thu, 08 Oct 2026 21:03
15 lines
10542 bytes
10542 bytes
"D. Ben Knoble" <ben.knoble@gmail.com> writes: >> We are GPL-2 only, which means we can incorporate BSD-licensed >> software as long as we satisfy its license and copyright notice >> requirements. >> >> The above is not an AI-bot-supplied answer, but what one learns when >> talking to copyright lawyers or reading books on software licensing. > > Thanks, that's good to know---but in this case I thought we were > talking about the MIT license? Yup, the story is the same. Also BSD and MIT also fully compatible in either direction.
Re: [PATCH 0/4] faster SHA-1 collision detection
Author: Todd Zullinger
Date: Fri, 09 Oct 2026 20:37
Date: Fri, 09 Oct 2026 20:37
33 lines
11206 bytes
11206 bytes
D. Ben Knoble wrote:
> Interestingly, Gentoo claims Git's license is only GPL-2, but I think
> they compile in the sha1dc code since it's the default in meson.
> Should we be claiming the Git package (with sha1dc) is actually GPL-2
> and MIT?
I _think_ that that depends on whether Gentoo's license tag
is meant to be the "effective" license they are distributing
their Git package or attempting to encompass the license of
all of the code which goes into the Git package.
Fedora's Git package has:
BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
I think I was the last to touch that, in ef75bcd (update
license data and convert to SPDX format, 2022-11-07). I
attempted to capture all of the licensing, but I most
certainly could have missed some things. And things may
have changed since then too.
Fedora's guidelines have a lengthy page on the License tag².
It includes a 'No "effective license" analysis' section
discussing this.
I don't know if any of that helps. :)
¹ https://src.fedoraproject.org/rpms/git/c/ef75bcd
² https://docs.fedoraproject.org/en-US/legal/license-field/
--
Todd
Re: [PATCH 0/4] faster SHA-1 collision detection
Author: Junio C Hamano
Date: Fri, 09 Oct 2026 23:41
Date: Fri, 09 Oct 2026 23:41
64 lines
13231 bytes
13231 bytes
"D. Ben Knoble" <ben.knoble@gmail.com> writes: > The sha1collisiondetection submodule and the sha1dc code (extracted > from that submodule's upstream, if I'm reading 28dc98e343 (sha1dc: add > collision-detecting sha1 implementation, 2017-03-16) correctly?) are > MIT licensed, too, so there is some precedent for Git here. I skimmed > what I could find of the original threads: > > - https://lore.kernel.org/git/20170223195753.ppsat2gwd3jq22by@sigill.intra.peff.net/ > - https://lore.kernel.org/git/?q=sha1dc%3A+add+collision-detecting+sha1+implementation > > but I didn't see a discussion of licensing at that time. Perhaps the > idea is that we are clear that such code carries a different license > from Git? > > Anyway, I suppose the fair thing would then be for Scott's code to be > MIT (and/or Apache2), in which case it would need similar > clarifications? (Or are we prepared to take the stance that de nouveau > code based on existing code can be license-washed, in this case to > GPL-2?) > > Interestingly, Gentoo claims Git's license is only GPL-2, but I think > they compile in the sha1dc code since it's the default in meson. > Should we be claiming the Git package (with sha1dc) is actually GPL-2 > and MIT? In the abov, Gentoo's mention is about "Git package" as a whole. Git package as a whole can be distributed under GPLv2 only. MIT, BSD-2 or BSD-3 are permissive and essentially says "you can do whatever you want with the code (including combining with other code or making it proprietary), as long as you keep our copyright notice, keep our disclaimer, and (in the case of BSD-3) do not use our names for endorsement". Specifically, they do not forbid us from incorporating their ware into our project that is licensed differently, as long as we honor their licensing terms on the source files we got from them. Because we have mixed "permissive" code into GPLv2 code to form a single "work based on the Program", GPLv2 Section 2(b) dictates that the entire combined work must be distributed under the terms of the GPLv2 (and again, the permissiveness of "other" licenses is what allows us to do so). You cannot distribute the finished binary or the combined sources under a permissive license, because doing so would violate the GPLv2's copyleft requirement. The original "permissively licensed" files (and any modifications made purely to those files) still maintain their original copyright headers and original "permissive" license text. This is because the original copyright holder of the code granted a license to use their files under the original "permissive" licensing terms, which requires us to keep their copyright notice. We do not own the copyright to the original "permissive" code. We are only licensed to use them. So we have no legal authority to strip these "permissive" licenses or unilaterally "relicense" those files into GPLv2. So to answer your question in the last sentence, we should say "Git package as a whole is GPLv2 only, but parts are borrowed from copyright holders who licensed them under different terms, and these parts can be used under these different parts. For example, sha1dc can be copied from our source tree to your non GPLv2 project as long as you honor their MIT license".
Re: [PATCH 0/4] faster SHA-1 collision detection
Author: "D. Ben Knoble"
Date: Sat, 10 Oct 2026 14:10
Date: Sat, 10 Oct 2026 14:10
61 lines
11887 bytes
11887 bytes
On Fri, Oct 9, 2026 at 4:37 PM Todd Zullinger <tmz@pobox.com> wrote: > > D. Ben Knoble wrote: > > Interestingly, Gentoo claims Git's license is only GPL-2, but I think > > they compile in the sha1dc code since it's the default in meson. > > Should we be claiming the Git package (with sha1dc) is actually GPL-2 > > and MIT? > > I _think_ that that depends on whether Gentoo's license tag > is meant to be the "effective" license they are distributing > their Git package or attempting to encompass the license of > all of the code which goes into the Git package. > > Fedora's Git package has: > > BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Oh, curious! Where are the (using Gentoo identifiers for the moment) BSD and LGPL-2.1+ sources? I guess I assume by looking at our COPYING that the GPL-2+ came from contributions that said they were willing to be 2+? > I think I was the last to touch that, in ef75bcd (update > license data and convert to SPDX format, 2022-11-07). I > attempted to capture all of the licensing, but I most > certainly could have missed some things. And things may > have changed since then too. > > Fedora's guidelines have a lengthy page on the License tag². > It includes a 'No "effective license" analysis' section > discussing this. > > I don't know if any of that helps. :) > > ¹ https://src.fedoraproject.org/rpms/git/c/ef75bcd > ² https://docs.fedoraproject.org/en-US/legal/license-field/ From Gentoo's packaging guide [1], I think we might want to list all the license, except it really does depend on the license of the (installed) *output* files. We build from source but don't install the source, so maybe Junio's cousin reply that indicates the built product is covered under GPL-2 is sufficient ;) [1]: https://devmanual.gentoo.org/general-concepts/licenses/index.html#determining-the-correct-license In the case of other packages [2], it seems we try to handle multi-license cases, but I think there (it's been a while since that particular linked PR stalled) we might be installed both a shared library under one license and a binary under another. [2]: https://codeberg.org/gentoo/gentoo/pulls/1340#issuecomment-18812828 Anyway, thanks all! I'll assume the Gentoo maintainers knew what they were doing :) -- D. Ben Knoble
Re: [PATCH 0/4] faster SHA-1 collision detection
Author: Todd Zullinger
Date: Sat, 10 Oct 2026 15:37
Date: Sat, 10 Oct 2026 15:37
56 lines
12323 bytes
12323 bytes
D. Ben Knoble wrote:
> On Fri, Oct 9, 2026 at 4:37 PM Todd Zullinger <tmz@pobox.com> wrote:
>> Fedora's Git package has:
>>
>> BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
>
> Oh, curious! Where are the (using Gentoo identifiers for the moment)
> BSD and LGPL-2.1+ sources? I guess I assume by looking at our COPYING
> that the GPL-2+ came from contributions that said they were willing to
> be 2+?
There are various bits of code imported that are under
difference licenses, among other things. The code in
reftable/ is BSD-3-Clause (using the SPDX naming), for
example, while xdiff/xhistogram.c is BSD-3-Clause and/or
EDL-1.0 while most of the rest of it is LGPL-2.1-or-later;
ewah/ is GPL-2.0-or-later; compat/obstack.[ch] and
compat/regex/ are also LGPL-2.1-or-later.
I used the perl licensecheck tool¹ to generate the initial
list, then reviewed it and filtered out some bits from the
test suite which are not shipped in the binary packages for
Fedora.
The command to do that is (without the filtering of any
code):
find -type f -exec licensecheck --shortname-scheme spdx {} + |
grep -v 'UNKNOWN$' | LANG=C sort >licensecheck
A more complete analysis would require reviewing all of the
files which are UNKNOWN to ensure none have a copyright that
licensecheck simply didn't find (or isn't in the file but
can be found from the git history). I was a bit lazy and
didn't do all of that work. :)
> Anyway, thanks all! I'll assume the Gentoo maintainers knew what they
> were doing :)
Yeah, I've found most distribution packagers try to be
diligent about this. Though it can be a somewhat tedious
tasks and can change if the distribution switches from
expecting packages to list the "effective" license to some
other method.
Fedora used to do (or allow) that license simplification,
e.g.: boiling down our distributing Git to GPL-2-only, but
clarified things a number of years ago to not do so. It
ends up slightly easier to just enumerate all the licenses
of the code which goes into the binary packages we ship.
¹ https://metacpan.org/release/App-Licensecheck
--
Todd
Re: [PATCH 0/4] faster SHA-1 collision detection
Author: "D. Ben Knoble"
Date: Sun, 11 Oct 2026 14:06
Date: Sun, 11 Oct 2026 14:06
68 lines
12174 bytes
12174 bytes
On Sat, Oct 10, 2026 at 11:37 AM Todd Zullinger <tmz@pobox.com> wrote:
>
> D. Ben Knoble wrote:
> > On Fri, Oct 9, 2026 at 4:37 PM Todd Zullinger <tmz@pobox.com> wrote:
> >> Fedora's Git package has:
> >>
> >> BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
> >
> > Oh, curious! Where are the (using Gentoo identifiers for the moment)
> > BSD and LGPL-2.1+ sources? I guess I assume by looking at our COPYING
> > that the GPL-2+ came from contributions that said they were willing to
> > be 2+?
>
> There are various bits of code imported that are under
> difference licenses, among other things. The code in
> reftable/ is BSD-3-Clause (using the SPDX naming), for
> example, while xdiff/xhistogram.c is BSD-3-Clause and/or
> EDL-1.0 while most of the rest of it is LGPL-2.1-or-later;
> ewah/ is GPL-2.0-or-later; compat/obstack.[ch] and
> compat/regex/ are also LGPL-2.1-or-later.
>
> I used the perl licensecheck tool¹ to generate the initial
> list, then reviewed it and filtered out some bits from the
> test suite which are not shipped in the binary packages for
> Fedora.
>
> The command to do that is (without the filtering of any
> code):
>
> find -type f -exec licensecheck --shortname-scheme spdx {} + |
> grep -v 'UNKNOWN$' | LANG=C sort >licensecheck
>
> A more complete analysis would require reviewing all of the
> files which are UNKNOWN to ensure none have a copyright that
> licensecheck simply didn't find (or isn't in the file but
> can be found from the git history). I was a bit lazy and
> didn't do all of that work. :)
>
> > Anyway, thanks all! I'll assume the Gentoo maintainers knew what they
> > were doing :)
>
> Yeah, I've found most distribution packagers try to be
> diligent about this. Though it can be a somewhat tedious
> tasks and can change if the distribution switches from
> expecting packages to list the "effective" license to some
> other method.
>
> Fedora used to do (or allow) that license simplification,
> e.g.: boiling down our distributing Git to GPL-2-only, but
> clarified things a number of years ago to not do so. It
> ends up slightly easier to just enumerate all the licenses
> of the code which goes into the binary packages we ship.
>
> ¹ https://metacpan.org/release/App-Licensecheck
>
> --
> Todd
Thanks, very insightful. I should have thought of xdiff, but many of
the others with their own licenses were new(s) to me!
Best,
--
D. Ben Knoble
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads