Librejs compliance for docs.codeberg.org #145

Closed
opened 2 months ago by yp · 15 comments
yp commented 2 months ago

Hello everyone,

Several of us are evaluating codeberg.org based on GNU Ethical Repository Criteria (https://www.gnu.org/software/repo-criteria.html). You can find evaluation results for some of the other forges at (https://www.gnu.org/software/repo-criteria-evaluation.html) though that page is overdue for an update.

One problem we came across is the librejs-compliance for docs.codeberg.org. The documentation website is not navigable under librejs, as two simple scripts are missing licenses:

With these two scripts disabled, one can not open the table of content menu as the "burger" button is unresponsive.

Granted one can bypass this problem by inspecting the source of the webpage and finding the links of other pages, but the issue is casting doubt whether codeberg.org is failing a C-class criterion (C0) and would be rated F.

I have not worked with making js files librejs-compliant before, but this problem seems to be easily fixable to me, and I'm happy to work on a pull request to fix it.

For reference, the evaluation has been taking place in a mailing list thread starting with this one:
https://lists.gnu.org/archive/html/repo-criteria-discuss/2021-06/msg00000.html

It is also summarised at https://libreplanet.org/wiki/Codeberg but this page may be outdated compared to the mailing list discussion.

Thanks,
Yuchen

Hello everyone, Several of us are evaluating codeberg.org based on GNU Ethical Repository Criteria (https://www.gnu.org/software/repo-criteria.html). You can find evaluation results for some of the other forges at (https://www.gnu.org/software/repo-criteria-evaluation.html) though that page is overdue for an update. One problem we came across is the librejs-compliance for docs.codeberg.org. The documentation website is not navigable under librejs, as two simple scripts are missing licenses: - https://docs.codeberg.org/assets/js/collapse.js - https://docs.codeberg.org/assets/js/sidebar.js With these two scripts disabled, one can not open the table of content menu as the "burger" button is unresponsive. Granted one can bypass this problem by inspecting the source of the webpage and finding the links of other pages, but the issue is casting doubt whether codeberg.org is failing a C-class criterion (C0) and would be rated F. I have not worked with making js files librejs-compliant before, but this problem seems to be easily fixable to me, and I'm happy to work on a pull request to fix it. For reference, the evaluation has been taking place in a mailing list thread starting with this one: https://lists.gnu.org/archive/html/repo-criteria-discuss/2021-06/msg00000.html It is also summarised at https://libreplanet.org/wiki/Codeberg but this page may be outdated compared to the mailing list discussion. Thanks, Yuchen
fnetX added the
Part: Generator
label 2 months ago
Collaborator

Thank you for reporting this. As you probably know, we already have this upstream LibreJS issue with Codeberg, but the docs script are unrelated, so we'll have a look, although I'm personally not familiar with the generator setup here and how all this works.

I assume you are the reviewer of Codeberg.org?
Please note as of our Terms of Use, we only allow FSF and OSI approved licenced repositories at the moment (A4 on the wiki page).

Thank you for reporting this. As you probably know, we already have this upstream LibreJS issue with Codeberg, but the docs script are unrelated, so we'll have a look, although I'm personally not familiar with the generator setup here and how all this works. I assume you are the reviewer of Codeberg.org? Please note as of our Terms of Use, we only allow FSF and OSI approved licenced repositories at the moment (A4 on the wiki page).
n commented 2 months ago
Collaborator

Thanks for bringing this up. The two scripts are licensed under CC BY-SA, which is a free license, but not a detected license on LibreJS. For that reason we should hold on setting up LibreJS.

I am working on migrating to the Codeberg Design Kit in #132. It is based on the Halfmoon front-end framework, which is licensed under MIT.

Since MIT is a detected free license on LibreJS, I will look at implementing LibreJS compatibility when switching to the new framework.

Thanks for bringing this up. The two scripts are licensed under CC BY-SA, which [is a free license](https://www.gnu.org/licenses/license-list.html#ccbysa), but not [a detected license](https://www.gnu.org/software/librejs/manual/html_node/Free-Licenses-Detection.html) on LibreJS. For that reason we should hold on setting up LibreJS. I am working on migrating to the Codeberg Design Kit in #132. It is based on the Halfmoon front-end framework, which is licensed under MIT. Since MIT is a detected free license on LibreJS, I will look at implementing LibreJS compatibility when switching to the new framework.
n added a new dependency 2 months ago
Collaborator

As a proud noscript user (although I enjoy Codeberg with enabled scripts), can this functionality instead be implemented using only CSS? I think so, I'd really prefer this. 😉
The common way is usually using a checkbox for the menu and show the sidebar if the checkbox is checked. Not sure how this aligns with halfmoon, but it should work, too.

I assume this move might take a while. @yp you mentioned on the mailing lists you'd try to come up with a pull. Is there still a hotfix for the LibreJS issue or is it just not possible to browse a website with CC BY-SA licenced code with this tool? This choise was made as the simple scripts are part of the CC licenced documentation, and obviously no one saw the need to consider using a different licence for these 50sloc.

As a proud noscript user (although I enjoy Codeberg with enabled scripts), can this functionality instead be implemented using only CSS? I think so, I'd really prefer this. 😉 The common way is usually using a checkbox for the menu and show the sidebar if the checkbox is checked. Not sure how this aligns with halfmoon, but it should work, too. I assume this move might take a while. @yp you mentioned on the mailing lists you'd try to come up with a pull. Is there still a hotfix for the LibreJS issue or is it just not possible to browse a website with CC BY-SA licenced code with this tool? This choise was made as the simple scripts are part of the CC licenced documentation, and obviously no one saw the need to consider using a different licence for these 50sloc.
yp commented 2 months ago
Poster

Thanks for bringing this up. The two scripts are licensed under CC BY-SA, which is a free license, but not a detected license on LibreJS. For that reason we should hold on setting up LibreJS.

Thanks for the reply. Is the licensing information of the scripts indicated at Documentation/LICENSE.md by the following line?

This website by The Codeberg Documentation Contributors is licensed under CC-BY-SA 4.0.

Given that Creative Commons licenses are not normally used on software, it is not clear from reading this that the license covers the script. In fact, CC licenses are not supposed to be used for software (https://creativecommons.org/faq/#can-i-apply-a-creative-commons-license-to-software) - perhaps that is why librejs does not detect CC BY-SA. So it's probably a good idea to use a different license for the scripts.

I assume this move might take a while. @yp you mentioned on the mailing lists you'd try to come up with a pull. Is there still a hotfix for the LibreJS issue or is it just not possible to browse a website with CC BY-SA licenced code with this tool?

I'd like to fix it, but without knowing what license the copyright holder wants to use for the scripts, I am not sure how to move forward. @n mentioned that the new code will be licensed under MIT, which I assume is expat the more popular of the two MIT licenses, does that mean you will be happy to license the two existing javascript files under the expat license as well? If so I'll work on creating a PR based on that.

This choise was made as the simple scripts are part of the CC licenced documentation, and obviously no one saw the need to consider using a different licence for these 50sloc.

This may seem like a borderline case indeed, but AIUI it is good practice to put a copyright notice and a license notice on each file to eliminate uncertainties. See for example https://www.gnu.org/licenses/gpl-howto.en.html, which is about GPL but IMO the advice about copyright and license notices should apply in general to other licenses. :)

> Thanks for bringing this up. The two scripts are licensed under CC BY-SA, which is a free license, but not a detected license on LibreJS. For that reason we should hold on setting up LibreJS. Thanks for the reply. Is the licensing information of the scripts indicated at Documentation/LICENSE.md by the following line? > This website by The Codeberg Documentation Contributors is licensed under CC-BY-SA 4.0. Given that Creative Commons licenses are not normally used on software, it is not clear from reading this that the license covers the script. In fact, CC licenses are not supposed to be used for software (https://creativecommons.org/faq/#can-i-apply-a-creative-commons-license-to-software) - perhaps that is why librejs does not detect CC BY-SA. So it's probably a good idea to use a different license for the scripts. > I assume this move might take a while. @yp you mentioned on the mailing lists you'd try to come up with a pull. Is there still a hotfix for the LibreJS issue or is it just not possible to browse a website with CC BY-SA licenced code with this tool? I'd like to fix it, but without knowing what license the copyright holder wants to use for the scripts, I am not sure how to move forward. @n mentioned that the new code will be licensed under MIT, which I assume is expat the more popular of the two MIT licenses, does that mean you will be happy to license the two existing javascript files under the expat license as well? If so I'll work on creating a PR based on that. > This choise was made as the simple scripts are part of the CC licenced documentation, and obviously no one saw the need to consider using a different licence for these 50sloc. This may seem like a borderline case indeed, but AIUI it is good practice to put a copyright notice and a license notice on each file to eliminate uncertainties. See for example https://www.gnu.org/licenses/gpl-howto.en.html, which is about GPL but IMO the advice about copyright and license notices should apply in general to other licenses. :)
n commented 2 months ago
Collaborator

This website by The Codeberg Documentation Contributors is licensed under CC-BY-SA 4.0.

Given that Creative Commons licenses are not normally used on software, it is not clear from reading this that the license covers the script. In fact, CC licenses are not supposed to be used for software (https://creativecommons.org/faq/#can-i-apply-a-creative-commons-license-to-software) - perhaps that is why librejs does not detect CC BY-SA. So it's probably a good idea to use a different license for the scripts.

We could consider relicensing the code in this repo under GPL, since it's one-way compatible with CC BY-SA.

I assume this move might take a while. @yp you mentioned on the mailing lists you'd try to come up with a pull. Is there still a hotfix for the LibreJS issue or is it just not possible to browse a website with CC BY-SA licenced code with this tool?

I'd like to fix it, but without knowing what license the copyright holder wants to use for the scripts, I am not sure how to move forward. @n mentioned that the new code will be licensed under MIT, which I assume is expat the more popular of the two MIT licenses, does that mean you will be happy to license the two existing javascript files under the expat license as well? If so I'll work on creating a PR based on that.

The copyright owner isn't active on Codeberg anymore so relicensing isn't going to be straightforward.
The new halfmoon frame files are under Codeberg/Design:/design-kit. If you could help with LibreJS compatibility in that repo, that would be much appreciated.

> > This website by The Codeberg Documentation Contributors is licensed under CC-BY-SA 4.0. > > Given that Creative Commons licenses are not normally used on software, it is not clear from reading this that the license covers the script. In fact, CC licenses are not supposed to be used for software (https://creativecommons.org/faq/#can-i-apply-a-creative-commons-license-to-software) - perhaps that is why librejs does not detect CC BY-SA. So it's probably a good idea to use a different license for the scripts. We could consider relicensing the code in this repo under GPL, since it's one-way compatible with CC BY-SA. > > I assume this move might take a while. @yp you mentioned on the mailing lists you'd try to come up with a pull. Is there still a hotfix for the LibreJS issue or is it just not possible to browse a website with CC BY-SA licenced code with this tool? > > I'd like to fix it, but without knowing what license the copyright holder wants to use for the scripts, I am not sure how to move forward. @n mentioned that the new code will be licensed under MIT, which I assume is expat the more popular of the two MIT licenses, does that mean you will be happy to license the two existing javascript files under the expat license as well? If so I'll work on creating a PR based on that. The copyright owner isn't active on Codeberg anymore so relicensing isn't going to be straightforward. The new halfmoon frame files are under [Codeberg/Design:/design-kit](https://codeberg.org/Codeberg/Design/src/branch/master/design-kit). If you could help with LibreJS compatibility in that repo, that would be much appreciated.
yp commented 2 months ago
Poster

I assume you are the reviewer of Codeberg.org?

I'm helping out with the review, but not "the" reviewer :)

Please note as of our Terms of Use, we only allow FSF and OSI approved licenced repositories at the moment (A4 on the wiki page).

Criterion A4 (https://www.gnu.org/software/repo-criteria.html#A4) reads:

Does not permit nonfree licenses (or lack of license) for works for practical use. (A4)

codeberg.org permits "lack of license" as the license field is optional when creating a new repo.

> I assume you are the reviewer of Codeberg.org? I'm helping out with the review, but not "the" reviewer :) > Please note as of our Terms of Use, we only allow FSF and OSI approved licenced repositories at the moment (A4 on the wiki page). Criterion A4 (https://www.gnu.org/software/repo-criteria.html#A4) reads: > Does not permit nonfree licenses (or lack of license) for works for practical use. (A4) codeberg.org permits "lack of license" as the license field is optional when creating a new repo.
Collaborator

We could consider relicensing the code in this repo under GPL, since it's one-way compatible with CC BY-SA.

So we could also relicence the two files under GPL for now and keep the rest CC-BY-SA?

codeberg.org permits "lack of license" as the license field is optional when creating a new repo.

That's not true. Although it's technically possible to create an empty repo, it's of course up to the user to choose a correct licence. Some people like to put licence files differently than creating a Markdown-formatted file, so creating empty repos will always be an option.
You can also push content locally via CLI, so having that option in the GUI does not prevent anyone from pushing unlicenced code, or code licenced in a way that is not considered free software.

But, the Terms of Use clearly reads in section "Service":

For Free and Open Software projects (FOSS) as defined by the Free Software Foundation (FSF) and the Open Source Initiative (OSI), Codeberg provides Repository and Version Control, Wiki, and Issue Tracker hosting under certain terms and conditions
[...]
Our service is open for all projects working under a license compatible with either the Open-Source-License definition of the Free Software foundation (FSF) or the Open Source Initiative (OSI).

and later:

User-contributed content in all repositories, wikis and issue trackers:
[...]

  • must only contain code and data compatible with the Open-Source license requirements defined by FSF or OSI [...]

So every non-free code on our site is a clear violation of our Terms of Service, and since only content compatible with OSI / FSF definitions is accepted, code not covered by a licence violates our ToS, too.

> We could consider relicensing the code in this repo under GPL, since it's one-way compatible with CC BY-SA. So we could also relicence the two files under GPL for now and keep the rest CC-BY-SA? > codeberg.org permits "lack of license" as the license field is optional when creating a new repo. That's not true. Although it's technically possible to create an empty repo, it's of course up to the user to choose a correct licence. Some people like to put licence files differently than creating a Markdown-formatted file, so creating empty repos will always be an option. You can also push content locally via CLI, so having that option in the GUI does not prevent anyone from pushing unlicenced code, or code licenced in a way that is not considered free software. But, the Terms of Use clearly reads in [section "Service"](https://codeberg.org/codeberg/org/src/branch/master/TermsOfUse.md#service): > For Free and Open Software projects (FOSS) as defined by the Free Software Foundation (FSF) and the Open Source Initiative (OSI), Codeberg provides Repository and Version Control, Wiki, and Issue Tracker hosting under certain terms and conditions [...] Our service is open for all projects working under a license compatible with either the Open-Source-License definition of the Free Software foundation (FSF) or the Open Source Initiative (OSI). and [later](https://codeberg.org/codeberg/org/src/branch/master/TermsOfUse.md#repositories-wikis-and-issue-trackers): > User-contributed content in all repositories, wikis and issue trackers: > [...] > - must only contain code and data compatible with the Open-Source license requirements defined by FSF or OSI [...] So every non-free code on our site is a clear violation of our Terms of Service, and since only content compatible with OSI / FSF definitions is accepted, code not covered by a licence violates our ToS, too.
n commented 2 months ago
Collaborator

We could consider relicensing the code in this repo under GPL, since it's one-way compatible with CC BY-SA.

So we could also relicence the two files under GPL for now and keep the rest CC-BY-SA?

Sure, but the Design Kit port is not that far off. I'd rather get LibreJS ready for that instead.

After that we can evaluate seperating code and docs in this repo and then possibly relicensing the code.

> > We could consider relicensing the code in this repo under GPL, since it's one-way compatible with CC BY-SA. > > So we could also relicence the two files under GPL for now and keep the rest CC-BY-SA? Sure, but the Design Kit port is not that far off. I'd rather get LibreJS ready for that instead. After that we can evaluate seperating code and docs in this repo and then possibly relicensing the code.
yp commented 1 month ago
Poster

The new halfmoon frame files are under Codeberg/Design:/design-kit. If you could help with LibreJS compatibility in that repo, that would be much appreciated.

@n Not sure how much I can help but I'll take a look.

> The new halfmoon frame files are under Codeberg/Design:/design-kit. If you could help with LibreJS compatibility in that repo, that would be much appreciated. @n Not sure how much I can help but I'll take a look.

Hey there, this is the guy who wrote those two scripts and caused all that trouble 🙈
First of all, I'm very sorry for that!

Of course, I don't want the licensing of those two tiny JavaScript files to be an obstacle for the further improvement of Codeberg's Documentation. So as far as I'm concerned, I'm fine with you (the maintainers of this repository) relicensing my source code contributions to this repository to another FOSS license, as you see fit. 🙂

Hey there, this is the guy who wrote those two scripts and caused all that trouble 🙈 First of all, I'm very sorry for that! Of course, I don't want the licensing of those two tiny JavaScript files to be an obstacle for the further improvement of Codeberg's Documentation. So as far as I'm concerned, I'm fine with you (the maintainers of this repository) relicensing my source code contributions to this repository to another FOSS license, as you see fit. 🙂

And, by the way, if issues like this arise, feel free to send me an email or to @ me. :-) While I'm no longer an active contributor to this repository, I'm always happy to answer questions and to clarify issues that I may have left undocumented.

And, by the way, if issues like this arise, feel free to send me an email or to @ me. :-) While I'm no longer an active contributor to this repository, I'm always happy to answer questions and to clarify issues that I may have left undocumented.
fnetX removed a dependency 6 days ago
Collaborator

@n I suppose the dependency was meant the other way, this issue depends on the design kit migration?

@n I suppose the dependency was meant the other way, this issue depends on the design kit migration?
n added a new dependency 6 days ago
n commented 6 days ago
Collaborator

@fnetX That's right, thanks for spotting. Now it's being worked on at Codeberg/Design#35.

@fnetX That's right, thanks for spotting. Now it's being worked on at Codeberg/Design#35.
n closed this issue 2 days ago
n commented 2 days ago
Collaborator

@yp The docs is now LibreJS compliant.

@yp The docs is now LibreJS compliant.
yp commented 2 days ago
Poster

Awesome, thanks a lot for following up and fixing the issue!

Awesome, thanks a lot for following up and fixing the issue!
Sign in to join this conversation.
No Milestone
No Assignees
4 Participants
Notifications
Due Date

No due date set.

Depends on
Loading…
There is no content yet.