Skip to content

Commit

Permalink
Fix problems on Fedora 19 and 21.
Browse files Browse the repository at this point in the history
Glusterfs on Fedora 19 seems to be old and as such does not allow us to
build the gfapi-fd plugin. As Fedora 19 is not supported anyway it makes
little sense to add a lot of work to make the gluster stuff work on that
platform.

On Fedora 21 it seems the compile flags are more strict which leads to
the following error:

tray-monitor.cpp:65:32: error: format not a string literal and no format
arguments [-Werror=format-security]
  • Loading branch information
Marco van Wieringen authored and joergsteffens committed May 28, 2015
1 parent 747dcc4 commit 654edbb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
2 changes: 2 additions & 0 deletions platforms/packaging/bareos.spec
Expand Up @@ -114,8 +114,10 @@ Vendor: The Bareos Team

%if 0%{?rhel_version} >= 700 || 0%{?centos_version} >= 700 || 0%{?fedora_version} >= 19
%define systemd_support 1
%if 0%{?fedora_version} != 19
%define glusterfs 1
%endif
%endif

%if 0%{?rhel_version} >= 700
%define ceph 1
Expand Down
27 changes: 15 additions & 12 deletions src/qt-tray-monitor/tray-monitor.cpp
Expand Up @@ -47,22 +47,25 @@ static QApplication* app = NULL;
static void usage()
{
QString out;
out = out.sprintf( _(
PROG_COPYRIGHT
"\nVersion: %s (%s) %s %s %s\n\n"
"Usage: tray-monitor [-c config_file] [-d debug_level]\n"
" -c <file> set configuration file to file\n"
" -d <nn> set debug level to <nn>\n"
" -dt print timestamp in debug output\n"
" -t test - read configuration and exit\n"
" -? print this message.\n"
"\n"), 2004, VERSION, BDATE, HOST_OS, DISTNAME, DISTVER);

out = out.sprintf(_(PROG_COPYRIGHT
"\nVersion: %s (%s) %s %s %s\n\n"
"Usage: tray-monitor [-c config_file] [-d debug_level]\n"
" -c <file> set configuration file to file\n"
" -d <nn> set debug level to <nn>\n"
" -dt print timestamp in debug output\n"
" -t test - read configuration and exit\n"
" -xc print configuration and exit\n"
" -xs print configuration file schema in JSON format and exit\n"
" -? print this message.\n"
"\n"),
2004, VERSION, BDATE, HOST_OS, DISTNAME, DISTVER);

#if HAVE_WIN32
QMessageBox::information(0, "Help", out);
#else
fprintf(stderr, out.toUtf8());
fprintf(stderr, "%s", out.toUtf8().data());
#endif

}

static void parse_command_line(int argc, char* argv[], cl_opts& cl)
Expand Down

0 comments on commit 654edbb

Please sign in to comment.