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

Publish on F-Droid #3

Closed
linsui opened this issue Apr 1, 2021 · 25 comments
Closed

Publish on F-Droid #3

linsui opened this issue Apr 1, 2021 · 25 comments

Comments

@linsui
Copy link

linsui commented Apr 1, 2021

Hi, I'm a contributor of F-Drdoid and I'm working on build your app with F-Droid's toolchain and publish it. There is a metadata in F-Droid'repo but it doesn't work. Since it's submitted to F-Droid long ago and never built, I don\t know if you support the inclusion.

So hereby I want to ask for your permission. And if you support the inclusion, could you please help me build it? Thanks!

@benibela
Copy link
Owner

benibela commented Apr 3, 2021

So hereby I want to ask for your permission. And if you support the inclusion,

Yes. I had submitted it there myself. But I was told, it could not be included, because it depended on Lazarus, and that is too big for the build server

So meanwhile, I have changed it to not depend on Lazarus anymore, although I had no time to update the build script

could you please help me build it?

You can follow the Travis script and line 101. The hardest part is perhaps installing FreePascal like that.

And the log contains the params for calling FreePascal for arm, line 30267ff

@linsui
Copy link
Author

linsui commented Apr 3, 2021

Thanks! I'll have a try.

@benibela
Copy link
Owner

benibela commented Sep 5, 2021

How is it going?

@linsui
Copy link
Author

linsui commented Sep 14, 2021

Sorry, I didn't make it work and haven't found time to try it again.

@benibela
Copy link
Owner

well, if anyone wants to try again, here are tutorials on how to set up FreePascal:

https://wiki.freepascal.org/Android

https://wiki.freepascal.org/Android_Build_APK (videlibri does not need the aapl/javac steps)

https://wiki.freepascal.org/LAMW_on_Linux (videlibri does not need the lazarus steps)

https://wiki.freepascal.org/fpcupdeluxe (GUI installer)

@IzzySoft
Copy link

If you could provide the APK file (ideally attached to its tag at releases/) and it's not beyond the size of 30M, I could offer to take the app into my repo until the listing at F-Droid.org succeeds.

@benibela
Copy link
Owner

benibela commented Jun 22, 2022

I always upload the apk on Sourceforge: https://sourceforge.net/projects/videlibri/files/VideLibri/

Over the last weeks I have set up automated building on Github Actions. Now there is always an (unsigned) apk for the most recent commit, like https://github.com/benibela/videlibri/actions/runs/2523765414

@IzzySoft
Copy link

Hm, I'd need a signed APK. And my updater doesn't work with SF; it only supports Codeberg, GitLab and Github.

@benibela
Copy link
Owner

now it is signed

@IzzySoft
Copy link

Thanks, but still only via SF, right? As pointed out, my framework does not support SF so I cannot pick it from there automatically – which means updates will be missed or at best much delayed if I'd have to check manually – apart from the fact that I lack the time for "manual hunting". Is there a chance you can make it available here, as described above?

@benibela
Copy link
Owner

It is in the Github Action artifacts.

It should be copied to the releases automatically. Probably it happens on the next tagging

@IzzySoft
Copy link

Ah, I see. Can you send me a ping when that happens? Then I can see if I can pick it up.

@jugendhacker
Copy link

@benibela could you please confirm, I still need FreePascal to build the whole app right?

@benibela
Copy link
Owner

could you please confirm, I still need FreePascal to build the whole app right?

yes. not just FreePascal, but FreePascal 3.2.3.

@benibela
Copy link
Owner

Ah, I see. Can you send me a ping when that happens? Then I can see if I can pick it up.

@IzzySoft now it is there

@IzzySoft
Copy link

Ah, that was a close call – managed to integrate it seconds before the update process started 😄 So in about half an hour, your app will become available here.

Please leave this issue open: my repo is just a "pre-stage". All looks fine going by my scanner's results – so once the building issues have been solved, inclusion at F-Droid can be tackled. When that's done and your app is listed at F-Droid.org, I usually remove it from my repo again about 10 days later – unless being asked explicitly to keep it (for whatever reason). So just let me know in time if you want it to stay there. Should you need some background, you can find it in this FAQ.

@IzzySoft
Copy link

Just wondering: as you're using ACRA, have you made sure it's explicitly set to opt-in? By default, if not explicitly told otherwise, it will be sending silent reports without asking the users' consent.

