Summary: | www-client/firefox-95, 96, 97: Will fail to build if build host has installed dev-python/pip and at least one broken but unrelated Python package. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Piotr Karbowski (RETIRED) <slashbeast> |
Component: | Current packages | Assignee: | Mozilla Gentoo Team <mozilla> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | fsvm88, harrisl, herrtimson, mgorny, python, qa, sam, soap |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugzilla.mozilla.org/show_bug.cgi?id=1746390 https://bugs.gentoo.org/show_bug.cgi?id=832975 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Disable pip check at configure
ffx.patch |
Description
Piotr Karbowski (RETIRED)
![]() The related failure log: Traceback (most recent call last): File "/var/portage/tmp/portage/www-client/firefox-95.0/work/firefox-95.0/./mach", line 167, in <module> main(sys.argv[1:]) File "/var/portage/tmp/portage/www-client/firefox-95.0/work/firefox-95.0/./mach", line 159, in main mach = check_and_get_mach(os.path.dirname(os.path.realpath(__file__))) File "/var/portage/tmp/portage/www-client/firefox-95.0/work/firefox-95.0/./mach", line 146, in check_and_get_mach return load_mach(dir_path, mach_path) File "/var/portage/tmp/portage/www-client/firefox-95.0/work/firefox-95.0/./mach", line 134, in load_mach return mach_initialize.initialize(dir_path) File "/var/portage/tmp/portage/www-client/firefox-95.0/work/firefox-95.0/build/mach_initialize.py", line 291, in initialize _activate_python_environment(topsrcdir) File "/var/portage/tmp/portage/www-client/firefox-95.0/work/firefox-95.0/build/mach_initialize.py", line 233, in _activate_python_environment raise Exception( Exception: According to "pip check", the current Python environment has package-compatibility issues. * ERROR: www-client/firefox-95.0::gentoo failed (configure phase): * (no error message) * * Call stack: * ebuild.sh, line 127: Called src_configure * environment, line 5560: Called die * The specific snippet of code: * ./mach configure || die * * If you need support, post the output of `emerge --info '=www-client/firefox-95.0::gentoo'`, * the complete build log and the output of `emerge -pqv '=www-client/firefox-95.0::gentoo'`. * The complete build log is located at '/var/portage/tmp/portage/www-client/firefox-95.0/temp/build.log'. * The ebuild environment file is located at '/var/portage/tmp/portage/www-client/firefox-95.0/temp/environment'. * Working directory: '/var/portage/tmp/portage/www-client/firefox-95.0/work/firefox-95.0' * S: '/var/portage/tmp/portage/www-client/firefox-95.0/work/firefox-95.0' * * The following package has failed to build, install, or execute postinst: * * (www-client/firefox-95.0:0/95::gentoo, ebuild scheduled for merge), Log file: * '/var/portage/tmp/portage/www-client/firefox-95.0/temp/build.log' * Created attachment 758715 [details, diff]
Disable pip check at configure
Dropping the patch in /etc/portage/patches allows to compile Firefox 95.
The patch turns the `if has_pip:` into `if False:`, letting the logic fallback to default behavior of a system without pip.
Created attachment 758913 [details, diff]
ffx.patch
I'd do something like this instead, to kill the first invocation of pip already.
@mozilla team any comment from you? I've yet to reproduce this personally.... I see upstream has done a lot of pip-related work for 96, some may hold an "upstream-approved" patch. I'd like to reproduce this and check if (some) upstream patch works better, since they're going to land in 96. However, just a reminder for everyone, you can utilize /etc/portage/patches with the provided patches in here. I hit this bug during the boost-1.78 rebuilds. After the long rebuilds finished, I emerged firefox and the pip issue disappeared It is irrelevant what kind of work upstream does around pip. It is a QA violation to have a build process acting in different way depending on configuration or installation of other, unrelated packages on the build host. Asking users to use eapply_user because the in-tree ebuild does not follow QA regulations is not something that I'd expect here. Can someone throw me some pip commands to break "pip check" so I can test a fix, or can someone with broken pip deps try exporting: MOZ_AUTOMATION=0 before building firefox-95? (In reply to Piotr Karbowski from comment #7) > It is irrelevant what kind of work upstream does around pip. Even if they fix the issue, which btw was reported 3 months ago? > > Asking users to use eapply_user because the in-tree ebuild does not follow > QA regulations is not something that I'd expect here. It was just a note to get past this while it's being worked on, definitely not a permanent solution. I'd also not like to carry this patch into each release, so prefer to have it sorted by upstream. Firefox-95.0.1 is out and I'd like to get steps to reproduce this, so we can see if it's already fixed upstream, or do we need to do something for the 95.0.1 ebuild. Patch will obviously be included for that one if nothing else worked. (In reply to Joonas Niilola from comment #8) > MOZ_AUTOMATION=0 > before building firefox-95? Well that doesn't seem to work out even for me. > > Firefox-95.0.1 is out and I'd like to get steps to reproduce this, so we can > see if it's already fixed upstream, or do we need to do something for the > 95.0.1 ebuild. Patch will obviously be included for that one if nothing else > worked. Aaand unfortunately it looks like the pip work is done to 96 as I said before... Still I'd like to reproduce and check it for *sure*. You need to install something with dependencies inconsistent with e.g its requirements.txt. pysnmp may work. First (adjust for your Python version used for build): $ find /usr/lib/python3.10 -name requires.txt Take a random file, open it, add frobnicate on top and: $ python3.10 -m pip check django 4.0 requires frobnicate, which is not installed. (note: i'm just saying how to break "pip check", I haven't tested it against the Firefox ebuild) ^ Worked perfectly, thanks! Never used pip in my life before. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b9c3e8c24ff1f44f62ddb98f5fb93d3eab323fa commit 9b9c3e8c24ff1f44f62ddb98f5fb93d3eab323fa Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2021-12-17 08:47:50 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2021-12-17 09:06:49 +0000 www-client/firefox: add 95.0.1 - include a patch from mgorny to disable fatal pip invocation in case pip is found, and "pip check" fails sanity check. Closes: https://bugs.gentoo.org/828999 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/Manifest | 98 ++ .../firefox-95-fix-fatal-pip-invocation.patch | 13 + www-client/firefox/firefox-95.0.1.ebuild | 1240 ++++++++++++++++++++ 3 files changed, 1351 insertions(+) The www-client/firefox-96.0 again fails on the 'pip check'. Why was this change not carried over to new firefox? The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eadb5bdabd2b3c9b629a3fae492999ce7287cc72 commit eadb5bdabd2b3c9b629a3fae492999ce7287cc72 Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2022-01-12 07:18:26 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2022-01-12 07:20:53 +0000 www-client/firefox: fix fatal pip check invocation in 96.0 Closes: https://bugs.gentoo.org/828999 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/firefox-96.0.ebuild | 1 + 1 file changed, 1 insertion(+) I see what happened here. Both me and whissi hosted the patchset with identical name, but doing "repoman manifest" in the gentoo dev repo first downloaded whissi's which didn't include updated patch (since mozilla moved the check to another file). However whissi found a better way to deal with it with a simple env variable, that doesn't need patching. This is what we asked from mozilla, but they didn't link the commit to that bug. This sounds like a pretty dysfunctional team to me. www-client/firefox-97.0: fails again. Guys, this is 3rd major Firefox update that is again failing on the same thing. I am really done with it, I will join mozilla project and fix it myself this and every next time. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ecd527b97c3966044d4828ac44cfcbc882ad789 commit 2ecd527b97c3966044d4828ac44cfcbc882ad789 Author: Piotr Karbowski <slashbeast@gentoo.org> AuthorDate: 2022-02-09 23:19:27 +0000 Commit: Piotr Karbowski <slashbeast@gentoo.org> CommitDate: 2022-02-09 23:20:33 +0000 www-client/firefox: 97.0: stub pip check. Closes: https://bugs.gentoo.org/828999 Signed-off-by: Piotr Karbowski <slashbeast@gentoo.org> www-client/firefox/files/firefox-skip-pip-check.patch | 14 ++++++++++++++ www-client/firefox/firefox-97.0.ebuild | 3 +++ 2 files changed, 17 insertions(+) (In reply to Piotr Karbowski from comment #18) > www-client/firefox-97.0: fails again. > > Guys, this is 3rd major Firefox update that is again failing on the same > thing. I am really done with it, I will join mozilla project and fix it > myself this and every next time. Thanks, help is more than welcome! I don't personally even use rapid release so am really glad if someone else wants to bump it. I don't think the patch approach is the best in the longterm *if* the alternative works, because the patch needs to be rewritten for each release (not that it's a huge patch). Can you try the method suggested here first? https://bugs.gentoo.org/832975#c14 Just FYI, as you can see from that bug, my pip check is busted but Firefox-97.0 still builds fine. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87e4d048cf7c2c53963be2a7224791c8a28218a3 commit 87e4d048cf7c2c53963be2a7224791c8a28218a3 Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2022-02-10 17:01:12 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2022-02-10 17:09:08 +0000 www-client/firefox: 97.0 fixes - also export the 2nd MACH_SYSTEM_ASSERTED_COMPATIBLE variable, - disable sandbox feature with ppc64, as it's currently only supported for amd64, arm, arm64 and x86, - include the skip-pip-check.patch in the full patch set. Bug: https://bugs.gentoo.org/832975 Bug: https://bugs.gentoo.org/828999 Closes: https://bugs.gentoo.org/833001 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/Manifest | 2 +- www-client/firefox/files/firefox-skip-pip-check.patch | 14 -------------- www-client/firefox/firefox-97.0.ebuild | 16 +++++++++++----- 3 files changed, 12 insertions(+), 20 deletions(-) |