Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 687292 - sci-geosciences/qgis-3.4.7: using the yaml.load()
Summary: sci-geosciences/qgis-3.4.7: using the yaml.load()
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Sci-geo Project
URL: https://forums.gentoo.org/viewtopic-t...
Whiteboard:
Keywords: PATCH
Depends on: unsafe-pyyaml
Blocks:
  Show dependency tree
 
Reported: 2019-06-03 17:04 UTC by Marco Genasci
Modified: 2019-10-20 14:20 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
qgis-3.4.7-yaml-load.patch (qgis-3.4.7-yaml-load.patch,1.58 KB, patch)
2019-06-03 17:05 UTC, Marco Genasci
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Genasci 2019-06-03 17:04:59 UTC
At runtime qgis return error because python script using load instead of safe_load

RuntimeError: Unsafe load() call disabled by Gentoo. See bug #659348
Traceback (most recent call last):
  File "/usr/lib64/python3.5/site-packages/qgis/utils.py", line 309, in loadPlugin
    __import__(packageName)
  File "/usr/lib64/python3.5/site-packages/qgis/utils.py", line 672, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/usr/share/qgis/python/plugins/processing/__init__.py", line 29, in
    from processing.tools.general import *              # NOQA
  File "/usr/lib64/python3.5/site-packages/qgis/utils.py", line 672, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/usr/share/qgis/python/plugins/processing/tools/general.py", line 39, in
    from processing.core.Processing import Processing
  File "/usr/lib64/python3.5/site-packages/qgis/utils.py", line 672, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/usr/share/qgis/python/plugins/processing/core/Processing.py", line 58, in
    from processing.algs.qgis.QgisAlgorithmProvider import QgisAlgorithmProvider  # NOQA
  File "/usr/lib64/python3.5/site-packages/qgis/utils.py", line 672, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/usr/share/qgis/python/plugins/processing/algs/qgis/QgisAlgorithmProvider.py", line 48, in
    from .QgisAlgorithm import QgisAlgorithm
  File "/usr/lib64/python3.5/site-packages/qgis/utils.py", line 672, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/usr/share/qgis/python/plugins/processing/algs/qgis/QgisAlgorithm.py", line 30, in
    from processing.algs.help import shortHelp
  File "/usr/lib64/python3.5/site-packages/qgis/utils.py", line 672, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/usr/share/qgis/python/plugins/processing/algs/help/__init__.py", line 70, in
    shortHelp = loadShortHelp()
  File "/usr/share/qgis/python/plugins/processing/algs/help/__init__.py", line 46, in loadShortHelp
    for k, v in yaml.load(stream).items():
  File "/usr/lib64/python3.5/site-packages/yaml/__init__.py", line 109, in load
    raise RuntimeError("Unsafe load() call disabled by Gentoo. See bug #659348")
RuntimeError: Unsafe load() call disabled by Gentoo. See bug #659348 

Reproducible: Always
Comment 1 Marco Genasci 2019-06-03 17:05:33 UTC
Created attachment 578528 [details, diff]
qgis-3.4.7-yaml-load.patch

Patch to resolve the problem
Comment 2 Chris Mayo 2019-06-04 19:21:30 UTC
Slightly different fix applied upstream here:
https://github.com/qgis/QGIS/commit/f5a3485eae9d235721c20f05384e47753805af30

Looks like that is only in master/3.6. A backport PR for release-3_4 might be accepted.
Comment 3 Martin Mokrejš 2019-07-13 16:33:37 UTC
I think this bug should Depend on bug #682964 (a tracker bug)
Comment 4 Larry the Git Cow gentoo-dev 2019-10-20 14:20:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05d9e933f30bf2b67ef447dd3703f177c13c04a1

commit 05d9e933f30bf2b67ef447dd3703f177c13c04a1
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2019-10-20 08:45:46 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-10-20 14:19:34 +0000

    sci-geosciences/qgis: 3.4.12 version bump
    
    Fixes build with Qt 5.13
    Fixes pyyaml usage (fixed upstream)
    
    Thanks-to: Marco Genasci <fedeliallalinea@gmail.com>
    Closes: https://bugs.gentoo.org/687292
    Package-Manager: Portage-2.3.77, Repoman-2.3.17
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 sci-geosciences/qgis/Manifest                      |   1 +
 .../qgis/files/qgis-3.4.12-qt-5.13.patch           |  22 +++
 sci-geosciences/qgis/qgis-3.4.12.ebuild            | 216 +++++++++++++++++++++
 sci-geosciences/qgis/qgis-9999.ebuild              |   3 -
 4 files changed, 239 insertions(+), 3 deletions(-)