Hello community, here is the log from the commit of package rebootmgr for openSUSE:Factory checked in at 2020-04-29 20:41:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rebootmgr (Old) and /work/SRC/openSUSE:Factory/.rebootmgr.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rebootmgr" Wed Apr 29 20:41:28 2020 rev:15 rq:798151 version:1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rebootmgr/rebootmgr.changes 2020-02-03 11:11:36.689793171 +0100 +++ /work/SRC/openSUSE:Factory/.rebootmgr.new.2738/rebootmgr.changes 2020-04-29 20:42:11.895613844 +0200 @@ -1,0 +2,11 @@ +Mon Apr 27 10:43:58 UTC 2020 - Thorsten Kukuk <[email protected]> + +- Adjust BuildRequires + +------------------------------------------------------------------- +Mon Apr 27 09:51:18 UTC 2020 - Thorsten Kukuk <[email protected]> + +- Update to version 1.0 + - Rewrite rebootmgrd to not depend on glib and dbus-glib + +------------------------------------------------------------------- Old: ---- rebootmgr-0.20.1.tar.xz New: ---- rebootmgr-1.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rebootmgr.spec ++++++ --- /var/tmp/diff_new_pack.E1bWuD/_old 2020-04-29 20:42:12.363615064 +0200 +++ /var/tmp/diff_new_pack.E1bWuD/_new 2020-04-29 20:42:12.363615064 +0200 @@ -24,7 +24,7 @@ %endif Name: rebootmgr -Version: 0.20.1 +Version: 1.0 Release: 0 Summary: Automatic controlled reboot during a maintenance window License: GPL-2.0-only AND LGPL-2.1-or-later @@ -33,8 +33,7 @@ Source: %{name}-%{version}.tar.xz BuildRequires: fdupes BuildRequires: pkgconfig -BuildRequires: pkgconfig(dbus-glib-1) -BuildRequires: pkgconfig(glib-2.0) >= 2.40 +BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(libeconf) %description ++++++ rebootmgr-0.20.1.tar.xz -> rebootmgr-1.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/Makefile.am new/rebootmgr-1.0/Makefile.am --- old/rebootmgr-0.20.1/Makefile.am 2019-08-19 08:32:18.000000000 +0200 +++ new/rebootmgr-1.0/Makefile.am 2020-04-27 11:42:54.000000000 +0200 @@ -3,7 +3,7 @@ # # Author: Thorsten Kukuk <[email protected]> # -AUTOMAKE_OPTIONS = 1.6 foreign check-news dist-xz +AUTOMAKE_OPTIONS = 1.6 check-news dist-xz # SUBDIRS = lib src man dbus systemd etc tests diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/Makefile.in new/rebootmgr-1.0/Makefile.in --- old/rebootmgr-0.20.1/Makefile.in 2019-11-04 15:28:18.000000000 +0100 +++ new/rebootmgr-1.0/Makefile.in 2020-04-27 11:42:57.000000000 +0200 @@ -159,8 +159,8 @@ CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in COPYING \ - COPYING.LIB ChangeLog NEWS compile config.guess config.rpath \ - config.sub depcomp install-sh missing + COPYING.LIB NEWS compile config.guess config.rpath config.sub \ + depcomp install-sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -231,8 +231,6 @@ ETCD_LIBS = @ETCD_LIBS@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ @@ -346,7 +344,7 @@ # # Author: Thorsten Kukuk <[email protected]> # -AUTOMAKE_OPTIONS = 1.6 foreign check-news dist-xz +AUTOMAKE_OPTIONS = 1.6 check-news dist-xz # SUBDIRS = lib src man dbus systemd etc tests CLEANFILES = *~ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/NEWS new/rebootmgr-1.0/NEWS --- old/rebootmgr-0.20.1/NEWS 2019-11-04 15:28:05.000000000 +0100 +++ new/rebootmgr-1.0/NEWS 2020-04-27 11:42:14.000000000 +0200 @@ -1,6 +1,9 @@ rebootmgr NEWS -- history of user-visible changes. -Copyright (C) 2016-2019 Thorsten Kukuk +Copyright (C) 2016-2020 Thorsten Kukuk + +Version 1.0 +* Rewrite rebootmgrd to use timer_* functions instead of glib Version 0.20.1 * Added a memory allocation check diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/configure new/rebootmgr-1.0/configure --- old/rebootmgr-0.20.1/configure 2019-11-04 15:28:18.000000000 +0100 +++ new/rebootmgr-1.0/configure 2020-04-27 11:42:18.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for rebootmgr 0.20.1. +# Generated by GNU Autoconf 2.69 for rebootmgr 1.0. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='rebootmgr' PACKAGE_TARNAME='rebootmgr' -PACKAGE_VERSION='0.20.1' -PACKAGE_STRING='rebootmgr 0.20.1' +PACKAGE_VERSION='1.0' +PACKAGE_STRING='rebootmgr 1.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -662,8 +662,6 @@ ETCD_LIBS ECONF_LIBS ECONF_CFLAGS -GLIB_LIBS -GLIB_CFLAGS DBUS_LIBS DBUS_CFLAGS PKG_CONFIG_LIBDIR @@ -790,8 +788,6 @@ PKG_CONFIG_LIBDIR DBUS_CFLAGS DBUS_LIBS -GLIB_CFLAGS -GLIB_LIBS ECONF_CFLAGS ECONF_LIBS JSON_CFLAGS @@ -1336,7 +1332,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures rebootmgr 0.20.1 to adapt to many kinds of systems. +\`configure' configures rebootmgr 1.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1406,7 +1402,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of rebootmgr 0.20.1:";; + short | recursive ) echo "Configuration of rebootmgr 1.0:";; esac cat <<\_ACEOF @@ -1455,8 +1451,6 @@ path overriding pkg-config's built-in search path DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config DBUS_LIBS linker flags for DBUS, overriding pkg-config - GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config - GLIB_LIBS linker flags for GLIB, overriding pkg-config ECONF_CFLAGS C compiler flags for ECONF, overriding pkg-config ECONF_LIBS linker flags for ECONF, overriding pkg-config @@ -1529,7 +1523,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -rebootmgr configure 0.20.1 +rebootmgr configure 1.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1894,7 +1888,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by rebootmgr $as_me 0.20.1, which was +It was created by rebootmgr $as_me 1.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2758,7 +2752,7 @@ # Define the identity of the package. PACKAGE='rebootmgr' - VERSION='0.20.1' + VERSION='1.0' cat >>confdefs.h <<_ACEOF @@ -5550,19 +5544,19 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-glib-1 >= 0.60" >&5 -$as_echo_n "checking for dbus-glib-1 >= 0.60... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 0.60" >&5 +$as_echo_n "checking for dbus-1 >= 0.60... " >&6; } if test -n "$DBUS_CFLAGS"; then pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= 0.60\""; } >&5 - ($PKG_CONFIG --exists --print-errors "dbus-glib-1 >= 0.60") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= 0.60\""; } >&5 + ($PKG_CONFIG --exists --print-errors "dbus-1 >= 0.60") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-glib-1 >= 0.60" 2>/dev/null` + pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 0.60" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -5574,12 +5568,12 @@ pkg_cv_DBUS_LIBS="$DBUS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= 0.60\""; } >&5 - ($PKG_CONFIG --exists --print-errors "dbus-glib-1 >= 0.60") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= 0.60\""; } >&5 + ($PKG_CONFIG --exists --print-errors "dbus-1 >= 0.60") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-glib-1 >= 0.60" 2>/dev/null` + pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 0.60" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -5600,14 +5594,14 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "dbus-glib-1 >= 0.60" 2>&1` + DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "dbus-1 >= 0.60" 2>&1` else - DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "dbus-glib-1 >= 0.60" 2>&1` + DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "dbus-1 >= 0.60" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DBUS_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (dbus-glib-1 >= 0.60) were not met: + as_fn_error $? "Package requirements (dbus-1 >= 0.60) were not met: $DBUS_PKG_ERRORS @@ -5640,101 +5634,6 @@ fi - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glib-2.0 >= 2.40" >&5 -$as_echo_n "checking for glib-2.0 >= 2.40... " >&6; } - -if test -n "$GLIB_CFLAGS"; then - pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.40\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.40") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.40" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$GLIB_LIBS"; then - pkg_cv_GLIB_LIBS="$GLIB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.40\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.40") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.40" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.40" 2>&1` - else - GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.40" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GLIB_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (glib-2.0 >= 2.40) were not met: - -$GLIB_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables GLIB_CFLAGS -and GLIB_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GLIB_CFLAGS -and GLIB_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see <http://pkg-config.freedesktop.org/>. -See \`config.log' for more details" "$LINENO" 5; } -else - GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS - GLIB_LIBS=$pkg_cv_GLIB_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - - - pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libeconf" >&5 $as_echo_n "checking for libeconf... " >&6; } @@ -8944,7 +8843,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by rebootmgr $as_me 0.20.1, which was +This file was extended by rebootmgr $as_me 1.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9010,7 +8909,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -rebootmgr config.status 0.20.1 +rebootmgr config.status 1.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/configure.ac new/rebootmgr-1.0/configure.ac --- old/rebootmgr-0.20.1/configure.ac 2019-11-04 15:28:13.000000000 +0100 +++ new/rebootmgr-1.0/configure.ac 2020-04-27 11:41:45.000000000 +0200 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(rebootmgr, 0.20.1) +AC_INIT(rebootmgr, 1.0) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src/rebootmgrd.c]) AM_CONFIG_HEADER(config.h) @@ -84,12 +84,7 @@ dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST -PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.60) -AC_SUBST(DBUS_CFLAGS) -AC_SUBST(DBUS_LIBS) -PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.40) -AC_SUBST(GLIB_CFLAGS) -AC_SUBST(GLIB_LIBS) +PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.60) PKG_CHECK_MODULES(ECONF, libeconf, [AC_DEFINE([USE_ECONF], [1], [Use ECONF])],[AC_DEFINE([USE_ECONF], [0], [Use ECONF])]) AC_SUBST(ECONF_CFLAGS) AC_SUBST(ECONF_LIBS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/dbus/Makefile.in new/rebootmgr-1.0/dbus/Makefile.in --- old/rebootmgr-0.20.1/dbus/Makefile.in 2019-11-04 15:28:18.000000000 +0100 +++ new/rebootmgr-1.0/dbus/Makefile.in 2020-04-27 11:42:17.000000000 +0200 @@ -183,8 +183,6 @@ ETCD_LIBS = @ETCD_LIBS@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/etc/Makefile.in new/rebootmgr-1.0/etc/Makefile.in --- old/rebootmgr-0.20.1/etc/Makefile.in 2019-11-04 15:28:18.000000000 +0100 +++ new/rebootmgr-1.0/etc/Makefile.in 2020-04-27 11:42:17.000000000 +0200 @@ -182,8 +182,6 @@ ETCD_LIBS = @ETCD_LIBS@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/lib/Makefile.in new/rebootmgr-1.0/lib/Makefile.in --- old/rebootmgr-0.20.1/lib/Makefile.in 2019-11-04 15:28:18.000000000 +0100 +++ new/rebootmgr-1.0/lib/Makefile.in 2020-04-27 11:42:17.000000000 +0200 @@ -204,8 +204,6 @@ ETCD_LIBS = @ETCD_LIBS@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/man/Makefile.in new/rebootmgr-1.0/man/Makefile.in --- old/rebootmgr-0.20.1/man/Makefile.in 2019-11-04 15:28:18.000000000 +0100 +++ new/rebootmgr-1.0/man/Makefile.in 2020-04-27 11:42:17.000000000 +0200 @@ -190,8 +190,6 @@ ETCD_LIBS = @ETCD_LIBS@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/man/org.opensuse.RebootMgr.conf.8.html new/rebootmgr-1.0/man/org.opensuse.RebootMgr.conf.8.html --- old/rebootmgr-0.20.1/man/org.opensuse.RebootMgr.conf.8.html 2019-09-06 12:30:55.000000000 +0200 +++ new/rebootmgr-1.0/man/org.opensuse.RebootMgr.conf.8.html 2020-04-27 11:41:26.000000000 +0200 @@ -15,7 +15,7 @@ h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } - </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.19</span><hr><div class="refentry"><a name="rebootmgrd.8"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrd, rebootmgr.service, org.opensuse.RebootMgr.conf — Reboot the machine during a maintenance window.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/usr/sbin/rebootmgrd</code> [ --debug | --help | --version ]</p></div><p><code class="filename">/usr/lib/systemd/system/rebootmgr.service</code></p><p><code class="filename">/etc/dbus-1/system.d/org.opensuse.RebootMgr.conf</code></p></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>To avoid that a whole cluster or a set of machines with the same task + </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.20.1</span><hr><div class="refentry"><a name="rebootmgrd.8"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrd, rebootmgr.service, org.opensuse.RebootMgr.conf — Reboot the machine during a maintenance window.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/usr/sbin/rebootmgrd</code> [ --debug | --help | --version ]</p></div><p><code class="filename">/usr/lib/systemd/system/rebootmgr.service</code></p><p><code class="filename">/etc/dbus-1/system.d/org.opensuse.RebootMgr.conf</code></p></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>To avoid that a whole cluster or a set of machines with the same task reboot at the same there, <span class="emphasis"><em>rebootmgrd</em></span> reboots the machine following configured policies.</p><div class="refsect2"><a name="reboot_strategy_options"></a><h3 id="Reboot Strategies">Reboot Strategies<a class="headerlink" title="Permalink to this headline" href="#Reboot%20Strategies">¶</a></h3><p> rebootmgr supports different strategies, when a reboot should be done: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/man/rebootmgr.conf.5 new/rebootmgr-1.0/man/rebootmgr.conf.5 --- old/rebootmgr-0.20.1/man/rebootmgr.conf.5 2019-09-06 12:30:55.000000000 +0200 +++ new/rebootmgr-1.0/man/rebootmgr.conf.5 2020-04-27 11:41:26.000000000 +0200 @@ -2,12 +2,12 @@ .\" Title: rebootmgr.conf .\" Author: Thorsten Kukuk <[email protected]> .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 09/06/2019 +.\" Date: 04/27/2020 .\" Manual: resolved.conf .\" Source: rebootmgr .\" Language: English .\" -.TH "REBOOTMGR\&.CONF" "5" "09/06/2019" "rebootmgr" "resolved.conf" +.TH "REBOOTMGR\&.CONF" "5" "04/27/2020" "rebootmgr" "resolved.conf" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/man/rebootmgr.conf.5.html new/rebootmgr-1.0/man/rebootmgr.conf.5.html --- old/rebootmgr-0.20.1/man/rebootmgr.conf.5.html 2019-09-06 12:30:55.000000000 +0200 +++ new/rebootmgr-1.0/man/rebootmgr.conf.5.html 2020-04-27 11:41:26.000000000 +0200 @@ -15,7 +15,7 @@ h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } - </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.19</span><hr><div class="refentry"><a name="rebootmgr.conf.5"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>rebootmgr.conf — Reboot Manager configuration files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/rebootmgr.conf</code></p></div><div class="refsect1"><a name="id-1.5"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These configuration file controls and defines the reboot policy for + </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.20.1</span><hr><div class="refentry"><a name="rebootmgr.conf.5"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>rebootmgr.conf — Reboot Manager configuration files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/rebootmgr.conf</code></p></div><div class="refsect1"><a name="id-1.5"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These configuration file controls and defines the reboot policy for <a href="rebootmgrd.8.html"><span class="citerefentry"><span class="refentrytitle">rebootmgrd</span>(8)</span></a>.</p></div><div class="refsect1"><a name="id-1.6"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are available in the "<code class="literal">rebootmgr</code>" section:</p><div class="variablelist"><dl class="variablelist"><dt id="window-start="><span class="term"><code class="varname">window-start=</code></span><a class="headerlink" title="Permalink to this term" href="#window-start=">¶</a></dt><dd><p> The format of <code class="varname">window-start</code> is the same as diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/man/rebootmgr.index.html new/rebootmgr-1.0/man/rebootmgr.index.html --- old/rebootmgr-0.20.1/man/rebootmgr.index.html 2019-09-06 12:30:55.000000000 +0200 +++ new/rebootmgr-1.0/man/rebootmgr.index.html 2020-04-27 11:41:27.000000000 +0200 @@ -15,4 +15,4 @@ h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } - </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.19</span><hr><div class="refentry"><a name="rebootmgr.index"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>rebootmgr.index — List all manpages from the rebootmgr project</p></div><div class="refsect1"><a name="id-1.4"></a><h2 id="O">O<a class="headerlink" title="Permalink to this headline" href="#O">¶</a></h2><p><a href="org.opensuse.RebootMgr.conf.8.html"><span class="citerefentry"><span class="refentrytitle">org.opensuse.RebootMgr.conf</span>(8)</span></a> — Reboot the machine during a maintenance window.<br></p></div><div class="refsect1"><a name="id-1.5"></a><h2 id="R">R<a class="headerlink" title="Permalink to this headline" href="#R">¶</a></h2><p><a href="rebootmgr.conf.5.html"><span class="citerefentry"><span class="refentrytitle">rebootmgr.conf</span>(5)</span></a> — Reboot Manager configuration files<br><a href="rebootmgr.service.8.html"><span class="citerefentry"><span class="refentrytitle">rebootmgr.service</span>(8)</span></a> — Reboot the machine during a maintenance window.<br><a href="rebootmgrctl.1.html"><span class="citerefentry"><span class="refentrytitle">rebootmgrctl</span>(1)</span></a> — Tool to control and configure the reboot manager daemon.<br><a href="rebootmgrd.8.html"><span class="citerefentry"><span class="refentrytitle">rebootmgrd</span>(8)</span></a> — Reboot the machine during a maintenance window.<br></p></div><div class="refsect1"><a name="id-1.6"></a><p><a name="counts"></a>This index contains 5 entries, referring to 3 individual manual pages.</p></div></div></body></html> + </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.20.1</span><hr><div class="refentry"><a name="rebootmgr.index"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>rebootmgr.index — List all manpages from the rebootmgr project</p></div><div class="refsect1"><a name="id-1.4"></a><h2 id="O">O<a class="headerlink" title="Permalink to this headline" href="#O">¶</a></h2><p><a href="org.opensuse.RebootMgr.conf.8.html"><span class="citerefentry"><span class="refentrytitle">org.opensuse.RebootMgr.conf</span>(8)</span></a> — Reboot the machine during a maintenance window.<br></p></div><div class="refsect1"><a name="id-1.5"></a><h2 id="R">R<a class="headerlink" title="Permalink to this headline" href="#R">¶</a></h2><p><a href="rebootmgr.conf.5.html"><span class="citerefentry"><span class="refentrytitle">rebootmgr.conf</span>(5)</span></a> — Reboot Manager configuration files<br><a href="rebootmgr.service.8.html"><span class="citerefentry"><span class="refentrytitle">rebootmgr.service</span>(8)</span></a> — Reboot the machine during a maintenance window.<br><a href="rebootmgrctl.1.html"><span class="citerefentry"><span class="refentrytitle">rebootmgrctl</span>(1)</span></a> — Tool to control and configure the reboot manager daemon.<br><a href="rebootmgrd.8.html"><span class="citerefentry"><span class="refentrytitle">rebootmgrd</span>(8)</span></a> — Reboot the machine during a maintenance window.<br></p></div><div class="refsect1"><a name="id-1.6"></a><p><a name="counts"></a>This index contains 5 entries, referring to 3 individual manual pages.</p></div></div></body></html> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/man/rebootmgr.service.8.html new/rebootmgr-1.0/man/rebootmgr.service.8.html --- old/rebootmgr-0.20.1/man/rebootmgr.service.8.html 2019-09-06 12:30:55.000000000 +0200 +++ new/rebootmgr-1.0/man/rebootmgr.service.8.html 2020-04-27 11:41:26.000000000 +0200 @@ -15,7 +15,7 @@ h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } - </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.19</span><hr><div class="refentry"><a name="rebootmgrd.8"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrd, rebootmgr.service, org.opensuse.RebootMgr.conf — Reboot the machine during a maintenance window.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/usr/sbin/rebootmgrd</code> [ --debug | --help | --version ]</p></div><p><code class="filename">/usr/lib/systemd/system/rebootmgr.service</code></p><p><code class="filename">/etc/dbus-1/system.d/org.opensuse.RebootMgr.conf</code></p></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>To avoid that a whole cluster or a set of machines with the same task + </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.20.1</span><hr><div class="refentry"><a name="rebootmgrd.8"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrd, rebootmgr.service, org.opensuse.RebootMgr.conf — Reboot the machine during a maintenance window.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/usr/sbin/rebootmgrd</code> [ --debug | --help | --version ]</p></div><p><code class="filename">/usr/lib/systemd/system/rebootmgr.service</code></p><p><code class="filename">/etc/dbus-1/system.d/org.opensuse.RebootMgr.conf</code></p></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>To avoid that a whole cluster or a set of machines with the same task reboot at the same there, <span class="emphasis"><em>rebootmgrd</em></span> reboots the machine following configured policies.</p><div class="refsect2"><a name="reboot_strategy_options"></a><h3 id="Reboot Strategies">Reboot Strategies<a class="headerlink" title="Permalink to this headline" href="#Reboot%20Strategies">¶</a></h3><p> rebootmgr supports different strategies, when a reboot should be done: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/man/rebootmgrctl.1 new/rebootmgr-1.0/man/rebootmgrctl.1 --- old/rebootmgr-0.20.1/man/rebootmgrctl.1 2019-09-06 12:30:54.000000000 +0200 +++ new/rebootmgr-1.0/man/rebootmgrctl.1 2020-04-27 11:41:26.000000000 +0200 @@ -2,12 +2,12 @@ .\" Title: rebootmgrctl .\" Author: Thorsten Kukuk <[email protected]> .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 09/06/2019 +.\" Date: 04/27/2020 .\" Manual: rebootmgrctl .\" Source: rebootmgr .\" Language: English .\" -.TH "REBOOTMGRCTL" "1" "09/06/2019" "rebootmgr" "rebootmgrctl" +.TH "REBOOTMGRCTL" "1" "04/27/2020" "rebootmgr" "rebootmgrctl" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/man/rebootmgrctl.1.html new/rebootmgr-1.0/man/rebootmgrctl.1.html --- old/rebootmgr-0.20.1/man/rebootmgrctl.1.html 2019-09-06 12:30:55.000000000 +0200 +++ new/rebootmgr-1.0/man/rebootmgrctl.1.html 2020-04-27 11:41:26.000000000 +0200 @@ -15,7 +15,7 @@ h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } - </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.19</span><hr><div class="refentry"><a name="rebootmgrctl.1"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrctl — Tool to control and configure the reboot manager daemon.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> [ --help | --version ]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> is-active [--quiet]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> reboot [ fast | now ]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> cancel </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> status [--quiet]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-strategy best-effort | etcd-lock | maint-window | instantly | off </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-strategy </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-group <em class="replaceable"><code>group</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-group </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-window <em class="replaceable"><code>time</code></em> <em class="replaceable"><code>duration</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-window </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-max [--group <em class="replaceable"><code>group</code></em>] <em class="replaceable"><code>number</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> lock [--group <em class="replaceable"><code>group</code></em>] [<em class="replaceable"><code>machine-id</code></em>]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> unlock [--group <em class="replaceable"><code>group</code></em>] [<em class="replaceable"><code>machine-id</code></em>]</p></div></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="emphasis"><em>rebootmgrctl</em></span> is used to + </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.20.1</span><hr><div class="refentry"><a name="rebootmgrctl.1"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrctl — Tool to control and configure the reboot manager daemon.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> [ --help | --version ]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> is-active [--quiet]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> reboot [ fast | now ]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> cancel </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> status [--quiet]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-strategy best-effort | etcd-lock | maint-window | instantly | off </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-strategy </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-group <em class="replaceable"><code>group</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-group </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-window <em class="replaceable"><code>time</code></em> <em class="replaceable"><code>duration</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-window </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-max [--group <em class="replaceable"><code>group</code></em>] <em class="replaceable"><code>number</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> lock [--group <em class="replaceable"><code>group</code></em>] [<em class="replaceable"><code>machine-id</code></em>]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> unlock [--group <em class="replaceable"><code>group</code></em>] [<em class="replaceable"><code>machine-id</code></em>]</p></div></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="emphasis"><em>rebootmgrctl</em></span> is used to query and configure the <a href="rebootmgrd.8.html"><span class="citerefentry"><span class="refentrytitle">rebootmgrd</span>(8)</span></a> process. Options regarding to <code class="option">etcd-lock</code> are only available if diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/man/rebootmgrd.8 new/rebootmgr-1.0/man/rebootmgrd.8 --- old/rebootmgr-0.20.1/man/rebootmgrd.8 2019-09-06 12:30:54.000000000 +0200 +++ new/rebootmgr-1.0/man/rebootmgrd.8 2020-04-27 11:41:26.000000000 +0200 @@ -2,12 +2,12 @@ .\" Title: rebootmgrd .\" Author: Thorsten Kukuk <[email protected]> .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 09/06/2019 +.\" Date: 04/27/2020 .\" Manual: rebootmgrd .\" Source: rebootmgr .\" Language: English .\" -.TH "REBOOTMGRD" "8" "09/06/2019" "rebootmgr" "rebootmgrd" +.TH "REBOOTMGRD" "8" "04/27/2020" "rebootmgr" "rebootmgrd" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/man/rebootmgrd.8.html new/rebootmgr-1.0/man/rebootmgrd.8.html --- old/rebootmgr-0.20.1/man/rebootmgrd.8.html 2019-09-06 12:30:55.000000000 +0200 +++ new/rebootmgr-1.0/man/rebootmgrd.8.html 2020-04-27 11:41:26.000000000 +0200 @@ -15,7 +15,7 @@ h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } - </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.19</span><hr><div class="refentry"><a name="rebootmgrd.8"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrd, rebootmgr.service, org.opensuse.RebootMgr.conf — Reboot the machine during a maintenance window.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/usr/sbin/rebootmgrd</code> [ --debug | --help | --version ]</p></div><p><code class="filename">/usr/lib/systemd/system/rebootmgr.service</code></p><p><code class="filename">/etc/dbus-1/system.d/org.opensuse.RebootMgr.conf</code></p></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>To avoid that a whole cluster or a set of machines with the same task + </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.20.1</span><hr><div class="refentry"><a name="rebootmgrd.8"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrd, rebootmgr.service, org.opensuse.RebootMgr.conf — Reboot the machine during a maintenance window.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/usr/sbin/rebootmgrd</code> [ --debug | --help | --version ]</p></div><p><code class="filename">/usr/lib/systemd/system/rebootmgr.service</code></p><p><code class="filename">/etc/dbus-1/system.d/org.opensuse.RebootMgr.conf</code></p></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>To avoid that a whole cluster or a set of machines with the same task reboot at the same there, <span class="emphasis"><em>rebootmgrd</em></span> reboots the machine following configured policies.</p><div class="refsect2"><a name="reboot_strategy_options"></a><h3 id="Reboot Strategies">Reboot Strategies<a class="headerlink" title="Permalink to this headline" href="#Reboot%20Strategies">¶</a></h3><p> rebootmgr supports different strategies, when a reboot should be done: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/src/Makefile.am new/rebootmgr-1.0/src/Makefile.am --- old/rebootmgr-0.20.1/src/Makefile.am 2019-09-06 12:28:00.000000000 +0200 +++ new/rebootmgr-1.0/src/Makefile.am 2020-04-25 13:15:09.000000000 +0200 @@ -1,5 +1,5 @@ # -# Copyright (c) 2016-2019 Thorsten Kukuk, Germany +# Copyright (c) 2016-2020 Thorsten Kukuk, Germany # # Author: Thorsten Kukuk <[email protected]> # @@ -13,7 +13,7 @@ AM_CFLAGS = -D_REENTRANT=1 -DLOCALEDIR=\"$(localedir)\" \ -DINTROSPECTIONDIR=\"$(introspectiondir)\" \ -DSYSCONFDIR=\"$(sysconfdir)\" -DDISTCONFDIR=\"$(distconfdir)\" \ - -I$(top_srcdir)/lib ${DBUS_CFLAGS} ${GLIB_CFLAGS} ${JSON_CFLAGS} \ + -I$(top_srcdir)/lib ${DBUS_CFLAGS} ${JSON_CFLAGS} \ ${ECONF_CFLAGS} ${CFLAGS_WARNINGS} ${CFLAGS_CHECKS} noinst_HEADERS = rebootmgr.h log_msg.h config_file.h util.h \ @@ -22,8 +22,8 @@ rebootmgrd_SOURCES = rebootmgrd.c log_msg.c config_file.c util.c \ lock-json.c lock-etcd.c -rebootmgrd_LDADD = -L../lib -lcalendarspec ${DBUS_LIBS} ${GLIB_LIBS} \ - ${JSON_LIBS} ${ETCD_LIBS} ${ECONF_LIBS} ${LDFLAGS_CHECKS} +rebootmgrd_LDADD = -L../lib -lcalendarspec ${DBUS_LIBS} ${JSON_LIBS} \ + ${ETCD_LIBS} ${ECONF_LIBS} -lrt -lpthread ${LDFLAGS_CHECKS} rebootmgrctl_SOURCES = rebootmgrctl.c util.c lock-etcd.c lock-json.c log_msg.c rebootmgrctl_LDADD = -L../lib -lcalendarspec ${DBUS_LIBS} ${JSON_LIBS} \ ${ETCD_LIBS} ${LDFLAGS_CHECKS} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/src/Makefile.in new/rebootmgr-1.0/src/Makefile.in --- old/rebootmgr-0.20.1/src/Makefile.in 2019-11-04 15:28:18.000000000 +0100 +++ new/rebootmgr-1.0/src/Makefile.in 2020-04-27 11:42:17.000000000 +0200 @@ -15,7 +15,7 @@ @SET_MAKE@ # -# Copyright (c) 2016-2019 Thorsten Kukuk, Germany +# Copyright (c) 2016-2020 Thorsten Kukuk, Germany # # Author: Thorsten Kukuk <[email protected]> # @@ -123,7 +123,7 @@ rebootmgrd_OBJECTS = $(am_rebootmgrd_OBJECTS) rebootmgrd_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -209,8 +209,6 @@ ETCD_LIBS = @ETCD_LIBS@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ @@ -324,7 +322,7 @@ AM_CFLAGS = -D_REENTRANT=1 -DLOCALEDIR=\"$(localedir)\" \ -DINTROSPECTIONDIR=\"$(introspectiondir)\" \ -DSYSCONFDIR=\"$(sysconfdir)\" -DDISTCONFDIR=\"$(distconfdir)\" \ - -I$(top_srcdir)/lib ${DBUS_CFLAGS} ${GLIB_CFLAGS} ${JSON_CFLAGS} \ + -I$(top_srcdir)/lib ${DBUS_CFLAGS} ${JSON_CFLAGS} \ ${ECONF_CFLAGS} ${CFLAGS_WARNINGS} ${CFLAGS_CHECKS} noinst_HEADERS = rebootmgr.h log_msg.h config_file.h util.h \ @@ -333,8 +331,8 @@ rebootmgrd_SOURCES = rebootmgrd.c log_msg.c config_file.c util.c \ lock-json.c lock-etcd.c -rebootmgrd_LDADD = -L../lib -lcalendarspec ${DBUS_LIBS} ${GLIB_LIBS} \ - ${JSON_LIBS} ${ETCD_LIBS} ${ECONF_LIBS} ${LDFLAGS_CHECKS} +rebootmgrd_LDADD = -L../lib -lcalendarspec ${DBUS_LIBS} ${JSON_LIBS} \ + ${ETCD_LIBS} ${ECONF_LIBS} -lrt -lpthread ${LDFLAGS_CHECKS} rebootmgrctl_SOURCES = rebootmgrctl.c util.c lock-etcd.c lock-json.c log_msg.c rebootmgrctl_LDADD = -L../lib -lcalendarspec ${DBUS_LIBS} ${JSON_LIBS} \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/src/config_file.c new/rebootmgr-1.0/src/config_file.c --- old/rebootmgr-0.20.1/src/config_file.c 2019-11-04 13:58:06.000000000 +0100 +++ new/rebootmgr-1.0/src/config_file.c 2020-04-23 09:29:49.000000000 +0200 @@ -111,7 +111,7 @@ error = econf_readFile (&file_2, SYSCONFDIR"/rebootmgr.conf", "=", "#"); if (error && error != ECONF_NOFILE) { - log_msg (LOG_ERR, "Cannot load '"SYSCONFDIR"rebootmgr.conf': %s", + log_msg (LOG_ERR, "Cannot load '"SYSCONFDIR"/rebootmgr.conf': %s", econf_errString(error)); return; } @@ -131,7 +131,7 @@ else if (file_1 != NULL) file = file_1; - if (file == NULL) /* happens if no config file exists */ + if (file == NULL) /* happens if no config file exists */ log_msg (LOG_ERR, "Cannot load 'rebootmgr.conf'"); else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/src/rebootmgr.h new/rebootmgr-1.0/src/rebootmgr.h --- old/rebootmgr-0.20.1/src/rebootmgr.h 2019-08-19 08:32:18.000000000 +0200 +++ new/rebootmgr-1.0/src/rebootmgr.h 2020-04-23 16:29:13.000000000 +0200 @@ -38,7 +38,7 @@ #define RM_UNUSED(x) UNUSED_ ## x __attribute__((unused)) -#include <glib.h> +#include <dbus/dbus.h> #include "calendarspec.h" typedef enum RM_RebootOrder { @@ -72,10 +72,11 @@ RM_RebootStatus reboot_status; int reboot_order; int temp_off; - guint reboot_timer_id; + timer_t reboot_timer_id; CalendarSpec *maint_window_start; time_t maint_window_duration; char *lock_group; + DBusConnection *connection; } RM_CTX; #endif /* _REBOOTMGR_H_ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/src/rebootmgrd.c new/rebootmgr-1.0/src/rebootmgrd.c --- old/rebootmgr-0.20.1/src/rebootmgrd.c 2019-09-06 12:36:25.000000000 +0200 +++ new/rebootmgr-1.0/src/rebootmgrd.c 2020-04-27 11:37:47.000000000 +0200 @@ -1,5 +1,5 @@ -/* Copyright (c) 2016, 2017, 2018, 2019 Thorsten Kukuk +/* Copyright (c) 2016, 2017, 2018, 2019, 2020 Thorsten Kukuk Author: Thorsten Kukuk <[email protected]> This program is free software; you can redistribute it and/or modify @@ -18,6 +18,7 @@ #include "config.h" #endif +#include <pthread.h> #include <errno.h> #include <getopt.h> #include <libintl.h> @@ -25,10 +26,10 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <signal.h> +#include <time.h> -#include <glib.h> #include <dbus/dbus.h> -#include <dbus/dbus-glib-lowlevel.h> #include "config_file.h" #include "log_msg.h" @@ -43,21 +44,26 @@ #define PROPERTIES_METHOD_GET "Get" #define PROPERTIES_METHOD_SET "Set" +static RM_CTX *ctx; +static pthread_mutex_t mutex_ctx = PTHREAD_MUTEX_INITIALIZER; + static int -create_context (RM_CTX **ctx) +create_context (void) { - if ((*ctx = calloc(1, sizeof(RM_CTX))) == NULL) + pthread_mutex_lock (&mutex_ctx); + if ((ctx = calloc(1, sizeof(RM_CTX))) == NULL) return 0; - **ctx = (RM_CTX) {RM_REBOOTSTRATEGY_BEST_EFFORT, 0, - RM_REBOOTORDER_STANDARD, 0, 0, NULL, 3600, NULL}; - (*ctx)->lock_group = strdup ("default"); + *ctx = (RM_CTX) {RM_REBOOTSTRATEGY_BEST_EFFORT, 0, + RM_REBOOTORDER_STANDARD, 0, 0, NULL, 3600, NULL, NULL}; + ctx->lock_group = strdup ("default"); + pthread_mutex_unlock (&mutex_ctx); return 1; } static int -destroy_context (RM_CTX *ctx) +destroy_context (void) { if (ctx == NULL) { @@ -65,11 +71,21 @@ return 0; } + pthread_mutex_lock (&mutex_ctx); + if (ctx->connection && dbus_connection_get_is_connected (ctx->connection)) + { + DBusError error; + + dbus_bus_release_name (ctx->connection, RM_DBUS_NAME, &error); + dbus_connection_unref (ctx->connection); + } if (ctx->maint_window_start != NULL) calendar_spec_free (ctx->maint_window_start); if (ctx->lock_group != NULL) free (ctx->lock_group); free (ctx); + pthread_mutex_unlock (&mutex_ctx); + return 1; } @@ -94,44 +110,50 @@ } static void -reboot_now (RM_CTX *ctx) +reboot_now (void) { + pthread_mutex_lock (&mutex_ctx); if (ctx->temp_off) - return; + { + pthread_mutex_unlock (&mutex_ctx); + return; + } if (ctx->reboot_status > 0) { if (!debug_flag) { + pthread_mutex_unlock (&mutex_ctx); log_msg (LOG_INFO, "rebootmgr: reboot triggered now!"); if (execl ("/usr/bin/systemctl", "systemctl", "reboot", NULL) == -1) - log_msg (LOG_ERR, "Calling /usr/bin/systemctl failed: %s", - g_strerror (errno)); + log_msg (LOG_ERR, "Calling /usr/bin/systemctl failed: %m"); } else log_msg (LOG_DEBUG, "systemctl reboot called!"); ctx->reboot_status = RM_REBOOTSTATUS_NOT_REQUESTED; } + pthread_mutex_unlock (&mutex_ctx); } #ifdef USE_ETCD /* Getting the lock from etcd can take a long time. Run this in an extra thread, so that we don't block dbus communication. */ -static gpointer -reboot_with_lock (gpointer user_data) +static void +reboot_with_lock (void) { - RM_CTX *ctx = user_data; - if (debug_flag) log_msg (LOG_DEBUG, "reboot with lock called"); + pthread_mutex_lock (&mutex_ctx); + ctx->reboot_status = RM_REBOOTSTATUS_WAITING_ETCD; if (etcd_get_lock (ctx->lock_group, NULL) != 0) { - log_msg (LOG_ERR, "ERROR: etcd_get_lock failed, abort reboot"); + log_msg (LOG_ERR, "ERROR: etcd_get_lock failed, abort reboot."); ctx->reboot_status = RM_REBOOTSTATUS_NOT_REQUESTED; - return NULL; + pthread_mutex_unlock (&mutex_ctx); + return; } /* Check, if we are still inside the maintenance window. Else @@ -150,7 +172,7 @@ if (r < 0) { log_msg (LOG_ERR, "ERROR: Internal error converting the timer: %s", - g_strerror (-r)); + strerror (-r)); ctx->reboot_status = RM_REBOOTSTATUS_NOT_REQUESTED; goto reboot_canceld; } @@ -164,58 +186,103 @@ goto reboot_canceld; } } + pthread_mutex_unlock (&mutex_ctx); - reboot_now (ctx); + reboot_now (); + + pthread_mutex_lock (&mutex_ctx); reboot_canceld: /* If we end here, reboot was canceld. Free Lock */ if (etcd_release_lock (ctx->lock_group, NULL) != 0) - { - log_msg (LOG_ERR, "ERROR: cannot remove old reboot lock from etcd!"); - } - return NULL; + log_msg (LOG_ERR, "ERROR: cannot remove old reboot lock from etcd"); + + pthread_mutex_unlock (&mutex_ctx); } #endif /* USE_ETCD */ -/* Called by g_timeout_add when maintenance window starts */ -static gboolean -reboot_timer (gpointer user_data) +/* Check which reboot method and forward to that function */ +/* Called by timer_create as new thread */ +static void +reboot_timer (sigval_t RM_UNUSED(user_data)) { - RM_CTX *ctx = user_data; + if (debug_flag) + log_msg (LOG_DEBUG, "reboot_timer called"); #ifdef USE_ETCD + /* XXX lock mutex ... */ if (((ctx->reboot_strategy == RM_REBOOTSTRATEGY_BEST_EFFORT && etcd_is_running()) || ctx->reboot_strategy == RM_REBOOTSTRATEGY_ETCD_LOCK)) { - g_thread_new ("do reboot lock thread", &reboot_with_lock, ctx); + reboot_with_lock (); } else #endif /* USE_ETCD */ - reboot_now (ctx); - return FALSE; + reboot_now (); +} + +/* Create a new timer thread, which calls '_function' after + specified seconds */ +static timer_t +create_timer (time_t seconds, void (*_function) (sigval_t)) +{ + timer_t timer_id; + + /* Create timer */ + struct sigevent se; + se.sigev_notify = SIGEV_THREAD; + se.sigev_value.sival_ptr = NULL; + se.sigev_notify_function = _function; + se.sigev_notify_attributes = NULL; + if (timer_create(CLOCK_REALTIME, &se, &timer_id) == -1) + { + log_msg (LOG_ERR, "ERROR: Could not create timer: %m"); + return 0; + } + + /* activate timer */ + struct itimerspec its; + its.it_value.tv_sec = seconds; + its.it_value.tv_nsec = 0; + its.it_interval.tv_sec = 0; + its.it_interval.tv_nsec = 0; + if (timer_settime (timer_id, 0, &its, NULL) == -1) + { + log_msg (LOG_ERR, "ERROR: setting the timer failed: %m"); + timer_delete (timer_id); + return 0; + } + + return timer_id; } static void -initialize_timer (RM_CTX *ctx) +initialize_timer (void) { int r; usec_t curr = now(CLOCK_REALTIME); usec_t next; - usec_t duration = ctx->maint_window_duration * USEC_PER_SEC; + usec_t duration; + + pthread_mutex_lock (&mutex_ctx); + + duration = ctx->maint_window_duration * USEC_PER_SEC; /* Check, if we are inside the maintenance window. If yes, reboot now */ r = calendar_spec_next_usec (ctx->maint_window_start, curr - duration, &next); if (r < 0) { - log_msg (LOG_ERR, "Internal error converting the timer: %s", - g_strerror (-r)); + log_msg (LOG_ERR, "ERROR: Internal error converting the timer: %s", + strerror (-r)); + pthread_mutex_unlock (&mutex_ctx); return; } if (curr > next && curr < next + duration) { /* we are inside the maintenance window, reboot */ - reboot_timer (ctx); + pthread_mutex_unlock (&mutex_ctx); + reboot_timer ((sigval_t) 0); return; } @@ -223,8 +290,9 @@ r = calendar_spec_next_usec (ctx->maint_window_start, curr, &next); if (r < 0) { - log_msg (LOG_ERR, "Internal error converting the timer: %s", - g_strerror (-r)); + log_msg (LOG_ERR, "ERROR: Internal error converting the timer: %s", + strerror (-r)); + pthread_mutex_unlock (&mutex_ctx); return; } @@ -242,20 +310,31 @@ } ctx->reboot_status = RM_REBOOTSTATUS_WAITING_WINDOW; + if (ctx->reboot_timer_id != 0) + timer_delete(ctx->reboot_timer_id); + ctx->reboot_timer_id = - g_timeout_add ((next-curr)/USEC_PER_MSEC, reboot_timer, ctx); + create_timer ((next - curr) / USEC_PER_SEC, reboot_timer); + + pthread_mutex_unlock (&mutex_ctx); } + +/* system is requestion a reboot via dbus interface */ static void -do_reboot (RM_CTX *ctx) +do_reboot (void) { + pthread_mutex_lock (&mutex_ctx); + ctx->reboot_status = RM_REBOOTSTATUS_REQUESTED; if (ctx->reboot_order == RM_REBOOTORDER_FORCED) { if (debug_flag) log_msg (LOG_DEBUG, "Forced reboot requested"); - reboot_now (ctx); + pthread_mutex_unlock (&mutex_ctx); + reboot_now (); + return; } switch (ctx->reboot_strategy) @@ -264,26 +343,40 @@ case RM_REBOOTSTRATEGY_ETCD_LOCK: if (ctx->maint_window_start != NULL && ctx->reboot_order != RM_REBOOTORDER_FAST) - initialize_timer(ctx); + { + pthread_mutex_unlock (&mutex_ctx); + initialize_timer(); + return; + } else { + pthread_mutex_unlock (&mutex_ctx); #ifdef USE_ETCD if (ctx->reboot_strategy == RM_REBOOTSTRATEGY_ETCD_LOCK || etcd_is_running()) - g_thread_new ("do reboot lock thread", &reboot_with_lock, ctx); + reboot_with_lock (); else #endif /* USE_ETCD */ - reboot_now (ctx); + reboot_now (); + return; } break; case RM_REBOOTSTRATEGY_INSTANTLY: - reboot_now (ctx); + pthread_mutex_unlock (&mutex_ctx); + reboot_now (); + return; break; case RM_REBOOTSTRATEGY_MAINT_WINDOW: if (ctx->reboot_order == RM_REBOOTORDER_FAST || ctx->maint_window_start == NULL) - reboot_now(ctx); - initialize_timer(ctx); + { + pthread_mutex_unlock (&mutex_ctx); + reboot_now (); + return; + } + pthread_mutex_unlock (&mutex_ctx); + initialize_timer (); + return; break; case RM_REBOOTSTRATEGY_OFF: ctx->reboot_status = RM_REBOOTSTATUS_NOT_REQUESTED; @@ -295,14 +388,18 @@ ctx->reboot_strategy); break; } + pthread_mutex_unlock (&mutex_ctx); } + static DBusMessage * -handle_native_iface (RM_CTX *ctx, DBusMessage *message) +handle_native_iface (DBusMessage *message) { DBusError err; DBusMessage *reply = 0; + /* XXX lock ctx access */ + reply = dbus_message_new_method_return (message); dbus_error_init(&err); @@ -331,7 +428,7 @@ } else { - log_msg (LOG_ERR, "Unknown reboot order (%i), ignore reboot command", + log_msg (LOG_ERR, "ERROR: Unknown reboot order (%i), ignore reboot command", order); return reply; } @@ -340,14 +437,18 @@ if (ctx->reboot_status > 0) log_msg (LOG_INFO, "Reboot already in progress, ignored"); else - do_reboot (ctx); + do_reboot (); } else if (dbus_message_is_method_call (message, RM_DBUS_INTERFACE, RM_DBUS_METHOD_CANCEL)) { log_msg (LOG_INFO, "Reboot canceld"); - if (ctx->reboot_status > 0 && ctx->reboot_timer_id > 0) - g_source_remove (ctx->reboot_timer_id); + if (ctx->reboot_status > 0 && ctx->reboot_timer_id) + { + /* delete timer */ + if (timer_delete (ctx->reboot_timer_id) == -1) + log_msg (LOG_ERR, "ERROR: deleting timer failed: %m"); + } ctx->reboot_status = RM_REBOOTSTATUS_NOT_REQUESTED; ctx->reboot_timer_id = 0; } @@ -512,6 +613,7 @@ return reply; } + static DBusMessage * handle_introspect_request (DBusMessage *msg) { @@ -528,6 +630,7 @@ return reply; } + /* This is just a stub implementation, and we don't announce it in the xml file * but without it, d-feet does fails when trying to query a method */ static DBusMessage * @@ -545,30 +648,30 @@ return reply; } + /* vtable implementation: handles messages and calls respective C functions */ static DBusHandlerResult handle_message (DBusConnection *connection, DBusMessage *message, - void *user) + void *RM_UNUSED(user)) { - RM_CTX *ctx = user; DBusMessage *reply = 0; const char* iface = dbus_message_get_interface(message); - if (dbus_message_is_method_call(message, DBUS_INTERFACE_INTROSPECTABLE, - "Introspect")) + if (dbus_message_is_method_call (message, DBUS_INTERFACE_INTROSPECTABLE, + "Introspect")) { /* Handle Introspection request */ - reply = handle_introspect_request(message); + reply = handle_introspect_request (message); } else if (strcmp(iface, DBUS_INTERFACE_PROPERTIES) == 0) { /* Stub implementation for property requests */ - reply = handle_properties_iface(message); + reply = handle_properties_iface (message); } else if (strcmp(iface, RM_DBUS_INTERFACE) == 0) { /* Handle requests to our own interfaces */ - reply = handle_native_iface(ctx, message); + reply = handle_native_iface (message); } if (reply) @@ -576,7 +679,7 @@ /* send the reply && flush the connection */ if (!dbus_connection_send (connection, reply, NULL)) { - log_msg (LOG_ERR, "Out of memory!"); + log_msg (LOG_ERR, "ERROR: Out of memory"); return DBUS_HANDLER_RESULT_NEED_MEMORY; } dbus_message_unref(reply); @@ -584,19 +687,19 @@ return DBUS_HANDLER_RESULT_HANDLED; } -static int dbus_init (RM_CTX*); -static gboolean -dbus_reconnect (gpointer user_data) +static int dbus_init (void); + +static void +dbus_reconnect (sigval_t RM_UNUSED(user_data)) { - RM_CTX* ctx = user_data; - gboolean status; + int status; - status = dbus_init (ctx); - if (debug_flag) - log_msg (LOG_DEBUG, "Reconnect %s", - status ? "successful" : "failed"); - return !status; + status = dbus_init (); + if (status < 1) + log_msg (LOG_ERR, "ERROR: Reconnect to dbus failed"); + else + log_msg (LOG_INFO, "Reconnect to dbus was successful"); } static DBusHandlerResult @@ -612,8 +715,7 @@ log_msg (LOG_INFO, "Lost connection to D-Bus"); dbus_connection_unref (connection); connection = NULL; - /* g_timeout_add (1000, dbus_reconnect, NULL); */ - g_timeout_add_seconds (1, dbus_reconnect, NULL); + create_timer (1, dbus_reconnect); handled = DBUS_HANDLER_RESULT_HANDLED; } @@ -627,7 +729,7 @@ 0: error */ static int -dbus_init (RM_CTX *ctx) +dbus_init () { DBusConnection *connection = NULL; DBusError error; @@ -637,7 +739,7 @@ connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error); if (connection == NULL || dbus_error_is_set (&error)) { - log_msg (LOG_ERR, "Connection to D-BUS system message bus failed: %s.", + log_msg (LOG_ERR, "ERROR: Connection to D-BUS system message bus failed: %s", error.message); dbus_error_free (&error); connection = NULL; @@ -648,7 +750,7 @@ RM_DBUS_NAME, &error); if (dbus_error_is_set (&error)) { - log_msg (LOG_ERR, "DBus Error: %s", error.message); + log_msg (LOG_ERR, "ERROR: DBus failure: %s", error.message); dbus_error_free (&error); goto out; } @@ -664,7 +766,7 @@ DBUS_NAME_FLAG_DO_NOT_QUEUE, &error); if (dbus_error_is_set (&error)) { - log_msg (LOG_ERR, "Error requesting a bus name: %s", error.message); + log_msg (LOG_ERR, "ERROR: DBus failure requesting a bus name: %s", error.message); dbus_error_free (&error); return 0; } @@ -676,7 +778,7 @@ } else { - log_msg (LOG_ERR, "Failed to reserve name %s", RM_DBUS_NAME); + log_msg (LOG_ERR, "ERROR: Failed to reserve name %s", RM_DBUS_NAME); return 0; } } @@ -688,7 +790,7 @@ unless somebody stole this name from you, so better to choose a correct bus name */ - log_msg (LOG_ERR, "%s is already reserved", RM_DBUS_NAME); + log_msg (LOG_ERR, "ERROR: %s is already reserved", RM_DBUS_NAME); return 1; } @@ -698,7 +800,7 @@ &error); if (dbus_error_is_set (&error)) { - log_msg (LOG_ERR, "Error adding match for dbus interface, %s: %s", + log_msg (LOG_ERR, "ERROR: Failure adding match for dbus interface, %s: %s", error.name, error.message); dbus_error_free (&error); @@ -717,7 +819,7 @@ if (dbus_error_is_set (&error)) { - log_msg (LOG_ERR, "Error adding match for rebootmgrd interface, %s: %s", + log_msg (LOG_ERR, "ERROR: Failure adding match for rebootmgrd interface, %s: %s", error.name, error.message); dbus_error_free (&error); dbus_connection_unref (connection); @@ -735,10 +837,12 @@ vtable.message_function = handle_message; if (!dbus_connection_register_object_path(connection, RM_DBUS_PATH, - &vtable, ctx)) - log_msg(LOG_ERR, "Failed to register object path"); + &vtable, NULL)) + log_msg(LOG_ERR, "ERROR: Failed to register object path"); - dbus_connection_setup_with_g_main (connection, NULL); + pthread_mutex_lock (&mutex_ctx); + ctx->connection = connection; + pthread_mutex_unlock (&mutex_ctx); return 1; @@ -760,9 +864,6 @@ int main (int argc, char **argv) { - GMainLoop *loop; - RM_CTX *ctx; - while (1) { int c; @@ -807,12 +908,13 @@ return 1; } - if (!create_context (&ctx)) + if (!create_context ()) { - log_msg (LOG_ERR, "Could not initialize context"); + log_msg (LOG_ERR, "ERROR: Could not initialize context"); return -1; } + pthread_mutex_lock (&mutex_ctx); load_config (ctx); #ifdef USE_ETCD @@ -820,19 +922,30 @@ etcd_own_lock (ctx->lock_group)) { if (etcd_release_lock (ctx->lock_group, NULL) != 0) - log_msg (LOG_ERR, "ERROR: cannot remove old reboot lock from etcd!"); + log_msg (LOG_ERR, "ERROR: cannot remove old reboot lock from etcd"); } #endif /* USE_ETCD */ + pthread_mutex_unlock (&mutex_ctx); - loop = g_main_loop_new (NULL, FALSE); - - if (dbus_init (ctx) != 1) + if (dbus_init () != 1) return 1; - g_main_loop_run (loop); + while (true) + { + while (dbus_connection_read_write_dispatch (ctx->connection, -1)) + ; // empty loop body + + if (dbus_connection_get_is_connected (ctx->connection)) + break; + else + { + if (dbus_init () != 1) + return 1; + } + } - if (!destroy_context(ctx)) - log_msg(LOG_ERR, "Could not destroy context"); + if (!destroy_context ()) + log_msg (LOG_ERR, "ERROR: Could not destroy context"); return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/systemd/Makefile.in new/rebootmgr-1.0/systemd/Makefile.in --- old/rebootmgr-0.20.1/systemd/Makefile.in 2019-11-04 15:28:18.000000000 +0100 +++ new/rebootmgr-1.0/systemd/Makefile.in 2020-04-27 11:42:17.000000000 +0200 @@ -182,8 +182,6 @@ ETCD_LIBS = @ETCD_LIBS@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/tests/Makefile.in new/rebootmgr-1.0/tests/Makefile.in --- old/rebootmgr-0.20.1/tests/Makefile.in 2019-11-04 15:28:18.000000000 +0100 +++ new/rebootmgr-1.0/tests/Makefile.in 2020-04-27 11:42:17.000000000 +0200 @@ -419,8 +419,6 @@ ETCD_LIBS = @ETCD_LIBS@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ Binary files old/rebootmgr-0.20.1/tests/test-calendarspec and new/rebootmgr-1.0/tests/test-calendarspec differ Binary files old/rebootmgr-0.20.1/tests/test-etcd and new/rebootmgr-1.0/tests/test-etcd differ Binary files old/rebootmgr-0.20.1/tests/test-json and new/rebootmgr-1.0/tests/test-json differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.20.1/tests/test-json.c new/rebootmgr-1.0/tests/test-json.c --- old/rebootmgr-0.20.1/tests/test-json.c 2019-08-19 08:32:18.000000000 +0200 +++ new/rebootmgr-1.0/tests/test-json.c 2020-04-27 11:20:37.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 Thorsten Kukuk +/* Copyright (c) 2017, 2020 Thorsten Kukuk Author: Thorsten Kukuk <[email protected]> This program is free software; you can redistribute it and/or modify @@ -94,7 +94,7 @@ #else int -main (int argc, char *argv[]) +main (void) { printf ("No etcd and json support available\n"); return 77; Binary files old/rebootmgr-0.20.1/tests/test-parse-duration and new/rebootmgr-1.0/tests/test-parse-duration differ
