summaryrefslogtreecommitdiff
path: root/dev-python/pyxdg
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/pyxdg
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/pyxdg')
-rw-r--r--dev-python/pyxdg/Manifest6
-rw-r--r--dev-python/pyxdg/files/sec-patch-CVE-2014-1624.patch54
-rw-r--r--dev-python/pyxdg/metadata.xml14
-rw-r--r--dev-python/pyxdg/pyxdg-0.25-r1.ebuild26
-rw-r--r--dev-python/pyxdg/pyxdg-0.26.ebuild30
5 files changed, 130 insertions, 0 deletions
diff --git a/dev-python/pyxdg/Manifest b/dev-python/pyxdg/Manifest
new file mode 100644
index 000000000000..590870d34d4d
--- /dev/null
+++ b/dev-python/pyxdg/Manifest
@@ -0,0 +1,6 @@
+AUX sec-patch-CVE-2014-1624.patch 1867 BLAKE2B 7345af45e863876b9c0f11c0dedb2dc124e53448c532bcf622f085e3a4c3040c9308352414e173c6adf74cb1c55efaac1824bb99fc8013f63dc8cfd3610989ea SHA512 f0ff5255108b7a5774d376a8892f1120f5056ec92fa543af7e5aabe3792e7ecd347ac78ff5c04ab36db35bba513a412f6aa06fe718933317a903264bd184b712
+DIST pyxdg-0.25.tar.gz 48935 BLAKE2B 8feffefff37da1e560040b36cc1ccb4ffdc57642b4de92f7a937303a02117ffe263a5dfc91bb6e85112ce60bc19509c21e7f8f859ef3ca5fca0e8c87a61cb128 SHA512 86cbf3a54fb8e79043db60dcdbb3fb10013ae25a900fa3592edc8a24bf3f440c19bc04626c7906293c785fcb56eab9d87d209b723b5baa872376ba1eb86758b6
+DIST pyxdg-rel-0.26.tar.gz 68435 BLAKE2B a95948db17da9909554e82c0ccf590c3f94ec26d1e34d5ba335868233a649368c08ef30cc19e878310ef038e5bdb6d18cd0e15e9413d9c54b70931f25844ee8c SHA512 0c11bccb74b8c0d98f3c63c318d35d08e1c3bbea128bf7b82792e1bdc0a60c8c4d6414b0612b19296cfb48f7951dfc6dd55ac8d23238e370e7faf6c4f64d1fb6
+EBUILD pyxdg-0.25-r1.ebuild 755 BLAKE2B 15a48e50dce7a5e0e35c4f6e4e4c56ab62db05c5d685b067935fcd1f7a9f616945e75ff8fa9945041c50a99bf4a242e5443eca316f499f79df9f0e31a0e3376a SHA512 f4f92b92d43107ea6d2aad282683b001db8b89d5747a9dcd33ac81b1eb908ab755f70d7484094bc455c578b07798fd149875675fda5e380918182d3653df536f
+EBUILD pyxdg-0.26.ebuild 778 BLAKE2B 73b062df847ecc66d843f28e1106db6058288c4d5a56283f1f1fcfa150d4692da5cf9b73920e4b1a16a409081c33dd2f25bc9621ae683c660a1729510b75b315 SHA512 ac13b58a958ca4c57b01c019b265b018440f6a05cfe43b347bb0422d3f1b101415fed50104b6b2b313670a1cdcd1a2027fb6f1192acf3c0f32fd96fc87cd4112
+MISC metadata.xml 487 BLAKE2B 4967a9b3c1a439c3cc53208ad2095031b08c4848ade6f2bb08a69aedbef5f5046f28764db62bcf3cac4c1c33c68958a7d2aba03a3b4cb7b7a407e41eddfec5f1 SHA512 f00421023d46b9aa32d8038c5ba8bfdb1b60a732932d64f7d11fe6f0c163b734182e2162dde2ba663d7c74ba8c754ece721dfbfa0b8fa3081be622dfff3949ea
diff --git a/dev-python/pyxdg/files/sec-patch-CVE-2014-1624.patch b/dev-python/pyxdg/files/sec-patch-CVE-2014-1624.patch
new file mode 100644
index 000000000000..d94c0a42bddb
--- /dev/null
+++ b/dev-python/pyxdg/files/sec-patch-CVE-2014-1624.patch
@@ -0,0 +1,54 @@
+Improve security of get_runtime_dir(strict=False)
+https://github.com/takluyver/pyxdg/commit/bd999c1c3fe7ee5f30ede2cf704cf03e400347b4
+diff --git a/xdg/BaseDirectory.py b/xdg/BaseDirectory.py
+index cececa3..a7c31b1 100644
+--- a/xdg/BaseDirectory.py
++++ b/xdg/BaseDirectory.py
+@@ -25,7 +25,7 @@
+ Note: see the rox.Options module for a higher-level API for managing options.
+ """
+
+-import os
++import os, stat
+
+ _home = os.path.expanduser('~')
+ xdg_data_home = os.environ.get('XDG_DATA_HOME') or \
+@@ -131,15 +131,30 @@ def get_runtime_dir(strict=True):
+
+ import getpass
+ fallback = '/tmp/pyxdg-runtime-dir-fallback-' + getpass.getuser()
++ create = False
++
+ try:
+- os.mkdir(fallback, 0o700)
++ # This must be a real directory, not a symlink, so attackers can't
++ # point it elsewhere. So we use lstat to check it.
++ st = os.lstat(fallback)
+ except OSError as e:
+ import errno
+- if e.errno == errno.EEXIST:
+- # Already exists - set 700 permissions again.
+- import stat
+- os.chmod(fallback, stat.S_IRUSR|stat.S_IWUSR|stat.S_IXUSR)
+- else: # pragma: no cover
++ if e.errno == errno.ENOENT:
++ create = True
++ else:
+ raise
+-
++ else:
++ # The fallback must be a directory
++ if not stat.S_ISDIR(st.st_mode):
++ os.unlink(fallback)
++ create = True
++ # Must be owned by the user and not accessible by anyone else
++ elif (st.st_uid != os.getuid()) \
++ or (st.st_mode & (stat.S_IRWXG | stat.S_IRWXO)):
++ os.rmdir(fallback)
++ create = True
++
++ if create:
++ os.mkdir(fallback, 0o700)
++
+ return fallback
+
diff --git a/dev-python/pyxdg/metadata.xml b/dev-python/pyxdg/metadata.xml
new file mode 100644
index 000000000000..967f6f4f3925
--- /dev/null
+++ b/dev-python/pyxdg/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <upstream>
+ <doc lang="en">https://pyxdg.readthedocs.org/en/latest/</doc>
+ <bugs-to>https://bugs.freedesktop.org/</bugs-to>
+ <remote-id type="pypi">pyxdg</remote-id>
+ <remote-id type="launchpad">pyxdg</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/pyxdg/pyxdg-0.25-r1.ebuild b/dev-python/pyxdg/pyxdg-0.25-r1.ebuild
new file mode 100644
index 000000000000..eb164715e435
--- /dev/null
+++ b/dev-python/pyxdg/pyxdg-0.25-r1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy )
+inherit distutils-r1
+
+DESCRIPTION="A Python module to deal with freedesktop.org specifications"
+HOMEPAGE="https://freedesktop.org/wiki/Software/pyxdg https://cgit.freedesktop.org/xdg/pyxdg/"
+SRC_URI="https://people.freedesktop.org/~takluyver/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="test"
+
+DEPEND="test? ( dev-python/nose[${PYTHON_USEDEP}]
+ x11-themes/hicolor-icon-theme )"
+
+DOCS=( AUTHORS ChangeLog README TODO )
+PATCHES=( "${FILESDIR}"/sec-patch-CVE-2014-1624.patch )
+
+python_test() {
+ nosetests || die
+}
diff --git a/dev-python/pyxdg/pyxdg-0.26.ebuild b/dev-python/pyxdg/pyxdg-0.26.ebuild
new file mode 100644
index 000000000000..865cf22122e7
--- /dev/null
+++ b/dev-python/pyxdg/pyxdg-0.26.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy )
+inherit distutils-r1
+
+MY_P=${PN}-rel-${PV}
+DESCRIPTION="A Python module to deal with freedesktop.org specifications"
+HOMEPAGE="https://freedesktop.org/wiki/Software/pyxdg https://cgit.freedesktop.org/xdg/pyxdg/"
+# official mirror of the git repo
+SRC_URI="https://github.com/takluyver/pyxdg/archive/rel-${PV}.tar.gz -> ${MY_P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="test"
+
+DEPEND="
+ test? (
+ dev-python/nose[${PYTHON_USEDEP}]
+ x11-themes/hicolor-icon-theme
+ )"
+
+S=${WORKDIR}/${MY_P}
+
+python_test() {
+ nosetests -v || die
+}