Opened 3 years ago
Closed 3 years ago
#16806 closed defect (fixed)
Building thunderbird may stop if scripting
Reported by: | pierre | Owned by: | pierre |
---|---|---|---|
Priority: | normal | Milestone: | 11.2 |
Component: | BOOK | Version: | git |
Severity: | normal | Keywords: | |
Cc: |
Description ¶
I think the behavior has changed with the latest ESR. Now, ./mach build stops short if neither $HOME/.mozbuild exists nor MOZBUILD_STATE_PATH is defined. It waits for the user to confirm the use of $HOME/.mozbuild. This is annoying when scripting...
I note that almost everybody has $HOME/.mozbuild so I suspect previous versions were creating it without warning... I've only seen this because I am building a brand new system.
I note also that I have only experienced that in thunderbird, so maybe firefox is not affected.
Change History (7)
comment:1 by , 3 years ago
comment:2 by , 3 years ago
The python configury in modern mozilla is a wonderous maze, and google is not good at finding matches. But it found me https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=thunderbird-beta which has export MOZBUILD_STATE_PATH="$srcdir/mozbuild" which looks like what you suggest. That is for thunderbird beta, not esr. That line seems to have been added in https://aur.archlinux.org/cgit/aur.git/commit/PKGBUILD?h=thunderbird-beta&id=83517a49f094f959989e945472386d6f130390da for thunderbird-95.0b4 so definitely a change since 91.
Google also found https://ray-v.github.io/mozbuild/building-firefox-seamonkey-thunderbird-using-mercurial-sources.html which is slackware-style builds for both firefox and thunderbird (but no longer for seamonkey) and in the common part of the mozconfig it has
## Set MOZBUILD_STATE_PATH so the build completes without prompting ## Needs to be set directly in the shell for FF -gt 91 [[ $MAJ_VER -le 91 ]] && { mk_add_options "export MOZBUILD_STATE_PATH=$MOZBUILD/.mozilla"
which suggests that for 91-series it could be an export but now needs to be set in the shell, that of course conflicts with that Arch link.
Looking at my own scripts, I use
export MOZBUILD_STATE_PATH=${PWD}/mozbuild
for firefox-esr and for current stable and beta firefoxes (my stable is still 102.0) but not for thunderbird.
Going further down google's list of possible matches, https://www.mail-archive.com/gentoo-commits@lists.gentoo.org/msg649204.html is from last October for thunderbird-78.14.0
mail-client/thunderbird: set MOZBUILD_STATE_PATH This will silence a warning regarding default path. [...] + # Set state path + export MOZBUILD_STATE_PATH="${BUILD_DIR}"
No matches for its omission stalling the build, I guess your comment about $HOME/.mozbuild might explain that.
Looking at a machine where I have built thunderbirds, that path is used for _virtualenvs/ with 35MB of python-related files.
On the current machine I have old files in that location (python3.9), probably from an earlier build method (my initial guess at how to handle a change in the firefox build caused the virtualenv to be silently created, someone trying to build offline eventually noticed).
When I was looking at tb102 I had a problem because of python3.9 files which I eventually traced down to my earlier attempt to remove create-mach-environment being botched, see c573eb2aa872cc24394069f86388786d09cfe97f from 23rd June. It is possible that accidentally keeping that command in the book for thunderbird-91 stopped people seeing any problems.
comment:3 by , 3 years ago
Am I wrong in thinking that the safe thing to do is to do:
export MOZBUILD_STATE_PATH=./mozbuild
just before ./mach configure for both ff and tb? If I am not, I'll modify the book.
comment:4 by , 3 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
taking all the mozilla tickets. I'll need somebody to test ff without pulse.
comment:6 by , 3 years ago
I took a look at my .mozbuild directory. It was 35 MB and seem to have mostly .py files in .mozbuild/_virtualenvs/mach/lib/python3.10/site-packages.
I concur that we should put this directory in the build tree.
I'd suggest adding MOZBUILD_STATE_PATH=./mozbuild to the environment before running ./mach build... This will prevent creating something in $HOME... But I'd rather see a confirmation first, since I seem to be the only one to see this.