Hello community, here is the log from the commit of package rebootmgr for openSUSE:Factory checked in at 2019-09-27 14:42:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rebootmgr (Old) and /work/SRC/openSUSE:Factory/.rebootmgr.new.2352 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rebootmgr" Fri Sep 27 14:42:56 2019 rev:11 rq:731261 version:0.20 Changes: -------- --- /work/SRC/openSUSE:Factory/rebootmgr/rebootmgr.changes 2019-02-04 21:21:38.391650784 +0100 +++ /work/SRC/openSUSE:Factory/.rebootmgr.new.2352/rebootmgr.changes 2019-09-27 14:42:56.253624570 +0200 @@ -1,0 +2,22 @@ +Mon Sep 9 10:40:46 CEST 2019 - [email protected] + +- Fix %config for backward compatibility + +------------------------------------------------------------------- +Fri Sep 6 13:03:15 CEST 2019 - [email protected] + +- Update to version 0.20 + - add support to write changes back to /etc/rebootmgr.conf + +------------------------------------------------------------------- +Wed Aug 28 12:56:07 CEST 2019 - [email protected] + +- Preserve /etc/rebootmgr.conf if modified + +------------------------------------------------------------------- +Tue Aug 27 15:17:28 CEST 2019 - [email protected] + +- Update to version 0.19 + - use libeconf for /usr/etc move + +------------------------------------------------------------------- Old: ---- rebootmgr-0.18.tar.xz New: ---- rebootmgr-0.20.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rebootmgr.spec ++++++ --- /var/tmp/diff_new_pack.QT2LWp/_old 2019-09-27 14:42:56.689623436 +0200 +++ /var/tmp/diff_new_pack.QT2LWp/_new 2019-09-27 14:42:56.689623436 +0200 @@ -16,8 +16,15 @@ # +%if ! %{defined _distconfdir} + %define _distconfdir %{_sysconfdir} + %define with_config 1 +%else + %define with_config 0 +%endif + Name: rebootmgr -Version: 0.18 +Version: 0.20 Release: 0 Summary: Automatic controlled reboot during a maintenance window License: GPL-2.0-only AND LGPL-2.1-or-later @@ -30,7 +37,7 @@ BuildRequires: pkgconfig(dbus-glib-1) BuildRequires: pkgconfig(glib-2.0) >= 2.40 BuildRequires: pkgconfig(json-c) -%{?systemd_requires} +BuildRequires: pkgconfig(libeconf) %description RebootManager is a dbus service to execute a controlled reboot after updates in a defined maintenance window. @@ -47,10 +54,15 @@ %install %make_install ln -sf service %{buildroot}%{_sbindir}/rcrebootmgr +if [ ! -d %{buildroot}%{_distconfdir} ]; then + mkdir -p %{buildroot}%{_distconfdir} + mv %{buildroot}%{_sysconfdir}/rebootmgr.conf %{buildroot}%{_distconfdir} +fi %fdupes %{buildroot}%{_mandir} %pre %service_add_pre rebootmgr.service +test -f /etc/rebootmgr.conf.rpmsave && mv -v /etc/rebootmgr.conf.rpmsave /etc/rebootmgr.conf.rpmsave.old ||: %post %service_add_post rebootmgr.service @@ -61,11 +73,18 @@ %postun %service_del_postun rebootmgr.service +%posttrans +test -f /etc/rebootmgr.conf.rpmsave && mv -v /etc/rebootmgr.conf.rpmsave /etc/rebootmgr.conf + %files %license COPYING COPYING.LIB %doc NEWS %dir %{_sysconfdir}/dbus-1/system.d +%if %{with_config} %config %{_sysconfdir}/rebootmgr.conf +%else +%{_distconfdir}/rebootmgr.conf +%endif %config %{_sysconfdir}/dbus-1/system.d/org.opensuse.RebootMgr.conf %{_prefix}/lib/systemd/system/rebootmgr.service %{_sbindir}/rebootmgrctl ++++++ rebootmgr-0.18.tar.xz -> rebootmgr-0.20.tar.xz ++++++ ++++ 2152 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/NEWS new/rebootmgr-0.20/NEWS --- old/rebootmgr-0.18/NEWS 2019-01-17 16:50:52.000000000 +0100 +++ new/rebootmgr-0.20/NEWS 2019-09-06 12:38:04.000000000 +0200 @@ -2,6 +2,12 @@ Copyright (C) 2016-2019 Thorsten Kukuk +Version 0.20 +* Implement writing of config options back with libeconf + +Version 0.19 +* Use libeconf to read rebootmgr.conf, writing currently not supported + Version 0.18 * Allow compiling without etcd support diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/config.h.in new/rebootmgr-0.20/config.h.in --- old/rebootmgr-0.18/config.h.in 2019-01-17 17:02:41.000000000 +0100 +++ new/rebootmgr-0.20/config.h.in 2019-09-06 12:38:12.000000000 +0200 @@ -22,6 +22,9 @@ /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT +/* Define to 1 if gettid() is available */ +#undef HAVE_GETTID + /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV @@ -76,6 +79,9 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS +/* Use ECONF */ +#undef USE_ECONF + /* Use etcd for locking */ #undef USE_ETCD diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/configure.ac new/rebootmgr-0.20/configure.ac --- old/rebootmgr-0.18/configure.ac 2019-01-17 17:02:32.000000000 +0100 +++ new/rebootmgr-0.20/configure.ac 2019-09-06 12:37:31.000000000 +0200 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(rebootmgr, 0.18) +AC_INIT(rebootmgr, 0.20) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src/rebootmgrd.c]) AM_CONFIG_HEADER(config.h) @@ -42,11 +42,6 @@ AC_SUBST(TMPFILESDIR) AC_SUBST(SYSTEMDDIR) - - - -EXTRA_CFLAGS="-W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -DXTSTRINGDEFINES -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -D_FORTIFY_SOURCE=2" -AC_SUBST(EXTRA_CFLAGS) dnl Checks for programs. AC_GNU_SOURCE AC_PROG_CC @@ -56,6 +51,36 @@ AC_PROG_RANLIB AC_PROG_LN_S +dnl enable additional compiler checks +AC_ARG_ENABLE([compiler-checks], + AS_HELP_STRING([--enable-compiler-checks],[enables additional compiler checks, not for production])) + +if test x"$enable_compiler_checks" = x"yes" ; then + CFLAGS_CHECKS="-Wall -O2 -fsanitize=address -fno-omit-frame-pointer -g" + LDFLAGS_CHECKS="-fsanitize=address" +fi + +dnl enable additional compiler warnings +AC_ARG_ENABLE([compiler-warnings], + AS_HELP_STRING([--enable-compiler-warnings],[enables additional compiler warnings])) + +if test x"$enable_compiler_warnings" = x"yes" ; then + if test x"$enable_compiler_checks" = x"yes" ; then + AC_MSG_ERROR([Conflicting options: --enable-compiler-warnings cannot be used together with --eanble-compiler-checks]) + fi + CFLAGS_WARNINGS="-O2 -g -Werror -W -Wall -DXTSTRINGDEFINES -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=8 -Wbad-function-cast -Wcast-align -Wcast-qual -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef" + LDFLAGS_WARNINGS="" +fi + +AC_SUBST(CFLAGS_CHECKS) +AC_SUBST(LDFLAGS_CHECKS) +AC_SUBST(CFLAGS_WARNINGS) +AC_SUBST(LDFLAGS_WARNINGS) + + +dnl Check for gettid wrapper +AC_CHECK_FUNC(gettid, [AC_DEFINE(HAVE_GETTID, 1, [Define to 1 if gettid() is available])]) + dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -65,13 +90,18 @@ PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.40) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) +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) + + AC_CHECK_LIB([cetcd],[cetcd_client_init],[ETCD_LIBS="-lcetcd"],[ETCD_LIBS=""]) if test x"" != x"${ETCD_LIBS}" then AC_DEFINE(USE_ETCD, 1, [Use etcd for locking]) AC_SUBST(ETCD_LIBS) - PKG_CHECK_MODULES([JSON], [json-c]) + PKG_CHECK_MODULES(JSON, json-c >= 0.13) AC_SUBST(JSON_CFLAGS) AC_SUBST(JSON_LIBS) fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/lib/Makefile.am new/rebootmgr-0.20/lib/Makefile.am --- old/rebootmgr-0.18/lib/Makefile.am 2017-01-09 18:39:46.000000000 +0100 +++ new/rebootmgr-0.20/lib/Makefile.am 2019-09-06 12:25:09.000000000 +0200 @@ -6,7 +6,7 @@ noinst_LIBRARIES = libcalendarspec.a -AM_CFLAGS = -D_REENTRANT=1 #$(EXTRA_CFLAGS) +AM_CFLAGS = -D_REENTRANT=1 $(CFLAGS_CHECKS) #$(EXTRA_CFLAGS) CLEANFILES = *~ test-calendarspec.log test-parse-duration.log \ test-suite.log test-calendarspec.trs test-parse-duration.trs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/man/Makefile.am new/rebootmgr-0.20/man/Makefile.am --- old/rebootmgr-0.18/man/Makefile.am 2017-02-06 08:27:15.000000000 +0100 +++ new/rebootmgr-0.20/man/Makefile.am 2019-08-19 08:32:18.000000000 +0200 @@ -34,7 +34,7 @@ endef rebootmgr.index.xml: make-man-index.py $(XMLS) - python $(srcdir)/make-man-index.py $(srcdir)/$@ $(XMLS) + python3 $(srcdir)/make-man-index.py $(srcdir)/$@ $(XMLS) rebootmgrd.8: rebootmgrd.8.xml $(XSLTPROC) -o $(srcdir)/$@ --path $(srcdir) --xinclude --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/man/org.opensuse.RebootMgr.conf.8.html new/rebootmgr-0.20/man/org.opensuse.RebootMgr.conf.8.html --- old/rebootmgr-0.18/man/org.opensuse.RebootMgr.conf.8.html 2019-01-17 16:49:06.000000000 +0100 +++ new/rebootmgr-0.20/man/org.opensuse.RebootMgr.conf.8.html 2019-09-06 12:30:55.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.18</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.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 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' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/man/rebootmgr.conf.5 new/rebootmgr-0.20/man/rebootmgr.conf.5 --- old/rebootmgr-0.18/man/rebootmgr.conf.5 2019-01-17 15:55:30.000000000 +0100 +++ new/rebootmgr-0.20/man/rebootmgr.conf.5 2019-09-06 12:30:55.000000000 +0200 @@ -2,12 +2,12 @@ .\" Title: rebootmgr.conf .\" Author: Thorsten Kukuk <[email protected]> .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 01/17/2019 +.\" Date: 09/06/2019 .\" Manual: resolved.conf .\" Source: rebootmgr .\" Language: English .\" -.TH "REBOOTMGR\&.CONF" "5" "01/17/2019" "rebootmgr" "resolved.conf" +.TH "REBOOTMGR\&.CONF" "5" "09/06/2019" "rebootmgr" "resolved.conf" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/man/rebootmgr.conf.5.html new/rebootmgr-0.20/man/rebootmgr.conf.5.html --- old/rebootmgr-0.18/man/rebootmgr.conf.5.html 2019-01-17 15:55:31.000000000 +0100 +++ new/rebootmgr-0.20/man/rebootmgr.conf.5.html 2019-09-06 12:30:55.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.17</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.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 <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' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/man/rebootmgr.index.html new/rebootmgr-0.20/man/rebootmgr.index.html --- old/rebootmgr-0.18/man/rebootmgr.index.html 2019-01-17 16:49:06.000000000 +0100 +++ new/rebootmgr-0.20/man/rebootmgr.index.html 2019-09-06 12:30:55.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.18</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.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> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/man/rebootmgr.index.xml new/rebootmgr-0.20/man/rebootmgr.index.xml --- old/rebootmgr-0.18/man/rebootmgr.index.xml 2019-01-17 16:49:06.000000000 +0100 +++ new/rebootmgr-0.20/man/rebootmgr.index.xml 2019-09-06 12:30:55.000000000 +0200 @@ -14,6 +14,6 @@ <refname>rebootmgr.index</refname> <refpurpose>List all manpages from the rebootmgr project</refpurpose> </refnamediv> -<refsect1><title>O</title><para><citerefentry><refentrytitle>org.opensuse.RebootMgr.conf</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Reboot the machine during a maintenance window.<sbr/></para></refsect1><refsect1><title>R</title><para><citerefentry><refentrytitle>rebootmgr.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Reboot Manager configuration files<sbr/><citerefentry><refentrytitle>rebootmgr.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Reboot the machine during a maintenance window.<sbr/><citerefentry><refentrytitle>rebootmgrctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Tool to control and configure the reboot manager daemon.<sbr/><citerefentry><refentrytitle>rebootmgrd</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Reboot the machine during a maintenance window.<sbr/></para></refsect1><refsect1> +<refsect1><title>O</title><para><citerefentry><refentrytitle>org.opensuse.RebootMgr.conf</refentrytitle><manvolnum>8</manvolnum></citerefentry> — Reboot the machine during a maintenance window.<sbr/></para></refsect1><refsect1><title>R</title><para><citerefentry><refentrytitle>rebootmgr.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> — Reboot Manager configuration files<sbr/><citerefentry><refentrytitle>rebootmgr.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> — Reboot the machine during a maintenance window.<sbr/><citerefentry><refentrytitle>rebootmgrctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> — Tool to control and configure the reboot manager daemon.<sbr/><citerefentry><refentrytitle>rebootmgrd</refentrytitle><manvolnum>8</manvolnum></citerefentry> — Reboot the machine during a maintenance window.<sbr/></para></refsect1><refsect1> <para id="counts">This index contains 5 entries, referring to 3 individual manual pages.</para> </refsect1></refentry> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/man/rebootmgr.service.8.html new/rebootmgr-0.20/man/rebootmgr.service.8.html --- old/rebootmgr-0.18/man/rebootmgr.service.8.html 2019-01-17 16:49:06.000000000 +0100 +++ new/rebootmgr-0.20/man/rebootmgr.service.8.html 2019-09-06 12:30:55.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.18</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.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 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' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/man/rebootmgrctl.1 new/rebootmgr-0.20/man/rebootmgrctl.1 --- old/rebootmgr-0.18/man/rebootmgrctl.1 2019-01-17 16:48:02.000000000 +0100 +++ new/rebootmgr-0.20/man/rebootmgrctl.1 2019-09-06 12:30:54.000000000 +0200 @@ -2,12 +2,12 @@ .\" Title: rebootmgrctl .\" Author: Thorsten Kukuk <[email protected]> .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 01/17/2019 +.\" Date: 09/06/2019 .\" Manual: rebootmgrctl .\" Source: rebootmgr .\" Language: English .\" -.TH "REBOOTMGRCTL" "1" "01/17/2019" "rebootmgr" "rebootmgrctl" +.TH "REBOOTMGRCTL" "1" "09/06/2019" "rebootmgr" "rebootmgrctl" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/man/rebootmgrctl.1.html new/rebootmgr-0.20/man/rebootmgrctl.1.html --- old/rebootmgr-0.18/man/rebootmgrctl.1.html 2019-01-17 16:48:02.000000000 +0100 +++ new/rebootmgr-0.20/man/rebootmgrctl.1.html 2019-09-06 12:30:55.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.18</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.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 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' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/man/rebootmgrd.8 new/rebootmgr-0.20/man/rebootmgrd.8 --- old/rebootmgr-0.18/man/rebootmgrd.8 2019-01-17 16:49:06.000000000 +0100 +++ new/rebootmgr-0.20/man/rebootmgrd.8 2019-09-06 12:30:54.000000000 +0200 @@ -2,12 +2,12 @@ .\" Title: rebootmgrd .\" Author: Thorsten Kukuk <[email protected]> .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 01/17/2019 +.\" Date: 09/06/2019 .\" Manual: rebootmgrd .\" Source: rebootmgr .\" Language: English .\" -.TH "REBOOTMGRD" "8" "01/17/2019" "rebootmgr" "rebootmgrd" +.TH "REBOOTMGRD" "8" "09/06/2019" "rebootmgr" "rebootmgrd" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/man/rebootmgrd.8.html new/rebootmgr-0.20/man/rebootmgrd.8.html --- old/rebootmgr-0.18/man/rebootmgrd.8.html 2019-01-17 16:49:06.000000000 +0100 +++ new/rebootmgr-0.20/man/rebootmgrd.8.html 2019-09-06 12:30:55.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.18</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.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 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' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/missing new/rebootmgr-0.20/missing --- old/rebootmgr-0.18/missing 2017-01-09 15:11:34.000000000 +0100 +++ new/rebootmgr-0.20/missing 2019-08-19 11:58:00.000000000 +0200 @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-06-26.16; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <[email protected]>, 1996. # This program is free software; you can redistribute it and/or modify @@ -160,7 +160,7 @@ ;; autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'automa4te' program to be rebuilt." + echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) @@ -210,6 +210,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/src/Makefile.am new/rebootmgr-0.20/src/Makefile.am --- old/rebootmgr-0.18/src/Makefile.am 2019-01-17 16:59:29.000000000 +0100 +++ new/rebootmgr-0.20/src/Makefile.am 2019-09-06 12:28:00.000000000 +0200 @@ -4,14 +4,17 @@ # Author: Thorsten Kukuk <[email protected]> # +distconfdir = /usr/etc localedir = $(datadir)/locale introspectiondir = $(datadir)/dbus-1/interfaces CLEANFILES = *~ -AM_CFLAGS = -D_REENTRANT=1 $(EXTRA_CFLAGS) -DLOCALEDIR=\"$(localedir)\" \ - -DINTROSPECTIONDIR=\"$(introspectiondir)\" -DSYSCONFDIR=\"$(sysconfdir)\"\ - -I$(top_srcdir)/lib ${DBUS_CFLAGS} ${GLIB_CFLAGS} ${JSON_CFLAGS} +AM_CFLAGS = -D_REENTRANT=1 -DLOCALEDIR=\"$(localedir)\" \ + -DINTROSPECTIONDIR=\"$(introspectiondir)\" \ + -DSYSCONFDIR=\"$(sysconfdir)\" -DDISTCONFDIR=\"$(distconfdir)\" \ + -I$(top_srcdir)/lib ${DBUS_CFLAGS} ${GLIB_CFLAGS} ${JSON_CFLAGS} \ + ${ECONF_CFLAGS} ${CFLAGS_WARNINGS} ${CFLAGS_CHECKS} noinst_HEADERS = rebootmgr.h log_msg.h config_file.h util.h \ lock-json.h lock-etcd.h @@ -19,7 +22,9 @@ 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} +rebootmgrd_LDADD = -L../lib -lcalendarspec ${DBUS_LIBS} ${GLIB_LIBS} \ + ${JSON_LIBS} ${ETCD_LIBS} ${ECONF_LIBS} ${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} +rebootmgrctl_LDADD = -L../lib -lcalendarspec ${DBUS_LIBS} ${JSON_LIBS} \ + ${ETCD_LIBS} ${LDFLAGS_CHECKS} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/src/config_file.c new/rebootmgr-0.20/src/config_file.c --- old/rebootmgr-0.18/src/config_file.c 2019-01-17 16:04:39.000000000 +0100 +++ new/rebootmgr-0.20/src/config_file.c 2019-09-06 12:22:49.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (c) 2016, 2017 Daniel Molkentin +/* Copyright (c) 2016, 2017, 2019 Daniel Molkentin Author: Daniel Molkentin <[email protected]> This program is free software; you can redistribute it and/or modify @@ -13,6 +13,9 @@ You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif #include <sys/types.h> #include <sys/stat.h> @@ -22,7 +25,11 @@ #include <unistd.h> #include <stdlib.h> +#if USE_ECONF +#include <libeconf.h> +#else #include <glib.h> +#endif #include "calendarspec.h" #include "parse-duration.h" @@ -78,8 +85,192 @@ #define RM_CONFIG_FILE SYSCONFDIR"/rebootmgr.conf" #define RM_GROUP "rebootmgr" + +#if USE_ECONF +void +load_config (RM_CTX *ctx) +{ + econf_file *file = NULL, *file_1 = NULL, *file_2 = NULL, + *file_m = NULL; + econf_err error; + + error = econf_readFile (&file_1, DISTCONFDIR"/rebootmgr.conf", "=", "#"); + if (error && error != ECONF_NOFILE) + { + log_msg (LOG_ERR, "Cannot load '"DISTCONFDIR"/rebootmgr.conf': %s", + econf_errString(error)); + return; + } + + error = econf_readFile (&file_2, SYSCONFDIR"/rebootmgr.conf", "=", "#"); + if (error && error != ECONF_NOFILE) + { + log_msg (LOG_ERR, "Cannot load '"SYSCONFDIR"rebootmgr.conf': %s", + econf_errString(error)); + return; + } + + if (file_1 != NULL && file_2 != NULL) + { + if ((error = econf_mergeFiles (&file_m, file_1, file_2))) + { + log_msg (LOG_ERR, "Cannot merge 'rebootmgr.conf': %s", + econf_errString(error)); + return; + } + file = file_m; + } + else if (file_2 != NULL) + file = file_2; + else if (file_1 != NULL) + file = file_1; + + if (file == NULL) /* happens if no config file exists */ + log_msg (LOG_ERR, "Cannot load 'rebootmgr.conf'"); + else + { + char *str_start = NULL, *str_duration = NULL, *str_strategy = NULL, *lock_group = NULL; + + error = econf_getStringValue(file, RM_GROUP, "window-start", &str_start); + if (error && error != ECONF_NOKEY) + { + log_msg (LOG_ERR, "ERROR (econf): cannot get key 'window-start': %s", + econf_errString(error)); + goto out; + } + error = econf_getStringValue (file, RM_GROUP, "window-duration", &str_duration); + if (error && error != ECONF_NOKEY) + { + log_msg (LOG_ERR, "ERROR (econf): cannot get key 'window-duration': %s", + econf_errString(error)); + goto out; + } + error = econf_getStringValue (file, RM_GROUP, "strategy", &str_strategy); + if (error && error != ECONF_NOKEY) + { + log_msg (LOG_ERR, "ERROR (econf): cannot get key 'strategy': %s", + econf_errString(error)); + goto out; + } + error = econf_getStringValue (file, RM_GROUP, "lock-group", &lock_group); + if (error && error != ECONF_NOKEY) + { + log_msg (LOG_ERR, "ERROR (econf): cannot get key 'lock-group': %s", + econf_errString(error)); + goto out; + } + + if (str_start == NULL && str_duration != NULL) + str_duration = NULL; + ctx->reboot_strategy = string_to_strategy(str_strategy, NULL); + if (str_start != NULL) + { + int ret; + + if ((ret = calendar_spec_from_string (str_start, + &ctx->maint_window_start)) < 0) + log_msg (LOG_ERR, "ERROR: cannot parse window-start (%s): %s", + str_start, strerror (-ret)); + if ((ctx->maint_window_duration = + parse_duration (str_duration)) == BAD_TIME) + log_msg (LOG_ERR, "ERROR: cannot parse window-duration '%s'", + str_duration); + } + if (ctx->lock_group) + free (ctx->lock_group); + if (lock_group == NULL) + ctx->lock_group = strdup ("default"); + else + ctx->lock_group = strdup (lock_group); + out: + if (file_1) + econf_free(file_1); + if (file_2) + econf_free(file_2); + if (file_m) + econf_free(file_m); + if (str_start) + free (str_start); + if (str_duration) + free (str_duration); + if (str_strategy) + free (str_strategy); + if (lock_group) + free (lock_group); + } +} + + +void +save_config (RM_CTX *ctx, int field) +{ + econf_file *file = NULL; + econf_err error; + + error = econf_readFile (&file, SYSCONFDIR"/rebootmgr.conf", "=", "#"); + if (error) + { + if (error != ECONF_NOFILE) + { + log_msg (LOG_ERR, "Cannot load '"SYSCONFDIR"rebootmgr.conf': %s", + econf_errString(error)); + return; + } + else + { + if ((error = econf_newKeyFile (&file, '=', '#'))) + { + log_msg (LOG_ERR, "Cannot create new config file: %s", + econf_errString(error)); + return; + } + } + } + + switch (field) + { + char *p; + case SET_STRATEGY: + error = econf_setStringValue (file, RM_GROUP, "strategy", + strategy_to_string(ctx->reboot_strategy, NULL)); + break; + case SET_LOCK_GROUP: + error = econf_setStringValue (file, RM_GROUP, "lock-group", ctx->lock_group); + break; + case SET_MAINT_WINDOW: + p = spec_to_string(ctx->maint_window_start); + error = econf_setStringValue (file, RM_GROUP, "window-start", p); + free (p); + if (!error) + { + p = duration_to_string(ctx->maint_window_duration); + error = econf_setStringValue (file, RM_GROUP, "window-duration", p); + free (p); + } + break; + default: + log_msg (LOG_ERR, "Error writing config file, unknown field %i", field); + econf_free (file); + return; + } + + if (error) + { + log_msg (LOG_ERR, "Error setting variable: %s\n", econf_errString(error)); + econf_free (file); + return; + } + + if ((error = econf_writeFile(file, SYSCONFDIR"/", "rebootmgr.conf"))) + log_msg (LOG_ERR, "Error writing "SYSCONFDIR"/rebootmgr.conf: %s", + econf_errString(error)); + + econf_free (file); +} + +#else void -save_config (RM_CTX *ctx) +save_config (RM_CTX *ctx, int fields __attribute__((unused))) { GKeyFile *key_file; GError *error; @@ -123,7 +314,6 @@ { GKeyFile *key_file; GError *error; - int ret; key_file = g_key_file_new (); error = NULL; @@ -150,6 +340,8 @@ ctx->reboot_strategy = string_to_strategy(str_strategy, NULL); if (str_start != NULL) { + int ret; + if ((ret = calendar_spec_from_string (str_start, &ctx->maint_window_start)) < 0) log_msg (LOG_ERR, "ERROR: cannot parse window-start (%s): %s", @@ -176,3 +368,4 @@ free (lock_group); } } +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/src/config_file.h new/rebootmgr-0.20/src/config_file.h --- old/rebootmgr-0.18/src/config_file.h 2017-01-11 12:58:28.000000000 +0100 +++ new/rebootmgr-0.20/src/config_file.h 2019-08-30 13:33:44.000000000 +0200 @@ -19,7 +19,11 @@ #ifndef __CONFIG_FILE_H__ #define __CONFIG_FILE_H__ -void save_config (RM_CTX *ctx); +#define SET_STRATEGY 1 +#define SET_LOCK_GROUP 2 +#define SET_MAINT_WINDOW 3 + +void save_config (RM_CTX *ctx, int field); void load_config (RM_CTX *ctx); char *get_file_content (const char *fname); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/src/log_msg.c new/rebootmgr-0.20/src/log_msg.c --- old/rebootmgr-0.18/src/log_msg.c 2019-01-17 16:04:39.000000000 +0100 +++ new/rebootmgr-0.20/src/log_msg.c 2019-08-27 14:49:22.000000000 +0200 @@ -25,6 +25,8 @@ #include "log_msg.h" #include <sys/syscall.h> + +#ifndef HAVE_GETTID #ifdef __NR_gettid static pid_t gettid (void) @@ -38,6 +40,7 @@ return getpid (); } #endif +#endif /* ! HAVE_GETTID */ int debug_flag = 0; int logfile_flag = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/src/rebootmgrctl.c new/rebootmgr-0.20/src/rebootmgrctl.c --- old/rebootmgr-0.18/src/rebootmgrctl.c 2019-01-17 16:11:25.000000000 +0100 +++ new/rebootmgr-0.20/src/rebootmgrctl.c 2019-08-19 12:00:04.000000000 +0200 @@ -23,11 +23,11 @@ #include <string.h> #include <libintl.h> #include <dbus/dbus.h> -#include <json-c/json.h> #include "rebootmgr.h" #include "util.h" #ifdef USE_ETCD +#include <json-c/json.h> #include "lock-etcd.h" #include "lock-json.h" #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/src/rebootmgrd.c new/rebootmgr-0.20/src/rebootmgrd.c --- old/rebootmgr-0.18/src/rebootmgrd.c 2019-01-17 16:07:33.000000000 +0100 +++ new/rebootmgr-0.20/src/rebootmgrd.c 2019-09-06 12:36:25.000000000 +0200 @@ -368,7 +368,7 @@ if (debug_flag) log_msg (LOG_DEBUG, "reboot_strategy changed"); ctx->reboot_strategy = strategy; - save_config (ctx); + save_config (ctx, SET_STRATEGY); } } } @@ -409,7 +409,7 @@ free (ctx->lock_group); ctx->lock_group = strdup (group); } - save_config (ctx); + save_config (ctx, SET_LOCK_GROUP); } } else if (dbus_message_is_method_call (message, RM_DBUS_INTERFACE, @@ -493,7 +493,7 @@ calendar_spec_free (ctx->maint_window_start); ctx->maint_window_start = NULL; } - save_config(ctx); + save_config(ctx, SET_MAINT_WINDOW); } } else if (dbus_message_is_method_call (message, RM_DBUS_INTERFACE, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/test-driver new/rebootmgr-0.20/test-driver --- old/rebootmgr-0.18/test-driver 2017-01-09 15:11:34.000000000 +0100 +++ new/rebootmgr-0.20/test-driver 2019-08-19 11:58:00.000000000 +0200 @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2012-06-27.10; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# Copyright (C) 2011-2017 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -44,35 +44,52 @@ Usage: test-driver --test-name=NAME --log-file=PATH --trs-file=PATH [--expect-failure={yes|no}] [--color-tests={yes|no}] - [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT + [--enable-hard-errors={yes|no}] [--] + TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] The '--test-name', '--log-file' and '--trs-file' options are mandatory. END } -# TODO: better error handling in option parsing (in particular, ensure -# TODO: $log_file, $trs_file and $test_name are defined). test_name= # Used for reporting. log_file= # Where to save the output of the test script. trs_file= # Where to save the metadata of the test run. expect_failure=no color_tests=no enable_hard_errors=yes -while test $# -gt 0; do - case $1 in +while test $# -gt 1; do + arg=${1%=*} + val=${1#*=} + if [ $arg == $val ]; then + val=$2 + shift + fi + case $arg in --help) print_usage; exit $?;; --version) echo "test-driver $scriptversion"; exit $?;; - --test-name) test_name=$2; shift;; - --log-file) log_file=$2; shift;; - --trs-file) trs_file=$2; shift;; - --color-tests) color_tests=$2; shift;; - --expect-failure) expect_failure=$2; shift;; - --enable-hard-errors) enable_hard_errors=$2; shift;; - --) shift; break;; + --test-name) test_name=$val;; + --log-file) log_file=$val;; + --trs-file) trs_file=$val;; + --color-tests) color_tests=$val;; + --expect-failure) expect_failure=$val;; + --enable-hard-errors) enable_hard_errors=$val;; + --) break;; -*) usage_error "invalid option: '$1'";; esac - shift + [[ $arg != $val ]] && shift done +missing_opts= +test x"$test_name" = x && missing_opts="$missing_opts --test-name" +test x"$log_file" = x && missing_opts="$missing_opts --log-file" +test x"$trs_file" = x && missing_opts="$missing_opts --trs-file" +if test x"$missing_opts" != x; then + usage_error "the following mandatory options are missing:$missing_opts" +fi + +if test $# -eq 0; then + usage_error "missing argument" +fi + if test $color_tests = yes; then # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'. red='[0;31m' # Red. @@ -94,11 +111,14 @@ # Test script is run here. "$@" >$log_file 2>&1 estatus=$? + if test $enable_hard_errors = no && test $estatus -eq 99; then - estatus=1 + tweaked_estatus=1 +else + tweaked_estatus=$estatus fi -case $estatus:$expect_failure in +case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; @@ -107,6 +127,12 @@ *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac +# Report the test outcome and exit status in the logs, so that one can +# know whether the test passed or failed simply by looking at the '.log' +# file, without the need of also peaking into the corresponding '.trs' +# file (automake bug#11814). +echo "$res $test_name (exit status: $estatus)" >>$log_file + # Report outcome to console. echo "${col}${res}${std}: $test_name" @@ -122,6 +148,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/tests/Makefile.am new/rebootmgr-0.20/tests/Makefile.am --- old/rebootmgr-0.18/tests/Makefile.am 2019-01-17 17:05:11.000000000 +0100 +++ new/rebootmgr-0.20/tests/Makefile.am 2019-09-06 12:30:51.000000000 +0200 @@ -4,17 +4,19 @@ # Author: Thorsten Kukuk <[email protected]> # -AM_CFLAGS = -D_REENTRANT=1 -I$(top_srcdir)/lib -I$(top_srcdir)/src +AM_CFLAGS = -D_REENTRANT=1 -I$(top_srcdir)/lib -I$(top_srcdir)/src \ + ${CFLAGS_CHECKS} ${CFLAGS_WARNINGS} CLEANFILES = *~ test-calendarspec.log test-parse-duration.log \ test-suite.log test-calendarspec.trs test-parse-duration.trs \ test-etcd.log test-etcd.trs test-json.log test-json.trs noinst_PROGRAMS = test-calendarspec test-parse-duration test-json test-etcd -test_calendarspec_LDADD = ../lib/libcalendarspec.a +test_calendarspec_LDADD = ../lib/libcalendarspec.a ${LDFLAGS_CHECKS} test_parse_duration_LDADD = ../lib/libcalendarspec.a -test_json_LDADD = ../src/lock-json.o ../src/log_msg.o @JSON_LIBS@ -test_etcd_LDADD = ../src/lock-json.o ../src/lock-etcd.o ../src/log_msg.o @JSON_LIBS@ @ETCD_LIBS@ ${LIBS} +test_json_LDADD = ../src/lock-json.o ../src/log_msg.o ${JSON_LIBS} +test_etcd_LDADD = ../src/lock-json.o ../src/lock-etcd.o ../src/log_msg.o \ + ${JSON_LIBS} ${ETCD_LIBS} ${LIBS} ${LDFLAGS_CHECKS} TESTS = test-calendarspec test-parse-duration test-json test-etcd EXTRA_DIST = ${TESTS} Binary files old/rebootmgr-0.18/tests/test-calendarspec and new/rebootmgr-0.20/tests/test-calendarspec differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/tests/test-calendarspec.c new/rebootmgr-0.20/tests/test-calendarspec.c --- old/rebootmgr-0.18/tests/test-calendarspec.c 2017-01-26 09:32:48.000000000 +0100 +++ new/rebootmgr-0.20/tests/test-calendarspec.c 2019-09-06 12:31:19.000000000 +0200 @@ -104,7 +104,7 @@ tzset(); } -int main(int argc, char* argv[]) { +int main(void) { CalendarSpec *c; test_one("Sat,Thu,Mon-Wed,Sat-Sun", "Mon-Thu,Sat,Sun *-*-* 00:00:00"); Binary files old/rebootmgr-0.18/tests/test-etcd and new/rebootmgr-0.20/tests/test-etcd differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/tests/test-etcd.c new/rebootmgr-0.20/tests/test-etcd.c --- old/rebootmgr-0.18/tests/test-etcd.c 2019-01-17 16:25:41.000000000 +0100 +++ new/rebootmgr-0.20/tests/test-etcd.c 2019-09-06 12:32:06.000000000 +0200 @@ -27,7 +27,7 @@ #define ETCD_LOCKS_DEFAULT_GROUP "rebootmgr-testsuite" int -main (int argc, char *argv[]) +main (void) { if (!etcd_is_running()) { @@ -73,7 +73,7 @@ #else int -main (int argc, char *argv[]) +main (void) { printf ("No etcd support\n"); return 77; Binary files old/rebootmgr-0.18/tests/test-json and new/rebootmgr-0.20/tests/test-json differ Binary files old/rebootmgr-0.18/tests/test-parse-duration and new/rebootmgr-0.20/tests/test-parse-duration differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rebootmgr-0.18/tests/test-parse-duration.c new/rebootmgr-0.20/tests/test-parse-duration.c --- old/rebootmgr-0.18/tests/test-parse-duration.c 2016-12-21 11:05:31.000000000 +0100 +++ new/rebootmgr-0.20/tests/test-parse-duration.c 2019-09-06 12:31:36.000000000 +0200 @@ -19,7 +19,7 @@ #include "parse-duration.h" int -main (int argc, char* argv[]) +main (void) { assert (parse_duration ("1h30s") == 3630); assert (parse_duration ("1:00") == 3600);
