[Pkg-erlang-commits] r1295 - in erlang/trunk/debian: . lintian patches
sgolovan at alioth.debian.org
sgolovan at alioth.debian.org
Sun Nov 14 10:39:50 UTC 2010
Author: sgolovan
Date: 2010-11-14 10:39:50 +0000 (Sun, 14 Nov 2010)
New Revision: 1295
Modified:
erlang/trunk/debian/changelog
erlang/trunk/debian/lintian/erlang-base-hipe.lintian-overrides
erlang/trunk/debian/lintian/erlang-base.lintian-overrides
erlang/trunk/debian/patches/odbc.patch
Log:
[erlang]
* Overridden lintian error mesage about embedded pcre3 library because it
is patched and cannot be replaced by a system one.
* Replaced my patch to odbc by upstream's one.
Modified: erlang/trunk/debian/changelog
===================================================================
--- erlang/trunk/debian/changelog 2010-11-05 20:16:17 UTC (rev 1294)
+++ erlang/trunk/debian/changelog 2010-11-14 10:39:50 UTC (rev 1295)
@@ -8,8 +8,10 @@
still less buggy then the new one written in Erlang).
* Enabled IPv6 for odbcserver and prefer IPv4 in odbc.erl to make odbc
application working in IPv6-only environment (closes: #598525).
+ * Overridden lintian error mesage about embedded pcre3 library because it
+ is patched and cannot be replaced by a system one.
- -- Sergei Golovan <sgolovan at debian.org> Sun, 17 Oct 2010 18:22:54 +0400
+ -- Sergei Golovan <sgolovan at debian.org> Sun, 14 Nov 2010 12:25:50 +0300
erlang (1:14.a-dfsg-2) unstable; urgency=low
Modified: erlang/trunk/debian/lintian/erlang-base-hipe.lintian-overrides
===================================================================
--- erlang/trunk/debian/lintian/erlang-base-hipe.lintian-overrides 2010-11-05 20:16:17 UTC (rev 1294)
+++ erlang/trunk/debian/lintian/erlang-base-hipe.lintian-overrides 2010-11-14 10:39:50 UTC (rev 1295)
@@ -1,3 +1,4 @@
-# Zlib which is embedded into Erlang VM is patched, so I'm not sure
-# if it's possible to link it to an external zlib.
+# Zlib and PCRE3 which are embedded into Erlang VM are patched, so
+# it's not possible to link them to an external zlib or pcre3.
erlang-base-hipe: embedded-zlib
+erlang-base-hipe: embedded-library
Modified: erlang/trunk/debian/lintian/erlang-base.lintian-overrides
===================================================================
--- erlang/trunk/debian/lintian/erlang-base.lintian-overrides 2010-11-05 20:16:17 UTC (rev 1294)
+++ erlang/trunk/debian/lintian/erlang-base.lintian-overrides 2010-11-14 10:39:50 UTC (rev 1295)
@@ -1,3 +1,4 @@
-# Zlib which is embedded into Erlang VM is patched, so I'm not sure
-# if it's possible to link it to an external zlib.
+# Zlib and PCRE3 which are embedded into Erlang VM are patched, so
+# it's not possible to link them to an external zlib or pcre3.
erlang-base: embedded-zlib
+erlang-base: embedded-library
Modified: erlang/trunk/debian/patches/odbc.patch
===================================================================
--- erlang/trunk/debian/patches/odbc.patch 2010-11-05 20:16:17 UTC (rev 1294)
+++ erlang/trunk/debian/patches/odbc.patch 2010-11-14 10:39:50 UTC (rev 1295)
@@ -1,13 +1,30 @@
-Author: Sergei Golovan
+Author: Upstream
Description: Fixes connecting odbcserver back to Erlang VM in IPv6-only
environment
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598525
-Forwarded: yes
-Last-updated: Sun, 17 Oct 2010 18:22:41 +0400
+Forwarded: not-needed
+Last-updated: Sun, 14 Nov 2010 12:20:41 +0300
+--- erlang-14.a-dfsg.orig/lib/odbc/src/odbc.erl
++++ erlang-14.a-dfsg/lib/odbc/src/odbc.erl
+@@ -441,10 +441,12 @@ init(Args) ->
+
+ {ok, ListenSocketSup} =
+ gen_tcp:listen(0, [Inet, binary, {packet, ?LENGTH_INDICATOR_SIZE},
+- {active, false}, {nodelay, true}]),
++ {active, false}, {nodelay, true},
++ {ip, loopback}]),
+ {ok, ListenSocketOdbc} =
+ gen_tcp:listen(0, [Inet, binary, {packet, ?LENGTH_INDICATOR_SIZE},
+- {active, false}, {nodelay, true}]),
++ {active, false}, {nodelay, true},
++ {ip, loopback}]),
+
+ %% Start the port program (a c program) that utilizes the odbc driver
+ case os:find_executable(?SERVERPROG, ?SERVERDIR) of
--- erlang-14.a-dfsg.orig/lib/odbc/c_src/odbcserver.c
+++ erlang-14.a-dfsg/lib/odbc/c_src/odbcserver.c
-@@ -1727,10 +1727,6 @@
+@@ -1727,74 +1727,48 @@ static byte * receive_erlang_port_msg(void)
}
/* ------------- Socket communication functions --------------------------*/
@@ -16,23 +33,102 @@
-#define SOCKET int
-#endif
- #if defined WIN32 || defined USE_IPV4
- /* Currently only an old windows compiler is supported so we do not have ipv6
---- erlang-14.a-dfsg.orig/lib/odbc/src/odbc.erl
-+++ erlang-14.a-dfsg/lib/odbc/src/odbc.erl
-@@ -431,12 +431,12 @@
+-#if defined WIN32 || defined USE_IPV4
+-/* Currently only an old windows compiler is supported so we do not have ipv6
+- capabilities */
++#if defined(WIN32)
+ static SOCKET connect_to_erlang(const char *port)
+-{
+- SOCKET sock;
+- struct sockaddr_in sin;
+-
+- sock = socket(AF_INET, SOCK_STREAM, 0);
+-
+- memset(&sin, 0, sizeof(sin));
+- sin.sin_port = htons ((unsigned short)atoi(port));
+- sin.sin_family = AF_INET;
+- sin.sin_addr.s_addr = inet_addr("127.0.0.1");
+-
+- if (connect(sock, (struct sockaddr*)&sin, sizeof(sin)) != 0) {
+- close_socket(sock);
+- DO_EXIT(EXIT_SOCKET_CONNECT);
+- }
+- return sock;
+-}
+ #elif defined(UNIX)
+ static int connect_to_erlang(const char *port)
++#endif
+ {
+- int sock;
+-
+- struct addrinfo hints;
+- struct addrinfo *erlang_ai, *first;
+-
+- memset(&hints, 0, sizeof(hints));
+- hints.ai_family = PF_UNSPEC; /* PF_INET or PF_INET6 */
+- hints.ai_socktype = SOCK_STREAM;
+- hints.ai_protocol = IPPROTO_TCP;
+-
+- if (getaddrinfo("localhost", port, &hints, &first) != 0) {
+- DO_EXIT(EXIT_FAILURE);
+- }
++#if defined(WIN32)
++ SOCKET sock;
++#elif defined(UNIX)
++ int sock;
++#endif
++ struct sockaddr_in sin;
++
++#if defined(AF_INET6)
++ struct sockaddr_in6 sin6;
++
++ sock = socket(AF_INET6, SOCK_STREAM, 0);
++
++ memset(&sin6, 0, sizeof(sin6));
++ sin6.sin6_port = htons ((unsigned short)atoi(port));
++ sin6.sin6_family = AF_INET6;
++ sin6.sin6_addr = in6addr_loopback;
- erlang:monitor(process, ClientPid),
-
-- Inet = case gen_tcp:listen(0, [inet6]) of
-+ Inet = case gen_tcp:listen(0, [inet]) of
- {ok, Dummyport} ->
- gen_tcp:close(Dummyport),
-- inet6;
-+ inet;
- _ ->
-- inet
-+ inet6
- end,
+- for (erlang_ai = first; erlang_ai; erlang_ai = erlang_ai->ai_next) {
++ if (connect(sock, (struct sockaddr*)&sin6, sizeof(sin6)) == 0) {
++ return sock;
++ }
++ close_socket(sock);
++#endif
++ sock = socket(AF_INET, SOCK_STREAM, 0);
++
++ memset(&sin, 0, sizeof(sin));
++ sin.sin_port = htons ((unsigned short)atoi(port));
++ sin.sin_family = AF_INET;
++ sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+
+- sock = socket(erlang_ai->ai_family, erlang_ai->ai_socktype,
+- erlang_ai->ai_protocol);
+- if (sock < 0)
+- continue;
+- if (connect(sock, (struct sockaddr*)erlang_ai->ai_addr,
+- erlang_ai->ai_addrlen) < 0) {
+- close(sock);
+- sock = -1;
+- continue;
+- } else {
+- break;
++ if (connect(sock, (struct sockaddr*)&sin, sizeof(sin)) != 0) {
++ close_socket(sock);
++ DO_EXIT(EXIT_SOCKET_CONNECT);
+ }
+- }
+- freeaddrinfo(first);
+-
+- if (sock < 0){
+- close_socket(sock);
+- DO_EXIT(EXIT_SOCKET_CONNECT);
+- }
+-
+- return sock;
++ return sock;
+ }
+-#endif
- {ok, ListenSocketSup} =
+ #ifdef WIN32
+ static void close_socket(SOCKET socket)
More information about the Pkg-erlang-commits
mailing list