Fix build failure on PowerNV builders
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
parent
cc6add3f26
commit
e8feb8acf2
@ -0,0 +1,65 @@
|
||||
From d2210b5edbac23d59c8789c6020f9f850be503c4 Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Gallagher <sgallagh@redhat.com>
|
||||
Date: Wed, 28 Oct 2020 15:20:04 -0400
|
||||
Subject: [PATCH] slog_common_event: Allow --help and --version even on
|
||||
unsupported platforms
|
||||
|
||||
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
|
||||
---
|
||||
src/slog_common_event.c | 25 +++++++++++++------------
|
||||
1 file changed, 13 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/src/slog_common_event.c b/src/slog_common_event.c
|
||||
index d7409e8fa34e2c95210d18c0939844a4ed091a8b..cc91e7babdbaaff7b2cf51998b4f6dca1b8d04da 100644
|
||||
--- a/src/slog_common_event.c
|
||||
+++ b/src/slog_common_event.c
|
||||
@@ -77,22 +77,10 @@ main(int argc, char **argv) {
|
||||
char *e=NULL, *s=NULL, *d=NULL, *l=NULL;
|
||||
char desc[1024];
|
||||
servicelog *slog;
|
||||
struct sl_event event;
|
||||
uint64_t event_id;
|
||||
-#ifndef SERVICELOG_TEST
|
||||
- int platform = 0;
|
||||
-
|
||||
- platform = get_platform();
|
||||
- switch (platform) {
|
||||
- case PLATFORM_UNKNOWN:
|
||||
- case PLATFORM_POWERNV:
|
||||
- fprintf(stderr, "%s is not supported on the %s platform\n",
|
||||
- argv[0], __power_platform_name(platform));
|
||||
- exit(1);
|
||||
- }
|
||||
-#endif
|
||||
|
||||
for (;;) {
|
||||
option_index = 0;
|
||||
rc = getopt_long(argc, argv, "e:t:s:d:l:hvV", long_options,
|
||||
&option_index);
|
||||
@@ -137,10 +125,23 @@ main(int argc, char **argv) {
|
||||
"(%s).\n", PACKAGE_BUGREPORT);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
+#ifndef SERVICELOG_TEST
|
||||
+ int platform = 0;
|
||||
+
|
||||
+ platform = get_platform();
|
||||
+ switch (platform) {
|
||||
+ case PLATFORM_UNKNOWN:
|
||||
+ case PLATFORM_POWERNV:
|
||||
+ fprintf(stderr, "%s is not supported on the %s platform\n",
|
||||
+ argv[0], __power_platform_name(platform));
|
||||
+ exit(1);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (e == NULL) {
|
||||
if (verbose) {
|
||||
fprintf(stderr, "The --event command-line argument is "
|
||||
"required.");
|
||||
}
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: servicelog
|
||||
Version: 1.1.15
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Servicelog Tools
|
||||
|
||||
License: GPLv2
|
||||
@ -13,6 +13,10 @@ BuildRequires: autoconf libtool librtas-devel help2man
|
||||
# because of librtas-devel in libservicelog
|
||||
ExclusiveArch: ppc %{power64}
|
||||
|
||||
# Patch to work around build failing to generate manpages on PowerNV builders
|
||||
# See https://github.com/power-ras/servicelog/pull/2
|
||||
Patch0001: 0001-slog_common_event-Allow-help-and-version-even-on-uns.patch
|
||||
|
||||
%description
|
||||
Command-line interfaces for viewing and manipulating the contents of
|
||||
the servicelog database. Contains entries that are useful
|
||||
@ -45,6 +49,9 @@ help2man -s 8 -N $RPM_BUILD_ROOT/%{_sbindir}/slog_common_event > $RPM_BUILD_ROOT
|
||||
%{_mandir}/man[18]/*.[18]*
|
||||
|
||||
%changelog
|
||||
* Wed Oct 28 2020 Stephen Gallagher <sgallagh@redhat.com> - 1.1.15-4
|
||||
- Fix build failure on PowerNV builders
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.15-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user