Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

SandboxViolation when installing Kytos as a dependency from PyPI #494

Closed
erickvermot opened this issue Jun 30, 2017 · 3 comments
Closed
Labels
Milestone

Comments

@erickvermot
Copy link
Contributor

erickvermot commented Jun 30, 2017

if one inserts kytos as a requirement in a setuptools' install-requires argument, setup will abort since kytos setup.py is trying to insert files in arbitrary OS locations (/etc /var...) outside the build directory.
This happens because we are not following setuptools default procedures.
We should be moving/copying those files in a post-install script.

see #471, and #493

Searching for kytos-utils>=2017.1b3
Reading https://pypi.python.org/simple/kytos-utils/
Downloading https://pypi.python.org/packages/23/5b/32a2affe4b13f8de90e853066c65f2416f9940c016fbc29875ce173f2fa2/kytos-utils-2017.1b3.tar.gz#md5=67e95a90581693265e5220f0cb3006c4
Best match: kytos-utils 2017.1b3
Processing kytos-utils-2017.1b3.tar.gz
Writing /tmp/easy_install-8zys8oab/kytos-utils-2017.1b3/setup.cfg
Running kytos-utils-2017.1b3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-8zys8oab/kytos-utils-2017.1b3/egg-dist-tmp-yc03lqrl
error: Setup script exited with error: SandboxViolation: mkdir('/etc/skel/kytos/napp-structure/username', 511) {}

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
@hdiogenes
Copy link
Member

Superseded by #922.

@hdiogenes hdiogenes changed the title kytos python package cannot be used as install-requires in another package SandboxViolation when installing Kytos as a dependency from PyPI Mar 17, 2020
@hdiogenes
Copy link
Member

Steps to reproduce:

If you add kytos as a dependency to a NApp:

setup(name='kytos_of_core',
      install_requires=[
          'kytos',
          'python-openflow'
      ],

And try to install it:
python setup.py develop

You get the SandboxViolation error quoted in the issue description.

@hdiogenes hdiogenes reopened this Mar 17, 2020
@hdiogenes hdiogenes added this to the 2020.1b2 milestone Apr 8, 2020
@hdiogenes hdiogenes added this to Long Term Backlog in Kytos 2020.1 via automation Apr 8, 2020
@hdiogenes
Copy link
Member

Fixed in #1042 / #1053.

Kytos 2020.1 automation moved this from Long Term Backlog to Done Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
No open projects
Kytos 2020.1
  
Done
Development

No branches or pull requests

3 participants