Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/emacs-tools:patchsets commit in: emacs/24.3/, emacs/23.4/
Date: Mon, 30 Dec 2013 23:37:47
Message-Id: 1388445264.88a257278a1a85b82884b84d634f73f65c40b9c2.ulm@gentoo
1 commit: 88a257278a1a85b82884b84d634f73f65c40b9c2
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 30 23:14:24 2013 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 30 23:14:24 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs-tools.git;a=commit;h=88a25727
7
8 Fix failure in unexec with hardened kernel, bug 456970.
9
10 ---
11 emacs/23.4/15_all_pax-xattr.patch | 45 +++++++++++++++++++++++++++++++++++++++
12 emacs/24.3/04_all_pax-xattr.patch | 45 +++++++++++++++++++++++++++++++++++++++
13 2 files changed, 90 insertions(+)
14
15 diff --git a/emacs/23.4/15_all_pax-xattr.patch b/emacs/23.4/15_all_pax-xattr.patch
16 new file mode 100644
17 index 0000000..53d97c3
18 --- /dev/null
19 +++ b/emacs/23.4/15_all_pax-xattr.patch
20 @@ -0,0 +1,45 @@
21 +Fix failure in unexec with hardened Linux kernel and XATTR_PAX_FLAGS=y.
22 +https://bugs.gentoo.org/456970
23 +
24 +--- emacs-23.4-orig/configure.in
25 ++++ emacs-23.4/configure.in
26 +@@ -812,6 +812,18 @@
27 + fi
28 + fi
29 +
30 ++AC_PATH_PROG(SETFATTR, setfattr)
31 ++if test "X$SETFATTR" != X; then
32 ++ AC_MSG_CHECKING([whether extended attributes are supported])
33 ++ touch conftest.tmp
34 ++ if $SETFATTR -n user.pax.flags conftest.tmp >/dev/null 2>&1; then
35 ++ AC_MSG_RESULT(yes)
36 ++ else
37 ++ AC_MSG_RESULT(no); SETFATTR=""
38 ++ fi
39 ++ rm -f conftest.tmp
40 ++fi
41 ++
42 + ## Need makeinfo >= 4.6 (?) to build the manuals.
43 + AC_PATH_PROG(MAKEINFO, makeinfo, no)
44 + dnl By this stage, configure has already checked for egrep and set EGREP,
45 +--- emacs-23.4-orig/src/Makefile.in
46 ++++ emacs-23.4/src/Makefile.in
47 +@@ -514,6 +514,9 @@
48 + memory randomization in temacs with "paxctl -r". See bug#11398. */
49 + PAXCTL = @PAXCTL@
50 +
51 ++/* If available, the full path to the setfattr program. */
52 ++SETFATTR = @SETFATTR@
53 ++
54 + /* A macro which other sections of Makefile can redefine to munge the
55 + flags before they are passed to LD. This is helpful if you have
56 + redefined LD to something odd, like "gcc".
57 +@@ -983,6 +986,8 @@
58 + #endif
59 + #ifndef CANNOT_DUMP
60 + test "X$(PAXCTL)" = X || $(PAXCTL) -r temacs$(EXEEXT)
61 ++ test "X$(SETFATTR)" = X \
62 ++ || $(SETFATTR) -n user.pax.flags -v r temacs$(EXEEXT)
63 + #endif
64 +
65 + /* We do not use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE
66
67 diff --git a/emacs/24.3/04_all_pax-xattr.patch b/emacs/24.3/04_all_pax-xattr.patch
68 new file mode 100644
69 index 0000000..90346ba
70 --- /dev/null
71 +++ b/emacs/24.3/04_all_pax-xattr.patch
72 @@ -0,0 +1,45 @@
73 +Fix failure in unexec with hardened Linux kernel and XATTR_PAX_FLAGS=y.
74 +https://bugs.gentoo.org/456970
75 +
76 +--- emacs-24.3-orig/configure.ac
77 ++++ emacs-24.3/configure.ac
78 +@@ -790,6 +790,18 @@
79 + fi
80 + fi
81 +
82 ++AC_PATH_PROG(SETFATTR, setfattr)
83 ++if test "X$SETFATTR" != X; then
84 ++ AC_MSG_CHECKING([whether extended attributes are supported])
85 ++ touch conftest.tmp
86 ++ if $SETFATTR -n user.pax.flags conftest.tmp >/dev/null 2>&1; then
87 ++ AC_MSG_RESULT(yes)
88 ++ else
89 ++ AC_MSG_RESULT(no); SETFATTR=""
90 ++ fi
91 ++ rm -f conftest.tmp
92 ++fi
93 ++
94 + ## Need makeinfo >= 4.7 (?) to build the manuals.
95 + AC_PATH_PROG(MAKEINFO, makeinfo, no)
96 + dnl By this stage, configure has already checked for egrep and set EGREP,
97 +--- emacs-24.3-orig/src/Makefile.in
98 ++++ emacs-24.3/src/Makefile.in
99 +@@ -115,6 +115,9 @@
100 + ## memory randomization in temacs with "paxctl -r". See bug#11398.
101 + PAXCTL = @PAXCTL@
102 +
103 ++## If available, the full path to the setfattr program.
104 ++SETFATTR = @SETFATTR@
105 ++
106 + ## Some systems define this to request special libraries.
107 + LIBS_SYSTEM=@LIBS_SYSTEM@
108 +
109 +@@ -467,6 +470,8 @@
110 + -o temacs $(START_FILES) $(obj) $(otherobj) $(lib)/libgnu.a $(LIBES)
111 + test "$(CANNOT_DUMP)" = "yes" || \
112 + test "X$(PAXCTL)" = X || $(PAXCTL) -r temacs$(EXEEXT)
113 ++ test "$(CANNOT_DUMP)" = "yes" || test "X$(SETFATTR)" = X || \
114 ++ $(SETFATTR) -n user.pax.flags -v r temacs$(EXEEXT)
115 +
116 + ## The following oldxmenu-related rules are only (possibly) used if
117 + ## HAVE_X11 && !USE_GTK, but there is no harm in always defining them