diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-python/cffi/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-python/cffi/files')
-rw-r--r-- | dev-python/cffi/files/cffi-1.1.0-test-backport.patch | 44 | ||||
-rw-r--r-- | dev-python/cffi/files/issue177_prot_exec.patch | 79 |
2 files changed, 123 insertions, 0 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 new file mode 100644 index 000000000000..2609e333991e --- /dev/null +++ b/dev-python/cffi/files/cffi-1.1.0-test-backport.patch @@ -0,0 +1,44 @@ +# 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 new file mode 100644 index 000000000000..8dbcf07c0052 --- /dev/null +++ b/dev-python/cffi/files/issue177_prot_exec.patch @@ -0,0 +1,79 @@ +# 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); |