martinstoeckli / SilentNotes

SilentNotes is a simple note taking app which respects your privacy.
https://www.martinstoeckli.ch/silentnotes
Mozilla Public License 2.0
223 stars 35 forks source link

Publish on F Droid #54

Open alexanderadam opened 4 years ago

alexanderadam commented 4 years ago

It would be great if SilentNotes could be published on F-Droid although I have the feeling that building .NET applications could be a problem for them (at least it is in issue 114 and on keepass2android).

Until then @IzzySoft could take it his repo though.

IzzySoft commented 4 years ago

Could I? Or did I about a year ago? :smile:

martinstoeckli commented 4 years ago

I would really like the idea to have SilentNotes on f-droid, unfortunately f-droid can currently not host projects written in C#, I used this language so SilentNotes can be compiled cross-platform with a single code base. Hope one day I can include the app there.

IzzySoft commented 4 years ago

@martinstoeckli if you wish you can use this badge to point to my repo for downloads:

Also mentioned here as "free to use for this purpose" – until your app can get into f-droid.org and you certainly wish to point there instead.

martinstoeckli commented 4 years ago

@IzzySoft - Great, I just added the badge/link on my homepage, it looks fine.

IzzySoft commented 4 years ago

Cool, thanks! :smiley:

alexanderadam commented 4 years ago

Awesome @IzzySoft! :+1: But it would still be great if this app could make it into the official repos, though… :wink:

IzzySoft commented 4 years ago

Sure! If Martin concurs, just go ahead and start a RFP :smiley:

alexanderadam commented 4 years ago

I did. But this issue here should be reopened until it is resolved, right? It might be dependent from that upstream issue but there's no reason to close it because it's valid but not resolved, right?

IzzySoft commented 4 years ago

Thanks Alex! I concur (my repo is a stepping-stone to the goal but not the goal itself), but that decision is up to Martin.

martinstoeckli commented 4 years ago

@alexanderadam thank you very much for your efforts, as far as I understood, one can only upload applications which can be built on their Unix servers, and so far it seems not possible for DotNet projects. But let's wait and see... If this should work, I still would like to have a copy in @IzzySoft repository, it's not only a stepping stone for me.

IzzySoft commented 4 years ago

@martinstoeckli cannot hurt to have the RFP ready and waiting. And sure I happily keep your app in my repo, to give people a choice! I just usually remove apps from mine once they pop up at f-droid.org to avoid "signature confusion". But then, people only get "update recommendations" for matching ones, so that's not too big an issue. There are others keeping it that way (e.g. FairEMail).

alexanderadam commented 4 years ago

as far as I understood, one can only upload applications which can be built on their Unix servers

That's true

[…] and so far it seems not possible for DotNet projects

Are you sure about that?

IMHO Microsoft tries to keep away-moving developers by creating compatibilities between their tooling and nix ones. Mono and .NET Core are available for Linux too. Projects like [Xamarin are running on nix as well](https://github.com/xamarin/xamarin-android/blob/master/Documentation/workflow/UsingYourBuild.md#linux-and-macos-system-wide-installation) and there are pretty good explanations out there, how to develop under GNU/Linux.

Furthermore @borishonman created some documentation how to add support for F-Droid (at least for Xamarin).

IzzySoft commented 3 years ago

Looks like the APK for v5.5.2 just changed the timestamp but is still v5.5.1: LAST_MODIFIED matches the release date, but my updater complains the file is the same we have from February. Could you please check what you placed at https://www.martinstoeckli.ch/silentnotes/ch.martinstoeckli.silentnotes.apk, @martinstoeckli?

martinstoeckli commented 3 years ago

@IzzySoft - Thanks for the note, it's true an old version was uploaded (compiled on a new computer...), should be fixed now. Updated the fastlane files as well.

IzzySoft commented 3 years ago

Thanks! Confirmed: my updater accepts the file as versionCode 41. Will show up in my repo with the next sync in about 15.5h then.

IzzySoft commented 3 years ago

Urgs… Now the update shows up, and I receive a warning: the new version added GMS – which means for my repo, I have to add the NonFreeDep Anti-Feature, plus your app would not be eligible for F-Droid anymore. Was that intended – or did "the cat drag it in" (some other dependency had it as dependency, and it sneaked in unnoticed)?

martinstoeckli commented 3 years ago

@IzzySoft - Oh my, no I just double checked, there are no new dependencies in the projects between 5.5.0 and 5.5.2. It must be the framework itself, probably new versions of either the Xamarin or the Mono libraries. This would be bad news for all DotNet projects I suppose.

IzzySoft commented 3 years ago

Thought so :cry: I've no idea about mono, manda… ahem, xamarin etc – but I guess they will have some way of showing a dependency tree as well (if you know which, please tell me!). The ones I know are Gradle, Flutter and NPM:

martinstoeckli commented 3 years ago

@IzzySoft - Just released a new version 5.6.0 and updated all dependencies and NuGet packages in the hope this could make a difference. There is a large list of dlls involved, managed und native ones, I'm not sure how I could find the one referring to GMS.

IzzySoft commented 3 years ago

As I wrote, I don't know either. All I know of finding dependencies is listed in my previous comment. Your download URL still provides v5.5.2. Funny, checking it with my library scanner directly, I don't see GMS – so it must have been found in one of the obfuscated libs (I see 3 such entries in the smali code, named crc<hexcode>) by LibRadar. Do you have some obfuscation enabled, eg with Proguard or something similar?

martinstoeckli commented 3 years ago

Sorry, I'm still publishing to the various targets, the version on SilentNotes homepage should now be updated. No, ProGuard is deactivated, the r8 code shrinker is used. Will search for this crc entries thanks.

IzzySoft commented 3 years ago

Thanks! Fetched it and added it manually – still shows GMS. confirmed that comes from LibRadar (ran that manually to extract its results). Here's the offending entry:

   {
      "sp" : "mono/com/google/android/gms/maps",
      "ch" : "https://developers.google.com/android/reference/com/google/android/gms/package-summary",
      "csp" : "mono/android/os/",
      "cpn" : "mono/android/os/",
      "bh" : 15300,
      "pn" : "com/google/android/gms/",
      "p" : [],
      "dn" : 705,
      "tp" : "Development Framework",
      "lib" : "Google Mobile Services",
      "btn" : 5,
      "btc" : 45
   },

pn is the packageName it gets mapped to, hence it shows up as GMS. sp is the simplified path of the library that triggered it – so it's some Mono library using Google Maps it seems. cpn should be the callingPackageName if I got that right (I never fully understood the internals of LibRadar). For completeness, here are

the other keys
"btn": BTotalNumber
"p": Permissions used
"tp": library type
"cpn": ?(calling packageName?)
"lib": Library
"bh": B_Hash
"dn": Repetitions
"csp": current SPath
"btc": BTotalCall
"ch": WebLink
"sp": Simplified Path
"pn": Package Name

Does that ring any bell with you? I've searched the entire mono/ tree, but could not find any clue. True, mono/android/os/ exists – but nothing in there suggests a need for maps.

IzzySoft commented 3 years ago

Looks like you forgot to increase the versionCode before building the latest APK. My updater just reported

Binary files /web/ftp/repo/fdroid/repo/ch.martinstoeckli.silentnotes_45.apk and /web/ftp/repo/fdroid/repo/ch.martinstoeckli.silentnotes_1627222381.apk differ

which means there was an APK already present with the very same versionCode. So this one won't be offered as update to existing users, manual update would need to be forced. Just to let you know, @martinstoeckli :wink:

martinstoeckli commented 3 years ago

Sorry to give you troubles, but this time I think it is correct. I published a pre version only on my homepage for a user (version 5.8.1 / 45), so it can be tested. Today I published the finished apk with the same version information and uploaded it to the Android and Microsoft store and to the homepage, and updated the fastlane structure and created a new release on GitHub. In future I will create a separate link for test versions if that leads to problems with your repo. Sorry I didn't expect that.

IzzySoft commented 3 years ago

Urn, well… Please remember that that specific URL is checked by my updater. So when it pulled 45, Fastlane was not ready. Not sure if it checked fastlane now as 45 was already there (it should, though, as the APK was not identical). At least those who updated to the "temporary version" will not necessarily need the "final one" if the differences are not too big (some must be there as the APKs differed). Good to know all seems fine, except for a minor confusion :smile:

In future I will create a separate link for test versions if that leads to problems with your repo.

Much appreciated, thanks! Nasty side-effects :stuck_out_tongue_closed_eyes: