Hello community,

here is the log from the commit of package ctdb for openSUSE:Factory checked in 
at 2014-07-13 17:16:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ctdb (Old)
 and      /work/SRC/openSUSE:Factory/.ctdb.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ctdb"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ctdb/ctdb.changes        2014-06-26 
10:42:43.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ctdb.new/ctdb.changes   2014-07-13 
17:16:30.000000000 +0200
@@ -1,0 +2,6 @@
+Tue Jul  1 17:07:26 UTC 2014 - [email protected]
+
+- Fix the configure-time socketpath to match the path used by the CTDB
+  resource agent; (bnc#885341).
+
+-------------------------------------------------------------------
@@ -9,0 +16,3 @@
+  + Create and specify runtime directory for .socket_lock; (bnc#885049).
+    + added patch 0001-build-offer-with-rundir-configure-argument.patch
+    + added patch 0002-tcp-use-RUNDIR-for-.socket_lock-path.patch

New:
----
  0001-build-offer-with-rundir-configure-argument.patch
  0002-tcp-use-RUNDIR-for-.socket_lock-path.patch

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

Other differences:
------------------
++++++ ctdb.spec ++++++
--- /var/tmp/diff_new_pack.kEH2Js/_old  2014-07-13 17:16:31.000000000 +0200
+++ /var/tmp/diff_new_pack.kEH2Js/_new  2014-07-13 17:16:31.000000000 +0200
@@ -38,6 +38,8 @@
 Source1:        ctdb-sysconfig-suse.template
 Source100:      ctdb-pcp-pmda-rpmlintrc
 Patch1:         ctdb-socket-path.patch
+Patch2:         0001-build-offer-with-rundir-configure-argument.patch
+Patch3:         0002-tcp-use-RUNDIR-for-.socket_lock-path.patch
 Patch100:       ctdb-xsltproc-catalogs.patch
 %if 0%{?suse_version}
 Requires(pre):  %{?fillup_prereq}
@@ -82,6 +84,10 @@
 BuildRequires:  libxslt-tools
 %endif
 
+%if ! %{defined _rundir}
+%define _rundir %{_localstatedir}/run
+%endif
+
 %description
 ctdb is the clustered database used by Samba
 
@@ -107,6 +113,8 @@
 %prep
 %setup -q
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 %if 0%{?suse_version} == 1010
 %patch100 -p1
 %endif
@@ -124,7 +132,8 @@
        --enable-pmda \
 %endif
        --with-logdir=%{_localstatedir}/log/ctdb/ \
-       --with-socketpath=%{_localstatedir}/lib/ctdb/ctdbd.socket
+       --with-rundir=%{_rundir} \
+       --with-socketpath=%{_localstatedir}/lib/ctdb/ctdb.socket
 
 %{__make} %{?_smp_mflags} docdir=%{_docdir}
 
@@ -137,7 +146,8 @@
        ${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d \
 %endif
        ${RPM_BUILD_ROOT}/%{_localstatedir}/lib/ctdb/persistent \
-       ${RPM_BUILD_ROOT}/%{_localstatedir}/log/ctdb
+       ${RPM_BUILD_ROOT}/%{_localstatedir}/log/ctdb \
+       ${RPM_BUILD_ROOT}/%{_rundir}/ctdb
 
 %if 0%{?suse_version} == 1010
 export 
SGML_CATALOG_FILES=/usr/share/xml/docbook/stylesheet/nwalsh/1.69.1/catalog.xml
@@ -268,6 +278,7 @@
 %dir %{_localstatedir}/lib/ctdb
 %dir %{_localstatedir}/lib/ctdb/persistent
 %dir %{_localstatedir}/log/ctdb
+%ghost %dir %{_rundir}/ctdb
 %{_mandir}/man1/*
 %{_mandir}/man5/ctdbd.conf.5.*
 %{_mandir}/man7/ctdb-tunables.7.*

++++++ 0001-build-offer-with-rundir-configure-argument.patch ++++++
>From e1819b1a20694632a1d77bb12a67fd24131886f7 Mon Sep 17 00:00:00 2001
From: David Disseldorp <[email protected]>
Date: Fri, 13 Jun 2014 16:46:47 +0200
Subject: [PATCH 1/2] build: offer --with-rundir configure argument

RUNDIR takes a default path of LOCALSTATEDIR/run, and is then used in
the SOCKPATH default path (RUNDIR/ctdb/ctdbd.socket). The eventual
SOCKPATH default value remains the same.

Signed-off-by: David Disseldorp <[email protected]>
---
 Makefile.in  |  3 +++
 configure.ac | 15 +++++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index a8e74a4..57ce1ed 100755
--- a/Makefile.in
+++ b/Makefile.in
@@ -16,6 +16,7 @@ sbindir = @sbindir@
 mandir = @mandir@
 localstatedir = @localstatedir@
 logdir = @LOGDIR@
+rundir = @RUNDIR@
 sockpath = @SOCKPATH@
 VPATH = @srcdir@:@tdbdir@:@tallocdir@:@libreplacedir@:@poptdir@:@teventdir@:
 srcdir = @srcdir@
@@ -67,6 +68,7 @@ CFLAGS=@CPPFLAGS@ -g -I$(srcdir)/include -Iinclude -Ilib 
-Ilib/util -I$(srcdir)
        -DVARDIR=\"$(localstatedir)\" -DETCDIR=\"$(etcdir)\" \
        -DCTDB_VARDIR=\"$(localstatedir)/lib/ctdb\" \
        -DLOGDIR=\"$(logdir)\" -DBINDIR=\"$(bindir)\" \
+       -DRUNDIR=\"$(rundir)\" \
        -DSOCKPATH=\"$(sockpath)\" \
        -DUSE_MMAP=1 @CFLAGS@ $(POPT_CFLAGS) \
        $(EXTRA_CFLAGS)
@@ -143,6 +145,7 @@ showlayout::
        @echo "  libdir:      $(libdir)"
        @echo "  vardir:      $(localstatedir)"
        @echo "  logdir:      $(logdir)"
+       @echo "  rundir:      $(rundir)"
        @echo "  mandir:      $(mandir)"
        @echo "  etcdir:      $(etcdir)"
 
diff --git a/configure.ac b/configure.ac
index 9621f42..557c92b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,9 +72,20 @@ if test ! -z "$LOGDIR"; then
 fi
 AC_SUBST(LOGDIR)
 
-SOCKPATH='${localstatedir}/run/ctdb/ctdbd.socket'
+RUNDIR='${localstatedir}/run'
+AC_ARG_WITH([rundir],
+       [  --with-rundir=DIR       path to runtime directory 
[[LOCALSTATEDIR/run]]],
+       RUNDIR=$withval)
+if test ! -z "$RUNDIR"; then
+  if test "$RUNDIR" = "yes" -o "$RUNDIR" = "no"; then
+    AC_MSG_ERROR([--with-rundir must specify a path])
+  fi
+fi
+AC_SUBST(RUNDIR)
+
+SOCKPATH='${rundir}/ctdb/ctdbd.socket'
 AC_ARG_WITH([socketpath],
-       [  --with-socketpath=FILE       path to CTDB daemon socket 
[[LOCALSTATEDIR/run/ctdb/ctdbd.socket]]],
+       [  --with-socketpath=FILE       path to CTDB daemon socket 
[[RUNDIR/ctdb/ctdbd.socket]]],
        SOCKPATH=$withval)
 if test ! -z "$SOCKPATH"; then
   if test "$SOCKPATH" = "yes" -o "$SOCKPATH" = "no"; then
-- 
1.8.4.5

++++++ 0002-tcp-use-RUNDIR-for-.socket_lock-path.patch ++++++
>From 2390c02b09b342c244c6c8c3553d0d501a6af140 Mon Sep 17 00:00:00 2001
From: David Disseldorp <[email protected]>
Date: Fri, 13 Jun 2014 16:44:18 +0200
Subject: [PATCH 2/2] tcp: use RUNDIR for .socket_lock path

Some platforms do not nest runtime files under VARDIR (localstate), use
the RUNDIR path provided at configure time.

Signed-off-by: David Disseldorp <[email protected]>
---
 tcp/tcp_connect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tcp/tcp_connect.c b/tcp/tcp_connect.c
index 8032662..db5c515 100644
--- a/tcp/tcp_connect.c
+++ b/tcp/tcp_connect.c
@@ -293,7 +293,7 @@ static int ctdb_tcp_listen_automatic(struct ctdb_context 
*ctdb)
                                                struct ctdb_tcp);
         ctdb_sock_addr sock;
        int lock_fd, i;
-       const char *lock_path = VARDIR "/run/ctdb/.socket_lock";
+       const char *lock_path = RUNDIR "/ctdb/.socket_lock";
        struct flock lock;
        int one = 1;
        int sock_size;
-- 
1.8.4.5

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

Reply via email to