sierrafoxtrot / srecord

SRecord github Mirror
https://srecord.sourceforge.net/
GNU General Public License v3.0
46 stars 23 forks source link

new input filter : nibble_swap #62

Closed fenugrec closed 1 year ago

fenugrec commented 1 year ago

Simple, exchange upper and lower halves of each byte, e.g. "A6" -> "6A".

Includes a simple test script.

fenugrec commented 1 year ago

(force-pushed because of some whitespace issues I just noticed - nothing else changed)

fenugrec commented 1 year ago

Thanks for reviewing. Will update this list as I go

fenugrec commented 1 year ago

Ok, the megalint long-line errors should be fixed.

About the copyright notice : if I cannot use my handle there, I assigned it to "srecord project". If that is not satisfactory then I will copy the notice from the bit_reverse (or byte_swap) filters which I mostly duplicated except for one line.

Note : there's already a // Copyright (C) 2019 fenugrec line in input/file/hp64.* ...

sierrafoxtrot commented 1 year ago

Ok, the megalint long-line errors should be fixed.

About the copyright notice : if I cannot use my handle there, I assigned it to "srecord project". If that is not satisfactory then I will copy the notice from the bit_reverse (or byte_swap) filters which I mostly duplicated except for one line.

Note : there's already a // Copyright (C) 2019 fenugrec line in input/file/hp64.* ...

Ok, the megalint long-line errors should be fixed.

Fantastic. Looks good.

About the copyright notice : if I cannot use my handle there, I assigned it to "srecord project". If that is not satisfactory then I will copy the notice from the bit_reverse (or byte_swap) filters which I mostly duplicated except for one line.

That is probably a solid approach although people may get a little confused about files with circa 2010 copyright being created in 2023. If they are different, we could have an issue as Peter can no longer assert copyright and his estate has no legal entity. But if this is your preferred approach, I think on balance, we can go with it.

Note : there's already a // Copyright (C) 2019 fenugrec line in input/file/hp64.* ...

I spotted the existing one too and that was entirely my fault for letting it through. We will need to address this one similarly too unfortunately.

The problem is that the GPL relies on assertion/defence of copyright which in many if not all jurisdictions can only be made by a legal entity ie a person or business. While I appreciate the intent with "srecord project", it isn't a legal entity either.

I completely support your preference to keep your legal name out of the code base so the best I can offer is if you assign it to me. I don't like the idea of claiming credit for your work (history still shows it comes from you) but unless you have a corporate entity that could hold the copyright, it's the best we have available. Perhaps something like the following? // Copyright (C) 2019 Scott Finneran (authored by fenugrec & copyright assigned)

Now I remember why I chose engineering over law :-)

fenugrec commented 1 year ago

we could have an issue as Peter can no longer assert copyright and his estate has no legal entity

Good point.

The problem is that the GPL relies on assertion/defence of copyright which in many if not all jurisdictions can only be made by a legal entity

Yeah, getting fast into uncharted waters for me, and of course varies according to local law, but there is definitely some precedent for asserting copyright under a pseudonym (not a new thing in the publishing world). What few references I've found all recommend consulting lawyers , obviously :

I think using "srecord project' would probably be valid in many jurisdictions, I've seen various wording like "works produced in collaboration / in a group or team", but that's another story.

As I understand since I published this PR (and the hp64k one) under GPL under a pseudonym, the copyright enforceability is my problem - it says GPL and nothing else, so you are free to include it in srecord under the GPL terms. You don't inherit the responsibility of protecting my copyright, since it's mine ?

Anyway, as maintainer, it's entirely up to you how to proceed; if it's a problem then for this PR at least I have no objection to you claiming copyright on it. It's trivial code that you could have produced in less time than it took me to write this reply -- I hardly even feel I deserve to have my own name there !

Now I remember why I chose engineering over law :-)

Yeah, no joke. The only laws I want to deal with are the laws of physics.

sierrafoxtrot commented 1 year ago
* UK is weird, https://copyrightservice.co.uk/copyright/p03_copyright_notices "Although it may not be technically correct (it does not state the name of the legal entity that is the copyright owner), it is very common for an identifiable pseudonym or trading name to be used in the copyright notice"

Yep and we have some similar conventions here in Australia. Hence my move to keeping it simple.

Anyway, as maintainer, it's entirely up to you how to proceed; if it's a problem then for this PR at least I have no objection to you claiming copyright on it. It's trivial code that you could have produced in less time than it took me to write this reply -- I hardly even feel I deserve to have my own name there !

