fix subcommand formats usage

(cherry picked from commit 2a8f04865dbbff4560e3efd582b635306252eeb8)
This commit is contained in:
lingsheng 2021-10-15 15:51:37 +08:00 committed by openeuler-sync-bot
parent afe62bbd8f
commit 4da6c68012
2 changed files with 31 additions and 2 deletions

View File

@ -0,0 +1,24 @@
From e57a32ff5abf6545911acb6af1d6868db820f82c Mon Sep 17 00:00:00 2001
From: lingsheng <lingsheng@huawei.com>
Date: Fri, 15 Oct 2021 11:30:48 +0800
Subject: [PATCH] fix subcommand formats usage
---
lib/fluent/command/binlog_reader.rb | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/fluent/command/binlog_reader.rb b/lib/fluent/command/binlog_reader.rb
index f77c47c..7054679 100644
--- a/lib/fluent/command/binlog_reader.rb
+++ b/lib/fluent/command/binlog_reader.rb
@@ -217,6 +217,7 @@ module BinlogReaderCommand
class Formats < Base
def initialize(argv = ARGV)
super
+ @opt_parser.banner = "Usage: fluent-binlog-reader #{self.class.to_s.split('::').last.downcase} [options]"
parse_options!
end
--
2.23.0

View File

@ -2,13 +2,15 @@
%global gem_name fluentd %global gem_name fluentd
Name: rubygem-fluentd Name: rubygem-fluentd
Version: 1.3.3 Version: 1.3.3
Release: 1 Release: 2
Summary: Fluentd event collector Summary: Fluentd event collector
License: Apache-2.0 License: Apache-2.0
URL: https://www.fluentd.org/ URL: https://www.fluentd.org/
Source0: https://rubygems.org/gems/fluentd-1.3.3.gem Source0: https://rubygems.org/gems/fluentd-1.3.3.gem
BuildArch: noarch BuildArch: noarch
Patch0001: fix-subcommand-formats-usage.patch
BuildRequires: rubygem-bundler BuildRequires: rubygem-bundler
BuildRequires: rubygem-cool.io BuildRequires: rubygem-cool.io
BuildRequires: rubygem(http_parser.rb) BuildRequires: rubygem(http_parser.rb)
@ -39,7 +41,7 @@ BuildArch: noarch
Fluentd is an open source data collector designed to scale and simplify log management. It can collect, process and ship many kinds of data in near real-time. Fluentd is an open source data collector designed to scale and simplify log management. It can collect, process and ship many kinds of data in near real-time.
%prep %prep
%autosetup -n fluentd-1.3.3 %autosetup -n fluentd-1.3.3 -p1
gem spec %{SOURCE0} -l --ruby > fluentd.gemspec gem spec %{SOURCE0} -l --ruby > fluentd.gemspec
sed -i '/http_parser.rb/s/< 0.7.0/<= 0.7.0/g' fluentd.gemspec sed -i '/http_parser.rb/s/< 0.7.0/<= 0.7.0/g' fluentd.gemspec
sed -i '/tzinfo/s/~> 1.0/>= 1.0/g' fluentd.gemspec sed -i '/tzinfo/s/~> 1.0/>= 1.0/g' fluentd.gemspec
@ -86,5 +88,8 @@ mv %{buildroot}/filelist.lst .
%{gem_docdir}/* %{gem_docdir}/*
%changelog %changelog
* Fri Oct 15 2021 lingsheng <lingsheng@huawei.com> - 1.3.3-2
- fix subcommand formats usage
* Thu Jul 29 2021 wutao <wutao61@huawei.com> - 1.3.3-1 * Thu Jul 29 2021 wutao <wutao61@huawei.com> - 1.3.3-1
- Package init - Package init