!5 [sync] PR-2: fix goaccess -h/--help exit-code to 0

From: @openeuler-sync-bot
Reviewed-by: @small_leek
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2021-10-11 01:20:31 +00:00 committed by Gitee
commit 1fcf8ea4c5
2 changed files with 31 additions and 2 deletions

View File

@ -0,0 +1,25 @@
From 40522f4cb1b4825a168639563aa0ff3750a0d393 Mon Sep 17 00:00:00 2001
From: baizg1107 <preloyalwhite@163.com>
Date: Fri, 8 Oct 2021 18:34:35 +0800
Subject: [PATCH] Fix usage exit code
---
src/options.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/options.c b/src/options.c
index cea991f..9025914 100644
--- a/src/options.c
+++ b/src/options.c
@@ -288,7 +288,7 @@ cmd_help (void)
"\n\n"
, INFO_HELP_EXAMPLES, INFO_MORE_INFO, GO_WEBSITE
);
- exit (EXIT_FAILURE);
+ exit (EXIT_SUCCESS);
}
/* *INDENT-ON* */
--
2.27.0

View File

@ -6,11 +6,12 @@
%endif
Name: goaccess
Version: 1.4.6
Release: 1
Release: 2
Summary: Real-time web log analyzer and interactive viewer
License: GPLv2+
URL: https://goaccess.io/
Source0: https://tar.goaccess.io/%{name}-%{version}.tar.gz
Patch0: 0001-Fix-usage-exit-code.patch
BuildRequires: autoconf automake gcc GeoIP-devel ncurses-devel gettext-devel
%if %{with openssl}
BuildRequires: openssl-devel
@ -22,7 +23,7 @@ terminal in *nix systems. It provides fast and valuable HTTP statistics for
system administrators that require a visual server report on the fly.
%prep
%autosetup
%autosetup -p1
sed -i '/-pthread/d' configure.ac
%build
@ -47,5 +48,8 @@ sed -i '/-pthread/d' configure.ac
%{_mandir}/man1/%{name}.1*
%changelog
* Fri Oct 8 2021 baizhonggui <baizhonggui@huawei.com> - 1.4.6-2
- Fix goaccess -h/--help exit-code: 1 to 0
* Tue Sep 7 2021 zhengyaohui <zhengyaohui1@huawei.com> - 1.4.6-1
- package init