Skip to content
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

freedesktop.org.xml file license #4

Closed
hadess opened this issue Feb 22, 2021 · 63 comments
Closed

freedesktop.org.xml file license #4

hadess opened this issue Feb 22, 2021 · 63 comments

Comments

@hadess
Copy link

hadess commented Feb 22, 2021

I've historically been the maintainer of shared-mime-info for around 15 years, and cmd/parser/freedesktop.org.xml looks like it's a copy of the database shipped with shared-mime-info, which is released under the GPL, with shared-mime-info's translators work merged in, and the GPL header removed.

The license that you're shipping mimemagic under (MIT) isn't compatible with shared-mime-info's.

There are a number of possibilities to fix this problem:

  • change the mimemagic license to be GPL compatible
  • parse the XML file that shared-mime-info ships at runtime, and don't ship it in a codebase with an incompatible license

Using a GPL file as a source makes your whole codebase a derived work, making it all GPL, so I think it's pretty important that this problem gets corrected before somebody uses it in a pure MIT codebase, or a closed-source application.

You will also need to re-add the GPL header to the shared-mime-info XML file as a matter of urgency.

@hadess
Copy link
Author

hadess commented Mar 2, 2021

Ping. Please reply with some information on how and when you intend to fix this problem.

@pombredanne
Copy link
Contributor

@hadess pong
you wrote:

I've historically been the maintainer of shared-mime-info for around 15 years, and cmd/parser/freedesktop.org.xml looks like it's a copy of the database shipped with shared-mime-info, which is released under the GPL, with shared-mime-info's translators work merged in, and the GPL header removed.

The license that you're shipping mimemagic under (MIT) isn't compatible with shared-mime-info's.

There are a number of possibilities to fix this problem:

* change the mimemagic license to be GPL compatible

* parse the XML file that shared-mime-info ships at runtime, and don't ship it in a codebase with an incompatible license

Using a GPL file as a source makes your whole codebase a derived work, making it all GPL, so I think it's pretty important that this problem gets corrected before somebody uses it in a pure MIT codebase, or a closed-source application.

You will also need to re-add the GPL header to the shared-mime-info XML file as a matter of urgency.

What about this pombredanne@84325dd and these commits: https://github.com/pombredanne/mimemagic/commits/master

And which other GPL headers are you referencing?
I could not find much in https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/6a226038bf42dae45a049a6b8e729abc/shared-mime-info-1.10.tar.xz beyond the GPL text (which I added back) and the whole original tarball(s) which I added also.

@pombredanne
Copy link
Contributor

Since I am not sure this topic has been discussed by the shared-mime-info contributors and community, I created this ticket https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/154

@hadess
Copy link
Author

hadess commented Mar 23, 2021

And which other GPL headers are you referencing?

This one:
https://gitlab.freedesktop.org/xdg/shared-mime-info/-/blob/master/data/freedesktop.org.xml.in#L63-79

I could not find much in https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/6a226038bf42dae45a049a6b8e729abc/shared-mime-info-1.10.tar.xz beyond the GPL text (which I added back) and the whole original tarball(s) which I added also.

You're right, the tools we used at the time (intltool) seemed to strip this information when released in tarballs. That's been fixed by a change of tools.

What about this pombredanne@84325dd and these commits: https://github.com/pombredanne/mimemagic/commits/master

Your combined work is now MIT + GPL (you can't relicense this GPL work under the MIT license that you're releasing the whole thing under), and you should use the proper license instead of just "GPL":
pombredanne@4c154fc#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R11

I'm guessing "licensed under the GNU GPL v2 or later", not "GPL-licensed" is good enough.

And this needs changing too:
https://github.com/pombredanne/mimemagic/blob/master/LICENSE

Since I am not sure this topic has been discussed by the shared-mime-info contributors and community, I created this ticket https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/154

Why would it need to be discussed? Whether I own the full copyright, or a tiny portion, I'm still entitled to enforce that copyright.

