Hello community,

here is the log from the commit of package erlang for openSUSE:Factory checked 
in at 2014-02-18 14:44:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/erlang (Old)
 and      /work/SRC/openSUSE:Factory/.erlang.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "erlang"

Changes:
--------
--- /work/SRC/openSUSE:Factory/erlang/erlang.changes    2013-12-30 
09:51:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.erlang.new/erlang.changes       2014-02-18 
14:44:03.000000000 +0100
@@ -1,0 +2,5 @@
+Thu Feb  6 12:12:26 UTC 2014 - [email protected]
+
+- Add User and Group to epmd.service
+
+-------------------------------------------------------------------

New:
----
  0001-Add-systemd-option-to-empd.-Check-for-include-system.patch
  0002-Add-systemd-support-to-epmd.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ erlang.spec ++++++
--- /var/tmp/diff_new_pack.Si6CGU/_old  2014-02-18 14:44:05.000000000 +0100
+++ /var/tmp/diff_new_pack.Si6CGU/_new  2014-02-18 14:44:05.000000000 +0100
@@ -45,6 +45,10 @@
 Patch4:         erlang-not-install-misc.patch
 # PATCH-FIX-UPSTREAM crypto.patch - [email protected] -- fix 
compilation with disabled EC in openssl
 Patch5:         crypto.patch
+# PATCH-FEATURE-OPENSUSE 
0001-Add-systemd-option-to-empd.-Check-for-include-system.patch - 
[email protected] -- add systemd socket activation for epmd
+Patch6:         0001-Add-systemd-option-to-empd.-Check-for-include-system.patch
+# PATCH-FEATURE-OPENSUSE 0002-Add-systemd-support-to-epmd.patch - 
[email protected] -- add systemd socket activation for epmd
+Patch7:         0002-Add-systemd-support-to-epmd.patch
 # autoconf is required only by fix-armv7hl.patch
 BuildRequires:  autoconf
 BuildRequires:  gcc-c++
@@ -294,8 +298,10 @@
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
+%patch7 -p1
 
-chmod -R u+w .
+./otp_build autoconf
 # enable dynamic linking for ssl
 sed -i 's|SSL_DYNAMIC_ONLY=no|SSL_DYNAMIC_ONLY=yes|' erts/configure
 # Remove shipped zlib sources

++++++ 0001-Add-systemd-option-to-empd.-Check-for-include-system.patch ++++++
>From 683234526d0f0d6607b497105b2726e0a0a13fa2 Mon Sep 17 00:00:00 2001
From: "Matwey V. Kornilov" <[email protected]>
Date: Tue, 17 Dec 2013 18:16:56 +0400
Subject: [PATCH 1/2] Add -systemd option to empd. Check for include
 systemd/sd-daemon.h and wrap systemd code into ifdef-s.

---
 erts/configure.in        |  2 ++
 erts/epmd/src/epmd.c     | 16 ++++++++++++++--
 erts/epmd/src/epmd_int.h |  3 +++
 3 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/erts/configure.in b/erts/configure.in
index bad748d..6ba4c91 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -1563,6 +1563,8 @@ AC_CHECK_MEMBERS([struct ifreq.ifr_enaddr], [], [],
         #endif
        ])
 
+AC_CHECK_HEADERS(systemd/sd-daemon.h)
+
 dnl ----------------------------------------------------------------------
 dnl Check the availability for libdlpi
 dnl ----------------------------------------------------------------------
diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c
index 2d55b37..fc58882 100644
--- a/erts/epmd/src/epmd.c
+++ b/erts/epmd/src/epmd.c
@@ -175,6 +175,9 @@ int main(int argc, char** argv)
     g->nodes.reg = g->nodes.unreg = g->nodes.unreg_tail = NULL;
     g->nodes.unreg_count = 0;
     g->active_conn    = 0;
+#ifdef HAVE_SYSTEMD_SD_DAEMON_H
+    g->is_systemd     = 0;
+#endif
 
     for (i = 0; i < MAX_LISTEN_SOCKETS; i++)
        g->listenfd[i] = -1;
@@ -248,8 +251,12 @@ int main(int argc, char** argv)
            else
                usage(g);
            epmd_cleanup_exit(g,0);
-       }
-       else
+#ifdef HAVE_SYSTEMD_SD_DAEMON_H
+       } else if (strcmp(argv[0], "-systemd") == 0) {
+            g->is_systemd = 1;
+            argv++; argc--;
+#endif
+       } else
            usage(g);
     }
     dbg_printf(g,1,"epmd running - daemon = %d",g->is_daemon);
@@ -454,6 +461,11 @@ static void usage(EpmdVars *g)
     fprintf(stderr, "        Forcibly unregisters a name with epmd\n");
     fprintf(stderr, "        (only allowed if -relaxed_command_check was given 
when \n");
     fprintf(stderr, "        epmd was started).\n");
+#ifdef HAVE_SYSTEMD_SD_DAEMON_H
+    fprintf(stderr, "    -systemd\n");
+    fprintf(stderr, "        Wait for socket from systemd. The option makes 
sense\n");
+    fprintf(stderr, "        when started from .socket unit.\n");
+#endif
     epmd_cleanup_exit(g,1);
 }
 
diff --git a/erts/epmd/src/epmd_int.h b/erts/epmd/src/epmd_int.h
index 656dbd1..bf1ddd8 100644
--- a/erts/epmd/src/epmd_int.h
+++ b/erts/epmd/src/epmd_int.h
@@ -321,6 +321,9 @@ typedef struct {
   int listenfd[MAX_LISTEN_SOCKETS];
   char *addresses;
   char **argv;
+#ifdef HAVE_SYSTEMD_SD_DAEMON_H
+  int is_systemd;
+#endif
 } EpmdVars;
 
 void dbg_printf(EpmdVars*,int,const char*,...);
-- 
1.8.1.4

++++++ 0002-Add-systemd-support-to-epmd.patch ++++++
>From 1918ae01eb9eb7ada5ab974307bcdf6630b838a2 Mon Sep 17 00:00:00 2001
From: "Matwey V. Kornilov" <[email protected]>
Date: Tue, 17 Dec 2013 18:57:54 +0400
Subject: [PATCH 2/2] Add systemd support to epmd

---
 erts/configure.in        |  2 ++
 erts/epmd/src/epmd_int.h |  4 ++++
 erts/epmd/src/epmd_srv.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 52 insertions(+)

diff --git a/erts/configure.in b/erts/configure.in
index 6ba4c91..3ed1238 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -967,6 +967,8 @@ AC_CHECK_LIB(dl, dlopen)
 AC_CHECK_LIB(inet, main)
 AC_CHECK_LIB(util, openpty)
 
+AC_CHECK_LIB(systemd-daemon, sd_listen_fds)
+
 dnl Try to find a thread library.
 dnl
 dnl ETHR_LIB_NAME, ETHR_LIBS, ETHR_X_LIBS, ETHR_THR_LIB_BASE and ETHR_DEFS
diff --git a/erts/epmd/src/epmd_int.h b/erts/epmd/src/epmd_int.h
index bf1ddd8..363923e 100644
--- a/erts/epmd/src/epmd_int.h
+++ b/erts/epmd/src/epmd_int.h
@@ -110,6 +110,10 @@
 
 #include <stdarg.h>
 
+#ifdef HAVE_SYSTEMD_SD_DAEMON_H
+#  include <systemd/sd-daemon.h>
+#endif
+
 /* ************************************************************************ */
 /* Replace some functions by others by making the function name a macro */
 
diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c
index 90df7cc..cb8ca96 100644
--- a/erts/epmd/src/epmd_srv.c
+++ b/erts/epmd/src/epmd_srv.c
@@ -208,6 +208,39 @@ void run(EpmdVars *g)
   node_init(g);
   g->conn = conn_init(g);
 
+#ifdef HAVE_SYSTEMD_SD_DAEMON_H
+  if (g->is_systemd)
+    {
+      int n;
+      
+      dbg_printf(g,2,"try to obtain sockets from systemd");
+
+      n = sd_listen_fds(0);
+      if (n < 0)
+        {
+          dbg_perror(g,"cannot obtain sockets from systemd");
+          epmd_cleanup_exit(g,1);
+        }
+      else if (n == 0)
+        {
+          dbg_tty_printf(g,0,"systemd provides no sockets");
+          epmd_cleanup_exit(g,1);
+      }
+      else if (n > MAX_LISTEN_SOCKETS)
+      {
+          dbg_tty_printf(g,0,"cannot listen on more than %d IP addresses", 
MAX_LISTEN_SOCKETS);
+          epmd_cleanup_exit(g,1);
+      } 
+      num_sockets = n;
+      for (i = 0; i < num_sockets; i++)
+        {
+          g->listenfd[i] = listensock[i] = SD_LISTEN_FDS_START + i;
+        }
+    }
+  else
+    {
+#endif
+
   dbg_printf(g,2,"try to initiate listening port %d", g->port);
 
   if (g->addresses != NULL && /* String contains non-separator characters if: 
*/
@@ -272,6 +305,9 @@ void run(EpmdVars *g)
       SET_ADDR(iserv_addr[0],EPMD_ADDR_ANY,sport);
       num_sockets = 1;
     }
+#ifdef HAVE_SYSTEMD_SD_DAEMON_H
+    }
+#endif
 
 #if !defined(__WIN32__)
   /* We ignore the SIGPIPE signal that is raised when we call write
@@ -289,6 +325,13 @@ void run(EpmdVars *g)
   FD_ZERO(&g->orig_read_mask);
   g->select_fd_top = 0;
 
+#ifdef HAVE_SYSTEMD_SD_DAEMON_H
+  if (g->is_systemd)
+      for (i = 0; i < num_sockets; i++)
+          select_fd_set(g, listensock[i]);
+  else
+    {
+#endif
   for (i = 0; i < num_sockets; i++)
     {
       if ((listensock[i] = socket(FAMILY,SOCK_STREAM,0)) < 0)
@@ -351,6 +394,9 @@ void run(EpmdVars *g)
       }
       select_fd_set(g, listensock[i]);
     }
+#ifdef HAVE_SYSTEMD_SD_DAEMON_H 
+    }
+#endif
 
   dbg_tty_printf(g,2,"entering the main select() loop");
 
-- 
1.8.1.4

++++++ epmd.service ++++++
--- /var/tmp/diff_new_pack.Si6CGU/_old  2014-02-18 14:44:05.000000000 +0100
+++ /var/tmp/diff_new_pack.Si6CGU/_new  2014-02-18 14:44:05.000000000 +0100
@@ -1,12 +1,18 @@
 [Unit]
 Description=Erlang Port Mapper Daemon
+After=network.target
+Requires=epmd.socket
 
 [Service]
-EnvironmentFile=/etc/sysconfig/erlang
-ExecStart=/usr/bin/epmd -daemon -address ${EPMD_ADDRESSES} -port ${EPMD_PORT}
+ExecStart=/usr/bin/epmd -systemd
 ExecStop=/usr/bin/epmd -kill
-Type=forking
+Type=simple
+StandardOutput=journal
+StandardError=journal
+User=epmd
+Group=epmd
 
 [Install]
+Also=epmd.socket
 WantedBy=multi-user.target
 

++++++ epmd.socket ++++++
--- /var/tmp/diff_new_pack.Si6CGU/_old  2014-02-18 14:44:05.000000000 +0100
+++ /var/tmp/diff_new_pack.Si6CGU/_new  2014-02-18 14:44:05.000000000 +0100
@@ -1,9 +1,10 @@
 [Unit]
-Conflicts=epmd.service
+Description=Erlang Port Mapper Daemon Activation Socket
 
 [Socket]
 ListenStream=4369
-Accept=no
+Accept=false
 
 [Install]
 WantedBy=sockets.target
+

++++++ erlang-ppc.patch ++++++
--- /var/tmp/diff_new_pack.Si6CGU/_old  2014-02-18 14:44:05.000000000 +0100
+++ /var/tmp/diff_new_pack.Si6CGU/_new  2014-02-18 14:44:05.000000000 +0100
@@ -1,8 +1,8 @@
-Index: otp_src_R16B02/erts/configure
+Index: otp_src_R16B03/erts/configure
 ===================================================================
---- otp_src_R16B02.orig/erts/configure
-+++ otp_src_R16B02/erts/configure
-@@ -5418,6 +5418,7 @@ case $chk_arch_ in
+--- otp_src_R16B03.orig/erts/configure
++++ otp_src_R16B03/erts/configure
+@@ -5405,6 +5405,7 @@ case $chk_arch_ in
      x86_64)   ARCH=amd64;;
      amd64)    ARCH=amd64;;
      macppc)   ARCH=ppc;;
@@ -10,11 +10,11 @@
      ppc)      ARCH=ppc;;
      ppc64)    ARCH=ppc64;;
      "Power Macintosh")        ARCH=ppc;;
-Index: otp_src_R16B02/erts/configure.in
+Index: otp_src_R16B03/erts/configure.in
 ===================================================================
---- otp_src_R16B02.orig/erts/configure.in
-+++ otp_src_R16B02/erts/configure.in
-@@ -625,6 +625,7 @@ case $chk_arch_ in
+--- otp_src_R16B03.orig/erts/configure.in
++++ otp_src_R16B03/erts/configure.in
+@@ -612,6 +612,7 @@ case $chk_arch_ in
      x86_64)   ARCH=amd64;;
      amd64)    ARCH=amd64;;
      macppc)   ARCH=ppc;;

++++++ fix-armv7hl.patch ++++++
--- /var/tmp/diff_new_pack.Si6CGU/_old  2014-02-18 14:44:05.000000000 +0100
+++ /var/tmp/diff_new_pack.Si6CGU/_new  2014-02-18 14:44:05.000000000 +0100
@@ -1,8 +1,8 @@
-Index: otp_src_R16B02/erts/configure
+Index: otp_src_R16B03/erts/configure
 ===================================================================
---- otp_src_R16B02.orig/erts/configure
-+++ otp_src_R16B02/erts/configure
-@@ -5428,6 +5428,7 @@ case $chk_arch_ in
+--- otp_src_R16B03.orig/erts/configure
++++ otp_src_R16B03/erts/configure
+@@ -5415,6 +5415,7 @@ case $chk_arch_ in
      armv5tejl)        ARCH=arm;;
      armv6l) ARCH=arm;;
      armv7l)   ARCH=arm;;
@@ -10,11 +10,11 @@
      tile)     ARCH=tile;;
      *)                ARCH=noarch;;
  esac
-Index: otp_src_R16B02/erts/configure.in
+Index: otp_src_R16B03/erts/configure.in
 ===================================================================
---- otp_src_R16B02.orig/erts/configure.in
-+++ otp_src_R16B02/erts/configure.in
-@@ -635,6 +635,7 @@ case $chk_arch_ in
+--- otp_src_R16B03.orig/erts/configure.in
++++ otp_src_R16B03/erts/configure.in
+@@ -622,6 +622,7 @@ case $chk_arch_ in
      armv5tejl)        ARCH=arm;;
      armv6l) ARCH=arm;;
      armv7l)   ARCH=arm;;

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to