Skip to content

fix: fdroid build#1139

Merged
lollipopkit merged 5 commits into
mainfrom
lk/fix-fdroid-build
Apr 25, 2026
Merged

fix: fdroid build#1139
lollipopkit merged 5 commits into
mainfrom
lk/fix-fdroid-build

Conversation

@lollipopkit
Copy link
Copy Markdown
Owner

@lollipopkit lollipopkit commented Apr 25, 2026

Summary by CodeRabbit

  • Chores
    • Updated Android build environment to use Java 21.
    • Improved release build to set linker flags to avoid embedding build IDs in native libraries.
    • Added a release verification step that checks packaged APKs to ensure no native libraries contain embedded build IDs, failing the release if issues are found.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 25, 2026

📝 Walkthrough

Walkthrough

The GitHub Android release workflow is updated to use Java 21 and injects LDFLAGS=-Wl,--build-id=none into the Android build step. A new pre-release verification step runs scripts/release/verify-fdroid-native-libs.sh. The script requires find, readelf, and unzip, locates the APK output directory, verifies exactly one Flutter APK per architecture (arm64, arm, amd64), extracts lib/*/*.so from each APK, checks for ELF Build ID notes with readelf -n, reports any violations, and exits non‑zero if any are found.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'fix: fdroid build' is vague and generic, using non-specific terminology that doesn't convey the actual changes made to the workflow and verification script. Provide a more descriptive title such as 'fix: upgrade Java version and add native library verification for F-Droid builds' to clearly communicate the specific changes.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lk/fix-fdroid-build

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

Comment on lines +39 to +40
env:
LDFLAGS: -Wl,--build-id=none
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 LDFLAGS may not propagate to all native libraries in the APK

The LDFLAGS: -Wl,--build-id=none env var is set at the step level for the Build step (.github/workflows/release.yml:40). While CMake does initialize CMAKE_SHARED_LINKER_FLAGS from the LDFLAGS environment variable on first configure (which applies to plugin native code compiled during the build), the Flutter engine's libflutter.so is a pre-built binary downloaded by the Flutter SDK — it is not compiled during the build and therefore LDFLAGS cannot affect it. If the pre-built libflutter.so shipped by the Flutter SDK contains a Build ID note, the verification script at scripts/release/verify-fdroid-native-libs.sh:47 will always detect it and fail the CI. The verification script is the correct safety net here, but it's worth confirming that either (a) the fl_build package has additional post-processing to strip build IDs from pre-built binaries, or (b) the Flutter SDK's pre-built .so files already ship without Build IDs.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/fl_build`:
- Line 1: The submodule update in packages/fl_build points to commit
52a504a32fb6c552d4ea8de66f7c831d7c6119ba whose commit message ("fix: update
default scp host") doesn't match the PR's stated F‑Droid build fix; either
change the submodule pointer in packages/fl_build to the intended commit that
actually contains the F‑Droid/build fix, or update the PR description and
rationale to explicitly state why this scp-host change is part of the F‑Droid
fix and include the submodule commit hash
(52a504a32fb6c552d4ea8de66f7c831d7c6119ba) and relevant upstream commit message
for reviewers.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: fa6bc034-1b92-4984-ba40-dffb99a663c6

📥 Commits

Reviewing files that changed from the base of the PR and between f52eac6 and 88dd9ef.

⛔ Files ignored due to path filters (1)
  • pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .github/workflows/release.yml
  • packages/fl_build

Comment thread packages/fl_build Outdated
coderabbitai[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/release/verify-fdroid-native-libs.sh`:
- Around line 28-32: The patterns array currently uses short/non-canonical ABI
suffixes and includes an ABI not present in abiFilters; update the patterns
variable so each entry uses the canonical Android ABI names that the build
produces (e.g., use arm64-v8a and armeabi-v7a instead of arm64/arm) and remove
the amd64/x86_64 pattern unless you explicitly support that ABI in abiFilters;
ensure the patterns list length matches the filtered ABIs and reference the
existing APP_NAME and patterns variable when making the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 424b6fdb-0d16-4793-a083-161498924d73

📥 Commits

Reviewing files that changed from the base of the PR and between f931530 and eae0f75.

📒 Files selected for processing (1)
  • scripts/release/verify-fdroid-native-libs.sh

Comment thread scripts/release/verify-fdroid-native-libs.sh
@lollipopkit lollipopkit merged commit 30e57ab into main Apr 25, 2026
2 checks passed
@lollipopkit lollipopkit deleted the lk/fix-fdroid-build branch April 25, 2026 14:09
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.

1 participant