@pombredanne
Copy link
Contributor

Since I am not sure this topic has been discussed by the shared-mime-info contributors and community, I created this ticket https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/154

For the record, the ticket above has been closed and locked from further commenting by @hadess so the open discussion will have to continue here and in https://gist.github.com/pombredanne/7d6b3689a1b796c9a509c83b6b87f274

@Pizzacus
Copy link

I'm guessing "licensed under the GNU GPL v2 or later"

Wait wait wait, shared-mime-info is licensed under GPLv2 or later? Where does it say that any later version can be used?

pombredanne added a commit to pombredanne/mimemagic that referenced this issue Mar 23, 2021
@pombredanne
Copy link
Contributor

I'm guessing "licensed under the GNU GPL v2 or later"

Wait wait wait, shared-mime-info is licensed under GPLv2 or later? Where does it say that any later version can be used?

@Pizzacus I think that https://gitlab.freedesktop.org/xdg/shared-mime-info/-/blob/master/data/freedesktop.org.xml.in#L64 is what he refers to, but this is not carried in the redistributed XML in question here.

pombredanne added a commit to pombredanne/mimemagic that referenced this issue Mar 23, 2021
@Pizzacus
Copy link

That doesn't say "or any later version" .-.

GPL-licensed works can't be used under later versions if they don't specify they are licensed under "any later version". I couldn't find any notice of that in shared-mime-types, so I think it's only GPLv2, and not any later version...

But it is true that "licensed under the GPLv2 license" is better than "GPL-licensed"

@hadess
Copy link
Author

hadess commented Mar 23, 2021

GPL-licensed works can't be used under later versions if they don't specify they are licensed under "any later version". I couldn't find any notice of that in shared-mime-types, so I think it's only GPLv2, and not any later version...

You're right.

But it is true that "licensed under the GPLv2 license" is better than "GPL-licensed"

That'll do.

@pombredanne
Copy link
Contributor

@hadess your wrote:

I'm guessing "licensed under the GNU GPL v2 or later", not "GPL-licensed" is good enough.
...
Why would it need to be discussed? Whether I own the full copyright, or a tiny portion, I'm still entitled to enforce that copyright.

You are making guesses in your demands in a serious and official legal action. A demand with guesses is not entirely clear to me (irrespective of whether your claims are valid or not as I cannot judge that), therefore things need to be discussed.

@hadess
Copy link
Author

hadess commented Mar 23, 2021

You are making guesses in your demands in a serious and official legal action. A demand with guesses is not entirely clear to me (irrespective of whether your claims are valid or not as I cannot judge that), therefore things need to be discussed.

Why does it need to be discussed in the upstream repository, when you're the one distributing said software under the wrong terms?

@pombredanne
Copy link
Contributor

@hadess

Why does it need to be discussed in the upstream repository, when you're the one distributing said software under the wrong terms?

I guess one reason is that there may be other authors, contributors and maintainers of the https://gitlab.freedesktop.org/xdg/shared-mime-info project and that they may need to be aware of this legal action brought by you?

I would like to get the take of the project listed maintainers at https://gitlab.freedesktop.org/xdg/shared-mime-info/-/blob/66f85bac49626778e164600ce3a80bc1ae1b6604/MAINTAINERS on the topic:

Did you discuss this with them?

@ZanderBrown
Copy link

I mean the core issue here seems to be incompatibilities between MIT and GPL

Arguably GPL-2.0-only, GPL-2.0-or-later, GPL-3.0-only or GPL-3.0-or-later is completely irrelevant at this point: GPL is incompatible with MIT when used in this way

Given there isn't yet any serious legal action the exact version isn't overly important - You seem to be in violation of GPL and thus @hadess has the right to enforce their rights (irrespective of what other contributors may think)

@pombredanne
Copy link
Contributor

@hadess in https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/154#note_850132 you wrote:

