From 0184609417b9579cb777dd5c544522b52a48adb8 Mon Sep 17 00:00:00 2001 From: baizg1107 Date: Fri, 8 Oct 2021 18:40:05 +0800 Subject: [PATCH] Fix goaccess -h/--help exit-code (cherry picked from commit 867e181b83db2309180078bb889d1db86bf97972) --- 0001-Fix-usage-exit-code.patch | 25 +++++++++++++++++++++++++ goaccess.spec | 8 ++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 0001-Fix-usage-exit-code.patch diff --git a/0001-Fix-usage-exit-code.patch b/0001-Fix-usage-exit-code.patch new file mode 100644 index 0000000..1b427db --- /dev/null +++ b/0001-Fix-usage-exit-code.patch @@ -0,0 +1,25 @@ +From 40522f4cb1b4825a168639563aa0ff3750a0d393 Mon Sep 17 00:00:00 2001 +From: baizg1107 +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 + diff --git a/goaccess.spec b/goaccess.spec index ba467bd..8fb9b61 100644 --- a/goaccess.spec +++ b/goaccess.spec @@ -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 - 1.4.6-2 +- Fix goaccess -h/--help exit-code: 1 to 0 + * Tue Sep 7 2021 zhengyaohui - 1.4.6-1 - package init -- Gitee