Closed Bug 1455065 Opened 4 years ago Closed 4 years ago

Environment parsing fails in Fedora 28


(Firefox Build System :: General, defect)

3 Branch
Not set


(firefox-esr6061+ fixed, firefox60- wontfix, firefox61 fixed)

Tracking Status
firefox-esr60 61+ fixed
firefox60 - wontfix
firefox61 --- fixed


(Reporter: eeejay, Assigned: glandium)




(3 files)

All mach commands fail because the environment variables are incorrectly parsed. I attached the output of, it includes multi-line bash functions that the parser attempts to consume.

Locally, I get caught up in this line:
IFS=' ';
.. which is part of BASH_FUNC__moduleraw%%

I'm not sure why one python script needs to parse the brittle output of another python script, seems like we can use environ directly in Or maybe use a more robust serializer like json.

In the meantime, we could probably strip out the bash functions.
Duplicate of this bug: 1454339
Comment on attachment 8969009 [details] [diff] [review]
Strip out bash functions from environment in

Review of attachment 8969009 [details] [diff] [review]:

This unfortunately only papers over the problem. Let's actually fix it.
Attachment #8969009 - Flags: review?(mh+mozilla)
Assignee: nobody → mh+mozilla
Comment on attachment 8969107 [details]
Bug 1455065 - Shell quote environment variable values when dumping them in
Attachment #8969107 - Flags: review+
Attachment #8969107 - Flags: review?(core-build-config-reviews)
Pushed by
Shell quote environment variable values when dumping them in r=mshal
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
[Tracking Requested - why for this release]:

I'm running into problems running mach configure on Fedora 28.  I think this bug has the fix, and it would be good to backport it to Firefox 60 for the esr-60 release.

Steps to reproduce:
(1) unified-mozilla repository, hg up release
(2) cat browser/config/version.txt # returns 60.0.1
(3) export MOZCONFIG=~/mozconfigs/fx-blank.mozconfig # a zero-byte file
(4) ./mach configure

Assertion failed in _parse_loader_output:
Traceback (most recent call last):
  File "/home/ajvincent/compiled/unified/mozilla/python/mozbuild/mozbuild/", line 260, in read_mozconfig
    parsed = self._parse_loader_output(output)
  File "/home/ajvincent/compiled/unified/mozilla/python/mozbuild/mozbuild/", line 375, in _parse_loader_output
    assert not in_variable
Error loading mozconfig: /home/ajvincent/mozconfigs/fx-blank.mozconfig

This bug does NOT happen when I use |hg up beta|, where version.txt is 61.0.
Doesn't feel like this needs tracking but if Mike wants to nominate this patch for ESR60 we can consider it.
For what it's worth, I have confirmed that this patch does fix esr-60 for Fedora Linux 28.
Mind requesting esr60 uplift?
Flags: needinfo?(mh+mozilla)
Comment on attachment 8969107 [details]
Bug 1455065 - Shell quote environment variable values when dumping them in

[Approval Request Comment]
If this is not a sec:{high,crit} bug, please state case for ESR consideration:
User impact if declined: Build failure due to some environment variable in the build environment on Fedora.
Fix Landed on Version: 61
Risk to taking this patch (and alternatives if risky): This only affects how the build takes values from the environment to feed build options to configure. This has no consequence on Firefox itself.
String or UUID changes made by this patch: N/A
Flags: needinfo?(mh+mozilla)
Attachment #8969107 - Flags: approval-mozilla-esr60?
Duplicate of this bug: 1464952
Comment on attachment 8969107 [details]
Bug 1455065 - Shell quote environment variable values when dumping them in

approved for 60.1esr
Attachment #8969107 - Flags: approval-mozilla-esr60? → approval-mozilla-esr60+
Version: Version 3 → 3 Branch
You need to log in before you can comment on or make changes to this bug.