Bastien Nocera @hadess · 49 minutes ago: I'm not going to discuss anything here, and I certainly don't need the express authorisation of other copyright holders to assert my own copyright.

I would appreciate if you can reopen https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/154 so a healthy and open discussion can take place there too.

That said, I pushed more commits in https://github.com/pombredanne/mimemagic Please review in details and kindly provide some actionable feedback.

@pombredanne
Copy link
Contributor

@ZanderBrown you wrote:

Given there isn't yet any serious legal action

An official DMCA takedown notice is a serious legal action.

@Pizzacus
Copy link

@ZanderBrown what do you mean by "GPL is incompatible with MIT when used in this way"?

If you mean that they can't distribute GPL files under a different license, then yeah that's fair. But if you mean they can't license their own work under MIT just because it's based on a GPL work, then I think that's not the case, they actually can.

@pombredanne
Copy link
Contributor

@hadess FWIW there are some possible ambiguities about the license of the data file: if the GPL applies, which GPL version?
See https://gist.github.com/pombredanne/7d6b3689a1b796c9a509c83b6b87f274#gistcomment-3676358

I need to know so we I address your demands properly.

@ZanderBrown
Copy link

ZanderBrown commented Mar 23, 2021

An official DMCA takedown notice is a serious legal action.

IANAL but [citation needed], a notice is essentially just a specialised Cease and Desist - i.e. a threat of legal action if the content is not removed

@ZanderBrown what do you mean by "GPL is incompatible with MIT when used in this way"?

So GPL and MIT both provide various rights for both creator and user, but they don't provide the same rights

In the case of GPL any derived work must also be GPL, however MIT doesn't have this restriction: Code under MIT can be converted to closed source

If you where taking MIT code and using it in a GPL project then all is fine: You are adding additional rights/restrictions

However taking GPL (of any version) and converting to MIT removes rights - this can only be done with consent of the original authors, such as @hadess

An analogy:
MIT is an unsigned 16bit integer
GPL is (signed or unsigned) 32bit integer

You can always fit that MIT value in a GPL variable - the entire 0 → 65535 range fits fine

However putting a GPL value - especially if signed, but unsigned as well - in an MIT variable doesn't work: 0→2147483647 simply doesn't fit unless you have arranged for the value to be within the 0 → 65535 range MIT can handle (i.e. got consent)

if the GPL applies, which GPL version?

Respectfully: If you just smashed my window it doesn't matter much if it was single or double glazed

@pombredanne
Copy link
Contributor

@ZanderBrown re:

Respectfully: If you just smashed my window it doesn't matter much if it was single or double glazed

You are making an assumption that there is the equivalent of a "smashed window" here. IMHO things are much less clear cut.

@fooishbar
Copy link

You are making an assumption that there is the equivalent of a "smashed window" here. IMHO things are much less clear cut.

I think the analogy is a good one. When you offer code under the MIT license, it is an unconditional gift: people are free to do what they like with it. When you offer code under the GPL license, it is not an unconditional gift: in return for being able to use the code, those using and distributing the code are subject to obligations to ensure that the code is only used in the service of open-source software, i.e. that the source code is always available, and any modifications are also available to the entire community under the same terms.

By whitewashing GPLed software as MIT, you are attempting to remove those obligations, against the explicit wishes of the people who originally donated their time and effort to create that software. Talking about 'smashed windows' is a little emotive, but pretty close to the reality.

@LeChasseur
Copy link

LeChasseur commented Mar 23, 2021

From a legal perspective there might be a misunderstanding here:

A computer program and a database are different types of copyrightable works (if protected at all). Hence, the licenses for the computer program and the database might be different (similar to fonts or images used together with a computer program).

GPL-2.0 (and GPL-3.0) provide for an obligation to license the copyright in modifications (derivative works respectively) under the GPL (respective version, or later if permitted). Accordingly, one has to license modifications of the database under the GPL but not the computer program using the database.

