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

Prepare release for F-Droid #1600

Merged
merged 1 commit into from
Nov 14, 2024
Merged

Prepare release for F-Droid #1600

merged 1 commit into from
Nov 14, 2024

Conversation

KoalaSat
Copy link
Member

@KoalaSat KoalaSat commented Nov 5, 2024

What does this PR do?

These are changes requested by #1261 (comment) in order to prepare the app for the F-Droid repo:

  • Updated existing librobonames and librobohash to its latest commit on RoboSats/robo-identities@c95a9f5
  • Removed x86 build due to the lack of robo libraries for it

Checklist before merging

  • Install pre-commit and initialize it: pip install pre-commit, then pre-commit install. Pre-commit installs git hooks that automatically check the codebase. If pre-commit fails when you commit your changes, please fix the problems it points out.

@KoalaSat
Copy link
Member Author

KoalaSat commented Nov 5, 2024

Build tested and working 👍

@licaon-kter
Copy link

umm no x86_64 librobo*.so's?

@KoalaSat
Copy link
Member Author

KoalaSat commented Nov 5, 2024

umm no x86_64 librobo*.so's?

The x86_64 are exactly the same https://github.com/RoboSats/robosats/tree/main/mobile/android/app/src/main/jniLibs/x86_64 , no changes

@licaon-kter
Copy link

next

$ strings mobile/android/app/src/main/jniLibs/arm64-v8a/librobonames.so | grep rustc\ version
rustc version 1.81.0-nightly (20ae37c18 2024-07-07)

I'll try to match the same version

@licaon-kter
Copy link

no joy, even matching your version with rustup-init.sh -y --default-toolchain nightly-2024-07-08 that gets me rustc version 1.81.0-nightly (20ae37c18 2024-07-07) the .so's are so very different

@licaon-kter
Copy link

@linsui any ideas to fix this diff?
librn.log.7z.zip

@linsui
Copy link

linsui commented Nov 7, 2024

See https://f-droid.org/docs/Reproducible_Builds/#rust. :) I can see that there are some paths.

-/home/vagrant/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-bigint-0.4.4/src/bigint/convert.rs/home/vagrant/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jni-0.21.1/src/wrapper/jnienv.rscalling checked jni method: NewStringUTFjni::wrapper::jnienvlooking up jni method NewStringUTFJNIEnv*JNIEnvjnienv method not defined, returning errorNewStringUTF
+/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-bigint-0.4.4/src/bigint/convert.rs/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jni-0.21.1/src/wrapper/jnienv.rscalling checked jni method: NewStringUTFjni::wrapper::jnienvlooking up jni method NewStringUTFJNIEnv*JNIEnvjnienv method not defined, returning errorNewStringUTF

@licaon-kter
Copy link

ah, I thought I looked at that, nice catch, brb

@licaon-kter
Copy link

I got some paths cleaned up with

    - export CARGO_ENCODED_RUSTFLAGS='--remap-path-prefix=/home/vagrant=/root --remap-path-prefix=/home/vagrant/build/srclib/robo-identities=/root'
    - cargo --config "trim-paths = true" ndk -t armeabi-v7a -t arm64-v8a -t x86_64
        -o ./target build --release

but the .so is filled with /home/vagrant/.cargo/registry/src/index.crates.io-6f17d22bba15001f/somelib-version... references, yes this whole string is everywhere

any idea how to clean this up too?

I've searched for other ways to clean but didn't find the right command yet to remove the crates information from the .so file

eg rust-lang/cargo#13171 and many more

@licaon-kter
Copy link

Looks like managing CARGO_HOME to match upstream (/root/.cargo?) moves me closer, no more odd paths

rebuilding in full, brb

@licaon-kter
Copy link

yeah, CARGO_HOME did it 🎉

all those trim and remap tricks were useless 🤷

@KoalaSat do merge this and maybe tag a new release so we can test reproducibility in full

@KoalaSat
Copy link
Member Author

yeah, CARGO_HOME did it 🎉

all those trim and remap tricks were useless 🤷

@KoalaSat do merge this and maybe tag a new release so we can test reproducibility in full

Congrats!!! Alright, we are planning a next release probably for next week. I'll keep you updated here 🚀

@KoalaSat KoalaSat merged commit 4b002e5 into main Nov 14, 2024
@KoalaSat KoalaSat deleted the prepare-for-f-droid branch November 14, 2024 14:47
@KoalaSat
Copy link
Member Author

@licaon-kter new release just launched!

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

Successfully merging this pull request may close these issues.

3 participants