From f7fc57bdd1c7daac85ba13a5bb5a5d1b322e0520 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Jan 30 2011 16:11:19 +0000 Subject: Add "buffer overflow during build" fix --- diff --git a/erlang.spec b/erlang.spec index 363de72..3de0ee5 100644 --- a/erlang.spec +++ b/erlang.spec @@ -36,35 +36,51 @@ Source2: http://erlang.org/download/otp_doc_man_%{upstream_ver}%{upstream_rel}.t # $ git clone git://github.com/erlang/otp.git # $ cd otp # $ git remote add lemenkov git://github.com/lemenkov/otp.git +# $ git remote add ndim git://github.com/ndim/otp.git # $ git fetch -v --all # to get yourself a copy of the Erlang/OTP source code with the -# Fedora specific patches from Peter Lemenkov. Then run -# $ ./otp-get-patches.sh /path/to/otp OTP_R14B01 lemenkov/fedora-R14B01 +# Fedora specific patches from Peter Lemenkov and Hans Ulrich Niedermann. +# Then run something like +# $ ./otp-get-patches.sh /path/to/otp OTP_R14B01 ndim/fedora-R14B01 # for some semi-automatic patch update assistance. # # start of autogenerated patch tag list # Fedora specific patch +# [01/12] Do not format man-pages and do not install miscellaneous Patch1: otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch # Fedora specific patch +# [02/12] Remove rpath Patch2: otp-0002-Remove-rpath.patch # Fedora specific patch +# [03/12] Fix for dlopening libGL and libGLU Patch3: otp-0003-Fix-for-dlopening-libGL-and-libGLU.patch # Fedora specific patch +# [04/12] Do not install C sources Patch4: otp-0004-Do-not-install-C-sources.patch # Fedora specific patch +# [05/12] Do not install Java sources Patch5: otp-0005-Do-not-install-Java-sources.patch # Fedora specific patch +# [06/12] Do not install info files - they are almost empty and useless Patch6: otp-0006-Do-not-install-info-files-they-are-almost-empty-and-.patch # Fedora specific patch +# [07/12] Do not install nteventlog and related doc-files on non-win32 systems Patch7: otp-0007-Do-not-install-nteventlog-and-related-doc-files-on-n.patch # Fedora specific patch +# [08/12] Do not install *.bat files on non-win32 machines Patch8: otp-0008-Do-not-install-.bat-files-on-non-win32-machines.patch # Fedora specific patch +# [09/12] Do not install VxWorks-specific docs Patch9: otp-0009-Do-not-install-VxWorks-specific-docs.patch # Fedora specific patch +# [10/12] Do not install erlang sources Patch10: otp-0010-Do-not-install-erlang-sources.patch # Required only for el5, el6 on PowerPC +# [11/12] Ugly workaround for java-1.5.0-gcj which doesn't support UNICODE fully Patch11: otp-0011-Ugly-workaround-for-java-1.5.0-gcj-which-doesn-t-sup.patch +# Fedora specific patch +# [12/12] Remove strange name field in efile_drv.c as it upsets -D_FORTIFY_SOURCE +Patch12: otp-0012-Remove-strange-name-field-in-efile_drv.c-as-it-upset.patch # end of autogenerated patch tag list BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -965,6 +981,7 @@ Erlang mode for XEmacs (source lisp files). %patch11 -p1 -b .Ugly_workaround_for_java_1_5_0_gcj_which_doesn_t_sup %endif %endif +%patch12 -p1 -b .Remove_strange_name_field_in_efile_drv_c_as_it_upset # end of autogenerated prep patch list # remove shipped zlib sources diff --git a/otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch b/otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch index 19e9c5c..de83568 100644 --- a/otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch +++ b/otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch @@ -1,7 +1,7 @@ From d3aef1b288b667d07a560d90041598eae4c4f20e Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Thu, 25 Feb 2010 16:45:28 +0300 -Subject: [PATCH 01/11] Do not format man-pages and do not install miscellaneous +Subject: [PATCH 01/12] Do not format man-pages and do not install miscellaneous utilities for dealing with man-pages. Signed-off-by: Peter Lemenkov @@ -45,5 +45,5 @@ index 8f40c43..7f354cf 100644 - exit 0 -- -1.7.3.3 +1.7.3.5 diff --git a/otp-0002-Remove-rpath.patch b/otp-0002-Remove-rpath.patch index 3c4283b..cedc332 100644 --- a/otp-0002-Remove-rpath.patch +++ b/otp-0002-Remove-rpath.patch @@ -1,7 +1,7 @@ From f2cadfdf12de274fac64649726745333ae4ad3ac Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Thu, 25 Feb 2010 16:57:43 +0300 -Subject: [PATCH 02/11] Remove rpath +Subject: [PATCH 02/12] Remove rpath Signed-off-by: Peter Lemenkov --- @@ -68,5 +68,5 @@ index 49a209f..5e6c74e 100644 SSL_CC_RUNTIME_LIBRARY_PATH=@SSL_CC_RUNTIME_LIBRARY_PATH@ -- -1.7.3.3 +1.7.3.5 diff --git a/otp-0003-Fix-for-dlopening-libGL-and-libGLU.patch b/otp-0003-Fix-for-dlopening-libGL-and-libGLU.patch index d44e97c..3f2c84a 100644 --- a/otp-0003-Fix-for-dlopening-libGL-and-libGLU.patch +++ b/otp-0003-Fix-for-dlopening-libGL-and-libGLU.patch @@ -1,7 +1,7 @@ From 576c399f2226f8bdf6ae6f94038d204d5f8693c9 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Fri, 16 Apr 2010 21:13:47 +0400 -Subject: [PATCH 03/11] Fix for dlopening libGL and libGLU +Subject: [PATCH 03/12] Fix for dlopening libGL and libGLU Signed-off-by: Peter Lemenkov --- @@ -24,5 +24,5 @@ index e2dbbb7..56e560f 100644 #endif extern "C" { -- -1.7.3.3 +1.7.3.5 diff --git a/otp-0004-Do-not-install-C-sources.patch b/otp-0004-Do-not-install-C-sources.patch index b2dc8a2..aa99336 100644 --- a/otp-0004-Do-not-install-C-sources.patch +++ b/otp-0004-Do-not-install-C-sources.patch @@ -1,7 +1,7 @@ From 1546111ae258101825045a7ca656078349b73e7c Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Fri, 18 Jun 2010 23:41:33 +0400 -Subject: [PATCH 04/11] Do not install C sources +Subject: [PATCH 04/12] Do not install C sources Signed-off-by: Peter Lemenkov --- @@ -168,5 +168,5 @@ index 65a7f5f..144c1ba 100644 $(INSTALL_DIR) $(RELSYSDIR)/bin $(INSTALL_PROGRAM) $(PROGS) $(RELSYSDIR)/bin -- -1.7.3.3 +1.7.3.5 diff --git a/otp-0005-Do-not-install-Java-sources.patch b/otp-0005-Do-not-install-Java-sources.patch index 2a76824..c115d57 100644 --- a/otp-0005-Do-not-install-Java-sources.patch +++ b/otp-0005-Do-not-install-Java-sources.patch @@ -1,7 +1,7 @@ From 0c0230527a3e3ec32c0739c5aa6ae365593ec9a9 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sat, 19 Jun 2010 09:25:18 +0400 -Subject: [PATCH 05/11] Do not install Java sources +Subject: [PATCH 05/12] Do not install Java sources Signed-off-by: Peter Lemenkov --- @@ -36,5 +36,5 @@ index d0ff9cd..9990d2b 100644 $(INSTALL_DATA) $(JAVA_DEST_ROOT)$(JARFILE) $(RELSYSDIR)/priv -- -1.7.3.3 +1.7.3.5 diff --git a/otp-0006-Do-not-install-info-files-they-are-almost-empty-and-.patch b/otp-0006-Do-not-install-info-files-they-are-almost-empty-and-.patch index 63b468e..9060f50 100644 --- a/otp-0006-Do-not-install-info-files-they-are-almost-empty-and-.patch +++ b/otp-0006-Do-not-install-info-files-they-are-almost-empty-and-.patch @@ -1,7 +1,7 @@ From 9652244614a04e252555a36b1b7dbb669a56df10 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sat, 19 Jun 2010 09:29:12 +0400 -Subject: [PATCH 06/11] Do not install info files - they are almost empty and useless +Subject: [PATCH 06/12] Do not install info files - they are almost empty and useless Signed-off-by: Peter Lemenkov --- @@ -1955,5 +1955,5 @@ index 81d16ab..0000000 -group: comm -short: Provides support for XML 1.0 -- -1.7.3.3 +1.7.3.5 diff --git a/otp-0007-Do-not-install-nteventlog-and-related-doc-files-on-n.patch b/otp-0007-Do-not-install-nteventlog-and-related-doc-files-on-n.patch index 98c2742..872dc9b 100644 --- a/otp-0007-Do-not-install-nteventlog-and-related-doc-files-on-n.patch +++ b/otp-0007-Do-not-install-nteventlog-and-related-doc-files-on-n.patch @@ -1,7 +1,7 @@ From 02e9c2f2583b3d1b706af4fa05d6efc33cc293b8 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sat, 19 Jun 2010 09:59:39 +0400 -Subject: [PATCH 07/11] Do not install nteventlog and related doc-files on non-win32 systems +Subject: [PATCH 07/12] Do not install nteventlog and related doc-files on non-win32 systems Signed-off-by: Peter Lemenkov --- @@ -64,5 +64,5 @@ index 9a75446..a492a63 100644 $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk sed -e 's;%VSN%;$(VSN);' $< > $@ -- -1.7.3.3 +1.7.3.5 diff --git a/otp-0008-Do-not-install-.bat-files-on-non-win32-machines.patch b/otp-0008-Do-not-install-.bat-files-on-non-win32-machines.patch index 2843b9d..5cf8e7b 100644 --- a/otp-0008-Do-not-install-.bat-files-on-non-win32-machines.patch +++ b/otp-0008-Do-not-install-.bat-files-on-non-win32-machines.patch @@ -1,7 +1,7 @@ From 811adac1504284c12bdacc42d11975968cfa05dc Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sat, 19 Jun 2010 10:25:29 +0400 -Subject: [PATCH 08/11] Do not install *.bat files on non-win32 machines +Subject: [PATCH 08/12] Do not install *.bat files on non-win32 machines Signed-off-by: Peter Lemenkov --- @@ -51,5 +51,5 @@ index 56ab772..c29e912 100644 # ---------------------------------------------------- # FLAGS -- -1.7.3.3 +1.7.3.5 diff --git a/otp-0009-Do-not-install-VxWorks-specific-docs.patch b/otp-0009-Do-not-install-VxWorks-specific-docs.patch index f3de5bc..5d568f4 100644 --- a/otp-0009-Do-not-install-VxWorks-specific-docs.patch +++ b/otp-0009-Do-not-install-VxWorks-specific-docs.patch @@ -1,7 +1,7 @@ From 47622f8eb33a9327d1e625e6e89da8a47e1bd9ba Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sat, 19 Jun 2010 11:26:04 +0400 -Subject: [PATCH 09/11] Do not install VxWorks-specific docs +Subject: [PATCH 09/12] Do not install VxWorks-specific docs Signed-off-by: Peter Lemenkov --- @@ -21,5 +21,5 @@ index be99288..4bb07c4 100644 erl_prim_loader.xml \ erlang.xml \ -- -1.7.3.3 +1.7.3.5 diff --git a/otp-0010-Do-not-install-erlang-sources.patch b/otp-0010-Do-not-install-erlang-sources.patch index 1979157..4f6311c 100644 --- a/otp-0010-Do-not-install-erlang-sources.patch +++ b/otp-0010-Do-not-install-erlang-sources.patch @@ -1,7 +1,7 @@ From 31648032919445e22066c83891dca60c1eb2fae6 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sat, 19 Jun 2010 13:21:10 +0400 -Subject: [PATCH 10/11] Do not install erlang sources +Subject: [PATCH 10/12] Do not install erlang sources Signed-off-by: Peter Lemenkov --- @@ -1068,5 +1068,5 @@ index 7009b50..c9c7303 100644 $(INSTALL_DATA) $(HRL_FILES) $(RELSYSDIR)/include -- -1.7.3.3 +1.7.3.5 diff --git a/otp-0011-Ugly-workaround-for-java-1.5.0-gcj-which-doesn-t-sup.patch b/otp-0011-Ugly-workaround-for-java-1.5.0-gcj-which-doesn-t-sup.patch index 38535d4..0414cae 100644 --- a/otp-0011-Ugly-workaround-for-java-1.5.0-gcj-which-doesn-t-sup.patch +++ b/otp-0011-Ugly-workaround-for-java-1.5.0-gcj-which-doesn-t-sup.patch @@ -1,7 +1,7 @@ From 4c2e07124ebe2f7a47beed5a54c4cb044b7ec1fb Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sun, 21 Nov 2010 00:17:49 +0300 -Subject: [PATCH 11/11] Ugly workaround for java-1.5.0-gcj which doesn't support UNICODE fully +Subject: [PATCH 11/12] Ugly workaround for java-1.5.0-gcj which doesn't support UNICODE fully Signed-off-by: Peter Lemenkov Fedora-Spec-Comment: Required only for el5, el6 on PowerPC @@ -64,5 +64,5 @@ index b9b4348..c11702c 100644 throw new OtpErlangDecodeException( "Wrong tag encountered, expected " + OtpExternal.stringTag -- -1.7.3.3 +1.7.3.5 diff --git a/otp-0012-Remove-strange-name-field-in-efile_drv.c-as-it-upset.patch b/otp-0012-Remove-strange-name-field-in-efile_drv.c-as-it-upset.patch new file mode 100644 index 0000000..5209260 --- /dev/null +++ b/otp-0012-Remove-strange-name-field-in-efile_drv.c-as-it-upset.patch @@ -0,0 +1,42 @@ +From 082aa3f9452ec91bef336d229d0e6617b3f249cd Mon Sep 17 00:00:00 2001 +From: Patrik Nyblom +Date: Wed, 12 Jan 2011 15:41:46 +0100 +Subject: [PATCH 12/12] Remove strange name field in efile_drv.c as it upsets -D_FORTIFY_SOURCE + +--- + erts/emulator/drivers/common/efile_drv.c | 5 ++--- + 1 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c +index 786fa7d..6449c6f 100644 +--- a/erts/emulator/drivers/common/efile_drv.c ++++ b/erts/emulator/drivers/common/efile_drv.c +@@ -385,7 +385,6 @@ struct t_data + ErlDrvBinary *binp; + int size; + int offset; +- char name[1]; + } read_file; + struct { + struct t_readdir_buf *first_buf; +@@ -1117,7 +1116,7 @@ static void invoke_read_file(void *data) + Sint64 size; + + if (! (d->result_ok = +- efile_openfile(&d->errInfo, d->c.read_file.name, ++ efile_openfile(&d->errInfo, d->b, + EFILE_MODE_READ, &fd, &size))) { + goto done; + } +@@ -3071,7 +3070,7 @@ file_outputv(ErlDrvData e, ErlIOVec *ev) { + d->command = command; + d->reply = !0; + /* Copy name */ +- FILENAME_COPY(d->c.read_file.name, filename); ++ FILENAME_COPY(d->b, filename); + d->c.read_file.binp = NULL; + d->invoke = invoke_read_file; + d->free = free_read_file; +-- +1.7.3.5 +