-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deps: configure and build patched libedit #32623
Conversation
|
Ok, I think this is ready to go. @knz I added your copyright header to all of the files that originated from github.com/knz/go-libedit. I'm not seeing why the NetBSD copyright would be relevant to any of them; they're all your original work, save for a function or two that I contributed. The copyright on libedit itself, of course, very much belongs to NetBSD and Christos Zoulas. We don't need to worry about that, though, since it's isolated in its own Git submodule with appropriate license files and headers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't just add "portions of this file are with a different license"
This is not how licenses work.
The original code was released with a specific license. That license grants you right that you would otherwise not have since you are not copyright holder.
The license grants you the following rights:
- make copies and redistribution of the files
- make changes to the file, holding the copyright and license info intact
- claim copyright to portions of the files
Here is a right that the license does not grant you:
- issue a new license for the files
Licenses do not apply for a "portion" of the file. Licenses apply on entire files.
Also, you may not issue a license for code for which you are not the sole copyright owner, without agreement from every other copyright holder.
If you want to have a mixed-license source tree you must be very careful to:
- separate code with different copyright holders into different files, with clear copyright attributions
- license the files that you have sole copyright over using a a separate license, if you wish to do so
- identify clearly (usually, by using separate directories) which files are released with which license.
So in terms of changes:
|
We do the "portions of this file" thing elsewhere, so if that is indeed wrong there is a lot to clean up: cockroach/pkg/internal/rsg/yacc/lex.go Lines 1 to 22 in e2deae4
Why not? The derivative work is subject to the terms of both licenses: your original BSD license as well as the Apache license.
Source? I think this is just a convention. I don't have a problem with releasing my changes in this directory under the terms of your BSD license, but I think doing so requires @bdarnell's permission. |
This discussion is above my paygrade but all my experience until now has been that open source software avoid separate licensing terms for separate portions of files. This is because it makes tracking attribution and licensing of individual lines/words inside the file properly impossible. I do indeed think that we have a serious problem on our hands if that has been done in other places. I'd like to see some serious precedent outside of CockroachDB before I build a different opinion. |
9bd423e
to
9f5086b
Compare
this was discussed with @bdarnell. please issue first a PR against go-libedit to re-license with APL; we'll merge that, then you can pick it up from there. |
f49ec9e
to
f8717b0
Compare
well thanks to you kind sir |
Teach our Makefile to orchestrate the configuration and building of our line editing library, libedit. This allows us to incorporate an upstream patch for cockroachdb#31843, which was causing incorrect spacing when recalling multi-line history entries. Previously, we were attempting to link against potentially outdated system libedits, which are likely to exhibit the bug for years to come. Release note (build change): a recent libedit is now bundled with CockroachDB, which fixes some line editing bugs in the CockroachDB console. On platforms that include libedit as part of the base system, like macOS and FreeBSD, CockroachDB no longer links against the system libedit.
It's green! 💚 bors r=knz |
32623: deps: configure and build patched libedit r=knz a=benesch ~There is more work to do here to appease the linter, but wanted to get this proof-of-concept out. @knz what copyright header would you like me to put on the files in cli/editline?~ --- ~Absorb our line-editing library, github.com/knz/go-libedit. The C library, libedit, is extracted into a c-deps submodule, where its build can be properly orchestrated by our Makefile to use the upstream autotools build system. The Go code is extracted into pkg/cli/editline, where it can more easily be modified to meet our needs.~ ~Fix #31843.~ ~Release note: None~ --- Teach our Makefile to orchestrate the configuration and building of our line editing library, libedit. This allows us to incorporate an upstream patch for #31843, which was causing incorrect spacing when recalling multi-line history entries. Previously, we were attempting to link against potentially outdated system libedits, which are likely to exhibit the bug for years to come. Release note (build change): a recent libedit is now bundled with CockroachDB, which fixes some line editing bugs in the CockroachDB console. On platforms that include libedit as part of the base system, like macOS and FreeBSD, CockroachDB no longer links against the system libedit. Co-authored-by: Nikhil Benesch <nikhil.benesch@gmail.com>
Build succeeded |
This patch appears to break the nightly Windows build
|
Oh, hm, I guess we shouldn't bother trying to build libedit for Windows because it certainly won't work there. |
I'll have a patch for this shortly. |
Awesome! Feel free to cc me on the review. I'm about to cut a 19.2 alpha and this has Publish Bleeding Edge blocked (Hi Nikhil! 👋) |
This reverts commit 454f32b. It breaks the Publish Bleeding Edge build, which blocks releases, nightly tests, and roachperf data collection. Looks like the failure is that it's trying to build libedit on windows: cockroachdb#32623 (comment) Release note: None
38383: Revert "deps: configure and build patched libedit" r=jordanlewis a=danhhz This reverts commit 454f32b. It breaks the Publish Bleeding Edge build, which blocks releases, nightly tests, and roachperf data collection. Looks like the failure is that it's trying to build libedit on windows: #32623 (comment) Release note: None Co-authored-by: Daniel Harrison <daniel.harrison@gmail.com>
Argh, sorry, but I had to revert this to get an alpha release started 😬. We didn't have any recent green Publish Bleeding Edge builds. #38383. Should be easy to unrevert with the windows fix, tho |
Ah, shoot, too bad. The patch is prepared, but the holdup is waiting for
Docker to verify that the thing actually builds on Windows. Will circle
back later tonight.
…On Mon, Jun 24, 2019 at 5:46 PM Daniel Harrison ***@***.***> wrote:
Argh, sorry, but I had to revert this to get an alpha release started 😬.
We didn't have any recent green Publish Bleeding Edge builds. #38383
<#38383>. Should be easy to
unrevert with the windows fix, tho
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#32623?email_source=notifications&email_token=AAGXSICTBJGM3PEYOXURY63P4E6CLA5CNFSM4GGTBVS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYOKL2Y#issuecomment-505193963>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGXSIG7XV3OVDW2TBQS6JDP4E6CLANCNFSM4GGTBVSQ>
.
|
Libedit doesn't support Windows, so don't try to build/link it there. This was the previous behavior, but I broke it in cockroachdb#32623. Release note: None
38400: deps: configure and build patched libedit redux r=jordanlewis a=benesch Resubmit #32623 with a patch to avoid building libedit on Windows, where it's unsupported. I've verified that `build/builder.sh mkrelease windows` succeeds with this additional patch. Co-authored-by: Nikhil Benesch <nikhil.benesch@gmail.com>
There is more work to do here to appease the linter, but wanted to get this proof-of-concept out. @knz what copyright header would you like me to put on the files in cli/editline?Absorb our line-editing library, github.com/knz/go-libedit. The Clibrary, libedit, is extracted into a c-deps submodule, where its build
can be properly orchestrated by our Makefile to use the upstream
autotools build system. The Go code is extracted into pkg/cli/editline,
where it can more easily be modified to meet our needs.
Fix #31843.Release note: NoneTeach our Makefile to orchestrate the configuration and building of our
line editing library, libedit. This allows us to incorporate an upstream
patch for #31843, which was causing incorrect spacing when recalling
multi-line history entries. Previously, we were attempting to link
against potentially outdated system libedits, which are likely to
exhibit the bug for years to come.
Release note (build change): a recent libedit is now bundled with
CockroachDB, which fixes some line editing bugs in the CockroachDB
console. On platforms that include libedit as part of the base system,
like macOS and FreeBSD, CockroachDB no longer links against the system
libedit.