Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pyxdg/files/, dev-python/pyxdg/
Date: Sun, 26 Jan 2020 17:45:47
Message-Id: 1580060726.fdf7963d5cf80533f29c008e272f49342e19bb25.mgorny@gentoo
1 commit: fdf7963d5cf80533f29c008e272f49342e19bb25
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 26 17:23:35 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 26 17:45:26 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdf7963d
7
8 dev-python/pyxdg: Remove old
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pyxdg/Manifest | 1 -
13 .../pyxdg/files/sec-patch-CVE-2014-1624.patch | 54 ----------------------
14 dev-python/pyxdg/pyxdg-0.25-r1.ebuild | 27 -----------
15 dev-python/pyxdg/pyxdg-0.26.ebuild | 31 -------------
16 4 files changed, 113 deletions(-)
17
18 diff --git a/dev-python/pyxdg/Manifest b/dev-python/pyxdg/Manifest
19 index 176840507ba..40a65a9d767 100644
20 --- a/dev-python/pyxdg/Manifest
21 +++ b/dev-python/pyxdg/Manifest
22 @@ -1,2 +1 @@
23 -DIST pyxdg-0.25.tar.gz 48935 BLAKE2B 8feffefff37da1e560040b36cc1ccb4ffdc57642b4de92f7a937303a02117ffe263a5dfc91bb6e85112ce60bc19509c21e7f8f859ef3ca5fca0e8c87a61cb128 SHA512 86cbf3a54fb8e79043db60dcdbb3fb10013ae25a900fa3592edc8a24bf3f440c19bc04626c7906293c785fcb56eab9d87d209b723b5baa872376ba1eb86758b6
24 DIST pyxdg-rel-0.26.tar.gz 68435 BLAKE2B a95948db17da9909554e82c0ccf590c3f94ec26d1e34d5ba335868233a649368c08ef30cc19e878310ef038e5bdb6d18cd0e15e9413d9c54b70931f25844ee8c SHA512 0c11bccb74b8c0d98f3c63c318d35d08e1c3bbea128bf7b82792e1bdc0a60c8c4d6414b0612b19296cfb48f7951dfc6dd55ac8d23238e370e7faf6c4f64d1fb6
25
26 diff --git a/dev-python/pyxdg/files/sec-patch-CVE-2014-1624.patch b/dev-python/pyxdg/files/sec-patch-CVE-2014-1624.patch
27 deleted file mode 100644
28 index d94c0a42bdd..00000000000
29 --- a/dev-python/pyxdg/files/sec-patch-CVE-2014-1624.patch
30 +++ /dev/null
31 @@ -1,54 +0,0 @@
32 -Improve security of get_runtime_dir(strict=False)
33 -https://github.com/takluyver/pyxdg/commit/bd999c1c3fe7ee5f30ede2cf704cf03e400347b4
34 -diff --git a/xdg/BaseDirectory.py b/xdg/BaseDirectory.py
35 -index cececa3..a7c31b1 100644
36 ---- a/xdg/BaseDirectory.py
37 -+++ b/xdg/BaseDirectory.py
38 -@@ -25,7 +25,7 @@
39 - Note: see the rox.Options module for a higher-level API for managing options.
40 - """
41 -
42 --import os
43 -+import os, stat
44 -
45 - _home = os.path.expanduser('~')
46 - xdg_data_home = os.environ.get('XDG_DATA_HOME') or \
47 -@@ -131,15 +131,30 @@ def get_runtime_dir(strict=True):
48 -
49 - import getpass
50 - fallback = '/tmp/pyxdg-runtime-dir-fallback-' + getpass.getuser()
51 -+ create = False
52 -+
53 - try:
54 -- os.mkdir(fallback, 0o700)
55 -+ # This must be a real directory, not a symlink, so attackers can't
56 -+ # point it elsewhere. So we use lstat to check it.
57 -+ st = os.lstat(fallback)
58 - except OSError as e:
59 - import errno
60 -- if e.errno == errno.EEXIST:
61 -- # Already exists - set 700 permissions again.
62 -- import stat
63 -- os.chmod(fallback, stat.S_IRUSR|stat.S_IWUSR|stat.S_IXUSR)
64 -- else: # pragma: no cover
65 -+ if e.errno == errno.ENOENT:
66 -+ create = True
67 -+ else:
68 - raise
69 --
70 -+ else:
71 -+ # The fallback must be a directory
72 -+ if not stat.S_ISDIR(st.st_mode):
73 -+ os.unlink(fallback)
74 -+ create = True
75 -+ # Must be owned by the user and not accessible by anyone else
76 -+ elif (st.st_uid != os.getuid()) \
77 -+ or (st.st_mode & (stat.S_IRWXG | stat.S_IRWXO)):
78 -+ os.rmdir(fallback)
79 -+ create = True
80 -+
81 -+ if create:
82 -+ os.mkdir(fallback, 0o700)
83 -+
84 - return fallback
85 -
86
87 diff --git a/dev-python/pyxdg/pyxdg-0.25-r1.ebuild b/dev-python/pyxdg/pyxdg-0.25-r1.ebuild
88 deleted file mode 100644
89 index ef1b0c486d5..00000000000
90 --- a/dev-python/pyxdg/pyxdg-0.25-r1.ebuild
91 +++ /dev/null
92 @@ -1,27 +0,0 @@
93 -# Copyright 1999-2020 Gentoo Authors
94 -# Distributed under the terms of the GNU General Public License v2
95 -
96 -EAPI=5
97 -
98 -PYTHON_COMPAT=( python{2_7,3_6} )
99 -inherit distutils-r1
100 -
101 -DESCRIPTION="A Python module to deal with freedesktop.org specifications"
102 -HOMEPAGE="https://freedesktop.org/wiki/Software/pyxdg https://cgit.freedesktop.org/xdg/pyxdg/"
103 -SRC_URI="https://people.freedesktop.org/~takluyver/${P}.tar.gz"
104 -
105 -LICENSE="LGPL-2"
106 -SLOT="0"
107 -KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 sparc x86"
108 -IUSE="test"
109 -RESTRICT="!test? ( test )"
110 -
111 -DEPEND="test? ( dev-python/nose[${PYTHON_USEDEP}]
112 - x11-themes/hicolor-icon-theme )"
113 -
114 -DOCS=( AUTHORS ChangeLog README TODO )
115 -PATCHES=( "${FILESDIR}"/sec-patch-CVE-2014-1624.patch )
116 -
117 -python_test() {
118 - nosetests || die
119 -}
120
121 diff --git a/dev-python/pyxdg/pyxdg-0.26.ebuild b/dev-python/pyxdg/pyxdg-0.26.ebuild
122 deleted file mode 100644
123 index b7485e40e20..00000000000
124 --- a/dev-python/pyxdg/pyxdg-0.26.ebuild
125 +++ /dev/null
126 @@ -1,31 +0,0 @@
127 -# Copyright 1999-2020 Gentoo Authors
128 -# Distributed under the terms of the GNU General Public License v2
129 -
130 -EAPI=6
131 -
132 -PYTHON_COMPAT=( python{2_7,3_6} )
133 -inherit distutils-r1
134 -
135 -MY_P=${PN}-rel-${PV}
136 -DESCRIPTION="A Python module to deal with freedesktop.org specifications"
137 -HOMEPAGE="https://freedesktop.org/wiki/Software/pyxdg https://cgit.freedesktop.org/xdg/pyxdg/"
138 -# official mirror of the git repo
139 -SRC_URI="https://github.com/takluyver/pyxdg/archive/rel-${PV}.tar.gz -> ${MY_P}.tar.gz"
140 -
141 -LICENSE="LGPL-2"
142 -SLOT="0"
143 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
144 -IUSE="test"
145 -RESTRICT="!test? ( test )"
146 -
147 -DEPEND="
148 - test? (
149 - dev-python/nose[${PYTHON_USEDEP}]
150 - x11-themes/hicolor-icon-theme
151 - )"
152 -
153 -S=${WORKDIR}/${MY_P}
154 -
155 -python_test() {
156 - nosetests -v || die
157 -}