wallabag / android-app

Android application to read your articles saved in your wallabag. You can also easily add new articles.
https://www.wallabag.org
GNU General Public License v3.0
462 stars 260 forks source link

F-Droid issue: The greendao gradle plugin is not FOSS #1399

Closed linsui closed 2 months ago

linsui commented 2 months ago

Issue details

Since https://github.com/wallabag/android-app/commit/f8493cc65fe566326ae557780b1ef63da72adf1d the greendao generator is replaced with the gradle plugin. But the source code of the plugin is never released, see https://github.com/greenrobot/greenDAO/issues/412. So F-Droid has to remove all affected versions of wallabag and can't build new versions. Is that possible to migrate to a different FOSS lib, since greendao is not maintained anymore? Please note that objectbox is not FOSS yet, see https://github.com/objectbox/objectbox-java/issues/1102.

Strubbl commented 2 months ago

https://github.com/breezy-weather/breezy-weather/issues/677 mentions three alternatives. That's a lot of work i fear

linsui commented 2 months ago

Is it possible to switch back to the generator?

Strubbl commented 2 months ago

Is it possible to switch back to the generator?

I do not think so. It says in the documentation, that this it's the legacy greenDAO generator. This does not sound future-proof. Or are there any other projects which made this change because it's easy? I do not know.

linsui commented 2 months ago

This does not sound future-proof.

The whole greendao is not maintained anymore so the gradle plugin is not future-proof, either. :)

Strubbl commented 2 months ago

Yes, of course. But intentionally working on moving to sth. not maintained anymore makes no sense.

linsui commented 2 months ago

Yes. Some other apps moved to SQLDelight.

di72nn commented 2 months ago

I haven't looked into different DB libraries yet, but as a temporary measure the 9 generated source files can be just copied into the main code base and the plugin removed.

(The old non-plugin way to generate DAO-classes seems to be deprecated in greendao 3, so there's no official up-to-date guide to set it up.)

If this is acceptable, I can create a PR.

Strubbl commented 2 months ago

From the description of the original issue, i think this should be acceptable.

linsui commented 2 months ago

The generated code is not regarded as source code and the license may be problemic since it's generated by a non-free plugin.

di72nn commented 2 months ago

@linsui this is generated source code (not blobs). Are you sure we're on the same page here?

linsui commented 2 months ago

Yes, I discussed this with other F-Droid contributors. We thought that the generated code should be avoided, especially when it's generated by a non-free tool.

tcitworld commented 2 months ago

It would be nice to have a proper position here (not just "should be avoided"), and something written on the Inclusion policy page about this. Do you know of previous discussions on the topic that are public somewhere?

I think it would be odd to have such a policy that would reject such generated code. A lot of IDEs (including proprietary ones) have tools to generate code (for instance, generate all getters and setters in a class based on the properties), there's not much difference here.

Unless you think there is a risk that GreenDAO comes and claims the generated code as their own, there's nothing that prevents us from claiming the generated source code as written by ourselves, and licence it as we wish.

jspricke commented 2 months ago

@tcitworld the question is where to edit the source code, as in:

The “source code” for a work means the preferred form of the work for making modifications to it.

https://www.gnu.org/licenses/gpl-3.0.html

tcitworld commented 2 months ago

The above linked PR is about making this generated source code a part of the repository just like regular source code, which would then be edited manually, as the GreenDAO plugin would be gone.

linsui commented 2 months ago

The above linked PR is about making this generated source code a part of the repository just like regular source code, which would then be edited manually, as the GreenDAO plugin would be gone.

This sounds good to us. :) Could you please remove those

THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

comments?

tcitworld commented 2 months ago

2.5.3 has been tagged with the greendao plugin removed.

linsui commented 2 months ago

I'll update the metadata. :) Thanks!

linsui commented 1 month ago

The source code of the plugin has been published. The workaround can be reverted. https://github.com/greenrobot/greenDAO-plugin