Hello community,

here is the log from the commit of package booth for openSUSE:Factory checked 
in at 2015-02-18 20:36:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/booth (Old)
 and      /work/SRC/openSUSE:Factory/.booth.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "booth"

Changes:
--------
--- /work/SRC/openSUSE:Factory/booth/booth.changes      2014-10-05 
20:33:12.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.booth.new/booth.changes 2015-02-18 
20:36:52.000000000 +0100
@@ -1,0 +2,9 @@
+Wed Feb 18 13:23:24 UTC 2015 - [email protected]
+
+- booth-arbitrator: fix exit codes for all actions
+- booth-arbitrator: set the right LSB exit code in status
+- booth-arbitrator: fix stop exit code (bsc#914306)
+- main: use /proc/self/oom_score_adj instead of oom_adj (bsc#914037)
+- upstream version: v0.2.0-6-g9eae45f
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ booth.spec ++++++
--- /var/tmp/diff_new_pack.W0xS4u/_old  2015-02-18 20:36:53.000000000 +0100
+++ /var/tmp/diff_new_pack.W0xS4u/_new  2015-02-18 20:36:53.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package booth
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,7 +26,7 @@
 %global booth_docdir %{_pkgdocdir}
 %endif
 
-Url:            https://github.com/ClusterLabs/booth
+%global test_path      %{_datadir}/booth/tests
 
 %if 0%{?suse_version}
 %define _libexecdir %{_libdir}
@@ -40,9 +40,8 @@
 %define pkg_group Productivity/Clustering/HA
 %endif
 
-%global test_path      %{_datadir}/booth/tests
-
 Name:           booth
+Url:            https://github.com/ClusterLabs/booth
 Summary:        Ticket Manager for Multi-site Clusters
 License:        GPL-2.0+
 Group:          %{pkg_group}
@@ -72,18 +71,10 @@
 %endif
 
 %description
-Booth manages the ticket which authorizes one of the cluster sites located in
-geographically dispersed distances to run certain resources. It is designed to
-be an add-on of Pacemaker, which extends Pacemaker to support geographically
-dispersed clustering.
-
-
-
-Authors:
---------
-    Jiaju Zhang <[email protected]>
-    Philipp Marek <[email protected]>
-    Dejan Muhamedagic <[email protected]>
+Booth manages tickets which authorize cluster sites located in
+geographically dispersed locations to run resources. It
+facilitates support of geographically distributed clustering in
+Pacemaker.
 
 %prep
 %setup -q -n %{name}
@@ -96,6 +87,10 @@
 
 make
 
+#except check
+#%check
+#make check
+
 %install
 make DESTDIR=$RPM_BUILD_ROOT install docdir=%{booth_docdir}
 
@@ -117,8 +112,8 @@
 
 mkdir -p %{buildroot}/%{test_path}
 cp -a unit-tests/ script/unit-test.py test conf %{buildroot}/%{test_path}/
-chmod +x %{buildroot}/%{test_path}/test/live_test.sh
 chmod +x %{buildroot}/%{test_path}/test/booth_path
+chmod +x %{buildroot}/%{test_path}/test/live_test.sh
 
 mkdir -p %{buildroot}/%{test_path}/src/
 ln -s %{_sbindir}/boothd %{buildroot}/%{test_path}/src/
@@ -133,11 +128,7 @@
 %endif
 
 %clean
-if
-  [ -n "${RPM_BUILD_ROOT}" -a "${RPM_BUILD_ROOT}" != "/" ]
-then
-  rm -rf $RPM_BUILD_ROOT
-fi
+rm -rf %{buildroot}
 
 %files
 %defattr(-,root,root,-)
@@ -163,7 +154,7 @@
 %dir %{_datadir}/booth
 %{_datadir}/booth/service-runnable
 
-%doc README COPYING
+%doc AUTHORS README COPYING
 %doc README.upgrade-from-v0.1
 
 # this should be preun, but...

++++++ booth.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/booth/.git_info new/booth/.git_info
--- old/booth/.git_info 2014-10-02 10:04:28.000000000 +0200
+++ new/booth/.git_info 2015-02-18 15:43:54.000000000 +0100
@@ -1 +1 @@
-v0.2.0
+v0.2.0-7-gbf21e72
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/booth/AUTHORS new/booth/AUTHORS
--- old/booth/AUTHORS   1970-01-01 01:00:00.000000000 +0100
+++ new/booth/AUTHORS   2015-02-18 15:41:48.000000000 +0100
@@ -0,0 +1,17 @@
+Adam Spiers <[email protected]>
+Daniel Gollub <[email protected]>
+Dejan Muhamedagic <[email protected]>
+Dirk Mueller <[email protected]>
+Dongmao Zhang <[email protected]>
+Ferritt1975 <[email protected]>
+Florian Haas <[email protected]>
+Guangliang Zhao <[email protected]>
+Jiaju Zhang <[email protected]>
+Joerg Frede <[email protected]>
+Kazunori INOUE <[email protected]>
+Philipp Marek <[email protected]>
+seabres <[email protected]>
+Steven Dake <[email protected]>
+Xia Li <[email protected]>
+Yuichi SEINO <[email protected]>
+Yuusuke Iida <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/booth/Makefile.am new/booth/Makefile.am
--- old/booth/Makefile.am       2014-10-02 09:19:51.000000000 +0200
+++ new/booth/Makefile.am       2015-02-18 15:41:48.000000000 +0100
@@ -43,7 +43,7 @@
                          config.guess config.sub missing install-sh \
                          autoheader automake autoconf test_lense.sh
 
-dist_doc_DATA          = README COPYING README.upgrade-from-v0.1
+dist_doc_DATA          = AUTHORS README COPYING README.upgrade-from-v0.1
 
 notrans_dist_man8_MANS = docs/boothd.8
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/booth/README new/booth/README
--- old/booth/README    2014-10-02 09:19:51.000000000 +0200
+++ new/booth/README    2015-02-18 15:41:48.000000000 +0100
@@ -8,7 +8,7 @@
     
 Booth is based on the Raft consensus algorithm. Though the
 implementation is not complete (there is no log) and there are a
-few additions and modifications, booth guarantees that the ticket
+few additions and modifications, booth guarantees that a ticket
 is always available at just one site as long as it has exclusive
 control of the tickets.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/booth/booth.spec new/booth/booth.spec
--- old/booth/booth.spec        2014-10-02 09:19:51.000000000 +0200
+++ new/booth/booth.spec        2015-02-18 15:41:48.000000000 +0100
@@ -23,6 +23,7 @@
 %endif
 
 Name:           booth
+Url:            https://github.com/ClusterLabs/booth
 Summary:        Ticket Manager for Multi-site Clusters
 License:        GPL-2.0+
 Group:          %{pkg_group}
@@ -52,10 +53,10 @@
 %endif
 
 %description
-Booth manages the ticket which authorizes one of the cluster sites located in
-geographically dispersed distances to run certain resources. It is designed to
-be an add-on of Pacemaker, which extends Pacemaker to support geographically
-distributed clustering.
+Booth manages tickets which authorize cluster sites located in
+geographically dispersed locations to run resources. It
+facilitates support of geographically distributed clustering in
+Pacemaker.
 
 %prep
 %setup -q -n %{name}
@@ -100,6 +101,14 @@
 ln -s %{_sbindir}/boothd %{buildroot}/%{test_path}/src/
 rm -f %{buildroot}/%{test_path}/test/*.pyc
 
+%check
+%if 0%{?run_build_tests}
+echo "%%run_build_tests set to %run_build_tests; including tests"
+make check
+%else
+echo "%%run_build_tests set to %run_build_tests; skipping tests"
+%endif
+
 %clean
 rm -rf %{buildroot}
 
@@ -127,7 +136,7 @@
 %dir %{_datadir}/booth
 %{_datadir}/booth/service-runnable
 
-%doc README COPYING
+%doc AUTHORS README COPYING
 %doc README.upgrade-from-v0.1
 
 # this should be preun, but...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/booth/script/lsb/booth-arbitrator 
new/booth/script/lsb/booth-arbitrator
--- old/booth/script/lsb/booth-arbitrator       2014-10-02 09:19:51.000000000 
+0200
+++ new/booth/script/lsb/booth-arbitrator       2015-02-18 15:41:48.000000000 
+0100
@@ -30,10 +30,14 @@
 BOOTH_DAEMON_EXIST=2
 BOOTH_DAEMON_NOT_RUNNING=3
 BOOTH_ERROR_GENERIC=4
+OCF_ERR_GENERIC=1
+OCF_NOT_RUNNING=7
 
 . /etc/rc.status
 
 check_status() {
+       local rc
+
        rc=$BOOTH_ERROR_GENERIC
        eval `"$exec" status "${cnf:+-c$cnf}" ; echo rc=$?`
        case $rc in 
@@ -57,11 +61,13 @@
                return 0
        else
                echo "stopped"
-               return 7
+               return 3
        fi
 }
 
 start() {
+       local rc
+
        [ -x $exec ] || exit 5
        check_status; rc=$?
        case "$rc" in
@@ -74,11 +80,14 @@
                startproc $exec start "${cnf:+-c$cnf}"
                rc_status -v
                ;;
-       *) return $OCF_ERR_GENERIC;;
+       *) return 1;;
        esac
 }
 
 stop() {
+       local rc wait_time
+
+       wait_time=5
        check_status; rc=$?
        case $rc in
        $BOOTH_DAEMON_STARTED);;
@@ -86,47 +95,48 @@
        $BOOTH_DAEMON_EXIST);;
        $BOOTH_DAEMON_NOT_RUNNING)
                echo "BOOTH arbitrator daemon is not running."
-               return $OCF_SUCCESS 
+               return 0
        ;;
-       *) return $OCF_ERR_GENERIC;;
+       *) return 1;;
        esac
        
        echo -n $"Stopping BOOTH arbitrator daemon: "
 #      $exec stop "${cnf:+-c$cnf}"
 #      sleep 1
-       if pkill -TERM -s $booth_lockpid boothd ; then
+       pkill -TERM -s $booth_lockpid boothd
+       sleep 0.1
+       check_status; rc=$?
+       while [ $rc -ne $BOOTH_DAEMON_NOT_RUNNING -a $wait_time -gt 0 ]
+       do
+               wait_time=$((wait_time-1))
                sleep 1
+               check_status; rc=$?
+       done
+       if [ $rc -ne $BOOTH_DAEMON_NOT_RUNNING ]; then
                pkill -KILL -s $booth_lockpid boothd
+               sleep 1
+               check_status; rc=$?
        fi
+       test $rc -eq $BOOTH_DAEMON_NOT_RUNNING
        rc_status -v
 }
 
-wait_for_stop() {
-#      while true ; do
-#              check_status ; rc=$?
-#              case $rc in
-#              $BOOTH_DAEMON_STARTED);;
-#                $BOOTH_DAEMON_STARTING);;
-#              *) return 0;;
-#              esac
-#      done
-               
-       while [ -e $booth_lockfile ]; do
-               sleep .5
-       done
-}
-
 foreach() {
+       local cnf cnf_base
+       local rc=0
+
        for cnf in ${BOOTH_CONF_FILE:-$CONF_DIR/*.conf} ; do
                if [ $# != 1 ] ; then
                        echo "== For configuration file $cnf:"
                fi
                cnf_base=`basename $cnf`
                "$@"
+               rc=$((rc|$?))
                if [ $# != 1 ] ; then
                        echo "== configuration file $cnf done"
                fi
        done
+       return $rc
 }
 
 restart() {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/booth/src/main.c new/booth/src/main.c
--- old/booth/src/main.c        2014-10-02 09:19:51.000000000 +0200
+++ new/booth/src/main.c        2015-02-18 15:41:48.000000000 +0100
@@ -1143,16 +1143,17 @@
        }
 }
 
-static void set_oom_adj(int val)
+static int set_procfs_val(const char *path, const char *val)
 {
-        FILE *fp;
+       int rc = -1;
+       FILE *fp = fopen(path, "w");
 
-        fp = fopen("/proc/self/oom_adj", "w");
-        if (!fp)
-                return;
-
-        fprintf(fp, "%i", val);
-        fclose(fp);
+       if (fp) {
+               if (fprintf(fp, "%s", val) > 0)
+                       rc = 0;
+               fclose(fp);
+       }
+       return rc;
 }
 
 static int do_status(int type)
@@ -1336,7 +1337,9 @@
        signal(SIGINT, (__sighandler_t)sig_exit_handler);
 
        set_scheduler();
-       set_oom_adj(-16);
+       /* we don't want to be killed by the OOM-killer */
+       if (set_procfs_val("/proc/self/oom_score_adj", "-999"))
+               (void)set_procfs_val("/proc/self/oom_adj", "-16");
        set_proc_title("%s %s %s for [%s]:%d",
                        DAEMON_NAME,
                        cl.configfile,

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

Reply via email to