Databases are protected in the EU under the DIRECTIVE 96/9/EC (https://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CELEX:31996L0009:EN:HTML) if either is true: (a) by reason of the selection or arrangement of their contents, constitute the author's own intellectual creation or (b) there has been qualitatively and/or quantitatively a substantial investment in either the obtaining, verification or presentation of the contents to prevent extraction and/or re-utilization of the whole or of a substantial part, evaluated qualitatively and/or quantitatively, of the contents of that database.
Please note that (a) is classical copyright protection and works in most countries. However, it requires a creative act. (b) is specific for the EU and does not apply if the person doing the "substantial investment" is based outside the EU.

Recital 23 of the Directive 96/9/EC provides as follows:
"Whereas the term ‘database’ should not be taken to extend to computer programs used in the making or operation of a database, which are protected by Council Directive 91/250/EEC of 14 May 1991 on the legal protection of computer programs:"

@armijnhemel
Copy link

You are making an assumption that there is the equivalent of a "smashed window" here. IMHO things are much less clear cut.

I think the analogy is a good one. When you offer code under the MIT license, it is an unconditional gift: people are free to do what they like with it. When you offer code under the GPL license, it is not an unconditional gift: in return for being able to use the code, those using and distributing the code are subject to obligations to ensure that the code is only used in the service of open-source software, i.e. that the source code is always available, and any modifications are also available to the entire community under the same terms.

MIT is not an unconditional gift, you still need to provide the license text. It is a very simple condition, but still a condition.

By whitewashing GPLed software as MIT, you are attempting to remove those obligations, against the explicit wishes of the people who originally donated their time and effort to create that software. Talking about 'smashed windows' is a little emotive, but pretty close to the reality.

Except that this isn't software, it is data that is consumed by the MIT licensed program. There is no code as such in the XML, merely descriptions of data, a large part of which is copied from the IANA registry, format specifications or obtained by observing files.

The program can also work with a different XML file that is following the freedesktop.org shared MIME-info specification. Following the specification does not make the data file GPL automatically, despite what was claimed in the DMCA takedown notice. The freedesktop.org website is actually very explicit about this:

Anyone is free to use and implement the specifications on this site

There is no explicit requirement saying "and every file following the specification has to be under GPL".

The XML file that is currently shipped is not essential to the working of the program and the program would work fine with another one that uses the same structure. This means there is not a tight coupling between the program and the XML file.

@pombredanne
Copy link
Contributor

For reference, @hadess just made a pending merge request to update the license notice at https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/119

@cfergeau
Copy link

cfergeau commented Mar 23, 2021

The XML file that is currently shipped is not essential to the working of the program and the program would work fine with another one that uses the same structure. This means there is not a tight coupling between the program and the XML file.

I'm quite sure https://github.com/zRedShift/mimemagic/blob/master/magicsigs.go , https://github.com/zRedShift/mimemagic/blob/master/mediatypes.go , ... were generated from shared-mime-info.xml using https://github.com/zRedShift/mimemagic/blob/master/cmd/parser/main.go
mimemagic is not parsing the shared mime info database at runtime, it's transforming it into go files, and that licensing these as MIT. It does not need the XML file because it preprocessed/cached it in a different format.

@fooishbar
Copy link

A computer program and a database are different types of copyrightable works (if protected at all). Hence, the licenses for the computer program and the database might be different (similar to fonts or images used together with a computer program).

Yes, this is often referred to as the 'telephone book' standard, where simple lists of facts are not copyrightable, and copyright requires specific creative expression. The line on these is not clear cut, and I don't think either of us have sufficient legal competence to make a judgement that shared-mime-info is a list of facts with no creative expression (and hence not copyrightable).

@pombredanne
Copy link
Contributor

@zRedShift I am really sorry for you that you had to suffer this bullying through this episode.
FWIW, there is an excellent alternative types database at https://www.nationalarchives.gov.uk/PRONOM/
And a go parser at https://github.com/richardlehane/siegfried that you may be able to reuse to generate code from and avoid any future DMCA-mediated interactions with the shared-mime-info project maintainer.
Also FWIW, at this stage if I were you I would not worry about breaking other's workflows.

@fooishbar
Copy link

The derived source code itself is another question entirely, as while it was intended for everyone to generate their own, using their own systems' databases, I imagine most people use these default definitions derived from the shared-mime-info 1.10. I'm not sure if it's a violation of GPLv2 so I will defer to someone with expertise in such things.

The transformation from XML to Go form does not obviate the licensing on the XML: it must be retained within the Go code as that is very clearly a derived work. To take a really dumb example, if you transpile the Linux kernel to webasm, the webasm is still GPLed; it doesn't lose its licensing. If that were possible, the GPL would have been routed around long ago by any number of people with a strong vested interest in doing so.

As you say, when this happens is an interesting point. To simplify things somewhat, the obligations of the GPL (and copyright/licensing generally) are invoked when distribution happens. There is prior art in pushing this obligation down to users (e.g. NVIDIA's kernel modules), who would then be responsible for ensuring that they are in compliance with these obligations.

@pombredanne Without having perfect insight into Bastien's mind, I would suggest that what he really wants is for the GPL licensing on the MIME data to be complied with. Taking the entire project down is one way, or an amicable relicensing is another way. Given the amount of pushback insisting that shared-mime-info isn't actually licensed under the GPL (untrue), or attempting to find various loopholes and workarounds to undermine the licensing - in other words, disrespecting the wishes and the legal terms that Bastien attached to the code that he created and donated to the open-source community - maybe taking the repos down completely is the only way. Which is a sad outcome for everyone. You might not personally like the GPL, or find its implications practically difficult to deal with, but attempting to circumvent its obligations is neither legally nor ethically sound.

@armijnhemel
Copy link

The derived source code itself is another question entirely, as while it was intended for everyone to generate their own, using their own systems' databases, I imagine most people use these default definitions derived from the shared-mime-info 1.10. I'm not sure if it's a violation of GPLv2 so I will defer to someone with expertise in such things.

The transformation from XML to Go form does not obviate the licensing on the XML: it must be retained within the Go code as that is very clearly a derived work. To take a really dumb example, if you transpile the Linux kernel to webasm, the webasm is still GPLed; it doesn't lose its licensing. If that were possible, the GPL would have been routed around long ago by any number of people with a strong vested interest in doing so.

It is not code. It is a database with facts. That is something completely else.

@fooishbar
Copy link

It is not code. It is a database with facts.

This is not established and agreed. If it were a pure list of facts, then the license would be totally irrelevant as copyright law would not apply. I am not qualified to make a definitive statement on this (I have spent a lot of time dealing with copyright and licensing issues in many contexts, but am not a qualified lawyer), however my first thought in looking at the XML structure is that it is a state machine which would be more naturally expressed in a language such as Lua.

Just because the format is XML does not mean it is an uncopyrightable list of facts; you can generate significant original creative expression in any file format.

@hadess
Copy link
Author

hadess commented Mar 24, 2021

Changing the license to GPLv2 and yanking older versions(?) would probably break a lot of workflows, and wouldn't do much for the forks so I would like to avoid it if possible, even though I, myself, don't have a moral stance on the issue.

I can't answer those questions for you I'm afraid. FWIW, this is what happened to a Ruby implementation that had the same problem mentioned in this issue:
mimemagicrb/mimemagic#97

@dfaure
Copy link

dfaure commented Mar 24, 2021

The mime database is more than a "database of facts" (if that word means: trivial things that everyone knows). There is creative work in the magic rules, which have often been reverse-engineered from existing files with bad format documentation. There is creative work in the choices being made for inheritance, glob weighting, etc.

@nugend
Copy link

nugend commented Mar 24, 2021

Can we get some actual lawyers in here? If DMCA is being used, then Feist applies and I it doesn't matter how much effort went into creating the database.

@fooishbar
Copy link

@nugend You're the one making the argument that something which has been understood by its authors and everyone who's distributed it (including projects who do put a lot of effort into vetting this kind of thing) to be uncopyrightable. If you believe it's the case that Feist applies and the status quo is wrong, it's up to you to put that argument persuasively, not on the authors to reject it.

@nugend
Copy link

nugend commented Mar 24, 2021

I'm not a lawyer, so I can't provide legal advice, nor do I have standing, I'm just a curious bystander since legal threats have been made. If you've already consulted a lawyer regarding the copyright status of the database in question, an affadavit would be welcome for the edification of all. Otherwise, it's solely on @zRedShift to either counterfile the DMCA claim or not and up to him to seek legal advice regarding the same if he wants.

Also, I wasn't stating that it was or was not copyrightable. I was simply stating that effort is not the test used for the copyright-ability of a database.

@fooishbar
Copy link

shared-mime-info has been actively developed and shipped by both distributions and as part of products who do legal vetting of licenses for 19 years. In that time, I have never - until this thread - seen the argument advanced that it is uncopyrightable per Feist. Yet you are saying that after a couple of people who are not lawyers have suggested it might apply, the onus is suddenly on the copyright holder to engage a lawyer at their expense to rebut it?

This entire discussion is every bit as ethically dubious as it is legally dubious. The contributors to shared-mime-info specifically made an informed choice to license their work under the GPL. If you don't like the terms the work is licensed under, or you cannot comply with them - don't use it. It's that simple. Instead, the entire discussion in this issue and the other related ones has come from the attitude that complying with the legally-protected wishes of authors who donated their work to the open-source commons is hard, so they'll find ways to subvert and FUD that work, to make your life more convenient.

If you want to see how productive engagement around resolving licensing issues works, see jellybob/mimemagic#1, where it took like two hours for everyone to discuss the issues and figure out the least-bad solution. This issue is not that. It's the complete opposite. I can't even tell you how distasteful I find it that you are attempting to subvert the wishes of an open-source contributor to try and use their work in ways they have explicitly chosen not to permit.

Since there's no goodwill or productive intent, I'm unsubscribing from the issue, because it's insulting to spend my own unpaid time arguing with people who are trying to make an end-run around clearly-defined licensing terms for their own benefit, whilst trying to offload all the labour to the people who originally gifted the code into the open-source community.

Your legal options are clear. Good luck.

@dfaure
Copy link

dfaure commented Mar 24, 2021

... and I said creative choices, not effort.

zRedShift added a commit that referenced this issue Mar 24, 2021
@zRedShift
Copy link
Owner

@hadess @fooishbar I hope you'll find the changes to your satisfaction.

@hadess
Copy link
Author

hadess commented Mar 24, 2021

@hadess @fooishbar I hope you'll find the changes to your satisfaction.

This is great, thanks very much.

@taelerwatkins-tcn
Copy link

taelerwatkins-tcn commented Mar 24, 2021

@zRedShift One thing to note, you seem to have left the "v" off the 2.0 release. Our dep revision lock went from looking like "v1.1.0" to "2.0". Just something interesting to note. This is also non-conformant with gomodules.

@taelerwatkins-tcn
Copy link

taelerwatkins-tcn commented Mar 24, 2021

With the versioning as-is being non-compliant with go modules (regarding my previous comment), this cannot be downloaded via go mod download. You will always get v1.1.0 because the old versions are cached at proxy.golang.org

@yawaramin
Copy link

Then it seems the v1.1.0 (or older) cached in proxy.golang.org is also being distributed from there under an incorrect license?

@zRedShift
Copy link
Owner

This is great, thanks very much.

Great! Thank you.

With the versioning as-is being non-compliant with go modules (regarding my previous comment), this cannot be downloaded via go mod download. You will always get v1.1.0 because the old versions are cached at proxy.golang.org

I updated the tag to v2.0.0.
I haven't used golang in a while so I forgot some of its idiosyncrasies. I think a /v2 needs to be appended to the repository URL now.

Then it seems the v1.1.0 (or older) cached in proxy.golang.org is also being distributed from there under an incorrect license?

I wonder if there's a way to force yank/retract it. I tried to add a retract directive in the go.mod file, for the previous releases, but according to this:

Module authors can now retract module versions using the retract directive in go.mod. A retracted version still exists and can be downloaded (so builds that depend on it won't break), but the go command won’t select it automatically when resolving versions like @latest. go get and go list -m -u will print warnings about existing uses.

@SamSaffron
Copy link

Note anyone reading this, I am more than open for a PR that adds the "magic" detection to https://github.com/discourse/mini_mime (MIT) - a dependency of Mail gem and by association Rails.

Turns out https://github.com/apache/tika/blob/8b82b4c942c82f9cc2eb393e669227606b5f15fc/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml is Apache which is compatible with MIT.

If anyone feels like submitting a PR go for it!

@taelerwatkins-tcn
Copy link

It shows up now with the v2.0.0 tag, so thanks for that, but... go mod is ridiculously hard to please.

$ go mod download github.com/zRedShift/[email protected] go mod download: github.com/zRedShift/[email protected]: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2

I really hate the rigidity they've built into this system. We've had similar issues with go mod in one of our GitHub repos.

@taelerwatkins-tcn
Copy link

Oh that's right, you don't need a folder, you can manage it by creating a "v2" release branch, then tagging the release using that branch. Also, if going v2.x.x, then the name declared in the module must have /v2 appended to it, as well as the package declarations in the go source files.

Or you could use a version such as v1.2.0 without all the module trouble.

@zRedShift
Copy link
Owner

It shows up now with the v2.0.0 tag, so thanks for that, but... go mod is ridiculously hard to please.

$ go mod download github.com/zRedShift/[email protected] go mod download: github.com/zRedShift/[email protected]: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2

I really hate the rigidity they've built into this system. We've had similar issues with go mod in one of our GitHub repos.

Reading the documentation, it seems the "correct" way is to use go mod download github.com/zRedShift/mimemagic/v2 (with an optional @v2.0.0 suffix).
I guess I have been spoiled by better package managers, but it seems very silly. If someone doesn't pin their version, their package should be broken by a major semver breaking update.

Should I introduce a v1.2.0 tag as well? That's what @minad did, with v0.3.6 and v0.4. I have a feeling, however, that changing from MIT to GPL-2.0-or-later is a major, semver breaking change. On the other hand the MIT license was never valid in the first place so technically it was always under GPL and nothing changed between the versions.

@taelerwatkins-tcn
Copy link

taelerwatkins-tcn commented Mar 25, 2021

We commented at almost the exact same time with exactly the same content pretty much, haha.

EDIT (to reduce notification clutter): I must apologize. I should have opened a separate issue for the golang specific versioning conversation. I must admit that I was reading from the bottom up and stopped to reply when I found the end result. After reading top-down for more context I realized my error in my "contributions", such as they were, to this issue. Again, my apologies.

@em-
Copy link

em- commented Mar 25, 2021

Turns out https://github.com/apache/tika/blob/8b82b4c942c82f9cc2eb393e669227606b5f15fc/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml is Apache which is compatible with MIT.

@SamSaffron I'd suggest to double check with someone with better legal knowledge than me, but I'm not really sure that "Apache is compatible with MIT" in general. I'm confident enough that you can make the resulting work to be Apache-2.0 as a whole, but I sincerely doubt about doing the reverse as you'd be basically ignoring the Apache-2.0 patent provision for instance. Let's not address a licensing issue with a different one. :D

@fooishbar
Copy link

Thankyou for resolving this. Hope you have a nice Sunday.

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

No branches or pull requests