Mate, you took the time to contribute and even consider my comments above seriously which I greatly appreciate. In the interests of taking a simple approach that I can apply consistently, would you mind making the updates to something like the following? // Copyright (C) 2023 Scott Finneran (authored by fenugrec & copyright assigned)

or perhaps // Authored by fenugrec with copyright assigned to Scott Finneran // Copyright (C) 2023 Scott Finneran

Now I remember why I chose engineering over law :-)

Yeah, no joke. The only laws I want to deal with are the laws of physics.

LOL, much more reasonable set of rules!

fenugrec commented 1 year ago

Yep and we have some similar conventions here in Australia. Hence my move to keeping it simple.

Right. Thought about it some more, and still, I can't see how this would ever be a problem. Even if you or some future maintainer wants to relicense everything, whether there's a real or fake name or an obvious pseudonym in the notice won't change much, as I would still need to be contacted for permission. If someone uses parts of my code and doesn't observe GPL requirements, that's not the project's problem to deal with but entirely mine. Can you think of a scenario where it would cause issues ?

sierrafoxtrot commented 1 year ago

Yep and we have some similar conventions here in Australia. Hence my move to keeping it simple.

Right. Thought about it some more, and still, I can't see how this would ever be a problem. Even if you or some future maintainer wants to relicense everything, whether there's a real or fake name or an obvious pseudonym in the notice won't change much, as I would still need to be contacted for permission. If someone uses parts of my code and doesn't observe GPL requirements, that's not the project's problem to deal with but entirely mine. Can you think of a scenario where it would cause issues ?

The GPL essentially applies project-wide. The license isn't per-file and as such, weakening assertion/defense on any file weakens it for the whole project. Copyright can only be asserted by an individual, group or legal entity such as a corporation. This is one of the reasons that entities such as the GNU project and the Software Freedom Conservancy insist on copyright assignment across the entire codebase.

In purely pragmatic terms, your code in isolation of the underlying classes and associated tools is unlikely to be the target of misappropriation. The most likely is someone including libsrecord in a commercial tool in violation of the license in some way. Defending against that situation from a weakened position is the most likely abuse we'll encounter.

This would be a lot simpler and probably of less concern if we were publishing under for example, the BSD or MIT licenses where the boundary is each source file.

sierrafoxtrot commented 1 year ago

Yep and we have some similar conventions here in Australia. Hence my move to keeping it simple.

Right. Thought about it some more, and still, I can't see how this would ever be a problem. Even if you or some future maintainer wants to relicense everything, whether there's a real or fake name or an obvious pseudonym in the notice won't change much, as I would still need to be contacted for permission. If someone uses parts of my code and doesn't observe GPL requirements, that's not the project's problem to deal with but entirely mine. Can you think of a scenario where it would cause issues ?

I gave it some more thought and sought some more advice.

Regarding copyright assertion, a handle is essentially a pseudonym (aka pen-name) and this doesn't undermine copyright assertion as long as we can trace it back to a real identity.

Your commits are attributed to an email address and possibly even signed giving traceability back to a contact point. It's an email redirect via Sourceforge but better than nothing. I may end up turning on "commits must be signed" at some point.

Bottom line is that on balance, I do think we'll be ok. Let's move forward as-is on the copyright assignment. Thanks for helping me think this through.

If you wouldn't mind changing the copyrights back to // Copyright (C) 2019 fenugrec, I'd appreciate it. Apologies for all the back and forth.

fenugrec commented 1 year ago

I may end up turning on "commits must be signed" at some point.

I'd be perfectly fine with that if you eventually go for that.

Bottom line is that on balance, I do think we'll be ok. Let's move forward as-is on the copyright assignment. Thanks for helping me think this through.

Glad to hear that; thank you for giving this honest thought. Will change back the notices in this PR in a few minutes.

sierrafoxtrot commented 1 year ago

When you get a moment to change the copyright assignments to fenugrec, I can merge this in.

fenugrec commented 1 year ago

When you get a moment to change the copyright assignments to fenugrec, I can merge this in.

Oh I thought I alread had, did I miss one ?

sierrafoxtrot commented 1 year ago

When you get a moment to change the copyright assignments to fenugrec, I can merge this in.

Oh I thought I alread had, did I miss one ?

Sorry, my mistake, I mucked something up pulling latest. All good!

fenugrec commented 1 year ago

awesome. thanks