* [gentoo-commits] repo/gentoo:master commit in: dev-python/cffi/files/
@ 2016-09-11 8:56 David Seifert
0 siblings, 0 replies; only message in thread
From: David Seifert @ 2016-09-11 8:56 UTC (permalink / raw
To: gentoo-commits
commit: 786b8c5943ceebee4e8467d3a071d942c5c84871
Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Fri Sep 9 17:14:36 2016 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Sep 11 08:48:31 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=786b8c59
dev-python/cffi: remove unused patches
Closes: https://github.com/gentoo/gentoo/pull/2291
Signed-off-by: David Seifert <soap <AT> gentoo.org>
.../cffi/files/cffi-1.1.0-test-backport.patch | 44 ------------
dev-python/cffi/files/issue177_prot_exec.patch | 79 ----------------------
2 files changed, 123 deletions(-)
diff --git a/dev-python/cffi/files/cffi-1.1.0-test-backport.patch b/dev-python/cffi/files/cffi-1.1.0-test-backport.patch
deleted file mode 100644
index 2609e33..00000000
--- a/dev-python/cffi/files/cffi-1.1.0-test-backport.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-# HG changeset patch
-# User Armin Rigo <arigo@tunes.org>
-# Date 1433182838 -7200
-# Node ID 34d5fd98bc84d202dd6692906f21509bb5abefaf
-# Parent feea0af4a450e0ff0045f1b7c0a5f430c97520f9
-Issue #204: second try
-
-diff --git a/testing/cffi1/test_zdist.py b/testing/cffi1/test_zdist.py
---- a/testing/cffi1/test_zdist.py
-+++ b/testing/cffi1/test_zdist.py
-@@ -29,13 +29,17 @@
- if hasattr(self, 'saved_cwd'):
- os.chdir(self.saved_cwd)
-
-- def run(self, args):
-+ def run(self, args, cwd=None):
- env = os.environ.copy()
-- newpath = self.rootdir
-- if 'PYTHONPATH' in env:
-- newpath += os.pathsep + env['PYTHONPATH']
-- env['PYTHONPATH'] = newpath
-- subprocess.check_call([self.executable] + args, env=env)
-+ # a horrible hack to prevent distutils from finding ~/.pydistutils.cfg
-+ # (there is the --no-user-cfg option, but not in Python 2.6...)
-+ env['HOME'] = '/this/path/does/not/exist'
-+ if cwd is None:
-+ newpath = self.rootdir
-+ if 'PYTHONPATH' in env:
-+ newpath += os.pathsep + env['PYTHONPATH']
-+ env['PYTHONPATH'] = newpath
-+ subprocess.check_call([self.executable] + args, cwd=cwd, env=env)
-
- def _prepare_setuptools(self):
- if hasattr(TestDist, '_setuptools_ready'):
-@@ -44,8 +48,7 @@
- import setuptools
- except ImportError:
- py.test.skip("setuptools not found")
-- subprocess.check_call([self.executable, 'setup.py', 'egg_info'],
-- cwd=self.rootdir)
-+ self.run(['setup.py', 'egg_info'], cwd=self.rootdir)
- TestDist._setuptools_ready = True
-
- def check_produced_files(self, content, curdir=None):
diff --git a/dev-python/cffi/files/issue177_prot_exec.patch b/dev-python/cffi/files/issue177_prot_exec.patch
deleted file mode 100644
index 8dbcf07..00000000
--- a/dev-python/cffi/files/issue177_prot_exec.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-# HG changeset patch
-# User Armin Rigo <arigo@tunes.org>
-# Date 1424942568 -3600
-# Node ID c7edb1e84eb3c29cac0674790cb4efcbcf1683b2
-# Parent 95e0563201602a2e1a8d83cc95a6a70048dfeece
-issue #177: workaround for some Linux kernels
-
-diff --git a/c/malloc_closure.h b/c/malloc_closure.h
---- a/c/malloc_closure.h
-+++ b/c/malloc_closure.h
-@@ -14,6 +14,54 @@
- # endif
- #endif
-
-+/* On PaX enable kernels that have MPROTECT enable we can't use PROT_EXEC.
-+
-+ This is, apparently, an undocumented change to ffi_prep_closure():
-+ depending on the Linux kernel we're running on, we must give it a
-+ mmap that is either PROT_READ|PROT_WRITE|PROT_EXEC or only
-+ PROT_READ|PROT_WRITE. In the latter case, just trying to obtain a
-+ mmap with PROT_READ|PROT_WRITE|PROT_EXEC would kill our process(!),
-+ but in that situation libffi is fine with only PROT_READ|PROT_WRITE.
-+ There is nothing in the libffi API to know that, though, so we have
-+ to guess by parsing /proc/self/status. "Meh."
-+ */
-+#ifdef __linux__
-+#include <stdlib.h>
-+
-+static int emutramp_enabled = -1;
-+
-+static int
-+emutramp_enabled_check (void)
-+{
-+ char *buf = NULL;
-+ size_t len = 0;
-+ FILE *f;
-+ int ret;
-+ f = fopen ("/proc/self/status", "r");
-+ if (f == NULL)
-+ return 0;
-+ ret = 0;
-+
-+ while (getline (&buf, &len, f) != -1)
-+ if (!strncmp (buf, "PaX:", 4))
-+ {
-+ char emutramp;
-+ if (sscanf (buf, "%*s %*c%c", &emutramp) == 1)
-+ ret = (emutramp == 'E');
-+ break;
-+ }
-+ free (buf);
-+ fclose (f);
-+ return ret;
-+}
-+
-+#define is_emutramp_enabled() (emutramp_enabled >= 0 ? emutramp_enabled \
-+ : (emutramp_enabled = emutramp_enabled_check ()))
-+#else
-+#define is_emutramp_enabled() 0
-+#endif
-+
-+
- /* 'allocate_num_pages' is dynamically adjusted starting from one
- page. It grows by a factor of PAGE_ALLOCATION_GROWTH_RATE. This is
- meant to handle both the common case of not needing a lot of pages,
-@@ -77,9 +125,12 @@
- if (item == NULL)
- return;
- #else
-+ int prot = PROT_READ | PROT_WRITE | PROT_EXEC;
-+ if (is_emutramp_enabled ())
-+ prot &= ~PROT_EXEC;
- item = (union mmaped_block *)mmap(NULL,
- allocate_num_pages * _pagesize,
-- PROT_READ | PROT_WRITE | PROT_EXEC,
-+ prot,
- MAP_PRIVATE | MAP_ANONYMOUS,
- -1,
- 0);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-09-11 8:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-11 8:56 [gentoo-commits] repo/gentoo:master commit in: dev-python/cffi/files/ David Seifert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox