summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--erlang.spec33
-rw-r--r--import.log1
-rw-r--r--otp-0001-Do-not-format-man-pages.patch4
-rw-r--r--otp-0002-Remove-rpath.patch4
-rw-r--r--otp-0006-Fix-shared-libraries-installation.patch58
-rw-r--r--otp-0007-Fix-for-dlopening-libGL-and-libGLU.patch35
-rw-r--r--otp-0008-Fix-check-for-compile-workspace-overflow.patch55
7 files changed, 175 insertions, 15 deletions
diff --git a/erlang.spec b/erlang.spec
index d157cfb..eb436fa 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -3,7 +3,7 @@
Name: erlang
Version: %{ver}
-Release: %{rel}.3%{?dist}
+Release: %{rel}.4%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -19,8 +19,16 @@ Source6: erlang-find-requires.sh
Source7: macros.erlang
# TODO this patch needs rebase against current tree
Patch0: otp-links.patch
+# Fedora-specific
Patch1: otp-0001-Do-not-format-man-pages.patch
+# Fedora-specific
Patch2: otp-0002-Remove-rpath.patch
+# Upstreamed
+Patch6: otp-0006-Fix-shared-libraries-installation.patch
+# Fedora-specific
+Patch7: otp-0007-Fix-for-dlopening-libGL-and-libGLU.patch
+# Upstreamed
+Patch8: otp-0008-Fix-check-for-compile-workspace-overflow.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ncurses-devel
@@ -36,6 +44,9 @@ BuildRequires: m4
BuildRequires: fop
Requires: tk
+Requires: mesa-libGL
+Requires: mesa-libGLU
+
%description
Erlang is a general-purpose programming language and runtime
@@ -47,6 +58,8 @@ systems from Ericsson.
%package doc
Summary: Erlang documentation
Group: Development/Languages
+BuildArch: noarch
+Obsoletes: %{name}-doc < R13B-04.4
%description doc
Documentation for Erlang.
@@ -56,6 +69,9 @@ Documentation for Erlang.
%setup -q -n otp_src_%{ver}%{rel}
%patch1 -p1 -b .do_not_format_manpages
%patch2 -p1 -b .rpath
+%patch6 -p1 -b .fix_shared_lib_install
+%patch7 -p1 -b .dlopen_opengl_libs
+%patch8 -p1 -b .pcre_overflow
# remove shipped zlib sources
rm -f erts/emulator/zlib/*.[ch]
@@ -128,16 +144,6 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/erlang/lib/odbc-*/priv/obj
rm -rf $RPM_BUILD_ROOT%{_libdir}/erlang/lib/ssl-*/priv/obj
rm -rf $RPM_BUILD_ROOT%{_libdir}/erlang/misc
-# fix permissions for asn1 library
-chmod 755 $RPM_BUILD_ROOT%{_libdir}/erlang/lib/asn1-*/priv/lib/asn1_erl_drv.so
-
-# fix permissions for megaco library
-chmod 755 $RPM_BUILD_ROOT%{_libdir}/erlang/lib/megaco-*/priv/lib/megaco_flex_scanner_drv.so
-chmod 755 $RPM_BUILD_ROOT%{_libdir}/erlang/lib/megaco-*/priv/lib/megaco_flex_scanner_drv_mt.so
-
-# fix permissons for wx library
-chmod 755 $RPM_BUILD_ROOT%{_libdir}/erlang/lib/wx-*/priv/*/wxe_driver.so
-
# Install RPM related files
install -D -p -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_libdir}/rpm/erlang-find-provides.escript
install -D -p -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{_libdir}/rpm/erlang-find-provides.sh
@@ -174,6 +180,11 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Sat Apr 17 2010 Peter Lemenkov <lemenkov@gmail.com> - R13B-04.4
+- Added missing Requires mesa-libGL{U} for wx module (rhbz #583287)
+- Fix for buffer overflow in pcre module (rhbz #583288)
+- Doc sub-package marked as noarch (partially resolves rhbz #491165)
+
* Fri Mar 26 2010 Peter Lemenkov <lemenkov@gmail.com> - R13B-04.3
- Added rpm-related stuff for auto-generating erlang dependencies in the future builds
- Since now *.yrl files are removed too.
diff --git a/import.log b/import.log
index 88797ef..0cbb31b 100644
--- a/import.log
+++ b/import.log
@@ -1,3 +1,4 @@
erlang-R13B-04_1_fc12:HEAD:erlang-R13B-04.1.fc12.src.rpm:1268645923
erlang-R13B-04_2_fc12:HEAD:erlang-R13B-04.2.fc12.src.rpm:1269608855
erlang-R13B-04_3_fc12:HEAD:erlang-R13B-04.3.fc12.src.rpm:1271238928
+erlang-R13B-04_4_fc12:HEAD:erlang-R13B-04.4.fc12.src.rpm:1271523697
diff --git a/otp-0001-Do-not-format-man-pages.patch b/otp-0001-Do-not-format-man-pages.patch
index 61e089e..5f9594f 100644
--- a/otp-0001-Do-not-format-man-pages.patch
+++ b/otp-0001-Do-not-format-man-pages.patch
@@ -1,7 +1,7 @@
From 80fd602b5cd9f4aaa7b6bd95e174708e27601db5 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Thu, 25 Feb 2010 16:45:28 +0300
-Subject: [PATCH 1/2] Do not format man-pages
+Subject: [PATCH 1/9] Do not format man-pages
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
@@ -28,5 +28,5 @@ index 83f9690..d26137d 100644
-
exit 0
--
-1.6.2.5
+1.6.6.1
diff --git a/otp-0002-Remove-rpath.patch b/otp-0002-Remove-rpath.patch
index ffc6cde..0293073 100644
--- a/otp-0002-Remove-rpath.patch
+++ b/otp-0002-Remove-rpath.patch
@@ -1,7 +1,7 @@
From 2e10f728feb56ea96b2832999a8c34f1f19646bc Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Thu, 25 Feb 2010 16:57:43 +0300
-Subject: [PATCH 2/2] Remove rpath
+Subject: [PATCH 2/9] Remove rpath
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
@@ -68,5 +68,5 @@ index 49a209f..5e6c74e 100644
SSL_CC_RUNTIME_LIBRARY_PATH=@SSL_CC_RUNTIME_LIBRARY_PATH@
--
-1.6.2.5
+1.6.6.1
diff --git a/otp-0006-Fix-shared-libraries-installation.patch b/otp-0006-Fix-shared-libraries-installation.patch
new file mode 100644
index 0000000..2df3cb4
--- /dev/null
+++ b/otp-0006-Fix-shared-libraries-installation.patch
@@ -0,0 +1,58 @@
+From 0c963550412174a4c4fe64aa7f70189998abef41 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Thu, 15 Apr 2010 13:31:36 +0400
+Subject: [PATCH 6/9] Fix shared libraries installation
+
+Several shared libraries (asn1_erl_drv.so, megaco_flex_scanner_drv_mt.so,
+megaco_flex_scanner_drv.so, wxe_driver.so) were installed as data files
+previously.
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+---
+ lib/asn1/c_src/Makefile | 2 +-
+ lib/megaco/src/flex/Makefile.in | 2 +-
+ lib/wx/c_src/Makefile.in | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lib/asn1/c_src/Makefile b/lib/asn1/c_src/Makefile
+index 906c513..9e9cb18 100644
+--- a/lib/asn1/c_src/Makefile
++++ b/lib/asn1/c_src/Makefile
+@@ -124,7 +124,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+ $(INSTALL_DIR) $(RELSYSDIR)/priv/lib
+- $(INSTALL_DATA) $(SHARED_OBJ_FILES) $(RELSYSDIR)/priv/lib
++ $(INSTALL_PROGRAM) $(SHARED_OBJ_FILES) $(RELSYSDIR)/priv/lib
+ $(INSTALL_DIR) $(RELSYSDIR)/c_src
+ $(INSTALL_DATA) $(C_FILES) $(RELSYSDIR)/c_src
+
+diff --git a/lib/megaco/src/flex/Makefile.in b/lib/megaco/src/flex/Makefile.in
+index 6ce9b34..5af651d 100644
+--- a/lib/megaco/src/flex/Makefile.in
++++ b/lib/megaco/src/flex/Makefile.in
+@@ -280,7 +280,7 @@ release_spec: opt
+ $(INSTALL_DATA) $(TARGET_FILES) $(RELSYSDIR)/ebin
+ ifeq ($(ENABLE_MEGACO_FLEX_SCANNER),true)
+ $(INSTALL_DATA) $(FLEX_FILES) $(C_TARGETS) $(RELSYSDIR)/src/flex
+- $(INSTALL_DATA) $(SOLIBS) $(RELSYSDIR)/priv/lib
++ $(INSTALL_PROGRAM) $(SOLIBS) $(RELSYSDIR)/priv/lib
+ endif
+
+
+diff --git a/lib/wx/c_src/Makefile.in b/lib/wx/c_src/Makefile.in
+index 5a0b4ce..8710641 100644
+--- a/lib/wx/c_src/Makefile.in
++++ b/lib/wx/c_src/Makefile.in
+@@ -167,7 +167,7 @@ release_spec: opt
+ $(INSTALL_DIR) $(RELSYSDIR)/priv/$(SYS_TYPE)
+ $(INSTALL_DATA) ../priv/erlang-logo32.png $(RELSYSDIR)/priv/
+ $(INSTALL_DATA) ../priv/erlang-logo64.png $(RELSYSDIR)/priv/
+- $(INSTALL_DATA) $(TARGET_DIR)/$(TARGET_API)$(SO_EXT) $(RELSYSDIR)/priv/$(SYS_TYPE)
++ $(INSTALL_PROGRAM) $(TARGET_DIR)/$(TARGET_API)$(SO_EXT) $(RELSYSDIR)/priv/$(SYS_TYPE)
+
+ release_docs_spec:
+
+--
+1.6.6.1
+
diff --git a/otp-0007-Fix-for-dlopening-libGL-and-libGLU.patch b/otp-0007-Fix-for-dlopening-libGL-and-libGLU.patch
new file mode 100644
index 0000000..5e78c4a
--- /dev/null
+++ b/otp-0007-Fix-for-dlopening-libGL-and-libGLU.patch
@@ -0,0 +1,35 @@
+From 6ffccff36e0d94cba0412cf3a29769b4a19d3be3 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Fri, 16 Apr 2010 21:13:47 +0400
+Subject: [PATCH 7/9] Fix for dlopening libGL and libGLU
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+---
+ lib/wx/c_src/wxe_gl.cpp | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/wx/c_src/wxe_gl.cpp b/lib/wx/c_src/wxe_gl.cpp
+index 63dd68f..36bf15f 100644
+--- a/lib/wx/c_src/wxe_gl.cpp
++++ b/lib/wx/c_src/wxe_gl.cpp
+@@ -81,7 +81,7 @@ int initOpenGL()
+ WCHAR * DLName = wxT("opengl32.dll");
+ HMODULE LIBhandle = LoadLibrary(DLName);
+ #else
+- char * DLName = (char *) "libGL.so";
++ char * DLName = (char *) "libGL.so.1";
+ void * LIBhandle = dlopen(DLName, RTLD_LAZY);
+ #endif
+ // fprintf(stderr, "Loading GL: %s\r\n", (const char*)DLName);
+@@ -132,7 +132,7 @@ int initOpenGL()
+ DLName = wxT("glu32.dll");
+ LIBhandle = LoadLibrary(DLName);
+ #else
+- DLName = (char *) "libGLU.so";
++ DLName = (char *) "libGLU.so.1";
+ LIBhandle = dlopen(DLName, RTLD_LAZY);
+ #endif
+ // fprintf(stderr, "Loading GL: %s\r\n", (const char*)DLName);
+--
+1.6.6.1
+
diff --git a/otp-0008-Fix-check-for-compile-workspace-overflow.patch b/otp-0008-Fix-check-for-compile-workspace-overflow.patch
new file mode 100644
index 0000000..2e34451
--- /dev/null
+++ b/otp-0008-Fix-check-for-compile-workspace-overflow.patch
@@ -0,0 +1,55 @@
+From d496ce48940411976617b66a5c941c78313cb78c Mon Sep 17 00:00:00 2001
+From: Michael Santos <michael.santos@gmail.com>
+Date: Thu, 18 Mar 2010 20:08:10 -0400
+Subject: [PATCH 8/9] Fix check for compile workspace overflow
+
+Patch from:
+http://vcs.pcre.org/viewvc/code/trunk/pcre_compile.c?r1=504&r2=505&view=patch
+
+Test case:
+N = 819, re:compile([lists:duplicate(N, $(), lists:duplicate(N, $))]).
+
+Compiling large regular expressions could overflow the workspace
+buffer. Modify the test to check for a value smaller than the buffer
+size.
+---
+ erts/emulator/pcre/pcre_compile.c | 9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/erts/emulator/pcre/pcre_compile.c b/erts/emulator/pcre/pcre_compile.c
+index 2974336..9508c5a 100644
+--- a/erts/emulator/pcre/pcre_compile.c
++++ b/erts/emulator/pcre/pcre_compile.c
+@@ -92,6 +92,11 @@ is 4 there is plenty of room. */
+
+ #define COMPILE_WORK_SIZE (4096)
+
++/* The overrun tests check for a slightly smaller size so that they detect the
++overrun before it actually does run off the end of the data block. */
++
++#define WORK_SIZE_CHECK (COMPILE_WORK_SIZE - 100)
++
+
+ /* Table for handling escaped characters in the range '0'-'z'. Positive returns
+ are simple data values; negative values are for special things like \d and so
+@@ -2445,7 +2450,7 @@ for (;; ptr++)
+ #ifdef DEBUG
+ if (code > cd->hwm) cd->hwm = code; /* High water info */
+ #endif
+- if (code > cd->start_workspace + COMPILE_WORK_SIZE) /* Check for overrun */
++ if (code > cd->start_workspace + WORK_SIZE_CHECK) /* Check for overrun */
+ {
+ *errorcodeptr = ERR52;
+ goto FAILED;
+@@ -2494,7 +2499,7 @@ for (;; ptr++)
+ /* In the real compile phase, just check the workspace used by the forward
+ reference list. */
+
+- else if (cd->hwm > cd->start_workspace + COMPILE_WORK_SIZE)
++ else if (cd->hwm > cd->start_workspace + WORK_SIZE_CHECK)
+ {
+ *errorcodeptr = ERR52;
+ goto FAILED;
+--
+1.6.6.1
+