Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 638352 - sys-boot/systemd-boot-235 : sandbox issue (XDG_xxx_DIR related)
Summary: sys-boot/systemd-boot-235 : sandbox issue (XDG_xxx_DIR related)
Status: RESOLVED DUPLICATE of bug 627850
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 567192
  Show dependency tree
 
Reported: 2017-11-21 18:21 UTC by Toralf Förster
Modified: 2018-02-08 20:06 UTC (History)
0 users

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


Attachments
emerge-info.txt (emerge-info.txt,16.57 KB, text/plain)
2017-11-21 18:21 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,304.03 KB, text/plain)
2017-11-21 18:21 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,24.53 KB, application/x-bzip)
2017-11-21 18:21 UTC, Toralf Förster
Details
sandbox-9899.log (sandbox-9899.log,385 bytes, text/plain)
2017-11-21 18:21 UTC, Toralf Förster
Details
sys-boot:systemd-boot-235:20171120-213148.log (sys-boot:systemd-boot-235:20171120-213148.log,25.84 KB, text/plain)
2017-11-21 18:21 UTC, Toralf Förster
Details
strace (strace.txt,49.15 KB, text/plain)
2017-11-21 21:37 UTC, Toralf Förster
Details
emerge-info.txt (emerge-info.txt,16.53 KB, text/plain)
2017-11-24 21:27 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,259.46 KB, text/plain)
2017-11-24 21:27 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,17.79 KB, application/x-bzip)
2017-11-24 21:27 UTC, Toralf Förster
Details
sandbox-11524.log (sandbox-11524.log,571 bytes, text/plain)
2017-11-24 21:27 UTC, Toralf Förster
Details
sys-boot:systemd-boot-235:20171124-211415.log (sys-boot:systemd-boot-235:20171124-211415.log,26.91 KB, text/plain)
2017-11-24 21:27 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2017-11-21 18:21:31 UTC
This issue is forced at the tinderbox (pls see bug #567192 too) by setting:

export XDG_DESKTOP_DIR="/root/Desktop"
export XDG_DOCUMENTS_DIR="/root/Documents"
export XDG_DOWNLOAD_DIR="/root/Downloads"
export XDG_MUSIC_DIR="/root/Music"
export XDG_PICTURES_DIR="/root/Pictures"
export XDG_PUBLICSHARE_DIR="/root/Public"
export XDG_TEMPLATES_DIR="/root/Templates"
export XDG_VIDEOS_DIR="/root/Videos"
export XDG_RUNTIME_DIR="/root/run"
export XDG_CONFIG_HOME="/root/config"
export XDG_CACHE_HOME="/root/cache"
export XDG_DATA_HOME="/root/share"

sandbox output:

VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: mkdir
S: deny

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 13.0_libressl_20171111-114143

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.2.0 *

Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python3.6 (fallback)
  [3]   python2.7 (fallback)
  [4]   pypy3 (fallback)
  [5]   pypy (fallback)
Available Ruby profiles:
  [1]   ruby22 (with Rubygems) *



emerge -qpv sys-boot/systemd-boot
[ebuild  N    ] sys-boot/systemd-boot-235
Comment 1 Toralf Förster gentoo-dev 2017-11-21 18:21:34 UTC
Created attachment 505320 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-11-21 18:21:37 UTC
Created attachment 505322 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2017-11-21 18:21:40 UTC
Created attachment 505324 [details]
etc.portage.tbz2
Comment 4 Toralf Förster gentoo-dev 2017-11-21 18:21:44 UTC
Created attachment 505326 [details]
sandbox-9899.log
Comment 5 Toralf Förster gentoo-dev 2017-11-21 18:21:47 UTC
Created attachment 505328 [details]
sys-boot:systemd-boot-235:20171120-213148.log
Comment 6 Mike Gilbert gentoo-dev 2017-11-21 18:30:09 UTC
I cannot reproduce this.

Please look for the string "XDG_CACHE_HOME" in all installed python packages so we can identify the root cause of this.

grep -RF --include '*.py' XDG_CACHE_HOME /usr/lib64/python3.4/site-packages
Comment 7 Mike Gilbert gentoo-dev 2017-11-21 18:41:42 UTC
Looking for the string "user_cache_dir" might be helpful as well.
Comment 8 Toralf Förster gentoo-dev 2017-11-21 20:37:26 UTC
(In reply to Mike Gilbert from comment #7)
Here you go :

mr-fox / # grep -RF --include '*.py' XDG_CACHE_HOME /usr/lib64/python3.4/site-packages
/usr/lib64/python3.4/site-packages/borg/testsuite/helpers.py:    monkeypatch.delenv('XDG_CACHE_HOME', raising=False)
/usr/lib64/python3.4/site-packages/borg/testsuite/helpers.py:    monkeypatch.setenv('XDG_CACHE_HOME', '/var/tmp/.cache')
/usr/lib64/python3.4/site-packages/borg/helpers.py:    xdg_cache = os.environ.get('XDG_CACHE_HOME', os.path.join(get_home_dir(), '.cache'))
/usr/lib64/python3.4/site-packages/clint/packages/appdirs.py:            os.getenv('XDG_CACHE_HOME', os.path.expanduser('~/.cache')),
/usr/lib64/python3.4/site-packages/clint/packages/appdirs.py:        Unix:       ~/.cache/<appname>/log  # or under $XDG_CACHE_HOME if defined
/usr/lib64/python3.4/site-packages/rosdistro/external/appdirs.py:        path = os.getenv('XDG_CACHE_HOME', os.path.expanduser('~/.cache'))
/usr/lib64/python3.4/site-packages/rosdistro/external/appdirs.py:        Unix:       ~/.cache/<AppName>/log  # or under $XDG_CACHE_HOME if defined
/usr/lib64/python3.4/site-packages/jedi/settings.py:    _cache_directory = os.path.join(os.getenv('XDG_CACHE_HOME') or '~/.cache',
/usr/lib64/python3.4/site-packages/jedi/settings.py:On Linux, if environment variable ``$XDG_CACHE_HOME`` is set,
/usr/lib64/python3.4/site-packages/jedi/settings.py:``$XDG_CACHE_HOME/jedi`` is used instead of the default one.
/usr/lib64/python3.4/site-packages/pkg_resources/_vendor/appdirs.py:        path = os.getenv('XDG_CACHE_HOME', os.path.expanduser('~/.cache'))
/usr/lib64/python3.4/site-packages/pkg_resources/_vendor/appdirs.py:        Unix:       ~/.cache/<AppName>/log  # or under $XDG_CACHE_HOME if defined
/usr/lib64/python3.4/site-packages/pip/_vendor/appdirs.py:        path = os.getenv('XDG_CACHE_HOME', os.path.expanduser('~/.cache'))
/usr/lib64/python3.4/site-packages/pip/_vendor/appdirs.py:        Unix:       ~/.cache/<AppName>/log  # or under $XDG_CACHE_HOME if defined
/usr/lib64/python3.4/site-packages/pip/utils/appdirs.py:        path = os.getenv("XDG_CACHE_HOME", expanduser("~/.cache"))
/usr/lib64/python3.4/site-packages/matplotlib/__init__.py:    path = os.environ.get('XDG_CACHE_HOME')
/usr/lib64/python3.4/site-packages/matplotlib/__init__.py:    _get_config_dir, except using `$XDG_CACHE_HOME`/`~/.cache` instead.
/usr/lib64/python3.4/site-packages/Cython/Utils.py:       (posix not OS X): XDG_CACHE_HOME/cython if XDG_CACHE_HOME defined
/usr/lib64/python3.4/site-packages/Cython/Utils.py:            parent = os.environ.get('XDG_CACHE_HOME')
/usr/lib64/python3.4/site-packages/appdirs.py:        path = os.getenv('XDG_CACHE_HOME', os.path.expanduser('~/.cache'))
/usr/lib64/python3.4/site-packages/appdirs.py:        Unix:       ~/.cache/<AppName>/log  # or under $XDG_CACHE_HOME if defined
mr-fox / # grep -RF --include '*.py' user_cache_dir /usr/lib64/python3.4/site-packages
/usr/lib64/python3.4/site-packages/rply/parsergenerator.py:        cache_dir = AppDirs("rply").user_cache_dir
/usr/lib64/python3.4/site-packages/clint/resources.py:    cache.path = ad.user_cache_dir
/usr/lib64/python3.4/site-packages/clint/packages/appdirs.py:def user_cache_dir(appname, appauthor=None, version=None, opinion=True):
/usr/lib64/python3.4/site-packages/clint/packages/appdirs.py:        path = user_cache_dir(appname, appauthor, version); version=False
/usr/lib64/python3.4/site-packages/clint/packages/appdirs.py:    def user_cache_dir(self):
/usr/lib64/python3.4/site-packages/clint/packages/appdirs.py:        return user_cache_dir(self.appname, self.appauthor,
/usr/lib64/python3.4/site-packages/clint/packages/appdirs.py:    props = ("user_data_dir", "site_data_dir", "user_cache_dir",
/usr/lib64/python3.4/site-packages/rosdistro/external/appdirs.py:def user_cache_dir(appname=None, appauthor=None, version=None, opinion=True):
/usr/lib64/python3.4/site-packages/rosdistro/external/appdirs.py:        path = user_cache_dir(appname, appauthor, version); version=False
/usr/lib64/python3.4/site-packages/rosdistro/external/appdirs.py:    def user_cache_dir(self):
/usr/lib64/python3.4/site-packages/rosdistro/external/appdirs.py:        return user_cache_dir(self.appname, self.appauthor,
/usr/lib64/python3.4/site-packages/rosdistro/external/appdirs.py:             "user_cache_dir", "user_log_dir")
/usr/lib64/python3.4/site-packages/pkg_resources/_vendor/appdirs.py:def user_cache_dir(appname=None, appauthor=None, version=None, opinion=True):
/usr/lib64/python3.4/site-packages/pkg_resources/_vendor/appdirs.py:        path = user_cache_dir(appname, appauthor, version)
/usr/lib64/python3.4/site-packages/pkg_resources/_vendor/appdirs.py:    def user_cache_dir(self):
/usr/lib64/python3.4/site-packages/pkg_resources/_vendor/appdirs.py:        return user_cache_dir(self.appname, self.appauthor,
/usr/lib64/python3.4/site-packages/pkg_resources/_vendor/appdirs.py:             "user_cache_dir", "user_log_dir")
/usr/lib64/python3.4/site-packages/pkg_resources/__init__.py:        or appdirs.user_cache_dir(appname='Python-Eggs')
/usr/lib64/python3.4/site-packages/pip/_vendor/pkg_resources/__init__.py:        or appdirs.user_cache_dir(appname='Python-Eggs')
/usr/lib64/python3.4/site-packages/pip/_vendor/appdirs.py:def user_cache_dir(appname=None, appauthor=None, version=None, opinion=True):
/usr/lib64/python3.4/site-packages/pip/_vendor/appdirs.py:        path = user_cache_dir(appname, appauthor, version)
/usr/lib64/python3.4/site-packages/pip/_vendor/appdirs.py:    def user_cache_dir(self):
/usr/lib64/python3.4/site-packages/pip/_vendor/appdirs.py:        return user_cache_dir(self.appname, self.appauthor,
/usr/lib64/python3.4/site-packages/pip/_vendor/appdirs.py:             "user_cache_dir", "user_log_dir")
/usr/lib64/python3.4/site-packages/pip/utils/appdirs.py:def user_cache_dir(appname):
/usr/lib64/python3.4/site-packages/pip/locations.py:USER_CACHE_DIR = appdirs.user_cache_dir("pip")
/usr/lib64/python3.4/site-packages/os_client_config/config.py:CACHE_PATH = APPDIRS.user_cache_dir
/usr/lib64/python3.4/site-packages/appdirs.py:def user_cache_dir(appname=None, appauthor=None, version=None, opinion=True):
/usr/lib64/python3.4/site-packages/appdirs.py:        path = user_cache_dir(appname, appauthor, version)
/usr/lib64/python3.4/site-packages/appdirs.py:    def user_cache_dir(self):
/usr/lib64/python3.4/site-packages/appdirs.py:        return user_cache_dir(self.appname, self.appauthor,
/usr/lib64/python3.4/site-packages/appdirs.py:             "user_cache_dir",
Comment 9 Mike Gilbert gentoo-dev 2017-11-21 21:23:26 UTC
Ok, I tried to reproduce with everything except matplotlib.

Can you strace the following command? It might help to figure out what is making that mkdir call.

XDG_CACHE_HOME=/root/cache /usr/lib/python-exec/python3.4/python3 /var/tmp/portage/sys-boot/systemd-boot-235/work/systemd-235/tools/xml_helper.py
Comment 10 Toralf Förster gentoo-dev 2017-11-21 21:37:51 UTC
Created attachment 505580 [details]
strace

(In reply to Mike Gilbert from comment #9)
Comment 11 Mike Gilbert gentoo-dev 2017-11-21 21:47:53 UTC
> openat(AT_FDCWD, "/var/tmp/portage/sys-boot/systemd-boot-235/work/systemd-235/tools/xml_helper.py", O_RDONLY) = -1 ENOENT (No such file or directory)

Oops! Sorry, I meant to have you run that command after the src_configure phase had completed. I actually want to see what that xml_helper.py script does.
Comment 12 Toralf Förster gentoo-dev 2017-11-24 21:27:39 UTC
added that command to an ebuild in the lcoal overlay, here are the results
Comment 13 Toralf Förster gentoo-dev 2017-11-24 21:27:41 UTC
Created attachment 506452 [details]
emerge-info.txt
Comment 14 Toralf Förster gentoo-dev 2017-11-24 21:27:44 UTC
Created attachment 506454 [details]
emerge-history.txt
Comment 15 Toralf Förster gentoo-dev 2017-11-24 21:27:47 UTC
Created attachment 506456 [details]
etc.portage.tbz2
Comment 16 Toralf Förster gentoo-dev 2017-11-24 21:27:50 UTC
Created attachment 506458 [details]
sandbox-11524.log
Comment 17 Toralf Förster gentoo-dev 2017-11-24 21:27:53 UTC
Created attachment 506460 [details]
sys-boot:systemd-boot-235:20171124-211415.log
Comment 18 Mike Gilbert gentoo-dev 2018-02-08 20:06:16 UTC

*** This bug has been marked as a duplicate of bug 627850 ***