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

Research process of publishing to F-Droid #8512

Closed
jakubgs opened this issue Jul 1, 2019 · 205 comments
Closed

Research process of publishing to F-Droid #8512

jakubgs opened this issue Jul 1, 2019 · 205 comments
Assignees

Comments

@jakubgs
Copy link
Member

jakubgs commented Jul 1, 2019

Due to amazing work by @pombeirp on the feature/nix-gradle-and-mobile-node2nix branch we now have a working deterministic build of the Android app.

In order to finally close #1125 I will need to research the exact process of submitting the app.

@jakubgs jakubgs self-assigned this Jul 1, 2019
@jakubgs
Copy link
Member Author

jakubgs commented Jul 1, 2019

There's already a Nix package for fdroidserver tools:

https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/fdroidserver/default.nix

"Server and tools for F-Droid, the Free Software repository system for Android";

@jakubgs
Copy link
Member Author

jakubgs commented Jul 1, 2019

Looks like the basic step is just running this in fdroiddata repo:

fdroid import --url=https://github.com/status-im/status-react --subdir=android/app

Which in turn generates a metadata/im.status.ethereum.yml file:

License: Unknown
SourceCode: https://github.com/status-im/status-react
IssueTracker: https://github.com/status-im/status-react/issues

RepoType: git
Repo: https://github.com/status-im/status-react

Builds:
  - versionName: Unknown
    versionCode: 0
    disable: Generated by import.py - check/set version fields and commit id
    commit: '?'
    subdir: android/app
    gradle:
      - yes
    buildjni:
      - yes

AutoUpdateMode: None
UpdateCheckMode: Tags

Which doesn't look very impressive. But it's a start.

@jakubgs
Copy link
Member Author

jakubgs commented Jul 1, 2019

We can see an example of this file for an existing similar project here:
https://gitlab.com/fdroid/fdroiddata/blob/master/metadata/org.walleth.yml

@jakubgs
Copy link
Member Author

jakubgs commented Jul 1, 2019

Christ, since the usually used repo for Java 8 has been discontinued:
https://launchpad.net/~webupd8team/+archive/ubuntu/java
I'm trying the AWS alternative - Corretto:
https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/generic-linux-install.html

 $ java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment Corretto-8.212.04.2 (build 1.8.0_212-b04)
OpenJDK 64-Bit Server VM Corretto-8.212.04.2 (build 25.212-b04, mixed mode

Seems to be working fine with sdkmanager.

@jakubgs
Copy link
Member Author

jakubgs commented Jul 1, 2019

There is a command to attempt to build you app through fdroid but that would require at least one version to be defined in the metadata/im.status.ethereum.yml file:

fdroid build --latest --verbose --test im.status.ethereum

@jakubgs
Copy link
Member Author

jakubgs commented Jul 1, 2019

The fdroid import command sometimes fails with a ridiculously unrelated error:

 $ fdroid import --url=https://github.com/status-im/status-react --subdir=android/app --categories=Money --license=MPL-2.0
WARNING: No 'config.py' found, using defaults.
CRITICAL: 'bc1qu482c0tngkcvx3q7mrm8zmuldrh2f2lrh26ym0' is not a valid Bitcoin address in org.projectmaxs.main. Regex pattern: ^[a-zA-Z0-9]{27,34

Trace:

Traceback (most recent call last):
  File "/usr/bin/fdroid", line 170, in <module>
    main()
  File "/usr/bin/fdroid", line 146, in main
    mod.main()
  File "/usr/lib/python3/dist-packages/fdroidserver/import.py", line 219, in main
    apps = metadata.read_metadata()
  File "/usr/lib/python3/dist-packages/fdroidserver/metadata.py", line 814, in read_metadata
    check_metadata(app)
  File "/usr/lib/python3/dist-packages/fdroidserver/metadata.py", line 493, in check_metadata
    v.check(app[k], app.id)
  File "/usr/lib/python3/dist-packages/fdroidserver/metadata.py", line 434, in check
    .format(value=v, field=self.name, appid=appid, pattern=self.matching))
  File "/usr/lib/python3/dist-packages/fdroidserver/metadata.py", line 45, in warn_or_exception
    raise MetaDataException(value)
fdroidserver.exception.MetaDataException: 'bc1qu482c0tngkcvx3q7mrm8zmuldrh2f2lrh26ym0' is not a valid Bitcoin address in org.projectmaxs.main. Regex pattern: ^[a-zA-Z0-9]{27,34}$

@jakubgs
Copy link
Member Author

jakubgs commented Jul 9, 2019

Looks like I got that wrong. You are supposed to run this in the clone of fdroidclient repo.

~/soft/fdroidclient master ⇣
 lilim > fdroid import --url=https://github.com/status-im/status-react --subdir=android/app --categories=Money --license=MPL-2.0 --verbose
WARNING: No 'config.py' found, using defaults.
INFO: Getting source from git repo at https://github.com/status-im/status-react
DEBUG: > git -c core.askpass=/bin/true -c core.sshCommand=/bin/false -c url.https://.insteadOf=ssh:// -c url.https://u:p@bitbucket.org/.insteadOf=git@bitbucket.org: -c url.https://u:p@bitbucket.org.insteadOf=git://bitbucket.org -c url.https://u:p@bitbucket.org.insteadOf=https://bitbucket.org -c url.https://u:p@github.com/.insteadOf=git@github.com: -c url.https://u:p@github.com.insteadOf=git://github.com -c url.https://u:p@github.com.insteadOf=https://github.com -c url.https://u:p@gitlab.com/.insteadOf=git@gitlab.com: -c url.https://u:p@gitlab.com.insteadOf=git://gitlab.com -c url.https://u:p@gitlab.com.insteadOf=https://gitlab.com clone -- https://github.com/status-im/status-react tmp/importer
Cloning into 'tmp/importer'...
DEBUG: Directory: tmp/importer
DEBUG: > git rev-parse --show-toplevel
DEBUG: Directory: tmp/importer
DEBUG: > git checkout -f origin/HEAD
DEBUG: Directory: tmp/importer
DEBUG: > git clean -dffx
DEBUG: Parsing manifest at 'tmp/importer/android/app/src/main/AndroidManifest.xml'
DEBUG: ..got package=im.status.ethereum, version=None, vercode=None
DEBUG: Parsing manifest at 'tmp/importer/android/app/build.gradle'
DEBUG: ..got package=im.status.ethereum, version=None, vercode=None
WARNING: Couldn't find latest version code
INFO: Wrote metadata/im.status.ethereum.yml

@jakubgs
Copy link
Member Author

jakubgs commented Jul 9, 2019

The next step is to define the build steps necessary to build our App on the F-Droid build farms:
https://f-droid.org/en/docs/Building_Applications
https://f-droid.org/en/docs/Build_Metadata_Reference

@jakubgs
Copy link
Member Author

jakubgs commented Jul 9, 2019

So the build steps are defined in the YAML meta file that is initially generated by fdroid import. Inside of that file various keys are set to define the build process.

There's something called prebuild:

Specifies a shell command (or commands - chain with &&) to run before the build takes place. Backslash can be used as an escape character to insert literal commas, or as the last character on a line to join that line with the next. It has no special meaning in other contexts; in particular, literal backslashes should not be escaped.
The command runs using bash.
Note that nothing should be built during this prebuild phase - scanning of the code and building of the source tarball, for example, take place after this. For custom actions that actually build things or produce binaries, use ’build’ instead.

And for build:

As for ’prebuild’, but runs during the actual build phase (but before the main Ant/Maven build). Use this only for actions that do actual building. Any prepartion of the source code should be done using ’init’ or ’prebuild’.
Any building that takes place before build will be ignored, as either Ant, mvn or gradle will be executed to clean the build environment right before build (or the final build) is run.

This seems to indicate that you can only build using Ant, Maven, or Gradle.

@jakubgs
Copy link
Member Author

jakubgs commented Jul 9, 2019

There is gradle key:

gradle: <flavour1>[,<flavour2>,...]
Build with Gradle instead of Ant, specifying what flavours to use. Flavours are case sensitive since the path to the output apk is as well.
If only one flavour is given and it is ’yes’, no flavour will be used. Note that for projects with flavours, you must specify at least one valid flavour since ’yes’ will build all of them separately.

Which seems to indicate not Gradle buildTypes, but productFlavors:
https://developer.android.com/studio/build/build-variants#product-flavors
Of which we don't seem to have any defined in our android/app/build.gradle.
Not sure which build type fdroid build would make if we have no flavors defined.

There is also:

gradleprops: <prop1>[,<prop2>,...]
List of Gradle properties to pass via the command line to Gradle. A property can be of the form foo or of the form key=value.
For example: gradleprops=enableFoo,someSetting=bar will result in gradle -PenableFoo -PsomeSetting=bar.

@jakubgs
Copy link
Member Author

jakubgs commented Jul 9, 2019

Not sure what this one affects in Gradle but it might be build type:

target: <target>
Specifies a particular SDK target for compilation, overriding the value defined in the code by upstream. This has different effects depending on what build system used — this flag currently affects Ant, Maven and Gradle projects only. Note that this does not change the target SDK in the AndroidManifest.xml, which determines the level of features that can be included in the build.

In the case of an Ant project, it modifies project.properties of the app and possibly sub-projects. This is likely to cause the whole build.xml to be rewritten, which is fine if it’s a ’standard’ android file or doesn’t already exist, but not a good idea if it’s heavily customised.

EDIT: Correction, it looks like target refers to targetSdkVersion in Gradle config.

@jakubgs
Copy link
Member Author

jakubgs commented Jul 9, 2019

I'm trying to build it, but I'm getting python errors now:

 $ fdroid build im.status.ethereum
hWARNING: No 'config.py' found, using defaults.
INFO: Using git version 2.20.1
INFO: Building version 0.13 (2019070916) of im.status.ethereum
INFO: Getting source for revision 0.13.0-mobile
INFO: Creating local.properties file at build/im.status.ethereum/local.properties
INFO: Creating local.properties file at build/im.status.ethereum/android/local.properties
INFO: Creating local.properties file at build/im.status.ethereum/android/app/local.properties
INFO: Cleaned build.gradle of keysigning configs at build/im.status.ethereum/android/app/build.gradle
INFO: Cleaning Gradle project...
ERROR: Could not build app im.status.ethereum: OSError while trying to execute /usr/lib/python3/dist-packages/gradlew-fdroid clean: [Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/gradlew-fdroid': '/usr/lib/python3/dist-packages/gradlew-fdroid'
INFO: Build for app im.status.ethereum failed:
OSError while trying to execute /usr/lib/python3/dist-packages/gradlew-fdroid clean: [Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/gradlew-fdroid': '/usr/lib/python3/dist-packages/gradlew-fdroid'
INFO: Finished
INFO: 1 build failed

@jakubgs
Copy link
Member Author

jakubgs commented Jul 9, 2019

It doesn't matter if I install fdroidserver with APT of with PIP, it fails with the same nonsense error.

According to the instructions the APT way is the way to go:
https://f-droid.org/en/docs/Installing_the_Server_and_Repo_Tools/

@jakubgs
Copy link
Member Author

jakubgs commented Jul 9, 2019

I tried running the build with:

prebuild: 'curl https://nixos.org/nix/install | sh'

And it did run, but then fails with:

...
installing 'nix-2.2.2'
building '/nix/store/5qjkri2jrxqsly68q9n2qh95xk5j06g1-user-environment.drv'...
created 141 symlinks in user environment
Segmentation fault
==== detail end ====
INFO: Finished
INFO: 1 build failed

Which makes no fucking sense, because the nix installation succeeded just fine.

But when I re-run it it works fine...

@jakubgs
Copy link
Member Author

jakubgs commented Jul 9, 2019

Looks like something like this works:

Builds:
  - versionName: '0.13'
    versionCode: 2019070916
    commit: '0.13.0-mobile'
    #subdir: android/app
    gradle:
      - yes
    buildjni: no
    init: |
      curl https://nixos.org/nix/install | sh
    prebuild: |
      . ~/.nix-profile/etc/profile.d/nix.sh && \
      nix-build --no-out-link '<nixpkgs>' -A glibcLocales && \
      nix-shell --run 'bundle install --gemfile=fastlane/Gemfile --quiet'

But it fails with the python errors when it gets to the build step.

@licaon-kter
Copy link

For readability...

 init:
   - curl https://nixos.org/nix/install | sh
 prebuild:
   - . ~/.nix-profile/etc/profile.d/nix.sh
   - nix-build --no-out-link '<nixpkgs>' -A glibcLocales
   - nix-shell --run 'bundle install --gemfile=fastlane/Gemfile --quiet'

@jakubgs
Copy link
Member Author

jakubgs commented Jul 11, 2019

Oh nice, I didn't know this was also a valid format, the manual stated that:

or commands - chain with &&

Thanks @licaon-kter!

@jakubgs
Copy link
Member Author

jakubgs commented Jul 17, 2019

So the list syntax does work, but I'm getting some Nix target errors which makes no sense to me:

Builds:
  - versionName: 'develop'
    versionCode: 9999
    commit: 'develop'
    #subdir: android/app
    buildjni: no
    gradle:
      - yes
    init:
      # Install Nix
      - curl https://nixos.org/nix/install | sh
      # Source Nix environment
      - . ~/.nix-profile/etc/profile.d/nix.sh
    prebuild:
      # Install required Gems
      - nix-shell -A targets.mobile.fastlane.shell --run 'bundle install --gemfile=fastlane/Gemfile --quiet' ./default.nix

And I'm running:

fdroid build im.status.ethereum:9999 -v -l

But I'm getting something weird:

+ nix-shell -A targets.mobile.fastlane.shell --run 'bundle install --gemfile=fastlane/Gemfile --quiet' ./default.nix
error: value is null while a set was expected, at /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/pkgs/top-level/default.nix:63:5

Which appears to be this:

  # From a minimum of `system` or `config` (actually a target triple, *not*
  # nixpkgs configuration), infer the other one and platform as needed.
  localSystem = lib.systems.elaborate (
    # Allow setting the platform in the config file. This take precedence over
    # the inferred platform, but not over an explicitly passed-in one.
    builtins.intersectAttrs { platform = null; } config
    // args.localSystem);

Not sure what to make of this yet.

@jakubgs
Copy link
Member Author

jakubgs commented Jul 17, 2019

This seems to be related: NixOS/nixpkgs#51858

Full trace:

+ nix-shell --show-trace -A targets.mobile.fastlane.shell --run 'bundle install --gemfile=fastlane/Gemfile --quiet' ./default.nix
error: while evaluating anonymous function at /home/sochan/soft/fdroidclient/build/im.status.ethereum/default.nix:2:1, called from undefined position:
while evaluating the attribute 'pkgs' at /home/sochan/soft/fdroidclient/build/im.status.ethereum/nix/nixpkgs-bootstrap.nix:12:10:
while evaluating anonymous function at /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/pkgs/top-level/impure.nix:15:1, called from /home/sochan/soft/fdroidclient/build/im.status.ethereum/nix/nixpkgs-bootstrap.nix:3:10:
while evaluating anonymous function at /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/pkgs/top-level/default.nix:20:1, called from /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/pkgs/top-level/impure.nix:82:1:
while evaluating anonymous function at /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/pkgs/stdenv/booter.nix:42:1, called from /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/pkgs/top-level/default.nix:100:10:
while evaluating 'dfold' at /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/pkgs/stdenv/booter.nix:60:27, called from /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/pkgs/stdenv/booter.nix:117:4:
while evaluating 'go' at /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/pkgs/stdenv/booter.nix:63:18, called from /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/pkgs/stdenv/booter.nix:72:13:
while evaluating 'imap1' at /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/lib/lists.nix:103:14, called from /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/pkgs/stdenv/booter.nix:78:30:
while evaluating 'reverseList' at /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/lib/lists.nix:380:17, called from /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/pkgs/stdenv/booter.nix:85:6:
while evaluating anonymous function at /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/pkgs/stdenv/default.nix:7:1, called from /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/pkgs/top-level/default.nix:96:12:
while evaluating 'elaborate' at /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/lib/systems/default.nix:18:15, called from /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/pkgs/top-level/default.nix:60:17:
value is null while a set was expected, at /nix/store/q9i5qy8xbp0jy3k34dh794pc8n766nnm-nixpkgs-source/pkgs/top-level/default.nix:63:5

It's almost as if config is passed to the nix-shell invocation as --argstr but it doesn't contain what it needs to contain.

@jakubgs
Copy link
Member Author

jakubgs commented Jul 17, 2019

The apparent fix is to default config to be an empty map:

config ? {}

NixOS/nixpkgs@8789657

But we already set it to a map by default if not set in all Nix files.

@pedropombeiro
Copy link
Contributor

Yeah, that was the reason I started using a default value for config recently.

@jakubgs
Copy link
Member Author

jakubgs commented Jul 25, 2019

This part of the instructions terrifies me:

# Set up Vagrant build box
cd ../fdroidserver
cp ./examples/makebuildserver.config.py ./
./makebuildserver
# Now wait several hours for this to finish

https://f-droid.org/en/docs/Submitting_to_F-Droid_Quick_Start_Guide/

Now wait several hours for this to finish

@jakubgs
Copy link
Member Author

jakubgs commented Jul 25, 2019

I might have to setup a dedicated server for building with fdroid build, I don't want to fill my laptop with garbage that makebuildserver pulls.

@step21
Copy link

step21 commented Jul 25, 2019

before setting up a whole server, maybe something like this can help? https://gitlab.com/fdroid/docker-executable-fdroidserver (though I am not up to date whether this is compatible with reproducible builds and similar stuff)

@jakubgs
Copy link
Member Author

jakubgs commented Jul 25, 2019

Eh, a Docker container? That does sound nice, but I thought that wouldn't work since it wants to use Vagrant. How does it use Vagrant within the container?

But yeah, I do like how isolated a Docker env would be, thanks for the suggestion @step21.

@jakubgs
Copy link
Member Author

jakubgs commented Jul 25, 2019

Btw, that error about error: value is null while a set was expected was due to me using an older version of status-react which didn't have the change that makes config in Nix never null.
Turns out fdroid build didn't fetch newest changes when i changed the commit to just be develop branch.

@jakubgs
Copy link
Member Author

jakubgs commented Jul 25, 2019

I'm still not entirely sure on how the server part ties into F-Droid. My current understanding is that I don't need the server to submit the app, the server is for F-Droid organization to build apps others submit. But I might be wrong.

Also, I'm still not entirely sure what flavour means in gradle: <flavour1>[,<flavour2>,...]. Considering I want to run gradle via Nix I'm hoping I can call a custom build command rather than depending on fdroid calling gradle the right way.

@step21
Copy link

step21 commented Jul 25, 2019

I'm still not entirely sure on how the server part ties into F-Droid. My current understanding is that I don't need the server to submit the app, the server is for F-Droid organization to build apps others submit. But I might be wrong.

Also, I'm still not entirely sure what flavour means in gradle: <flavour1>[,<flavour2>,...]. Considering I want to run gradle via Nix I'm hoping I can call a custom build command rather than depending on fdroid calling gradle the right way.

I just briefly checked the makebuildserver stuff and the docker link. I think you are right, you do not need the buildserver, and anyway it just sets up everything up in vagrant, so it is not necessarily better than a docker image. (though I did not verify if they are roughly the same, as I do not want to install vagrant again...) And the docker link I posted does not run makebuildserver and all that vagrant stuff but just installs froidserver afaict

@jakubgs
Copy link
Member Author

jakubgs commented Feb 23, 2021

Oh, thanks for explaining. I can see it was built successfully here:

image

https://f-droid.org/wiki/page/im.status.ethereum/lastbuild_2021021509

So that bodes well.

@jakubgs
Copy link
Member Author

jakubgs commented Feb 24, 2021

I've thought of a way to make the build definition less verbose - which I should have done earlier - in #11791.

This would make the definition for next version much slimmer:

Builds:
  - versionName: 1.12.0
    versionCode: 2021022512
    commit: 123qwe123qwe123qwe123qwe123qwe123qwe
    sudo: make fdroid-nix-dir
    init: nix/scripts/setup.sh
    output: result/app-release-unsigned.apk
    scanignore:
      - android/build.gradle
    scandelete:
      - ios
    build: make release-fdroid BUILD_NUMBER=$$VERCODE$$

I'm wondering if F-Droid has a policy of not changing previously released versions. If not I guess it's fine as it is.

@licaon-kter
Copy link

We have, we don't modify already built :)

@jakubgs
Copy link
Member Author

jakubgs commented Feb 24, 2021

Okay, I can see a deploy has taken place:
image

And the app page is now available:
https://f-droid.org/en/packages/im.status.ethereum/

But I don't see it anywhere in search results when searching for status or ethereum:
https://search.f-droid.org/?q=status&lang=en
https://search.f-droid.org/?q=ethereum&lang=en

I search indexing done separately? Or is it perhaps clashing with the other app named "Status"?
image

@jakubgs
Copy link
Member Author

jakubgs commented Feb 24, 2021

Ah, but I can see it in the app search:
image

@jakubgs
Copy link
Member Author

jakubgs commented Feb 25, 2021

But the site search still does not return it:

image

@licaon-kter
Copy link

Yeah, search is work in progress both website and in client, things are moving for the better

"status" works but not "Status" :)

@licaon-kter
Copy link

BTW, when will the website be updated with the F-Droid badge too?

@jakubgs
Copy link
Member Author

jakubgs commented Feb 25, 2021

That's already being done as part of #11791.

@licaon-kter
Copy link

I meant on https://status.im :D

@jakubgs
Copy link
Member Author

jakubgs commented Feb 25, 2021

That requires CSS magic, and I don't touch that.

@jakubgs
Copy link
Member Author

jakubgs commented Feb 25, 2021

@jinhojang6 could you take a look at adding an F-Droid download option to our website?

This might be a good opportunity to also refactor out the download badges as a separate partial/template:
https://github.com/status-im/status.im/blob/master/themes/navy/layout/index.ejs#L13-L17

@jakubgs
Copy link
Member Author

jakubgs commented Mar 3, 2021

The new v1.12.0 release has been cut, and this one will try out the new build setup introduced in #11791.

I've built the new release locally and it looks correct:

 > docker run --rm -u $UID:$GID -e USER=vagrant \
  -v $PWD/fdroiddata:/repo \
  -v $PWD/fdroidserver:/fdroidserver \
  statusteam/docker-executable-fdroidserver:latest \
  build im.status.ethereum
2021-03-03 13:25:28,959 WARNING: No config.yml found, using defaults.
2021-03-03 13:25:34,008 INFO: Using git version 2.11.0
2021-03-03 13:25:34,226 INFO: Using git version 2.11.0
2021-03-03 13:25:34,226 INFO: Building version 1.12.0 (2021030313) of im.status.ethereum
...(omitted)...
2021-03-03 13:43:40,950 INFO: success: im.status.ethereum
2021-03-03 13:43:40,951 INFO: Finished
2021-03-03 13:43:40,951 INFO: 1 build succeeded
 > ls -lh fdroiddata/unsigned/im.status.ethereum_2021030313.apk           
-rw-r--r-- 1 sochan sochan 80M Mar  3 14:43 fdroiddata/unsigned/im.status.ethereum_2021030313.apk

So I've created a PR for fdroiddata: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/8489

It's marked as work-in-progress since our release/v1.12.x branch can still receive some patches before final release.

Once this second release goes out successfully we can close this issue.

@jakubgs
Copy link
Member Author

jakubgs commented Mar 3, 2021

This is interesting. When I run lint im.status.ethereum using the Docker image I get nothing:

 > docker run --rm -u $UID:$GID -e USER=vagrant \                          
  -v $PWD/fdroiddata:/repo \
  -v $PWD/fdroidserver:/fdroidserver \
  statusteam/docker-executable-fdroidserver:latest \
  lint im.status.ethereum     
2021-03-03 13:47:33,722 WARNING: No config.yml found, using defaults.

But the PR build job is complaining about my formatting:

image

@jakubgs
Copy link
Member Author

jakubgs commented Mar 3, 2021

My guess would be that the registry.gitlab.com/fdroid/docker-executable-fdroidserver:latest image must be outdated.

@licaon-kter
Copy link

Try fdroid lint -f -v appid

Anyway, run fdroid rewritemeta -v appid just to be sure.

@jakubgs
Copy link
Member Author

jakubgs commented Mar 3, 2021

I tried both and got thing.

@jakubgs
Copy link
Member Author

jakubgs commented Mar 3, 2021

Oh, it looks like the sudo section commands don't run within the repo:

2021-03-03 14:37:15,413 INFO: Building version 1.12.0 (2021030313) of im.status.ethereum
2021-03-03 14:37:15,414 INFO: Running 'sudo' commands in /builds/jakubgs/fdroiddata
2021-03-03 14:37:15,414 DEBUG: > sudo DEBIAN_FRONTEND=noninteractive bash -x -c make fdroid-nix-dir
+ make fdroid-nix-dir
make: *** No rule to make target 'fdroid-nix-dir'.  Stop.
2021-03-03 14:37:15,820 ERROR: Could not build app im.status.ethereum: Error running sudo command for im.status.ethereum:1.12.0

Because it can't find our Makefile that defines fdroid-nix-dir. So I guess I'm forced to create the folder explicitly.

@jakubgs
Copy link
Member Author

jakubgs commented Mar 3, 2021

I guess I could just:

    sudo:
      - cd build/im.status.ethereum
      - make fdroid-nix-dir

But that's not that much less verbose than:

    sudo:
      - mkdir -m 0755 /nix
      - chown vagrant /nix

@jakubgs
Copy link
Member Author

jakubgs commented Mar 5, 2021

Looke like this is still necessary because of ENOSPC errors:

    sudo:
      - sysctl fs.inotify.max_user_watches=524288

@licaon-kter
Copy link

Yeah, a simple search for "node.js ENOSPC" popups a lot of results 🤷

@jakubgs
Copy link
Member Author

jakubgs commented Mar 5, 2021

I think it might make sense to do:

    sudo:
      - cd build/im.status.ethereum
      - make fdroid-build-env

With targets I've added in #11845.
This way the purpose is self-explanatory via the targets themselves, and it's more concise.

Unless you have some reservations @licaon-kter.

@jakubgs
Copy link
Member Author

jakubgs commented Mar 17, 2021

The 1.12.0 has been released: https://f-droid.org/packages/im.status.ethereum/

image

And I've merged the last update to F-Droid docs in #11845 and I consider this done.

I have opened a separate issue for possible F-Droid auto-updates: #11896

@jakubgs jakubgs closed this as completed Mar 17, 2021
@licaon-kter
Copy link

Hope I didn't merge too early :)

@jakubgs
Copy link
Member Author

jakubgs commented Mar 17, 2021

It's fine. We're coming out with 1.12.1 soonish.

@QGB
Copy link

QGB commented Sep 28, 2023

fdroidserver.exception.MetaDataException

@licaon-kter
Copy link

@QGB what is this about?

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

9 participants