Open Bug 1961626 Opened 6 months ago Updated 5 months ago

"./mach run --app=org.mozilla.fenix.release" errors out with for --enable-release builds

Categories

(Firefox Build System :: Android Studio and Gradle Integration, defect)

All
macOS
defect

Tracking

(Not tracked)

People

(Reporter: mstange, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached file build log

See attached build log. If I run ./mach run --app=org.mozilla.fenix.release on my macOS machine, it says it can't find the task "installFenixRelease".

My local tree is based on https://hg.mozilla.org/mozilla-central/rev/ff5ea82f6090 .

I'm using the following .mozconfig:

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-m-android
mk_add_options AUTOCLOBBER=1
ac_add_options CCACHE=/Users/mstange/.mozbuild/sccache/sccache

# Build GeckoView/Firefox for Android:
ac_add_options --enable-project=mobile/android

# For newer phones or Apple silicon
ac_add_options --target=aarch64

ac_add_options --enable-release
ac_add_options --enable-crashreporter
Flags: needinfo?(adhingra)
Attached file problems-report.html

Hey, I think you just need to add autosignReleaseWithDebugKey=true in your local.properties or remove ac_add_options --enable-release (added in https://phabricator.services.mozilla.com/D242619)

Flags: needinfo?(adhingra)

I can confirm that it works if I remove --enable-release. That is very surprising to me. I had always treated --enable-release to mean --use-compiler-optimization-flags-that-match-official-nightlies-except-no-pgo. Why does --enable-release change anything about signing? If there's a flag that changes signing behavior, I would have expected it to be named --with-apk-signing-keys <path> or something along those lines.

At a minimum there should be a different error message. Maybe something like "Can't find signing keys - note that --enable-release builds don't use debug signing by default."

The severity field is not set for this bug.
:polly, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(polly)

Local signing was intended to be turned off for MOZ_OFFICIAL builds since the release signing process is quite different. We had used DEVELOPER_OPTIONS config to decide if things are local builds and should use debug signing, but that isn't set by --enable-release builds.

If you want --enable-release and debug-signing today, you can set the autosignReleaseWithDebugKey in local.settings still. https://firefox-source-docs.mozilla.org/mobile/android/fenix.html#build-fenix-using-command-line .

This can probably be fine tuned some more.

Summary: "./mach run --app=org.mozilla.fenix.release" errors out with "Task 'installFenixRelease' not found in root project 'fenix' and its subprojects." → "./mach run --app=org.mozilla.fenix.release" errors out with for --enable-release builds

I talked this over with Markus, and using --enable-release has been an ongoing recommendation for local builds that want optimized Rust code, so it makes sense to do better here.

One path might be to use MOZ_OFFICIAL as the condition for disabling automatic signing (and relying on autograph in CI), though there are comments in the gradle config that we want to get away from referencing MOZ_OFFICIAL.

Another path might be to always auto-debug-sign for developer convenience, and then have a mozconfig to disable it that we could use for autograph-signed release builds.

Why not rely on MOZ_AUTOMATION to disable auto signing?

Severity: -- → S4
Flags: needinfo?(polly)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: