Skip to content

Freed By F-Droid - upload artefacts to maven

The Story first...

There are two cases here for now:

The basics are done, we know we can build them.

Maplibre is build for several apps (delta chat, element, schildi, etc) and some more might need it. This prolongs each build time for each app by at least an hour.

webrtc-android has been covered a bit by the Threema lib but they patch it for their own use and this keeps two apps un-updateable (Cheogram/Snikket) and the others (Conversation/Quicksy/monocleschat/blabber) have breaking interop with these and certain services (https://github.com/iNPUTmice/Conversations/issues/4356) because of the missing bits.

I've rebuilt webrtc-android in two instances multiple times to confirm the same output of the artefacts.

In the meantime (tired of the holdup I guess) both a Threema dev ( https://github.com/dbrgn/webrtc-android ) and the Snikket dev ( https://github.com/snikket-im/webrtc-android ) pushed to Maven separate unpatched versions of webrtc-android that would be free of the issues above.

While Maplibre is straight forward to build FOSS, webrtc-android is hard and while I tried it might need some skills that I do not posses at the moment so this venue seem implausible for now, we defer to building it with its own tooling: takes 1h to build, downloads >20Gb from Google during the first 30 mins, etc.

eg. I'm using fdroidserver itself, a recipe that builds M108 (with the original name; we'll change this as needed) and Conversations (a little extra verification that the lib is useable):

  - versionName: 2.11.0-beta.2+free
    versionCode: 42040
    commit: bb52962f0d6f7c8dcf36db69231e7a0f640a4a8e
    sudo:
      - apt-get update
      - apt-get install xz-utils
    gradle:
      - conversationsFree
    prebuild:
      - sed -i -e '/MissingTranslation/aabortOnError\ false' -e '/splits/,+5d' -e
        '/Variants.all/,+10d' -e 's/Id\ "eu.siacs.conversations/Id\ "eu.siacs.conversationstest/'
        -e 's/=\ "Conversations"/=\ "ConversationsTest"/' -e '/threema/d' -e 's/playstoreImplementation
        fileTree/freeImplementation fileTree/' build.gradle
      - cd ~
      - git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
      - export PATH=~/depot_tools:$PATH
      - mkdir webrtc
      - cd webrtc
      - fetch --nohooks webrtc_android
      - gclient sync
      - cd src
      - git checkout branch-heads/5359
      - cd ..
      - gclient sync -D
    build:
      - export PATH=~/depot_tools:$PATH
      - pushd ~/webrtc/src
      - ./tools_webrtc/android/build_aar.py
      - ls -latr libwebrtc.aar
      - sha512sum libwebrtc.aar
      - popd
      - mkdir -p libs
      - cp ~/webrtc/src/libwebrtc.aar libs/libwebrtc-m107.aar
    ndk: r25b

The issues:

  • while I find it ok for say the Snikket dev to trust their own maven uploads maybe its better to have the fdroid version for the rest
  • we need to have a Maven Central account
  • with GPG keys and whatever
  • I was thinking we can have at least two (me and @linsui for starters; but anyone with an instance can verify) contributors test a build before upload to confirm hashes of results (the frequency of updates is not that high)
  • rename the lib to io.gitlab.freed-by-fdroid:webrtc-android (as maplibre) or something else?
  • try to get this done in a CI? eg. Azure runners but they might go away (build folder grows up to 30GB and it took 1h on 8 cores or 22 cores, less might mean way longer)

/PS: while it's more text above about webrtc the same procedure applies to maplibre so figuring out how to fixes both.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information