-
-
Notifications
You must be signed in to change notification settings - Fork 283
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
Rust/Go packages license issues #1052
Comments
What I'm doing in particular is using the JSON output information produced by |
Doesn't the same concern apply to go packages? |
To not re-invent the wheel here, how are other packaging eco systems solving that e.g. linux distributions like debian or homebrew? |
Yes, the same concern apply to Go packages. See also https://github.com/google/go-licenses I've no idea how others fix this. |
I am not sure how you want to address that but it does not seem straightforward. We could use a script that goes over all the dependencies, parse for the licenses, and list all the licenses per deps in the conda package? |
Also at what level this script should be run? conda or conda-forge? |
It makes sense. That being said I probably don't have the bandwidth at the moment to do that for conda-forge/staged-recipes#11799 |
For go, it's simple. See https://github.com/google/go-licenses#complying-with-license-terms |
Quick thought, this also applies to C++ packages when you link statically with your dependencies. |
Should this be extended to header only dependencies as well? For example, if you use pybind11, boost, etc, do you need to package the license file used by them as well? Because that's as good as statically linking parts of them. |
Perhaps there needs to be a |
Depends on the license.
|
Thanks for the guidance here on this topic: texlab-feedstock is now using the same approach as pysyntect-feedstock, and "only" required manually hunting down 20 licenses (of 200+). Perhaps we should package |
As this has come up again for @conda-forge/cryptography: I wonder if we start curating a community package, e.g.
this would in turn update the recipe (once) so we actually have the licenses sha256sums. |
So would a |
Hello! I've been working on a tool to hopefully mitigate this issue / make it less painful to publish rust tools on conda-forge. It can be found here. In short, it crawls the package dependencies and searches out the license files that correspond to what is in the The idea is that the workflow would go as follows:
Currently this tool supports three formats: yaml, json, and toml. See the above repo for an example yaml THIRDPARTY file. In the view of conda-forge maintainers, would this satisfy the requirement of |
Looks good! Really anything that moves things forward sounds great to me... I'm wagering if:
... I don't see what complaints there would/could be. From a KISS perspective, and as I don't really want to hand edit this file, I'd see JSON being the preferable serialization format... to that end, now that SPDX 2.2.1 is ISO5962, I'd really hope we start seeing it adopted more broadly (and provided by upstream packagers) and can stop needing to re-implement clever stopgaps. |
This came up again recently for As mentioned above, Something like build:
number: 0
script:
- go-licenses save "github.com/google/trillian/server/trillian_log_server" --save_path="/trillian_log_server"
Edit: license_file also supports folders What's everybody's opinion? |
If there's a recommended tool, it definitely seems like we should try to integrate it into our best-practices workflows, yeah! |
Do we have a |
Feel free to use https://github.com/conda-forge/go-sops-feedstock for this |
Regarding I'm especially satisfied about how it compiles on One peculiarity was needing to download the source to a subfolder ( $GOPATH/go.mod exists but should not Another peculiarity was coming up with the particular syntax of cd src/dasel
...
go-licenses save . --save_path=license-files which works across platforms. |
Oh that's great news, thanks! I ran into the same problem when testing this myself so that's awesome. @conda-forge/go Do you think this is reproducible? Then I'll add this to the docs and we can close this issue. |
You might want to hang on for one moment, I'm looking at adding the osx-arm64 migration to Dasel, and I'm getting an error from cross-compilation due to Maybe we should make one final push to fix conda-forge/dasel-feedstock#2 before settling on a standard? (BTW, please help, since I don't know Go! 😂) |
That is probably the same as conda-forge/go-licenses-feedstock#9? |
Thanks @BastianZim! Those links were actually new to me. Good to know for instance that I'm not alone on Conda-Forge, and that gives me a few ideas.
I'm not sure what you mean by "messing", but anything I do here related to Go should definitely be sanity-checked. 😄 |
Ahh ok great! :) I was primarily talking about where to place the binaries as discussed in the stack overflow post and for the conda-forge wide solution, not what you did already. But I'm no expert here either so no idea how forgiving/strict conda-build is here. 😄 |
For osx-arm, I couldn't find a cross-compilation command which is also Windows-compatible. I ended up using the |
Hmm interesting. How about going with go build for everything? Or is install better? |
Excellent question! I attempted this, and the problem is the environment variable In other words, my In contrast, my Since cross-compilation currently takes place only on Linux, I can get away with using |
It should also work with something similar to - go build -o "${PREFIX}/bin/" -v -ldflags "-X github.com/tomwright/dasel/internal.Version=v{{ version }}" ./cmd/dasel # [not win]
- go build -o "%PREFIX%\bin\" -v -ldflags "-X github.com/tomwright/dasel/internal.Version=v{{ version }}" ./cmd/dasel # [win] If one assumes that everything should be built for osx-arm, then probably this form is actually more desirable. (I was just thinking it was slick how the |
I was just playing around with this in conda-forge/dasel-feedstock#3 and failing. Debugging Windows via the CI is really slow and painful, so I give up. Here's the info in case anyone else wants to try. (I suspect this would be easy for anyone with a better understanding of conda-build and a Windows computer.) Where I'm stuck is with |
More info on this. Isuru mentioned that cabal-db can help get a list of the licenses for the dependencies in a haskell project. However, cabal-db is pretty much impossible to install. I tried multiple cabal versions and in different systems. I guess the project is abandoned. Are there other alternatives? |
cabal-plan seems more promising: https://hackage.haskell.org/package/cabal-plan#description |
A typical rust package use dozens of packages which have different licenses and requirements. A rust package and its dependencies are usually compiled into one library or executable.
For eg: conda-forge/staged-recipes#11315 has a rust package with 91 dependencies with various MIT/BSD-3-Clause/Apache-2.0 licenses and maybe others.
This implies that the licenses and copyrights of the dependencies need to be distributed with the package. There are some tools to help do this like https://github.com/maghoff/cargo-license-hound, https://github.com/onur/cargo-license.
I'm opening this issue so that @conda-forge/staged-recipes and @conda-forge/core know about this when reviewing Rust recipes.
cc @andfoy, @mingwandroid
The text was updated successfully, but these errors were encountered: