Repository navigation
build(release): mozconfig和出包脚本入库,补上编译机准备文档 - #27
Merged
Merged
Conversation
…ux x86_64 and Windows The release packages were built from mozconfigs that lived only in the build host's object directories. The configure options recorded in the five v0.26.2 packages (about:buildconfig) are now the repository's configs: - all five use --enable-bootstrap=no-update, so a release build fetches missing toolchains but never updates existing ones; - --disable-debug, --disable-update-agent and --disable-default-browser-agent are dropped from the macOS configs and --disable-debug from Linux ARM64: none of them was in the packages, and with background tasks and the updater disabled the update agent is off anyway; - mozconfig.linux-x64 and mozconfig.windows-x64 are new; Windows keeps --disable-default-browser-agent, as its package did. The build host's --with-l10n-base path stays out of the repository; the release script adds it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/release-build.sh replaces the per-release activate and build scripts that only existed on the build host: - activate patches the locked baseline with the current commit after npm ci and the selftests, and records the commit in .frx-release-applied; the old marker is removed first, so a half-patched tree is never built; - build <target> checks the baseline, the pinned firefox-l10n commit and the activation marker, writes the mozconfig it uses into the candidate directory, configures, relinks the build ID and builds, repacks zh-CN under a shared lock, collects only the packages that repack produced under the release file names, runs the Linux package or Windows installer check and writes <target>.sha256; - mozconfig <target> prints the effective mozconfig. Paths come from the environment (UPSTREAM_DIR, FRX_L10N_BASE, FRX_OBJDIR, FRX_DIST_DIR); nothing about a particular machine is in the script. It runs under bash 3.2, where a variable followed directly by a multibyte character must be braced. scripts/tests/test-release-build.py checks the effective mozconfig of every target against the configure options of the v0.26.2 packages, the checks that run before any build work, and the activate/build flow with a stub mach and stub helper scripts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mac job read its source tree from a path on the retired build host and compared that host's untracked mozconfig.mac with the repository. The path now comes from the FRX_UPSTREAM_DIR repository variable, and the job stops with a clear error when it is unset. The mozconfig comparison is gone: the configs are in the repository and there is no untracked copy left to compare. The header now says that release packages come from scripts/release-build.sh and that this workflow builds en-US packages without the zh-CN repack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/build-host.md records what a new build host needs: the machine, the packages, Rust 1.95.0 with the four cross targets, the locked baseline, the pinned firefox-l10n commit, the bootstrapped toolchains and the five configs. Machine addresses, accounts and keys stay out of the repository. docs/release-process.md step 2 now runs scripts/release-build.sh instead of listing the commands of the old host scripts, the backup example no longer names a local directory, and the known gap describes what release.yml still does differently. README points to both documents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…xists activate must refuse while any build holds the shared tree lock, a build must refuse while activation holds it exclusively or the same target is already building, and a build must still run while another target is building. The test holds the locks with fcntl.flock, which util-linux flock interoperates with; hosts without util-linux flock, such as the macOS selftest runner, skip it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
正式包一直在编译机上出。五个目标真正用的mozconfig只存在编译机的objdir里,每次发版的激活和编译脚本也只在那台机器上。编译机2026-10-25退掉了,这些东西跟着就没了。这个pr把它们整理进仓库,换一台新编译机也能照着出包。仓库里不写机器地址、账号、密钥和本机目录。
改动(按提交)
build(configs)mozconfig和v0.26.2发布包对齐,补上linux x86_64和windows:about:buildconfig里记的configure参数;--enable-bootstrap=no-update:缺的工具链会下载,已有的不更新;--disable-debug、--disable-update-agent、--disable-default-browser-agent,linux arm64去掉--disable-debug。发布包里都没有这几项。锁定基线cebc55aab4的update-programs.configure里,关掉backgroundtasks和updater后update agent默认就是关的,default browser agent只在windows上生效,所以产物不变;mozconfig.linux-x64、mozconfig.windows-x64,windows保留--disable-default-browser-agent,和发布包一致;--with-l10n-base是编译机上的路径,不写进配置,由脚本加上。build(release)编译机出包脚本:新增scripts/release-build.sh,取代只在编译机上的activate-v*.sh和build-v*.sh,步骤照v0.26.2实际跑通的那两段。activate:在锁定基线源码树上打当前提交的补丁,先跑npm ci和全量自测,最后把提交写进.frx-release-applied。开头就删掉旧标记,激活中途失败时,build不会用只打了一半补丁的源码树。build <目标>:<目标>.sha256。mozconfig <目标>:只打印实际用的mozconfig。UPSTREAM_DIR、FRX_L10N_BASE、FRX_OBJDIR、FRX_DIST_DIR),脚本里没有任何机器的信息。scripts/tests/test-release-build.py,已加进自测。test(release)锁的测试:flock,macos上跳过。ci(release)自托管源码树改从仓库变量读:release.yml原来写死了旧编译机上的源码树路径,现在从仓库变量FRX_UPSTREAM_DIR读,没设置时直接报错;mozconfig.mac的比对删掉了,配置已经入库,没有可比的副本了;release-build.sh,这个工作流打的是en-US包。docs编译机准备和发布流程:docs/build-host.md,写新编译机需要什么:docs/release-process.md:release-build.sh;release.yml还缺什么。验证
全量自测
bash scripts/selftest-agent-tools.sh通过,共39步。新增的test-release-build.py有9项:flock):8项通过,锁那一项跳过。ci的自测也跑在macos runner上,结果相同;node:22-bookworm-slim,bash 5.2,真实的flock和GNU工具):9项全部通过。各项内容:
FRX_OBJDIR必须是绝对路径,未知目标报用法错误;mach和替身脚本走一遍activate和build:fcntl.flock占住锁,确认激活和编译互相排斥、同一目标不能重复编,另一个目标在编时这个目标照样能编。和发布包的对照:从v0.26.2五个目标的发布包(sha256和release一致)取出
about:buildconfig。唯一例外是mac arm64:它的objdir配置得更早,没有显式写--enable-bootstrap=no-update。锁定基线的bootstrap.configure里,nightly的git检出默认就开着bootstrap,这个选项只管下不下载工具链。敏感信息:新增内容、删除内容和提交信息都扫过,没有ip、账号、密钥和本机路径。旧编译机、历史编译机和windows验证机的ip,在git历史里一次都没出现过。
没验证的
release-build.sh还没在真实编译机上跑过。编译机已经退掉,要等新机器准备好、出下一版时才能实测。命令顺序没有改动,和v0.26.2跑通的脚本一致。build-host.md的装机步骤是按锁定基线的源码和旧机器上的记录写的,还没在一台新机器上从零走过一遍,主要是rust 1.95.0加交叉目标,以及bootstrap下载工具链这两步。已知问题(本pr未处理)
release.yml的mac任务仍然只打en-US包,不做zh-CN重打包,和正式包不等价。正式包走release-build.sh。🤖 Generated with Claude Code