summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Lemenkov <peter@fedoraproject.org>2010-04-20 07:52:48 +0000
committerPeter Lemenkov <peter@fedoraproject.org>2010-04-20 07:52:48 +0000
commit03eee960b2d94feb7b50aec787447e58f52c89b8 (patch)
treec11fdb256e16413c2428eb43e1866cbafe8ea869
parent4c964589f0a587f9ade22bac08bbf128eeb7a67d (diff)
Rebased patches + fix for PCRE overflow
-rw-r--r--.cvsignore6
-rw-r--r--erlang.spec97
-rw-r--r--import.log1
-rw-r--r--otp-R11B-2-0001-Do-not-create-links-instead-of-real-files.patch27
-rw-r--r--otp-R11B-2-0002-Fix-symlinking-of-epmd.patch25
-rw-r--r--otp-R11B-2-0003-Do-not-format-man-pages.patch34
-rw-r--r--otp-R11B-2-0004-Remove-rpath.patch65
-rw-r--r--otp-R11B-2-0005-Fix-shared-libraries-installation.patch41
-rw-r--r--otp-R11B-2-0006-Fix-missing-ssl-libraries-in-EPEL.patch219
-rw-r--r--otp-R11B-2-0007-Fix-for-Glibc-2.5.patch25
-rw-r--r--otp-R11B-2-0008-Fix-for-run_erl-utility.patch63
-rw-r--r--otp-install.patch29
-rw-r--r--otp-links.patch13
-rw-r--r--otp-ssl_missing_libs.patch11
-rw-r--r--otp-sslrpath.patch11
-rw-r--r--sources6
16 files changed, 535 insertions, 138 deletions
diff --git a/.cvsignore b/.cvsignore
index 40fd7e4..8b4c8b7 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1,3 +1,3 @@
-otp_doc_html_R12B-3.tar.gz
-otp_doc_man_R12B-3.tar.gz
-otp_src_R12B-3.tar.gz
+otp_doc_html_R11B-2.tar.gz
+otp_doc_man_R11B-2.tar.gz
+otp_src_R11B-2.tar.gz
diff --git a/erlang.spec b/erlang.spec
index 919d51f..da3d089 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -1,21 +1,22 @@
-%define ver R12B
-%define rel 3
-
Name: erlang
-Version: %{ver}
-Release: %{rel}.3%{?dist}
+Version: R11B
+Release: 2.4%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
-License: ERPL
+License: Erlang Public License
URL: http://www.erlang.org
-Source: http://www.erlang.org/download/otp_src_%{ver}-%{rel}.tar.gz
-Source1: http://www.erlang.org/download/otp_doc_html_%{ver}-%{rel}.tar.gz
-Source2: http://www.erlang.org/download/otp_doc_man_%{ver}-%{rel}.tar.gz
-Patch0: otp-links.patch
-Patch1: otp-install.patch
-Patch3: otp-sslrpath.patch
-Patch6: otp-ssl_missing_libs.patch
+Source: http://www.erlang.org/download/otp_src_R11B-2.tar.gz
+Source1: http://www.erlang.org/download/otp_doc_html_R11B-2.tar.gz
+Source2: http://www.erlang.org/download/otp_doc_man_R11B-2.tar.gz
+Patch1: otp-R11B-2-0001-Do-not-create-links-instead-of-real-files.patch
+Patch2: otp-R11B-2-0002-Fix-symlinking-of-epmd.patch
+Patch3: otp-R11B-2-0003-Do-not-format-man-pages.patch
+Patch4: otp-R11B-2-0004-Remove-rpath.patch
+Patch5: otp-R11B-2-0005-Fix-shared-libraries-installation.patch
+Patch6: otp-R11B-2-0006-Fix-missing-ssl-libraries-in-EPEL.patch
+Patch7: otp-R11B-2-0007-Fix-for-Glibc-2.5.patch
+Patch8: otp-R11B-2-0008-Fix-for-run_erl-utility.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ncurses-devel
@@ -23,14 +24,13 @@ BuildRequires: openssl-devel
BuildRequires: unixODBC-devel
BuildRequires: tcl-devel
BuildRequires: tk-devel
-BuildRequires: gd-devel
BuildRequires: java-1.4.2-gcj-compat-devel
BuildRequires: flex
BuildRequires: m4
Requires: tk
-%description
+%description
Erlang is a general-purpose programming language and runtime
environment. Erlang has built-in support for concurrency, distribution
and fault tolerance. Erlang is used in several large telecommunication
@@ -46,25 +46,19 @@ Documentation for Erlang.
%prep
-%setup -q -n otp_src_%{ver}-%{rel}
-%patch0 -p1 -b .links
-%patch1 -p1 -b .install
-%patch3 -p1 -b .sslrpath
-%patch6 -p0 -b .keyutils
-
-# enable dynamic linking for ssl
-sed -i 's|SSL_DYNAMIC_ONLY=no|SSL_DYNAMIC_ONLY=yes|' erts/configure
-sed -i 's|^LD.*=.*|LD = gcc -shared|' lib/common_test/c_src/Makefile
-# fix for newer glibc version
-sed -i 's|__GLIBC_MINOR__ <= 7|__GLIBC_MINOR__ <= 8|' erts/emulator/hipe/hipe_x86_signal.c
-# use gcc -shared instead of ld
-sed -i 's|@RX_LD@|gcc -shared|' lib/common_test/c_src/Makefile.in
-sed -i 's|@RX_LDFLAGS@||' lib/common_test/c_src/Makefile.in
-
+%setup -q -n otp_src_R11B-2
+%patch1 -p1 -b .links
+%patch2 -p1 -b .epmd
+%patch3 -p1 -b .manpages
+%patch4 -p1 -b .rpath
+%patch5 -p1 -b .shared_libs
+%patch6 -p1 -b .missing_ssl_libs
+%patch7 -p1 -b .glibc25
+%patch8 -p1 -b .run_erl
%build
-CFLAGS="-fno-strict-aliasing" ./configure --enable-dynamic-ssl-lib --prefix=%{_prefix} --exec-prefix=%{_prefix} --bindir=%{_bindir} --libdir=%{_libdir}
+./configure --prefix=%{_prefix} --exec-prefix=%{_prefix} --bindir=%{_bindir} --libdir=%{_libdir}
chmod -R u+w .
make
@@ -76,7 +70,6 @@ make INSTALL_PREFIX=$RPM_BUILD_ROOT install
# clean up
find $RPM_BUILD_ROOT%{_libdir}/erlang -perm 0775 | xargs chmod 755
find $RPM_BUILD_ROOT%{_libdir}/erlang -name Makefile | xargs chmod 644
-find $RPM_BUILD_ROOT%{_libdir}/erlang -name \*.o | xargs chmod 644
find $RPM_BUILD_ROOT%{_libdir}/erlang -name \*.bat | xargs rm -f
find $RPM_BUILD_ROOT%{_libdir}/erlang -name index.txt.old | xargs rm -f
@@ -88,7 +81,7 @@ tar -C $RPM_BUILD_ROOT/%{_libdir}/erlang -zxf %{SOURCE2}
# make links to binaries
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
cd $RPM_BUILD_ROOT/%{_bindir}
-for file in erl erlc
+for file in erl erlc
do
ln -sf ../%{_lib}/erlang/bin/$file .
done
@@ -119,41 +112,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
-* Mon Aug 11 2008 Peter Lemenkov <lemenkov@gmail.com> - R12B-3.3
-- Force dynamic linking of crypto libs
-
-* Thu Jul 17 2008 Tom "spot" Callaway <tcallawa@redhat.com> - R12B-3.2
-- fix license tag
-
-* Sun Jul 6 2008 Gerard Milmeister <gemi@bluewin.ch> - R12B-3.1
-- new release R12B-3
-
-* Thu Mar 27 2008 Gerard Milmeister <gemi@bluewin.ch> - R12B-1.1
-- new release R12B-1
-
-* Sat Feb 23 2008 Gerard Milmeister <gemi@bluewin.ch> - R12B-0.3
-- disable strict aliasing optimization
-
-* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - R12B-0.2
-- Autorebuild for GCC 4.3
-
-* Sat Dec 8 2007 Gerard Milmeister <gemi@bluewin.ch> - R12B-0.1
-- new release R12B-0
-
-* Wed Dec 05 2007 Release Engineering <rel-eng at fedoraproject dot org> - R11B-6
- - Rebuild for deps
-
-* Sun Aug 19 2007 Gerard Milmeister <gemi@bluewin.ch> - R11B-5.3
-- fix some permissions
-
-* Sat Aug 18 2007 Gerard Milmeister <gemi@bluewin.ch> - R11B-5.2
-- enable dynamic linking for ssl
-
-* Sat Aug 18 2007 Gerard Milmeister <gemi@bluewin.ch> - R11B-5.1
-- new release R11B-5
-
-* Sat Mar 24 2007 Thomas Fitzsimmons <fitzsim@redhat.com> - R11B-2.4
-- Require java-1.5.0-gcj-devel for build.
+* Mon Apr 19 2010 Peter Lemenkov <lemenkov@gmail.com> - R11B-2.4
+- Patches rebased
+- Added patches 6,7 from trunk
* Sun Dec 31 2006 Gerard Milmeister <gemi@bluewin.ch> - R11B-2.3
- remove buildroot from installed files
diff --git a/import.log b/import.log
index d674608..e57bb33 100644
--- a/import.log
+++ b/import.log
@@ -1 +1,2 @@
erlang-R12B-3_2_fc9:EL-4:erlang-R12B-3.2.fc9.src.rpm:1218402209
+erlang-R11B-2_4_fc12:EL-4:erlang-R11B-2.4.fc12.src.rpm:1271749937
diff --git a/otp-R11B-2-0001-Do-not-create-links-instead-of-real-files.patch b/otp-R11B-2-0001-Do-not-create-links-instead-of-real-files.patch
new file mode 100644
index 0000000..3245efa
--- /dev/null
+++ b/otp-R11B-2-0001-Do-not-create-links-instead-of-real-files.patch
@@ -0,0 +1,27 @@
+From ebb23b99435517871a189a73f8ba551ade6a714f Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Mon, 19 Apr 2010 13:31:43 +0400
+Subject: [PATCH 1/8] Do not create links instead of real files
+
+---
+ Makefile.in | 4 ----
+ 1 files changed, 0 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 894ecdf..1b263b7 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -625,10 +625,6 @@ install.Install:
+ # Install erlang base public files
+ #
+ install.bin:
+- for file in $(ERL_BASE_PUB_FILES); do \
+- rm -f $(BINDIR)/$$file; \
+- ${LN_S} $(ERLANG_BINDIR)/$$file $(BINDIR)/$$file; \
+- done
+
+ #
+ # Directories needed before we can install
+--
+1.6.6.1
+
diff --git a/otp-R11B-2-0002-Fix-symlinking-of-epmd.patch b/otp-R11B-2-0002-Fix-symlinking-of-epmd.patch
new file mode 100644
index 0000000..ba4dd52
--- /dev/null
+++ b/otp-R11B-2-0002-Fix-symlinking-of-epmd.patch
@@ -0,0 +1,25 @@
+From 65af6edd93c6fd623bdfd15db4217db4df611e06 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Mon, 19 Apr 2010 13:33:50 +0400
+Subject: [PATCH 2/8] Fix symlinking of epmd
+
+---
+ erts/etc/unix/Install.src | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/erts/etc/unix/Install.src b/erts/etc/unix/Install.src
+index 10e114f..561b210 100644
+--- a/erts/etc/unix/Install.src
++++ b/erts/etc/unix/Install.src
+@@ -85,7 +85,7 @@ if [ -h epmd ]; then
+ /bin/rm -f epmd
+ fi
+
+-ln -s $ERL_ROOT/erts-%I_VSN%/bin/epmd epmd
++ln -s ../erts-%I_VSN%/bin/epmd epmd
+
+ cp -p $ERL_ROOT/erts-%I_VSN%/bin/run_erl .
+ cp -p $ERL_ROOT/erts-%I_VSN%/bin/to_erl .
+--
+1.6.6.1
+
diff --git a/otp-R11B-2-0003-Do-not-format-man-pages.patch b/otp-R11B-2-0003-Do-not-format-man-pages.patch
new file mode 100644
index 0000000..d80ddf0
--- /dev/null
+++ b/otp-R11B-2-0003-Do-not-format-man-pages.patch
@@ -0,0 +1,34 @@
+From 8a26ec8321543bce56ca49070b2001c0ca4032bf Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Mon, 19 Apr 2010 13:35:14 +0400
+Subject: [PATCH 3/8] Do not format man-pages
+
+---
+ erts/etc/unix/Install.src | 14 +-------------
+ 1 files changed, 1 insertions(+), 13 deletions(-)
+
+diff --git a/erts/etc/unix/Install.src b/erts/etc/unix/Install.src
+index 561b210..c03a0ca 100644
+--- a/erts/etc/unix/Install.src
++++ b/erts/etc/unix/Install.src
+@@ -134,16 +134,4 @@ if [ "X$TARGET" != "Xsunos5" -a -d $ERL_ROOT/usr/lib ]; then
+ (ranlib $library) > /dev/null 2>&1
+ done
+ fi
+-
+-
+-#
+-# Fixing the man pages
+-#
+-
+-if [ -d $ERL_ROOT/man ]
+-then
+- cd $ERL_ROOT
+- ./misc/format_man_pages $ERL_ROOT
+-fi
+-
+-
++exit 0
+--
+1.6.6.1
+
diff --git a/otp-R11B-2-0004-Remove-rpath.patch b/otp-R11B-2-0004-Remove-rpath.patch
new file mode 100644
index 0000000..13cabbb
--- /dev/null
+++ b/otp-R11B-2-0004-Remove-rpath.patch
@@ -0,0 +1,65 @@
+From 6a80d8977bd84382e33cd4988910320b541c290d Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Mon, 19 Apr 2010 13:36:36 +0400
+Subject: [PATCH 4/8] Remove rpath
+
+---
+ lib/crypto/c_src/Makefile.in | 2 +-
+ lib/crypto/priv/Makefile | 2 +-
+ lib/ssl/c_src/Makefile.in | 6 +++---
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in
+index 70ebeb9..481277f 100644
+--- a/lib/crypto/c_src/Makefile.in
++++ b/lib/crypto/c_src/Makefile.in
+@@ -79,7 +79,7 @@ endif
+ ifeq ($(HOST_OS),)
+ HOST_OS := $(shell $(ERL_TOP)/erts/autoconf/config.guess)
+ endif
+-LD_R_FLAG=@DED_LD_FLAG_RUNTIME_LIBRARY_PATH@
++LD_R_FLAG=
+ ifeq ($(strip $(LD_R_FLAG)),)
+ LD_R_OPT =
+ else
+diff --git a/lib/crypto/priv/Makefile b/lib/crypto/priv/Makefile
+index b8acdac..2c2989a 100644
+--- a/lib/crypto/priv/Makefile
++++ b/lib/crypto/priv/Makefile
+@@ -60,7 +60,7 @@ OBJS = $(OBJDIR)/crypto_drv.o
+ # ----------------------------------------------------
+
+ $(SO_DRIVER): $(OBJS)
+- $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) -Wl,-R$(SO_SSL_LIBDIR) \
++ $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) \
+ -o $@ $^ -lcrypto
+
+ $(DLL_DRIVER): $(OBJS)
+diff --git a/lib/ssl/c_src/Makefile.in b/lib/ssl/c_src/Makefile.in
+index e6bf3c0..b145aac 100644
+--- a/lib/ssl/c_src/Makefile.in
++++ b/lib/ssl/c_src/Makefile.in
+@@ -95,7 +95,7 @@ SKIP_BUILDING_BINARIES := true
+ endif
+ endif
+
+-CC_R_FLAG=@CFLAG_RUNTIME_LIBRARY_PATH@
++CC_R_FLAG=
+ ifeq ($(findstring @,$(CC_R_FLAG)),@)
+ # Old erts configure used which hasn't replaced @CFLAG_RUNTIME_LIBRARY_PATH@;
+ # we try our best here instead...
+@@ -104,9 +104,9 @@ ifeq ($(findstring darwin,$(TARGET)),darwin) # darwin: no flag
+ CC_R_FLAG =
+ else
+ ifeq ($(findstring osf,$(TARGET)),osf) # osf1: -Wl,-rpath,
+-CC_R_FLAG = -Wl,-rpath,
++CC_R_FLAG =
+ else # Default: -Wl,-R
+-CC_R_FLAG = -Wl,-R
++CC_R_FLAG =
+ endif
+ endif
+
+--
+1.6.6.1
+
diff --git a/otp-R11B-2-0005-Fix-shared-libraries-installation.patch b/otp-R11B-2-0005-Fix-shared-libraries-installation.patch
new file mode 100644
index 0000000..79ef62a
--- /dev/null
+++ b/otp-R11B-2-0005-Fix-shared-libraries-installation.patch
@@ -0,0 +1,41 @@
+From 211a29f1404bbe3e158e32cce7965f36fe33a3c2 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Mon, 19 Apr 2010 13:44:40 +0400
+Subject: [PATCH 5/8] Fix shared libraries installation
+
+Several shared libraries (asn1_erl_drv.so, megaco_flex_scanner_drv_mt.so,
+megaco_flex_scanner_drv.so) were installed as data files previously.
+---
+ lib/asn1/c_src/Makefile.in | 2 +-
+ lib/megaco/src/flex/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/asn1/c_src/Makefile.in b/lib/asn1/c_src/Makefile.in
+index f9555ee..7e8c9dd 100644
+--- a/lib/asn1/c_src/Makefile.in
++++ b/lib/asn1/c_src/Makefile.in
+@@ -148,7 +148,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 eb532bd..a319ada 100644
+--- a/lib/megaco/src/flex/Makefile.in
++++ b/lib/megaco/src/flex/Makefile.in
+@@ -213,7 +213,7 @@ release_spec: opt
+ $(INSTALL_DATA) $(TARGET_FILES) $(RELSYSDIR)/ebin
+ ifeq ($(ENABLE_MEGACO_FLEX_SCANNER),true)
+ $(INSTALL_DATA) $(FLEX_FILES) $(RELSYSDIR)/src/flex
+- $(INSTALL_DATA) $(SOLIBS) $(RELSYSDIR)/priv/lib
++ $(INSTALL_PROGRAM) $(SOLIBS) $(RELSYSDIR)/priv/lib
+ endif
+
+
+--
+1.6.6.1
+
diff --git a/otp-R11B-2-0006-Fix-missing-ssl-libraries-in-EPEL.patch b/otp-R11B-2-0006-Fix-missing-ssl-libraries-in-EPEL.patch
new file mode 100644
index 0000000..16ddb68
--- /dev/null
+++ b/otp-R11B-2-0006-Fix-missing-ssl-libraries-in-EPEL.patch
@@ -0,0 +1,219 @@
+From 8fbb7446060768f03912ec903992bcf57e8d6974 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Mon, 19 Apr 2010 13:39:17 +0400
+Subject: [PATCH 6/8] Fix missing ssl-libraries in EPEL
+
+---
+ lib/ssl/c_src/Makefile.in | 2 +-
+ lib/ssl/c_src/Makefile.in~ | 186 ++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 187 insertions(+), 1 deletions(-)
+ create mode 100644 lib/ssl/c_src/Makefile.in~
+
+diff --git a/lib/ssl/c_src/Makefile.in b/lib/ssl/c_src/Makefile.in
+index b145aac..20f8dc8 100644
+--- a/lib/ssl/c_src/Makefile.in
++++ b/lib/ssl/c_src/Makefile.in
+@@ -38,7 +38,7 @@ VSN=$(SSL_VSN)
+ CC = @CC@
+ LD = @LD@
+ SHELL = /bin/sh
+-LIBS = @LIBS@
++LIBS = @LIBS@ -lkeyutils -lselinux
+
+ # ----------------------------------------------------
+ # Includes and libs
+diff --git a/lib/ssl/c_src/Makefile.in~ b/lib/ssl/c_src/Makefile.in~
+new file mode 100644
+index 0000000..b145aac
+--- /dev/null
++++ b/lib/ssl/c_src/Makefile.in~
+@@ -0,0 +1,186 @@
++# ``The contents of this file are subject to the Erlang Public License,
++# Version 1.1, (the "License"); you may not use this file except in
++# compliance with the License. You should have received a copy of the
++# Erlang Public License along with this software. If not, it can be
++# retrieved via the world wide web at http://www.erlang.org/.
++#
++# Software distributed under the License is distributed on an "AS IS"
++# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
++# the License for the specific language governing rights and limitations
++# under the License.
++#
++# The Initial Developer of the Original Code is Ericsson Utvecklings AB.
++# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
++# AB. All Rights Reserved.''
++#
++# $Id$
++#
++# Makefile only for Unix and Win32/Cygwin.
++#
++
++include $(ERL_TOP)/make/target.mk
++include $(ERL_TOP)/make/$(TARGET)/otp.mk
++# ----------------------------------------------------
++# SSL locations and include options from configure
++# ----------------------------------------------------
++SSL_LIBDIR = @SSL_LIBDIR@
++SSL_INCLUDE = @SSL_INCLUDE@
++
++# ----------------------------------------------------
++# Application version
++# ----------------------------------------------------
++include ../vsn.mk
++VSN=$(SSL_VSN)
++
++# ----------------------------------------------------
++# Commands
++# ----------------------------------------------------
++CC = @CC@
++LD = @LD@
++SHELL = /bin/sh
++LIBS = @LIBS@
++
++# ----------------------------------------------------
++# Includes and libs
++# ----------------------------------------------------
++
++ALL_CFLAGS = @WFLAGS@ @CFLAGS@ @DEFS@ $(TYPE_FLAGS)
++TARGET = @host@
++
++ifeq ($(TYPE),debug)
++TYPEMARKER = .debug
++TYPE_FLAGS = -g -DDEBUG @DEBUG_FLAGS@
++else
++TYPEMARKER =
++TYPE_FLAGS = -O2
++endif
++
++PRIVDIR = ../priv
++BINDIR = $(PRIVDIR)/bin/$(TARGET)
++OBJDIR = $(PRIVDIR)/obj/$(TARGET)
++
++# ----------------------------------------------------
++# File suffixes
++# ----------------------------------------------------
++exe = @EXEEXT@
++obj = .@OBJEXT@
++
++# ----------------------------------------------------
++# Release directory specification
++# ----------------------------------------------------
++RELSYSDIR = $(RELEASE_PATH)/lib/ssl-$(VSN)
++
++# ----------------------------------------------------
++# Common Macros
++# ----------------------------------------------------
++OBJS = $(OBJDIR)/esock$(obj) \
++ $(OBJDIR)/debuglog$(obj) \
++ $(OBJDIR)/esock_poll$(obj) \
++ $(OBJDIR)/esock_osio$(obj) \
++ $(OBJDIR)/esock_utils$(obj) \
++ $(OBJDIR)/esock_posix_str$(obj) \
++ $(OBJDIR)/esock_openssl$(obj)
++
++PORT_PROGRAM = $(BINDIR)/ssl_esock$(exe)
++
++ifneq ($(TARGET),win32)
++SSL_MAKEFILE = $(OBJDIR)/Makefile
++SKIP_BUILDING_BINARIES := false
++else
++ifeq ($(HOST_OS),)
++HOST_OS := $(shell $(ERL_TOP)/erts/autoconf/config.guess)
++endif
++ifeq ($(findstring solaris,$(HOST_OS)),solaris)
++SKIP_BUILDING_BINARIES := true
++endif
++endif
++
++CC_R_FLAG=
++ifeq ($(findstring @,$(CC_R_FLAG)),@)
++# Old erts configure used which hasn't replaced @CFLAG_RUNTIME_LIBRARY_PATH@;
++# we try our best here instead...
++
++ifeq ($(findstring darwin,$(TARGET)),darwin) # darwin: no flag
++CC_R_FLAG =
++else
++ifeq ($(findstring osf,$(TARGET)),osf) # osf1: -Wl,-rpath,
++CC_R_FLAG =
++else # Default: -Wl,-R
++CC_R_FLAG =
++endif
++endif
++
++endif
++
++ifeq ($(strip $(CC_R_FLAG)),)
++CC_R_OPT =
++else
++CC_R_OPT = $(CC_R_FLAG)$(SSL_LIBDIR)
++endif
++
++
++# ----------------------------------------------------
++# Targets
++# ----------------------------------------------------
++
++ifeq ($(SKIP_BUILDING_BINARIES), true)
++debug opt:
++else
++debug opt: $(OBJDIR) $(BINDIR) $(OBJS) $(PORT_PROGRAM) $(SSL_MAKEFILE)
++endif
++
++$(OBJDIR):
++ -@mkdir -p $(OBJDIR)
++
++$(BINDIR):
++ -@mkdir -p $(BINDIR)
++
++$(OBJDIR)/esock_openssl$(obj): esock_openssl.c
++ $(CC) -c -o $@ $(ALL_CFLAGS) $(SSL_INCLUDE) $<
++
++$(OBJDIR)/%$(obj): %.c
++ $(CC) -c -o $@ $(ALL_CFLAGS) $<
++
++# Unix
++$(BINDIR)/ssl_esock: $(OBJS)
++ $(CC) -L$(SSL_LIBDIR) $(CC_R_OPT) -o $@ $^ \
++ $(LIBS) -lssl -lcrypto
++
++# Win32/Cygwin
++$(BINDIR)/ssl_esock.exe: $(OBJS)
++ $(LD) -L$(SSL_LIBDIR) -o $@ $^ -lwsock32 -llibeay32 -lssleay32
++
++# Unix only
++$(SSL_MAKEFILE):
++ sed -e "s;%BINDIR%;../../bin/$(TARGET);" \
++ -e "s;%SSL_LIBDIR%;$(SSL_LIBDIR);" \
++ -e "s;%OBJS;$(OBJS);" \
++ -e "s;%LIBS%;$(LIBS);" ./Makefile.dist \
++ > $(OBJDIR)/Makefile
++
++
++clean:
++ rm -f $(PORT_PROGRAM) $(OBJS) core *~ $(SSL_MAKEFILE)
++
++docs:
++
++# ----------------------------------------------------
++# Release Target
++# ----------------------------------------------------
++include $(ERL_TOP)/make/otp_release_targets.mk
++
++release_spec: opt
++ $(INSTALL_DIR) $(RELSYSDIR)/priv/bin
++ $(INSTALL_DIR) $(RELSYSDIR)/priv/obj
++ $(INSTALL_DATA) $(OBJS) $(RELSYSDIR)/priv/obj
++ $(INSTALL_PROGRAM) $(PORT_PROGRAM) $(RELSYSDIR)/priv/bin
++ifneq ($(TARGET),win32)
++ sed -e "s;%BINDIR%;../bin;" \
++ -e "s;%SSL_LIBDIR%;$(SSL_LIBDIR);" \
++ -e "s;%OBJS;$(OBJS);" \
++ -e "s;%LIBS%;$(LIBS);" ./Makefile.dist \
++ > $(RELSYSDIR)/priv/obj/Makefile
++endif
++
++release_docs_spec:
++
+--
+1.6.6.1
+
diff --git a/otp-R11B-2-0007-Fix-for-Glibc-2.5.patch b/otp-R11B-2-0007-Fix-for-Glibc-2.5.patch
new file mode 100644
index 0000000..f19dfdd
--- /dev/null
+++ b/otp-R11B-2-0007-Fix-for-Glibc-2.5.patch
@@ -0,0 +1,25 @@
+From 319be0f08f4dd4df861b550bf45ee36feb0515fb Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Mon, 19 Apr 2010 15:23:08 +0400
+Subject: [PATCH 7/8] Fix for Glibc 2.5
+
+---
+ erts/emulator/hipe/hipe_x86_signal.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/erts/emulator/hipe/hipe_x86_signal.c b/erts/emulator/hipe/hipe_x86_signal.c
+index 42097ef..f37e499 100644
+--- a/erts/emulator/hipe/hipe_x86_signal.c
++++ b/erts/emulator/hipe/hipe_x86_signal.c
+@@ -34,7 +34,7 @@
+ #endif
+ #include "hipe_signal.h"
+
+-#if __GLIBC__ == 2 && (__GLIBC_MINOR__ == 3 || __GLIBC_MINOR__ == 4)
++#if __GLIBC__ == 2 && (__GLIBC_MINOR__ == 3 || __GLIBC_MINOR__ == 4 || __GLIBC_MINOR__ == 5)
+ /* See comment below for glibc 2.2. */
+ #ifndef __USE_GNU
+ #define __USE_GNU /* to un-hide RTLD_NEXT */
+--
+1.6.6.1
+
diff --git a/otp-R11B-2-0008-Fix-for-run_erl-utility.patch b/otp-R11B-2-0008-Fix-for-run_erl-utility.patch
new file mode 100644
index 0000000..802e5da
--- /dev/null
+++ b/otp-R11B-2-0008-Fix-for-run_erl-utility.patch
@@ -0,0 +1,63 @@
+From 82764cd53a519b552fb4f62814ca65cd77105f14 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Mon, 19 Apr 2010 15:23:49 +0400
+Subject: [PATCH 8/8] Fix for run_erl utility
+
+---
+ erts/etc/common/Makefile.in | 2 +-
+ erts/etc/unix/run_erl.c | 12 ++++++++++++
+ 2 files changed, 13 insertions(+), 1 deletions(-)
+
+diff --git a/erts/etc/common/Makefile.in b/erts/etc/common/Makefile.in
+index d0b9a7f..18c2f8d 100644
+--- a/erts/etc/common/Makefile.in
++++ b/erts/etc/common/Makefile.in
+@@ -280,7 +280,7 @@ $(BINDIR)/inet_gethost@EXEEXT@: $(OBJDIR)/inet_gethost.o $(ENTRY_OBJ)
+ $(PURIFY) $(LD) $(LDFLAGS) $(ENTRY_LDFLAGS) -o $@ $(OBJDIR)/inet_gethost.o $(ENTRY_OBJ) $(LIBS)
+
+ $(BINDIR)/run_erl: $(OBJDIR)/run_erl.o
+- $(LD) $(LDFLAGS) -o $@ $(OBJDIR)/run_erl.o
++ $(LD) $(LDFLAGS) -lutil -o $@ $(OBJDIR)/run_erl.o
+
+ $(OBJDIR)/run_erl.o: ../unix/run_erl.c
+ $(CC) $(CFLAGS) -o $@ -c ../unix/run_erl.c
+diff --git a/erts/etc/unix/run_erl.c b/erts/etc/unix/run_erl.c
+index a39ace3..ec73a68 100644
+--- a/erts/etc/unix/run_erl.c
++++ b/erts/etc/unix/run_erl.c
+@@ -42,6 +42,8 @@
+ #include <dirent.h>
+ #include <termios.h>
+ #include <time.h>
++#include <pty.h>
++#include <utmp.h>
+ #if !defined(NO_SYSLOG)
+ #include <syslog.h>
+ #endif
+@@ -803,6 +805,7 @@ static int create_fifo(char *name, int perm)
+ static int open_pty_master(char **ptyslave)
+ {
+ int mfd;
++ int sfd;
+ char *major, *minor;
+
+ static char majorchars[] = "pqrstuvwxyzabcdePQRSTUVWXYZABCDE";
+@@ -818,6 +821,15 @@ static int open_pty_master(char **ptyslave)
+ /* http://www.xcf.berkeley.edu/~ali/K0D/UNIX/PTY/code/upty.h.html */
+
+ {
++ static char ttyname[] = " ";
++ if (0 == openpty(&mfd, &sfd, ttyname, NULL, NULL)) {
++ close(sfd);
++ *ptyslave = ttyname;
++ return mfd;
++ }
++ }
++
++ {
+ /* New style devpts or devfs /dev/pty/{m,s}{0,1....} */
+
+ static char ptyname[] = "/dev/pty/mX";
+--
+1.6.6.1
+
diff --git a/otp-install.patch b/otp-install.patch
deleted file mode 100644
index 68066c7..0000000
--- a/otp-install.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- otp_src_R9C-0/erts/etc/unix/Install.src.install 2003-10-17 12:52:14.000000000 +0200
-+++ otp_src_R9C-0/erts/etc/unix/Install.src 2003-10-17 14:26:49.000000000 +0200
-@@ -84,7 +84,7 @@
- /bin/rm -f epmd
- fi
-
--ln -s $ERL_ROOT/erts-%I_VSN%/bin/epmd epmd
-+ln -s ../erts-%I_VSN%/bin/epmd epmd
-
- cp -p $ERL_ROOT/erts-%I_VSN%/bin/run_erl .
- cp -p $ERL_ROOT/erts-%I_VSN%/bin/to_erl .
-@@ -145,16 +145,4 @@
- (ranlib $library) > /dev/null 2>&1
- done
- fi
--
--
--#
--# Fixing the man pages
--#
--
--if [ -d $ERL_ROOT/man ]
--then
-- cd $ERL_ROOT
-- ./misc/format_man_pages $ERL_ROOT
--fi
--
--
-+exit 0
diff --git a/otp-links.patch b/otp-links.patch
deleted file mode 100644
index 6c8b227..0000000
--- a/otp-links.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- otp_src_R11B-0/Makefile.in.links 2006-05-12 16:43:44.000000000 +0200
-+++ otp_src_R11B-0/Makefile.in 2006-05-18 20:27:56.000000000 +0200
-@@ -545,10 +545,6 @@
- # Install erlang base public files
- #
- install.bin:
-- for file in $(ERL_BASE_PUB_FILES); do \
-- rm -f $(BINDIR)/$$file; \
-- ${LN_S} $(ERLANG_BINDIR)/$$file $(BINDIR)/$$file; \
-- done
-
- #
- # Directories needed before we can install
diff --git a/otp-ssl_missing_libs.patch b/otp-ssl_missing_libs.patch
deleted file mode 100644
index 7c36647..0000000
--- a/otp-ssl_missing_libs.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/ssl/c_src/Makefile.in 2008-03-27 13:43:04.000000000 +0300
-+++ lib/ssl/c_src/Makefile.in 2008-03-27 14:03:27.000000000 +0300
-@@ -38,7 +38,7 @@
- CC = @CC@
- LD = @LD@
- SHELL = /bin/sh
--LIBS = @LIBS@
-+LIBS = @LIBS@ -lkeyutils -lselinux
- PLAIN_CFLAGS = @CFLAGS@
-
- # ----------------------------------------------------
diff --git a/otp-sslrpath.patch b/otp-sslrpath.patch
deleted file mode 100644
index 83ba120..0000000
--- a/otp-sslrpath.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- otp_src_R10B-9/lib/ssl/c_src/Makefile.in.sslrpath 2005-12-29 00:49:17.000000000 +0100
-+++ otp_src_R10B-9/lib/ssl/c_src/Makefile.in 2005-12-29 00:50:15.000000000 +0100
-@@ -95,7 +95,7 @@
- endif
- endif
-
--CC_R_FLAG=@CFLAG_RUNTIME_LIBRARY_PATH@
-+CC_R_FLAG=
- ifeq ($(findstring @,$(CC_R_FLAG)),@)
- # Old erts configure used which hasn't replaced @CFLAG_RUNTIME_LIBRARY_PATH@;
- # we try our best here instead...
diff --git a/sources b/sources
index c7aff56..eeb163b 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-8865d406c256abbff63eaff62d2216aa otp_doc_html_R12B-3.tar.gz
-13098954c9d5804bb8394fe7badb3d0d otp_doc_man_R12B-3.tar.gz
-c2e7f0ad54b8fadebde2d94106608d97 otp_src_R12B-3.tar.gz
+e2c45ced77ec63b9b1dd95c8f5396f7d otp_doc_html_R11B-2.tar.gz
+c81023f591c1bace836de3aa874f3c2a otp_doc_man_R11B-2.tar.gz
+7d7cca1d2f392a8a317cb4c0bd904726 otp_src_R11B-2.tar.gz