Bug 1806482

Summary: Doing `flatpak-module local-build` against mock-2 causes "ValueError: too deep jinja re-evaluation on '...'"
Product: [Fedora] Fedora Reporter: Stephan Bergmann <sbergman>
Component: mockAssignee: Copr Team <copr-team>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 31CC: jdisnard, jkeating, klember, mebrown, msuchy, otaylor, philip.wyett, praiskup, williams
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-04 15:11:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stephan Bergmann 2020-02-24 10:10:33 UTC
Description of problem:

After some recent `dnf update`, a `flatpak-module -v local-build --install` that had worked in the past started to generate lots of failures like

[...]
> error: Error while building artifact apache-commons-logging: Command '['mock', '-v', '-r', '/home/sbergman/modulebuild/builds/module-libreoffice-master-3120200224090539/config/mock-ThreadPoolExecutor-0_0.cfg', '--init']' returned non-zero value 1, stdout log: /home/sbergman/modulebuild/builds/module-libreoffice-master-3120200224090539/results/apache-commons-logging-mock-stdout.log, stderr log: /home/sbergman/modulebuild/builds/module-libreoffice-master-3120200224090539/results/apache-commons-logging-mock-stderr.log
[...]

(see below for content of that apache-commons-logging-mock-stderr.log).

The issue went away again when I downgraded from mock-2.0-2.fc31.noarch and mock-scm-2.0-2.fc31.noarch to mock-1.4.20-1.fc31.noarch and mock-scm-1.4.20-1.fc31.noarch.


Version-Release number of selected component (if applicable):

mock-2.0-2.fc31.noarch


Actual results:

content of /home/sbergman/modulebuild/builds/module-libreoffice-master-3120200224090539/results/apache-commons-logging-mock-stderr.log:

> WARNING: config_opts['use_bootstrap_container'] is deprecated, please use config_opts['use_bootstrap'] instead
> ERROR: too deep jinja re-evaluation on '
> 
> 
> 
> 
> 
> [main]
> keepcache=1
> debuglevel=2
> reposdir=/dev/null
> logfile=/var/log/yum.log
> retries=20
> obsoletes=1
> gpgcheck=0
> assumeyes=1
> syslog_ident=mock
> syslog_device=
> install_weak_deps=0
> metadata_expire=3600
> mdpolicy=group:primary
> module_platform_id=$module_platform_id
> 
> # repos
> 
> [localrepo]
> name=localrepo
> baseurl=file:///home/sbergman/modulebuild/builds/module-libreoffice-master-3120200224090539/results
> module_hotfixes=true
> metadata_expire=1
> skip_if_unavailable=True
> enabled=1
> 
> [module-flatpak-runtime-f31-3120200205214702-f636be4b]
> name=module-flatpak-runtime-f31-3120200205214702-f636be4b
> baseurl=file:///home/sbergman/modulebuild/cache/koji_tags/module-flatpak-runtime-f31-3120200205214702-f636be4b
> module_hotfixes=true
> enabled=1
> 
> [f31-build]
> name=f31-build
> baseurl=https://kojipkgs.fedoraproject.org/repos/f31-build/latest/$arch/
> module_hotfixes=true
> enabled=1
> 
> [module-flatpak-common-f31-3120200203151525-f889fc00]
> name=module-flatpak-common-f31-3120200203151525-f889fc00
> baseurl=file:///home/sbergman/modulebuild/cache/koji_tags/module-flatpak-common-f31-3120200203151525-f889fc00
> module_hotfixes=true
> enabled=1
> 
> 
> 
> 
> 
> 
> 
> '
> Traceback (most recent call last):
>   File "/usr/libexec/mock/mock", line 1026, in <module>
>     exitStatus = main()
>   File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 93, in trace
>     result = func(*args, **kw)
>   File "/usr/libexec/mock/mock", line 652, in main
>     config_opts = util.load_config(config_path, options.chroot, uidManager, __VERSION__, PKGPYTHONDIR)
>   File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 93, in trace
>     result = func(*args, **kw)
>   File "/usr/lib/python3.7/site-packages/mockbuild/util.py", line 1590, in load_config
>     if ('dnf.conf' in config_opts) == ('yum.conf' in config_opts):
>   File "/usr/lib64/python3.7/_collections_abc.py", line 666, in __contains__
>     self[key]
>   File "/usr/lib/python3.7/site-packages/mockbuild/util.py", line 123, in __getitem__
>     return self.__render_value(self.__dict__[key])
>   File "/usr/lib/python3.7/site-packages/mockbuild/util.py", line 143, in __render_value
>     return self.__render_string(value)
>   File "/usr/lib/python3.7/site-packages/mockbuild/util.py", line 167, in __render_string
>     raise ValueError("too deep jinja re-evaluation on '{}'".format(orig))
> ValueError: too deep jinja re-evaluation on '
> 
> 
> 
> 
> 
> [main]
> keepcache=1
> debuglevel=2
> reposdir=/dev/null
> logfile=/var/log/yum.log
> retries=20
> obsoletes=1
> gpgcheck=0
> assumeyes=1
> syslog_ident=mock
> syslog_device=
> install_weak_deps=0
> metadata_expire=3600
> mdpolicy=group:primary
> module_platform_id=$module_platform_id
> 
> # repos
> 
> [localrepo]
> name=localrepo
> baseurl=file:///home/sbergman/modulebuild/builds/module-libreoffice-master-3120200224090539/results
> module_hotfixes=true
> metadata_expire=1
> skip_if_unavailable=True
> enabled=1
> 
> [module-flatpak-runtime-f31-3120200205214702-f636be4b]
> name=module-flatpak-runtime-f31-3120200205214702-f636be4b
> baseurl=file:///home/sbergman/modulebuild/cache/koji_tags/module-flatpak-runtime-f31-3120200205214702-f636be4b
> module_hotfixes=true
> enabled=1
> 
> [f31-build]
> name=f31-build
> baseurl=https://kojipkgs.fedoraproject.org/repos/f31-build/latest/$arch/
> module_hotfixes=true
> enabled=1
> 
> [module-flatpak-common-f31-3120200203151525-f889fc00]
> name=module-flatpak-common-f31-3120200203151525-f889fc00
> baseurl=file:///home/sbergman/modulebuild/cache/koji_tags/module-flatpak-common-f31-3120200203151525-f889fc00
> module_hotfixes=true
> enabled=1
> 
> 
> 
> 
> 
> 
> 
> '

Comment 1 Pavel Raiskup 2020-02-27 12:43:31 UTC
Thanks for the report.  Can I see the content of
/home/sbergman/modulebuild/builds/module-libreoffice-master-3120200224090539/config/mock-ThreadPoolExecutor-0_0.cfg ?

Comment 2 Stephan Bergmann 2020-02-27 13:29:44 UTC
(had already deleted the old ~/modulebuild data, but now with a rerun:)

> error: Error while building artifact apache-commons-logging: Command '['mock', '-v', '-r', '/home/sbergman/modulebuild/builds/module-libreoffice-master-3120200227131821/config/mock-ThreadPoolExecutor-0_0.cfg', '--init']' returned non-zero value 1, stdout log: /home/sbergman/modulebuild/builds/module-libreoffice-master-3120200227131821/results/apache-commons-logging-mock-stdout.log, stderr log: /home/sbergman/modulebuild/builds/module-libreoffice-master-3120200227131821/results/apache-commons-logging-mock-stderr.log

