"./mach run --app=org.mozilla.fenix.release" errors out with for --enable-release builds
Categories
(Firefox Build System :: Android Studio and Gradle Integration, defect)
Tracking
(Not tracked)
People
(Reporter: mstange, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
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
Reporter | ||
Comment 1•6 months ago
|
||
Comment 2•6 months ago
|
||
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)
Reporter | ||
Comment 3•6 months ago
•
|
||
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."
Comment 4•6 months ago
|
||
The severity field is not set for this bug.
:polly, could you have a look please?
For more information, please visit BugBot documentation.
Comment 5•6 months ago
|
||
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.
Updated•6 months ago
|
Comment 6•6 months ago
|
||
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.
Comment 7•6 months ago
|
||
Why not rely on MOZ_AUTOMATION to disable auto signing?
Updated•5 months ago
|
Description
•