Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916299 - >=dev-python/mypy-1.6.0: Sandbox violation if MYPY_CACHE_DIR is set
Summary: >=dev-python/mypy-1.6.0: Sandbox violation if MYPY_CACHE_DIR is set
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-26 15:14 UTC by Jan Breig
Modified: 2023-10-26 18:06 UTC (History)
0 users

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


Attachments
build.log.gz (build.log.gz,94.28 KB, application/gzip)
2023-10-26 15:15 UTC, Jan Breig
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Breig 2023-10-26 15:14:06 UTC
I use a per user mypy cache to prevent mypy from creating a cache directory everywhere I use it. It is set globally via:

export MYPY_CACHE_DIR=~/.cache/mypy

From version 1.6.0 on, this makes the compilation fail due to a sandbox violation because portage tries to access the cache dir.

Reproducible: Always

Steps to Reproduce:
1. Set a custom cache dir with `export MYPY_CACHE_DIR=~/.cache/mypy`
2. emerge dev-python/mypy
3. The compilation fails

Snippet from build log:
```
F: mkdir
S: deny
P: /root/.cache
A: /root/.cache
R: /root/.cache
C: /usr/bin/python3.11 /usr/lib/python-exec/python3.11/gpep517 build-wheel --prefix=/usr --backend setuptools.build_meta --output-fd 3 --wheel-dir /var/tmp/portage/dev-python/mypy-1.6.1/work/mypy-1.6.1-python3_11/wheel 
```
Actual Results:  
Portage tries to access the cache dir specified in `MYPY_CACHE_DIR`.

Expected Results:  
The custom cache dir should not affect the compilation.

Portage 3.0.54 (python 3.11.6-final-0, default/linux/amd64/17.1/desktop/gnome, gcc-13, glibc-2.38-r6, 6.5.8-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-6.5.8-gentoo-x86_64-x86_64-AMD_Ryzen_9_3900X_12-Core_Processor-with-glibc2.38
KiB Mem:    32780904 total,   7612128 free
KiB Swap:   20971516 total,  20248316 free
Timestamp of repository gentoo: Wed, 25 Oct 2023 15:30:01 +0000
Head commit of repository gentoo: 2c82c15a5dce2d62da32bb5933ff331614415bc7
Timestamp of repository haskell: Wed, 25 Oct 2023 05:01:48 +0000
Head commit of repository haskell: ecc41b004ad6a4b6007d38db253eb6b1fbb2b43d

Head commit of repository jb-overlay: 3313ce041b31b5ea346f56e5d3eee477762a9b63

Timestamp of repository pentoo: Wed, 25 Oct 2023 07:46:47 +0000
Head commit of repository pentoo: ce31c91d58e47bbad98e939a0395001a698ded8d

Timestamp of repository steam-overlay: Sun, 22 Oct 2023 19:17:25 +0000
Head commit of repository steam-overlay: 37d9e22efbb9df8c5d74a6afa9cd9b14cde6edba

sh bash 5.2_p15-r7
ld GNU ld (Gentoo 2.41 p2) 2.41.0
ccache version 4.8.3 [disabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r7::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.38.0-r1::gentoo
dev-lang/python:           3.11.6::gentoo, 3.12.0_p1::gentoo
dev-lang/rust:             1.73.0::gentoo
dev-util/ccache:           4.8.3::gentoo
dev-util/cmake:            3.27.7::gentoo
dev-util/meson:            1.2.3::gentoo
sec-policy/selinux-base:   2.20231002-r2::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/openrc:           0.51::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.41-r2::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           16.0.6::gentoo, 17.0.3::gentoo
sys-devel/gcc:             13.2.1_p20231014::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             16.0.6::gentoo, 17.0.3::gentoo
sys-devel/llvm:            14.0.6-r4::gentoo, 16.0.6::gentoo, 17.0.3::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.5-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r6::gentoo
sys-libs/libselinux:       3.5-r1::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24

haskell
    location: /var/db/repos/haskell
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/haskell.git
    masters: gentoo
    volatile: False

jb-overlay
    location: /var/db/repos/jb-overlay
    sync-type: git
    sync-uri: https://github.com/Ultimator14/jb-overlay.git
    masters: gentoo
    volatile: False

pentoo
    location: /var/db/repos/pentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/pentoo.git
    masters: gentoo
    volatile: False

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: False

crossdev
    location: /var/db/repos/crossdev
    masters: gentoo
    priority: 10
    volatile: False

local
    location: /var/db/repos/local
    masters: gentoo
    priority: 1000
    volatile: False

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /lib/udev/rules.d /usr/lib64/libreoffice/program/sofficerc /usr/share/dbus-1/system-services /usr/share/genkernel/defaults /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=24 --load-average=24"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox selinux sesandbox sfperms split-elog strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://mirror.netcologne.de/gentoo/ https://mirror.netcologne.de/gentoo/ http://mirror.netcologne.de/gentoo/ rsync://mirror.netcologne.de/gentoo/ https://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ https://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/ ftp://ftp.halifax.rwth-aachen.de/gentoo/ rsync://ftp.halifax.rwth-aachen.de/gentoo/ https://ftp.fau.de/gentoo http://ftp.fau.de/gentoo ftp://ftp.fau.de/gentoo rsync://ftp.fau.de/gentoo https://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ rsync://ftp-stud.hs-esslingen.de/gentoo/"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j24 -l24"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/zsh"
USE="X a52 aac acl acpi alsa amd64 audit bluetooth branding bzip2 cairo caps cdda cdr cet cli colord crypt cups d3d9 dbus dri dts dvd dvdr eds egl elogind encode evo exif flac fortran gbm gdbm gif gnome gnome-keyring gnome-online-accounts gnome-shell gpm gstreamer gtk gui hardened iconv icu introspection ipv6 jpeg keyring lcms libnotify libtirpc llvm mad mng mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl ogg open_perms opencl opengl openmp pam pango pcre pdf peer_perms pie png policykit ppds pulseaudio readline sdl seccomp selinux sound spell split-usr ssl ssp startup-notification svg sysprof test-rust tiff truetype udev udisks unconfined unicode upower usb vaapi vdpau vorbis vulkan wayland wxwidgets x264 xa xattr xcb xft xml xtpax xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8.2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11 python3_12" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Jan Breig 2023-10-26 15:15:28 UTC
Created attachment 873490 [details]
build.log.gz