/home/sbergman/modulebuild/builds/module-libreoffice-master-3120200227131821/config/mock-ThreadPoolExecutor-0_0.cfg:
> config_opts['root'] = 'module-libreoffice-master-3120200227131821-ThreadPoolExecutor-0_0'
> config_opts['target_arch'] = 'x86_64'
> config_opts['legal_host_arches'] = ('x86_64',)
> config_opts['chroot_setup_cmd'] = 'install gzip bash shadow-utils rpm-build flatpak-runtime-config util-linux redhat-rpm-config fedora-release findutils module-build-macros coreutils bzip2 grep diffutils sed gawk make info xz glibc-minimal-langpack which cpio flatpak-rpm-macros tar unzip patch'
> config_opts['dist'] = ''
> config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
> config_opts['releasever'] = '31'
> config_opts['package_manager'] = 'dnf'
> config_opts['nosync'] = True
> config_opts['use_bootstrap_container'] = False
> config_opts['module_enable'] = []
> 
> config_opts['yum.conf'] = """
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> [main]
> keepcache=1
> debuglevel=2
> reposdir=/dev/null
> logfile=/var/log/yum.log
> retries=20
> obsoletes=1
> gpgcheck=0
> assumeyes=1
> syslog_ident=mock
> syslog_device=
> install_weak_deps=0
> metadata_expire=3600
> mdpolicy=group:primary
> module_platform_id=$module_platform_id
> 
> # repos
> 
> [localrepo]
> name=localrepo
> baseurl=file:///home/sbergman/modulebuild/builds/module-libreoffice-master-3120200227131821/results
> module_hotfixes=true
> metadata_expire=1
> skip_if_unavailable=True
> enabled=1
> 
> [module-flatpak-runtime-f31-3120200226145136-f636be4b]
> name=module-flatpak-runtime-f31-3120200226145136-f636be4b
> baseurl=file:///home/sbergman/modulebuild/cache/koji_tags/module-flatpak-runtime-f31-3120200226145136-f636be4b
> module_hotfixes=true
> enabled=1
> 
> [f31-build]
> name=f31-build
> baseurl=https://kojipkgs.fedoraproject.org/repos/f31-build/latest/$arch/
> module_hotfixes=true
> enabled=1
> 
> [module-flatpak-common-f31-3120200226151755-f889fc00]
> name=module-flatpak-common-f31-3120200226151755-f889fc00
> baseurl=file:///home/sbergman/modulebuild/cache/koji_tags/module-flatpak-common-f31-3120200226151755-f889fc00
> module_hotfixes=true
> enabled=1
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> """
> config_opts['scm'] = True
> config_opts['scm_opts']['method'] = 'distgit'
> config_opts['scm_opts']['package'] = 'redland'
> config_opts['scm_opts']['distgit_get'] = "sh -c 'fedpkg clone --anonymous redland''; git -C redland checkout 98f91efc0c30731f521dff8c71e24671506a8ae6'"
> config_opts['scm_opts']['distgit_src_get'] = 'fedpkg --release module sources'

Comment 3 Pavel Raiskup 2020-02-27 13:41:09 UTC
> ERROR: too deep jinja re-evaluation on ...

Weird, I'm not able to get the jinja recursion loop with that config
on my box.

Also:
# dnf install /usr/bin/flatpack-module
Last metadata expiration check: 0:21:53 ago on Thu 27 Feb 2020 08:16:55 AM EST.
No match for argument: /usr/bin/flatpack-module

I need to see the config which causes the problems, basically it looks
like there's
  config_opts['something'] = '{{ something_else }}'
  config_opts['something_else'] = '{{ something }}'

Please can you provide more self-standing mock-only reproducer?

Comment 4 Stephan Bergmann 2020-02-27 14:12:03 UTC
(In reply to Pavel Raiskup from comment #3)
> Also:
> # dnf install /usr/bin/flatpack-module
> Last metadata expiration check: 0:21:53 ago on Thu 27 Feb 2020 08:16:55 AM
> EST.
> No match for argument: /usr/bin/flatpack-module

flatpak-module-tools-0.11.3-1.fc31.noarch

> I need to see the config which causes the problems, basically it looks
> like there's
>   config_opts['something'] = '{{ something_else }}'
>   config_opts['something_else'] = '{{ something }}'
> 
> Please can you provide more self-standing mock-only reproducer?

Hm, sorry, no idea how I would do that (knowing hardly anything about mock or the inner workings of that flatpak-module tool).

What should reproduce it (following the instructions at <https://docs.fedoraproject.org/en-US/flatpak/tutorial/>) is `git clone https://src.fedoraproject.org/flatpaks/libreoffice.git && cd libreoffice && flatpak-module -v local-build --install`.

Comment 5 Pavel Raiskup 2020-02-27 14:42:10 UTC
>> Please can you provide more self-standing mock-only reproducer?
>
> Hm, sorry, no idea how I would do that

Ok, I'm flipping against the proper component, maybe the people there
can help to provide more info how mock is used.

Comment 6 Pavel Raiskup 2020-02-27 15:22:29 UTC
This is a mock issue, most probably.  Reproduced.  Seems like
the many, many newlines in config file cause some problems.

Comment 8 Fedora Update System 2020-03-11 09:37:08 UTC
FEDORA-2020-e331425193 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-e331425193

Comment 9 Fedora Update System 2020-03-11 09:39:47 UTC
FEDORA-EPEL-2020-5a84e15907 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-5a84e15907

Comment 10 Fedora Update System 2020-03-11 09:40:01 UTC
FEDORA-EPEL-2020-88ef4b4d66 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-88ef4b4d66

Comment 11 Fedora Update System 2020-03-12 18:49:27 UTC
mock-2.1-1.fc32, mock-core-configs-32.4-1.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-d32d395e18

Comment 12 Fedora Update System 2020-03-12 22:25:47 UTC
mock-2.1-1.el8, mock-core-configs-32.4-1.el8 has been pushed to the Fedora EPEL 8 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-5a84e15907

Comment 13 Fedora Update System 2020-03-12 22:53:38 UTC
mock-2.1-1.fc30, mock-core-configs-32.4-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-e331425193

Comment 14 Fedora Update System 2020-03-12 22:59:19 UTC
mock-2.1-1.fc31, mock-core-configs-32.4-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-d952a70712

Comment 15 Fedora Update System 2020-03-12 23:31:46 UTC
mock-2.1-1.el7, mock-core-configs-32.4-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-88ef4b4d66

Comment 16 Fedora Admin XMLRPC Client 2020-03-17 04:43:18 UTC
This package has changed maintainer in the Fedora.
Reassigning to the new maintainer of this component.

Comment 17 Fedora Update System 2020-03-19 00:50:09 UTC
mock-2.1-1.fc32, mock-core-configs-32.4-1.fc32 has been pushed to the Fedora 32 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2020-03-19 01:44:27 UTC
mock-2.1-1.fc31, mock-core-configs-32.4-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2020-03-26 16:24:21 UTC
FEDORA-EPEL-2020-88ef4b4d66 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-88ef4b4d66

Comment 20 Fedora Update System 2020-03-27 08:02:12 UTC
FEDORA-EPEL-2020-5a84e15907 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-5a84e15907

Comment 21 Fedora Update System 2020-03-27 10:41:26 UTC
FEDORA-2020-e331425193 has been pushed to the Fedora 30 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 22 Fedora Update System 2020-03-27 13:23:19 UTC
FEDORA-EPEL-2020-5a84e15907 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-5a84e15907

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 23 Fedora Update System 2020-03-27 13:40:11 UTC
FEDORA-EPEL-2020-88ef4b4d66 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-88ef4b4d66

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 24 Fedora Update System 2020-04-02 07:53:42 UTC
FEDORA-EPEL-2020-5a84e15907 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-5a84e15907

Comment 25 Fedora Update System 2020-04-02 07:55:02 UTC
FEDORA-EPEL-2020-88ef4b4d66 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-88ef4b4d66

Comment 26 Fedora Update System 2020-04-03 20:19:57 UTC
FEDORA-EPEL-2020-5a84e15907 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-5a84e15907

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 27 Fedora Update System 2020-04-03 21:18:26 UTC
FEDORA-EPEL-2020-88ef4b4d66 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-88ef4b4d66

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 28 Fedora Update System 2020-05-05 05:46:31 UTC
FEDORA-EPEL-2020-5a84e15907 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 29 Fedora Update System 2020-05-05 07:17:30 UTC
FEDORA-EPEL-2020-88ef4b4d66 has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.