@benibela
Copy link
Owner

Yes, it uses the dialog

@IzzySoft
Copy link

IzzySoft commented Jul 29, 2022

Thanks! I hope I read that correctly as "the dialog, only the dialog and nothing but the dialog"? 🙈 Then let me whitelist ACRA for your app.

PS: MaintainerNote added: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/11474

@benibela
Copy link
Owner

I hope I read that correctly as "the dialog, only the dialog and nothing but the dialog"?

of course

PS: MaintainerNote added: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/11474

ty. looks like it is now live in the real f-droid.

I have been getting a lot of ACRA reports now. How do I know if they are from fdroid or the google app store version?.

With NDK 21 it does not run on Android older than 6 due to android/ndk#964

Perhaps everything works with NDK 19

@IzzySoft
Copy link

ty. looks like it is now live in the real f-droid.

It is. And usually, around 10 days later to give it some overlap, I'd remove it from my repo unless explicitly requested otherwise. That OK with you, or would you prefer I kept it? For some background, see here.

How do I know if they are from fdroid or the google app store version?

Sorry, I cannot tell. You'd need to include some hints if you need to know, e.g. the signature hash. I'm no Android dev, so I cannot really answer this (or the remaining 2 questions).

@benibela
Copy link
Owner

benibela commented Aug 7, 2022

And usually, around 10 days later to give it some overlap, I'd remove it from my repo unless explicitly requested otherwise. That OK with you, or would you prefer I kept it?

Perhaps let it there to see how stable the github built vesion is. Eventually, I want to replace the app store version with the github version

Sorry, I cannot tell. You'd need to include some hints if you need to know, e.g. the signature hash. I'm no Android dev, so I cannot really answer this (or the remaining 2 questions).

The NDK probably needs ndk: r19c in the yml

@IzzySoft
Copy link

IzzySoft commented Aug 7, 2022

Perhaps let it there to see how stable the github built vesion is. Eventually, I want to replace the app store version with the github version

OK, I've set it to stay.

The NDK probably needs ndk: r19c in the yml

You're welcome to try: just open a corresponding MR at fdroiddata and se what results the CI yields. If the build succeeds, there should be an unsigned APK you can pull, self-sign and test it it works as expected. If it does, please include a hint with MaintainerNotes (in the YAML) why the NDK needs to be "lowered".

@benibela
Copy link
Owner

benibela commented Aug 7, 2022

I tried. An MR apparently needs a fork. I once sent an MR, so I already had a fork, but Gitlab said I cannot edit the file because it is not in my fork (because the fork is too old). So I deleted the fork to make a new one.
Now it says, I cannot edit the file, "You are not allowed to push into this branch".
I should edit it in my fork, but it says I cannot open the fork because it has been deleted.
I should click the fork button to make a new fork, but it only wants to open the old one and then fails because it has been deleted:
grafik

perhaps it needs a few hours to sync itself

@IzzySoft
Copy link

IzzySoft commented Aug 7, 2022

You are not allowed to push into this branch

master/main is usually protected. But in your own fork, you're the owner and should be able to.

The other part is strange: no, it shouldn't take hours. Does it let you use a different name for your fork? Then you could try that. Apart from this, it's always preferable to use a local clone, gives you much more flexibility (and you avoid running into several issues with GitLab's built-in editor). So say you created a fork benibela/fdroiddata, the next steps would be, locally on your machine:

# clone the fork
git clone git@gitlab.com:benibela/fdroiddata
# add the upstream repo so you can fetch updates
cd fdroiddata
git remote add upstream git@gitlab.com:fdroid/fdroiddata.git
# check out a new branch to work on
git checkout -b videlibre-ndk
# now make the changes
cd metadata
vi de.benibela.videlibri.yml
# and check them in when done
git add de.benibela.videlibri.yml
git commit de.benibela.videlibri.yml
git push origin videlibre-ndk
# the output will now include a link to let you open a merge request.
# ...
# outdated? Simply refresh and (optionally) update your fork at GitLab:
git checkout master
git pull upstream master
git push origin master
# get rid of old branches. If you set them to be deleted when your MR was merged (I usually do), git lets you list obsolete ones:
git fetch --prune origin
git branch -d videlibre-ndk

That way you won't need to create new forks everytime – you can easily refresh your own.

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

4 participants