Skip to content

Conversation

@jas4711
Copy link
Contributor

@jas4711 jas4711 commented Oct 7, 2025

Hi!

I help maintain this package for Debian, and we have a policy to not install extra copies of license texts. Your self-tests appears to use some file in the source directory and uses LICENSE for this. This patch changes to use the hopefully always existing sftp.go file instead.

Thanks for your consideration!
/Simon

Copy link
Collaborator

@puellanivis puellanivis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will note that the LICENSE text itself says:

 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

So, this would suggest that redistributing our source code without including the copyright, the list of conditions, and the disclaimer (this effectively covers the entire LICENSE file) would be violating the terms of the license to redistribute that code.

I would have serious concerns about the copyright compliance should anyone be redistributing this source code without the LICENSE file, so I’m unsure if this change is even appropriate.

func TestRunLsWithLicensesFile(t *testing.T) {
path := "LICENSE"
func TestRunLsWithSourceFile(t *testing.T) {
path := "sftp.go"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would recommend in the case that you are not going to copy in the LICENSE file, we would want to use the very source file we’re in, since we should be able to guarantee its existence at least.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clever! I updated the pull request.

@jas4711
Copy link
Contributor Author

jas4711 commented Oct 7, 2025

I will note that the LICENSE text itself says:

 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

So, this would suggest that redistributing our source code without including the copyright, the list of conditions, and the disclaimer (this effectively covers the entire LICENSE file) would be violating the terms of the license to redistribute that code.

I would have serious concerns about the copyright compliance should anyone be redistributing this source code without the LICENSE file, so I’m unsure if this change is even appropriate.

Good point, but Debian policy is to ship this file in a separate /usr/share/doc/*/copyright file, and the file for your package is here:

https://sources.debian.org/src/golang-github-pkg-sftp/1.13.6-1/debian/copyright

That file is always included whenever your package is installed, and having a predictable place for all license texts helps the reader to find the appropriate text more easily.

/Simon

@puellanivis puellanivis merged commit ab738a1 into pkg:master Oct 22, 2025
4 checks passed
puellanivis added a commit that referenced this pull request Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants