diff options
author | 2012-08-15 18:50:08 +0000 | |
---|---|---|
committer | 2012-08-15 18:50:08 +0000 | |
commit | fda3af1cad09522933db6f1a0b44c33bd149aaad (patch) | |
tree | ca831865d2da4acd4fa95fb5be3edc68cbdafe15 | |
parent | Fix security flaw in enable-local-eval, bug 431178. (diff) | |
download | emacs-patches-fda3af1cad09522933db6f1a0b44c33bd149aaad.tar.gz emacs-patches-fda3af1cad09522933db6f1a0b44c33bd149aaad.tar.bz2 emacs-patches-fda3af1cad09522933db6f1a0b44c33bd149aaad.zip |
Initial patchset for Emacs 24.2.emacs-24.2-patches-1
-rw-r--r-- | emacs/24.2/01_all_ns-appdirs.patch | 41 | ||||
-rw-r--r-- | emacs/24.2/02_all_paxctl.patch | 66 | ||||
-rw-r--r-- | emacs/24.2/03_all_x32.patch | 21 | ||||
-rw-r--r-- | emacs/24.2/05_all_freebsd.patch | 16 |
4 files changed, 144 insertions, 0 deletions
diff --git a/emacs/24.2/01_all_ns-appdirs.patch b/emacs/24.2/01_all_ns-appdirs.patch new file mode 100644 index 0000000..a8e3f82 --- /dev/null +++ b/emacs/24.2/01_all_ns-appdirs.patch @@ -0,0 +1,41 @@ +https://bugs.gentoo.org/268793 +https://bugs.gentoo.org/399059 + +--- emacs-24.1-orig/Makefile.in ++++ emacs-24.1/Makefile.in +@@ -476,21 +476,6 @@ + -chmod 1755 $(DESTDIR)${bindir}/$(EMACSFULL) + rm -f $(DESTDIR)${bindir}/$(EMACS) + -ln $(DESTDIR)${bindir}/$(EMACSFULL) $(DESTDIR)${bindir}/$(EMACS) +- if test "${ns_appresdir}" != ""; then \ +- ( cd ${ns_appresdir} ; \ +- if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\ +- if test -d share/info ; then dir=share/info; $(MV_DIRS) ; fi ; \ +- rm -fr share ) ; \ +- ( cd ${ns_appbindir} ; \ +- if cd libexec ; then dir=emacs/*/*/* ; $(MV_DIRS); \ +- rm -fr emacs; if cd ../bin; then rm -f emacs emacs-24*; \ +- ln -sf ../libexec/* . ; fi ; fi ) ; \ +- else true ; fi +- +-## FIXME is the emacs-24* bit above really necessary and correct? +-## What if I have 24.1 and 24.2 installed at the same time? +-## In any case, it should use something like echo $version | sed 's/\..*//' +-## instead of hard-coding a version. + + ## http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg01672.html + ## Needs to be the user running install, so configure can't set it. +--- emacs-24.1-orig/leim/Makefile.in ++++ emacs-24.1/leim/Makefile.in +@@ -259,11 +259,6 @@ + [ -n "$${installuser}" ] && break ; \ + done ; \ + find ${INSTALLDIR} -exec chown $${installuser} '{}' ';' +- if [ "${ns_appresdir}" != "" ]; then \ +- ( cd ${ns_appresdir} ; \ +- if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\ +- rm -fr share ) ; \ +- else true ; fi + + clean mostlyclean: + rm -f ${TIT_MISC} ${TIT_MISC:.elc=.el} \ diff --git a/emacs/24.2/02_all_paxctl.patch b/emacs/24.2/02_all_paxctl.patch new file mode 100644 index 0000000..1f659e6 --- /dev/null +++ b/emacs/24.2/02_all_paxctl.patch @@ -0,0 +1,66 @@ +On grsecurity/PaX systems, unexec will fail due to a gap between +the bss section and the heap. This can be prevented by disabling +memory randomization in temacs with "paxctl -r". +https://bugs.gentoo.org/411439 +https://bugs.gentoo.org/426394 +http://debbugs.gnu.org/11398 + +--- emacs-24.1-orig/configure.in ++++ emacs-24.1/configure.in +@@ -757,6 +757,16 @@ + dnl Don't use GZIP, which is used by gzip for additional parameters. + AC_PATH_PROG(GZIP_PROG, gzip) + ++if test $opsys = gnu-linux; then ++ AC_PATH_PROG(PAXCTL, paxctl,, ++ [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin]) ++ if test "X$PAXCTL" != X; then ++ AC_MSG_CHECKING([whether binaries have a PT_PAX_FLAGS header]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], ++ [if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then AC_MSG_RESULT(yes) ++ else AC_MSG_RESULT(no); PAXCTL=""; fi]) ++ fi ++fi + + ## Need makeinfo >= 4.6 (?) to build the manuals. + AC_PATH_PROG(MAKEINFO, makeinfo, no) +--- emacs-24.1-orig/src/Makefile.in ++++ emacs-24.1/src/Makefile.in +@@ -116,6 +116,12 @@ + ## $LDFLAGS or empty if NS_IMPL_GNUSTEP (for some reason). + TEMACS_LDFLAGS2 = @TEMACS_LDFLAGS2@ + ++## If available, the full path to the paxctl program. ++## On grsecurity/PaX systems, unexec will fail due to a gap between ++## the bss section and the heap. This can be prevented by disabling ++## memory randomization in temacs with "paxctl -r". See bug#11398. ++PAXCTL = @PAXCTL@ ++ + ## Some systems define this to request special libraries. + LIBS_SYSTEM=@LIBS_SYSTEM@ + +@@ -406,6 +412,7 @@ + -f list-load-path-shadows || true; \ + else \ + LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump || exit 1; \ ++ test "X$(PAXCTL)" = X || $(PAXCTL) -zex emacs$(EXEEXT); \ + ln -f emacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \ + ./emacs -batch -f list-load-path-shadows || true; \ + fi +@@ -453,6 +460,8 @@ + temacs$(EXEEXT): $(START_FILES) stamp-oldxmenu $(obj) $(otherobj) $(lib)/libgnu.a + $(CC) $(LD_FIRSTFLAG) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(TEMACS_LDFLAGS2) \ + -o temacs $(START_FILES) $(obj) $(otherobj) $(lib)/libgnu.a $(LIBES) ++ test "$(CANNOT_DUMP)" = "yes" || \ ++ test "X$(PAXCTL)" = X || $(PAXCTL) -r temacs$(EXEEXT) + + ## The following oldxmenu-related rules are only (possibly) used if + ## HAVE_X11 && !USE_GTK, but there is no harm in always defining them +@@ -600,6 +609,7 @@ + ln -f temacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \ + else \ + $(RUN_TEMACS) --batch --load loadup bootstrap || exit 1; \ ++ test "X$(PAXCTL)" = X || $(PAXCTL) -zex emacs$(EXEEXT); \ + mv -f emacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \ + fi + @: Compile some files earlier to speed up further compilation. diff --git a/emacs/24.2/03_all_x32.patch b/emacs/24.2/03_all_x32.patch new file mode 100644 index 0000000..c3d68a4 --- /dev/null +++ b/emacs/24.2/03_all_x32.patch @@ -0,0 +1,21 @@ +Fix compilation with ABI=x32. +https://bugs.gentoo.org/420257 + +--- emacs-24.1-orig/src/m/amdx86-64.h ++++ emacs-24.1/src/m/amdx86-64.h +@@ -17,6 +17,7 @@ + You should have received a copy of the GNU General Public License + along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ + ++#ifndef __ILP32__ /* Don't define for x32 ABI. */ + #define BITS_PER_LONG 64 + #define BITS_PER_EMACS_INT 64 + +@@ -30,6 +31,7 @@ + #define EMACS_INT long + #define pI "l" + #define EMACS_UINT unsigned long ++#endif /* __ILP32__ */ + + /* Define XPNTR to avoid or'ing with DATA_SEG_BITS */ + #undef DATA_SEG_BITS diff --git a/emacs/24.2/05_all_freebsd.patch b/emacs/24.2/05_all_freebsd.patch new file mode 100644 index 0000000..7444c33 --- /dev/null +++ b/emacs/24.2/05_all_freebsd.patch @@ -0,0 +1,16 @@ +Fix linking on FreeBSD. +http://debbugs.gnu.org/12047 + +--- emacs-24.1-orig/configure.in ++++ emacs-24.1/configure.in +@@ -1009,8 +1009,8 @@ + START_FILES='pre-crt0.o' + ;; + freebsd ) +- LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' +- START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' ++ LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o' ++ START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o' + ;; + gnu-linux | gnu-kfreebsd ) + LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o' |