summaryrefslogtreecommitdiff
path: root/app-admin/salt/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /app-admin/salt/files
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'app-admin/salt/files')
-rw-r--r--app-admin/salt/files/salt-3002-dont-realpath-on-tmpdir.patch38
-rw-r--r--app-admin/salt/files/salt-3002-tests.patch27
2 files changed, 65 insertions, 0 deletions
diff --git a/app-admin/salt/files/salt-3002-dont-realpath-on-tmpdir.patch b/app-admin/salt/files/salt-3002-dont-realpath-on-tmpdir.patch
new file mode 100644
index 000000000000..5ef68dcd1803
--- /dev/null
+++ b/app-admin/salt/files/salt-3002-dont-realpath-on-tmpdir.patch
@@ -0,0 +1,38 @@
+diff --git a/tests/integration/files/file/base/_modules/runtests_helpers.py b/tests/integration/files/file/base/_modules/runtests_helpers.py
+index 3ee0e2da5f..5b462f0a9e 100644
+--- a/tests/integration/files/file/base/_modules/runtests_helpers.py
++++ b/tests/integration/files/file/base/_modules/runtests_helpers.py
+@@ -18,7 +18,7 @@ try:
+ from tests.support.runtests import RUNTIME_VARS
+ except ImportError:
+ # Salt SSH Tests
+- SYS_TMP_DIR = os.path.realpath(
++ SYS_TMP_DIR = os.path.abspath(
+ # Avoid ${TMPDIR} and gettempdir() on MacOS as they yield a base path too long
+ # for unix sockets: ``error: AF_UNIX path too long``
+ # Gentoo Portage prefers ebuild tests are rooted in ${TMPDIR}
+diff --git a/tests/support/paths.py b/tests/support/paths.py
+index 5f28904858..26245fadf9 100644
+--- a/tests/support/paths.py
++++ b/tests/support/paths.py
+@@ -48,14 +48,12 @@ if TESTS_DIR not in sys.path:
+ sys.path.insert(1, TESTS_DIR)
+
+ SYS_TMP_DIR = os.path.abspath(
+- os.path.realpath(
+- # Avoid ${TMPDIR} and gettempdir() on MacOS as they yield a base path too long
+- # for unix sockets: ``error: AF_UNIX path too long``
+- # Gentoo Portage prefers ebuild tests are rooted in ${TMPDIR}
+- os.environ.get("TMPDIR", tempfile.gettempdir())
+- if not sys.platform.startswith("darwin")
+- else "/tmp"
+- )
++ # Avoid ${TMPDIR} and gettempdir() on MacOS as they yield a base path too long
++ # for unix sockets: ``error: AF_UNIX path too long``
++ # Gentoo Portage prefers ebuild tests are rooted in ${TMPDIR}
++ os.environ.get("TMPDIR", tempfile.gettempdir())
++ if not sys.platform.startswith("darwin")
++ else "/tmp"
+ )
+ TMP = os.path.join(SYS_TMP_DIR, "salt-tests-tmpdir")
+ TMP_ROOT_DIR = os.path.join(TMP, "rootdir")
diff --git a/app-admin/salt/files/salt-3002-tests.patch b/app-admin/salt/files/salt-3002-tests.patch
new file mode 100644
index 000000000000..88e1ce590568
--- /dev/null
+++ b/app-admin/salt/files/salt-3002-tests.patch
@@ -0,0 +1,27 @@
+diff --git a/tests/unit/utils/test_verify.py b/tests/unit/utils/test_verify.py
+index 5662cf621b..16aa6d08da 100644
+--- a/tests/unit/utils/test_verify.py
++++ b/tests/unit/utils/test_verify.py
+@@ -329,6 +329,7 @@ class TestVerifyLog(TestCase):
+ self.assertTrue(os.path.exists(path))
+
+
++@skipIf(True, "skipping since temp dir is a symlink")
+ class TestCleanPath(TestCase):
+ """
+ salt.utils.clean_path works as expected
+@@ -394,12 +395,14 @@ class TestCleanPathLink(TestCase):
+ def tearDown(self):
+ shutil.rmtree(self.tmpdir)
+
++ @skipIf(True, "skipping since temp dir is a symlink")
+ def test_clean_path_symlinked_src(self):
+ test_path = os.path.join(self.from_path, "test")
+ expect_path = os.path.join(self.to_path, "test")
+ ret = clean_path(self.from_path, test_path)
+ assert ret == expect_path, "{} is not {}".format(ret, expect_path)
+
++ @skipIf(True, "skipping since temp dir is a symlink")
+ def test_clean_path_symlinked_tgt(self):
+ test_path = os.path.join(self.to_path, "test")
+ expect_path = os.path.join(self.to_path, "test")