Gentoo Archives: gentoo-commits

From: Alexandre Restovtsev <tetromino@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gnome:master commit in: www-client/epiphany/files/, www-client/epiphany/
Date: Mon, 05 Mar 2012 03:04:13
Message-Id: 1330916533.26a4d843313d00ba269b64e217f29e16224ac973.tetromino@gentoo
1 commit: 26a4d843313d00ba269b64e217f29e16224ac973
2 Author: Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 5 02:57:15 2012 +0000
4 Commit: Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
5 CommitDate: Mon Mar 5 03:02:13 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=26a4d843
7
8 www-client/epiphany: PaX fixes
9
10 Fix build problems on PaX with USE=introspection and mark
11 /usr/bin/epiphany so that it runs on PaX when webkit-gtk was built with
12 USE=jit.
13
14 ---
15 ...any-3.3.90.ebuild => epiphany-3.3.90-r1.ebuild} | 15 +++++++++++-
16 www-client/epiphany/epiphany-9999.ebuild | 15 +++++++++++-
17 .../epiphany-3.3.90-paxctl-introspection.patch | 24 ++++++++++++++++++++
18 www-client/epiphany/files/paxctl.sh | 24 ++++++++++++++++++++
19 4 files changed, 76 insertions(+), 2 deletions(-)
20
21 diff --git a/www-client/epiphany/epiphany-3.3.90.ebuild b/www-client/epiphany/epiphany-3.3.90-r1.ebuild
22 similarity index 84%
23 rename from www-client/epiphany/epiphany-3.3.90.ebuild
24 rename to www-client/epiphany/epiphany-3.3.90-r1.ebuild
25 index 7196555..5b5ecf5 100644
26 --- a/www-client/epiphany/epiphany-3.3.90.ebuild
27 +++ b/www-client/epiphany/epiphany-3.3.90-r1.ebuild
28 @@ -5,7 +5,7 @@
29 EAPI="4"
30 GCONF_DEBUG="yes"
31
32 -inherit eutils gnome2 versionator virtualx
33 +inherit autotools eutils gnome2 pax-utils versionator virtualx
34
35 DESCRIPTION="GNOME webbrowser based on Webkit"
36 HOMEPAGE="http://projects.gnome.org/epiphany/"
37 @@ -58,6 +58,14 @@ pkg_setup() {
38 $(use_enable test tests)"
39 }
40
41 +src_prepare() {
42 + # Build-time segfaults under PaX with USE=introspection
43 + epatch "${FILESDIR}/${PN}-3.3.90-paxctl-introspection.patch"
44 + cp "${FILESDIR}/paxctl.sh" "${S}/" || die
45 + eautoreconf
46 + gnome2_src_prepare
47 +}
48 +
49 src_test() {
50 # Tests require gsettings schemas from >=epiphany-3.3.5 to be installed
51 local v=$(best_version www-client/epiphany)
52 @@ -69,3 +77,8 @@ src_test() {
53 ewarn "installed on the system."
54 fi
55 }
56 +
57 +src_install() {
58 + gnome2_src_install
59 + pax-mark m "${ED}usr/bin/epiphany"
60 +}
61
62 diff --git a/www-client/epiphany/epiphany-9999.ebuild b/www-client/epiphany/epiphany-9999.ebuild
63 index 1377caf..fccc78e 100644
64 --- a/www-client/epiphany/epiphany-9999.ebuild
65 +++ b/www-client/epiphany/epiphany-9999.ebuild
66 @@ -5,7 +5,7 @@
67 EAPI="4"
68 GCONF_DEBUG="yes"
69
70 -inherit eutils gnome2 versionator virtualx
71 +inherit autotools eutils gnome2 pax-utils versionator virtualx
72 if [[ ${PV} = 9999 ]]; then
73 inherit gnome2-live
74 fi
75 @@ -65,6 +65,14 @@ pkg_setup() {
76 $(use_enable test tests)"
77 }
78
79 +src_prepare() {
80 + # Build-time segfaults under PaX with USE=introspection
81 + epatch "${FILESDIR}/${PN}-3.3.90-paxctl-introspection.patch"
82 + cp "${FILESDIR}/paxctl.sh" "${S}/" || die
83 + eautoreconf
84 + gnome2_src_prepare
85 +}
86 +
87 src_test() {
88 # Tests require gsettings schemas from >=epiphany-3.3.5 to be installed
89 local v=$(best_version www-client/epiphany)
90 @@ -76,3 +84,8 @@ src_test() {
91 ewarn "installed on the system."
92 fi
93 }
94 +
95 +src_install() {
96 + gnome2_src_install
97 + pax-mark m "${ED}usr/bin/epiphany"
98 +}
99
100 diff --git a/www-client/epiphany/files/epiphany-3.3.90-paxctl-introspection.patch b/www-client/epiphany/files/epiphany-3.3.90-paxctl-introspection.patch
101 new file mode 100644
102 index 0000000..f9e0616
103 --- /dev/null
104 +++ b/www-client/epiphany/files/epiphany-3.3.90-paxctl-introspection.patch
105 @@ -0,0 +1,24 @@
106 +From 1eee9260eba23a7fc17df49c5a0e24a99f88482a Mon Sep 17 00:00:00 2001
107 +From: Alexandre Rostovtsev <tetromino@g.o>
108 +Date: Sun, 4 Mar 2012 21:55:20 -0500
109 +Subject: [PATCH] Add PaX marking to allow building introspection under PaX
110 +
111 +---
112 + src/Makefile.am | 1 +
113 + 1 files changed, 1 insertions(+), 0 deletions(-)
114 +
115 +diff --git a/src/Makefile.am b/src/Makefile.am
116 +index d6bf77f..ce52591 100644
117 +--- a/src/Makefile.am
118 ++++ b/src/Makefile.am
119 +@@ -277,6 +277,7 @@ EPHY_GIR_C_FILES = \
120 +
121 + Epiphany-$(EPIPHANY_API_VERSION).gir: $(INTROSPECTION_SCANNER) $(EPHY_GIR_H_FILES) \
122 + $(EPHY_GIR_C_FILES) epiphany
123 ++ bash $(top_srcdir)/paxctl.sh -m ./epiphany
124 + $(AM_V_GEN) PKG_CONFIG_PATH=$(top_builddir)/data:$$PKG_CONFIG_PATH \
125 + $(INTROSPECTION_SCANNER) -v --warn-all \
126 + --identifier-prefix=Ephy \
127 +--
128 +1.7.8.5
129 +
130
131 diff --git a/www-client/epiphany/files/paxctl.sh b/www-client/epiphany/files/paxctl.sh
132 new file mode 100755
133 index 0000000..bb1b6e0
134 --- /dev/null
135 +++ b/www-client/epiphany/files/paxctl.sh
136 @@ -0,0 +1,24 @@
137 +#!/bin/bash
138 +# PaX marking code stolen from pax-utils.eclass
139 +
140 +flags=${1//-}; shift
141 +
142 +if type -p paxctl > /dev/null; then
143 + echo "PT PaX marking -${flags} $@"
144 + for f in "$@"; do
145 + # First, try modifying the existing PAX_FLAGS header
146 + paxctl -q${flags} "${f}" && continue
147 + # Second, try stealing the (unused under PaX) PT_GNU_STACK header
148 + paxctl -qc${flags} "${f}" && continue
149 + # Third, try pulling the base down a page, to create space and
150 + # insert a PT_GNU_STACK header (works on ET_EXEC)
151 + paxctl -qC${flags} "${f}" && continue
152 + done
153 +elif type -p scanelf > /dev/null; then
154 + # Try scanelf, the Gentoo swiss-army knife ELF utility
155 + # Currently this sets PT if it can, no option to control what it does.
156 + echo "Fallback PaX marking -${flags} $@"
157 + scanelf -Xxz ${flags} "$@"
158 +fi
159 +
160 +exit 0